From 7d2d13074877bceaef0a2bae91df79d32ddc7416 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Thu, 18 Jan 2007 13:30:01 -0800 Subject: [PATCH 01/41] Adding support for versioned libndbclient.so. bug #13522 --- configure.in | 7 +++++++ ndb/src/Makefile.am | 2 ++ 2 files changed, 9 insertions(+) diff --git a/configure.in b/configure.in index 8457a2dcad0..e85b8e795ba 100644 --- a/configure.in +++ b/configure.in @@ -14,6 +14,10 @@ DOT_FRM_VERSION=6 SHARED_LIB_MAJOR_VERSION=14 SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 +NDB_SHARED_LIB_MAJOR_VERSION=1 +NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 + + # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 @@ -73,6 +77,9 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], [Version of .frm files]) AC_SUBST(SHARED_LIB_MAJOR_VERSION) AC_SUBST(SHARED_LIB_VERSION) +AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION) +AC_SUBST(NDB_SHARED_LIB_VERSION) + AC_SUBST(AVAILABLE_LANGUAGES) AC_SUBST(AVAILABLE_LANGUAGES_ERRORS) AC_SUBST_FILE(AVAILABLE_LANGUAGES_ERRORS_RULES) diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am index eb1cf1c6543..ffa45e57196 100644 --- a/ndb/src/Makefile.am +++ b/ndb/src/Makefile.am @@ -6,6 +6,8 @@ ndblib_LTLIBRARIES = libndbclient.la libndbclient_la_SOURCES = +libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ + libndbclient_la_LIBADD = \ ndbapi/libndbapi.la \ common/transporter/libtransporter.la \ From c546e4bfe1f19768c6c76f8e4c3d0118b3090ad1 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Thu, 18 Jan 2007 14:21:50 -0800 Subject: [PATCH 02/41] Incrementing soname to 2 for 5.0 branch. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index bb4db2d5da5..9402c8d1876 100644 --- a/configure.in +++ b/configure.in @@ -16,7 +16,7 @@ DOT_FRM_VERSION=6 SHARED_LIB_MAJOR_VERSION=15 SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 -NDB_SHARED_LIB_MAJOR_VERSION=1 +NDB_SHARED_LIB_MAJOR_VERSION=2 NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 From fd75030f930a5ec2d31e90f4ccec9c3947a8f7b2 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Thu, 18 Jan 2007 16:21:43 -0800 Subject: [PATCH 03/41] Added version script information to actually version the symbols. --- configure.in | 9 +++++++++ ndb/src/Makefile.am | 2 +- ndb/src/libndb.ver.in | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ndb/src/libndb.ver.in diff --git a/configure.in b/configure.in index e85b8e795ba..47965876627 100644 --- a/configure.in +++ b/configure.in @@ -449,6 +449,15 @@ if $LD --version 2>/dev/null|grep -q GNU; then fi AC_SUBST(LD_VERSION_SCRIPT) +# libndbclient versioning when linked with GNU ld. +if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" + AC_CONFIG_FILES(ndb/src/libndb.ver) +fi +AC_SUBST(NDB_LD_VERSION_SCRIPT) + + + # Avoid bug in fcntl on some versions of linux AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os]) # Any wariation of Linux diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am index ffa45e57196..056bb5a1734 100644 --- a/ndb/src/Makefile.am +++ b/ndb/src/Makefile.am @@ -6,7 +6,7 @@ ndblib_LTLIBRARIES = libndbclient.la libndbclient_la_SOURCES = -libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ +libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ @NDB_LD_VERSION_SCRIPT@ libndbclient_la_LIBADD = \ ndbapi/libndbapi.la \ diff --git a/ndb/src/libndb.ver.in b/ndb/src/libndb.ver.in new file mode 100644 index 00000000000..72bf93d196f --- /dev/null +++ b/ndb/src/libndb.ver.in @@ -0,0 +1,2 @@ +libndbclient_@NDB_SHARED_LIB_MAJOR_VERSION@ { global: *; }; + From 3fdf318ef67fc873576d89ca53b595f4fbbe6b79 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Thu, 18 Jan 2007 16:28:47 -0800 Subject: [PATCH 04/41] Added configure section to deal with actually versioning symbols. --- configure.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.in b/configure.in index 9402c8d1876..f73f08f85fc 100644 --- a/configure.in +++ b/configure.in @@ -388,6 +388,14 @@ if $LD --version 2>/dev/null|grep -q GNU; then fi AC_SUBST(LD_VERSION_SCRIPT) +# libndbclient versioning when linked with GNU ld. +if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" + AC_CONFIG_FILES(storage/ndb/src/libndb.ver) +fi +AC_SUBST(NDB_LD_VERSION_SCRIPT) + + # Avoid bug in fcntl on some versions of linux AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os]) # Any variation of Linux From 33842511464a7b490342a482c02edf4ab5e89585 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Thu, 18 Jan 2007 16:31:43 -0800 Subject: [PATCH 05/41] Add code to actually version the symbols in the library, and not just the library. bug #13522 --- configure.in | 12 ++++++++++++ storage/ndb/src/Makefile.am | 2 +- storage/ndb/src/libndb.ver.in | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 storage/ndb/src/libndb.ver.in diff --git a/configure.in b/configure.in index 17a9714c16c..0becfe00bd5 100644 --- a/configure.in +++ b/configure.in @@ -15,6 +15,8 @@ DOT_FRM_VERSION=6 # See the libtool docs for information on how to do shared lib versions. SHARED_LIB_MAJOR_VERSION=15 SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 +NDB_SHARED_LIB_MAJOR_VERSION=3 +NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` @@ -58,6 +60,8 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], [Version of .frm files]) AC_SUBST(SHARED_LIB_MAJOR_VERSION) AC_SUBST(SHARED_LIB_VERSION) +AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION) +AC_SUBST(NDB_SHARED_LIB_VERSION) AC_SUBST(AVAILABLE_LANGUAGES) @@ -354,6 +358,14 @@ if $LD --version 2>/dev/null|grep -q GNU; then fi AC_SUBST(LD_VERSION_SCRIPT) +# libndbclient versioning when linked with GNU ld. +if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" + AC_CONFIG_FILES(storage/ndb/src/libndb.ver) +fi +AC_SUBST(NDB_LD_VERSION_SCRIPT) + + # Avoid bug in fcntl on some versions of linux AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os]) # Any variation of Linux diff --git a/storage/ndb/src/Makefile.am b/storage/ndb/src/Makefile.am index fa743777921..627347daf02 100644 --- a/storage/ndb/src/Makefile.am +++ b/storage/ndb/src/Makefile.am @@ -21,7 +21,7 @@ ndblib_LTLIBRARIES = libndbclient.la libndbclient_la_SOURCES = -libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ +libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ @NDB_LD_VERSION_SCRIPT@ libndbclient_la_LIBADD = \ ndbapi/libndbapi.la \ diff --git a/storage/ndb/src/libndb.ver.in b/storage/ndb/src/libndb.ver.in new file mode 100644 index 00000000000..72bf93d196f --- /dev/null +++ b/storage/ndb/src/libndb.ver.in @@ -0,0 +1,2 @@ +libndbclient_@NDB_SHARED_LIB_MAJOR_VERSION@ { global: *; }; + From 6e91557408d9cffdcee7c8d50c6eb2027e6121f5 Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/myoffice.izhnet.ru" <> Date: Fri, 19 Jan 2007 12:19:53 +0400 Subject: [PATCH 06/41] after merge fix. --- mysql-test/r/range.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index f25d94f8066..25b67ecf5a7 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -504,8 +504,8 @@ select count(*) from t1 where x = 18446744073709551601; count(*) 1 create table t2 (x bigint not null); -insert into t2(x) values (0xfffffffffffffff0); -insert into t2(x) values (0xfffffffffffffff1); +insert into t2(x) values (-16); +insert into t2(x) values (-15); select * from t2; x -16 From ba6e6d07543b458239bb06b0be81e1d62cb0ef68 Mon Sep 17 00:00:00 2001 From: "knielsen@ymer.(none)" <> Date: Fri, 19 Jan 2007 09:41:08 +0100 Subject: [PATCH 07/41] Implement mysql-test-run.pl option to limit the number of saved core files. This helps stability of multiple parallel automated test runs, avoiding the situation where one bad build fills up disk with 1000s of core files, causing failures in other test runs. --- mysql-test/mysql-test-run.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b3a7427c359..4e122b43143 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -300,6 +300,8 @@ our %mysqld_variables; my $source_dist= 0; +our $opt_max_save_core= 5; +my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far. ###################################################################### # @@ -588,6 +590,7 @@ sub command_line_setup () { 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, + 'max-save-core=i' => \$opt_max_save_core, # Coverage, profiling etc 'gcov' => \$opt_gcov, @@ -3295,10 +3298,12 @@ sub save_files_before_restore($$) { # Look for core files foreach my $core_file ( glob("$data_dir/core*") ) { + last if $opt_max_save_core > 0 && $num_saved_cores >= $opt_max_save_core; my $core_name= basename($core_file); mtr_report("Saving $core_name"); mkdir($save_name) if ! -d $save_name; rename("$core_file", "$save_name/$core_name"); + ++$num_saved_cores; } } @@ -4891,6 +4896,9 @@ Options for debugging the product master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use strace-client Create strace output for mysqltest client + max-save-core Limit the number of core files saved (to avoid filling + up disks for heavily crashing server). Defaults to + $opt_max_save_core, set to 0 for no limit. Options for coverage, profiling etc From 3b0caab561cbe0a2738a4ce21c214f95de1ae569 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Fri, 19 Jan 2007 15:43:21 +0100 Subject: [PATCH 08/41] Add test's from Matthias for assigning one variable from another using let --- mysql-test/r/mysqltest.result | 9 +++++++++ mysql-test/t/mysqltest.test | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 12a35fcf48b..e1ebed8cacd 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -269,6 +269,15 @@ mysqltest: At line 1: Missing assignment operator in let 1 # Execute: echo $success ; 1 +# Check if let $B = $A is an assignment per value. +let $A = initial value of A; +let $B = initial value of B; +let $B = $A +# Content of $A is: initial value of B +let $A = changed value of A; +# Content of $B is: initial value of B +let $B = changed value of B; +# Content of $A is: changed value of A mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Could not open file ./non_existingFile mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 7da84543e6d..e0d5591fc4f 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -688,6 +688,36 @@ echo # success: $success ; --echo # Execute: echo \$success ; echo $success ; + +# ---------------------------------------------------------------------------- +# Test to assign let from variable +# let $=$; +# ---------------------------------------------------------------------------- + +--echo # Check if let \$B = \$A is an assignment per value. + +# Basic preparations: +--echo let \$A = initial value of A; +let $A = initial value of A; +# --echo # Content of \$A is: $A +--echo let \$B = initial value of B; +let $B = initial value of B; +# --echo # Content of \$B is: $B + +# Assign $B to $A: +--echo let \$B = \$A +let $A = $B; +--echo # Content of \$A is: $A + +# Changes of $B must NOT affect $A and Changes of $A must NOT affect $B ! +--echo let \$A = changed value of A; +let $A = changed value of A; +--echo # Content of \$B is: $B + +--echo let \$B = changed value of B; +let $B = changed value of B; +--echo # Content of \$A is: $A + # ---------------------------------------------------------------------------- # Test to assign let from query # let $=``; From 4d9abb4a4f9a7624c29d6fcd2e48d15e301d2572 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 12:23:06 -0800 Subject: [PATCH 09/41] I cut and pasted in the wrong direction I think. We don't have storage until 5.1... --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f73f08f85fc..c90b163cc4c 100644 --- a/configure.in +++ b/configure.in @@ -390,7 +390,7 @@ AC_SUBST(LD_VERSION_SCRIPT) # libndbclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then - NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" AC_CONFIG_FILES(storage/ndb/src/libndb.ver) fi AC_SUBST(NDB_LD_VERSION_SCRIPT) From 8b1fe92d9333568a87004d976337bfcca28d114c Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 12:27:59 -0800 Subject: [PATCH 10/41] missed storage in one more place --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index c90b163cc4c..f5cb21ac58f 100644 --- a/configure.in +++ b/configure.in @@ -391,7 +391,7 @@ AC_SUBST(LD_VERSION_SCRIPT) # libndbclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" - AC_CONFIG_FILES(storage/ndb/src/libndb.ver) + AC_CONFIG_FILES(ndb/src/libndb.ver) fi AC_SUBST(NDB_LD_VERSION_SCRIPT) From 8e6f3ab33b68044385e5a83e130e7875e2b33d50 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 14:26:06 -0800 Subject: [PATCH 11/41] Added libndb.ver to BUILT_SOURCES to force it to get removed during make distclean --- .bzrignore | 1 + ndb/src/Makefile.am | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.bzrignore b/.bzrignore index ca4ba1432aa..9e1ff120a6c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1333,3 +1333,4 @@ win/vs71cache.txt win/vs8cache.txt zlib/*.ds? zlib/*.vcproj +ndb/src/libndb.ver diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am index 3df7ccd8469..a0166eec113 100644 --- a/ndb/src/Makefile.am +++ b/ndb/src/Makefile.am @@ -23,6 +23,8 @@ libndbclient_la_SOURCES = libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ @NDB_LD_VERSION_SCRIPT@ +BUILT_SOURCES = libndb.ver + libndbclient_la_LIBADD = \ ndbapi/libndbapi.la \ common/transporter/libtransporter.la \ From d116ff29737bdd3871f7b67799d20d5ec575e632 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 14:29:01 -0800 Subject: [PATCH 12/41] Merge recycle.(none):/src/bug22807/my50-bug22807 into recycle.(none):/src/mysql-5.0-maint --- Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint into qualinost.(none):/home/mtaylor/src/mysql-5.0-maint --- I cut and pasted in the wrong direction I think. We don't have storage until 5.1... --- missed storage in one more place --- Merge qualinost.(none):/home/mtaylor/src/mysql-5.0-maint into qualinost.(none):/home/mtaylor/src/mysql-5.1-new-maint --- added storage back to patch after merge from 5.0-maint --- Removed ndb/src dir and libndb.ver.in from it that got introduced from the 5.0-maint merge. --- .bzrignore | 1 + ndb/src/libndb.ver.in | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 ndb/src/libndb.ver.in diff --git a/.bzrignore b/.bzrignore index e00d2a16187..46d0f952445 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2934,3 +2934,4 @@ win/vs71cache.txt win/vs8cache.txt zlib/*.ds? zlib/*.vcproj +storage/ndb/src/libndb.ver diff --git a/ndb/src/libndb.ver.in b/ndb/src/libndb.ver.in deleted file mode 100644 index 72bf93d196f..00000000000 --- a/ndb/src/libndb.ver.in +++ /dev/null @@ -1,2 +0,0 @@ -libndbclient_@NDB_SHARED_LIB_MAJOR_VERSION@ { global: *; }; - From 14c3bfa9082cf3c65247802cc4c2736fc786c772 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 14:58:08 -0800 Subject: [PATCH 13/41] One final time making the path right. --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index fcdf8003bce..0becfe00bd5 100644 --- a/configure.in +++ b/configure.in @@ -360,8 +360,8 @@ AC_SUBST(LD_VERSION_SCRIPT) # libndbclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then - NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" - AC_CONFIG_FILES(ndb/src/libndb.ver) + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" + AC_CONFIG_FILES(storage/ndb/src/libndb.ver) fi AC_SUBST(NDB_LD_VERSION_SCRIPT) From dab88cfaa30d85e184b7ef46b6fcf3d607c6c40e Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 16:54:01 -0800 Subject: [PATCH 14/41] Fixed the make distcheck problem. We only really need to create libndb.ver if we are building Ndb. --- config/ac-macros/ha_ndbcluster.m4 | 9 +++++++++ configure.in | 7 ------- ndb/src/Makefile.am | 2 -- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 8e953544df9..a4963a5e20e 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -145,6 +145,14 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ndbcluster_system_libs="" ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la" MYSQL_CHECK_NDB_OPTIONS + + # libndbclient versioning when linked with GNU ld. + if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" + AC_CONFIG_FILES(ndb/src/libndb.ver) + fi + AC_SUBST(NDB_LD_VERSION_SCRIPT) + ;; * ) AC_MSG_RESULT([Not using NDB Cluster]) @@ -156,6 +164,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ AC_SUBST(ndbcluster_libs) AC_SUBST(ndbcluster_system_libs) AC_SUBST(ndb_mgmclient_libs) + ]) dnl --------------------------------------------------------------------------- diff --git a/configure.in b/configure.in index f5cb21ac58f..48587e5b501 100644 --- a/configure.in +++ b/configure.in @@ -388,13 +388,6 @@ if $LD --version 2>/dev/null|grep -q GNU; then fi AC_SUBST(LD_VERSION_SCRIPT) -# libndbclient versioning when linked with GNU ld. -if $LD --version 2>/dev/null|grep -q GNU; then - NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" - AC_CONFIG_FILES(ndb/src/libndb.ver) -fi -AC_SUBST(NDB_LD_VERSION_SCRIPT) - # Avoid bug in fcntl on some versions of linux AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os]) diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am index a0166eec113..3df7ccd8469 100644 --- a/ndb/src/Makefile.am +++ b/ndb/src/Makefile.am @@ -23,8 +23,6 @@ libndbclient_la_SOURCES = libndbclient_la_LDFLAGS = -version-info @NDB_SHARED_LIB_VERSION@ @NDB_LD_VERSION_SCRIPT@ -BUILT_SOURCES = libndb.ver - libndbclient_la_LIBADD = \ ndbapi/libndbapi.la \ common/transporter/libtransporter.la \ From 8778f60112bfc949cd224035ec9421a0ce17f468 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 17:02:46 -0800 Subject: [PATCH 15/41] We only want to do these things if we are building Ndb. --- config/ac-macros/ha_ndbcluster.m4 | 11 +++++++++++ configure.in | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 86bd16487eb..5d0bc6898e8 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -278,6 +278,17 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ ndb_bin_am_ldflags="" fi + # libndbclient versioning when linked with GNU ld. + if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" + AC_CONFIG_FILES(ndb/src/libndb.ver) + fi + AC_SUBST(NDB_LD_VERSION_SCRIPT) + + AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION) + AC_SUBST(NDB_SHARED_LIB_VERSION) + + AC_SUBST(NDB_VERSION_MAJOR) AC_SUBST(NDB_VERSION_MINOR) AC_SUBST(NDB_VERSION_BUILD) diff --git a/configure.in b/configure.in index 6bf896b6e8a..66a562de2f4 100644 --- a/configure.in +++ b/configure.in @@ -60,8 +60,6 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], [Version of .frm files]) AC_SUBST(SHARED_LIB_MAJOR_VERSION) AC_SUBST(SHARED_LIB_VERSION) -AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION) -AC_SUBST(NDB_SHARED_LIB_VERSION) AC_SUBST(AVAILABLE_LANGUAGES) From c77cebec11d4ec2ea5006da922342b46f0d8435b Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 17:06:53 -0800 Subject: [PATCH 16/41] files are in storage/ndb in 5.1. fix merge from 5.0 --- config/ac-macros/ha_ndbcluster.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 5d0bc6898e8..2a54638b3ae 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -280,8 +280,8 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ # libndbclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then - NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" - AC_CONFIG_FILES(ndb/src/libndb.ver) + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" + AC_CONFIG_FILES(storage/ndb/src/libndb.ver) fi AC_SUBST(NDB_LD_VERSION_SCRIPT) From 72a6096eb432ddfdef7cdf56588eaf787ae8945c Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 19 Jan 2007 17:34:47 -0800 Subject: [PATCH 17/41] Moving version-script to acinclude.m4 --- acinclude.m4 | 8 ++++++++ configure.in | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 811e9c0b183..eaf6d628e4e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1817,6 +1817,14 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ndbcluster_system_libs="" ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la" MYSQL_CHECK_NDB_OPTIONS + + # libndbclient versioning when linked with GNU ld. + if $LD --version 2>/dev/null|grep -q GNU; then + NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" + AC_CONFIG_FILES(ndb/src/libndb.ver) + fi + AC_SUBST(NDB_LD_VERSION_SCRIPT) + ;; * ) AC_MSG_RESULT([Not using NDB Cluster]) diff --git a/configure.in b/configure.in index 47965876627..6b8a78615c3 100644 --- a/configure.in +++ b/configure.in @@ -449,13 +449,6 @@ if $LD --version 2>/dev/null|grep -q GNU; then fi AC_SUBST(LD_VERSION_SCRIPT) -# libndbclient versioning when linked with GNU ld. -if $LD --version 2>/dev/null|grep -q GNU; then - NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver" - AC_CONFIG_FILES(ndb/src/libndb.ver) -fi -AC_SUBST(NDB_LD_VERSION_SCRIPT) - # Avoid bug in fcntl on some versions of linux From 7ce6170cf9682ba3535413e018346ca232c0d2a6 Mon Sep 17 00:00:00 2001 From: "tsmith@siva.hindu.god" <> Date: Sun, 21 Jan 2007 17:58:02 -0700 Subject: [PATCH 18/41] Applied innodb-5.0-ss1230 snapshot Fixes: - Bug #25596: --- innobase/dict/dict0dict.c | 2 +- sql/ha_innodb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index ba03e1f5e41..df48a8a4b5a 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -28,7 +28,7 @@ Created 1/8/1996 Heikki Tuuri #include "rem0cmp.h" /* Implement isspace() in a locale-independent way. (Bug #24299) */ -#define ib_isspace(c) strchr(" \v\f\t\r\n", c) +#define ib_isspace(c) ((char) (c) && strchr(" \v\f\t\r\n", c)) dict_sys_t* dict_sys = NULL; /* the dictionary system */ diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index fd0f1ff2a4f..9d18e22cc77 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -215,7 +215,7 @@ extern my_bool innobase_log_archive, innobase_use_large_pages, innobase_use_native_aio, innobase_file_per_table, innobase_locks_unsafe_for_binlog, - innobase_rollback_on_timeout, + innobase_rollback_on_timeout, innobase_create_status_file; extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before calling innobase_end() if you want From bcc8452782b7ebc33799d66454b1f47228402887 Mon Sep 17 00:00:00 2001 From: "tsmith@siva.hindu.god" <> Date: Sun, 21 Jan 2007 18:18:11 -0700 Subject: [PATCH 19/41] Applied innodb-5.1-ss1186 Fixes bugs: - Bug #20877: InnoDB data dictionary memory footprint is too big - Bug #24741: existing cascade clauses disappear when adding foreign keys --- mysql-test/r/innodb.result | 17 ++++++++ mysql-test/t/innodb.test | 16 ++++++++ storage/innobase/buf/buf0flu.c | 3 +- storage/innobase/dict/dict0load.c | 9 +++-- storage/innobase/include/ut0ut.h | 3 +- storage/innobase/que/que0que.c | 65 ++++++++++++++++--------------- 6 files changed, 74 insertions(+), 39 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index e7fa950a131..4a24231e0a6 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3456,3 +3456,20 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; +CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB; +CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL, +CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id) +ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB; +ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON +DELETE CASCADE ON UPDATE CASCADE; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL, + `f` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `f` (`f`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f`) REFERENCES `t1` (`f`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t2, t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index e1e74ac8a11..c97a4892940 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2504,6 +2504,22 @@ INSERT INTO t1 VALUES (1); OPTIMIZE TABLE t1; DROP TABLE t1; +# +# Bug #24741 (existing cascade clauses disappear when adding foreign keys) +# + +CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB; + +CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL, + CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id) + ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB; + +ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON +DELETE CASCADE ON UPDATE CASCADE; + +SHOW CREATE TABLE t2; +DROP TABLE t2, t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c index 64060dab8ae..650c9d5d707 100644 --- a/storage/innobase/buf/buf0flu.c +++ b/storage/innobase/buf/buf0flu.c @@ -977,8 +977,7 @@ buf_flush_batch( } #endif /* UNIV_DEBUG */ - if (page_count != ULINT_UNDEFINED) - srv_buf_pool_flushed+= page_count; + srv_buf_pool_flushed += page_count; return(page_count); } diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index 518e32ec4dc..f4f8c2d5d23 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -1110,6 +1110,7 @@ dict_load_foreign( rec_t* rec; byte* field; ulint len; + ulint n_fields_and_type; mtr_t mtr; #ifdef UNIV_SYNC_DEBUG @@ -1172,15 +1173,15 @@ dict_load_foreign( foreign = dict_mem_foreign_create(); - foreign->n_fields = mach_read_from_4( + n_fields_and_type = mach_read_from_4( rec_get_nth_field_old(rec, 5, &len)); ut_a(len == 4); - /* We store the type to the bits 24-31 of n_fields */ + /* We store the type in the bits 24..29 of n_fields_and_type. */ - foreign->type = foreign->n_fields >> 24; - foreign->n_fields = foreign->n_fields & 0xFFFFFFUL; + foreign->type = n_fields_and_type >> 24; + foreign->n_fields = n_fields_and_type & 0x3FFUL; foreign->id = mem_heap_strdup(foreign->heap, id); diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index b4e9fa91491..8bfc1edd323 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -119,7 +119,8 @@ ulint ut_2_power_up( /*==========*/ /* out: first power of 2 which is >= n */ - ulint n); /* in: number != 0 */ + ulint n) /* in: number != 0 */ + __attribute__((const)); /**************************************************************** Sort function for ulint arrays. */ diff --git a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c index b2663e30879..f5a63ae6ffa 100644 --- a/storage/innobase/que/que0que.c +++ b/storage/innobase/que/que0que.c @@ -335,6 +335,8 @@ que_fork_start_command( que_fork_t* fork) /* in: a query fork */ { que_thr_t* thr; + que_thr_t* suspended_thr = NULL; + que_thr_t* completed_thr = NULL; fork->state = QUE_FORK_ACTIVE; @@ -344,14 +346,18 @@ que_fork_start_command( but in a parallelized select, which necessarily is non-scrollable, there may be several to choose from */ - /*--------------------------------------------------------------- - First we try to find a query thread in the QUE_THR_COMMAND_WAIT state - */ + /* First we try to find a query thread in the QUE_THR_COMMAND_WAIT + state. Then we try to find a query thread in the QUE_THR_SUSPENDED + state, finally we try to find a query thread in the QUE_THR_COMPLETED + state */ thr = UT_LIST_GET_FIRST(fork->thrs); - while (thr != NULL) { - if (thr->state == QUE_THR_COMMAND_WAIT) { + /* We make a single pass over the thr list within which we note which + threads are ready to run. */ + while (thr) { + switch (thr->state) { + case QUE_THR_COMMAND_WAIT: /* We have to send the initial message to query thread to start it */ @@ -359,49 +365,44 @@ que_fork_start_command( que_thr_init_command(thr); return(thr); - } - ut_ad(thr->state != QUE_THR_LOCK_WAIT); - - thr = UT_LIST_GET_NEXT(thrs, thr); - } - - /*---------------------------------------------------------------- - Then we try to find a query thread in the QUE_THR_SUSPENDED state */ - - thr = UT_LIST_GET_FIRST(fork->thrs); - - while (thr != NULL) { - if (thr->state == QUE_THR_SUSPENDED) { + case QUE_THR_SUSPENDED: /* In this case the execution of the thread was suspended: no initial message is needed because execution can continue from where it was left */ + if (!suspended_thr) { + suspended_thr = thr; + } - que_thr_move_to_run_state(thr); + break; + + case QUE_THR_COMPLETED: + if (!completed_thr) { + completed_thr = thr; + } + + break; + + case QUE_THR_LOCK_WAIT: + ut_error; - return(thr); } thr = UT_LIST_GET_NEXT(thrs, thr); } - /*----------------------------------------------------------------- - Then we try to find a query thread in the QUE_THR_COMPLETED state */ + if (suspended_thr) { - thr = UT_LIST_GET_FIRST(fork->thrs); + thr = suspended_thr; + que_thr_move_to_run_state(thr); - while (thr != NULL) { - if (thr->state == QUE_THR_COMPLETED) { - que_thr_init_command(thr); + } else if (completed_thr) { - return(thr); - } - - thr = UT_LIST_GET_NEXT(thrs, thr); + thr = completed_thr; + que_thr_init_command(thr); } - /* Else we return NULL */ - return(NULL); + return(thr); } /************************************************************************** From b448b6227829ca70a6afdd0e92062a00df0c97cf Mon Sep 17 00:00:00 2001 From: "tsmith@siva.hindu.god" <> Date: Sun, 21 Jan 2007 19:55:17 -0700 Subject: [PATCH 20/41] Applied innodb-4.1-ss36 and innodb-4.1-ss38 snapshots Fixes: - Bug #24299: - Bug #25596: --- innobase/dict/dict0dict.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 4b23ce047b2..1e2511f88fa 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -27,6 +27,9 @@ Created 1/8/1996 Heikki Tuuri #include "que0que.h" #include "rem0cmp.h" +/* Implement isspace() in a locale-independent way. (Bug #24299) */ +#define ib_isspace(c) ((char) (c) && strchr(" \v\f\t\r\n", c)) + dict_sys_t* dict_sys = NULL; /* the dictionary system */ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve @@ -2374,7 +2377,7 @@ dict_accept( *success = FALSE; - while (isspace(*ptr)) { + while (ib_isspace(*ptr)) { ptr++; } @@ -2419,7 +2422,7 @@ dict_scan_id( *id = NULL; - while (isspace(*ptr)) { + while (ib_isspace(*ptr)) { ptr++; } @@ -2450,7 +2453,7 @@ dict_scan_id( len++; } } else { - while (!isspace(*ptr) && *ptr != '(' && *ptr != ')' + while (!ib_isspace(*ptr) && *ptr != '(' && *ptr != ')' && (accept_also_dot || *ptr != '.') && *ptr != ',' && *ptr != '\0') { @@ -2480,12 +2483,12 @@ dict_scan_id( if (heap && !quote) { /* EMS MySQL Manager sometimes adds characters 0xA0 (in latin1, a 'non-breakable space') to the end of a table name. - But isspace(0xA0) is not true, which confuses our foreign key - parser. After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2 - and 0xA0 are at the end of the string. + After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2 + and 0xA0 are at the end of the string, and ib_isspace() + does not work for multi-byte UTF-8 characters. - TODO: we should lex the string using thd->charset_info, and - my_isspace(). Only after that, convert id names to UTF-8. */ + In MySQL 5.1 we lex the string using thd->charset_info, and + my_isspace(). This workaround is not needed there. */ b = (byte*)(*id); id_len = strlen(b); @@ -2956,11 +2959,11 @@ loop: ut_a(success); - if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') { + if (!ib_isspace(*ptr) && *ptr != '"' && *ptr != '`') { goto loop; } - while (isspace(*ptr)) { + while (ib_isspace(*ptr)) { ptr++; } @@ -2990,7 +2993,7 @@ loop: goto loop; } - if (!isspace(*ptr)) { + if (!ib_isspace(*ptr)) { goto loop; } @@ -3078,7 +3081,7 @@ col_loop1: } ptr = dict_accept(ptr, "REFERENCES", &success); - if (!success || !isspace(*ptr)) { + if (!success || !ib_isspace(*ptr)) { dict_foreign_report_syntax_err(name, start_of_latest_foreign, ptr); return(DB_CANNOT_ADD_CONSTRAINT); @@ -3461,7 +3464,7 @@ loop: ptr = dict_accept(ptr, "DROP", &success); - if (!isspace(*ptr)) { + if (!ib_isspace(*ptr)) { goto loop; } From 6db5790c2b825288f7a4cfaabb030576fd142a27 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 22 Jan 2007 10:41:36 +0100 Subject: [PATCH 21/41] gen_lex_hash does not need to link with odbc32*.lib --- extra/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index 5ce2f7b02ab..f768c7b1045 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -38,7 +38,7 @@ ADD_CUSTOM_TARGET(GenError DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h) ADD_EXECUTABLE(my_print_defaults my_print_defaults.c) -TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt odbc32 odbccp32 wsock32) +TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt wsock32) ADD_EXECUTABLE(perror perror.c) TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32) From a079f20aa80b56c5821d8b43bb102b8ca37dfbad Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/ramil.myoffice.izhnet.ru" <> Date: Mon, 22 Jan 2007 14:52:23 +0400 Subject: [PATCH 22/41] Fix for bug #22026: Warning when using IF statement and large unsigned bigint We use INT_RESULT type if all arguments are of type INT for 'if', 'case', 'coalesce' functions regardless of arguments' unsigned flag, so sometimes we can exceed the INT bounds. --- mysql-test/r/select.result | 30 ++++++++++++++++++++++++++++++ mysql-test/t/select.test | 24 ++++++++++++++++++++++++ sql/item_cmpfunc.cc | 12 +++++++++--- 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index d31be4390f7..d41b6d7ceec 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3634,3 +3634,33 @@ INSERT into t1 values (1), (2), (3); SELECT * FROM t1 LIMIT 2, -1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1 DROP TABLE t1; +create table t1 (a bigint unsigned); +insert into t1 values +(if(1, 9223372036854775808, 1)), +(case when 1 then 9223372036854775808 else 1 end), +(coalesce(9223372036854775808, 1)); +select * from t1; +a +9223372036854775808 +9223372036854775808 +9223372036854775808 +drop table t1; +create table t1 select +if(1, 9223372036854775808, 1) i, +case when 1 then 9223372036854775808 else 1 end c, +coalesce(9223372036854775808, 1) co; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` decimal(19,0) NOT NULL default '0', + `c` decimal(19,0) NOT NULL default '0', + `co` decimal(19,0) NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select +if(1, cast(1111111111111111111 as unsigned), 1) i, +case when 1 then cast(1111111111111111111 as unsigned) else 1 end c, +coalesce(cast(1111111111111111111 as unsigned), 1) co; +i c co +1111111111111111111 1111111111111111111 1111111111111111111 +End of 5.0 tests diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index e8d864b81f9..93174892714 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3123,3 +3123,27 @@ SELECT * FROM t1 LIMIT 2, -1; DROP TABLE t1; +# +# Bug #22026: Warning when using IF statement and large unsigned bigint +# + +create table t1 (a bigint unsigned); +insert into t1 values + (if(1, 9223372036854775808, 1)), + (case when 1 then 9223372036854775808 else 1 end), + (coalesce(9223372036854775808, 1)); +select * from t1; +drop table t1; +create table t1 select + if(1, 9223372036854775808, 1) i, + case when 1 then 9223372036854775808 else 1 end c, + coalesce(9223372036854775808, 1) co; +show create table t1; +drop table t1; +# Ensure we handle big values properly +select + if(1, cast(1111111111111111111 as unsigned), 1) i, + case when 1 then cast(1111111111111111111 as unsigned) else 1 end c, + coalesce(cast(1111111111111111111 as unsigned), 1) co; + +--echo End of 5.0 tests diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 936ae04e93d..f4b99e19864 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -26,13 +26,17 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item); -static Item_result item_store_type(Item_result a,Item_result b) +static Item_result item_store_type(Item_result a, Item *item, + my_bool unsigned_flag) { + Item_result b= item->result_type(); + if (a == STRING_RESULT || b == STRING_RESULT) return STRING_RESULT; else if (a == REAL_RESULT || b == REAL_RESULT) return REAL_RESULT; - else if (a == DECIMAL_RESULT || b == DECIMAL_RESULT) + else if (a == DECIMAL_RESULT || b == DECIMAL_RESULT || + unsigned_flag != item->unsigned_flag) return DECIMAL_RESULT; else return INT_RESULT; @@ -41,6 +45,7 @@ static Item_result item_store_type(Item_result a,Item_result b) static void agg_result_type(Item_result *type, Item **items, uint nitems) { Item **item, **item_end; + my_bool unsigned_flag= 0; *type= STRING_RESULT; /* Skip beginning NULL items */ @@ -49,6 +54,7 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems) if ((*item)->type() != Item::NULL_ITEM) { *type= (*item)->result_type(); + unsigned_flag= (*item)->unsigned_flag; item++; break; } @@ -57,7 +63,7 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems) for (; item < item_end; item++) { if ((*item)->type() != Item::NULL_ITEM) - *type= item_store_type(type[0], (*item)->result_type()); + *type= item_store_type(*type, *item, unsigned_flag); } } From df4cfc0bc178c8dfc61e9c07c564ed73b38aeee6 Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/ramil.myoffice.izhnet.ru" <> Date: Mon, 22 Jan 2007 15:26:49 +0400 Subject: [PATCH 23/41] after-merge fix. --- mysql-test/r/select.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index ff7baa6ac12..d4328d9cf80 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3652,9 +3652,9 @@ coalesce(9223372036854775808, 1) co; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` decimal(19,0) NOT NULL default '0', - `c` decimal(19,0) NOT NULL default '0', - `co` decimal(19,0) NOT NULL default '0' + `i` decimal(19,0) NOT NULL DEFAULT '0', + `c` decimal(19,0) NOT NULL DEFAULT '0', + `co` decimal(19,0) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select From 4bb6151a7a64038f45c19c7bcb0dba22b2bab6bc Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 22 Jan 2007 12:34:39 +0100 Subject: [PATCH 24/41] Add define for used type of third argument to 'accept' - Netware uses size_t --- extra/yassl/testsuite/test.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp index b2fed37f4e5..c921f8f9c69 100644 --- a/extra/yassl/testsuite/test.hpp +++ b/extra/yassl/testsuite/test.hpp @@ -40,8 +40,11 @@ // Check type of third arg to accept #if defined(__hpux) -// HPUX doesn't use socklent_t for third parameter to accept +// HPUX uses int* for third parameter to accept typedef int* ACCEPT_THIRD_T; +#elif defined(__NETWARE__) +// NetWare uses size_t* for third parameter to accept + typedef size_t* ACCEPT_THIRD_T; #else typedef socklen_t* ACCEPT_THIRD_T; #endif From 1ebe4850d6330665cf9ad0c71bf41f468fff8a47 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 22 Jan 2007 16:54:40 +0100 Subject: [PATCH 25/41] Import yaSSL version 1.5.8 - Includes patch for Bug#25189 --- extra/yassl/README | 18 +++++- extra/yassl/include/openssl/ssl.h | 2 +- extra/yassl/src/make.bat | 18 ------ extra/yassl/src/ssl.cpp | 2 +- extra/yassl/src/yassl_error.cpp | 12 +++- extra/yassl/taocrypt/benchmark/make.bat | 18 ------ extra/yassl/taocrypt/include/asn.hpp | 28 +++++++++ extra/yassl/taocrypt/include/error.hpp | 6 +- extra/yassl/taocrypt/include/file.hpp | 6 +- extra/yassl/taocrypt/src/asn.cpp | 79 +++++++++++++++++++++++++ extra/yassl/taocrypt/src/coding.cpp | 14 +++-- extra/yassl/taocrypt/src/integer.cpp | 39 ++++++------ extra/yassl/taocrypt/src/make.bat | 18 ------ extra/yassl/taocrypt/test/make.bat | 18 ------ extra/yassl/taocrypt/test/test.cpp | 46 +++++++++++++- extra/yassl/testsuite/make.bat | 18 ------ extra/yassl/testsuite/testsuite.cpp | 4 +- 17 files changed, 224 insertions(+), 122 deletions(-) diff --git a/extra/yassl/README b/extra/yassl/README index fbeffd9db77..4445266c639 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -1,4 +1,20 @@ -yaSSL Release notes, version 1.5.0 (11/09/06) +*****************yaSSL Release notes, version 1.5.0 (1/10/07) + + This release of yaSSL contains bug fixes, portability enhancements, and + support for GCC 4.1.1 and vs2005 sp1. + + + + Since yaSSL now supports zlib, as does libcur, the libcurl build test can + fail if yaSSL is built with zlib support since the zlib library isn't + passed. You can do two things to fix this: + + 1) build yaSSL w/o zlib --without-zlib + 2) or add flags to curl configure LDFLAGS="-lm -lz" + + + +*****************yaSSL Release notes, version 1.5.0 (11/09/06) This release of yaSSL contains bug fixes, portability enhancements, and full TLS 1.1 support. Use the functions: diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 67c49a808fd..4f5baba9b38 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -41,7 +41,7 @@ #include "rsa.h" -#define YASSL_VERSION "1.5.0" +#define YASSL_VERSION "1.5.8" #if defined(__cplusplus) diff --git a/extra/yassl/src/make.bat b/extra/yassl/src/make.bat index 6ddf4ff98df..dde305721a7 100644 --- a/extra/yassl/src/make.bat +++ b/extra/yassl/src/make.bat @@ -1,22 +1,4 @@ REM quick and dirty build file for testing different MSDEVs - -@echo off -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -@echo on - setlocal set myFLAGS= /I../include /I../taocrypt/mySTL /I../taocrypt/include /W3 /c /ZI diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index aa98465069c..5ca7dec399d 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -958,7 +958,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = (char*) "Please supply a buffer for error string"; + static char* msg = "Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp index 25c595f40bc..24fc602d4e9 100644 --- a/extra/yassl/src/yassl_error.cpp +++ b/extra/yassl/src/yassl_error.cpp @@ -150,6 +150,10 @@ void SetErrorString(YasslError error, char* buffer) strncpy(buffer, "the read operation would block", max); break; + case CERTFICATE_ERROR : + strncpy(buffer, "Unable to verify certificate", max); + break; + // TaoCrypt errors case NO_ERROR_E : strncpy(buffer, "not in error state", max); @@ -255,8 +259,12 @@ void SetErrorString(YasslError error, char* buffer) strncpy(buffer, "ASN: bad other signature confirmation", max); break; - case CERTFICATE_ERROR : - strncpy(buffer, "Unable to verify certificate", max); + case CONTENT_E : + strncpy(buffer, "bad content processing", max); + break; + + case PEM_E : + strncpy(buffer, "bad PEM format processing", max); break; default : diff --git a/extra/yassl/taocrypt/benchmark/make.bat b/extra/yassl/taocrypt/benchmark/make.bat index 8b3c112ec52..bf1383f5e97 100644 --- a/extra/yassl/taocrypt/benchmark/make.bat +++ b/extra/yassl/taocrypt/benchmark/make.bat @@ -1,22 +1,4 @@ REM quick and dirty build file for testing different MSDEVs - -@echo off -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -@echo on - setlocal set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2 diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp index 1151f3c944e..a82cd8d0d79 100644 --- a/extra/yassl/taocrypt/include/asn.hpp +++ b/extra/yassl/taocrypt/include/asn.hpp @@ -99,6 +99,17 @@ enum DNTags }; +enum PCKS12_Tags +{ + /* DATA = 1, */ // from ASN1 + SIGNED_DATA = 2, + ENVELOPED_DATA = 3, + SIGNED_AND_ENVELOPED_DATA = 4, + DIGESTED_DATA = 5, + ENCRYPTED_DATA = 6 +}; + + enum Constants { MIN_DATE_SZ = 13, @@ -195,6 +206,16 @@ private: }; +// PKCS12 BER Decoder +class PKCS12_Decoder : public BER_Decoder { +public: + explicit PKCS12_Decoder(Source& s) : BER_Decoder(s) {} + void Decode(); +private: + void ReadHeader(); +}; + + // General PublicKey class PublicKey { byte* key_; @@ -241,6 +262,7 @@ private: typedef STL::list SignerList; +enum ContentType { HUH = 651 }; enum SigType { SHAwDSA = 517, MD2wRSA = 646, MD5wRSA = 648, SHAwRSA =649}; enum HashType { MD2h = 646, MD5h = 649, SHAh = 88 }; enum KeyType { DSAk = 515, RSAk = 645 }; // sums of algo OID @@ -345,6 +367,12 @@ private: }; +// Get Cert in PEM format from BEGIN to END +int GetCert(Source&); + +// Get Cert in PEM format from pkcs12 file +int GetPKCS_Cert(const char* password, Source&); + } // namespace diff --git a/extra/yassl/taocrypt/include/error.hpp b/extra/yassl/taocrypt/include/error.hpp index 1a93056db45..368e2a27b73 100644 --- a/extra/yassl/taocrypt/include/error.hpp +++ b/extra/yassl/taocrypt/include/error.hpp @@ -70,8 +70,12 @@ DSA_SZ_E = 1035, // "bad DSA r or s size" BEFORE_DATE_E = 1036, // "before date in the future" AFTER_DATE_E = 1037, // "after date in the past" SIG_CONFIRM_E = 1038, // "bad self signature confirmation" -SIG_OTHER_E = 1039 // "bad other signature confirmation" +SIG_OTHER_E = 1039, // "bad other signature confirmation" +CONTENT_E = 1040, // "bad content processing" +PEM_E = 1041 // "bad pem format error" + + // add error string to yassl/src/yassl_error.cpp !!! }; diff --git a/extra/yassl/taocrypt/include/file.hpp b/extra/yassl/taocrypt/include/file.hpp index c12b5c73bac..79693cd054b 100644 --- a/extra/yassl/taocrypt/include/file.hpp +++ b/extra/yassl/taocrypt/include/file.hpp @@ -71,8 +71,10 @@ public: void SetError(ErrorNumber w) { error_.SetError(w); } friend class FileSource; // for get() -private: - Source(const Source& that) : buffer_(that.buffer_), current_(that.current_) {} + + Source(const Source& that) + : buffer_(that.buffer_), current_(that.current_) {} + Source& operator=(const Source& that) { Source tmp(that); diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index 3dc3638d85f..ceaedf00209 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -1098,4 +1098,83 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) } +// Get Cert in PEM format from BEGIN to END +int GetCert(Source& source) +{ + char header[] = "-----BEGIN CERTIFICATE-----"; + char footer[] = "-----END CERTIFICATE-----"; + + char* begin = strstr((char*)source.get_buffer(), header); + char* end = strstr((char*)source.get_buffer(), footer); + + if (!begin || !end || begin >= end) return -1; + + end += strlen(footer); + if (*end == '\r') end++; + + Source tmp((byte*)begin, end - begin + 1); + source.Swap(tmp); + + return 0; +} + + + +// Decode a BER encoded PKCS12 structure +void PKCS12_Decoder::Decode() +{ + ReadHeader(); + if (source_.GetError().What()) return; + + // Get AuthSafe + + GetSequence(); + + // get object id + byte obj_id = source_.next(); + if (obj_id != OBJECT_IDENTIFIER) { + source_.SetError(OBJECT_ID_E); + return; + } + + word32 length = GetLength(source_); + + word32 algo_sum = 0; + while (length--) + algo_sum += source_.next(); + + + + + + + // Get MacData optional + /* + mac digestInfo like certdecoder::getdigest? + macsalt octet string + iter integer + + */ +} + + +void PKCS12_Decoder::ReadHeader() +{ + // Gets Version + GetSequence(); + GetVersion(); +} + + +// Get Cert in PEM format from pkcs12 file +int GetPKCS_Cert(const char* password, Source& source) +{ + PKCS12_Decoder pkcs12(source); + pkcs12.Decode(); + + return 0; +} + + + } // namespace diff --git a/extra/yassl/taocrypt/src/coding.cpp b/extra/yassl/taocrypt/src/coding.cpp index b8bbd29bb2b..e9e5cb69469 100644 --- a/extra/yassl/taocrypt/src/coding.cpp +++ b/extra/yassl/taocrypt/src/coding.cpp @@ -131,8 +131,7 @@ void HexDecoder::Decode() void Base64Encoder::Encode() { word32 bytes = plain_.size(); - word32 outSz = bytes * 4 / 3; - outSz += (outSz % 4); // 4 byte integrals + word32 outSz = (bytes + 3 - 1) / 3 * 4; outSz += (outSz + pemLineSz - 1) / pemLineSz; // new lines encoded_.New(outSz); @@ -159,7 +158,7 @@ void Base64Encoder::Encode() bytes -= 3; - if ((++j % 16) == 0) + if ((++j % 16) == 0 && bytes) encoded_[i++] = '\n'; } @@ -236,11 +235,18 @@ void Base64Decoder::Decode() if ((++j % 16) == 0) { byte endLine = coded_.next(); bytes--; + while (endLine == ' ') { // remove possible whitespace + endLine = coded_.next(); + bytes--; + } if (endLine == '\r') { endLine = coded_.next(); bytes--; } - assert(endLine == '\n'); + if (endLine != '\n') { + coded_.SetError(PEM_E); + return; + } } } diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 1ed69ce34dc..5927f7e3d5e 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -88,7 +88,7 @@ namespace TaoCrypt { #ifdef SSE2_INTRINSICS_AVAILABLE template -CPP_TYPENAME AllocatorBase::pointer AlignedAllocator::allocate( +CPP_TYPENAME AlignedAllocator::pointer AlignedAllocator::allocate( size_type n, const void *) { CheckSize(n); @@ -572,24 +572,29 @@ static word AtomicInverseModPower2(word A) class Portable { public: - static word Add(word *C, const word *A, const word *B, unsigned int N); - static word Subtract(word *C, const word *A, const word*B, unsigned int N); + static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B, + unsigned int N); + static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word*B, + unsigned int N); + static void TAOCRYPT_CDECL Multiply2(word *C, const word *A, const word *B); + static word TAOCRYPT_CDECL Multiply2Add(word *C, + const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply4(word *C, const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply8(word *C, const word *A, const word *B); + static unsigned int TAOCRYPT_CDECL MultiplyRecursionLimit() {return 8;} - static void Multiply2(word *C, const word *A, const word *B); - static word Multiply2Add(word *C, const word *A, const word *B); - static void Multiply4(word *C, const word *A, const word *B); - static void Multiply8(word *C, const word *A, const word *B); - static unsigned int MultiplyRecursionLimit() {return 8;} + static void TAOCRYPT_CDECL Multiply2Bottom(word *C, const word *A, + const word *B); + static void TAOCRYPT_CDECL Multiply4Bottom(word *C, const word *A, + const word *B); + static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A, + const word *B); + static unsigned int TAOCRYPT_CDECL MultiplyBottomRecursionLimit(){return 8;} - static void Multiply2Bottom(word *C, const word *A, const word *B); - static void Multiply4Bottom(word *C, const word *A, const word *B); - static void Multiply8Bottom(word *C, const word *A, const word *B); - static unsigned int MultiplyBottomRecursionLimit() {return 8;} - - static void Square2(word *R, const word *A); - static void Square4(word *R, const word *A); - static void Square8(word *R, const word *A) {assert(false);} - static unsigned int SquareRecursionLimit() {return 4;} + static void TAOCRYPT_CDECL Square2(word *R, const word *A); + static void TAOCRYPT_CDECL Square4(word *R, const word *A); + static void TAOCRYPT_CDECL Square8(word *R, const word *A) {assert(false);} + static unsigned int TAOCRYPT_CDECL SquareRecursionLimit() {return 4;} }; word Portable::Add(word *C, const word *A, const word *B, unsigned int N) diff --git a/extra/yassl/taocrypt/src/make.bat b/extra/yassl/taocrypt/src/make.bat index 13675ae84de..0aa1350f7d8 100644 --- a/extra/yassl/taocrypt/src/make.bat +++ b/extra/yassl/taocrypt/src/make.bat @@ -1,22 +1,4 @@ REM quick and dirty build file for testing different MSDEVs - -@echo off -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -@echo on - setlocal set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2 diff --git a/extra/yassl/taocrypt/test/make.bat b/extra/yassl/taocrypt/test/make.bat index 04a0c25e4de..7b53e9abc90 100644 --- a/extra/yassl/taocrypt/test/make.bat +++ b/extra/yassl/taocrypt/test/make.bat @@ -1,22 +1,4 @@ REM quick and dirty build file for testing different MSDEVs - -@echo off -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -@echo on - setlocal set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2 diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index 9e3ef709a78..d2eff49c56c 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -74,7 +74,8 @@ using TaoCrypt::EncodeDSA_Signature; using TaoCrypt::DecodeDSA_Signature; using TaoCrypt::PBKDF2_HMAC; using TaoCrypt::tcArrayDelete; - +using TaoCrypt::GetCert; +using TaoCrypt::GetPKCS_Cert; struct testVector { @@ -103,6 +104,7 @@ int rsa_test(); int dsa_test(); int dh_test(); int pwdbased_test(); +int pkcs12_test(); TaoCrypt::RandomNumberGenerator rng; @@ -228,6 +230,13 @@ void taocrypt_test(void* args) else printf( "PBKDF2 test passed!\n"); + /* not ready yet + if ( (ret = pkcs12_test()) ) + err_sys("PKCS12 test failed!\n", ret); + else + printf( "PKCS12 test passed!\n"); + */ + tcArrayDelete(cipher); tcArrayDelete(plain); tcArrayDelete(msg); @@ -994,3 +1003,38 @@ int pwdbased_test() return 0; } + + +int pkcs12_test() +{ + Source cert; + FileSource("../certs/server-cert.pem", cert); + if (cert.size() == 0) { + FileSource("../../certs/server-cert.pem", cert); // for testsuite + if (cert.size() == 0) { + FileSource("../../../certs/server-cert.pem", cert); // Debug dir + if (cert.size() == 0) + err_sys("where's your certs dir?", -109); + } + } + + if (GetCert(cert) != 0) + return -110; + + Source source; + FileSource("../certs/server.p12", source); + if (source.size() == 0) { + FileSource("../../certs/server.p12", source); // for testsuite + if (source.size() == 0) { + FileSource("../../../certs/server.p12", source); // Debug dir + if (source.size() == 0) + err_sys("where's your certs dir?", -111); + } + } + + if (GetPKCS_Cert("password", source) != 0) + return -112; + + return 0; +} + diff --git a/extra/yassl/testsuite/make.bat b/extra/yassl/testsuite/make.bat index e4942f66b3f..ea2677db481 100644 --- a/extra/yassl/testsuite/make.bat +++ b/extra/yassl/testsuite/make.bat @@ -1,22 +1,4 @@ REM quick and dirty build file for testing different MSDEVs - -@echo off -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -@echo on - setlocal set myFLAGS= /I../include /I../taocrypt/include /I../taocrypt/mySTL /c /W3 /G6 /O2 /MT /D"WIN32" /D"NO_MAIN_DRIVER" diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 49113a552cd..1cf6a78ebe7 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -86,8 +86,8 @@ int main(int argc, char** argv) // input output compare byte input[TaoCrypt::MD5::DIGEST_SIZE]; byte output[TaoCrypt::MD5::DIGEST_SIZE]; - file_test((char*) "input", input); - file_test((char*) "output", output); + file_test("input", input); + file_test("output", output); assert(memcmp(input, output, sizeof(input)) == 0); printf("\nAll tests passed!\n"); From a0c981d25453a841cff9dd15058eed6f1b122fa6 Mon Sep 17 00:00:00 2001 From: "iggy@recycle.(none)" <> Date: Tue, 23 Jan 2007 10:01:56 -0500 Subject: [PATCH 26/41] Bug#24496:Fresh install of mysql on windows has anonymous user with root access. - Add anonymous user with no rights. --- scripts/mysql_create_system_tables.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index 54f0ef230ad..36efab7d3ea 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -180,7 +180,7 @@ then INSERT INTO user (host,user) values ('localhost','');" else i_u="$i_u - INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);" + INSERT INTO user (host,user) VALUES ('localhost','');" fi fi fi From 9d2b85c2216da08a66f3589b06acb51e2de86578 Mon Sep 17 00:00:00 2001 From: "tsmith@siva.hindu.god" <> Date: Tue, 23 Jan 2007 10:43:21 -0700 Subject: [PATCH 27/41] Makefile.am: Fix bad merge: add 'cd mysql-test' to test-ps: target --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 798d1944fd0..04d50ccfbaf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,6 +123,7 @@ tags: # making sure each user use different ports. test-ps: + cd mysql-test ; \ @PERL@ ./mysql-test-run.pl $(force) --ps-protocol test-ns: From 645de0c5d7525b0481197e4f0a6f67f0f2c2785f Mon Sep 17 00:00:00 2001 From: "kaa@polly.local" <> Date: Wed, 24 Jan 2007 16:45:30 +0300 Subject: [PATCH 28/41] Added a test case for bug #6774 "Replication fails with Wrong usage of DB GRANT and GLOBAL PRIVILEGES" --- mysql-test/r/grant.result | 2 ++ mysql-test/t/grant.test | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 2f417a41652..d63e4181026 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -970,4 +970,6 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost; ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +GRANT PROCESS ON * TO user@localhost; +ERROR 3D000: No database selected End of 5.0 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 2f5e3dced22..82bf011d32f 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -863,4 +863,16 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost; --error ER_WRONG_STRING_LENGTH REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; + +# +# Bug #6774: Replication fails with Wrong usage of DB GRANT and GLOBAL PRIVILEGES +# +# Check if GRANT ... ON * ... fails when no database is selected +connect (con1, localhost, root,,*NO-ONE*) +connection con1; +--error ER_NO_DB_ERROR +GRANT PROCESS ON * TO user@localhost; +disconnect con1; +connection default; + --echo End of 5.0 tests From 41179e6a8f3ea4e2d76de1e075eef00b966c65aa Mon Sep 17 00:00:00 2001 From: "cmiller@zippy.cornsilk.net" <> Date: Fri, 26 Jan 2007 14:47:12 -0500 Subject: [PATCH 29/41] Bug #25879: THD::options isn't set with ulonglong values and \ variables Bits higher than 2**31 were impossible to set on THD::options. It's probably a remnant from a time when options was a 32-bit integer. Now, use unsigned long-long constants and variables to set and clear THD::options. --- Pulled comments back to column 49. --- BitKeeper/etc/collapsed | 2 ++ sql/mysql_priv.h | 72 ++++++++++++++++++++++------------------- sql/set_var.h | 4 +-- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed index 5ff033b2163..e64a04b0060 100644 --- a/BitKeeper/etc/collapsed +++ b/BitKeeper/etc/collapsed @@ -29,3 +29,5 @@ 4554a95d7txO1DuO9G3nAizI3SkFAA 4554b3722d71SbPiI2Gx-RhbZjmuIQ 4558b3d73Cxjlb7Wv1oytdSTthxDfw +45ba4faf2oqu6eR8fqecR3LfSNcYUg +45ba5238-NKl80QVXzdGo8hO9M75Xg diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 534d42e1c17..47b97f1b955 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -20,6 +20,9 @@ except the part which must be in the server and in the client. */ +#ifndef MYSQL_PRIV_H_INCLUDED +#define MYSQL_PRIV_H_INCLUDED + #ifndef MYSQL_CLIENT #include @@ -296,55 +299,56 @@ MY_LOCALE *my_locale_by_name(const char *name); TODO: separate three contexts above, move them to separate bitfields. */ -#define SELECT_DISTINCT (1L << 0) // SELECT, user -#define SELECT_STRAIGHT_JOIN (1L << 1) // SELECT, user -#define SELECT_DESCRIBE (1L << 2) // SELECT, user -#define SELECT_SMALL_RESULT (1L << 3) // SELECT, user -#define SELECT_BIG_RESULT (1L << 4) // SELECT, user -#define OPTION_FOUND_ROWS (1L << 5) // SELECT, user -#define OPTION_TO_QUERY_CACHE (1L << 6) // SELECT, user -#define SELECT_NO_JOIN_CACHE (1L << 7) // intern -#define OPTION_BIG_TABLES (1L << 8) // THD, user -#define OPTION_BIG_SELECTS (1L << 9) // THD, user -#define OPTION_LOG_OFF (1L << 10) // THD, user -#define OPTION_UPDATE_LOG (1L << 11) // THD, user, unused -#define TMP_TABLE_ALL_COLUMNS (1L << 12) // SELECT, intern -#define OPTION_WARNINGS (1L << 13) // THD, user -#define OPTION_AUTO_IS_NULL (1L << 14) // THD, user, binlog -#define OPTION_FOUND_COMMENT (1L << 15) // SELECT, intern, parser -#define OPTION_SAFE_UPDATES (1L << 16) // THD, user -#define OPTION_BUFFER_RESULT (1L << 17) // SELECT, user -#define OPTION_BIN_LOG (1L << 18) // THD, user -#define OPTION_NOT_AUTOCOMMIT (1L << 19) // THD, user -#define OPTION_BEGIN (1L << 20) // THD, intern -#define OPTION_TABLE_LOCK (1L << 21) // THD, intern -#define OPTION_QUICK (1L << 22) // SELECT (for DELETE) -#define OPTION_QUOTE_SHOW_CREATE (1L << 23) // THD, user +#define SELECT_DISTINCT (1ULL << 0) // SELECT, user +#define SELECT_STRAIGHT_JOIN (1ULL << 1) // SELECT, user +#define SELECT_DESCRIBE (1ULL << 2) // SELECT, user +#define SELECT_SMALL_RESULT (1ULL << 3) // SELECT, user +#define SELECT_BIG_RESULT (1ULL << 4) // SELECT, user +#define OPTION_FOUND_ROWS (1ULL << 5) // SELECT, user +#define OPTION_TO_QUERY_CACHE (1ULL << 6) // SELECT, user +#define SELECT_NO_JOIN_CACHE (1ULL << 7) // intern +#define OPTION_BIG_TABLES (1ULL << 8) // THD, user +#define OPTION_BIG_SELECTS (1ULL << 9) // THD, user +#define OPTION_LOG_OFF (1ULL << 10) // THD, user +#define OPTION_UPDATE_LOG (1ULL << 11) // THD, user, unused +#define TMP_TABLE_ALL_COLUMNS (1ULL << 12) // SELECT, intern +#define OPTION_WARNINGS (1ULL << 13) // THD, user +#define OPTION_AUTO_IS_NULL (1ULL << 14) // THD, user, binlog +#define OPTION_FOUND_COMMENT (1ULL << 15) // SELECT, intern, parser +#define OPTION_SAFE_UPDATES (1ULL << 16) // THD, user +#define OPTION_BUFFER_RESULT (1ULL << 17) // SELECT, user +#define OPTION_BIN_LOG (1ULL << 18) // THD, user +#define OPTION_NOT_AUTOCOMMIT (1ULL << 19) // THD, user +#define OPTION_BEGIN (1ULL << 20) // THD, intern +#define OPTION_TABLE_LOCK (1ULL << 21) // THD, intern +#define OPTION_QUICK (1ULL << 22) // SELECT (for DELETE) +#define OPTION_QUOTE_SHOW_CREATE (1ULL << 23) // THD, user /* Thr following is used to detect a conflict with DISTINCT in the user query has requested */ -#define SELECT_ALL (1L << 24) // SELECT, user, parser +#define SELECT_ALL (1ULL << 24) // SELECT, user, parser /* Set if we are updating a non-transaction safe table */ -#define OPTION_STATUS_NO_TRANS_UPDATE (1L << 25) // THD, intern +#define OPTION_STATUS_NO_TRANS_UPDATE (1ULL << 25) // THD, intern /* The following can be set when importing tables in a 'wrong order' to suppress foreign key checks */ -#define OPTION_NO_FOREIGN_KEY_CHECKS (1L << 26) // THD, user, binlog +#define OPTION_NO_FOREIGN_KEY_CHECKS (1ULL << 26) // THD, user, binlog /* The following speeds up inserts to InnoDB tables by suppressing unique key checks in some cases */ -#define OPTION_RELAXED_UNIQUE_CHECKS (1L << 27) // THD, user, binlog -#define SELECT_NO_UNLOCK (1L << 28) // SELECT, intern -#define OPTION_SCHEMA_TABLE (1L << 29) // SELECT, intern +#define OPTION_RELAXED_UNIQUE_CHECKS (1ULL << 27) // THD, user, binlog +#define SELECT_NO_UNLOCK (1ULL << 28) // SELECT, intern +#define OPTION_SCHEMA_TABLE (1ULL << 29) // SELECT, intern /* Flag set if setup_tables already done */ -#define OPTION_SETUP_TABLES_DONE (1L << 30) // intern +#define OPTION_SETUP_TABLES_DONE (1ULL << 30) // intern /* If not set then the thread will ignore all warnings with level notes. */ -#define OPTION_SQL_NOTES (1UL << 31) // THD, user +#define OPTION_SQL_NOTES (1ULL << 31) // THD, user /* Force the used temporary table to be a MyISAM table (because we will use fulltext functions when reading from it. */ -#define TMP_TABLE_FORCE_MYISAM (LL(1) << 32) +#define TMP_TABLE_FORCE_MYISAM (1ULL << 32) + /* Maximum length of time zone name that we support @@ -1682,3 +1686,5 @@ inline void kill_delayed_threads(void) {} #endif #endif /* MYSQL_CLIENT */ + +#endif diff --git a/sql/set_var.h b/sql/set_var.h index 3304f552a97..d55ca4d289f 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -457,11 +457,11 @@ class sys_var_thd_bit :public sys_var_thd sys_check_func check_func; sys_update_func update_func; public: - ulong bit_flag; + ulonglong bit_flag; bool reverse; sys_var_thd_bit(const char *name_arg, sys_check_func c_func, sys_update_func u_func, - ulong bit, bool reverse_arg=0) + ulonglong bit, bool reverse_arg=0) :sys_var_thd(name_arg), check_func(c_func), update_func(u_func), bit_flag(bit), reverse(reverse_arg) {} From 58ae89cb766520e8c048bca3710a2398b7fcbd4e Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 26 Jan 2007 12:00:38 -0800 Subject: [PATCH 30/41] User visible change - breaks some environments, per Paul DuBois. Reverting in 4.1 and 5.0. --- mysys/default.c | 1 - scripts/mysqld_multi.sh | 8 -------- 2 files changed, 9 deletions(-) diff --git a/mysys/default.c b/mysys/default.c index 1d71399ef71..6e40c48d82a 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -49,7 +49,6 @@ const char *default_directories[]= { "sys:/etc/", #else "/etc/", -"/etc/mysql/", #endif #ifdef DATADIR DATADIR, diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 48e64a6b541..54662d2c017 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -437,14 +437,6 @@ sub find_groups { $data[$i] = $line; } - if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf") - { - open(MY_CNF, ") && close(MY_CNF); - } - for (; ($line = shift @tmp); $i++) - { - $data[$i] = $line; - } if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf") { open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=) && close(MY_CNF); From f8f11eb2d9ad180eea685c4624d7540df24ec232 Mon Sep 17 00:00:00 2001 From: "mtaylor@qualinost.(none)" <> Date: Fri, 26 Jan 2007 12:17:50 -0800 Subject: [PATCH 31/41] Reverting change adding /etc/mysql support, as it breaks some installs. --- mysys/default.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mysys/default.c b/mysys/default.c index 12cd1713c31..97c52d01031 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -978,11 +978,10 @@ static uint my_get_system_windows_directory(char *buffer, uint size) Everywhere else, this is: 1. /etc/ - 2. /etc/mysql/ - 3. getenv(DEFAULT_HOME_ENV) - 4. "" - 5. "~/" - 6. --sysconfdir= + 2. getenv(DEFAULT_HOME_ENV) + 3. "" + 4. "~/" + 5. --sysconfdir= */ @@ -1008,7 +1007,6 @@ static void init_default_directories() *ptr++= env; #endif *ptr++= "/etc/"; - *ptr++= "/etc/mysql/"; #endif if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV)))) *ptr++= env; From d42b919a0b14dd2e0a120ca0e1043c9a3c46730e Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Mon, 29 Jan 2007 12:24:08 +0100 Subject: [PATCH 32/41] Bug#19474 readline bug: mysql: free(): invalid pointer - Write to uninitialised memory occured since _rl_rapped_lines buffer was not extended in CHECK_INV_LBREAKS macro - Patch submitted to bug-readline@gnu.org --- cmd-line-utils/readline/display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c index 46b57325e33..b8b7ac445e6 100644 --- a/cmd-line-utils/readline/display.c +++ b/cmd-line-utils/readline/display.c @@ -524,6 +524,17 @@ rl_redisplay () wrap_offset = prompt_invis_chars_first_line = 0; } +#if defined (HANDLE_MULTIBYTE) +#define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ + } \ + } while (0) +#else #define CHECK_INV_LBREAKS() \ do { \ if (newlines >= (inv_lbsize - 2)) \ @@ -532,6 +543,7 @@ rl_redisplay () inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ } while (0) +#endif #if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \ From 7eaa82ea38e1a9f0598ecfc88439583b51567e64 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Mon, 29 Jan 2007 14:31:48 +0100 Subject: [PATCH 33/41] Bug#22943 syscall pruning in libmysql - Set the timeout values only where needed --- sql-common/client.c | 8 +++++++- sql/mysql_priv.h | 2 ++ sql/mysqld.cc | 10 ++-------- sql/net_serv.cc | 27 +++++++++++++++++++++++++-- sql/repl_failsafe.cc | 9 ++++++--- sql/set_var.cc | 4 ++-- sql/slave.cc | 1 - sql/sql_parse.cc | 37 +++++++++++++++++++++++++------------ sql/sql_repl.cc | 6 +++--- vio/vio.c | 2 +- vio/viossl.c | 11 ----------- 11 files changed, 73 insertions(+), 44 deletions(-) diff --git a/sql-common/client.c b/sql-common/client.c index 87e22624dd9..431c1bdf418 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1881,11 +1881,17 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, goto error; } vio_keepalive(net->vio,TRUE); - /* Override local client variables */ + + /* If user set read_timeout, let it override the default */ if (mysql->options.read_timeout) net->read_timeout= mysql->options.read_timeout; + vio_timeout(net->vio, 0, net->read_timeout); + + /* If user set write_timeout, let it override the default */ if (mysql->options.write_timeout) net->write_timeout= mysql->options.write_timeout; + vio_timeout(net->vio, 1, net->write_timeout); + if (mysql->options.max_allowed_packet) net->max_packet_size= mysql->options.max_allowed_packet; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a12944437d7..253eadd266e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -59,6 +59,8 @@ void kill_one_thread(THD *thd, ulong id); bool net_request_file(NET* net, const char* fname); char* query_table_status(THD *thd,const char *db,const char *table_name); +void net_set_write_timeout(NET *net, uint timeout); +void net_set_read_timeout(NET *net, uint timeout); #define x_free(A) { my_free((gptr) (A),MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); } #define safeFree(x) { if(x) { my_free((gptr) x,MYF(0)); x = NULL; } } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 024e4682a22..59ed60d4c85 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3601,10 +3601,9 @@ static bool read_init_file(char *file_name) #ifndef EMBEDDED_LIBRARY static void create_new_thread(THD *thd) { + NET *net=&thd->net; DBUG_ENTER("create_new_thread"); - NET *net=&thd->net; // For easy ref - net->read_timeout = (uint) connect_timeout; if (protocol_version > 9) net->return_errno=1; @@ -3899,12 +3898,7 @@ extern "C" pthread_handler_decl(handle_connections_sockets, } if (sock == unix_sock) thd->host=(char*) my_localhost; -#ifdef __WIN__ - /* Set default wait_timeout */ - ulong wait_timeout= global_system_variables.net_wait_timeout * 1000; - (void) setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&wait_timeout, - sizeof(wait_timeout)); -#endif + create_new_thread(thd); } diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 08184537896..a5a05d381cd 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -491,7 +491,7 @@ net_real_write(NET *net,const char *packet,ulong len) thr_alarm(&alarmed,(uint) net->write_timeout,&alarm_buff); #else alarmed=0; - vio_timeout(net->vio, 1, net->write_timeout); + /* Write timeout is set in net_set_write_timeout */ #endif /* NO_ALARM */ pos=(char*) packet; end=pos+len; @@ -684,7 +684,7 @@ my_real_read(NET *net, ulong *complen) if (net_blocking) thr_alarm(&alarmed,net->read_timeout,&alarm_buff); #else - vio_timeout(net->vio, 0, net->read_timeout); + /* Read timeout is set in net_set_read_timeout */ #endif /* NO_ALARM */ pos = net->buff + net->where_b; /* net->packet -4 */ @@ -995,3 +995,26 @@ my_net_read(NET *net) return len; } + +void net_set_read_timeout(NET *net, uint timeout) +{ + DBUG_ENTER("net_set_read_timeout"); + DBUG_PRINT("enter", ("timeout: %d", timeout)); + net->read_timeout= timeout; +#ifdef NO_ALARM + vio_timeout(net->vio, 0, timeout); +#endif + DBUG_VOID_RETURN; +} + + +void net_set_write_timeout(NET *net, uint timeout) +{ + DBUG_ENTER("net_set_write_timeout"); + DBUG_PRINT("enter", ("timeout: %d", timeout)); + net->write_timeout= timeout; +#ifdef NO_ALARM + vio_timeout(net->vio, 1, timeout); +#endif + DBUG_VOID_RETURN; +} diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 61fd5d9bce4..4c8703226a6 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -57,6 +57,7 @@ static Slave_log_event* find_slave_event(IO_CACHE* log, functions like register_slave()) are working. */ +#if NOT_USED static int init_failsafe_rpl_thread(THD* thd) { DBUG_ENTER("init_failsafe_rpl_thread"); @@ -99,7 +100,7 @@ static int init_failsafe_rpl_thread(THD* thd) thd->set_time(); DBUG_RETURN(0); } - +#endif void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status) { @@ -573,12 +574,14 @@ err: } +#if NOT_USED int find_recovery_captain(THD* thd, MYSQL* mysql) { return 0; } +#endif - +#if NOT_USED pthread_handler_decl(handle_failsafe_rpl,arg) { DBUG_ENTER("handle_failsafe_rpl"); @@ -626,7 +629,7 @@ err: pthread_exit(0); DBUG_RETURN(0); } - +#endif int show_slave_hosts(THD* thd) { diff --git a/sql/set_var.cc b/sql/set_var.cc index 71ca382f9d9..bf76d96c0ed 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1128,14 +1128,14 @@ static void fix_tx_isolation(THD *thd, enum_var_type type) static void fix_net_read_timeout(THD *thd, enum_var_type type) { if (type != OPT_GLOBAL) - thd->net.read_timeout=thd->variables.net_read_timeout; + net_set_read_timeout(&thd->net, thd->variables.net_read_timeout); } static void fix_net_write_timeout(THD *thd, enum_var_type type) { if (type != OPT_GLOBAL) - thd->net.write_timeout=thd->variables.net_write_timeout; + net_set_write_timeout(&thd->net, thd->variables.net_write_timeout); } static void fix_net_retry_count(THD *thd, enum_var_type type) diff --git a/sql/slave.cc b/sql/slave.cc index 6785e92b9f9..9e1ec86dd1d 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2625,7 +2625,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) */ thd->variables.max_allowed_packet= global_system_variables.max_allowed_packet + MAX_LOG_EVENT_HEADER; /* note, incr over the global not session var */ - thd->net.read_timeout = slave_net_timeout; thd->master_access= ~(ulong)0; thd->priv_user = 0; thd->slave_thread = 1; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 07064113209..808e08e4b21 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -867,7 +867,7 @@ static int check_connection(THD *thd) return(ER_HANDSHAKE_ERROR); } DBUG_PRINT("info", ("IO layer change in progress...")); - if (sslaccept(ssl_acceptor_fd, net->vio, thd->variables.net_wait_timeout)) + if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout)) { DBUG_PRINT("error", ("Failed to read user information (pkt_len= %lu)", pkt_len)); @@ -897,7 +897,6 @@ static int check_connection(THD *thd) if ((thd->client_capabilities & CLIENT_TRANSACTIONS) && opt_using_transactions) net->return_status= &thd->server_status; - net->read_timeout=(uint) thd->variables.net_read_timeout; char *user= end; char *passwd= strend(user)+1; @@ -1029,6 +1028,10 @@ pthread_handler_decl(handle_one_connection,arg) NET *net= &thd->net; thd->thread_stack= (char*) &thd; + /* Use "connect_timeout" value during connection phase */ + net_set_read_timeout(net, connect_timeout); + net_set_write_timeout(net, connect_timeout); + if ((error=check_connection(thd))) { // Wrong permissions if (error > 0) @@ -1058,6 +1061,11 @@ pthread_handler_decl(handle_one_connection,arg) if (thd->query_error) thd->killed= 1; } + + /* Connect completed, set read/write timeouts back to tdefault */ + net_set_read_timeout(net, thd->variables.net_read_timeout); + net_set_write_timeout(net, thd->variables.net_write_timeout); + while (!net->error && net->vio != 0 && !thd->killed) { if (do_command(thd)) @@ -1261,7 +1269,7 @@ err: #ifndef EMBEDDED_LIBRARY /* - Read one command from socket and execute it (query or simple command). + Read one command from connection and execute it (query or simple command). This function is called in loop from thread function. SYNOPSIS do_command() @@ -1272,24 +1280,26 @@ err: bool do_command(THD *thd) { - char *packet; - uint old_timeout; + char *packet= 0; ulong packet_length; - NET *net; + NET *net= &thd->net; enum enum_server_command command; DBUG_ENTER("do_command"); - net= &thd->net; /* indicator of uninitialized lex => normal flow of errors handling (see my_message_sql) */ thd->lex->current_select= 0; - packet=0; - old_timeout=net->read_timeout; - // Wait max for 8 hours - net->read_timeout=(uint) thd->variables.net_wait_timeout; + /* + This thread will do a blocking read from the client which + will be interrupted when the next command is received from + the client, the connection is closed or "net_wait_timeout" + number of seconds has passed + */ + net_set_read_timeout(net, thd->variables.net_wait_timeout); + thd->clear_error(); // Clear error message net_new_transaction(net); @@ -1318,7 +1328,10 @@ bool do_command(THD *thd) vio_description(net->vio), command, command_name[command])); } - net->read_timeout=old_timeout; // restore it + + /* Restore read timeout value */ + net_set_read_timeout(net, thd->variables.net_read_timeout); + /* packet_length contains length of data, as it was stored in packet header. In case of malformed header, packet_length can be zero. diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index a20f2a6506c..f83313a8fd8 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -89,8 +89,8 @@ static int send_file(THD *thd) The client might be slow loading the data, give him wait_timeout to do the job */ - old_timeout = thd->net.read_timeout; - thd->net.read_timeout = thd->variables.net_wait_timeout; + old_timeout= net->read_timeout; + net_set_read_timeout(net, thd->variables.net_wait_timeout); /* We need net_flush here because the client will not know it needs to send @@ -134,7 +134,7 @@ static int send_file(THD *thd) error = 0; err: - thd->net.read_timeout = old_timeout; + net_set_read_timeout(net, old_timeout); if (fd >= 0) (void) my_close(fd, MYF(0)); if (errmsg) diff --git a/vio/vio.c b/vio/vio.c index 6174acd7024..1eeafe483dc 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -96,7 +96,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type, vio->in_addr =vio_ssl_in_addr; vio->vioblocking =vio_ssl_blocking; vio->is_blocking =vio_is_blocking; - vio->timeout =vio_ssl_timeout; + vio->timeout =vio_timeout; } else /* default is VIO_TYPE_TCPIP */ #endif /* HAVE_OPENSSL */ diff --git a/vio/viossl.c b/vio/viossl.c index 62145fe5006..8da9723d7d8 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -416,15 +416,4 @@ int vio_ssl_blocking(Vio * vio __attribute__((unused)), } -void vio_ssl_timeout(Vio *vio __attribute__((unused)), - uint which __attribute__((unused)), - uint timeout __attribute__((unused))) -{ -#ifdef __WIN__ - ulong wait_timeout= (ulong) timeout * 1000; - (void) setsockopt(vio->sd, SOL_SOCKET, - which ? SO_SNDTIMEO : SO_RCVTIMEO, (char*) &wait_timeout, - sizeof(wait_timeout)); -#endif /* __WIN__ */ -} #endif /* HAVE_OPENSSL */ From 751d00c47eff2f61e42a43ff55f09d840da1b8bc Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 29 Jan 2007 16:54:40 +0100 Subject: [PATCH 34/41] Import latest version of yaSSL - Replace SawTooth copyright header with MySQL's - Bug#19209 Test 'rpl_openssl' hangs on Windows - Spurious "2013 Connection to server lost" errors fixed yaSSL doesn't close socket anymore, that is left to the application --- extra/yassl/README | 4 +- extra/yassl/include/buffer.hpp | 41 +++++------- extra/yassl/include/cert_wrapper.hpp | 41 +++++------- extra/yassl/include/crypto_wrapper.hpp | 41 +++++------- extra/yassl/include/factory.hpp | 41 +++++------- extra/yassl/include/handshake.hpp | 41 +++++------- extra/yassl/include/lock.hpp | 41 +++++------- extra/yassl/include/log.hpp | 41 +++++------- extra/yassl/include/openssl/ssl.h | 41 +++++------- extra/yassl/include/socket_wrapper.hpp | 41 +++++------- extra/yassl/include/timer.hpp | 41 +++++------- extra/yassl/include/yassl.hpp | 37 +++++------ extra/yassl/include/yassl_error.hpp | 41 +++++------- extra/yassl/include/yassl_imp.hpp | 41 +++++------- extra/yassl/include/yassl_int.hpp | 46 +++++++------- extra/yassl/include/yassl_types.hpp | 41 +++++------- extra/yassl/src/buffer.cpp | 41 +++++------- extra/yassl/src/cert_wrapper.cpp | 41 +++++------- extra/yassl/src/crypto_wrapper.cpp | 41 +++++------- extra/yassl/src/handshake.cpp | 43 ++++++------- extra/yassl/src/lock.cpp | 41 +++++------- extra/yassl/src/log.cpp | 41 +++++------- extra/yassl/src/socket_wrapper.cpp | 43 ++++++------- extra/yassl/src/ssl.cpp | 42 +++++-------- extra/yassl/src/template_instnt.cpp | 41 +++++------- extra/yassl/src/timer.cpp | 41 +++++------- extra/yassl/src/yassl.cpp | 41 +++++------- extra/yassl/src/yassl_error.cpp | 41 +++++------- extra/yassl/src/yassl_imp.cpp | 41 +++++------- extra/yassl/src/yassl_int.cpp | 53 ++++++++-------- extra/yassl/taocrypt/include/aes.hpp | 41 +++++------- extra/yassl/taocrypt/include/algebra.hpp | 41 +++++------- extra/yassl/taocrypt/include/arc4.hpp | 41 +++++------- extra/yassl/taocrypt/include/asn.hpp | 41 +++++------- extra/yassl/taocrypt/include/block.hpp | 41 +++++------- extra/yassl/taocrypt/include/blowfish.hpp | 43 ++++++------- extra/yassl/taocrypt/include/coding.hpp | 41 +++++------- extra/yassl/taocrypt/include/des.hpp | 41 +++++------- extra/yassl/taocrypt/include/dh.hpp | 41 +++++------- extra/yassl/taocrypt/include/dsa.hpp | 41 +++++------- extra/yassl/taocrypt/include/error.hpp | 41 +++++------- extra/yassl/taocrypt/include/file.hpp | 41 +++++------- extra/yassl/taocrypt/include/hash.hpp | 41 +++++------- extra/yassl/taocrypt/include/hmac.hpp | 41 +++++------- extra/yassl/taocrypt/include/integer.hpp | 41 +++++------- extra/yassl/taocrypt/include/kernelc.hpp | 41 +++++------- extra/yassl/taocrypt/include/md2.hpp | 41 +++++------- extra/yassl/taocrypt/include/md4.hpp | 41 +++++------- extra/yassl/taocrypt/include/md5.hpp | 41 +++++------- extra/yassl/taocrypt/include/misc.hpp | 41 +++++------- extra/yassl/taocrypt/include/modarith.hpp | 41 +++++------- extra/yassl/taocrypt/include/modes.hpp | 41 +++++------- extra/yassl/taocrypt/include/pwdbased.hpp | 41 +++++------- extra/yassl/taocrypt/include/random.hpp | 41 +++++------- extra/yassl/taocrypt/include/ripemd.hpp | 41 +++++------- extra/yassl/taocrypt/include/rsa.hpp | 41 +++++------- extra/yassl/taocrypt/include/runtime.hpp | 41 +++++------- extra/yassl/taocrypt/include/sha.hpp | 41 +++++------- extra/yassl/taocrypt/include/twofish.hpp | 41 +++++------- extra/yassl/taocrypt/include/type_traits.hpp | 41 +++++------- extra/yassl/taocrypt/include/types.hpp | 44 ++++++------- extra/yassl/taocrypt/mySTL/algorithm.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/helpers.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/list.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/memory.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/memory_array.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/pair.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/stdexcept.hpp | 41 +++++------- extra/yassl/taocrypt/mySTL/vector.hpp | 41 +++++------- extra/yassl/taocrypt/src/aes.cpp | 41 +++++------- extra/yassl/taocrypt/src/aestables.cpp | 41 +++++------- extra/yassl/taocrypt/src/algebra.cpp | 41 +++++------- extra/yassl/taocrypt/src/arc4.cpp | 41 +++++------- extra/yassl/taocrypt/src/asn.cpp | 41 +++++------- extra/yassl/taocrypt/src/bftables.cpp | 41 +++++------- extra/yassl/taocrypt/src/blowfish.cpp | 41 +++++------- extra/yassl/taocrypt/src/coding.cpp | 41 +++++------- extra/yassl/taocrypt/src/crypto.cpp | 41 +++++------- extra/yassl/taocrypt/src/des.cpp | 41 +++++------- extra/yassl/taocrypt/src/dh.cpp | 41 +++++------- extra/yassl/taocrypt/src/dsa.cpp | 41 +++++------- extra/yassl/taocrypt/src/file.cpp | 41 +++++------- extra/yassl/taocrypt/src/hash.cpp | 41 +++++------- extra/yassl/taocrypt/src/integer.cpp | 65 +++++++------------- extra/yassl/taocrypt/src/md2.cpp | 41 +++++------- extra/yassl/taocrypt/src/md4.cpp | 41 +++++------- extra/yassl/taocrypt/src/md5.cpp | 41 +++++------- extra/yassl/taocrypt/src/misc.cpp | 41 +++++------- extra/yassl/taocrypt/src/random.cpp | 41 +++++------- extra/yassl/taocrypt/src/ripemd.cpp | 41 +++++------- extra/yassl/taocrypt/src/rsa.cpp | 41 +++++------- extra/yassl/taocrypt/src/sha.cpp | 41 +++++------- extra/yassl/taocrypt/src/template_instnt.cpp | 41 +++++------- extra/yassl/taocrypt/src/tftables.cpp | 41 +++++------- extra/yassl/taocrypt/src/twofish.cpp | 41 +++++------- 95 files changed, 1627 insertions(+), 2278 deletions(-) diff --git a/extra/yassl/README b/extra/yassl/README index 4445266c639..32d97a1e873 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -1,4 +1,4 @@ -*****************yaSSL Release notes, version 1.5.0 (1/10/07) +*****************yaSSL Release notes, version 1.5.8 (1/10/07) This release of yaSSL contains bug fixes, portability enhancements, and support for GCC 4.1.1 and vs2005 sp1. @@ -23,7 +23,7 @@ SSL_METHOD *TLSv1_1_client_method(void); or the SSLv23 versions (even though yaSSL doesn't support SSL 2.0 the v23 - means to pick the highest of SSL 3.0, TLS 1.0, or TLS 1.1. + means to pick the highest of SSL 3.0, TLS 1.0, or TLS 1.1). See normal build instructions below under 1.0.6. diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp index c2709a8c847..a51bca9a630 100644 --- a/extra/yassl/include/buffer.hpp +++ b/extra/yassl/include/buffer.hpp @@ -1,27 +1,20 @@ -/* buffer.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL buffer header defines input and output buffers to simulate streaming diff --git a/extra/yassl/include/cert_wrapper.hpp b/extra/yassl/include/cert_wrapper.hpp index 761be0e9b04..ce8003aa4cf 100644 --- a/extra/yassl/include/cert_wrapper.hpp +++ b/extra/yassl/include/cert_wrapper.hpp @@ -1,27 +1,20 @@ -/* cert_wrapper.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The certificate wrapper header defines certificate management functions diff --git a/extra/yassl/include/crypto_wrapper.hpp b/extra/yassl/include/crypto_wrapper.hpp index 83cf3d26398..07b5925265a 100644 --- a/extra/yassl/include/crypto_wrapper.hpp +++ b/extra/yassl/include/crypto_wrapper.hpp @@ -1,27 +1,20 @@ -/* crypto_wrapper.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The crypto wrapper header is used to define policies for the cipher diff --git a/extra/yassl/include/factory.hpp b/extra/yassl/include/factory.hpp index dc25cf0ee70..e66e32dcdf6 100644 --- a/extra/yassl/include/factory.hpp +++ b/extra/yassl/include/factory.hpp @@ -1,27 +1,20 @@ -/* factory.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The factory header defines an Object Factory, used by SSL message and * handshake types. diff --git a/extra/yassl/include/handshake.hpp b/extra/yassl/include/handshake.hpp index ea390fee322..549a31bf3e9 100644 --- a/extra/yassl/include/handshake.hpp +++ b/extra/yassl/include/handshake.hpp @@ -1,27 +1,20 @@ -/* handshake.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The handshake header declares function prototypes for creating and reading * the various handshake messages. diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 5b585b1cf16..0525943e45d 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -1,27 +1,20 @@ -/* lock.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* lock.hpp provides an os specific Lock, locks mutex on entry and unlocks * automatically upon exit, no-ops provided for Single Threaded diff --git a/extra/yassl/include/log.hpp b/extra/yassl/include/log.hpp index 33cb38ebae0..fb480eeefb6 100644 --- a/extra/yassl/include/log.hpp +++ b/extra/yassl/include/log.hpp @@ -1,27 +1,20 @@ -/* log.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL log interface diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 4f5baba9b38..16110c52f43 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -1,27 +1,20 @@ -/* ssl.h - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* ssl.h defines openssl compatibility layer * diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index bc82384d85e..308704c2af0 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -1,27 +1,20 @@ -/* socket_wrapper.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The socket wrapper header defines a Socket class that hides the differences diff --git a/extra/yassl/include/timer.hpp b/extra/yassl/include/timer.hpp index ff90aa884de..725e73cf453 100644 --- a/extra/yassl/include/timer.hpp +++ b/extra/yassl/include/timer.hpp @@ -1,27 +1,20 @@ -/* timer.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* timer.hpp provides a high res and low res timers * diff --git a/extra/yassl/include/yassl.hpp b/extra/yassl/include/yassl.hpp index edb8e416eb6..29e0a5d94ec 100644 --- a/extra/yassl/include/yassl.hpp +++ b/extra/yassl/include/yassl.hpp @@ -1,23 +1,20 @@ -/* yassl.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL externel header defines yaSSL API diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp index f820e5811d9..63fa9a761ba 100644 --- a/extra/yassl/include/yassl_error.hpp +++ b/extra/yassl/include/yassl_error.hpp @@ -1,27 +1,20 @@ -/* yassl_error.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL error header defines error codes and an exception class diff --git a/extra/yassl/include/yassl_imp.hpp b/extra/yassl/include/yassl_imp.hpp index f51a902b2a5..f6434443cb0 100644 --- a/extra/yassl/include/yassl_imp.hpp +++ b/extra/yassl/include/yassl_imp.hpp @@ -1,27 +1,20 @@ -/* yassl_imp.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL implementation header defines all strucutres from the SSL.v3 * specification "draft-freier-ssl-version3-02.txt" diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp index 4a3c0ba4e20..94cb85c3300 100644 --- a/extra/yassl/include/yassl_int.hpp +++ b/extra/yassl/include/yassl_int.hpp @@ -1,27 +1,20 @@ -/* yassl_int.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL internal header defines SSL supporting types not specified in the @@ -591,6 +584,9 @@ class SSL { Socket socket_; // socket wrapper Buffers buffers_; // buffered handshakes and data Log log_; // logger + + // optimization variables + bool has_data_; // buffered data ready? public: SSL(SSL_CTX* ctx); @@ -613,6 +609,8 @@ public: Log& useLog(); Buffers& useBuffers(); + bool HasData() const; + // sets void set_pending(Cipher suite); void set_random(const opaque*, ConnectionEnd); diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp index 646c71afddf..e4b81f98fff 100644 --- a/extra/yassl/include/yassl_types.hpp +++ b/extra/yassl/include/yassl_types.hpp @@ -1,27 +1,20 @@ -/* yassl_types.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL types header defines all constants, enums, and typedefs * from the SSL.v3 specification "draft-freier-ssl-version3-02.txt" diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index 4d396a8d29f..0c3f23b0cb8 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -1,27 +1,20 @@ -/* buffer.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL buffer header implements input/output buffers to simulate streaming diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp index c3ae9c0c561..5eacf9083f9 100644 --- a/extra/yassl/src/cert_wrapper.cpp +++ b/extra/yassl/src/cert_wrapper.cpp @@ -1,27 +1,20 @@ -/* cert_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The certificate wrapper source implements certificate management functions diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp index 7344a70b367..28d7f1b5693 100644 --- a/extra/yassl/src/crypto_wrapper.cpp +++ b/extra/yassl/src/crypto_wrapper.cpp @@ -1,27 +1,20 @@ -/* crypto_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The crypto wrapper source implements the policies for the cipher * components used by SSL. diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index c03d72ff2ef..0cd0dfe9c7c 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -1,27 +1,20 @@ -/* handshake.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The handshake source implements functions for creating and reading @@ -979,7 +972,7 @@ int receiveData(SSL& ssl, Data& data, bool peek) ssl.verfiyHandShakeComplete(); if (ssl.GetError()) return -1; - if (!ssl.bufferedData()) + if (!ssl.HasData()) processReply(ssl); if (peek) diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp index 0f4c80b1616..6d8e9c17477 100644 --- a/extra/yassl/src/lock.cpp +++ b/extra/yassl/src/lock.cpp @@ -1,27 +1,20 @@ -/* lock.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Locking functions */ diff --git a/extra/yassl/src/log.cpp b/extra/yassl/src/log.cpp index c8030787f3d..35db4136a54 100644 --- a/extra/yassl/src/log.cpp +++ b/extra/yassl/src/log.cpp @@ -1,27 +1,20 @@ -/* log.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Debug logging functions */ diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp index f281b81a24a..d53a109d70e 100644 --- a/extra/yassl/src/socket_wrapper.cpp +++ b/extra/yassl/src/socket_wrapper.cpp @@ -1,27 +1,20 @@ -/* socket_wrapper.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* The socket wrapper source implements a Socket class that hides the @@ -81,7 +74,7 @@ socket_t Socket::get_fd() const Socket::~Socket() { - closeSocket(); + // don't close automatically now } diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 5ca7dec399d..70198af79b4 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -1,27 +1,20 @@ - /* ssl.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* SSL source implements all openssl compatibility API functions * @@ -407,7 +400,6 @@ int SSL_do_handshake(SSL* ssl) int SSL_clear(SSL* ssl) { - ssl->useSocket().closeSocket(); GetErrors().Remove(); return SSL_SUCCESS; diff --git a/extra/yassl/src/template_instnt.cpp b/extra/yassl/src/template_instnt.cpp index fb488e47672..f82f7924359 100644 --- a/extra/yassl/src/template_instnt.cpp +++ b/extra/yassl/src/template_instnt.cpp @@ -1,27 +1,20 @@ -/* template_instnt.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Explicit template instantiation requests diff --git a/extra/yassl/src/timer.cpp b/extra/yassl/src/timer.cpp index 8500d09120b..c1286b0724c 100644 --- a/extra/yassl/src/timer.cpp +++ b/extra/yassl/src/timer.cpp @@ -1,27 +1,20 @@ - /* timer.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* timer.cpp implements a high res and low res timer * diff --git a/extra/yassl/src/yassl.cpp b/extra/yassl/src/yassl.cpp index e253ef84bb5..815277ce6f3 100644 --- a/extra/yassl/src/yassl.cpp +++ b/extra/yassl/src/yassl.cpp @@ -1,27 +1,20 @@ -/* yassl.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL implements external API diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp index 24fc602d4e9..dc120028e13 100644 --- a/extra/yassl/src/yassl_error.cpp +++ b/extra/yassl/src/yassl_error.cpp @@ -1,27 +1,20 @@ -/* yassl_error.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL error implements and an exception class diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index bf10c4b8932..0bc95f64abc 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,27 +1,20 @@ -/* yassl_imp.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL source implements all SSL.v3 secification structures. */ diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index 1a407ca8ba5..ae16abf9e49 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1,27 +1,20 @@ -/* yassl_int.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* yaSSL internal source implements SSL supporting types not specified in the @@ -298,7 +291,7 @@ const ClientKeyFactory& sslFactory::getClientKey() const SSL::SSL(SSL_CTX* ctx) : secure_(ctx->getMethod()->getVersion(), crypto_.use_random(), ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx, - ctx->GetDH_Parms().set_) + ctx->GetDH_Parms().set_), has_data_(false) { if (int err = crypto_.get_random().GetError()) { SetError(YasslError(err)); @@ -1054,6 +1047,8 @@ void SSL::fillData(Data& data) if (data.get_length() == dataSz) break; } + + if (buffers_.getData().size() == 0) has_data_ = false; // none left } @@ -1389,9 +1384,17 @@ bool SSL::isTLSv1_1() const } +// is there buffered data available, optimization to remove iteration on buffer +bool SSL::HasData() const +{ + return has_data_; +} + + void SSL::addData(input_buffer* data) { buffers_.useData().push_back(data); + if (!has_data_) has_data_ = true; } diff --git a/extra/yassl/taocrypt/include/aes.hpp b/extra/yassl/taocrypt/include/aes.hpp index 5c53fc39411..dc19c98a83a 100644 --- a/extra/yassl/taocrypt/include/aes.hpp +++ b/extra/yassl/taocrypt/include/aes.hpp @@ -1,27 +1,20 @@ -/* aes.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* aes.hpp defines AES */ diff --git a/extra/yassl/taocrypt/include/algebra.hpp b/extra/yassl/taocrypt/include/algebra.hpp index 9cfbcf06ece..298ef115a4a 100644 --- a/extra/yassl/taocrypt/include/algebra.hpp +++ b/extra/yassl/taocrypt/include/algebra.hpp @@ -1,27 +1,20 @@ -/* algebra.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's algebra.h from CryptoPP */ diff --git a/extra/yassl/taocrypt/include/arc4.hpp b/extra/yassl/taocrypt/include/arc4.hpp index ddd5082f557..757e1a50d71 100644 --- a/extra/yassl/taocrypt/include/arc4.hpp +++ b/extra/yassl/taocrypt/include/arc4.hpp @@ -1,27 +1,20 @@ -/* arc4.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* arc4.hpp defines ARC4 */ diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp index a82cd8d0d79..1c1850cb47e 100644 --- a/extra/yassl/taocrypt/include/asn.hpp +++ b/extra/yassl/taocrypt/include/asn.hpp @@ -1,27 +1,20 @@ -/* asn.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* asn.hpp provides ASN1 BER, PublicKey, and x509v3 decoding */ diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp index 0cf27d0b6b5..529a91eee08 100644 --- a/extra/yassl/taocrypt/include/block.hpp +++ b/extra/yassl/taocrypt/include/block.hpp @@ -1,27 +1,20 @@ -/* block.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* block.hpp provides word and byte blocks with configurable allocators diff --git a/extra/yassl/taocrypt/include/blowfish.hpp b/extra/yassl/taocrypt/include/blowfish.hpp index 4d6ad1b034b..90d2c014b4c 100644 --- a/extra/yassl/taocrypt/include/blowfish.hpp +++ b/extra/yassl/taocrypt/include/blowfish.hpp @@ -1,27 +1,20 @@ -/* blowfish.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* blowfish.hpp defines Blowfish */ @@ -89,7 +82,7 @@ typedef BlockCipher Blowfish_CBC_Decryption; -} // naemspace +} // namespace #endif // TAO_CRYPT_BLOWFISH_HPP diff --git a/extra/yassl/taocrypt/include/coding.hpp b/extra/yassl/taocrypt/include/coding.hpp index da6771a5bea..3b1c0687604 100644 --- a/extra/yassl/taocrypt/include/coding.hpp +++ b/extra/yassl/taocrypt/include/coding.hpp @@ -1,27 +1,20 @@ -/* coding.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* coding.hpp defines hex and base64 encoding/decoing */ diff --git a/extra/yassl/taocrypt/include/des.hpp b/extra/yassl/taocrypt/include/des.hpp index 19273821f98..f99a289392f 100644 --- a/extra/yassl/taocrypt/include/des.hpp +++ b/extra/yassl/taocrypt/include/des.hpp @@ -1,27 +1,20 @@ -/* des.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* des.hpp defines DES, DES_EDE2, and DES_EDE3 see FIPS 46-2 and FIPS 81 diff --git a/extra/yassl/taocrypt/include/dh.hpp b/extra/yassl/taocrypt/include/dh.hpp index 869c3edf5b3..b7724cbd80d 100644 --- a/extra/yassl/taocrypt/include/dh.hpp +++ b/extra/yassl/taocrypt/include/dh.hpp @@ -1,27 +1,20 @@ -/* dh.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* dh.hpp provides Diffie-Hellman support */ diff --git a/extra/yassl/taocrypt/include/dsa.hpp b/extra/yassl/taocrypt/include/dsa.hpp index a5ba416382d..f185b852cdc 100644 --- a/extra/yassl/taocrypt/include/dsa.hpp +++ b/extra/yassl/taocrypt/include/dsa.hpp @@ -1,27 +1,20 @@ -/* dsa.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* dsa.hpp provides Digitial Signautre Algorithm see FIPS 186-2 */ diff --git a/extra/yassl/taocrypt/include/error.hpp b/extra/yassl/taocrypt/include/error.hpp index 368e2a27b73..ef8b065d2f1 100644 --- a/extra/yassl/taocrypt/include/error.hpp +++ b/extra/yassl/taocrypt/include/error.hpp @@ -1,27 +1,20 @@ -/* error.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* error.hpp provides a taocrypt error numbers * diff --git a/extra/yassl/taocrypt/include/file.hpp b/extra/yassl/taocrypt/include/file.hpp index 79693cd054b..0f85b46fdb2 100644 --- a/extra/yassl/taocrypt/include/file.hpp +++ b/extra/yassl/taocrypt/include/file.hpp @@ -1,27 +1,20 @@ -/* file.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* file.hpp provies File Sources and Sinks */ diff --git a/extra/yassl/taocrypt/include/hash.hpp b/extra/yassl/taocrypt/include/hash.hpp index e3030088e0e..1ea59bf251a 100644 --- a/extra/yassl/taocrypt/include/hash.hpp +++ b/extra/yassl/taocrypt/include/hash.hpp @@ -1,27 +1,20 @@ -/* hash.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* hash.hpp provides a base for digest types */ diff --git a/extra/yassl/taocrypt/include/hmac.hpp b/extra/yassl/taocrypt/include/hmac.hpp index b710c3aa499..1d486514e06 100644 --- a/extra/yassl/taocrypt/include/hmac.hpp +++ b/extra/yassl/taocrypt/include/hmac.hpp @@ -1,27 +1,20 @@ -/* hmac.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* hamc.hpp implements HMAC, see RFC 2104 */ diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp index 751c79102c4..186d62bb866 100644 --- a/extra/yassl/taocrypt/include/integer.hpp +++ b/extra/yassl/taocrypt/include/integer.hpp @@ -1,27 +1,20 @@ -/* integer.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's integer.h from CryptoPP */ diff --git a/extra/yassl/taocrypt/include/kernelc.hpp b/extra/yassl/taocrypt/include/kernelc.hpp index 317359553e4..daa3762d5dd 100644 --- a/extra/yassl/taocrypt/include/kernelc.hpp +++ b/extra/yassl/taocrypt/include/kernelc.hpp @@ -1,27 +1,20 @@ -/* kernelc.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* kernelc.hpp provides support for C std lib when compiled in kernel mode */ diff --git a/extra/yassl/taocrypt/include/md2.hpp b/extra/yassl/taocrypt/include/md2.hpp index 89856adffe9..cb13d86ec07 100644 --- a/extra/yassl/taocrypt/include/md2.hpp +++ b/extra/yassl/taocrypt/include/md2.hpp @@ -1,27 +1,20 @@ -/* md5.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* md2.hpp provides MD2 digest support, see RFC 1319 */ diff --git a/extra/yassl/taocrypt/include/md4.hpp b/extra/yassl/taocrypt/include/md4.hpp index d2da7e35e4d..28c2bc7efd1 100644 --- a/extra/yassl/taocrypt/include/md4.hpp +++ b/extra/yassl/taocrypt/include/md4.hpp @@ -1,27 +1,20 @@ -/* md4.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* md4.hpp provides MD4 digest support * WANRING: MD4 is considered insecure, only use if you have to, e.g., yaSSL diff --git a/extra/yassl/taocrypt/include/md5.hpp b/extra/yassl/taocrypt/include/md5.hpp index f607a922155..9b461543675 100644 --- a/extra/yassl/taocrypt/include/md5.hpp +++ b/extra/yassl/taocrypt/include/md5.hpp @@ -1,27 +1,20 @@ -/* md5.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* md5.hpp provides MD5 digest support, see RFC 1321 */ diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index cc20b60d528..392db38410a 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -1,27 +1,20 @@ -/* misc.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's misc.h from CryptoPP */ diff --git a/extra/yassl/taocrypt/include/modarith.hpp b/extra/yassl/taocrypt/include/modarith.hpp index 47b91560657..501a8129b90 100644 --- a/extra/yassl/taocrypt/include/modarith.hpp +++ b/extra/yassl/taocrypt/include/modarith.hpp @@ -1,27 +1,20 @@ -/* modarith.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's modarith.h from CryptoPP */ diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp index d77f855385c..d1ebce7568b 100644 --- a/extra/yassl/taocrypt/include/modes.hpp +++ b/extra/yassl/taocrypt/include/modes.hpp @@ -1,27 +1,20 @@ -/* modes.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption */ diff --git a/extra/yassl/taocrypt/include/pwdbased.hpp b/extra/yassl/taocrypt/include/pwdbased.hpp index 78df7ede02e..5ece1a8f43b 100644 --- a/extra/yassl/taocrypt/include/pwdbased.hpp +++ b/extra/yassl/taocrypt/include/pwdbased.hpp @@ -1,27 +1,20 @@ -/* pwdbased.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* pwdbased.hpp defines PBKDF2 from PKCS #5 */ diff --git a/extra/yassl/taocrypt/include/random.hpp b/extra/yassl/taocrypt/include/random.hpp index 628faaf116c..91058e8c5cf 100644 --- a/extra/yassl/taocrypt/include/random.hpp +++ b/extra/yassl/taocrypt/include/random.hpp @@ -1,27 +1,20 @@ -/* random.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* random.hpp provides a crypto secure Random Number Generator using an OS specific seed diff --git a/extra/yassl/taocrypt/include/ripemd.hpp b/extra/yassl/taocrypt/include/ripemd.hpp index 5d443769662..a63f92ceadd 100644 --- a/extra/yassl/taocrypt/include/ripemd.hpp +++ b/extra/yassl/taocrypt/include/ripemd.hpp @@ -1,27 +1,20 @@ -/* ripemd.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* ripemd.hpp provides RIPEMD digest support */ diff --git a/extra/yassl/taocrypt/include/rsa.hpp b/extra/yassl/taocrypt/include/rsa.hpp index c33e21b76a3..c895ab6fd34 100644 --- a/extra/yassl/taocrypt/include/rsa.hpp +++ b/extra/yassl/taocrypt/include/rsa.hpp @@ -1,27 +1,20 @@ -/* rsa.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* rsa.hpp provides RSA ES encrypt/decrypt, SSL (block type 1) sign and verify */ diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp index 3a72b2917f8..99bbe3ac8a3 100644 --- a/extra/yassl/taocrypt/include/runtime.hpp +++ b/extra/yassl/taocrypt/include/runtime.hpp @@ -1,27 +1,20 @@ -/* runtime.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* runtime.hpp provides C++ runtime support functions when building a pure C * version of yaSSL, user must define YASSL_PURE_C diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp index 510c516b1a4..c501d3ad306 100644 --- a/extra/yassl/taocrypt/include/sha.hpp +++ b/extra/yassl/taocrypt/include/sha.hpp @@ -1,27 +1,20 @@ -/* sha.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* sha.hpp provides SHA-1 digests, see RFC 3174 */ diff --git a/extra/yassl/taocrypt/include/twofish.hpp b/extra/yassl/taocrypt/include/twofish.hpp index 8cad4923262..bc6f89a9f39 100644 --- a/extra/yassl/taocrypt/include/twofish.hpp +++ b/extra/yassl/taocrypt/include/twofish.hpp @@ -1,27 +1,20 @@ -/* twofish.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* twofish.hpp defines Twofish */ diff --git a/extra/yassl/taocrypt/include/type_traits.hpp b/extra/yassl/taocrypt/include/type_traits.hpp index b985358e1c1..0dd5e4e5c50 100644 --- a/extra/yassl/taocrypt/include/type_traits.hpp +++ b/extra/yassl/taocrypt/include/type_traits.hpp @@ -1,27 +1,20 @@ -/* type_traits.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* type_traits defines fundamental types * see discussion in C++ Templates, $19.1 diff --git a/extra/yassl/taocrypt/include/types.hpp b/extra/yassl/taocrypt/include/types.hpp index 9c3fa8f64f2..c817572d265 100644 --- a/extra/yassl/taocrypt/include/types.hpp +++ b/extra/yassl/taocrypt/include/types.hpp @@ -1,27 +1,20 @@ -/* types.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's misc.h from CryptoPP, basic crypt types */ @@ -72,7 +65,8 @@ typedef unsigned int word32; #if defined(HAVE_64_MULTIPLY) && (defined(__alpha__) || defined(__ia64__) \ - || defined(_ARCH_PPC64) || defined(__mips64) || defined(__x86_64__)) + || defined(_ARCH_PPC64) || defined(__mips64) || defined(__x86_64__) \ + || defined(_M_X64) || defined(_M_IA64)) // These platforms have 64-bit CPU registers. Unfortunately most C++ compilers // don't allow any way to access the 64-bit by 64-bit multiply instruction // without using assembly, so in order to use word64 as word, the assembly diff --git a/extra/yassl/taocrypt/mySTL/algorithm.hpp b/extra/yassl/taocrypt/mySTL/algorithm.hpp index 9a51d1f2281..d8bc29a0bb9 100644 --- a/extra/yassl/taocrypt/mySTL/algorithm.hpp +++ b/extra/yassl/taocrypt/mySTL/algorithm.hpp @@ -1,27 +1,20 @@ -/* mySTL algorithm.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL algorithm implements max, min, for_each, swap, find_if, copy, diff --git a/extra/yassl/taocrypt/mySTL/helpers.hpp b/extra/yassl/taocrypt/mySTL/helpers.hpp index 43381c0f6ea..c0495a71d84 100644 --- a/extra/yassl/taocrypt/mySTL/helpers.hpp +++ b/extra/yassl/taocrypt/mySTL/helpers.hpp @@ -1,27 +1,20 @@ -/* mySTL helpers.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL helpers implements misc constructs for vector and list diff --git a/extra/yassl/taocrypt/mySTL/list.hpp b/extra/yassl/taocrypt/mySTL/list.hpp index 831c5bbbbbd..6a081cba5ad 100644 --- a/extra/yassl/taocrypt/mySTL/list.hpp +++ b/extra/yassl/taocrypt/mySTL/list.hpp @@ -1,27 +1,20 @@ -/* mySTL list.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL list implements a simple list diff --git a/extra/yassl/taocrypt/mySTL/memory.hpp b/extra/yassl/taocrypt/mySTL/memory.hpp index 5855423c6fc..b239aa6f907 100644 --- a/extra/yassl/taocrypt/mySTL/memory.hpp +++ b/extra/yassl/taocrypt/mySTL/memory.hpp @@ -1,27 +1,20 @@ -/* mySTL memory.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL memory implements auto_ptr diff --git a/extra/yassl/taocrypt/mySTL/memory_array.hpp b/extra/yassl/taocrypt/mySTL/memory_array.hpp index f089c69f815..a044498cd98 100644 --- a/extra/yassl/taocrypt/mySTL/memory_array.hpp +++ b/extra/yassl/taocrypt/mySTL/memory_array.hpp @@ -1,27 +1,20 @@ -/* mySTL memory_array.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL memory_arry implements auto_array diff --git a/extra/yassl/taocrypt/mySTL/pair.hpp b/extra/yassl/taocrypt/mySTL/pair.hpp index 13916fece13..be2dbb14b88 100644 --- a/extra/yassl/taocrypt/mySTL/pair.hpp +++ b/extra/yassl/taocrypt/mySTL/pair.hpp @@ -1,27 +1,20 @@ -/* mySTL pair.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL pair implements pair diff --git a/extra/yassl/taocrypt/mySTL/stdexcept.hpp b/extra/yassl/taocrypt/mySTL/stdexcept.hpp index 4fd343ae6fd..9696995248d 100644 --- a/extra/yassl/taocrypt/mySTL/stdexcept.hpp +++ b/extra/yassl/taocrypt/mySTL/stdexcept.hpp @@ -1,27 +1,20 @@ -/* mySTL stdexcept.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL memory implements exception, runtime_error diff --git a/extra/yassl/taocrypt/mySTL/vector.hpp b/extra/yassl/taocrypt/mySTL/vector.hpp index 902e014f75b..8ba8813ca70 100644 --- a/extra/yassl/taocrypt/mySTL/vector.hpp +++ b/extra/yassl/taocrypt/mySTL/vector.hpp @@ -1,27 +1,20 @@ -/* mySTL vector.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* mySTL vector implements simple vector, w/ swap diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp index 2940f06c074..b2b42d3dcf0 100644 --- a/extra/yassl/taocrypt/src/aes.cpp +++ b/extra/yassl/taocrypt/src/aes.cpp @@ -1,27 +1,20 @@ -/* aes.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* C++ based on Wei Dai's aes.cpp from CryptoPP */ /* x86 asm original */ diff --git a/extra/yassl/taocrypt/src/aestables.cpp b/extra/yassl/taocrypt/src/aestables.cpp index 4118715fd0c..e9d6b7a80cb 100644 --- a/extra/yassl/taocrypt/src/aestables.cpp +++ b/extra/yassl/taocrypt/src/aestables.cpp @@ -1,27 +1,20 @@ -/* aestables.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's aestables.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp index 76c4e99323d..cb597c41552 100644 --- a/extra/yassl/taocrypt/src/algebra.cpp +++ b/extra/yassl/taocrypt/src/algebra.cpp @@ -1,27 +1,20 @@ -/* algebra.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's algebra.cpp from CryptoPP */ #undef NDEBUG diff --git a/extra/yassl/taocrypt/src/arc4.cpp b/extra/yassl/taocrypt/src/arc4.cpp index 90b5170c59e..0944cc31837 100644 --- a/extra/yassl/taocrypt/src/arc4.cpp +++ b/extra/yassl/taocrypt/src/arc4.cpp @@ -1,27 +1,20 @@ -/* arc4.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's arc4.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index ceaedf00209..2994b906e76 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -1,27 +1,20 @@ - /* asn.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* asn.cpp implements ASN1 BER, PublicKey, and x509v3 decoding */ diff --git a/extra/yassl/taocrypt/src/bftables.cpp b/extra/yassl/taocrypt/src/bftables.cpp index 2dbb6c01674..46469472e6a 100644 --- a/extra/yassl/taocrypt/src/bftables.cpp +++ b/extra/yassl/taocrypt/src/bftables.cpp @@ -1,27 +1,20 @@ -/* bftables.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's bfinit.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/blowfish.cpp b/extra/yassl/taocrypt/src/blowfish.cpp index d736292fb19..66ff4d829d7 100644 --- a/extra/yassl/taocrypt/src/blowfish.cpp +++ b/extra/yassl/taocrypt/src/blowfish.cpp @@ -1,27 +1,20 @@ -/* blowfish.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */ /* x86 asm is original */ diff --git a/extra/yassl/taocrypt/src/coding.cpp b/extra/yassl/taocrypt/src/coding.cpp index e9e5cb69469..68055b3aff4 100644 --- a/extra/yassl/taocrypt/src/coding.cpp +++ b/extra/yassl/taocrypt/src/coding.cpp @@ -1,27 +1,20 @@ -/* coding.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* coding.cpp implements hex and base64 encoding/decoing */ diff --git a/extra/yassl/taocrypt/src/crypto.cpp b/extra/yassl/taocrypt/src/crypto.cpp index 95238100f5d..82d3b853084 100644 --- a/extra/yassl/taocrypt/src/crypto.cpp +++ b/extra/yassl/taocrypt/src/crypto.cpp @@ -1,27 +1,20 @@ -/* crypto.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* put features that other apps expect from OpenSSL type crypto */ diff --git a/extra/yassl/taocrypt/src/des.cpp b/extra/yassl/taocrypt/src/des.cpp index 94428ac587e..5cffeaea9c9 100644 --- a/extra/yassl/taocrypt/src/des.cpp +++ b/extra/yassl/taocrypt/src/des.cpp @@ -1,27 +1,20 @@ -/* des.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* C++ part based on Wei Dai's des.cpp from CryptoPP */ /* x86 asm is original */ diff --git a/extra/yassl/taocrypt/src/dh.cpp b/extra/yassl/taocrypt/src/dh.cpp index 671a20d0d78..d6a61cfb1f3 100644 --- a/extra/yassl/taocrypt/src/dh.cpp +++ b/extra/yassl/taocrypt/src/dh.cpp @@ -1,27 +1,20 @@ -/* dh.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* dh.cpp implements Diffie-Hellman support diff --git a/extra/yassl/taocrypt/src/dsa.cpp b/extra/yassl/taocrypt/src/dsa.cpp index a132c7339f5..79ee91e76f9 100644 --- a/extra/yassl/taocrypt/src/dsa.cpp +++ b/extra/yassl/taocrypt/src/dsa.cpp @@ -1,27 +1,20 @@ -/* dsa.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ #include "runtime.hpp" diff --git a/extra/yassl/taocrypt/src/file.cpp b/extra/yassl/taocrypt/src/file.cpp index 7c59af09708..0498038a04b 100644 --- a/extra/yassl/taocrypt/src/file.cpp +++ b/extra/yassl/taocrypt/src/file.cpp @@ -1,27 +1,20 @@ -/* file.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* file.cpp implements File Sources and Sinks */ diff --git a/extra/yassl/taocrypt/src/hash.cpp b/extra/yassl/taocrypt/src/hash.cpp index fbbdf0c8c31..66598177631 100644 --- a/extra/yassl/taocrypt/src/hash.cpp +++ b/extra/yassl/taocrypt/src/hash.cpp @@ -1,27 +1,20 @@ -/* hash.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* hash.cpp implements a base for digest types */ diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 5927f7e3d5e..419783403ea 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -1,27 +1,20 @@ -/* integer.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ @@ -38,23 +31,12 @@ #include // for asm overflow assembly #endif - -// 64bit multiply overflow intrinsic -#if defined(_MSC_VER) && defined(_WIN64) && !defined(__INTEL_COMPILER) && \ - !defined(TAOCRYPT_NATIVE_DWORD_AVAILABLE) - #ifdef __ia64__ - #define myUMULH __UMULH - #elif __x86_64__ - #define myUMULH __umulh - #else - #error unknown 64bit windows - #endif - -extern "C" word myUMULH(word, word); - -#pragma intrinsic (myUMULH) +#if defined(_M_X64) || defined(_M_IA64) + #include +#pragma intrinsic(_umul128) #endif + #ifdef __GNUC__ #include #include @@ -184,9 +166,8 @@ DWord() {} #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE r.whole_ = (dword)a * b; - #elif defined(_MSC_VER) - r.halfs_.low = a*b; - r.halfs_.high = myUMULH(a,b); + #elif defined(_M_X64) || defined(_M_IA64) + r.halfs_.low = _umul128(a, b, &r.halfs_.high); #elif defined(__alpha__) r.halfs_.low = a*b; diff --git a/extra/yassl/taocrypt/src/md2.cpp b/extra/yassl/taocrypt/src/md2.cpp index aeadbdfb367..b835e245718 100644 --- a/extra/yassl/taocrypt/src/md2.cpp +++ b/extra/yassl/taocrypt/src/md2.cpp @@ -1,27 +1,20 @@ -/* md2.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's md2.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/md4.cpp b/extra/yassl/taocrypt/src/md4.cpp index 1efda04fbb8..cf17c218809 100644 --- a/extra/yassl/taocrypt/src/md4.cpp +++ b/extra/yassl/taocrypt/src/md4.cpp @@ -1,27 +1,20 @@ -/* md4.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's md4.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/md5.cpp b/extra/yassl/taocrypt/src/md5.cpp index bf485d11b95..f18e0290c90 100644 --- a/extra/yassl/taocrypt/src/md5.cpp +++ b/extra/yassl/taocrypt/src/md5.cpp @@ -1,27 +1,20 @@ -/* md5.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's md5.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp index 7ab05582e95..83acc15277d 100644 --- a/extra/yassl/taocrypt/src/misc.cpp +++ b/extra/yassl/taocrypt/src/misc.cpp @@ -1,27 +1,20 @@ -/* misc.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's misc.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp index 3fab1ddba23..89fd5f7c7bc 100644 --- a/extra/yassl/taocrypt/src/random.cpp +++ b/extra/yassl/taocrypt/src/random.cpp @@ -1,27 +1,20 @@ -/* random.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* random.cpp implements a crypto secure Random Number Generator using an OS diff --git a/extra/yassl/taocrypt/src/ripemd.cpp b/extra/yassl/taocrypt/src/ripemd.cpp index 98bfe4b2645..a738c197bf2 100644 --- a/extra/yassl/taocrypt/src/ripemd.cpp +++ b/extra/yassl/taocrypt/src/ripemd.cpp @@ -1,27 +1,20 @@ -/* ripemd.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's ripemd.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/rsa.cpp b/extra/yassl/taocrypt/src/rsa.cpp index b280c48f1af..57d19a59c76 100644 --- a/extra/yassl/taocrypt/src/rsa.cpp +++ b/extra/yassl/taocrypt/src/rsa.cpp @@ -1,27 +1,20 @@ -/* rsa.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's rsa.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp index b1273d9da8f..9713940529a 100644 --- a/extra/yassl/taocrypt/src/sha.cpp +++ b/extra/yassl/taocrypt/src/sha.cpp @@ -1,27 +1,20 @@ -/* sha.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's sha.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/template_instnt.cpp b/extra/yassl/taocrypt/src/template_instnt.cpp index db1ae645e09..390da58e191 100644 --- a/extra/yassl/taocrypt/src/template_instnt.cpp +++ b/extra/yassl/taocrypt/src/template_instnt.cpp @@ -1,27 +1,20 @@ -/* template_instnt.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* Explicit template instantiation requests diff --git a/extra/yassl/taocrypt/src/tftables.cpp b/extra/yassl/taocrypt/src/tftables.cpp index 7d7f2e98ac3..6917507b8b2 100644 --- a/extra/yassl/taocrypt/src/tftables.cpp +++ b/extra/yassl/taocrypt/src/tftables.cpp @@ -1,27 +1,20 @@ -/* tftables.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* based on Wei Dai's tftables.cpp from CryptoPP */ diff --git a/extra/yassl/taocrypt/src/twofish.cpp b/extra/yassl/taocrypt/src/twofish.cpp index bb385331519..84dd35f9191 100644 --- a/extra/yassl/taocrypt/src/twofish.cpp +++ b/extra/yassl/taocrypt/src/twofish.cpp @@ -1,27 +1,20 @@ -/* twofish.cpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* + Copyright (C) 2000-2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ /* C++ based on Wei Dai's twofish.cpp from CryptoPP */ /* x86 asm original */ From 8c142aef3f3d50309705bdc112e911251e9d0bd2 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 29 Jan 2007 18:32:45 +0100 Subject: [PATCH 35/41] Add test for making sure there are no spurious connect failures when using SSL --- mysql-test/t/ssl_connect.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mysql-test/t/ssl_connect.test diff --git a/mysql-test/t/ssl_connect.test b/mysql-test/t/ssl_connect.test new file mode 100644 index 00000000000..99c875186c1 --- /dev/null +++ b/mysql-test/t/ssl_connect.test @@ -0,0 +1,13 @@ + +-- source include/have_openssl.inc + +# Repeat connect/disconnect + +let $i=100; +while ($i) +{ + connect (test_con1,localhost,root,,,,,SSL); + disconnect test_con1; + dec $i; +} +echo completed; From 26e4f2e5060c1ea1e12ac260a6240a362bcbc0be Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Mon, 29 Jan 2007 18:46:06 +0100 Subject: [PATCH 36/41] Bug#25417 "/usr/bin/test" installed from yassl/taocrypt/test - It's good to build the test programs for yaSSL to check for undefined symbols etc but they should not be installed by "make install" --- extra/yassl/taocrypt/test/Makefile.am | 2 +- extra/yassl/testsuite/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am index 6344efa4fb7..73e7f729bdb 100644 --- a/extra/yassl/taocrypt/test/Makefile.am +++ b/extra/yassl/taocrypt/test/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL -bin_PROGRAMS = test +noinst_PROGRAMS = test test_SOURCES = test.cpp test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la test_CXXFLAGS = -DYASSL_PURE_C diff --git a/extra/yassl/testsuite/Makefile.am b/extra/yassl/testsuite/Makefile.am index 138077300f9..cae34e7bbc0 100644 --- a/extra/yassl/testsuite/Makefile.am +++ b/extra/yassl/testsuite/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL -bin_PROGRAMS = testsuite +noinst_PROGRAMS = testsuite testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \ ../examples/client/client.cpp ../examples/server/server.cpp \ ../examples/echoclient/echoclient.cpp \ From d1a7949297a5475765c35566747c627abc15c4ac Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 29 Jan 2007 19:09:30 +0100 Subject: [PATCH 37/41] Add result file for ssl_connect.test --- mysql-test/r/ssl_connect.result | 1 + 1 file changed, 1 insertion(+) create mode 100644 mysql-test/r/ssl_connect.result diff --git a/mysql-test/r/ssl_connect.result b/mysql-test/r/ssl_connect.result new file mode 100644 index 00000000000..6ab9fedbf2d --- /dev/null +++ b/mysql-test/r/ssl_connect.result @@ -0,0 +1 @@ +completed From adf20e3512f0eb4a71b0cbe2d50ad95a5624a359 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 29 Jan 2007 19:36:48 +0100 Subject: [PATCH 38/41] Bug#22579 use --warning-mode=pedantic and -std=c89 flags when compiling with gcc - Reorganize include file order to avoid problem with gcc 2.95.3 - Compiler is confused by forward class declarations --- server-tools/instance-manager/command.cc | 3 +-- server-tools/instance-manager/instance.cc | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server-tools/instance-manager/command.cc b/server-tools/instance-manager/command.cc index bbaa34b0823..ba84285ead2 100644 --- a/server-tools/instance-manager/command.cc +++ b/server-tools/instance-manager/command.cc @@ -17,9 +17,8 @@ #pragma implementation #endif -#include "command.h" #include "manager.h" - +#include "command.h" Command::Command() :guardian(Manager::get_guardian()), diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index f1166fdd804..2c94689c664 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -17,7 +17,6 @@ #pragma implementation #endif -#include "instance.h" #include @@ -26,8 +25,9 @@ #include #endif -#include "guardian.h" #include "manager.h" +#include "guardian.h" +#include "instance.h" #include "log.h" #include "mysql_manager_error.h" #include "portability.h" @@ -35,6 +35,7 @@ #include "thread_registry.h" #include "instance_map.h" + /************************************************************************* {{{ Platform-specific functions. *************************************************************************/ From eb415e4920339b834277c507d746eaf0a3296ac7 Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/ramil.myoffice.izhnet.ru" <> Date: Wed, 31 Jan 2007 09:51:05 +0400 Subject: [PATCH 39/41] fix for bug #19690: ORDER BY eliminates rows from the result Depending on the queries we use different data processing methods and can lose some data in case of double (and decimal in 4.1) fields. The fix consists of two parts: 1. double comparison changed, now double a is equal to double b if (a-b) is less than 5*0.1^(1 + max(a->decimals, b->decimals)). For example, if a->decimals==1, b->decimals==2, a==b if (a-b)<0.005 2. if we use a temporary table, store double values there as is to avoid any data conversion (rounding). --- mysql-test/r/type_float.result | 71 ++++++++++++++++++++++++++++++++++ mysql-test/t/type_float.test | 25 ++++++++++++ sql/field.cc | 2 +- sql/field.h | 15 +++++-- sql/init.cc | 6 +++ sql/item_cmpfunc.cc | 49 +++++++++++++++++++++++ sql/item_cmpfunc.h | 3 ++ sql/mysql_priv.h | 1 + sql/mysqld.cc | 1 + sql/sql_select.cc | 14 ++++--- 10 files changed, 177 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index f157bbc602d..3e66fa70dc1 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -278,4 +278,75 @@ select 1e-308, 1.00000001e-300, 100000000e-300; select 10e307; 10e307 1e+308 +create table t1(a int, b double(8, 2)); +insert into t1 values +(1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75), +(1, 217.08), (1, 7.94), (4, 96.07), (4, 6404.65), (4, -6500.72), (2, 100.00), +(5, 5.00), (5, -2104.80), (5, 2033.80), (5, 0.07), (5, 65.93), +(3, -4986.24), (3, 5.00), (3, 4857.34), (3, 123.74), (3, 0.16), +(6, -1695.31), (6, 1003.77), (6, 499.72), (6, 191.82); +explain select sum(b) s from t1 group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using temporary; Using filesort +select sum(b) s from t1 group by a; +s +0.00 +100.00 +0.00 +-0.00 +-0.00 +0.00 +select sum(b) s from t1 group by a having s <> 0; +s +100.00 +select sum(b) s from t1 group by a having s <> 0 order by s; +s +100.00 +select sum(b) s from t1 group by a having s <=> 0; +s +0.00 +0.00 +-0.00 +-0.00 +0.00 +select sum(b) s from t1 group by a having s <=> 0 order by s; +s +-0.00 +-0.00 +0.00 +0.00 +0.00 +alter table t1 add key (a, b); +explain select sum(b) s from t1 group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 14 NULL 26 Using index +select sum(b) s from t1 group by a; +s +0.00 +100.00 +0.00 +-0.00 +0.00 +0.00 +select sum(b) s from t1 group by a having s <> 0; +s +100.00 +select sum(b) s from t1 group by a having s <> 0 order by s; +s +100.00 +select sum(b) s from t1 group by a having s <=> 0; +s +0.00 +0.00 +-0.00 +0.00 +0.00 +select sum(b) s from t1 group by a having s <=> 0 order by s; +s +-0.00 +0.00 +0.00 +0.00 +0.00 +drop table t1; End of 4.1 tests diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 8a484f7bcd0..8c22d22ca66 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -188,4 +188,29 @@ select 1e-308, 1.00000001e-300, 100000000e-300; # check if overflows are detected correctly select 10e307; +# +# Bug #19690: ORDER BY eliminates rows from the result +# +create table t1(a int, b double(8, 2)); +insert into t1 values +(1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75), +(1, 217.08), (1, 7.94), (4, 96.07), (4, 6404.65), (4, -6500.72), (2, 100.00), +(5, 5.00), (5, -2104.80), (5, 2033.80), (5, 0.07), (5, 65.93), +(3, -4986.24), (3, 5.00), (3, 4857.34), (3, 123.74), (3, 0.16), +(6, -1695.31), (6, 1003.77), (6, 499.72), (6, 191.82); +explain select sum(b) s from t1 group by a; +select sum(b) s from t1 group by a; +select sum(b) s from t1 group by a having s <> 0; +select sum(b) s from t1 group by a having s <> 0 order by s; +select sum(b) s from t1 group by a having s <=> 0; +select sum(b) s from t1 group by a having s <=> 0 order by s; +alter table t1 add key (a, b); +explain select sum(b) s from t1 group by a; +select sum(b) s from t1 group by a; +select sum(b) s from t1 group by a having s <> 0; +select sum(b) s from t1 group by a having s <> 0 order by s; +select sum(b) s from t1 group by a having s <=> 0; +select sum(b) s from t1 group by a having s <=> 0 order by s; +drop table t1; + --echo End of 4.1 tests diff --git a/sql/field.cc b/sql/field.cc index e88b8b313e2..acc837c1d37 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3318,7 +3318,7 @@ int Field_double::store(double nr) else { double max_value; - if (dec >= NOT_FIXED_DEC) + if (not_fixed) { max_value= DBL_MAX; } diff --git a/sql/field.h b/sql/field.h index e4991ba1961..b10d950163c 100644 --- a/sql/field.h +++ b/sql/field.h @@ -616,6 +616,7 @@ public: class Field_double :public Field_num { public: + my_bool not_fixed; Field_double(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, @@ -623,12 +624,20 @@ public: uint8 dec_arg,bool zero_arg,bool unsigned_arg) :Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg, table_arg, - dec_arg, zero_arg,unsigned_arg) + dec_arg, zero_arg, unsigned_arg), + not_fixed(dec_arg >= NOT_FIXED_DEC) {} Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, struct st_table *table_arg, uint8 dec_arg) - :Field_num((char*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, (uint) 0, - NONE, field_name_arg, table_arg,dec_arg,0,0) + :Field_num((char *) 0, len_arg, maybe_null_arg ? (uchar *) "" : 0, (uint) 0, + NONE, field_name_arg, table_arg,dec_arg, 0, 0), + not_fixed(dec_arg >= NOT_FIXED_DEC) + {} + Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, + struct st_table *table_arg, uint8 dec_arg, my_bool not_fixed_srg) + :Field_num((char *) 0, len_arg, maybe_null_arg ? (uchar *) "" : 0, (uint) 0, + NONE, field_name_arg, table_arg, dec_arg, 0, 0), + not_fixed(not_fixed_srg) {} enum_field_types type() const { return FIELD_TYPE_DOUBLE;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; } diff --git a/sql/init.cc b/sql/init.cc index 4beb8db0c6f..5e1b6532c75 100644 --- a/sql/init.cc +++ b/sql/init.cc @@ -45,6 +45,12 @@ void unireg_init(ulong options) { /* It's used by filesort... */ log_10[i]= nr ; nr*= 10.0; } + /* Make a tab of powers of 0.1 */ + for (i= 0, nr= 0.1; i < array_elements(log_01); i++) + { + log_01[i]= nr; + nr*= 0.1; + } specialflag|=options; /* Set options from argv */ DBUG_VOID_RETURN; } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 859b4e0ecc1..65f9b279a18 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -352,6 +352,17 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) func= &Arg_comparator::compare_e_int_diff_signedness; } } + else if (type == REAL_RESULT) + { + if ((*a)->decimals < NOT_FIXED_DEC && (*b)->decimals < NOT_FIXED_DEC) + { + precision= 5 * log_01[max((*a)->decimals, (*b)->decimals)]; + if (func == &Arg_comparator::compare_real) + func= &Arg_comparator::compare_real_fixed; + else if (func == &Arg_comparator::compare_e_real) + func= &Arg_comparator::compare_e_real_fixed; + } + } return 0; } @@ -459,6 +470,44 @@ int Arg_comparator::compare_e_real() return test(val1 == val2); } + +int Arg_comparator::compare_real_fixed() +{ + /* + Fix yet another manifestation of Bug#2338. 'Volatile' will instruct + gcc to flush double values out of 80-bit Intel FPU registers before + performing the comparison. + */ + volatile double val1, val2; + val1= (*a)->val(); + if (!(*a)->null_value) + { + val2= (*b)->val(); + if (!(*b)->null_value) + { + owner->null_value= 0; + if (val1 == val2 || fabs(val1 - val2) < precision) + return 0; + if (val1 < val2) + return -1; + return 1; + } + } + owner->null_value= 1; + return -1; +} + + +int Arg_comparator::compare_e_real_fixed() +{ + double val1= (*a)->val(); + double val2= (*b)->val(); + if ((*a)->null_value || (*b)->null_value) + return test((*a)->null_value && (*b)->null_value); + return test(val1 == val2 || fabs(val1 - val2) < precision); +} + + int Arg_comparator::compare_int_signed() { longlong val1= (*a)->val_int(); diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 0e157fd412c..3dc09f0789a 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -33,6 +33,7 @@ class Arg_comparator: public Sql_alloc arg_cmp_func func; Item_bool_func2 *owner; Arg_comparator *comparators; // used only for compare_row() + double precision; public: DTCollation cmp_collation; @@ -77,6 +78,8 @@ public: int compare_e_int(); // compare args[0] & args[1] int compare_e_int_diff_signedness(); int compare_e_row(); // compare args[0] & args[1] + int compare_real_fixed(); + int compare_e_real_fixed(); static arg_cmp_func comparator_matrix [4][2]; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 3a240612cfa..40b7b9bcb1a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -907,6 +907,7 @@ extern char glob_hostname[FN_REFLEN], mysql_home[FN_REFLEN]; extern char pidfile_name[FN_REFLEN], system_time_zone[30], *opt_init_file; extern char log_error_file[FN_REFLEN]; extern double log_10[32]; +extern double log_01[32]; extern ulonglong log_10_int[20]; extern ulonglong keybuff_size; extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 024e4682a22..d31cafd9a33 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -361,6 +361,7 @@ ulong my_bind_addr; /* the address we bind to */ volatile ulong cached_thread_count= 0; double log_10[32]; /* 10 potences */ +double log_01[32]; time_t start_time; char mysql_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30]; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0254e8f56dc..a6881337d83 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5006,6 +5006,8 @@ static Field* create_tmp_field_from_field(THD *thd, Field* org_field, new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join if (org_field->type() == FIELD_TYPE_VAR_STRING) table->db_create_options|= HA_OPTION_PACK_RECORD; + else if (org_field->type() == FIELD_TYPE_DOUBLE) + ((Field_double *) new_field)->not_fixed= TRUE; } return new_field; } @@ -5045,7 +5047,7 @@ static Field* create_tmp_field_from_item(THD *thd, Item *item, TABLE *table, switch (item->result_type()) { case REAL_RESULT: new_field=new Field_double(item->max_length, maybe_null, - item->name, table, item->decimals); + item->name, table, item->decimals, TRUE); break; case INT_RESULT: new_field=new Field_longlong(item->max_length, maybe_null, @@ -5136,8 +5138,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, return new Field_string(sizeof(double)+sizeof(longlong), 0, item->name,table,&my_charset_bin); else - return new Field_double(item_sum->max_length,maybe_null, - item->name, table, item_sum->decimals); + return new Field_double(item_sum->max_length, maybe_null, + item->name, table, item_sum->decimals, TRUE); case Item_sum::VARIANCE_FUNC: /* Place for sum & count */ case Item_sum::STD_FUNC: if (group) @@ -5145,7 +5147,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, 0, item->name,table,&my_charset_bin); else return new Field_double(item_sum->max_length, maybe_null, - item->name,table,item_sum->decimals); + item->name, table, item_sum->decimals, TRUE); case Item_sum::UNIQUE_USERS_FUNC: return new Field_long(9,maybe_null,item->name,table,1); case Item_sum::MIN_FUNC: @@ -5160,8 +5162,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, default: switch (item_sum->result_type()) { case REAL_RESULT: - return new Field_double(item_sum->max_length,maybe_null, - item->name,table,item_sum->decimals); + return new Field_double(item_sum->max_length, maybe_null, + item->name, table, item_sum->decimals, TRUE); case INT_RESULT: return new Field_longlong(item_sum->max_length,maybe_null, item->name,table,item->unsigned_flag); From 0bd1c03e7ec07a624f77089f7c298a8c9d6a3362 Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/ramil.myoffice.izhnet.ru" <> Date: Wed, 31 Jan 2007 11:14:32 +0400 Subject: [PATCH 40/41] after-merge fix. --- sql/item_cmpfunc.cc | 18 +++++++++--------- sql/item_sum.cc | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 0daba495f62..bdfa4664a6f 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -417,12 +417,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) break; } case DECIMAL_RESULT: - case REAL_RESULT: break; - default: - DBUG_ASSERT(0); - } - else if (type == REAL_RESULT) + case REAL_RESULT: { if ((*a)->decimals < NOT_FIXED_DEC && (*b)->decimals < NOT_FIXED_DEC) { @@ -432,6 +428,10 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) else if (func == &Arg_comparator::compare_e_real) func= &Arg_comparator::compare_e_real_fixed; } + break; + } + default: + DBUG_ASSERT(0); } return 0; } @@ -577,10 +577,10 @@ int Arg_comparator::compare_real_fixed() performing the comparison. */ volatile double val1, val2; - val1= (*a)->val(); + val1= (*a)->val_real(); if (!(*a)->null_value) { - val2= (*b)->val(); + val2= (*b)->val_real(); if (!(*b)->null_value) { owner->null_value= 0; @@ -598,8 +598,8 @@ int Arg_comparator::compare_real_fixed() int Arg_comparator::compare_e_real_fixed() { - double val1= (*a)->val(); - double val2= (*b)->val(); + double val1= (*a)->val_real(); + double val2= (*b)->val_real(); if ((*a)->null_value || (*b)->null_value) return test((*a)->null_value && (*b)->null_value); return test(val1 == val2 || fabs(val1 - val2) < precision); diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 8bfac058936..28a9a1f4dbf 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -398,7 +398,8 @@ Field *Item_sum::create_tmp_field(bool group, TABLE *table, { switch (result_type()) { case REAL_RESULT: - return new Field_double(max_length,maybe_null,name,table,decimals); + return new Field_double(max_length, maybe_null, name, table, decimals, + TRUE); case INT_RESULT: return new Field_longlong(max_length,maybe_null,name,table,unsigned_flag); case STRING_RESULT: @@ -1123,7 +1124,7 @@ Field *Item_sum_avg::create_tmp_field(bool group, TABLE *table, if (hybrid_type == DECIMAL_RESULT) return new Field_new_decimal(max_length, maybe_null, name, table, decimals, unsigned_flag); - return new Field_double(max_length, maybe_null, name, table, decimals); + return new Field_double(max_length, maybe_null, name, table, decimals, TRUE); } @@ -1317,7 +1318,7 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table, */ return new Field_string(sizeof(double)*2 + sizeof(longlong), 0, name, table, &my_charset_bin); } - return new Field_double(max_length, maybe_null,name,table,decimals); + return new Field_double(max_length, maybe_null, name, table, decimals, TRUE); } From 24e3508b0e3d1ca10a5a8e9db102a506371ebb1c Mon Sep 17 00:00:00 2001 From: "cmiller@zippy.cornsilk.net" <> Date: Wed, 31 Jan 2007 15:39:41 -0500 Subject: [PATCH 41/41] Bug#25341: "init.d/mysql stop" may timeout too quickly Thirty five seconds is entirely too short of a period to wait for a server to exit. Instead, make a valliant effort to make sure it exits, and only give up after a very long period (arbitrarily chosen as 15 minutes). In addition, if we're being asked to restart the server, then don't try to start again if trying to stop the server failed. --- Return zero by default, when the script exits. --- Set return-/exit-value based on whether we successfully dealt with the PID-file. --- Don't wait that long if the program we're waiting on exits. It should only exit if the server is not going to be started. --- BitKeeper/etc/collapsed | 6 ++++++ support-files/mysql.server.sh | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed index 951d894c5b6..bf701e78a5c 100644 --- a/BitKeeper/etc/collapsed +++ b/BitKeeper/etc/collapsed @@ -30,3 +30,9 @@ 4554b3722d71SbPiI2Gx-RhbZjmuIQ 4558b3d73Cxjlb7Wv1oytdSTthxDfw 45771031yRCoM_ZfONdYchPvVEgLRg +459a60d8rIxeTuhB3j_QsOwLGdcpng +459a61c9OS8PzIsdviZJDkybJ1y1uA +459a70691aYIfU2ohV0a3P5iTLpO2A +459a7422KF_P7PuU3YQ5qG6ZLEVpiA +459a74e4nRcXppMSBYeQQ5efDkTADg +45c0fdfb2mz6NdOIsLenJtf6_ZelTA diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index f5fa4e9ed9a..9258fcf10c2 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -143,11 +143,12 @@ parse_manager_arguments() { wait_for_pid () { i=0 - while test $i -lt 35 ; do + while test $i -lt 900 ; do sleep 1 case "$1" in 'created') test -s $pid_file && i='' && break + kill -0 $2 || break # if the program goes away, stop waiting ;; 'removed') test ! -s $pid_file && i='' && break @@ -163,8 +164,10 @@ wait_for_pid () { if test -z "$i" ; then log_success_msg + return 0 else log_failure_msg + return 1 fi } @@ -277,26 +280,28 @@ case "$mode" in # Give extra arguments to mysqld with the my.cnf file. This script may # be overwritten at next upgrade. $manager --user=$user --pid-file=$pid_file >/dev/null 2>&1 & - wait_for_pid created + wait_for_pid created $!; return_value=$? # Make lock for RedHat / SuSE if test -w /var/lock/subsys then touch /var/lock/subsys/mysqlmanager fi + exit $return_value elif test -x $bindir/mysqld_safe then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. pid_file=$server_pid_file $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 & - wait_for_pid created + wait_for_pid created $!; return_value=$? # Make lock for RedHat / SuSE if test -w /var/lock/subsys then touch /var/lock/subsys/mysql fi + exit $return_value else log_failure_msg "Couldn't find MySQL manager or server" fi @@ -322,13 +327,14 @@ case "$mode" in echo $echo_n "Shutting down MySQL" kill $mysqlmanager_pid # mysqlmanager should remove the pid_file when it exits, so wait for it. - wait_for_pid removed + wait_for_pid removed; return_value=$? # delete lock for RedHat / SuSE if test -f $lock_dir then rm -f $lock_dir fi + exit $return_value else log_failure_msg "MySQL manager or server PID file could not be found!" fi @@ -337,8 +343,12 @@ case "$mode" in 'restart') # Stop the service and regardless of whether it was # running or not, start it again. - $0 stop $other_args - $0 start $other_args + if $0 stop $other_args; then + $0 start $other_args + else + log_failure_msg "Failed to stop running server, so refusing to try to start." + exit 1 + fi ;; 'reload') @@ -357,3 +367,5 @@ case "$mode" in exit 1 ;; esac + +exit 0