summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
committermonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
commit77a70a0a24ce658a3ee55248cb2e76f84afc1b88 (patch)
treeaeb2314adbd714c7e2b032209bfd7914e3cfda3d
parent6cad89775b4ed78c02c2fa9f3e49181f63b7fb65 (diff)
parent5e04e2370f05bc42437f8be476eba9e204888b65 (diff)
downloadmariadb-git-77a70a0a24ce658a3ee55248cb2e76f84afc1b88.tar.gz
merge with 4.0.15
-rw-r--r--.bzrignore10
-rw-r--r--BitKeeper/etc/logging_ok1
-rwxr-xr-xBuild-tools/Bootstrap38
-rwxr-xr-xBuild-tools/Do-compile7
-rwxr-xr-xBuild-tools/Do-pkg127
-rwxr-xr-xBuild-tools/Do-rpm450
-rw-r--r--SSL/cacert.pem37
-rw-r--r--SSL/client-cert.pem87
-rw-r--r--SSL/client-key.pem26
-rw-r--r--SSL/client-req.pem38
-rw-r--r--SSL/server-cert.pem86
-rw-r--r--SSL/server-key.pem26
-rw-r--r--SSL/server-req.pem38
-rw-r--r--VC++Files/client/mysql.dsp8
-rw-r--r--VC++Files/client/mysqladmin.dsp8
-rw-r--r--VC++Files/client/mysqlclient.dsp8
-rw-r--r--VC++Files/client/mysqldump.dsp12
-rw-r--r--VC++Files/client/mysqlimport.dsp10
-rw-r--r--VC++Files/client/mysqlshow.dsp12
-rw-r--r--VC++Files/comp_err/comp_err.dsp8
-rw-r--r--VC++Files/innobase/innobase.dsp8
-rw-r--r--VC++Files/isamchk/isamchk.dsp8
-rw-r--r--VC++Files/libmysql/libmysql.dsp2
-rw-r--r--VC++Files/libmysqld/libmysqld.dsp12
-rw-r--r--VC++Files/libmysqltest/myTest.dsp8
-rw-r--r--VC++Files/my_print_defaults/my_print_defaults.dsp22
-rw-r--r--VC++Files/myisamlog/myisamlog.dsp10
-rw-r--r--VC++Files/mysql.dsw3
-rw-r--r--VC++Files/mysqlbinlog/mysqlbinlog.dsp12
-rw-r--r--VC++Files/mysqlcheck/mysqlcheck.dsp16
-rw-r--r--VC++Files/mysqldemb/mysqldemb.dsp4
-rw-r--r--VC++Files/mysqlmanager/MySqlManager.dsp8
-rw-r--r--VC++Files/mysqlserver/mysqlserver.dsp12
-rw-r--r--VC++Files/mysqlshutdown/mysqlshutdown.dsp10
-rw-r--r--VC++Files/mysys/mysys.dsp6
-rw-r--r--VC++Files/pack_isam/pack_isam.dsp8
-rw-r--r--VC++Files/perror/perror.dsp12
-rw-r--r--VC++Files/replace/replace.dsp8
-rw-r--r--VC++Files/sql/mysqld.dsp14
-rw-r--r--VC++Files/test1/test1.dsp8
-rw-r--r--VC++Files/thr_test/thr_test.dsp8
-rw-r--r--VC++Files/vio/vio.dsp12
-rw-r--r--VC++Files/zlib/zlib.dsp8
-rw-r--r--acconfig.h3
-rw-r--r--acinclude.m422
-rw-r--r--client/mysql.cc10
-rw-r--r--client/mysqlbinlog.cc88
-rw-r--r--client/mysqldump.c5
-rw-r--r--client/mysqlimport.c2
-rw-r--r--client/mysqltest.c95
-rw-r--r--configure.in4
-rw-r--r--extra/my_print_defaults.c32
-rw-r--r--extra/resolveip.c8
-rw-r--r--include/config-win.h1
-rw-r--r--include/m_string.h10
-rw-r--r--include/my_sys.h6
-rw-r--r--include/mysql_com.h4
-rw-r--r--include/violite.h202
-rw-r--r--innobase/btr/btr0btr.c11
-rw-r--r--innobase/dict/dict0dict.c7
-rw-r--r--innobase/os/os0file.c7
-rw-r--r--isam/_search.c2
-rw-r--r--isam/open.c3
-rw-r--r--isam/test_all.res371
-rw-r--r--libmysql/Makefile.am2
-rw-r--r--libmysql/Makefile.shared3
-rw-r--r--libmysql/dll.c13
-rw-r--r--libmysql/errmsg.c36
-rw-r--r--libmysql/libmysql.c7
-rw-r--r--myisam/ft_dump.c4
-rw-r--r--myisam/ft_nlq_search.c14
-rw-r--r--myisam/mi_check.c22
-rw-r--r--myisam/mi_create.c2
-rw-r--r--myisam/mi_dynrec.c14
-rw-r--r--myisam/mi_locking.c31
-rw-r--r--myisam/mi_open.c4
-rw-r--r--myisam/mi_packrec.c4
-rw-r--r--myisam/mi_search.c10
-rwxr-xr-xmyisam/mi_test_all.sh2
-rw-r--r--myisam/mi_write.c1
-rw-r--r--myisam/myisamchk.c41
-rw-r--r--myisam/myisamlog.c10
-rw-r--r--mysql-test/include/check_var_limit.inc9
-rw-r--r--mysql-test/include/have_openssl_2.inc4
-rw-r--r--mysql-test/mysql-test-run.sh14
-rw-r--r--mysql-test/r/check_var_limit.require2
-rw-r--r--mysql-test/r/func_test.result9
-rw-r--r--mysql-test/r/grant.result20
-rw-r--r--mysql-test/r/group_by.result11
-rw-r--r--mysql-test/r/have_openssl_2.require2
-rw-r--r--mysql-test/r/isam.result170
-rw-r--r--mysql-test/r/loaddata.result10
-rw-r--r--mysql-test/r/lowercase_table.result8
-rw-r--r--mysql-test/r/mix_innodb_myisam_binlog.result180
-rw-r--r--mysql-test/r/multi_update.result9
-rw-r--r--mysql-test/r/myisam.result5
-rw-r--r--mysql-test/r/openssl_1.result4
-rw-r--r--mysql-test/r/packet.result12
-rw-r--r--mysql-test/r/query_cache.result535
-rw-r--r--mysql-test/r/query_cache_merge.result20
-rw-r--r--mysql-test/r/range.result28
-rw-r--r--mysql-test/r/rpl_loaddata.result4
-rw-r--r--mysql-test/r/rpl_loaddata_rule_m.result14
-rw-r--r--mysql-test/r/rpl_loaddata_rule_s.result14
-rw-r--r--mysql-test/r/select_safe.result4
-rw-r--r--mysql-test/r/show_check.result6
-rw-r--r--mysql-test/r/symlink.result4
-rw-r--r--mysql-test/r/union.result125
-rw-r--r--mysql-test/std_data/loaddata2.dat5
-rw-r--r--mysql-test/t/func_test.test13
-rw-r--r--mysql-test/t/grant.test10
-rw-r--r--mysql-test/t/group_by.test2
-rw-r--r--mysql-test/t/isam.test191
-rw-r--r--mysql-test/t/loaddata.test5
-rw-r--r--mysql-test/t/lowercase_table.test4
-rw-r--r--mysql-test/t/mix_innodb_myisam_binlog.test175
-rw-r--r--mysql-test/t/multi_update.test7
-rw-r--r--mysql-test/t/myisam.test6
-rw-r--r--mysql-test/t/openssl_1.test4
-rw-r--r--mysql-test/t/openssl_2.test5
-rw-r--r--mysql-test/t/packet.test6
-rw-r--r--mysql-test/t/query_cache.test530
-rw-r--r--mysql-test/t/query_cache_merge.test38
-rw-r--r--mysql-test/t/range.test17
-rw-r--r--mysql-test/t/rpl_loaddata.test15
-rw-r--r--mysql-test/t/rpl_loaddata_rule_m-master.opt1
-rw-r--r--mysql-test/t/rpl_loaddata_rule_m.test18
-rw-r--r--mysql-test/t/rpl_loaddata_rule_s-slave.opt1
-rw-r--r--mysql-test/t/rpl_loaddata_rule_s.test20
-rw-r--r--mysql-test/t/rpl_log-slave.opt1
-rw-r--r--mysql-test/t/rpl_log.test17
-rw-r--r--mysql-test/t/select_safe.test4
-rw-r--r--mysql-test/t/show_check.test7
-rw-r--r--mysql-test/t/symlink.test2
-rw-r--r--mysql-test/t/union.test54
-rw-r--r--mysys/default.c148
-rw-r--r--mysys/mf_iocache.c14
-rw-r--r--mysys/my_chsize.c109
-rw-r--r--mysys/my_getopt.c3
-rw-r--r--mysys/my_pthread.c14
-rw-r--r--scripts/make_binary_distribution.sh19
-rwxr-xr-xscripts/make_win_src_distribution.sh178
-rw-r--r--scripts/mysql_install_db.sh9
-rw-r--r--scripts/mysqld_safe.sh2
-rw-r--r--sql-bench/limits/mysql.cfg100
-rw-r--r--sql/field.cc18
-rw-r--r--sql/ha_innodb.cc1
-rw-r--r--sql/ha_myisam.cc2
-rw-r--r--sql/handler.cc86
-rw-r--r--sql/item.cc7
-rw-r--r--sql/item.h1
-rw-r--r--sql/item_cmpfunc.cc24
-rw-r--r--sql/item_func.cc8
-rw-r--r--sql/item_func.h1
-rw-r--r--sql/item_sum.cc75
-rw-r--r--sql/item_sum.h34
-rw-r--r--sql/item_uniq.h2
-rw-r--r--sql/log.cc57
-rw-r--r--sql/log_event.cc225
-rw-r--r--sql/log_event.h27
-rw-r--r--sql/mysql_priv.h32
-rw-r--r--sql/mysqld.cc32
-rw-r--r--sql/net_serv.cc30
-rw-r--r--sql/opt_range.cc89
-rw-r--r--sql/repl_failsafe.cc15
-rw-r--r--sql/set_var.cc36
-rw-r--r--sql/share/portuguese/errmsg.txt24
-rw-r--r--sql/share/spanish/errmsg.txt34
-rw-r--r--sql/slave.cc70
-rw-r--r--sql/slave.h28
-rw-r--r--sql/sql_acl.cc21
-rw-r--r--sql/sql_class.cc1
-rw-r--r--sql/sql_class.h7
-rw-r--r--sql/sql_insert.cc6
-rw-r--r--sql/sql_load.cc13
-rw-r--r--sql/sql_parse.cc19
-rw-r--r--sql/sql_repl.cc16
-rw-r--r--sql/sql_select.cc79
-rw-r--r--sql/sql_show.cc175
-rw-r--r--sql/sql_table.cc3
-rw-r--r--sql/sql_union.cc37
-rw-r--r--sql/sql_update.cc6
-rw-r--r--strings/ctype-tis620.c14
-rw-r--r--support-files/MacOSX/Makefile.am6
-rwxr-xr-xsupport-files/MacOSX/MySQL46
-rw-r--r--support-files/MacOSX/StartupItem.Description.plist15
-rw-r--r--support-files/MacOSX/StartupItem.Info.plist38
-rwxr-xr-xsupport-files/MacOSX/StartupItem.postinstall36
-rw-r--r--vio/Makefile.am2
-rw-r--r--vio/vio.c10
-rw-r--r--vio/vio_priv.h54
-rw-r--r--vio/viosocket.c30
-rw-r--r--vio/viossl.c89
-rw-r--r--vio/viosslfactories.c65
194 files changed, 3893 insertions, 3199 deletions
diff --git a/.bzrignore b/.bzrignore
index 35db3c5d5ba..6bb3aa5c0e0 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -305,12 +305,16 @@ libmysql/conf_to_src
libmysql/my_static.h
libmysql/mysys_priv.h
libmysql/net.c
+libmysql/vio_priv.h
libmysql_r/*.c
libmysql_r/acconfig.h
libmysql_r/conf_to_src
libmysql_r/my_static.h
libmysql_r/mysys_priv.h
+libmysql_r/vio_priv.h
libmysqld/backup_dir
+libmysqld/client.c
+libmysqld/client_settings.h
libmysqld/convert.cc
libmysqld/derror.cc
libmysqld/errmsg.c
@@ -355,6 +359,7 @@ libmysqld/item_sum.cc
libmysqld/item_timefunc.cc
libmysqld/item_uniq.cc
libmysqld/key.cc
+libmysqld/libmysql.c
libmysqld/lock.cc
libmysqld/log.cc
libmysqld/log_event.cc
@@ -366,6 +371,7 @@ libmysqld/net_serv.cc
libmysqld/opt_ft.cc
libmysqld/opt_range.cc
libmysqld/opt_sum.cc
+libmysqld/pack.c
libmysqld/password.c
libmysqld/procedure.cc
libmysqld/protocol.cc
@@ -622,7 +628,3 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
-libmysqld/client.c
-libmysqld/client_settings.h
-libmysqld/libmysql.c
-libmysqld/pack.c
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 299c12c1f4a..4b8d40474a4 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -20,6 +20,7 @@ bk@admin.bk
bk@mysql.r18.ru
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
+dlenev@build.mysql.com
dlenev@mysql.com
gluh@gluh.(none)
gluh@gluh.mysql.r18.ru
diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap
index 33eca958ae0..94446d9880f 100755
--- a/Build-tools/Bootstrap
+++ b/Build-tools/Bootstrap
@@ -10,6 +10,7 @@
# written by Lenz Grimmer <lenz@mysql.com>
#
+use Cwd;
use Getopt::Long;
Getopt::Long::Configure ("bundling");
@@ -26,18 +27,19 @@ else
# Some predefined settings
$build_command= "BUILD/compile-pentium-max";
-chomp ($LOGFILE= `pwd`);
-$LOGFILE.= "/Bootstrap.log";
-chomp ($opt_directory= `pwd`);
-$opt_docdir= $opt_directory . "/mysqldoc";
+$PWD= cwd();
+$LOGFILE= $PWD . "/Bootstrap.log";
+$opt_docdir= $PWD . "/mysqldoc";
$opt_build_command= undef;
$opt_changelog= undef;
$opt_delete= undef;
+$opt_directory= $PWD;
$opt_dry_run= undef;
$opt_export_only= undef;
$opt_help= $opt_verbose= 0;
$opt_log= undef;
$opt_mail= "";
+$opt_pull= undef;
$opt_revision= undef;
$opt_suffix= "";
$opt_test= undef;
@@ -58,6 +60,7 @@ GetOptions(
"help|h",
"log|l:s",
"mail|m=s",
+ "pull|p",
"revision|r=s",
"skip-check|s",
"skip-manual",
@@ -80,8 +83,7 @@ if (defined $opt_log)
}
else
{
- chomp ($LOGFILE= `pwd`);
- $LOGFILE.= "/" . $opt_log;
+ $LOGFILE= $PWD . "/" . $opt_log;
}
}
}
@@ -103,7 +105,7 @@ defined($REPO=$ARGV[0]) || print_help("Please enter the BK repository to be used
system ("bk help > /dev/null") == 0 or &abort("Cannot execute BitKeeper binary!");
system ("bk root $REPO > /dev/null 2>&1") == 0 or &abort("$REPO does not seem to be a valid BK repository!");
-if (($opt_directory ne ".") && (!-d $opt_directory && !$opt_dry_run))
+if (($opt_directory ne $PWD) && (!-d $opt_directory && !$opt_dry_run))
{
&abort("Could not find target directory \"$opt_directory\"!");
}
@@ -111,6 +113,23 @@ if (($opt_directory ne ".") && (!-d $opt_directory && !$opt_dry_run))
&logger("Logging to $LOGFILE") if (defined $opt_log);
#
+# Pull recent changes first
+#
+if ($opt_pull)
+{
+ &logger("Updating BK tree $REPO to latest ChangeSet first");
+ $command= "cd $REPO; bk pull; cd ..";
+ &run_command($command, "Could not update $REPO!");
+
+ unless ($opt_skip_manual)
+ {
+ &logger("Updating manual tree in $opt_docdir");
+ $command= "cd $opt_docdir; bk pull; cd ..";
+ &run_command($command, "Could not update $opt_docdir!");
+ }
+}
+
+#
# Use a temporary name until we know the version number
#
$target_dir= $opt_directory . "/mysql-" . $$ . "-" . time() . ".tmp";
@@ -253,7 +272,7 @@ if (defined $opt_changelog)
#
# Add the latest manual from the mysqldoc tree
#
-if (!$opt_skip_manual)
+unless ($opt_skip_manual)
{
$msg= "Adding manual.texi";
&logger($msg);
@@ -310,7 +329,7 @@ $command= "make dist";
if ($opt_win_dist)
{
&logger ("Creating Windows source package");
- $command= "./scripts/make_win_src_distibution";
+ $command= "./scripts/make_win_src_distribution --tar --zip";
&run_command($command, "make_win_src_distribution failed!");
}
@@ -378,6 +397,7 @@ Options:
include a log file snippet, if logging is enabled)
Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com
+-p, --pull Update the source BK trees before building
-r, --revision=<rev> Export the tree as of revision <rev>
(default is up to the latest revision)
-s, --skip-check Skip checking the distribution with "make distcheck"
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index 1e404f9c509..9f5ac657a0b 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -8,7 +8,7 @@ use Getopt::Long;
$opt_distribution=$opt_user=$opt_config_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
-$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=0;
+$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0;
GetOptions(
@@ -51,6 +51,7 @@ GetOptions(
"with-low-memory",
"with-other-libc=s",
"with-small-disk",
+ "without-embedded",
) || usage();
usage() if ($opt_help);
@@ -230,6 +231,7 @@ if ($opt_stage <= 1)
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
$opt_config_options.= " --with-raid" if ($opt_raid);
+ $opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
# Only enable InnoDB when requested (required to be able to
# build the "Classic" packages that do not include InnoDB)
@@ -551,6 +553,9 @@ non-standard location overriding default.
--with-small-disk
Clean up the build environment before testing the binary distribution
(to save disk space)
+
+--without-embedded
+Don't compile the embedded server.
EOF
exit 1;
}
diff --git a/Build-tools/Do-pkg b/Build-tools/Do-pkg
index e95d86c0f6e..4d0f120c6e3 100755
--- a/Build-tools/Do-pkg
+++ b/Build-tools/Do-pkg
@@ -1,7 +1,9 @@
#!/usr/bin/perl -w
#
# Do-pkg - convert a binary distribution into a Mac OS X PKG and put it
-# inside a Disk Image (.dmg)
+# inside a Disk Image (.dmg). Additionally, add a separate package,
+# including the required Startup Item to automatically start MySQL on
+# bootup.
#
# The script currently assumes the following environment (which should exist
# like that, if the Do-compile script was used to build the binary
@@ -17,14 +19,19 @@
# written by Lenz Grimmer <lenz@mysql.com>
#
+use Cwd;
+use File::Basename;
+use File::Copy;
use Getopt::Long;
Getopt::Long::Configure ("bundling");
+use Sys::Hostname;
$opt_dry_run= undef;
$opt_help= undef;
$opt_log= undef;
$opt_mail= "";
$opt_skip_dmg= undef;
+$opt_skip_si= undef;
$opt_suffix= undef;
$opt_verbose= undef;
$opt_version= undef;
@@ -35,13 +42,14 @@ GetOptions(
"log|l:s",
"mail|m=s",
"skip-dmg|skip-disk-image|s",
+ "skip-si|skip-startup-item",
"suffix=s",
"verbose|v",
"version=s",
) || &print_help;
# Include helper functions
-chomp($PWD= `pwd`);
+$PWD= cwd();
$LOGGER= "$PWD/logger.pm";
if (-f "$LOGGER")
{
@@ -54,7 +62,7 @@ else
$PM= "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker";
$TMP= $ENV{TMPDIR};
-$TMP eq "" ? $TMP= $TMP . "/PKGBUILD": $TMP= "/tmp/PKGBUILD";
+$TMP eq "" ? $TMP= $TMP . "/PKGBUILD.$$": $TMP= "/tmp/PKGBUILD.$$";
$PKGROOT= "$TMP/PMROOT";
$PKGDEST= "$TMP/PKG";
$RESOURCE_DIR= "$TMP/Resources";
@@ -62,8 +70,8 @@ $SUFFIX= $opt_suffix;
$VERSION= $opt_version;
($MAJOR, $MINOR, $RELEASE)= split(/\./, $VERSION);
$NAME= "mysql$SUFFIX-$VERSION";
-chomp($HOST= `hostname`);
-chomp($ID= `whoami`);
+$HOST= hostname();
+$ID= getpwuid($>);
$HOST=~ /^([^.-]*)/;
$HOST= $1;
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
@@ -73,6 +81,12 @@ $SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc.tar.gz>;
$INFO= <$SUPFILEDIR/Info.plist>;
$DESC= <$SUPFILEDIR/Description.plist>;
+$SI_INFO= <$SUPFILEDIR/StartupItem.Info.plist>;
+$SI_DESC= <$SUPFILEDIR/StartupItem.Description.plist>;
+$SI_PARAMS= <$SUPFILEDIR/StartupParameters.plist>;
+$SI_POST= <$SUPFILEDIR/StartupItem.postinstall>;
+$SI_NAME= "MySQLStartupItem";
+$SI_SCRIPT= <$SUPFILEDIR/MySQL>;
@RESOURCES= qw/ ReadMe.txt postinstall preinstall /;
@LICENSES= ("$SRCBASEDIR/COPYING","$SRCBASEDIR/MySQLEULA.txt");
@@ -99,7 +113,9 @@ if (defined $opt_log)
# Creating the UFS disk image requires root privileges
die("You must be root to run this script!") if ($ID ne "root" && !$opt_dry_run);
-foreach $file ($TAR, $INFO, $DESC)
+@files= ($TAR, $INFO, $DESC);
+@files= (@files, $SI_INFO, $SI_DESC, $SI_POST, $SI_SCRIPT) unless $opt_skip_si;
+foreach $file (@files)
{
&abort("Unable to find $file!") unless (-f "$file");
}
@@ -112,14 +128,22 @@ foreach $dir ($TMP, $PKGROOT, $PKGDEST, $RESOURCE_DIR)
{
if (!-d $dir)
{
- &run_command("mkdir $dir", "Could not make directory $dir!");
+ &logger("Creating directory $dir!");
+ unless($opt_dry_run)
+ {
+ mkdir($dir) or &abort("Could not make directory $dir!");
+ }
}
}
foreach $resfile (@RESOURCES)
{
- $command= "cp $SUPFILEDIR/$resfile $RESOURCE_DIR";
- &run_command($command, "Error while copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
+ &logger("Copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
+ unless($opt_dry_run)
+ {
+ copy("$SUPFILEDIR/$resfile", "$RESOURCE_DIR") or
+ &abort("Error while copying $SUPFILEDIR/$resfile to $RESOURCE_DIR");
+ }
}
# Search for license file
@@ -127,12 +151,17 @@ foreach $license (@LICENSES)
{
if (-f "$license")
{
- $command= "cp $license $RESOURCE_DIR/License.txt";
- &run_command($command, "Error while copying $license to $RESOURCE_DIR");
+ &logger("Copy $license to $RESOURCE_DIR/License.txt");
+ unless($opt_dry_run)
+ {
+ copy("$license", "$RESOURCE_DIR/License.txt") or
+ &abort("Error while copying $license to $RESOURCE_DIR");
+ }
}
}
-&abort("Could not find a license file!") unless (-f "$RESOURCE_DIR/License.txt");
+&abort("Could not find a license file!")
+unless (-f "$RESOURCE_DIR/License.txt");
# Extract the binary tarball and create the "mysql" symlink
&logger("Extracting $TAR to $PKGROOT");
@@ -145,10 +174,38 @@ foreach $license (@LICENSES)
# returning a non-zero value, even though the package was created correctly
&logger("Running PackageMaker");
$command= "$PM -build -p $PKGDEST/$NAME.pkg -f $PKGROOT -r $RESOURCE_DIR -i $INFO -d $DESC || true";
-&run_command($command, "Error while building package!");
+&run_command($command, "Error while building package $NAME.pkg!");
+
+#
+# Build the Startup Item PKG
+#
+unless ($opt_skip_si)
+{
+ &logger("Cleaning up $PKGROOT");
+ &run_command("rm -rf $PKGROOT/*", "Unable to clean up $PKGROOT!");
+ &logger("Cleaning up $RESOURCE_DIR");
+ &run_command("rm -rf $RESOURCE_DIR/*", "Unable to clean up $RESOURCE_DIR!");
+
+ &logger("Installing MySQL StartupItem files into $PKGROOT/MySQL");
+ unless($opt_dry_run)
+ {
+ mkdir("$PKGROOT/MySQL") or &abort("Error creating $PKGROOT/MySQL");
+ copy("$SI_SCRIPT", "$PKGROOT/MySQL/")
+ or &abort("Error copying $SI_SCRIPT!");
+ chmod(0755, "$PKGROOT/MySQL/" . basename("$SI_SCRIPT"));
+ copy("$SI_PARAMS", "$PKGROOT/MySQL/")
+ or &abort("Error copying $SI_PARAMS!");
+ chmod(0644, "$PKGROOT/MySQL/" . basename("$SI_PARAMS"));
+ &run_command("chown -R root.wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
+ copy("$SI_POST", "$RESOURCE_DIR/postinstall")
+ or &abort("Error copying $SI_POST!");
+ chmod(0644, "$RESOURCE_DIR/postinstall");
+ }
-&logger("Removing $PKGROOT");
-&run_command("rm -rf $PKGROOT", "Unable to remove $PKGROOT!");
+ &logger("Building $SI_NAME.pkg using PackageMaker");
+ $command= "$PM -build -p $PKGDEST/$SI_NAME.pkg -f $PKGROOT -r $RESOURCE_DIR -i $SI_INFO -d $SI_DESC || true";
+ &run_command($command, "Error while building package $SI_NAME.pkg!");
+}
if ($opt_skip_dmg)
{
@@ -159,7 +216,7 @@ if ($opt_skip_dmg)
# Determine the size of the Disk image to be created and add a 5% safety
# margin for filesystem overhead
&logger("Determining required disk image size for $PKGDEST");
-if (! $opt_dry_run)
+unless($opt_dry_run)
{
chomp($_= `du -sk $PKGDEST`);
@size= split();
@@ -167,7 +224,10 @@ if (! $opt_dry_run)
&logger("Disk image size: $size KB");
}
-&abort("Zero bytes? Something is wrong here!") if ($size == 0);
+unless($opt_dry_run)
+{
+ &abort("Zero bytes? Something is wrong here!") if ($size == 0);
+}
# Now create and mount the disk image
$TMPNAME= $NAME . ".tmp";
@@ -181,7 +241,7 @@ $command= "hdiutil create $TMPNAME -size ${size}k -ov -fs UFS -volname $NAME";
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f3 -d" "`) if (!$opt_dry_run);
&logger("Copying $PKGDEST/$NAME.pkg to Disk image /Volumes/$NAME");
&run_command("ditto $PKGDEST /Volumes/$NAME", "Could not copy $PKGDEST to /Volumes/$NAME!");
-&run_command("ditto $RESOURCE_DIR/ReadMe.txt /Volumes/$NAME", "Could not copy $RESOURCE_DIR/ReadMe.txt to /Volumes/$NAME!");
+&run_command("ditto $SUPFILEDIR/ReadMe.txt /Volumes/$NAME", "Could not copy $SPFILEDIR/ReadMe.txt to /Volumes/$NAME!");
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f1 -d" "`) if (!$opt_dry_run);
&abort("/Volumes/$NAME not attached!") if (!$mountpoint && !$opt_dry_run);
&logger("Unmounting $mountpoint");
@@ -221,20 +281,23 @@ NOTE: You need to run this script with root privileges (required
Options:
- --dry-run Dry run without executing
--h, --help Print this help
--l, --log[=<filename>] Write a log file [to <filename>]
- (default is "$LOGFILE")
--m, --mail=<address> Mail a failure report to the given address
- (and include a log file snippet, if logging
- is enabled)
- Note that the \@-Sign needs to be quoted!
- Example: --mail=user\\\@domain.com
--s, --skip-disk-image Just build the PKG, don't put it into a
- disk image afterwards
- --suffix=<suffix> The package suffix (e.g. "-standard" or "-pro)
- --version=<version> The MySQL version number (e.g. 4.0.11-gamma)
--v, --verbose Verbose execution
+ --dry-run Dry run without executing
+-h, --help Print this help
+-l, --log[=<filename>] Write a log file [to <filename>]
+ (default is "$LOGFILE")
+-m, --mail=<address> Mail a failure report to the given
+ address (and include a log file snippet,
+ if logging is enabled)
+ Note that the \@-Sign needs to be quoted!
+ Example: --mail=user\\\@domain.com
+-s, --skip-disk-image, --skip-dmg Just build the PKGs, don't put it into a
+ disk image afterwards
+ --skip-startup-item, --skip-si Skip the creation of the StartupItem PKG
+ --suffix=<suffix> The package suffix
+ (e.g. "-standard" or "-pro)
+ --version=<version> The MySQL version number
+ (e.g. 4.0.11-gamma)
+-v, --verbose Verbose execution
EOF
exit 1;
diff --git a/Build-tools/Do-rpm b/Build-tools/Do-rpm
index 6d107bc2413..0f423feb921 100755
--- a/Build-tools/Do-rpm
+++ b/Build-tools/Do-rpm
@@ -1,259 +1,227 @@
-#!/bin/bash
-
-#helper functions
-
-function copy_to_bmachine
+#!/usr/bin/perl -w
+#
+# Do-rpm - compile RPM packages out of a source tarball and move the
+# resulting RPM packages into the current directory.
+#
+# The script currently assumes the following environment (which should exist
+# like that, if the Do-compile script was used to build the binary
+# distribution)
+#
+# - there must be a source distribution (mysql-<version>.tar.gz)
+# in the current directory
+# - there must be a spec file (mysql-<version>.spec) in the directory
+# $HOME/<hostname>/mysql-<version>/support-files/
+#
+# Use the "--help" option for more info!
+#
+# written by Lenz Grimmer <lenz@mysql.com>
+#
+
+use Cwd;
+use File::Basename;
+use File::Copy;
+use Getopt::Long;
+Getopt::Long::Configure ("bundling");
+use Sys::Hostname;
+
+$opt_cc= undef;
+$opt_cflags= undef;
+$opt_clean= undef;
+$opt_cxx= undef;
+$opt_cxxflags= undef;
+$opt_dry_run= undef;
+$opt_help= undef;
+$opt_log= undef;
+$opt_mail= "";
+$opt_verbose= undef;
+
+$MAJOR= $MINOR= $RELEASE= 0;
+
+GetOptions(
+ "cc=s",
+ "cflags=s",
+ "clean|c",
+ "cxx=s",
+ "cxxflags=s",
+ "dry-run|t",
+ "help|h",
+ "log|l:s",
+ "mail|m=s",
+ "verbose|v",
+) || &print_help;
+
+defined($VERSION=$ARGV[0]) || print_help("Please provide the MySQL version!");
+
+# Include helper functions
+$PWD= cwd();
+$LOGGER= "$PWD/logger.pm";
+if (-f "$LOGGER")
{
- if [ x$local_build = x1 ]; then
- rm -f $2
- cp $1 $2
- else
- scp $1 $owner@$bmachine:$2
- fi
+ do "$LOGGER";
}
-
-function copy_from_bmachine
+else
{
- if [ x$local_build = x1 ]; then
- rm -f $2
- cp $1 $2
- else
- scp $owner@$bmachine:$1 $2
- fi
+ die "ERROR: $LOGGER cannot be found!\n";
}
-function run_command
+#
+# Override predefined Log file name
+#
+if (defined $opt_log)
{
- if [ x$local_build = x1 ]; then
- bash $1
- else
- cat $1 | ssh $owner@$bmachine bash
- fi
+ if ($opt_log ne "")
+ {
+ if ($opt_log =~ /^\/.*/)
+ {
+ $LOGFILE= $opt_log;
+ }
+ else
+ {
+ $LOGFILE= $PWD . "/" . $opt_log;
+ }
+ }
}
-#Supply defaults
-
-# We built on one of two machines
-bmachine=work
-smachine=work
-owner=my
-
-# Hard path!!
-bpath=`/bin/pwd`
-
-for d in /usr/src/redhat /usr/src/packages ; do
-if test -d "$d"
-then
- rpmdir=$d
-fi
-done
-
-if test -z "$rpmdir"
-then
- echo "Could not find suitable rpmdir on this system"
- exit 1
-fi
-
-
-logdir="$bpath/Logs"
-
-###### Perl STUFF #####
-
-# Perl version numbers. Should be autodetected from the files in the
-# Perl-mysql-modules/ directory.
-DBI_VERSION="1.14"
-DATA_SHOWTABLE_VERSION="3.3"
-DBD_MYSQL_VERSION="1.2215"
-MAKERPM="$rpmdir/SOURCES/makerpm.pl"
-
-#######################
-AM_MAKEFLAGS="-j 2"
-
-VER=`grep "AM_INIT_AUTOMAKE(mysql, " $bpath/configure.in | \
- sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;'`
-VER_NO_DASH=`echo $VER | sed -e "s|-.*$||"`
-tarball=$bpath/mysql-$VER.tar.gz
-
-while test $# -gt 0; do
- case "$1" in
- --rpmdir=*)
- rpmdir=`echo $1 | sed -e "s;--rpmdir=;;"`
- ;;
- --smachine=*)
- smachine=`echo $1 | sed -e "s;--smachine=;;"`
- ;;
- --bmachine=*)
- bmachine=`echo $1 | sed -e "s;--bmachine=;;"`
- ;;
- --owner=*)
- owner=`echo $1 | sed -e "s;--owner=;;"`
- ;;
- --tarball=*)
- tarball=`echo $1 | sed -e "s;--tarball=;;"`
- ;;
- --logdir=*)
- logdir=`echo $1 | sed -e "s;--logdir=;;"`
- ;;
- --local )
- local_build=1
- ;;
- --skip-perl )
- skip_perl=1
- ;;
- * ) break ;;
- esac
- shift
-done
-
-echo "Removing old MySQL packages"
-rm -f $bpath/NEW-RPMS/MySQL-*rpm
-
-if [ ! -d "$logdir" ]; then
- echo "$logdir does not exist, creating"
- mkdir -p $logdir
-fi
-
-if [ ! -f "$tarball" ]; then
- echo "Tarball file $tarball does not exist, please make one first"
- exit 1
-fi
-
-log=$logdir/Log-RPM-`date +%y%m%d-%H%M`
-
-echo "Building RPM for MySQL version $VER on $bmachine"
-echo "Details in $log"
-
-(
-set -x
-# remove old stuff
-rm -rf $rpmdir/BUILD/mysql-*
-rm -f $rpmdir/SOURCES/mysql-*
-rm -f $rpmdir/SRPMS/MySQL-*
-rm -f $rpmdir/SPECS/mysql-*
-rm -rf /var/tmp/mysql
-
-# Copy MySQL source and spec files
-
-#Sasha: I left the scp stuff commented out instead of deleted to make it
-#easy to revert in a hurry, if there is a need. Once everything is tested
-#and works perfectly, the scp stuff should be deleted to avoid confusion
-
-#scp $bpath/mysql-$VER.tar.gz $owner@$bmachine:$rpmdir/SOURCES
-copy_to_bmachine $tarball $rpmdir/SOURCES
-#scp $bpath/Docs/Images/mysql-logo.gif $owner@$bmachine:$rpmdir/SOURCES/mysql.gif
-copy_to_bmachine $bpath/Docs/Images/mysql-logo.gif $rpmdir/SOURCES/mysql.gif
-#scp $bpath/support-files/mysql-$VER.spec $owner@$bmachine:$rpmdir/SPECS
-copy_to_bmachine $bpath/support-files/mysql-$VER.spec $rpmdir/SPECS
-
-# Copy perl things. Has to be uncompressed since Compress.pm is not
-# installed yet. Set CEXT to .gz when we support compression.
-CEXT=
-#scp $bpath/Perl-mysql-modules/To-SOURCES/* $owner@$bmachine:$rpmdir/SOURCES
-
-# This had to be installed on the target machince!
-# http://www.perl.com/CPAN/modules/by-module/Archive/Archive-Tar-0.21.tar.gz
-# cd /usr/lib/perl5/site_perl/5.005; ln -s ../* .; rm -f 5.005
-
-TMP_SCRIPT_MYSQL=00-temp-for-do-rpm.$$
-cat > $logdir/$TMP_SCRIPT_MYSQL <<END
-set -x
-
-# Check environment
-#export MYSQL_BUILD_PATH="/usr/local/bin:/my/gnu/bin:/usr/bin:/bin"
-#export MYSQL_BUILD_CFLAGS="-O6 -fno-omit-frame-pointer -mcpu=pentiumpro"
-#export MYSQL_BUILD_CXXFLAGS="-O6 -fno-omit-frame-pointer \
-# -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro"
-export MYSQL_BUILD_PATH="/usr/bin:/bin"
-export MYSQL_BUILD_CFLAGS="-O6 -fno-omit-frame-pointer -mpentium"
-export MYSQL_BUILD_CXXFLAGS="-O6 -fno-omit-frame-pointer \
- -felide-constructors -fno-exceptions -fno-rtti -mpentium"
-gcc -v
-
-# Make RPM
-rpm -ba $rpmdir/SPECS/mysql-$VER.spec
-rm -f /tmp/$TMP_SCRIPT_MYSQL
-END
+($MAJOR, $MINOR, $RELEASE)= split(/\./, $VERSION);
+$HOST= hostname();
+$HOST=~ /^([^.-]*)/;
+$HOST= $1;
+$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log";
-if [ ! x$skip_perl=x1 ]; then
+&print_help("") if ($opt_help);
- TMP_SCRIPT_PERL=00-temp-for-perl-rpm.$$
- cat > $logdir/$TMP_SCRIPT_PERL <<END
- set -x
-
- # First clean up so we do not get old versions when wildcard matching
- rm -f $rpmdir/SOURCES/DBI-*.spec $rpmdir/SOURCES/mysql*
- rm -f $rpmdir/RPMS/i386/Perl-*.rpm
- rm -f $rpmdir/SRPMS/Perl-*.rpm
- rm -f $rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm
- rm -f $rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm
-
- chmod a+x ${MAKERPM}
- rm
-
- ${MAKERPM} --verbose --package-name=DBI --package-version ${DBI_VERSION} \
- --specs --source=DBI-${DBI_VERSION}.tar$CEXT
-
- rpm -ba $rpmdir/SPECS/DBI-${DBI_VERSION}.spec
-
- ${MAKERPM} --verbose --package-name=Data-ShowTable \
- --package-version ${DATA_SHOWTABLE_VERSION} \
- --specs --source=Data-ShowTable-${DATA_SHOWTABLE_VERSION}.tar$CEXT
-
- rpm -ba $rpmdir/SPECS/Data-ShowTable-${DATA_SHOWTABLE_VERSION}.spec
-
- for v in ${DBD_MYSQL_VERSION}; do
- ${MAKERPM}
- --specs \
- --source=Msql-Mysql-modules-$v.tar$CEXT \
- --setup-dir=Msql-Mysql-modules-$v \
- --package-name=DBD-mysql \
- --package-version=$v \
- --makemakeropts='--noprompt --mysql-install --mysql-install-nodbd \
- --nomsql-install --nomsql1-install' \
- --require=perl-Data-ShowTable --require=perl-DBI
- rpm -ba $rpmdir/SPECS/DBD-mysql-$v.spec
- done
-
- for srcrpm in $rpmdir/SRPMS/perl-*.src.rpm
- do
- rpm --rebuild $srcrpm
- done
-
- rm -f /tmp/$TMP_SCRIPT_PERL
-END
-fi
-
- # scp $bpath/Logs/$TMP_SCRIPT_MYSQL $owner@$bmachine:/tmp/$TMP_SCRIPT_MYSQL
-
-# ssh $bmachine -l $owner bash $bpath/Logs/$TMP_SCRIPT_MYSQL
-
-cmd=$logdir/$TMP_SCRIPT_MYSQL
-run_command $cmd
+#
+# Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
+#
+if (-x "/usr/bin/rpmbuild")
+{
+ $RPM= "/usr/bin/rpmbuild";
+}
+else
+{
+ $RPM= "/bin/rpm";
+}
-if [ $? != 0 ]; then
- echo "$cmd failed, perhaps the following will help figure out why:"
- tail $log
-fi
+if ($RPM)
+{
+ &logger("Found rpm binary: $RPM");
+}
+else
+{
+ &abort("Unable to find RPM binary!");
+}
-if [ x$local_build != x1 ]; then
+#
+# determine some RPM settings for this host
+#
+chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`);
+chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`);
+chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
+chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`);
+chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`);
- # Build perl RPM (we currently need to be root to do this and that is
- # not possible)
+$SOURCEFILE= "mysql-$VERSION.tar.gz";
+$SPECFILE= "$PWD/$HOST/mysql-$VERSION/support-files/mysql-$VERSION.spec";
- #scp $bpath/Logs/$TMP_SCRIPT_PERL $owner@$bmachine:/tmp/$TMP_SCRIPT_PERL
- #ssh $bmachine -l root bash /tmp/$TMP_SCRIPT_PERL
+&logger("Starting RPM build of MySQL-$VERSION on $HOST");
- # Copy RPMs back to the source dir. We must do this here since the
- # $bmachine may not have permission to access $smachine.
- scp $owner@$bmachine:$rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
- scp $owner@$bmachine:$rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
+foreach $file ($SOURCEFILE, $SPECFILE)
+{
+ &abort("Unable to find $file!") unless (-f "$file");
+}
- # And the perl ones
- #scp $owner@$bmachine:$rpmdir/RPMS/i386/Perl*-*.rpm $bpath/NEW-RPMS
- #scp $owner@$bmachine:$rpmdir/SRPMS/Perl*-*.rpm $bpath/NEW-RPMS
+#
+# Install source and spec file
+#
+&logger("Copying SOURCE and SPEC file to build directories.");
+copy($SOURCEFILE, $SOURCEDIR)
+or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!");
+copy($SPECFILE, $SPECDIR)
+or &abort("Unable to copy $SPECFILE to $SPECDIR!");
+
+#
+# Set environment variables - these are being used in the
+# official MySQL RPM spec file
+#
+&logger("Setting special build environment variables")
+if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx);
+$ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc);
+$ENV{MYSQL_BUILD_CFLAGS}=$opt_cflags if ($opt_cflags);
+$ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags);
+$ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
+
+#
+# Build the RPMs
+#
+$command= "$RPM";
+$command.= " -v" if ($opt_verbose);
+$command.= " -ba";
+$command.= " --clean" if $opt_clean;
+$command.= " $SPECDIR/";
+$command.= basename($SPECFILE);
+&logger("Building RPM.");
+&run_command($command, "Error while building the RPMs!");
+
+#
+# Move the resulting RPMs into the pwd
+#
+$command= "mv";
+$command.= " -v " if ($opt_verbose);
+$command.= "$SRCRPMDIR/MySQL*$VERSION*.src.rpm $PWD";
+&run_command($command, "Error moving source RPM!");
+
+$command= "mv";
+$command.= " -v " if ($opt_verbose);
+$command.= "$RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD";
+&run_command($command, "Error moving binary RPMs!");
+
+#
+# Clean up
+#
+if ($opt_clean)
+{
+ &logger("Removing spec file and source package");
+ unlink("$SPECDIR/" . basename($SPECFILE));
+ unlink("$SOURCEDIR/$SOURCEFILE");
+}
- #Remove some of the files that can interfere with future builds
+&logger("SUCCESS: RPM files successfully created.") if (!$opt_dry_run);
+exit 0;
- rm -rf /var/tmp/mysql
-fi
-) > $log 2>&1
+sub print_help
+{
+ my $message= $_[0];
+ if ($message ne "")
+ {
+ print "\n";
+ print "ERROR: $message\n\n}";
+ }
+ print <<EOF;
+
+Usage: Do-rpm <options> <version>
+
+Creates a binary RPM package out of a MySQL source distribution and moves the
+resulting RPMs into the current directory. <version> is the MySQL version
+number (e.g. 4.0.11-gamma)
+
+Options:
+
+ --cc=<compiler> Use <compiler> to compile C code
+ --ccflags=<flags> Use special C compiler flags
+ --cxx=<compiler> Use <compiler> to compile C++ code
+ --cxxflags=<flags> Use special C++ compiler flags
+-c, --clean Clean up after the build
+-t, --dry-run Dry run without executing
+-h, --help Print this help
+-l, --log[=<filename>] Write a log file [to <filename>]
+ (default is "$LOGFILE")
+-m, --mail=<address> Mail a failure report to the given address
+ (and include a log file snippet, if logging
+ is enabled)
+ Note that the \@-Sign needs to be quoted!
+ Example: --mail=user\\\@domain.com
+-v, --verbose Verbose execution
+
+EOF
+ exit 1;
+}
diff --git a/SSL/cacert.pem b/SSL/cacert.pem
index 698784b49f9..b939a037c30 100644
--- a/SSL/cacert.pem
+++ b/SSL/cacert.pem
@@ -1,20 +1,21 @@
-----BEGIN CERTIFICATE-----
-MIIDQjCCAqugAwIBAgIBADANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJSVTET
-MBEGA1UECBMKU29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoT
-CE15U1FMIEFCMQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1
-c0BteXNxbC5jb20wHhcNMDIwODAyMjE1NTUzWhcNMDMwODAyMjE1NTUzWjB6MQsw
-CQYDVQQGEwJSVTETMBEGA1UECBMKU29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1
-cmcxETAPBgNVBAoTCE15U1FMIEFCMQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG
-9w0BCQEWEHdhbHJ1c0BteXNxbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
-AoGBALFLPDNDeq213XvhBP3TxhC0NcGKJ/sWzaHkNmunQ8sTbV8AfdFafvP7cSHk
-O3jh7smpVWnxmcIbq1dpsbb7X5vQVc8ru07Z8VhCJWx6H8kgI95Am6wbm2ho2Lok
-9ODG8f/lA4kLv8Vo0hqtfV5T1mnZpSzkh6G4b0yPzHu8gtObAgMBAAGjgdcwgdQw
-HQYDVR0OBBYEFNnYan2rzhBiGhb86Wr03PFmrNC5MIGkBgNVHSMEgZwwgZmAFNnY
-an2rzhBiGhb86Wr03PFmrNC5oX6kfDB6MQswCQYDVQQGEwJSVTETMBEGA1UECBMK
-U29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoTCE15U1FMIEFC
-MQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1c0BteXNxbC5j
-b22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQADeMZEA5Rh4PDq
-DmS9cYyogjb9gkuLHeo/pqfU8iSZVsSaf6Uqh6TWKQOuK3I4R1K8iMo4cW6LhxxH
-HLFrVIQn6xhLvfC0T6Zl7G0w6rAY2+QlbEhjnsgHtLGrB5xjSYLq6Uz3gAMbEsA4
-rCpQJECDe2PzoUXZj9mE2sdljiGcvQ==
+MIIDcTCCAtqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCU0Ux
+EDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMSEwHwYDVQQDExhB
+YnN0cmFjdCBNeVNRTCBEZXZlbG9wZXIxMTAvBgkqhkiG9w0BCQEWImFic3RyYWN0
+Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wHhcNMDMwODA3MTEyMTQwWhcNMDMw
+OTA2MTEyMTQwWjCBiDELMAkGA1UEBhMCU0UxEDAOBgNVBAcTB1VwcHNhbGExETAP
+BgNVBAoTCE15U1FMIEFCMSEwHwYDVQQDExhBYnN0cmFjdCBNeVNRTCBEZXZlbG9w
+ZXIxMTAvBgkqhkiG9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNx
+bC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALgbnH12rP8XEJsRuy69
+9n412tEOucpQyxkpNiDgLRvlYEGIJutK2LAqPHoPg7Em2+WJ+vrFh/BVx4hOUHmk
+tJ94qTHLLCCj07cjzcoADjzPT9254VqSuQy/JvDNamKEOEdXU8l4/bc26VKVZ99x
+iqXbHLiIWNa+UUwyRDSkERepAgMBAAGjgegwgeUwHQYDVR0OBBYEFJVKQT7xXBK0
+ez6fOwwjZpA9f07YMIG1BgNVHSMEga0wgaqAFJVKQT7xXBK0ez6fOwwjZpA9f07Y
+oYGOpIGLMIGIMQswCQYDVQQGEwJTRTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UE
+ChMITXlTUUwgQUIxITAfBgNVBAMTGEFic3RyYWN0IE15U1FMIERldmVsb3BlcjEx
+MC8GCSqGSIb3DQEJARYiYWJzdHJhY3QubXlzcWwuZGV2ZWxvcGVyQG15c3FsLmNv
+bYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAJFucCIj0wREcF9P
+vOaKVbvcaBwgit6oXOf7ZOPcIUQxQJOnXLVkWIdMP2mP/zHAUsCmXT2k8aXWRegB
+6kh/PjV/vSYFbGtE/vh/12x/nSIUU+Y9B1EwvoeskuOwu34Ih514Y1z1bPMNt18N
+4LGzMEBeklJ3gxBPlRXER9BSUpRH
-----END CERTIFICATE-----
diff --git a/SSL/client-cert.pem b/SSL/client-cert.pem
index 729379babdc..54b173baae2 100644
--- a/SSL/client-cert.pem
+++ b/SSL/client-cert.pem
@@ -3,24 +3,24 @@ Certificate:
Version: 3 (0x2)
Serial Number: 2 (0x2)
Signature Algorithm: md5WithRSAEncryption
- Issuer: C=RU, ST=Some-State, L=Orenburg, O=MySQL AB, CN=Walrus/Email=walrus@mysql.com
+ Issuer: C=SE, L=Uppsala, O=MySQL AB, CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com
Validity
- Not Before: Aug 2 22:08:07 2002 GMT
- Not After : Aug 2 22:08:07 2003 GMT
- Subject: C=RU, L=orenburg, O=MySQL AB, OU=client, CN=walrus/Email=walrus@mysql.com
+ Not Before: Aug 7 11:41:56 2003 GMT
+ Not After : Aug 4 11:41:56 2013 GMT
+ Subject: C=SE, L=Uppsala, O=MySQL AB, CN=MySQL Client/Email=abstract.mysql.developer@mysql.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
- 00:ab:27:e4:1e:f0:34:8b:a9:50:df:0a:b0:55:20:
- b3:1f:0f:cf:f1:51:1e:66:48:a6:f8:4e:0d:d4:49:
- f4:ea:d3:41:6b:7e:06:78:3c:29:9d:8e:d3:33:4d:
- 0b:fc:34:4d:18:88:48:61:af:11:da:db:84:c0:92:
- 91:81:6a:b6:21:d5:8e:9b:f2:6f:d8:06:ad:d6:77:
- f6:8b:bd:07:d5:b7:fb:c6:f0:64:e6:3f:58:f0:6a:
- 1e:81:73:97:6d:9d:c6:ec:b0:5e:1e:c6:57:82:b0:
- 98:9c:ae:26:84:43:0d:98:6c:b4:d8:52:13:70:15:
- 79:61:40:84:19:ea:f6:63:3f
+ 00:c4:03:0a:ee:e3:b1:12:fc:ee:b4:19:f4:e1:60:
+ 1d:e0:28:c3:96:2d:df:82:69:cd:74:7c:54:58:d0:
+ ae:b3:59:3f:0c:19:1c:99:10:a6:12:c9:cf:3a:64:
+ 05:43:8e:bf:d2:65:36:80:91:0b:65:b0:27:26:38:
+ c9:23:d8:36:a2:4a:f0:f7:c0:2f:68:38:70:01:27:
+ 29:ff:b2:c5:52:e1:6b:f1:c8:d7:c3:5c:ee:f0:37:
+ 6c:2a:9b:96:1a:05:9e:eb:33:a2:39:5a:77:66:62:
+ 27:75:1f:2f:6f:38:da:e5:9f:78:af:ca:6b:22:3f:
+ 57:2b:bc:a6:8f:47:d1:99:6f
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,39 +28,40 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- A6:D9:70:92:AC:2B:F6:48:A5:FB:29:CF:78:4A:57:B5:3B:43:97:EE
+ 80:81:A9:22:EB:AB:D6:CA:7E:3F:8D:BB:D1:AC:2A:F4:87:9D:13:29
X509v3 Authority Key Identifier:
- keyid:D9:D8:6A:7D:AB:CE:10:62:1A:16:FC:E9:6A:F4:DC:F1:66:AC:D0:B9
- DirName:/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com
+ keyid:95:4A:41:3E:F1:5C:12:B4:7B:3E:9F:3B:0C:23:66:90:3D:7F:4E:D8
+ DirName:/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com
serial:00
Signature Algorithm: md5WithRSAEncryption
- 15:96:43:10:89:e0:a6:82:a4:91:0f:7e:2e:d8:80:54:ba:63:
- e2:8f:b0:aa:ea:be:35:2c:8f:0d:03:a9:86:2e:32:51:33:8a:
- cc:b2:5e:b3:12:cb:b7:42:06:40:89:ce:92:87:40:f1:6a:79:
- 0c:3e:00:1d:06:bf:3c:c1:da:f6:3b:e1:42:e6:55:4c:31:e1:
- b9:79:f3:99:14:f6:68:9e:67:2b:e3:71:88:6b:2b:e2:08:bd:
- 67:79:ea:0e:7d:34:0d:41:22:3a:f4:8f:4d:51:07:6f:5a:44:
- 34:05:d1:b3:ca:cf:09:2b:43:25:a1:7f:ac:f4:54:f1:e3:93:
- 47:44
+ 6d:8a:af:34:07:ac:95:72:a4:78:fe:f8:b8:30:9a:e0:d9:74:
+ 82:34:5c:fd:11:15:dd:63:fd:65:20:04:7e:b5:8f:2e:26:ef:
+ ab:b9:10:5f:9b:40:65:76:ab:ed:bd:bf:d5:bc:89:7f:19:d8:
+ a7:b5:9e:24:bd:c7:ac:8e:16:35:83:c8:ce:8d:85:7c:b4:36:
+ 28:dd:3a:97:e5:b2:dd:8f:88:4d:5b:50:bd:97:28:61:8e:e7:
+ 05:5c:c2:bb:46:a1:ac:7e:ee:ac:7d:72:d5:a7:07:4e:1d:68:
+ 4e:80:e2:35:7d:db:24:73:be:bc:0d:ca:f4:ae:4e:21:52:3b:
+ ae:81
-----BEGIN CERTIFICATE-----
-MIIDajCCAtOgAwIBAgIBAjANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJSVTET
-MBEGA1UECBMKU29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoT
-CE15U1FMIEFCMQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1
-c0BteXNxbC5jb20wHhcNMDIwODAyMjIwODA3WhcNMDMwODAyMjIwODA3WjB2MQsw
-CQYDVQQGEwJSVTERMA8GA1UEBxMIb3JlbmJ1cmcxETAPBgNVBAoTCE15U1FMIEFC
-MQ8wDQYDVQQLEwZjbGllbnQxDzANBgNVBAMTBndhbHJ1czEfMB0GCSqGSIb3DQEJ
-ARYQd2FscnVzQG15c3FsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-qyfkHvA0i6lQ3wqwVSCzHw/P8VEeZkim+E4N1En06tNBa34GeDwpnY7TM00L/DRN
-GIhIYa8R2tuEwJKRgWq2IdWOm/Jv2Aat1nf2i70H1bf7xvBk5j9Y8GoegXOXbZ3G
-7LBeHsZXgrCYnK4mhEMNmGy02FITcBV5YUCEGer2Yz8CAwEAAaOCAQIwgf8wCQYD
-VR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlm
-aWNhdGUwHQYDVR0OBBYEFKbZcJKsK/ZIpfspz3hKV7U7Q5fuMIGkBgNVHSMEgZww
-gZmAFNnYan2rzhBiGhb86Wr03PFmrNC5oX6kfDB6MQswCQYDVQQGEwJSVTETMBEG
-A1UECBMKU29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoTCE15
-U1FMIEFCMQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1c0Bt
-eXNxbC5jb22CAQAwDQYJKoZIhvcNAQEEBQADgYEAFZZDEIngpoKkkQ9+LtiAVLpj
-4o+wquq+NSyPDQOphi4yUTOKzLJesxLLt0IGQInOkodA8Wp5DD4AHQa/PMHa9jvh
-QuZVTDHhuXnzmRT2aJ5nK+NxiGsr4gi9Z3nqDn00DUEiOvSPTVEHb1pENAXRs8rP
-CStDJaF/rPRU8eOTR0Q=
+MIIDkTCCAvqgAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCU0Ux
+EDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMSEwHwYDVQQDExhB
+YnN0cmFjdCBNeVNRTCBEZXZlbG9wZXIxMTAvBgkqhkiG9w0BCQEWImFic3RyYWN0
+Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wHhcNMDMwODA3MTE0MTU2WhcNMTMw
+ODA0MTE0MTU2WjB8MQswCQYDVQQGEwJTRTEQMA4GA1UEBxMHVXBwc2FsYTERMA8G
+A1UEChMITXlTUUwgQUIxFTATBgNVBAMTDE15U1FMIENsaWVudDExMC8GCSqGSIb3
+DQEJARYiYWJzdHJhY3QubXlzcWwuZGV2ZWxvcGVyQG15c3FsLmNvbTCBnzANBgkq
+hkiG9w0BAQEFAAOBjQAwgYkCgYEAxAMK7uOxEvzutBn04WAd4CjDli3fgmnNdHxU
+WNCus1k/DBkcmRCmEsnPOmQFQ46/0mU2gJELZbAnJjjJI9g2okrw98AvaDhwAScp
+/7LFUuFr8cjXw1zu8DdsKpuWGgWe6zOiOVp3ZmIndR8vbzja5Z94r8prIj9XK7ym
+j0fRmW8CAwEAAaOCARQwggEQMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9w
+ZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBSAgaki66vWyn4/
+jbvRrCr0h50TKTCBtQYDVR0jBIGtMIGqgBSVSkE+8VwStHs+nzsMI2aQPX9O2KGB
+jqSBizCBiDELMAkGA1UEBhMCU0UxEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoT
+CE15U1FMIEFCMSEwHwYDVQQDExhBYnN0cmFjdCBNeVNRTCBEZXZlbG9wZXIxMTAv
+BgkqhkiG9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb22C
+AQAwDQYJKoZIhvcNAQEEBQADgYEAbYqvNAeslXKkeP74uDCa4Nl0gjRc/REV3WP9
+ZSAEfrWPLibvq7kQX5tAZXar7b2/1byJfxnYp7WeJL3HrI4WNYPIzo2FfLQ2KN06
+l+Wy3Y+ITVtQvZcoYY7nBVzCu0ahrH7urH1y1acHTh1oToDiNX3bJHO+vA3K9K5O
+IVI7roE=
-----END CERTIFICATE-----
diff --git a/SSL/client-key.pem b/SSL/client-key.pem
index feff11bfdb7..58fa805e620 100644
--- a/SSL/client-key.pem
+++ b/SSL/client-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQCrJ+Qe8DSLqVDfCrBVILMfD8/xUR5mSKb4Tg3USfTq00FrfgZ4
-PCmdjtMzTQv8NE0YiEhhrxHa24TAkpGBarYh1Y6b8m/YBq3Wd/aLvQfVt/vG8GTm
-P1jwah6Bc5dtncbssF4exleCsJicriaEQw2YbLTYUhNwFXlhQIQZ6vZjPwIDAQAB
-AoGAChyxPaKzeAzo2kSnZmAoNQ2aG4fPY/um4cS6zHASKE2S7+biOvhS/RwTHlTP
-AHeWlnx2yk6tn2CY10fRkPPdDsnyj7FpuZmjhmFtprOn+1Mwft7gNTMdKN2EV46/
-hMQxm8/Wu9ejm6IhOeg3Q7lBFwE9tY0kgMzU4zDI3A0HDQECQQDUcxFgxIrOi4Gw
-EGxmJgopL+NjG7/4PdT2FM5z1bbwOtfsD1fHKWSiODbfpK8eMwBReI4wfDQ7ViND
-xmuDykFDAkEAzj3QH9s8Ej3Vgt88326OhY1W5jTH6M0XkuZ0YatELz3MvLwFhIF4
-puouLJQVo3pQBLV+Tmnh2LQqkii7xA7oVQJBALZxzvW0M6QmyAvEPuMGPema94KQ
-PS7ZIr7lpVpyqTTqw600i+Q8VvC8p9stmTmtANP2XN2kfFKMqaI1jvVRxvMCQDJE
-8sOxBjVUCQS7MPUs12RKDRJTbx6ZTtOphFiCDD6Pi6W9FoMzo5rbnaGT/qo4F+Tt
-7/lg6YGOeInjj9C76XkCQQC2m6j8NeX9E4Pimp1GDE93N2JJ+biJxLI8yFqruv7N
-B2M/28JKLGLjam6YVJy4eSA9clXVqwWNxii3fb8qQ7u6
+MIICXQIBAAKBgQDEAwru47ES/O60GfThYB3gKMOWLd+Cac10fFRY0K6zWT8MGRyZ
+EKYSyc86ZAVDjr/SZTaAkQtlsCcmOMkj2DaiSvD3wC9oOHABJyn/ssVS4WvxyNfD
+XO7wN2wqm5YaBZ7rM6I5WndmYid1Hy9vONrln3ivymsiP1crvKaPR9GZbwIDAQAB
+AoGAcR7IaoGhKbIrGGl6d67+zuT3q24h9aOV3Mn7653TlNHGnvbHGFcRYPpyy+H5
+X7m8XnHm+F+80hzNGzPecP9Q12oPOyoZgeQn6bTK73OFkNcX7FAkNdyH4xVhf2aK
+YOzTcQfq3gRCqXtVIg4qBShTMjJLE31R8H430Or62XmJgFECQQDjP+Kz+ecQwuTB
+HADLm+GQgceIB1kLgdQoZ3deUxGvqtVImuDRViSM0F2srfJ4GfkEDhc27UI5f6ir
+ZTOw4ww7AkEA3M9wCPgWNtbOXbYjaNA0IzHcjMDxQDVvJAmb3EiZlKQp4EfrESxR
+ly/u08TyfwrK6q5WS7xE0ad8+95G1af4XQJBAI9+3ME20SB1YItMCniHYwSj3oHX
+2fN5NKWax/Zoz+c0IV+qZMHq+kNso2oRoOUTyXk1CJWndcTnBnPMALr2c9cCQQCZ
+VL7Cq6uZVx6kemcqUHH0AprZbt3YLYLI7pc5p3xmeHzPzoEQQstBhjp8+aU+zPrN
+blRkcQ8E2x5yNA7SLLrNAkAhzkA+EK8hc0f9W3ncy+py0Rn0i5Ay0N3T715vkThf
+CfOHE3L91dLlmYpL5xVqOpugY/2sHyxwctv97DgS6tHZ
-----END RSA PRIVATE KEY-----
diff --git a/SSL/client-req.pem b/SSL/client-req.pem
index ef11a22165f..b3667fb5ec6 100644
--- a/SSL/client-req.pem
+++ b/SSL/client-req.pem
@@ -1,30 +1,12 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,8CE2AB38FB50D4B9
-
-rrnYZLUKlzV4U7+wqe5CWzTd4RLJb5h4M77aBRQfuHGejSaRsskN2ffpO8uQEAYM
-WTJSRC+NO+jDMBZhzt1ktWqCs8d6l6azHoBybIrMJsbUhwybm+OiOfp23RrbNoS/
-S4fsgNdAAGhsRvKDdsItCyYvdH8nTzn+g9r/z2V4tOOXd6MYuT42XA6Uz2tis2SZ
-GWEGa7mAweApzSiibE+pzjPS+fdX4E12n6NCVYLhn1JuvzVva/KFSebs4Wh75miC
-WvRgkt/5eDQn+vkV67hE3I6p9pPcLh1+PMfaQ25U8VM/r7ejnVFWm7teGH6GKPKJ
-cU+PYfblyWcgtiO/fwfGMIqSyNtHj/C3VFVie5D1MTJzBopiPGEcfz00LjBccjjh
-j1meTRVN8pMZTgkxlnIFwbU6TPPvx8a9urFVQIJ4z8r2EMvYh5Cqpq87+lH9Pn0C
-vzCl78Tz5QLghXNnMbbdD2aPP0PwPEXgh86iZxo06g85n0l26WUzYJlWzBYD4DrF
-SbnEUAftTujEOm6MqJNLpJN6UPOtq/HvSaHl1bykGK+zU4gqHj0ur03HlF0l4xNg
-OfsoNsJV+O9RUUJ0+D5eqUALJjN8TCV1wNMXOVzr/ue3QCVdlWVfZY4RPffwK9Yp
-Fh52T7a2v+shhqZUQNtFDAg50Ac7deUthSWNmi5N680POnJg9KdtBdMhYLa1j3rP
-D9oasSK0ugevHuQ6wUiD/95CzZlJXE9K4kTTYmaRk5MTWXhFQxdqHZo1v+pGtaNI
-f+/E7q7BiNesSt31U/vkX0Tm3oJ1dgOnS8M2uxiYiKH2mJ/E32tZKw==
------END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE REQUEST-----
-MIIB0jCCATsCAQAwgZExCzAJBgNVBAYTAkVFMRMwEQYDVQQIEwpTb21lLVN0YXRl
-MRAwDgYDVQQHEwdUYWxsaW5uMSYwJAYDVQQKEx1NeVNRTCBkZW1vIGNsaWVudCBj
-ZXJ0aWZpY2F0ZTEUMBIGA1UEAxMLVG9udSBTYW11ZWwxHTAbBgkqhkiG9w0BCQEW
-DnRvbnVAbXlzcWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo1FLN
-TruWFjrwiWuQTNvgMHVaAnJiv+3avgnogNuAVDDWde3jEKUVRFspkRL+DLd2Telf
-VlxFPK2ycS1qesu8BIAIdNZ99nxcdts1xPb12NSJn53MP04/c8E+QX5OCb/qGtmi
-Ew3RDNrY9Ju4VCEXrtezAmGHqQH/9P6cevxnQwIDAQABoAAwDQYJKoZIhvcNAQEE
-BQADgYEAvENK1JAQfC8xnrFGw2IxfUmUwlRidiRtYTgtVfTr7vA+m4WaaKioni6E
-PQXjcvl6kfyRoxc4qWsGi3T7QM2RnvCtbwR2NGSIKX1cBTS31RMr12NSAeXn6Twz
-ZwSZ55EHj9N2hArTPNlVjxvDQX3D6/ZBi6JnHAxXigzDqhArgjU=
+MIIBvDCCASUCAQAwfDELMAkGA1UEBhMCU0UxEDAOBgNVBAcTB1VwcHNhbGExETAP
+BgNVBAoTCE15U1FMIEFCMRUwEwYDVQQDEwxNeVNRTCBDbGllbnQxMTAvBgkqhkiG
+9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wgZ8wDQYJ
+KoZIhvcNAQEBBQADgY0AMIGJAoGBAMQDCu7jsRL87rQZ9OFgHeAow5Yt34JpzXR8
+VFjQrrNZPwwZHJkQphLJzzpkBUOOv9JlNoCRC2WwJyY4ySPYNqJK8PfAL2g4cAEn
+Kf+yxVLha/HI18Nc7vA3bCqblhoFnuszojlad2ZiJ3UfL2842uWfeK/KayI/Vyu8
+po9H0ZlvAgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQAnKdk68dGJXvlj/GXwBUWN
+oXWF7hq4fDmwyhmcFUqk8qZKPKFUxkcER0GLzYeUgvD2URSfaS3/YW0d7K7kXGwP
+rB5edb+suaYf6mjm/w37xw/EJI9rdSKcB/3SSu8mALds7sUHDAO+MO0WkA/9d7t0
+LOsUqcDvMkKpZuYwNILwLw==
-----END CERTIFICATE REQUEST-----
diff --git a/SSL/server-cert.pem b/SSL/server-cert.pem
index b15bd04a25c..9ce296482db 100644
--- a/SSL/server-cert.pem
+++ b/SSL/server-cert.pem
@@ -3,24 +3,24 @@ Certificate:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: md5WithRSAEncryption
- Issuer: C=RU, ST=Some-State, L=Orenburg, O=MySQL AB, CN=Walrus/Email=walrus@mysql.com
+ Issuer: C=SE, L=Uppsala, O=MySQL AB, CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com
Validity
- Not Before: Aug 2 21:59:26 2002 GMT
- Not After : Aug 2 21:59:26 2003 GMT
- Subject: C=RU, L=Orenburg, O=MySQL AB, CN=server/Email=walrus@mysql.com
+ Not Before: Aug 7 11:39:27 2003 GMT
+ Not After : Aug 4 11:39:27 2013 GMT
+ Subject: C=SE, L=Uppsala, O=MySQL AB, CN=MySQL Server/Email=abstract.mysql.developer@mysql.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
- 00:bd:7d:f1:91:51:38:fe:4b:79:b5:ff:e0:41:ae:
- 0e:a8:bb:7b:60:42:95:01:75:e7:22:74:55:7d:74:
- 4d:50:51:0c:5e:09:4b:2b:0c:8e:3f:9f:14:3f:5e:
- d9:25:36:9b:cc:77:35:30:e9:8c:bf:3b:bd:da:62:
- 85:4c:90:c8:de:71:2c:0a:7b:dc:e6:85:fd:b4:24:
- 88:a7:8f:03:3d:15:7c:59:3d:f8:73:f0:36:2a:b8:
- 80:7c:d8:c7:d6:1f:6d:b2:b7:b7:48:9f:24:56:81:
- 2c:2e:9c:b9:95:48:50:56:9f:1a:60:96:c4:c0:eb:
- 8d:2d:55:38:3f:6b:82:bc:b3
+ 00:e9:86:7a:55:84:88:4c:be:a4:f8:92:73:30:12:
+ 49:0b:7a:85:87:39:34:39:0d:7d:0b:8d:18:c2:17:
+ 95:13:52:d2:3f:55:10:57:c8:3f:5a:f5:b2:fa:8b:
+ d0:67:49:cc:aa:82:fc:9f:ce:00:b4:73:f3:36:d2:
+ 3a:d3:c2:b0:0e:14:c3:d4:b2:21:74:a1:f0:31:81:
+ 60:87:98:73:5c:10:c1:b1:1a:4d:f1:f3:b0:98:3f:
+ f0:d7:97:9b:2b:fd:d5:21:79:b2:2f:eb:64:15:c9:
+ 9b:9d:fc:9e:2d:d4:f8:04:5b:ea:a9:75:4b:42:c3:
+ 3d:0e:4d:2a:a8:b8:ca:99:8d
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,38 +28,40 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- C9:D0:D2:F7:17:79:27:1C:4B:C9:E7:92:D5:5E:8C:7E:F2:FE:A7:B7
+ 6E:E4:9B:6A:C5:EA:E4:E6:C7:EF:D7:1E:C8:63:45:60:2B:1B:D4:D4
X509v3 Authority Key Identifier:
- keyid:D9:D8:6A:7D:AB:CE:10:62:1A:16:FC:E9:6A:F4:DC:F1:66:AC:D0:B9
- DirName:/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com
+ keyid:95:4A:41:3E:F1:5C:12:B4:7B:3E:9F:3B:0C:23:66:90:3D:7F:4E:D8
+ DirName:/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com
serial:00
Signature Algorithm: md5WithRSAEncryption
- 62:77:bc:16:dc:4c:70:63:4d:03:ce:19:5e:c4:6c:31:0e:57:
- 26:d8:6e:25:08:f2:01:ae:98:59:0a:ba:b7:32:c0:39:69:b8:
- 4b:aa:59:7c:97:72:4e:50:02:ee:ef:d6:d6:62:b8:25:36:91:
- b6:3b:8f:6f:2f:3c:d8:9d:b7:cf:8f:f6:29:50:e9:31:54:77:
- 2b:7b:21:72:0f:60:4c:d4:1c:bb:c4:46:e5:fd:a7:5f:ea:46:
- e4:df:e9:95:77:2d:91:f8:3b:33:78:83:5d:10:de:98:7c:38:
- 91:27:f6:52:8a:b6:54:f1:0f:7a:f0:1d:da:a5:22:d2:75:cc:
- 4c:c3
+ 7c:b6:9c:fc:ea:9e:e6:88:32:f5:24:81:9b:89:c0:13:fa:75:
+ 18:51:af:77:ae:b8:4e:12:5f:48:ab:0c:e6:c5:a4:87:93:6e:
+ 98:97:f5:f3:d3:0b:e0:fc:5e:34:3e:f2:93:58:73:97:b6:a7:
+ 66:96:81:cd:73:48:f3:75:24:64:61:13:78:3e:ed:df:7c:4d:
+ fa:2e:3a:64:99:12:24:9e:a2:51:5c:23:85:0b:0c:bb:f5:8e:
+ 89:80:27:ba:7c:d2:68:90:ff:1f:68:2e:1b:fd:06:bc:c8:41:
+ d7:b2:be:9c:94:5c:6d:1e:96:3b:75:bc:12:f0:44:bd:36:00:
+ 84:cd
-----BEGIN CERTIFICATE-----
-MIIDWTCCAsKgAwIBAgIBATANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJSVTET
-MBEGA1UECBMKU29tZS1TdGF0ZTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoT
-CE15U1FMIEFCMQ8wDQYDVQQDEwZXYWxydXMxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1
-c0BteXNxbC5jb20wHhcNMDIwODAyMjE1OTI2WhcNMDMwODAyMjE1OTI2WjBlMQsw
-CQYDVQQGEwJSVTERMA8GA1UEBxMIT3JlbmJ1cmcxETAPBgNVBAoTCE15U1FMIEFC
-MQ8wDQYDVQQDEwZzZXJ2ZXIxHzAdBgkqhkiG9w0BCQEWEHdhbHJ1c0BteXNxbC5j
-b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAL198ZFROP5LebX/4EGuDqi7
-e2BClQF15yJ0VX10TVBRDF4JSysMjj+fFD9e2SU2m8x3NTDpjL87vdpihUyQyN5x
-LAp73OaF/bQkiKePAz0VfFk9+HPwNiq4gHzYx9YfbbK3t0ifJFaBLC6cuZVIUFaf
-GmCWxMDrjS1VOD9rgryzAgMBAAGjggECMIH/MAkGA1UdEwQCMAAwLAYJYIZIAYb4
-QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTJ
-0NL3F3knHEvJ55LVXox+8v6ntzCBpAYDVR0jBIGcMIGZgBTZ2Gp9q84QYhoW/Olq
-9NzxZqzQuaF+pHwwejELMAkGA1UEBhMCUlUxEzARBgNVBAgTClNvbWUtU3RhdGUx
-ETAPBgNVBAcTCE9yZW5idXJnMREwDwYDVQQKEwhNeVNRTCBBQjEPMA0GA1UEAxMG
-V2FscnVzMR8wHQYJKoZIhvcNAQkBFhB3YWxydXNAbXlzcWwuY29tggEAMA0GCSqG
-SIb3DQEBBAUAA4GBAGJ3vBbcTHBjTQPOGV7EbDEOVybYbiUI8gGumFkKurcywDlp
-uEuqWXyXck5QAu7v1tZiuCU2kbY7j28vPNidt8+P9ilQ6TFUdyt7IXIPYEzUHLvE
-RuX9p1/qRuTf6ZV3LZH4OzN4g10Q3ph8OJEn9lKKtlTxD3rwHdqlItJ1zEzD
+MIIDkTCCAvqgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCU0Ux
+EDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMSEwHwYDVQQDExhB
+YnN0cmFjdCBNeVNRTCBEZXZlbG9wZXIxMTAvBgkqhkiG9w0BCQEWImFic3RyYWN0
+Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wHhcNMDMwODA3MTEzOTI3WhcNMTMw
+ODA0MTEzOTI3WjB8MQswCQYDVQQGEwJTRTEQMA4GA1UEBxMHVXBwc2FsYTERMA8G
+A1UEChMITXlTUUwgQUIxFTATBgNVBAMTDE15U1FMIFNlcnZlcjExMC8GCSqGSIb3
+DQEJARYiYWJzdHJhY3QubXlzcWwuZGV2ZWxvcGVyQG15c3FsLmNvbTCBnzANBgkq
+hkiG9w0BAQEFAAOBjQAwgYkCgYEA6YZ6VYSITL6k+JJzMBJJC3qFhzk0OQ19C40Y
+wheVE1LSP1UQV8g/WvWy+ovQZ0nMqoL8n84AtHPzNtI608KwDhTD1LIhdKHwMYFg
+h5hzXBDBsRpN8fOwmD/w15ebK/3VIXmyL+tkFcmbnfyeLdT4BFvqqXVLQsM9Dk0q
+qLjKmY0CAwEAAaOCARQwggEQMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9w
+ZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRu5Jtqxerk5sfv
+1x7IY0VgKxvU1DCBtQYDVR0jBIGtMIGqgBSVSkE+8VwStHs+nzsMI2aQPX9O2KGB
+jqSBizCBiDELMAkGA1UEBhMCU0UxEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoT
+CE15U1FMIEFCMSEwHwYDVQQDExhBYnN0cmFjdCBNeVNRTCBEZXZlbG9wZXIxMTAv
+BgkqhkiG9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb22C
+AQAwDQYJKoZIhvcNAQEEBQADgYEAfLac/Oqe5ogy9SSBm4nAE/p1GFGvd664ThJf
+SKsM5sWkh5NumJf189ML4PxeND7yk1hzl7anZpaBzXNI83UkZGETeD7t33xN+i46
+ZJkSJJ6iUVwjhQsMu/WOiYAnunzSaJD/H2guG/0GvMhB17K+nJRcbR6WO3W8EvBE
+vTYAhM0=
-----END CERTIFICATE-----
diff --git a/SSL/server-key.pem b/SSL/server-key.pem
index 5afd717e07c..4292dc79929 100644
--- a/SSL/server-key.pem
+++ b/SSL/server-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQC9ffGRUTj+S3m1/+BBrg6ou3tgQpUBdecidFV9dE1QUQxeCUsr
-DI4/nxQ/XtklNpvMdzUw6Yy/O73aYoVMkMjecSwKe9zmhf20JIinjwM9FXxZPfhz
-8DYquIB82MfWH22yt7dInyRWgSwunLmVSFBWnxpglsTA640tVTg/a4K8swIDAQAB
-AoGARciG2NRHn+aduPe1V5rJDTyWD/oVM8d+ykJ7ZUsaWdSvMEZN51mlXSqxYzED
-2N+GesL/1LZ9vcM7hJw5qNu9DQOc7CtMT4k/bmhPJsT226roKKVbw/ocOEY5dK8+
-T9/x8qgo7zC3Qk/bKgjj61m8cQ7Mz/J7ZCEMmDNNrORCzRECQQDrcvJlsBTALilr
-MaAqNyaa0tykEabzg2mUFx5uvmzlwNx9ApSidoU5Xop9c6u00zgCDpsDlcwjhOs1
-jcqRkBTrAkEAzggY7BeN3FnW8tsV0Wq4LL6vK30pe0JIylxrKsFjY4LTo9t/8TKK
-6ZOEETVtM7sepIkxECw5RCBi9sxi3NClWQJAbrA5WKjw+HA7NJO98lq/IWYkKFXM
-IQsUpXRA8FtBormKbpK6Aa6qbxANF3E7teTencj0Azl3IPOqCCFCrDAKRQJAc6bv
-9ncyVqLHmgOJN8ikIdnYEp1rj5khqxY9wf5UgCOMEcrBAu/QMlVwKQjIh+VdyhaI
-x/9LFgboBomsZS9p4QJBAIXaX/WoqL/wgBGS2UroianFFXL6/Bt//CUoGpYgKQYQ
-+x+8heMRppmM0to2J7j9nGE83ikMWfPUwMi4TbyWH3Q=
+MIICXgIBAAKBgQDphnpVhIhMvqT4knMwEkkLeoWHOTQ5DX0LjRjCF5UTUtI/VRBX
+yD9a9bL6i9BnScyqgvyfzgC0c/M20jrTwrAOFMPUsiF0ofAxgWCHmHNcEMGxGk3x
+87CYP/DXl5sr/dUhebIv62QVyZud/J4t1PgEW+qpdUtCwz0OTSqouMqZjQIDAQAB
+AoGBALTq11nrjIEQbdSZ+R1z/R0kddB2U+wjdA3/6P9tr7PBxVsFdtzbKaI5mcib
+iwCKX0J2qmrP+SHUdsexBZxLR4KV/Z55v9Pym99Dy+DxDA95zURyCMKRBIzlU5uN
+F7USEQoltLUCsmZwNWdit0gfxSWdddkHNuI0uxTzHwuDcUlNAkEA/76zVremngNL
+DlekM9NPn/8E/TXBHN1b1jdUKd7WymSJykdcm3viU98dFNZFWF8B0jiTcuBKXgpR
+vTShNab/swJBAOnCGp554BLhioTyyk8qjRLt3xEsjsDljJULHVLYWcUqIkMf97GL
+VLBhl6ZEI9i0WduqvgZ+Bacd0uHqIHz1Yb8CQQDm1CjqTDiGxlIoT9JVNJTZxEOs
+h6gVdXY+kxHT+N3FL5luiZp8fAR7zxVgiUVtzdLG+2madfapiobcT3RyCJkhAkBI
+64AaR7KasTjg2Ew7/e4cJZAcb2XozrLYG6t+GHeIhehCQEqoW+qDSy5fc4orI7eU
+SuMUa2OgCjGqv7p6wKFJAkEAznmum/MbVOBpC4FsdnIGkxyFKIbh2OLY2aUb2KkK
+Ouf4S8Y5Ldgszi0fnDPRaxWJzewwZKvcff2zj+mYZeAXbA==
-----END RSA PRIVATE KEY-----
diff --git a/SSL/server-req.pem b/SSL/server-req.pem
index 4cd6610e735..7c3db0660ad 100644
--- a/SSL/server-req.pem
+++ b/SSL/server-req.pem
@@ -1,30 +1,12 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,6CBD09E71246DC01
-
-byRzq5+j3r8FX2kQerTUZT5Bw/N6zrN3cmH6NHGJcrqD+vcPdtWf+Rk+mpNXgSQn
-ldkfmniU/htzJ0cUV+KE229Qx10Hx9mIJIbf0Y/rBCUBuaXWVrQB36W9w3rkNPFA
-EEuRMkreOJF42RD16+NBJv+RcHIGzGejXecJKUGF5DKlN0U8YHXnkXTQl54kIdr0
-H7rTrvJygwPk9/ik0M9/vmwduAMvTaHDmvgeolpMlJkxwz8vYkbUnFFJZhB6XNCb
-1w3lJ0EmRJicK5BnZmCEmgt8xiv0PAtg00jBbwddQbn1reAyViBtBT9iXdusHXS5
-Po63rSt7r3MO8aetcMQ6FkklH+ChuS/vFoNY57AwrzF4uEI4GSoZP0ESrRC5Ar5W
-Lzg/HrQAWbPCRlb6Jj3db1woRzFS8joOashROsZdeV/5P4Emhc6J7QMTvB1OHAhQ
-ugOJazJtxjg0DN8+9cM1wtHI7N89PLHhOg13LZNLeeehzIlPwKI2JLqXUc6oR407
-i+S7GCqu7wU+if0Enux8Dj7yrvnTUiqVCL2dyKTS3sBq0Cm2UhbecHclor13y6no
-y1o50TKKD6Zig2hZmSpqKznMxGMVIT36BE0aOMQUmk+aVnRuROclwTTL0ZNLzA+g
-QRTRfQ6iNMf34ypqAMdAMPzDGLPycKuFdxVQxFEVaM2/mrdWFwVAqFsLvzyGvdrh
-nkNyRgTWR/pfH9b3mXLqf6gMPNs764WhFIcZIDk9a4XBBUm2YDb2CxDzDCo/EUMA
-jvIiU0Jt132SEHHF/wAka6d2DnwZ3vexRp6Tebv/uy9IlMLPE+68dw==
------END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE REQUEST-----
-MIIB0jCCATsCAQAwgZExCzAJBgNVBAYTAkVFMRMwEQYDVQQIEwpTb21lLVN0YXRl
-MRAwDgYDVQQHEwdUYWxsaW5uMSYwJAYDVQQKEx1NeVNRTCBzZXJ2ZXIgZGVtbyBj
-ZXJ0aWZpY2F0ZTEUMBIGA1UEAxMLVG9udSBTYW11ZWwxHTAbBgkqhkiG9w0BCQEW
-DnRvbnVAbXlzcWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCerI3Y
-HZyy/YiWLLpCU/pdvYWK5crTD8ABPPKSRk/ZgK4qic/v6NRl/Pb1OiZMKdsG+jSh
-h/OXtTyU8YQFrK1XJdkC2wBx4KmqtB0pNl6ppA3yRbmDdCtF8+IjvOdc5hG29t3E
-rO1lQiw5RyrJ619FAxCrI7zKXIKat7NtZxjSxwIDAQABoAAwDQYJKoZIhvcNAQEE
-BQADgYEAlrUnGX4LYIiVjztHA4gUcOSVeEHCci2qEUq+7yY1JhAw54YDa2MLTTwa
-cH+rXLHjN0MTNfv9tRxdSX+trk3pyvhgFjssD100dJkF83RfVv2tKg9kscVOGQp7
-MkwOnJjfAjQBlTbTOQM46BTjv2FgvsppkO3ViryI//YxKvj/628=
+MIIBvDCCASUCAQAwfDELMAkGA1UEBhMCU0UxEDAOBgNVBAcTB1VwcHNhbGExETAP
+BgNVBAoTCE15U1FMIEFCMRUwEwYDVQQDEwxNeVNRTCBTZXJ2ZXIxMTAvBgkqhkiG
+9w0BCQEWImFic3RyYWN0Lm15c3FsLmRldmVsb3BlckBteXNxbC5jb20wgZ8wDQYJ
+KoZIhvcNAQEBBQADgY0AMIGJAoGBAOmGelWEiEy+pPiSczASSQt6hYc5NDkNfQuN
+GMIXlRNS0j9VEFfIP1r1svqL0GdJzKqC/J/OALRz8zbSOtPCsA4Uw9SyIXSh8DGB
+YIeYc1wQwbEaTfHzsJg/8NeXmyv91SF5si/rZBXJm538ni3U+ARb6ql1S0LDPQ5N
+Kqi4ypmNAgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQCagJxGHBC+G5aSh3OguFn6
+z+qAC7u3B181kPBgNv20zMgLeq7YiAh3iNx4XO2+QXRGzMznFKx1tFr/mavCpgLs
+p3+dCvQt5FHEFFK1D1pDeXy4146X07hOTtC9jc/jSWeVnH4ujuX5gMtZqisOyYWV
+/gpw6dBtkTYlhS+y86kM/Q==
-----END CERTIFICATE REQUEST-----
diff --git a/VC++Files/client/mysql.dsp b/VC++Files/client/mysql.dsp
index c0fd1e785d5..2e9e1729bed 100644
--- a/VC++Files/client/mysql.dsp
+++ b/VC++Files/client/mysql.dsp
@@ -25,7 +25,7 @@ CFG=mysql - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysql - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\"
# SUBTRACT LINK32 /incremental:yes
@@ -68,14 +68,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysql.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
diff --git a/VC++Files/client/mysqladmin.dsp b/VC++Files/client/mysqladmin.dsp
index 11189ecb065..2c762cd8a24 100644
--- a/VC++Files/client/mysqladmin.dsp
+++ b/VC++Files/client/mysqladmin.dsp
@@ -25,7 +25,7 @@ CFG=mysqladmin - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqladmin - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\"
@@ -67,14 +67,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqladmin.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index 0f4c46acd2a..685c9ae1a15 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -25,7 +25,7 @@ CFG=mysqlclient - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlclient - Win32 Release"
@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_release\mysqlclient.lib"
@@ -65,14 +65,14 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\mysqlclient.lib"
diff --git a/VC++Files/client/mysqldump.dsp b/VC++Files/client/mysqldump.dsp
index 4fae9a5769a..d36664e09ce 100644
--- a/VC++Files/client/mysqldump.dsp
+++ b/VC++Files/client/mysqldump.dsp
@@ -25,7 +25,7 @@ CFG=mysqldump - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqldump - Win32 Release"
@@ -42,14 +42,14 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
@@ -67,16 +67,16 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
+# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
!ENDIF
diff --git a/VC++Files/client/mysqlimport.dsp b/VC++Files/client/mysqlimport.dsp
index 8eb08f1411f..a8b239d226f 100644
--- a/VC++Files/client/mysqlimport.dsp
+++ b/VC++Files/client/mysqlimport.dsp
@@ -25,7 +25,7 @@ CFG=mysqlimport - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlimport - Win32 Release"
@@ -42,14 +42,14 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\"
# SUBTRACT LINK32 /incremental:yes
@@ -68,14 +68,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlimport.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
diff --git a/VC++Files/client/mysqlshow.dsp b/VC++Files/client/mysqlshow.dsp
index 78627246050..26705465fec 100644
--- a/VC++Files/client/mysqlshow.dsp
+++ b/VC++Files/client/mysqlshow.dsp
@@ -25,7 +25,7 @@ CFG=mysqlshow - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlshow - Win32 Release"
@@ -42,14 +42,14 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX- /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\"
@@ -67,16 +67,16 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX- /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../client_debug/mysqlshow.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
+# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlshow.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
!ENDIF
diff --git a/VC++Files/comp_err/comp_err.dsp b/VC++Files/comp_err/comp_err.dsp
index 71582b84763..deaf0627262 100644
--- a/VC++Files/comp_err/comp_err.dsp
+++ b/VC++Files/comp_err/comp_err.dsp
@@ -24,7 +24,7 @@ CFG=comp_err - Win32 Release
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -33,8 +33,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@@ -44,7 +44,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib_release\mysys.lib wsock32.lib ..\lib_release\strings.lib ..\lib_release\dbug.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC.lib" /out:"Release/comp-err.exe"
# Begin Target
diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp
index 7e6f3037400..9985ec7e454 100644
--- a/VC++Files/innobase/innobase.dsp
+++ b/VC++Files/innobase/innobase.dsp
@@ -87,8 +87,8 @@ LIB32=xilink6.exe -lib
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "innobase___Win32_nt"
-# PROP Intermediate_Dir "innobase___Win32_nt"
+# PROP Output_Dir "nt"
+# PROP Intermediate_Dir "nt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /FD /c
@@ -111,8 +111,8 @@ LIB32=xilink6.exe -lib
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "innobase___Win32_Max_nt"
-# PROP Intermediate_Dir "innobase___Win32_Max_nt"
+# PROP Output_Dir "max_nt"
+# PROP Intermediate_Dir "max_nt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /FD /c
diff --git a/VC++Files/isamchk/isamchk.dsp b/VC++Files/isamchk/isamchk.dsp
index e1e0f8aac3a..0e8e2b04bd7 100644
--- a/VC++Files/isamchk/isamchk.dsp
+++ b/VC++Files/isamchk/isamchk.dsp
@@ -25,7 +25,7 @@ CFG=isamchk - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "isamchk - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/isamchk.exe"
# SUBTRACT LINK32 /pdb:none
@@ -68,14 +68,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD BASE RSC /l 0x41d /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/isamchk.exe" /pdbtype:sept
# SUBTRACT LINK32 /verbose /pdb:none
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index d4f7ed6df82..8ab15a03110 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -76,7 +76,7 @@ PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release /y
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "." /I "..\include" /I "../zlib" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "." /I "..\include" /I "../zlib" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp
index 691c66a074d..593c53a57ba 100644
--- a/VC++Files/libmysqld/libmysqld.dsp
+++ b/VC++Files/libmysqld/libmysqld.dsp
@@ -25,7 +25,7 @@ CFG=libmysqld - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
@@ -38,8 +38,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /c
@@ -51,7 +51,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /pdb:none /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /Gm /Zi /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
+# ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\innodb.lib /nologo /dll /pdb:none /debug /machine:I386 /nodefaultlib:"LIBCMTD" /out:"../lib_debug/libmysqld.dll" /implib:"../lib_debug/libmysqld.lib"
diff --git a/VC++Files/libmysqltest/myTest.dsp b/VC++Files/libmysqltest/myTest.dsp
index 744b2c04993..1d3a790edd5 100644
--- a/VC++Files/libmysqltest/myTest.dsp
+++ b/VC++Files/libmysqltest/myTest.dsp
@@ -25,7 +25,7 @@ CFG=myTest - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "myTest - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 libmysql.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\lib_release"
@@ -67,14 +67,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "..\include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "..\include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libmysql.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"..\lib_debug"
diff --git a/VC++Files/my_print_defaults/my_print_defaults.dsp b/VC++Files/my_print_defaults/my_print_defaults.dsp
index b485a20a844..25f5332eb0f 100644
--- a/VC++Files/my_print_defaults/my_print_defaults.dsp
+++ b/VC++Files/my_print_defaults/my_print_defaults.dsp
@@ -25,7 +25,7 @@ CFG=my_print_defaults - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "my_print_defaults - Win32 Release"
@@ -37,8 +37,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@@ -47,9 +47,9 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "my_print_defaults - Win32 Debug"
@@ -64,16 +64,16 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /Gm /GX /ZI /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MT /W3 /GX /Z7 /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept
!ENDIF
diff --git a/VC++Files/myisamlog/myisamlog.dsp b/VC++Files/myisamlog/myisamlog.dsp
index bbb6739cb16..6df65add63c 100644
--- a/VC++Files/myisamlog/myisamlog.dsp
+++ b/VC++Files/myisamlog/myisamlog.dsp
@@ -25,7 +25,7 @@ CFG=myisamlog - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "myisamlog - Win32 Release"
@@ -37,8 +37,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj /nologo /subsystem:console /pdb:"release/myisamchk.pdb" /machine:I386 /out:"../client_release/myisamlog.exe"
# SUBTRACT LINK32 /pdb:none
@@ -74,7 +74,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /pdb:"debug/myisamchk.pdb" /debug /machine:I386 /out:"../client_debug/myisamlog.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
diff --git a/VC++Files/mysql.dsw b/VC++Files/mysql.dsw
index d6903f4dbc7..4ff8c1df3fc 100644
--- a/VC++Files/mysql.dsw
+++ b/VC++Files/mysql.dsw
@@ -605,9 +605,6 @@ Package=<5>
Package=<4>
{{{
- Begin Project Dependency
- Project_Dep_Name strings
- End Project Dependency
}}}
###############################################################################
diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.dsp b/VC++Files/mysqlbinlog/mysqlbinlog.dsp
index 5aea3a396e8..914bbcf70a3 100644
--- a/VC++Files/mysqlbinlog/mysqlbinlog.dsp
+++ b/VC++Files/mysqlbinlog/mysqlbinlog.dsp
@@ -25,7 +25,7 @@ CFG=mysqlbinlog - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlbinlog - Win32 Release"
@@ -37,8 +37,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "eelease"
+# PROP Intermediate_Dir "eelease"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\"
# SUBTRACT LINK32 /pdb:none /debug
@@ -67,13 +67,13 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /I "../sql" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /I "../sql" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlbinlog.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
diff --git a/VC++Files/mysqlcheck/mysqlcheck.dsp b/VC++Files/mysqlcheck/mysqlcheck.dsp
index 9b821261672..f8487119da3 100644
--- a/VC++Files/mysqlcheck/mysqlcheck.dsp
+++ b/VC++Files/mysqlcheck/mysqlcheck.dsp
@@ -25,7 +25,7 @@ CFG=mysqlcheck - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlcheck - Win32 Release"
@@ -38,7 +38,7 @@ RSC=rc.exe
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
@@ -48,8 +48,8 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\"
!ELSEIF "$(CFG)" == "mysqlcheck - Win32 Debug"
@@ -65,15 +65,15 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 mysqlclient.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlcheck.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
!ENDIF
diff --git a/VC++Files/mysqldemb/mysqldemb.dsp b/VC++Files/mysqldemb/mysqldemb.dsp
index f28815c0f15..4a14401ed29 100644
--- a/VC++Files/mysqldemb/mysqldemb.dsp
+++ b/VC++Files/mysqldemb/mysqldemb.dsp
@@ -38,7 +38,7 @@ RSC=rc.exe
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FD /c
@@ -65,7 +65,7 @@ LIB32=xilink6.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /I "../zlib" /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../zlib" /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
diff --git a/VC++Files/mysqlmanager/MySqlManager.dsp b/VC++Files/mysqlmanager/MySqlManager.dsp
index a5338b8f5ce..c6108acfc8f 100644
--- a/VC++Files/mysqlmanager/MySqlManager.dsp
+++ b/VC++Files/mysqlmanager/MySqlManager.dsp
@@ -25,7 +25,7 @@ CFG=MySqlManager - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
@@ -52,7 +52,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"../client_release/MySqlManager.exe"
# SUBTRACT LINK32 /nodefaultlib
@@ -71,7 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /GR /GX /Z7 /Od /I "../include" /D "_DEBUG" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX /Yc /Yu
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /o "NUL" /win32
@@ -81,7 +81,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:"../client_debug/MySqlManager.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
# SUBTRACT LINK32 /pdb:none
diff --git a/VC++Files/mysqlserver/mysqlserver.dsp b/VC++Files/mysqlserver/mysqlserver.dsp
index 0ef59eb226e..d8df71ebbb2 100644
--- a/VC++Files/mysqlserver/mysqlserver.dsp
+++ b/VC++Files/mysqlserver/mysqlserver.dsp
@@ -25,7 +25,7 @@ CFG=mysqlserver - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqlserver - Win32 Release"
@@ -37,8 +37,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /YX /FD /c
@@ -47,7 +47,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
@@ -64,13 +64,13 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /Zi /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x416 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
diff --git a/VC++Files/mysqlshutdown/mysqlshutdown.dsp b/VC++Files/mysqlshutdown/mysqlshutdown.dsp
index fd78c6ddb21..d4dd389e99d 100644
--- a/VC++Files/mysqlshutdown/mysqlshutdown.dsp
+++ b/VC++Files/mysqlshutdown/mysqlshutdown.dsp
@@ -25,7 +25,7 @@ CFG=mysqlshutdown - Win32 Release
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /W3 /GX- /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /W3 /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -52,7 +52,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../client_release/mysqlshutdown.exe"
@@ -72,7 +72,7 @@ LINK32=link.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /G6 /W3 /GX- /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /W3 /Z7 /O2 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -81,7 +81,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../client_release/mysqlshutdown.exe"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../client_debug/mysqlshutdown.exe"
diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp
index 8d1928f4c6d..9f7a6bbf2e9 100644
--- a/VC++Files/mysys/mysys.dsp
+++ b/VC++Files/mysys/mysys.dsp
@@ -66,7 +66,7 @@ LIB32=xilink6.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# SUBTRACT CPP /Fr
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
@@ -86,8 +86,8 @@ LIB32=xilink6.exe -lib
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "mysys___Win32_Max"
-# PROP Intermediate_Dir "mysys___Win32_Max"
+# PROP Output_Dir "max"
+# PROP Intermediate_Dir "max"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /FD /c
# SUBTRACT BASE CPP /YX
diff --git a/VC++Files/pack_isam/pack_isam.dsp b/VC++Files/pack_isam/pack_isam.dsp
index 25e4ef4a2e0..cdcba702e15 100644
--- a/VC++Files/pack_isam/pack_isam.dsp
+++ b/VC++Files/pack_isam/pack_isam.dsp
@@ -25,7 +25,7 @@ CFG=pack_isam - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "pack_isam - Win32 Release"
@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/pack_isam.exe"
@@ -66,14 +66,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../isam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../client_debug/pack_isam.exe" /pdbtype:sept
diff --git a/VC++Files/perror/perror.dsp b/VC++Files/perror/perror.dsp
index 6d5c96b2a84..99bd8f67ae2 100644
--- a/VC++Files/perror/perror.dsp
+++ b/VC++Files/perror/perror.dsp
@@ -25,7 +25,7 @@ CFG=perror - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
@@ -38,8 +38,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
@@ -52,7 +52,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/perror.exe"
# SUBTRACT LINK32 /pdb:none
@@ -71,7 +71,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -80,7 +80,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /incremental:no /debug /machine:I386 /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
diff --git a/VC++Files/replace/replace.dsp b/VC++Files/replace/replace.dsp
index f0c4848156a..2fe763ff388 100644
--- a/VC++Files/replace/replace.dsp
+++ b/VC++Files/replace/replace.dsp
@@ -25,7 +25,7 @@ CFG=replace - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "replace - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/replace.exe"
@@ -67,14 +67,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40b /d "_DEBUG"
# ADD RSC /l 0x40b /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /machine:I386 /out:"../client_debug/replace.exe" /pdbtype:sept
# SUBTRACT LINK32 /debug
diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp
index 8192623f957..f8724fb0b06 100644
--- a/VC++Files/sql/mysqld.dsp
+++ b/VC++Files/sql/mysqld.dsp
@@ -28,7 +28,7 @@ CFG=mysqld - Win32 Release
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "mysqld - Win32 Release"
@@ -52,7 +52,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-opt.exe"
# SUBTRACT LINK32 /debug
@@ -71,14 +71,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD BASE RSC /l 0x410 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\vio.lib ..\lib_debug\isam.lib ..\lib_debug\merge.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\bdb.lib ..\lib_debug\innodb.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqld.exe" /pdbtype:sept
@@ -105,7 +105,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\dbug.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
# SUBTRACT LINK32 /pdb:none /debug
@@ -133,7 +133,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
# SUBTRACT BASE LINK32 /pdb:none /debug
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys-max.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-max-nt.exe"
@@ -162,7 +162,7 @@ LINK32=link.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"../client_release/mysqld-opt.exe"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys-max.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-max.exe"
# SUBTRACT LINK32 /debug
diff --git a/VC++Files/test1/test1.dsp b/VC++Files/test1/test1.dsp
index fb70ceda692..df4b31d684e 100644
--- a/VC++Files/test1/test1.dsp
+++ b/VC++Files/test1/test1.dsp
@@ -25,7 +25,7 @@ CFG=test1 - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "test1 - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
@@ -67,14 +67,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libmysql.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\lib_debug"
# SUBTRACT LINK32 /incremental:no
diff --git a/VC++Files/thr_test/thr_test.dsp b/VC++Files/thr_test/thr_test.dsp
index a7854a66049..0c80de42521 100644
--- a/VC++Files/thr_test/thr_test.dsp
+++ b/VC++Files/thr_test/thr_test.dsp
@@ -25,7 +25,7 @@ CFG=thr_test - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "thr_test - Win32 Release"
@@ -49,7 +49,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# SUBTRACT LINK32 /nodefaultlib
@@ -68,14 +68,14 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /ZI /Od /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD BASE RSC /l 0x40b /d "_DEBUG"
# ADD RSC /l 0x40b /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept
diff --git a/VC++Files/vio/vio.dsp b/VC++Files/vio/vio.dsp
index 50c920a465d..c250e693995 100644
--- a/VC++Files/vio/vio.dsp
+++ b/VC++Files/vio/vio.dsp
@@ -25,7 +25,7 @@ CFG=vio - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "vio - Win32 Release"
@@ -37,8 +37,8 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /FD /c
@@ -47,7 +47,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_release\vio.lib"
@@ -64,13 +64,13 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\vio.lib"
diff --git a/VC++Files/zlib/zlib.dsp b/VC++Files/zlib/zlib.dsp
index fd9d6b2bd68..40aaadaa4e1 100644
--- a/VC++Files/zlib/zlib.dsp
+++ b/VC++Files/zlib/zlib.dsp
@@ -25,7 +25,7 @@ CFG=zlib - Win32 Debug
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "zlib - Win32 Release"
@@ -48,7 +48,7 @@ RSC=rc.exe
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_release\zlib.lib"
@@ -65,13 +65,13 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /G6 /MTd /W3 /Zi /Od /D "_DEBUG" /D "__WIN32__" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /D "_DEBUG" /D "__WIN32__" /D "_WINDOWS" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LIB32=link.exe -lib
+LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib_debug\zlib.lib"
diff --git a/acconfig.h b/acconfig.h
index 0b822d67cf5..b254b3263fd 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -213,6 +213,9 @@
/* Define if the system files define ulong */
#undef HAVE_ULONG
+/* Define if the system files define in_addr_t */
+#undef HAVE_IN_ADDR_T
+
/* UNIXWARE7 threads are not posix */
#undef HAVE_UNIXWARE7_THREADS
diff --git a/acinclude.m4 b/acinclude.m4
index 01edc6050da..577adba5769 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -244,6 +244,28 @@ fi
])
+AC_DEFUN(MYSQL_CHECK_IN_ADDR_T,
+[AC_MSG_CHECKING(for type in_addr_t)
+AC_CACHE_VAL(ac_cv_in_addr_t,
+[AC_TRY_RUN([#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+int main(int argc, char **argv)
+{
+ in_addr_t foo;
+ exit(0);
+}], ac_cv_in_addr_t=yes, ac_cv_in_addr_t=no, ac_cv_in_addr_t=no)])
+AC_MSG_RESULT($ac_cv_in_addr_t)
+if test "$ac_cv_in_addr_t" = "yes"
+then
+ AC_DEFINE(HAVE_IN_ADDR_T)
+fi
+])
+
+
AC_DEFUN(MYSQL_PTHREAD_YIELD,
[AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
[AC_TRY_LINK([#define _GNU_SOURCE
diff --git a/client/mysql.cc b/client/mysql.cc
index b249ccbfbc5..92aeb495629 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1811,10 +1811,12 @@ print_field_types(MYSQL_RES *result)
MYSQL_FIELD *field;
while ((field = mysql_fetch_field(result)))
{
+ tee_fprintf(PAGER,"Catalog: '%s'\nDatabase: '%s'\nTable: '%s'\nName: '%s'\nType: %d\nLength: %d\nMax length: %d\nIs_null: %d\nFlags: %d\nDecimals: %d\n\n",
tee_fprintf(PAGER,"'%s.%s.%s.%s' %d %d %d %d %d\n",
field->catalog, field->db, field->table, field->name,
(int) field->type,
- field->length, field->max_length,
+ field->length, field->max_length,
+ !IS_NOT_NULL(field->flags),
field->flags, field->decimals);
}
tee_puts("", PAGER);
@@ -2650,10 +2652,10 @@ com_status(String *buffer __attribute__((unused)),
(void) mysql_fetch_row(result); // Read eof
}
#ifdef HAVE_OPENSSL
- if (mysql.net.vio && mysql.net.vio->ssl_ &&
- SSL_get_cipher(mysql.net.vio->ssl_))
+ if (mysql.net.vio && mysql.net.vio->ssl_arg &&
+ SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg))
tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n",
- SSL_get_cipher(mysql.net.vio->ssl_));
+ SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg));
else
#endif /* HAVE_OPENSSL */
tee_puts("SSL:\t\t\tNot in use", stdout);
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 9fdda0a3853..942c55f3078 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -182,7 +182,16 @@ public:
void process(Append_block_log_event *ae)
{
if (ae->file_id >= file_names.elements)
- die("Skiped CreateFile event for file_id: %u",ae->file_id);
+ {
+ /*
+ There is no Create_file event (a bad binlog or a big
+ --position). Assuming it's a big --position, we just do nothing and
+ print a warning.
+ */
+ fprintf(stderr,"Warning: ignoring Append_block as there is no \
+Create_file event for file_id: %u\n",ae->file_id);
+ return;
+ }
Create_file_log_event* ce=
*((Create_file_log_event**)file_names.buffer + ae->file_id);
append_to_file(ce->fname,O_APPEND|O_BINARY|O_WRONLY,ae->block,ae->block_len);
@@ -567,45 +576,49 @@ Could not read entry at offset %s : Error in log format or read error",
}
if (rec_count >= offset)
{
- // see if we should skip this event (only care about queries for now)
- if (one_database)
- {
- if (ev->get_type_code() == QUERY_EVENT)
+ if (!short_form)
+ fprintf(result_file, "# at %s\n",llstr(old_off,llbuff));
+
+ switch (ev->get_type_code()) {
+ case QUERY_EVENT:
+ if (one_database)
{
- //const char * log_dbname = ev->get_db();
const char * log_dbname = ((Query_log_event*)ev)->db;
- //printf("entry: %llu, database: %s\n", rec_count, log_dbname);
-
if ((log_dbname != NULL) && (strcmp(log_dbname, database)))
{
- //printf("skipping, %s is not %s\n", log_dbname, database);
rec_count++;
delete ev;
continue; // next
}
-#ifndef DBUG_OFF
- else
- {
- printf("no skip\n");
- }
-#endif
- }
-#ifndef DBUG_OFF
- else
- {
- const char * query_type = ev->get_type_str();
- printf("not query -- %s\n", query_type);
}
-#endif
- }
- if (!short_form)
- fprintf(result_file, "# at %s\n",llstr(old_off,llbuff));
-
- switch (ev->get_type_code()) {
+ ev->print(result_file, short_form, last_db);
+ break;
case CREATE_FILE_EVENT:
{
Create_file_log_event* ce= (Create_file_log_event*)ev;
- ce->print(result_file, short_form, last_db,true);
+ if (one_database)
+ {
+ /*
+ We test if this event has to be ignored. If yes, we don't save this
+ event; this will have the good side-effect of ignoring all related
+ Append_block and Exec_load.
+ Note that Load event from 3.23 is not tested.
+ */
+ const char * log_dbname = ce->db;
+ if ((log_dbname != NULL) && (strcmp(log_dbname, database)))
+ {
+ rec_count++;
+ delete ev;
+ continue; // next
+ }
+ }
+ /*
+ We print the event, but with a leading '#': this is just to inform the
+ user of the original command; the command we want to execute will be a
+ derivation of this original command (we will change the filename and
+ use LOCAL), prepared in the 'case EXEC_LOAD_EVENT' below.
+ */
+ ce->print(result_file, short_form, last_db, true);
load_processor.process(ce);
ev= 0;
break;
@@ -619,9 +632,20 @@ Could not read entry at offset %s : Error in log format or read error",
ev->print(result_file, short_form, last_db);
Execute_load_log_event *exv= (Execute_load_log_event*)ev;
Create_file_log_event *ce= load_processor.grab_event(exv->file_id);
- ce->print(result_file, short_form, last_db,true);
- my_free((char*)ce->fname,MYF(MY_WME));
- delete ce;
+ /*
+ if ce is 0, it probably means that we have not seen the Create_file
+ event (a bad binlog, or most probably --position is after the
+ Create_file event). Print a warning comment.
+ */
+ if (ce)
+ {
+ ce->print(result_file, short_form, last_db,true);
+ my_free((char*)ce->fname,MYF(MY_WME));
+ delete ce;
+ }
+ else
+ fprintf(stderr,"Warning: ignoring Exec_load as there is no \
+Create_file event for file_id: %u\n",exv->file_id);
break;
}
default:
@@ -633,7 +657,7 @@ Could not read entry at offset %s : Error in log format or read error",
delete ev;
}
if (fd >= 0)
- my_close(fd, MYF(MY_WME));
+ my_close(fd, MYF(MY_WME));
end_io_cache(file);
}
diff --git a/client/mysqldump.c b/client/mysqldump.c
index b317c7e5d13..92a8329a814 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1643,9 +1643,8 @@ int main(int argc, char **argv)
fprintf(md_result_file,
"\n--\n-- Position to start replication from\n--\n\n");
fprintf(md_result_file,
- "CHANGE MASTER TO MASTER_LOG_FILE='%s' ;\n", row[0]);
- fprintf(md_result_file, "CHANGE MASTER TO MASTER_LOG_POS=%s ;\n",
- row[1]);
+ "CHANGE MASTER TO MASTER_LOG_FILE='%s', \
+MASTER_LOG_POS=%s ;\n",row[0],row[1]);
}
mysql_free_result(master);
}
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index d049d69011b..4cff5fdfcc7 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -259,7 +259,7 @@ static int get_options(int *argc, char ***argv)
static int write_to_table(char *filename, MYSQL *sock)
{
char tablename[FN_REFLEN], hard_path[FN_REFLEN],
- sql_statement[FN_REFLEN*2+256], *end;
+ sql_statement[FN_REFLEN*16+256], *end;
my_bool local_file;
DBUG_ENTER("write_to_table");
DBUG_PRINT("enter",("filename: %s",filename));
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 3b814b27810..4ab3206dd32 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -42,7 +42,7 @@
**********************************************************************/
-#define MTEST_VERSION "1.29"
+#define MTEST_VERSION "1.30"
#include <my_global.h>
#include <mysql_embed.h>
@@ -226,6 +226,13 @@ const char *command_names[]=
"connection",
"query",
"connect",
+ /* the difference between sleep and real_sleep is that sleep will use
+ the delay from command line (--sleep) if there is one.
+ real_sleep always uses delay from it's argument.
+ the logic is that sometimes delays are cpu-dependent (and --sleep
+ can be used to set this delay. real_sleep is used for cpu-independent
+ delays
+ */
"sleep",
"real_sleep",
"inc",
@@ -501,15 +508,6 @@ void init_parser()
memset(&var_reg,0, sizeof(var_reg));
}
-int hex_val(int c)
-{
- if (my_isdigit(charset_info,c))
- return c - '0';
- else if ((c = my_tolower(charset_info,c)) >= 'a' && c <= 'f')
- return c - 'a' + 10;
- else
- return -1;
-}
int dyn_string_cmp(DYNAMIC_STRING* ds, const char* fname)
{
@@ -862,7 +860,28 @@ int var_query_set(VAR* v, const char* p, const char** p_end)
}
if ((row = mysql_fetch_row(res)) && row[0])
- eval_expr(v, row[0], 0);
+ {
+ /*
+ Concatenate all row results with tab in between to allow us to work
+ with results from many columns (for example from SHOW VARIABLES)
+ */
+ DYNAMIC_STRING result;
+ uint i;
+ ulong *lengths;
+ char *end;
+
+ init_dynamic_string(&result, "", 16384, 65536);
+ lengths= mysql_fetch_lengths(res);
+ for (i=0; i < mysql_num_fields(res); i++)
+ {
+ if (row[0])
+ dynstr_append_mem(&result, row[i], lengths[i]);
+ dynstr_append_mem(&result, "\t", 1);
+ }
+ end= result.str + result.length-1;
+ eval_expr(v, result.str, (const char**) &end);
+ dynstr_free(&result);
+ }
else
eval_expr(v, "", 0);
@@ -919,8 +938,6 @@ int eval_expr(VAR* v, const char* p, const char** p_end)
return 0;
}
- if (p_end)
- *p_end = 0;
die("Invalid expr: %s", p);
return 1;
}
@@ -1217,7 +1234,7 @@ static char *get_string(char **to_ptr, char **from_ptr,
VAR *var=var_get(start, &end, 0, 1);
if (var && to == (char*) end+1)
{
- DBUG_PRINT("info",("var: %s -> %s", start, var->str_val));
+ DBUG_PRINT("info",("var: '%s' -> '%s'", start, var->str_val));
DBUG_RETURN(var->str_val); /* return found variable value */
}
}
@@ -1547,56 +1564,6 @@ int do_while(struct st_query* q)
}
-int safe_copy_unescape(char* dest, char* src, int size)
-{
- register char* p_dest = dest, *p_src = src;
- register int c, val;
- enum { ST_NORMAL, ST_ESCAPED, ST_HEX2} state = ST_NORMAL ;
-
- size--; /* just to make life easier */
-
- for (; p_dest - size < dest && p_src - size < src &&
- (c = *p_src) != '\n' && c; ++p_src)
- {
- switch(state) {
- case ST_NORMAL:
- if (c == '\\')
- state = ST_ESCAPED;
- else
- *p_dest++ = c;
- break;
- case ST_ESCAPED:
- if ((val = hex_val(c)) > 0)
- {
- *p_dest = val;
- state = ST_HEX2;
- }
- else
- {
- state = ST_NORMAL;
- *p_dest++ = c;
- }
- break;
- case ST_HEX2:
- if ((val = hex_val(c)) > 0)
- {
- *p_dest = (*p_dest << 4) + val;
- p_dest++;
- }
- else
- *p_dest++ = c;
-
- state = ST_NORMAL;
- break;
-
- }
- }
-
- *p_dest = 0;
- return (p_dest - dest);
-}
-
-
int read_line(char* buf, int size)
{
int c;
diff --git a/configure.in b/configure.in
index f376e77e09a..d2d9f5086f2 100644
--- a/configure.in
+++ b/configure.in
@@ -1719,8 +1719,10 @@ MYSQL_CHECK_ULONG
MYSQL_CHECK_UCHAR
# Do the system files define uint
MYSQL_CHECK_UINT
-#Check for fp_except in ieeefp.h
+# Check for fp_except in ieeefp.h
MYSQL_CHECK_FP_EXCEPT
+# Check for IN_ADDR_T
+MYSQL_CHECK_IN_ADDR_T
# Do the c++ compiler have a bool type
MYSQL_CXX_BOOL
# Check some common bugs with gcc 2.8.# on sparc
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index a5ce489c0fd..e580603bcb8 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -26,6 +26,7 @@
#include <my_getopt.h>
const char *config_file="my"; /* Default config file */
+uint verbose= 0, opt_defaults_file_used= 0;
static struct my_option my_long_options[] =
{
@@ -47,6 +48,8 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help message and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"verbose", 'v', "Increase the output level",
+ 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
@@ -54,7 +57,7 @@ static struct my_option my_long_options[] =
static void usage(my_bool version)
{
- printf("%s Ver 1.5 for %s at %s\n",my_progname,SYSTEM_TYPE,
+ printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
if (version)
return;
@@ -72,12 +75,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument __attribute__((unused)))
{
switch (optid) {
+ case 'c':
+ opt_defaults_file_used= 1;
+ break;
case 'n':
exit(0);
case 'I':
case '?':
usage(0);
exit(0);
+ case 'v':
+ verbose++;
+ break;
case 'V':
usage(1);
exit(0);
@@ -103,7 +112,7 @@ static int get_options(int *argc,char ***argv)
int main(int argc, char **argv)
{
- int count;
+ int count, error;
char **load_default_groups, *tmp_arguments[2],
**argument, **arguments;
MY_INIT(argv[0]);
@@ -125,13 +134,26 @@ int main(int argc, char **argv)
arguments=tmp_arguments;
arguments[0]=my_progname;
arguments[1]=0;
- load_defaults(config_file, (const char **) load_default_groups,
- &count, &arguments);
+ if ((error= load_defaults(config_file, (const char **) load_default_groups,
+ &count, &arguments)))
+ {
+ if (verbose && opt_defaults_file_used)
+ {
+ if (error == 1)
+ fprintf(stderr, "WARNING: Defaults file '%s' not found!\n",
+ config_file);
+ /* This error is not available now. For the future */
+ if (error == 2)
+ fprintf(stderr, "WARNING: Defaults file '%s' is not a regular file!\n",
+ config_file);
+ }
+ error= 2;
+ }
for (argument= arguments+1 ; *argument ; argument++)
puts(*argument);
my_free((char*) load_default_groups,MYF(0));
free_defaults(arguments);
- exit(0);
+ exit(error);
}
diff --git a/extra/resolveip.c b/extra/resolveip.c
index cef79180720..a9e5f16e576 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -36,6 +36,10 @@
extern int h_errno;
#endif
+#ifndef HAVE_IN_ADDR_T
+#define in_addr_t u_long
+#endif
+
static my_bool silent;
@@ -91,8 +95,6 @@ static int get_options(int *argc,char ***argv)
{
int ho_error;
- /* load_defaults("my",load_default_groups,argc,argv); */
-
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
@@ -109,7 +111,7 @@ static int get_options(int *argc,char ***argv)
int main(int argc, char **argv)
{
struct hostent *hpaddr;
- u_long taddr;
+ in_addr_t taddr;
char *ip,**q;
int error=0;
diff --git a/include/config-win.h b/include/config-win.h
index 6b40a0f2ed3..7830cc8b9cd 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -283,6 +283,7 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_ISAM /* We want to have support for ISAM in 4.0 */
#define HAVE_QUERY_CACHE
#define SPRINTF_RETURNS_INT
+#define HAVE_SETFILEPOINTER
#define HAVE_VIO
#ifdef NOT_USED
diff --git a/include/m_string.h b/include/m_string.h
index 5863bb51b73..062d0b4cf65 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -122,6 +122,16 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
#define bmove512(A,B,C) memcpy(A,B,C)
#endif
+#ifdef HAVE_purify
+#include <assert.h>
+#define memcpy_overlap(A,B,C) \
+DBUG_ASSERT((A) == (B) || ((A)+(C)) <= (B) || ((B)+(C)) <= (A)); \
+bmove((byte*) key,(byte*) from,(size_t) length);
+#else
+#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
+#endif /* HAVE_purify */
+
+
/* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL)
diff --git a/include/my_sys.h b/include/my_sys.h
index 688e8bfc9e3..561b1495f54 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -681,6 +681,8 @@ extern int _my_b_get(IO_CACHE *info);
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
+extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
+
extern int my_block_write(IO_CACHE *info, const byte *Buffer,
uint Count, my_off_t pos);
extern int _flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
@@ -742,8 +744,8 @@ extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
extern char *strdup_root(MEM_ROOT *root,const char *str);
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
-extern void load_defaults(const char *conf_file, const char **groups,
- int *argc, char ***argv);
+extern int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
extern void free_defaults(char **argv);
extern void print_defaults(const char *conf_file, const char **groups);
extern my_bool my_compress(byte *, ulong *, ulong *);
diff --git a/include/mysql_com.h b/include/mysql_com.h
index b1c94e5c735..368529b1268 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -332,8 +332,8 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
/* Some other useful functions */
void my_init(void);
-void load_defaults(const char *conf_file, const char **groups,
- int *argc, char ***argv);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
my_bool my_thread_init(void);
void my_thread_end(void);
diff --git a/include/violite.h b/include/violite.h
index 9205f5b799a..37c5abbbe67 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -37,18 +37,24 @@ enum enum_vio_type
VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY
};
-#ifndef __WIN__
-#define HANDLE void *
-#endif
-
Vio* vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost);
#ifdef __WIN__
Vio* vio_new_win32pipe(HANDLE hPipe);
-Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map, HANDLE handle_map,
- HANDLE event_server_wrote, HANDLE event_server_read,
- HANDLE event_client_wrote, HANDLE event_client_read);
-#endif
+Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
+ HANDLE handle_map,
+ HANDLE event_server_wrote,
+ HANDLE event_server_read,
+ HANDLE event_client_wrote,
+ HANDLE event_client_read);
+int vio_read_pipe(Vio *vio, gptr buf, int size);
+int vio_write_pipe(Vio *vio, const gptr buf, int size);
+int vio_close_pipe(Vio * vio);
+#else
+#define HANDLE void *
+#endif /* __WIN__ */
+
void vio_delete(Vio* vio);
+int vio_close(Vio* vio);
#ifdef EMBEDDED_LIBRARY
void vio_reset(Vio *vio);
@@ -57,71 +63,73 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
my_socket sd, HANDLE hPipe, my_bool localhost);
#endif
-/*
- * vio_read and vio_write should have the same semantics
- * as read(2) and write(2).
- */
int vio_read(Vio *vio, gptr buf, int size);
int vio_write(Vio *vio, const gptr buf, int size);
-/*
- * Whenever the socket is set to blocking mode or not.
- */
int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode);
my_bool vio_is_blocking(Vio *vio);
-/*
- * setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible.
- */
+/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
int vio_fastsend(Vio *vio);
-/*
- * setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible.
- */
+/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
int vio_keepalive(Vio *vio, my_bool onoff);
-/*
- * Whenever we should retry the last read/write operation.
- */
+/* Whenever we should retry the last read/write operation. */
my_bool vio_should_retry(Vio *vio);
-/*
- * When the workday is over...
- */
-int vio_close(Vio* vio);
-/*
- * Short text description of the socket for those, who are curious..
- */
+/* Short text description of the socket for those, who are curious.. */
const char* vio_description(Vio *vio);
-
/* Return the type of the connection */
enum enum_vio_type vio_type(Vio* vio);
-
/* Return last error number */
-int vio_errno(Vio*vio);
-
+int vio_errno(Vio*vio);
/* Get socket number */
my_socket vio_fd(Vio*vio);
+/* Remote peer's address and name in text form */
+my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
+/* Remotes in_addr */
+void vio_in_addr(Vio *vio, struct in_addr *in);
+my_bool vio_poll_read(Vio *vio,uint timeout);
+void vio_timeout(Vio *vio,uint timeout);
-/*
- * Remote peer's address and name in text form.
- */
-my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
+#ifdef HAVE_OPENSSL
+#define HEADER_DES_LOCL_H dummy_something
+#include <openssl/ssl.h>
+#include <openssl/err.h>
-/* Remotes in_addr */
+struct st_VioSSLAcceptorFd
+{
+ SSL_CTX *ssl_context;
+ SSL_METHOD *ssl_method;
+ struct st_VioSSLAcceptorFd *session_id_context;
+};
-void vio_in_addr(Vio *vio, struct in_addr *in);
+/* One copy for client */
+struct st_VioSSLConnectorFd
+{
+ SSL_CTX *ssl_context;
+ /* function pointers which are only once for SSL client */
+ SSL_METHOD *ssl_method;
+};
-my_bool vio_poll_read(Vio *vio,uint timeout);
+int sslaccept(struct st_VioSSLAcceptorFd*, Vio *, long timeout);
+int sslconnect(struct st_VioSSLConnectorFd*, Vio *, long timeout);
-#ifdef __cplusplus
-}
-#endif
+struct st_VioSSLConnectorFd
+*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
+ const char *ca_file, const char *ca_path,
+ const char *cipher);
+struct st_VioSSLAcceptorFd
+*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
+ const char *ca_file,const char *ca_path,
+ const char *cipher);
+Vio *new_VioSSL(struct st_VioSSLAcceptorFd *fd, Vio *sd, int state);
+#endif /* HAVE_OPENSSL */
#ifdef HAVE_SMEM
int vio_read_shared_memory(Vio *vio, gptr buf, int size);
int vio_write_shared_memory(Vio *vio, const gptr buf, int size);
int vio_close_shared_memory(Vio * vio);
#endif
-#ifdef __WIN__
-int vio_read_pipe(Vio *vio, gptr buf, int size);
-int vio_write_pipe(Vio *vio, const gptr buf, int size);
-int vio_close_pipe(Vio * vio);
+
+#ifdef __cplusplus
+}
#endif
#if defined(HAVE_VIO) && !defined(DONT_MAP_VIO)
@@ -138,77 +146,9 @@ int vio_close_pipe(Vio * vio);
#define vio_close(vio) ((vio)->vioclose)(vio)
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
+#define vio_timeout(vio, seconds) (vio)->timeout(vio, seconds)
#endif /* defined(HAVE_VIO) && !defined(DONT_MAP_VIO) */
-#ifdef HAVE_OPENSSL
-#define HEADER_DES_LOCL_H dummy_something
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include "my_net.h" /* needed because of struct in_addr */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-void vio_ssl_delete(Vio* vio);
-
-int vio_ssl_read(Vio* vio,gptr buf, int size);
-int vio_ssl_write(Vio* vio,const gptr buf,int size);
-
-/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible. */
- int vio_ssl_fastsend(Vio* vio);
-/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible. */
-int vio_ssl_keepalive(Vio* vio, my_bool onoff);
-/* Whenever we should retry the last read/write operation. */
-my_bool vio_ssl_should_retry(Vio* vio);
-/* When the workday is over... */
-int vio_ssl_close(Vio* vio);
-/* Return last error number */
-int vio_ssl_errno(Vio *vio);
-my_bool vio_ssl_peer_addr(Vio* vio, char *buf, uint16 *port);
-void vio_ssl_in_addr(Vio *vio, struct in_addr *in);
-int vio_ssl_blocking(Vio * vio, my_bool set_blocking_mode, my_bool *old_mode);
-
-/* Single copy for server */
-enum vio_ssl_acceptorfd_state
-{
- state_connect = 1,
- state_accept = 2
-};
-
-struct st_VioSSLAcceptorFd
-{
- SSL_CTX* ssl_context_;
- SSL_METHOD* ssl_method_;
- struct st_VioSSLAcceptorFd* session_id_context_;
-};
-
-/* One copy for client */
-struct st_VioSSLConnectorFd
-{
- SSL_CTX* ssl_context_;
- /* function pointers which are only once for SSL client */
- SSL_METHOD* ssl_method_;
-};
-
-int sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout);
-int sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout);
-
-struct st_VioSSLConnectorFd
-*new_VioSSLConnectorFd(const char* key_file, const char* cert_file,
- const char* ca_file, const char* ca_path,
- const char* cipher);
-struct st_VioSSLAcceptorFd
-*new_VioSSLAcceptorFd(const char* key_file, const char* cert_file,
- const char* ca_file,const char* ca_path,
- const char* cipher);
-Vio* new_VioSSL(struct st_VioSSLAcceptorFd* fd, Vio* sd,int state);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* HAVE_OPENSSL */
-
/* This enumerator is used in parser - should be always visible */
enum SSL_type
{
@@ -237,7 +177,7 @@ struct st_vio
void (*viodelete)(Vio*);
int (*vioerrno)(Vio*);
int (*read)(Vio*, gptr, int);
- int (*write)(Vio*, const gptr, int);
+ int (*write)(Vio*, gptr, int);
int (*vioblocking)(Vio*, my_bool, my_bool *);
my_bool (*is_blocking)(Vio*);
int (*viokeepalive)(Vio*, my_bool);
@@ -246,20 +186,18 @@ struct st_vio
void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*);
int (*vioclose)(Vio*);
-
-#ifdef HAVE_OPENSSL
- SSL* ssl_;
-#endif /* HAVE_OPENSSL */
+ void (*timeout)(Vio*, unsigned int timeout);
+ void *ssl_arg;
#ifdef HAVE_SMEM
- HANDLE handle_file_map;
- char *handle_map;
- HANDLE event_server_wrote;
- HANDLE event_server_read;
- HANDLE event_client_wrote;
- HANDLE event_client_read;
- long shared_memory_remain;
- char *shared_memory_pos;
- NET *net;
+ HANDLE handle_file_map;
+ char *handle_map;
+ HANDLE event_server_wrote;
+ HANDLE event_server_read;
+ HANDLE event_client_wrote;
+ HANDLE event_client_read;
+ long shared_memory_remain;
+ char *shared_memory_pos;
+ NET *net;
#endif /* HAVE_SMEM */
#endif /* HAVE_VIO */
};
diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c
index d8a0959e47f..1af9336ce72 100644
--- a/innobase/btr/btr0btr.c
+++ b/innobase/btr/btr0btr.c
@@ -2376,8 +2376,15 @@ btr_index_rec_validate(
type = dict_index_get_nth_type(index, i);
- if (len != UNIV_SQL_NULL && dtype_is_fixed_size(type)
- && len != dtype_get_fixed_size(type)) {
+ if ((dict_index_get_nth_field(index, i)->prefix_len == 0
+ && len != UNIV_SQL_NULL && dtype_is_fixed_size(type)
+ && len != dtype_get_fixed_size(type))
+ ||
+ (dict_index_get_nth_field(index, i)->prefix_len > 0
+ && len != UNIV_SQL_NULL && dtype_is_fixed_size(type)
+ && len !=
+ dict_index_get_nth_field(index, i)->prefix_len)) {
+
fprintf(stderr,
"InnoDB: Record in index %s in table %s, page %lu, at offset %lu\n"
"InnoDB: field %lu len is %lu, should be %lu\n",
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 924fa3ecf95..a576a886b97 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -1596,6 +1596,13 @@ dict_index_build_internal_clust(
break;
}
+ if (dict_index_get_nth_field(new_index, i)->prefix_len
+ > 0) {
+ new_index->trx_id_offset = 0;
+
+ break;
+ }
+
new_index->trx_id_offset += fixed_size;
}
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index e31fd1d9efe..f4f50320906 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -226,13 +226,8 @@ os_file_get_last_error(void)
"InnoDB: the directory. It may also be you have created a subdirectory\n"
"InnoDB: of the same name as a data file.\n");
} else {
- if (strerror((int)err) != NULL) {
- fprintf(stderr,
- "InnoDB: Error number %lu means '%s'.\n", err, strerror((int)err));
- }
-
fprintf(stderr,
- "InnoDB: See also section 13.2 at http://www.innodb.com/ibman.html\n"
+ "InnoDB: See section 13.2 at http://www.innodb.com/ibman.html\n"
"InnoDB: about operating system error numbers.\n");
}
}
diff --git a/isam/_search.c b/isam/_search.c
index 1ceeab1e824..7b61abfb46b 100644
--- a/isam/_search.c
+++ b/isam/_search.c
@@ -119,7 +119,7 @@ int _nisam_search(register N_INFO *info, register N_KEYDEF *keyinfo, uchar *key,
{
keypos=_nisam_get_last_key(info,keyinfo,buff,lastkey,keypos);
if (!(nextflag & SEARCH_SMALLER) &&
- _nisam_key_cmp(keyinfo->seg, info->lastkey, key, key_len, SEARCH_FIND))
+ _nisam_key_cmp(keyinfo->seg, lastkey, key, key_len, SEARCH_FIND))
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
goto err;
diff --git a/isam/open.c b/isam/open.c
index 48fab27cac1..9dc27981507 100644
--- a/isam/open.c
+++ b/isam/open.c
@@ -415,6 +415,9 @@ static void setup_functions(register ISAM_SHARE *share)
share->read_rnd=_nisam_read_rnd_dynamic_record;
share->delete_record=_nisam_delete_dynamic_record;
share->compare_record=_nisam_cmp_dynamic_record;
+
+ /* add bits used to pack data to pack_reclength for faster allocation */
+ share->base.pack_reclength+= share->base.pack_bits;
if (share->base.blobs)
{
share->update_record=_nisam_update_blob_record;
diff --git a/isam/test_all.res b/isam/test_all.res
index f6280dd9f98..5de37e44585 100644
--- a/isam/test_all.res
+++ b/isam/test_all.res
@@ -1,367 +1,30 @@
+echo "test2 -L -K -W -P"
test2 -L -K -W -P
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
-Write cacheing used
-Locking used
+echo "test2 -L -K -W -P -A"
test2 -L -K -W -P -A
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
-Write cacheing used
-Asyncron io with locking used
+echo "test2 -L -K -W -P -S -R1 -m500"
test2 -L -K -W -P -S -R1 -m500
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 475
-Update records: 44
-Same-key-read: 4
-Delete records: 475
-Record pointer size: 1
-Key cacheing used
-Write cacheing used
-Locking used
-test2 -L -K -R1 -m2000 ; Should give error 135
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Read first - delete - next -> last
-- Read last - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 1647
-Update records: 125
-Same-key-read: 8
-Delete records: 1647
-Record pointer size: 1
-Key cacheing used
-Locking used
+echo "test2 -L -K -R1 -m2000 ; Should give error 135"
+test2 -L -K -R1 -m2000
+echo "test2 -L -K -P -S -R3 -m50 -b1000000"
test2 -L -K -P -S -R3 -m50 -b1000000
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 50
-Update records: 5
-Same-key-read: 2
-Delete records: 50
-Record pointer size: 3
-Key cacheing used
-Locking used
+echo "test2 -L -B"
test2 -L -B
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 903
-Update records: 86
-Same-key-read: 5
-Delete records: 903
-Locking used
-blobs used
+echo "test2 -L -K -W -P -m50 -l"
test2 -L -K -W -P -m50 -l
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 50
-Update records: 5
-Same-key-read: 2
-Delete records: 50
-Key cacheing used
-Write cacheing used
-Locking used
-Commands Used count Errors Recover errors
-open 14 0 0
-write 700 0 0
-update 70 0 0
-delete 700 0 0
-close 14 0 0
-extra 84 0 0
-Total 1582 0 0
+isamlog
+echo "test2 -L -K -W -P -m50 -l -b100"
test2 -L -K -W -P -m50 -l -b100
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 50
-Update records: 5
-Same-key-read: 2
-Delete records: 50
-Key cacheing used
-Write cacheing used
-Locking used
-Commands Used count Errors Recover errors
-open 15 0 0
-write 750 0 0
-update 75 0 0
-delete 750 0 0
-close 15 0 0
-extra 90 0 0
-Total 1695 0 0
+isamlog
+echo "time test2"
time test2
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
+echo "time test2 -K"
time test2 -K
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
+echo "time test2 -L"
time test2 -L
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Locking used
+echo "time test2 -L -K"
time test2 -L -K
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
-Locking used
+echo "time test2 -L -K -W"
time test2 -L -K -W
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
-Write cacheing used
-Locking used
+echo "time test2 -L -K -W -S"
time test2 -L -K -W -S
-- Creating isam-file
-- Writing key:s
-- Delete
-- Update
-- Same key: first - next -> last - prev -> first
-- All keys: first - next -> last - prev -> first
-- Test if: Read first - next - prev - prev - next == first
-- Test if: Read last - prev - next - next - prev == last
-- Test read key-part
-- Read key (first) - next - delete - next -> last
-- Read last of key - prev - delete - prev -> first
-- Test if: Read rrnd - same
-- Test nisam_records_in_range
-- nisam_info
-- nisam_extra(CACHE) + nisam_rrnd.... + nisam_extra(NO_CACHE)
-- Removing keys
-
-Following test have been made:
-Write records: 907
-Update records: 87
-Same-key-read: 6
-Delete records: 907
-Key cacheing used
-Write cacheing used
-Locking used
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index 0125bd2b98d..3e026fe589a 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -42,7 +42,7 @@ link_sources:
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; \
done; \
- for f in $$vs; do \
+ for f in $$vs $(vioheaders); do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(srcdir)/../vio/$$f $(srcdir)/$$f; \
done; \
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index 9a5869c47ff..1d431fa3624 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -47,6 +47,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
mystringsextra= strto.c
dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo
mysysheaders = mysys_priv.h my_static.h
+vioheaders = vio_priv.h
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
my_read.lo my_write.lo errors.lo \
@@ -88,7 +89,7 @@ clean-local:
`echo $(vio_objects) | sed "s;\.lo;.c;g"` \
`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"` \
$(CHARSET_SRCS) $(CHARSET_OBJS) \
- $(mystringsextra) $(mysysheaders) \
+ $(mystringsextra) $(mysysheaders) $(vioheaders)\
../linked_client_sources net.c
conf_to_src_SOURCES = conf_to_src.c
diff --git a/libmysql/dll.c b/libmysql/dll.c
index f0a67d8f091..92aa611000b 100644
--- a/libmysql/dll.c
+++ b/libmysql/dll.c
@@ -112,12 +112,13 @@ int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize,
#ifdef OS2
-//
-// This function is called automatically by _DLL_InitTerm
-// Every dll runtime enviroment is not tz enabled, so tzset()
-// must be called to enable TZ handling
-// Also timezone is fixed.
-//
+/*
+ This function is called automatically by _DLL_InitTerm
+ Every dll runtime enviroment is not tz enabled, so tzset()
+ must be called to enable TZ handling
+ Also timezone is fixed.
+*/
+
extern "C" unsigned long _System DllMain(unsigned long modhandle,
unsigned long flag)
{
diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c
index bbb85885886..d1fec68e4a9 100644
--- a/libmysql/errmsg.c
+++ b/libmysql/errmsg.c
@@ -26,24 +26,24 @@ const char *client_errors[]=
{
"Unbekannter MySQL Fehler",
"Kann UNIX-Socket nicht anlegen (%d)",
- "Keine Verbindung zu lokalem MySQL Server, socket: '%-.64s' (%d)",
- "Keine Verbindung zu MySQL Server auf %-.64s (%d)",
+ "Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
+ "Keine Verbindung zu MySQL Server auf %-.100s (%d)",
"Kann TCP/IP-Socket nicht anlegen (%d)",
- "Unbekannter MySQL Server Host (%-.64s) (%d)",
+ "Unbekannter MySQL Server Host (%-.100s) (%d)",
"MySQL Server nicht vorhanden",
"Protokolle ungleich. Server Version = % d Client Version = %d",
"MySQL client got out of memory",
"Wrong host info",
"Localhost via UNIX socket",
- "%-.64s via TCP/IP",
+ "%-.100s via TCP/IP",
"Error in server handshake",
"Lost connection to MySQL server during query",
"Commands out of sync; You can't run this command now",
- "Verbindung ueber Named Pipe; Host: %-.64s",
+ "Verbindung ueber Named Pipe; Host: %-.100s",
"Kann nicht auf Named Pipe warten. Host: %-.64s pipe: %-.32s (%lu)",
"Kann Named Pipe nicht oeffnen. Host: %-.64s pipe: %-.32s (%lu)",
"Kann den Status der Named Pipe nicht setzen. Host: %-.64s pipe: %-.32s (%lu)",
- "Can't initialize character set %-.64s (path: %-.64s)",
+ "Can't initialize character set %-.32s (path: %-.100s)",
"Got packet bigger than 'max_allowed_packet'",
"Embedded server",
"Error on SHOW SLAVE STATUS:",
@@ -81,24 +81,24 @@ const char *client_errors[]=
{
"Erro desconhecido do MySQL",
"Não pode criar 'UNIX socket' (%d)",
- "Não pode se conectar ao servidor MySQL local através do 'socket' '%-.64s' (%d)",
- "Não pode se conectar ao servidor MySQL em '%-.64s' (%d)",
+ "Não pode se conectar ao servidor MySQL local através do 'socket' '%-.100s' (%d)",
+ "Não pode se conectar ao servidor MySQL em '%-.100s' (%d)",
"Não pode criar 'socket TCP/IP' (%d)",
- "'Host' servidor MySQL '%-.64s' (%d) desconhecido",
+ "'Host' servidor MySQL '%-.100s' (%d) desconhecido",
"Servidor MySQL desapareceu",
"Incompatibilidade de protocolos. Versão do Servidor: %d - Versão do Cliente: %d",
"Cliente do MySQL com falta de memória",
"Informação inválida de 'host'",
"Localhost via 'UNIX socket'",
- "%-.64s via 'TCP/IP'",
+ "%-.100s via 'TCP/IP'",
"Erro na negociação de acesso ao servidor",
"Conexão perdida com servidor MySQL durante 'query'",
"Comandos fora de sincronismo. Você não pode executar este comando agora",
- "%-.64s via 'named pipe'",
+ "%-.100s via 'named pipe'",
"Não pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
"Não pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
"Não pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
- "Não pode inicializar conjunto de caracteres %-.64s (caminho %-.64s)",
+ "Não pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
"Obteve pacote maior do que 'max_allowed_packet'",
"Embedded server"
"Error on SHOW SLAVE STATUS:",
@@ -134,24 +134,24 @@ const char *client_errors[]=
{
"Unknown MySQL error",
"Can't create UNIX socket (%d)",
- "Can't connect to local MySQL server through socket '%-.64s' (%d)",
- "Can't connect to MySQL server on '%-.64s' (%d)",
+ "Can't connect to local MySQL server through socket '%-.100s' (%d)",
+ "Can't connect to MySQL server on '%-.100s' (%d)",
"Can't create TCP/IP socket (%d)",
- "Unknown MySQL Server Host '%-.64s' (%d)",
+ "Unknown MySQL Server Host '%-.100s' (%d)",
"MySQL server has gone away",
"Protocol mismatch. Server Version = %d Client Version = %d",
"MySQL client run out of memory",
"Wrong host info",
"Localhost via UNIX socket",
- "%-.64s via TCP/IP",
+ "%-.100s via TCP/IP",
"Error in server handshake",
"Lost connection to MySQL server during query",
"Commands out of sync; You can't run this command now",
- "%-.64s via named pipe",
+ "%-.100s via named pipe",
"Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)",
"Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)",
"Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)",
- "Can't initialize character set %-.64s (path: %-.64s)",
+ "Can't initialize character set %-.32s (path: %-.100s)",
"Got packet bigger than 'max_allowed_packet'",
"Embedded server",
"Error on SHOW SLAVE STATUS:",
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 19cfedce51d..c8859484f8b 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -155,9 +155,16 @@ void STDCALL mysql_server_end()
{
/* If library called my_init(), free memory allocated by it */
if (!org_my_init_done)
+ {
my_end(0);
+#ifndef THREAD
+ /* Remove TRACING, if enabled by mysql_debug() */
+ DBUG_POP();
+#endif
+ }
else
mysql_thread_end();
+ mysql_client_init= org_my_init_done= 0;
}
#endif /*EMBEDDED_LIBRARY*/
diff --git a/myisam/ft_dump.c b/myisam/ft_dump.c
index 57ae67c7a02..183068789fe 100644
--- a/myisam/ft_dump.c
+++ b/myisam/ft_dump.c
@@ -130,7 +130,11 @@ int main(int argc,char *argv[])
if (subkeys >= 0)
weight=*(float*)&subkeys;
+#ifdef HAVE_SNPRINTF
snprintf(buf,MAX_LEN,"%.*s",(int) keylen,info->lastkey+1);
+#else
+ sprintf(buf,"%.*s",(int) keylen,info->lastkey+1);
+#endif
my_casedn_str(default_charset_info,buf);
total++;
lengths[keylen]++;
diff --git a/myisam/ft_nlq_search.c b/myisam/ft_nlq_search.c
index b1d7d67ae79..690ad0fc453 100644
--- a/myisam/ft_nlq_search.c
+++ b/myisam/ft_nlq_search.c
@@ -68,6 +68,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
uint keylen, r, doc_cnt;
FT_SUPERDOC sdoc, *sptr;
TREE_ELEMENT *selem;
+ double gweight=1;
MI_INFO *info=aio->info;
uchar *keybuff=aio->keybuff;
MI_KEYDEF *keyinfo=info->s->keyinfo+aio->keynr;
@@ -89,7 +90,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
r=_mi_search(info, keyinfo, keybuff, keylen, SEARCH_FIND, key_root);
info->update|= HA_STATE_AKTIV; /* for _mi_test_if_changed() */
- while (!r)
+ while (!r && gweight)
{
if (keylen &&
@@ -138,6 +139,10 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
doc_cnt++;
+ gweight=word->weight*GWS_IN_USE;
+ if (gweight < 0 || doc_cnt > 2000000)
+ gweight=0;
+
if (_mi_test_if_changed(info) == 0)
r=_mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length,
SEARCH_BIGGER, key_root);
@@ -145,13 +150,8 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
r=_mi_search(info, keyinfo, info->lastkey, info->lastkey_length,
SEARCH_BIGGER, key_root);
}
- if (doc_cnt)
- {
- word->weight*=GWS_IN_USE;
- if (word->weight < 0)
- word->weight=0;
+ word->weight=gweight;
- }
DBUG_RETURN(0);
}
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 60053674647..cb2b56d93de 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -36,7 +36,7 @@
/* Functions defined in this file */
static int check_k_link(MI_CHECK *param, MI_INFO *info,uint nr);
-static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
+static int chk_index(MI_CHECK *param, MI_INFO *info,MI_KEYDEF *keyinfo,
my_off_t page, uchar *buff, ha_rows *keys,
ha_checksum *key_checksum, uint level);
static uint isam_key_length(MI_INFO *info,MI_KEYDEF *keyinfo);
@@ -1498,6 +1498,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
File new_file;
my_off_t index_pos[MI_MAX_POSSIBLE_KEY];
uint r_locks,w_locks;
+ int old_lock;
MYISAM_SHARE *share=info->s;
MI_STATE_INFO old_state;
DBUG_ENTER("sort_index");
@@ -1541,8 +1542,11 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
flush_key_blocks(share->kfile, FLUSH_IGNORE_CHANGED);
share->state.version=(ulong) time((time_t*) 0);
- old_state=share->state; /* save state if not stored */
- r_locks=share->r_locks; w_locks=share->w_locks;
+ old_state= share->state; /* save state if not stored */
+ r_locks= share->r_locks;
+ w_locks= share->w_locks;
+ old_lock= info->lock_type;
+
/* Put same locks as old file */
share->r_locks= share->w_locks= share->tot_locks= 0;
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
@@ -1553,12 +1557,13 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
MYF(0)) ||
mi_open_keyfile(share))
goto err2;
- info->lock_type=F_UNLCK; /* Force mi_readinfo to lock */
+ info->lock_type= F_UNLCK; /* Force mi_readinfo to lock */
_mi_readinfo(info,F_WRLCK,0); /* Will lock the table */
- info->lock_type=F_WRLCK;
- share->r_locks=r_locks; share->w_locks=w_locks;
+ info->lock_type= old_lock;
+ share->r_locks= r_locks;
+ share->w_locks= w_locks;
share->tot_locks= r_locks+w_locks;
- share->state=old_state; /* Restore old state */
+ share->state= old_state; /* Restore old state */
info->state->key_file_length=param->new_file_pos;
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
@@ -3818,6 +3823,9 @@ void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
tmp=records;
else
tmp= (records + (count+1)/2) / (count+1);
+ /* for some weird keys (e.g. FULLTEXT) tmp can be <1 here.
+ let's ensure it is not */
+ set_if_bigger(tmp,1);
if (tmp >= (ulonglong) ~(ulong) 0)
tmp=(ulonglong) ~(ulong) 0;
*rec_per_key_part=(ulong) tmp;
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 26bb23c3a7f..0982e5bdaf6 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -303,7 +303,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
keydef->seg[0].type == (int) HA_KEYTYPE_NUM)
keydef->seg[0].flag&= ~HA_SPACE_PACK;
- /* Only use HA_PACK_KEY if the first segment is a variable length key */
+ /* Only use HA_PACK_KEY when first segment is a variable length key */
if (!(keydef->seg[0].flag & (HA_SPACE_PACK | HA_BLOB_PART |
HA_VAR_LENGTH)))
{
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c
index faf86c3ffbd..86d648a5af0 100644
--- a/myisam/mi_dynrec.c
+++ b/myisam/mi_dynrec.c
@@ -17,6 +17,7 @@
/* Functions to handle space-packed-records and blobs */
#include "myisamdef.h"
+#include <assert.h>
/* Enough for comparing if number is zero */
static char zero_string[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
@@ -58,11 +59,11 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record)
{
byte *rec_buff;
int error;
- ulong reclength,extra;
+ ulong reclength,reclength2,extra;
extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER+1);
- reclength= (info->s->base.pack_reclength + info->s->base.pack_bits +
+ reclength= (info->s->base.pack_reclength +
_my_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MI_DYN_MAX_ROW_LENGTH)
@@ -76,10 +77,13 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record)
my_errno=ENOMEM;
return(-1);
}
- reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
- record);
+ reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
+ record);
+ DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
+ reclength, reclength2));
+ DBUG_ASSERT(reclength2 <= reclength);
error=write_dynamic_record(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
- reclength);
+ reclength2);
my_afree(rec_buff);
return(error);
}
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c
index 22772a3dd2e..18daebffa85 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -35,6 +35,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
MYISAM_SHARE *share=info->s;
uint flag;
DBUG_ENTER("mi_lock_database");
+ DBUG_PRINT("info",("lock_type: %d", lock_type));
if (share->options & HA_OPTION_READ_ONLY_DATA ||
info->lock_type == lock_type)
@@ -53,6 +54,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
{
switch (lock_type) {
case F_UNLCK:
+ DBUG_PRINT("info", ("old lock: %d", info->lock_type));
if (info->lock_type == F_RDLCK)
count= --share->r_locks;
else
@@ -106,19 +108,22 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if (error)
mi_mark_crashed(info);
}
- if (share->r_locks)
- { /* Only read locks left */
- flag=1;
- if (my_lock(share->kfile,F_RDLCK,0L,F_TO_EOF,
- MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error)
- error=my_errno;
- }
- else if (!share->w_locks)
- { /* No more locks */
- flag=1;
- if (my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
- MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error)
- error=my_errno;
+ if (info->lock_type != F_EXTRA_LCK)
+ {
+ if (share->r_locks)
+ { /* Only read locks left */
+ flag=1;
+ if (my_lock(share->kfile,F_RDLCK,0L,F_TO_EOF,
+ MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error)
+ error=my_errno;
+ }
+ else if (!share->w_locks)
+ { /* No more locks */
+ flag=1;
+ if (my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
+ MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error)
+ error=my_errno;
+ }
}
}
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 5d8f384a5af..e2f0d023ff4 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -633,7 +633,7 @@ byte *mi_alloc_rec_buff(MI_INFO *info, ulong length, byte **buf)
/* to simplify initial init of info->rec_buf in mi_open and mi_extra */
if (length == (ulong) -1)
{
- length= max(info->s->base.pack_reclength+info->s->base.pack_bits,
+ length= max(info->s->base.pack_reclength,
info->s->base.max_key_length);
/* Avoid unnecessary realloc */
if (newptr && length == old_length)
@@ -688,6 +688,8 @@ void mi_setup_functions(register MYISAM_SHARE *share)
share->compare_unique=_mi_cmp_dynamic_unique;
share->calc_checksum= mi_checksum;
+ /* add bits used to pack data to pack_reclength for faster allocation */
+ share->base.pack_reclength+= share->base.pack_bits;
if (share->base.blobs)
{
share->update_record=_mi_update_blob_record;
diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c
index 66cfd169026..7557bb8749f 100644
--- a/myisam/mi_packrec.c
+++ b/myisam/mi_packrec.c
@@ -165,7 +165,9 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
diff_length=(int) rec_reflength - (int) share->base.rec_reflength;
if (fix_keys)
share->rec_reflength=rec_reflength;
- share->base.min_block_length=share->min_pack_length+share->pack.ref_length;
+ share->base.min_block_length=share->min_pack_length+1;
+ if (share->min_pack_length > 254)
+ share->base.min_block_length+=2;
if (!(share->decode_trees=(MI_DECODE_TREE*)
my_malloc((uint) (trees*sizeof(MI_DECODE_TREE)+
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index 7e8577c0656..7f4c90d1bc1 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -810,9 +810,10 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
register uchar **page_pos, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
- uchar *start_key,*page=*page_pos,*page_end,*from,*from_end;
+ uchar *start_key,*page,*page_end,*from,*from_end;
uint length,tmp;
+ page= *page_pos;
page_end=page+MI_MAX_KEY_BUFF+1;
start_key=key;
@@ -868,7 +869,9 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
length-=tmp;
from=page; from_end=page_end;
}
- memcpy((byte*) key,(byte*) from,(size_t) length);
+ DBUG_PRINT("info",("key: %lx from: %lx length: %u",
+ key, from, length));
+ memcpy_overlap((byte*) key, (byte*) from, (size_t) length);
key+=length;
from+=length;
}
@@ -1590,6 +1593,9 @@ _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
uint length,key_length,ref_length;
s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag;
+#ifdef HAVE_purify
+ s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
+#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
diff --git a/myisam/mi_test_all.sh b/myisam/mi_test_all.sh
index a2d57ea1a83..07e71d65675 100755
--- a/myisam/mi_test_all.sh
+++ b/myisam/mi_test_all.sh
@@ -3,7 +3,9 @@
# Execute some simple basic test on MyISAM libary to check if things
# works at all.
+valgrind="valgrind --alignment=8 --leak-check=yes"
silent="-s"
+
if test -f mi_test1$MACH ; then suffix=$MACH else suffix=""; fi
mi_test1$suffix $silent
myisamchk$suffix -se test1
diff --git a/myisam/mi_write.c b/myisam/mi_write.c
index 6985dac7832..8e0b7e3530c 100644
--- a/myisam/mi_write.c
+++ b/myisam/mi_write.c
@@ -930,4 +930,3 @@ void mi_end_bulk_insert(MI_INFO *info)
info->bulk_insert=0;
}
}
-
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index 43ade35bfd5..b2fdb2ccf3f 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -804,15 +804,18 @@ static int myisamchk(MI_CHECK *param, my_string filename)
!(param->testflag & T_CHECK_ONLY_CHANGED))))
need_to_check=1;
- if ((param->testflag & T_STATISTICS) &&
- (share->state.changed & STATE_NOT_ANALYZED))
- need_to_check=1;
- if ((param->testflag & T_SORT_INDEX) &&
- (share->state.changed & STATE_NOT_SORTED_PAGES))
- need_to_check=1;
- if ((param->testflag & T_REP_BY_SORT) &&
- (share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
- need_to_check=1;
+ if (info->s->base.keys && info->state->records)
+ {
+ if ((param->testflag & T_STATISTICS) &&
+ (share->state.changed & STATE_NOT_ANALYZED))
+ need_to_check=1;
+ if ((param->testflag & T_SORT_INDEX) &&
+ (share->state.changed & STATE_NOT_SORTED_PAGES))
+ need_to_check=1;
+ if ((param->testflag & T_REP_BY_SORT) &&
+ (share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
+ need_to_check=1;
+ }
if ((param->testflag & T_CHECK_ONLY_CHANGED) &&
(share->state.changed & (STATE_CHANGED | STATE_CRASHED |
STATE_CRASHED_ON_REPAIR)))
@@ -892,6 +895,11 @@ static int myisamchk(MI_CHECK *param, my_string filename)
param->error_printed=0;
goto end2;
}
+ /*
+ _mi_readinfo() has locked the table.
+ We mark the table as locked (without doing file locks) to be able to
+ use functions that only works on locked tables (like row caching).
+ */
mi_lock_database(info, F_EXTRA_LCK);
datafile=info->dfile;
@@ -1410,23 +1418,24 @@ static int mi_sort_records(MI_CHECK *param,
if (!(((ulonglong) 1 << sort_key) & share->state.key_map))
{
- mi_check_print_error(param,"Can't sort table '%s' on key %d; No such key",
+ mi_check_print_warning(param,
+ "Can't sort table '%s' on key %d; No such key",
name,sort_key+1);
param->error_printed=0;
- DBUG_RETURN(-1);
+ DBUG_RETURN(0); /* Nothing to do */
}
if (keyinfo->flag & HA_FULLTEXT)
{
- mi_check_print_error(param,"Can't sort table '%s' on FULLTEXT key %d",
- name,sort_key+1);
+ mi_check_print_warning(param,"Can't sort table '%s' on FULLTEXT key %d",
+ name,sort_key+1);
param->error_printed=0;
- DBUG_RETURN(-1);
+ DBUG_RETURN(0); /* Nothing to do */
}
if (share->data_file_type == COMPRESSED_RECORD)
{
- mi_check_print_error(param,"Can't sort read-only table '%s'", name);
+ mi_check_print_warning(param,"Can't sort read-only table '%s'", name);
param->error_printed=0;
- DBUG_RETURN(-1);
+ DBUG_RETURN(0); /* Nothing to do */
}
if (!(param->testflag & T_SILENT))
{
diff --git a/myisam/myisamlog.c b/myisam/myisamlog.c
index 4bb7cc55d30..ca164fcdaca 100644
--- a/myisam/myisamlog.c
+++ b/myisam/myisamlog.c
@@ -414,8 +414,16 @@ static int examine_log(my_string file_name, char **table_names)
VOID(tree_walk(&tree,(tree_walk_action) test_if_open,(void*) &open_param,
left_root_right));
file_info.id=open_param.max_id+1;
+ /*
+ * In the line below +10 is added to accomodate '<' and '>' chars
+ * plus '\0' at the end, so that there is place for 7 digits.
+ * It is improbable that same table can have that many entries in
+ * the table cache.
+ * The additional space is needed for the sprintf commands two lines
+ * below.
+ */
file_info.show_name=my_memdup(isam_file_name,
- (uint) strlen(isam_file_name)+6,
+ (uint) strlen(isam_file_name)+10,
MYF(MY_WME));
if (file_info.id > 1)
sprintf(strend(file_info.show_name),"<%d>",file_info.id);
diff --git a/mysql-test/include/check_var_limit.inc b/mysql-test/include/check_var_limit.inc
new file mode 100644
index 00000000000..f955aeb345e
--- /dev/null
+++ b/mysql-test/include/check_var_limit.inc
@@ -0,0 +1,9 @@
+#
+# Check that second part of $LIMIT is between $MIN_LIMIT and $MAX_LIMIT
+# This is useful to check that a variable from SHOW_VARIABLES is within
+# certain limits. Check query_cache_merge.test for an example of using this.
+#
+-- require r/check_var_limit.require
+disable_query_log;
+eval select SUBSTRING_INDEX("$LIMIT", "\\t", -1) BETWEEN $MIN_LIMIT AND $MAX_LIMIT as "limit";
+enable_query_log;
diff --git a/mysql-test/include/have_openssl_2.inc b/mysql-test/include/have_openssl_2.inc
deleted file mode 100644
index 9671ce29573..00000000000
--- a/mysql-test/include/have_openssl_2.inc
+++ /dev/null
@@ -1,4 +0,0 @@
--- require r/have_openssl_2.require
-disable_query_log;
-SHOW STATUS LIKE "Ssl_cipher";
-enable_query_log;
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index f11cad4a13e..8772e080874 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -16,6 +16,9 @@ USE_MANAGER=0
MY_TZ=GMT-3
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
+# For query_cache test
+ulimit -n 1024
+
#++
# Program Definitions
#--
@@ -253,12 +256,6 @@ while test $# -gt 0; do
--start-and-exit)
START_AND_EXIT=1
;;
- --skip-innodb)
- EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-innodb"
- EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-innodb" ;;
- --skip-bdb)
- EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-bdb"
- EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-bdb" ;;
--skip-rpl) NO_SLAVE=1 ;;
--skip-test=*) SKIP_TEST=`$ECHO "$1" | $SED -e "s;--skip-test=;;"`;;
--do-test=*) DO_TEST=`$ECHO "$1" | $SED -e "s;--do-test=;;"`;;
@@ -835,7 +832,6 @@ start_master()
/bin/sh $master_init_script
fi
cd $BASEDIR # for gcov
- #start master
if [ -z "$DO_BENCH" ]
then
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
@@ -854,6 +850,7 @@ start_master()
--tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \
--innodb_data_file_path=ibdata1:50M \
+ --open-files-limit=1024 \
$MASTER_40_ARGS \
$SMALL_SERVER \
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
@@ -1372,6 +1369,9 @@ fi
$ECHO "Starting Tests"
+#
+# This can probably be deleted
+#
if [ "$DO_BENCH" = 1 ]
then
BENCHDIR=$BASEDIR/sql-bench/
diff --git a/mysql-test/r/check_var_limit.require b/mysql-test/r/check_var_limit.require
new file mode 100644
index 00000000000..01a59782180
--- /dev/null
+++ b/mysql-test/r/check_var_limit.require
@@ -0,0 +1,2 @@
+limit
+1
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index e3a0d066a85..a58c26f7507 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -1,3 +1,4 @@
+DROP TABLE IF EXISTS t1,t2;
select 0=0,1>0,1>=1,1<0,1<=0,1!=0,strcmp("abc","abcd"),strcmp("b","a"),strcmp("a","a") ;
0=0 1>0 1>=1 1<0 1<=0 1!=0 strcmp("abc","abcd") strcmp("b","a") strcmp("a","a")
1 1 1 0 0 1 -1 1 0
@@ -123,3 +124,11 @@ select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin;
ERROR HY000: Illegal mix of collations (koi8r_general_ci,EXPLICIT) and (koi8r_bin,EXPLICIT) for operation 'like'
select _koi8r'a' LIKE _latin1'A';
ERROR HY000: Illegal mix of collations (koi8r_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
+CREATE TABLE t1 ( faq_group_id int(11) NOT NULL default '0', faq_id int(11) NOT NULL default '0', title varchar(240) default NULL, keywords text, description longblob, solution longblob, status tinyint(4) NOT NULL default '0', access_id smallint(6) default NULL, lang_id smallint(6) NOT NULL default '0', created datetime NOT NULL default '0000-00-00 00:00:00', updated datetime default NULL, last_access datetime default NULL, last_notify datetime default NULL, solved_count int(11) NOT NULL default '0', static_solved int(11) default NULL, solved_1 int(11) default NULL, solved_2 int(11) default NULL, solved_3 int(11) default NULL, solved_4 int(11) default NULL, solved_5 int(11) default NULL, expires datetime default NULL, notes text, assigned_to smallint(6) default NULL, assigned_group smallint(6) default NULL, last_edited_by smallint(6) default NULL, orig_ref_no varchar(15) binary default NULL, c$fundstate smallint(6) default NULL, c$contributor smallint(6) default NULL, UNIQUE KEY t1$faq_id (faq_id), KEY t1$group_id$faq_id (faq_group_id,faq_id), KEY t1$c$fundstate (c$fundstate) ) TYPE=MyISAM;
+ INSERT INTO t1 VALUES (82,82,'How to use the DynaVox Usage Counts Feature','usages count, number, corner, white, box, button','<as-html>\r\n<table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n <td width=\"97%\">\r\n <h3><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000000\">How \r\n To</font><!-- #BeginEditable \"CS_troubleshoot_question\" --><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000099\"><font color=\"#000000\">: \r\n Display or Hide the Usage Counts to find out how many times each button is being selected. </font></font><!-- #EndEditable --></h3>\r\n </td>\r\n </tr>\r\n</table>','<as-html>\r\n <table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n \r\n<td width=\"97%\"><!-- #BeginEditable \"CS_troubleshoot_answer\" --> \r\n \r\n<p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">1. Select \r\n the <i>On/Setup</i> button to access the DynaVox Setup Menu.<br>\r\n 2. Select <b>Button Features.</b><br>\r\n 3. Below the <b>OK</b> button is the <b>Usage Counts</b> button.<br>\r\n a. If it says \"Hidden\" then the Usage Counts will not be displayed.<br>\r\n b. If it says \"Displayed\" then the Usage Counts will be shown.<br>\r\n c. Select the <b>Usage Counts</b> Option Ring once and it will toggle \r\n to the alternative option.<br>\r\n 4. Once the correct setting has been chosen, select <b>OK</b> to leave the <i>Button \r\n Features</i> menu.<br>\r\n 5. Select <b>OK</b> out of the <i>Setup</i> menu and return to the communication \r\n page.</font></p>\r\n <p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">For \r\n further information on <i>Usage Counts,</i> see the <i>Button Features \r\n Menu Entry</i> in the DynaVox/DynaMyte Reference Manual.</font></p>\r\n<!-- #EndEditable --></td>\r\n </tr>\r\n</table>',4,1,1,'2001-11-16 16:43:34','2002-11-25 12:09:43','2003-07-24 01:04:48',NULL,11,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,11,NULL,NULL,NULL);
+ CREATE TABLE t2 ( access_id smallint(6) NOT NULL default '0', name varchar(20) binary default NULL, rank smallint(6) NOT NULL default '0', KEY t2$access_id (access_id) ) TYPE=MyISAM;
+ INSERT INTO t2 VALUES (1,'Everyone',2),(2,'Help',3),(3,'Customer Support',1);
+ SELECT f_acc.rank, a1.rank, a2.rank FROM t1 LEFT JOIN t1 f1 ON (f1.access_id=1 AND f1.faq_group_id = t1.faq_group_id) LEFT JOIN t2 a1 ON (a1.access_id = f1.access_id) LEFT JOIN t1 f2 ON (f2.access_id=3 AND f2.faq_group_id = t1.faq_group_id) LEFT JOIN t2 a2 ON (a2.access_id = f2.access_id), t2 f_acc WHERE LEAST(a1.rank,a2.rank) = f_acc.rank;
+rank rank rank
+2 2 NULL
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 7d3aeb62227..20698852b98 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -100,6 +100,26 @@ GRANT SELECT, REFERENCES, REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localh
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
table_priv column_priv
Select,References References
+grant all on test.* to user1@localhost with grant option;
+revoke all on test.* from user1@localhost;
+show grants for user1@localhost;
+Grants for user1@localhost
+GRANT USAGE ON *.* TO 'user1'@'localhost'
+GRANT USAGE ON `test`.* TO 'user1'@'localhost' WITH GRANT OPTION
+revoke grant option on test.* from user1@localhost;
+show grants for user1@localhost;
+Grants for user1@localhost
+GRANT USAGE ON *.* TO 'user1'@'localhost'
+grant all on test.t1 to user2@localhost with grant option;
+revoke all on test.t1 from user2@localhost;
+show grants for user2@localhost;
+Grants for user2@localhost
+GRANT USAGE ON *.* TO 'user2'@'localhost'
+GRANT USAGE ON `test`.`t1` TO 'user2'@'localhost' WITH GRANT OPTION
+revoke grant option on test.t1 from user2@localhost;
+show grants for user2@localhost;
+Grants for user2@localhost
+GRANT USAGE ON *.* TO 'user2'@'localhost'
delete from mysql.user where user='mysqltest_1';
delete from mysql.db where user='mysqltest_1';
delete from mysql.tables_priv where user='mysqltest_1';
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 3cb9c59cc57..c286b4d8fc4 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -586,4 +586,15 @@ select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(q
id sqty cqty
1 5 2
2 9 2
+select count(*), case interval(qty,2,3,4,5,6,7,8) when -1 then NULL when 0 then "zero" when 1 then "one" when 2 then "two" end as category from t1 group by category;
+count(*) category
+2 NULL
+1 one
+1 two
+select count(*), interval(qty,2,3,4,5,6,7,8) as category from t1 group by category;
+count(*) category
+1 1
+1 2
+1 3
+1 4
drop table t1;
diff --git a/mysql-test/r/have_openssl_2.require b/mysql-test/r/have_openssl_2.require
deleted file mode 100644
index 032b60d544a..00000000000
--- a/mysql-test/r/have_openssl_2.require
+++ /dev/null
@@ -1,2 +0,0 @@
-Variable_name Value
-Ssl_cipher EDH-RSA-DES-CBC3-SHA
diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result
index b83185b0c01..ff6ed368d5b 100644
--- a/mysql-test/r/isam.result
+++ b/mysql-test/r/isam.result
@@ -87,3 +87,173 @@ t1 0 PRIMARY 1 a A 4 NULL NULL BTREE
t1 1 b 1 b A 1 NULL NULL BTREE
t1 1 b 2 c A 4 NULL NULL BTREE
drop table t1,t2;
+create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
+int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
+int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
+i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
+int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
+i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
+int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
+i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
+int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
+i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
+int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
+i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
+int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
+int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
+int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
+int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
+int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
+int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
+int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
+int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
+int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
+int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
+int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
+int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
+int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
+int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
+int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
+int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
+int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
+int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
+int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
+int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
+int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
+int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
+int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
+int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
+int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
+int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
+int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
+int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
+int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
+int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
+int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
+int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
+int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
+int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
+int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
+int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
+int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
+int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
+int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
+int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
+int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
+int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
+int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
+int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
+int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
+int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
+int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
+int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
+int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
+int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
+int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
+int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
+int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
+int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
+int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
+int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
+int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
+int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
+int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
+int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
+int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
+int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
+int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
+int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
+int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
+int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
+int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
+int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
+int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
+int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
+int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
+int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
+int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
+int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
+int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
+int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
+int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
+int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
+int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
+int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
+int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
+int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
+int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
+int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
+int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
+int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
+int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
+int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
+int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
+int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
+int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
+int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
+int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
+int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
+int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
+int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
+int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
+int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
+int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
+int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
+int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
+int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
+int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
+int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
+int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
+int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
+int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
+int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
+int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
+int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
+int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
+int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
+int, i999 int, i1000 int, b blob) row_format=dynamic;
+insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei");
+update t1 set b=repeat('a',256);
+update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 508e1844d84..7d21ede0345 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -28,3 +28,13 @@ NULL NULL 0000-00-00 0000-00-00
NULL 0000-00-00 0000-00-00 0000-00-00
NULL 2003-03-03 2003-03-03 NULL
drop table t1;
+create table t1 (a text, b text);
+load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
+select concat('|',a,'|'), concat('|',b,'|') from t1;
+concat('|',a,'|') concat('|',b,'|')
+|Field A| |Field B|
+|Field 1| |Field 2'
+Field 3,'Field 4|
+|Field 5' ,'Field 6| NULL
+|Field 6| | 'Field 7'|
+drop table t1;
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index af4e2300088..dc5ae633ca5 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -6,6 +6,14 @@ id Word
1 a
2 b
3 c
+SELECT T1.id from T1 LIMIT 1;
+id
+1
+SELECT T2.id from t1 as T2 LIMIT 1;
+id
+1
+SELECT T2.id from t1 as t2 LIMIT 1;
+Unknown table 'T2' in field list
RENAME TABLE T1 TO T2;
ALTER TABLE T2 ADD new_col int not null;
ALTER TABLE T2 RENAME T3;
diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result
new file mode 100644
index 00000000000..8a3415a81d0
--- /dev/null
+++ b/mysql-test/r/mix_innodb_myisam_binlog.result
@@ -0,0 +1,180 @@
+drop table if exists ti, tm;
+create table ti (a int) type=innodb;
+create table tm (a int) type=myisam;
+reset master;
+begin;
+insert into ti values(1);
+insert into tm select * from ti;
+commit;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(1)
+master-bin.001 178 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 244 Query 1 244 use test; COMMIT
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(2);
+insert into tm select * from ti;
+rollback;
+Warning: Some non-transactional changed tables couldn't be rolled back
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(2)
+master-bin.001 178 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 244 Query 1 244 use test; ROLLBACK
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(3);
+savepoint my_savepoint;
+insert into ti values(4);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+Warning: Some non-transactional changed tables couldn't be rolled back
+commit;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(3)
+master-bin.001 178 Query 1 79 use test; savepoint my_savepoint
+master-bin.001 235 Query 1 79 use test; insert into ti values(4)
+master-bin.001 294 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 360 Query 1 79 use test; rollback to savepoint my_savepoint
+master-bin.001 429 Query 1 429 use test; COMMIT
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(5);
+savepoint my_savepoint;
+insert into ti values(6);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+Warning: Some non-transactional changed tables couldn't be rolled back
+insert into ti values(7);
+commit;
+select a from ti order by a;
+a
+5
+7
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(5)
+master-bin.001 178 Query 1 79 use test; savepoint my_savepoint
+master-bin.001 235 Query 1 79 use test; insert into ti values(6)
+master-bin.001 294 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 360 Query 1 79 use test; rollback to savepoint my_savepoint
+master-bin.001 429 Query 1 79 use test; insert into ti values(7)
+master-bin.001 488 Query 1 488 use test; COMMIT
+delete from ti;
+delete from tm;
+reset master;
+select get_lock("a",10);
+get_lock("a",10)
+1
+begin;
+insert into ti values(8);
+insert into tm select * from ti;
+select get_lock("a",10);
+get_lock("a",10)
+1
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(8)
+master-bin.001 178 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 244 Query 1 244 use test; ROLLBACK
+delete from ti;
+delete from tm;
+reset master;
+insert into ti values(9);
+insert into tm select * from ti;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; insert into ti values(9)
+master-bin.001 138 Query 1 138 use test; insert into tm select * from ti
+delete from ti;
+delete from tm;
+reset master;
+insert into ti values(10);
+begin;
+insert into tm select * from ti;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; insert into ti values(10)
+master-bin.001 139 Query 1 139 use test; insert into tm select * from ti
+insert into ti values(11);
+commit;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; insert into ti values(10)
+master-bin.001 139 Query 1 139 use test; insert into tm select * from ti
+master-bin.001 205 Query 1 205 use test; BEGIN
+master-bin.001 245 Query 1 205 use test; insert into ti values(11)
+master-bin.001 305 Query 1 305 use test; COMMIT
+alter table tm type=INNODB;
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(12);
+insert into tm select * from ti;
+commit;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(12)
+master-bin.001 179 Query 1 79 use test; insert into tm select * from ti
+master-bin.001 245 Query 1 245 use test; COMMIT
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(13);
+insert into tm select * from ti;
+rollback;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(14);
+savepoint my_savepoint;
+insert into ti values(15);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+commit;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(14)
+master-bin.001 179 Query 1 179 use test; COMMIT
+delete from ti;
+delete from tm;
+reset master;
+begin;
+insert into ti values(16);
+savepoint my_savepoint;
+insert into ti values(17);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+insert into ti values(18);
+commit;
+select a from ti order by a;
+a
+16
+18
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+master-bin.001 79 Query 1 79 use test; BEGIN
+master-bin.001 119 Query 1 79 use test; insert into ti values(16)
+master-bin.001 179 Query 1 79 use test; insert into ti values(18)
+master-bin.001 239 Query 1 239 use test; COMMIT
+drop table ti,tm;
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 15d04422f9d..a7579b538b5 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -332,3 +332,12 @@ create table t2(Z varchar(15));
insert into t2(Z) select concat(a.a,b.a,c.a,d.a) from t1 as a, t1 as b, t1 as c, t1 as d;
update t2,t3 set Z =param_scenario_costs;
drop table t1,t2,t3;
+create table t1 (a int, b int);
+create table t2 (a int, b int);
+insert into t1 values (1,1),(2,1),(3,1);
+insert into t2 values (1,1), (3,1);
+update t1 left join t2 on t1.a=t2.a set t1.b=2, t2.b=2 where t1.b=1 and t2.b=1 or t2.a is NULL;
+select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and t2.b=1 or t2.a is NULL;
+a b a b
+2 2 NULL NULL
+drop table t1,t2;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index d158c39cba8..6a9d8fd8ae3 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -285,6 +285,11 @@ insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei");
+update t1 set b=repeat('a',256);
+update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0;
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
drop table t1;
CREATE TABLE `t1` (
`post_id` mediumint(8) unsigned NOT NULL auto_increment,
diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result
index afc4b12a341..0b80642fc70 100644
--- a/mysql-test/r/openssl_1.result
+++ b/mysql-test/r/openssl_1.result
@@ -3,8 +3,8 @@ create table t1(f1 int);
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
grant select on test.* to ssl_user2@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com";
-grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com" ISSUER "/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com";
+grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com";
+grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com";
flush privileges;
select * from t1;
f1
diff --git a/mysql-test/r/packet.result b/mysql-test/r/packet.result
index 6e3c459b39d..5729d7af166 100644
--- a/mysql-test/r/packet.result
+++ b/mysql-test/r/packet.result
@@ -5,12 +5,12 @@ set net_buffer_length=100;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
1024
-select repeat('a',200);
-repeat('a',200)
+select repeat('a',2000);
+repeat('a',2000)
NULL
select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet
-1024 80
+1024 1024
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
ERROR 08S01: Got a packet bigger than 'max_allowed_packet'
set global max_allowed_packet=default;
@@ -20,6 +20,6 @@ set net_buffer_length=default;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
100
-select length(repeat('a',200));
-length(repeat('a',200))
-200
+select length(repeat('a',2000));
+length(repeat('a',2000))
+2000
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 420281b7ef2..d1ef5ab828e 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -2,7 +2,7 @@ flush query cache;
flush query cache;
reset query cache;
flush status;
-drop table if exists t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t00,mysqltest.t1;
+drop table if exists t1,t2,t3;
drop database if exists mysqltest;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
@@ -709,536 +709,3 @@ Variable_name Value
Qcache_queries_in_cache 2
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
drop table t1;
-flush status;
-create table t0(a int);
-create table t1(a int);
-create table t2(a int);
-create table t3(a int);
-create table t4(a int);
-create table t5(a int);
-create table t6(a int);
-create table t7(a int);
-create table t8(a int);
-create table t9(a int);
-create table t10(a int);
-create table t11(a int);
-create table t12(a int);
-create table t13(a int);
-create table t14(a int);
-create table t15(a int);
-create table t16(a int);
-create table t17(a int);
-create table t18(a int);
-create table t19(a int);
-create table t20(a int);
-create table t21(a int);
-create table t22(a int);
-create table t23(a int);
-create table t24(a int);
-create table t25(a int);
-create table t26(a int);
-create table t27(a int);
-create table t28(a int);
-create table t29(a int);
-create table t30(a int);
-create table t31(a int);
-create table t32(a int);
-create table t33(a int);
-create table t34(a int);
-create table t35(a int);
-create table t36(a int);
-create table t37(a int);
-create table t38(a int);
-create table t39(a int);
-create table t40(a int);
-create table t41(a int);
-create table t42(a int);
-create table t43(a int);
-create table t44(a int);
-create table t45(a int);
-create table t46(a int);
-create table t47(a int);
-create table t48(a int);
-create table t49(a int);
-create table t50(a int);
-create table t51(a int);
-create table t52(a int);
-create table t53(a int);
-create table t54(a int);
-create table t55(a int);
-create table t56(a int);
-create table t57(a int);
-create table t58(a int);
-create table t59(a int);
-create table t60(a int);
-create table t61(a int);
-create table t62(a int);
-create table t63(a int);
-create table t64(a int);
-create table t65(a int);
-create table t66(a int);
-create table t67(a int);
-create table t68(a int);
-create table t69(a int);
-create table t70(a int);
-create table t71(a int);
-create table t72(a int);
-create table t73(a int);
-create table t74(a int);
-create table t75(a int);
-create table t76(a int);
-create table t77(a int);
-create table t78(a int);
-create table t79(a int);
-create table t80(a int);
-create table t81(a int);
-create table t82(a int);
-create table t83(a int);
-create table t84(a int);
-create table t85(a int);
-create table t86(a int);
-create table t87(a int);
-create table t88(a int);
-create table t89(a int);
-create table t90(a int);
-create table t91(a int);
-create table t92(a int);
-create table t93(a int);
-create table t94(a int);
-create table t95(a int);
-create table t96(a int);
-create table t97(a int);
-create table t98(a int);
-create table t99(a int);
-create table t100(a int);
-create table t101(a int);
-create table t102(a int);
-create table t103(a int);
-create table t104(a int);
-create table t105(a int);
-create table t106(a int);
-create table t107(a int);
-create table t108(a int);
-create table t109(a int);
-create table t110(a int);
-create table t111(a int);
-create table t112(a int);
-create table t113(a int);
-create table t114(a int);
-create table t115(a int);
-create table t116(a int);
-create table t117(a int);
-create table t118(a int);
-create table t119(a int);
-create table t120(a int);
-create table t121(a int);
-create table t122(a int);
-create table t123(a int);
-create table t124(a int);
-create table t125(a int);
-create table t126(a int);
-create table t127(a int);
-create table t128(a int);
-create table t129(a int);
-create table t130(a int);
-create table t131(a int);
-create table t132(a int);
-create table t133(a int);
-create table t134(a int);
-create table t135(a int);
-create table t136(a int);
-create table t137(a int);
-create table t138(a int);
-create table t139(a int);
-create table t140(a int);
-create table t141(a int);
-create table t142(a int);
-create table t143(a int);
-create table t144(a int);
-create table t145(a int);
-create table t146(a int);
-create table t147(a int);
-create table t148(a int);
-create table t149(a int);
-create table t150(a int);
-create table t151(a int);
-create table t152(a int);
-create table t153(a int);
-create table t154(a int);
-create table t155(a int);
-create table t156(a int);
-create table t157(a int);
-create table t158(a int);
-create table t159(a int);
-create table t160(a int);
-create table t161(a int);
-create table t162(a int);
-create table t163(a int);
-create table t164(a int);
-create table t165(a int);
-create table t166(a int);
-create table t167(a int);
-create table t168(a int);
-create table t169(a int);
-create table t170(a int);
-create table t171(a int);
-create table t172(a int);
-create table t173(a int);
-create table t174(a int);
-create table t175(a int);
-create table t176(a int);
-create table t177(a int);
-create table t178(a int);
-create table t179(a int);
-create table t180(a int);
-create table t181(a int);
-create table t182(a int);
-create table t183(a int);
-create table t184(a int);
-create table t185(a int);
-create table t186(a int);
-create table t187(a int);
-create table t188(a int);
-create table t189(a int);
-create table t190(a int);
-create table t191(a int);
-create table t192(a int);
-create table t193(a int);
-create table t194(a int);
-create table t195(a int);
-create table t196(a int);
-create table t197(a int);
-create table t198(a int);
-create table t199(a int);
-create table t200(a int);
-create table t201(a int);
-create table t202(a int);
-create table t203(a int);
-create table t204(a int);
-create table t205(a int);
-create table t206(a int);
-create table t207(a int);
-create table t208(a int);
-create table t209(a int);
-create table t210(a int);
-create table t211(a int);
-create table t212(a int);
-create table t213(a int);
-create table t214(a int);
-create table t215(a int);
-create table t216(a int);
-create table t217(a int);
-create table t218(a int);
-create table t219(a int);
-create table t220(a int);
-create table t221(a int);
-create table t222(a int);
-create table t223(a int);
-create table t224(a int);
-create table t225(a int);
-create table t226(a int);
-create table t227(a int);
-create table t228(a int);
-create table t229(a int);
-create table t230(a int);
-create table t231(a int);
-create table t232(a int);
-create table t233(a int);
-create table t234(a int);
-create table t235(a int);
-create table t236(a int);
-create table t237(a int);
-create table t238(a int);
-create table t239(a int);
-create table t240(a int);
-create table t241(a int);
-create table t242(a int);
-create table t243(a int);
-create table t244(a int);
-create table t245(a int);
-create table t246(a int);
-create table t247(a int);
-create table t248(a int);
-create table t249(a int);
-create table t250(a int);
-create table t251(a int);
-create table t252(a int);
-create table t253(a int);
-create table t254(a int);
-create table t255(a int);
-create table t256(a int);
-create table t00 (a int) type=MERGE UNION=(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256) INSERT_METHOD=FIRST;
-insert into t0 values (1),(2);
-insert into t1 values (1),(2);
-insert into t2 values (1),(2);
-insert into t3 values (1),(2);
-insert into t4 values (1),(2);
-insert into t5 values (1),(2);
-insert into t6 values (1),(2);
-insert into t7 values (1),(2);
-insert into t8 values (1),(2);
-insert into t9 values (1),(2);
-insert into t10 values (1),(2);
-insert into t11 values (1),(2);
-insert into t12 values (1),(2);
-insert into t13 values (1),(2);
-insert into t14 values (1),(2);
-insert into t15 values (1),(2);
-insert into t16 values (1),(2);
-insert into t17 values (1),(2);
-insert into t18 values (1),(2);
-insert into t19 values (1),(2);
-insert into t20 values (1),(2);
-insert into t21 values (1),(2);
-insert into t22 values (1),(2);
-insert into t23 values (1),(2);
-insert into t24 values (1),(2);
-insert into t25 values (1),(2);
-insert into t26 values (1),(2);
-insert into t27 values (1),(2);
-insert into t28 values (1),(2);
-insert into t29 values (1),(2);
-insert into t30 values (1),(2);
-insert into t31 values (1),(2);
-insert into t32 values (1),(2);
-insert into t33 values (1),(2);
-insert into t34 values (1),(2);
-insert into t35 values (1),(2);
-insert into t36 values (1),(2);
-insert into t37 values (1),(2);
-insert into t38 values (1),(2);
-insert into t39 values (1),(2);
-insert into t40 values (1),(2);
-insert into t41 values (1),(2);
-insert into t42 values (1),(2);
-insert into t43 values (1),(2);
-insert into t44 values (1),(2);
-insert into t45 values (1),(2);
-insert into t46 values (1),(2);
-insert into t47 values (1),(2);
-insert into t48 values (1),(2);
-insert into t49 values (1),(2);
-insert into t50 values (1),(2);
-insert into t51 values (1),(2);
-insert into t52 values (1),(2);
-insert into t53 values (1),(2);
-insert into t54 values (1),(2);
-insert into t55 values (1),(2);
-insert into t56 values (1),(2);
-insert into t57 values (1),(2);
-insert into t58 values (1),(2);
-insert into t59 values (1),(2);
-insert into t60 values (1),(2);
-insert into t61 values (1),(2);
-insert into t62 values (1),(2);
-insert into t63 values (1),(2);
-insert into t64 values (1),(2);
-insert into t65 values (1),(2);
-insert into t66 values (1),(2);
-insert into t67 values (1),(2);
-insert into t68 values (1),(2);
-insert into t69 values (1),(2);
-insert into t70 values (1),(2);
-insert into t71 values (1),(2);
-insert into t72 values (1),(2);
-insert into t73 values (1),(2);
-insert into t74 values (1),(2);
-insert into t75 values (1),(2);
-insert into t76 values (1),(2);
-insert into t77 values (1),(2);
-insert into t78 values (1),(2);
-insert into t79 values (1),(2);
-insert into t80 values (1),(2);
-insert into t81 values (1),(2);
-insert into t82 values (1),(2);
-insert into t83 values (1),(2);
-insert into t84 values (1),(2);
-insert into t85 values (1),(2);
-insert into t86 values (1),(2);
-insert into t87 values (1),(2);
-insert into t88 values (1),(2);
-insert into t89 values (1),(2);
-insert into t90 values (1),(2);
-insert into t91 values (1),(2);
-insert into t92 values (1),(2);
-insert into t93 values (1),(2);
-insert into t94 values (1),(2);
-insert into t95 values (1),(2);
-insert into t96 values (1),(2);
-insert into t97 values (1),(2);
-insert into t98 values (1),(2);
-insert into t99 values (1),(2);
-insert into t100 values (1),(2);
-insert into t101 values (1),(2);
-insert into t102 values (1),(2);
-insert into t103 values (1),(2);
-insert into t104 values (1),(2);
-insert into t105 values (1),(2);
-insert into t106 values (1),(2);
-insert into t107 values (1),(2);
-insert into t108 values (1),(2);
-insert into t109 values (1),(2);
-insert into t110 values (1),(2);
-insert into t111 values (1),(2);
-insert into t112 values (1),(2);
-insert into t113 values (1),(2);
-insert into t114 values (1),(2);
-insert into t115 values (1),(2);
-insert into t116 values (1),(2);
-insert into t117 values (1),(2);
-insert into t118 values (1),(2);
-insert into t119 values (1),(2);
-insert into t120 values (1),(2);
-insert into t121 values (1),(2);
-insert into t122 values (1),(2);
-insert into t123 values (1),(2);
-insert into t124 values (1),(2);
-insert into t125 values (1),(2);
-insert into t126 values (1),(2);
-insert into t127 values (1),(2);
-insert into t128 values (1),(2);
-insert into t129 values (1),(2);
-insert into t130 values (1),(2);
-insert into t131 values (1),(2);
-insert into t132 values (1),(2);
-insert into t133 values (1),(2);
-insert into t134 values (1),(2);
-insert into t135 values (1),(2);
-insert into t136 values (1),(2);
-insert into t137 values (1),(2);
-insert into t138 values (1),(2);
-insert into t139 values (1),(2);
-insert into t140 values (1),(2);
-insert into t141 values (1),(2);
-insert into t142 values (1),(2);
-insert into t143 values (1),(2);
-insert into t144 values (1),(2);
-insert into t145 values (1),(2);
-insert into t146 values (1),(2);
-insert into t147 values (1),(2);
-insert into t148 values (1),(2);
-insert into t149 values (1),(2);
-insert into t150 values (1),(2);
-insert into t151 values (1),(2);
-insert into t152 values (1),(2);
-insert into t153 values (1),(2);
-insert into t154 values (1),(2);
-insert into t155 values (1),(2);
-insert into t156 values (1),(2);
-insert into t157 values (1),(2);
-insert into t158 values (1),(2);
-insert into t159 values (1),(2);
-insert into t160 values (1),(2);
-insert into t161 values (1),(2);
-insert into t162 values (1),(2);
-insert into t163 values (1),(2);
-insert into t164 values (1),(2);
-insert into t165 values (1),(2);
-insert into t166 values (1),(2);
-insert into t167 values (1),(2);
-insert into t168 values (1),(2);
-insert into t169 values (1),(2);
-insert into t170 values (1),(2);
-insert into t171 values (1),(2);
-insert into t172 values (1),(2);
-insert into t173 values (1),(2);
-insert into t174 values (1),(2);
-insert into t175 values (1),(2);
-insert into t176 values (1),(2);
-insert into t177 values (1),(2);
-insert into t178 values (1),(2);
-insert into t179 values (1),(2);
-insert into t180 values (1),(2);
-insert into t181 values (1),(2);
-insert into t182 values (1),(2);
-insert into t183 values (1),(2);
-insert into t184 values (1),(2);
-insert into t185 values (1),(2);
-insert into t186 values (1),(2);
-insert into t187 values (1),(2);
-insert into t188 values (1),(2);
-insert into t189 values (1),(2);
-insert into t190 values (1),(2);
-insert into t191 values (1),(2);
-insert into t192 values (1),(2);
-insert into t193 values (1),(2);
-insert into t194 values (1),(2);
-insert into t195 values (1),(2);
-insert into t196 values (1),(2);
-insert into t197 values (1),(2);
-insert into t198 values (1),(2);
-insert into t199 values (1),(2);
-insert into t200 values (1),(2);
-insert into t201 values (1),(2);
-insert into t202 values (1),(2);
-insert into t203 values (1),(2);
-insert into t204 values (1),(2);
-insert into t205 values (1),(2);
-insert into t206 values (1),(2);
-insert into t207 values (1),(2);
-insert into t208 values (1),(2);
-insert into t209 values (1),(2);
-insert into t210 values (1),(2);
-insert into t211 values (1),(2);
-insert into t212 values (1),(2);
-insert into t213 values (1),(2);
-insert into t214 values (1),(2);
-insert into t215 values (1),(2);
-insert into t216 values (1),(2);
-insert into t217 values (1),(2);
-insert into t218 values (1),(2);
-insert into t219 values (1),(2);
-insert into t220 values (1),(2);
-insert into t221 values (1),(2);
-insert into t222 values (1),(2);
-insert into t223 values (1),(2);
-insert into t224 values (1),(2);
-insert into t225 values (1),(2);
-insert into t226 values (1),(2);
-insert into t227 values (1),(2);
-insert into t228 values (1),(2);
-insert into t229 values (1),(2);
-insert into t230 values (1),(2);
-insert into t231 values (1),(2);
-insert into t232 values (1),(2);
-insert into t233 values (1),(2);
-insert into t234 values (1),(2);
-insert into t235 values (1),(2);
-insert into t236 values (1),(2);
-insert into t237 values (1),(2);
-insert into t238 values (1),(2);
-insert into t239 values (1),(2);
-insert into t240 values (1),(2);
-insert into t241 values (1),(2);
-insert into t242 values (1),(2);
-insert into t243 values (1),(2);
-insert into t244 values (1),(2);
-insert into t245 values (1),(2);
-insert into t246 values (1),(2);
-insert into t247 values (1),(2);
-insert into t248 values (1),(2);
-insert into t249 values (1),(2);
-insert into t250 values (1),(2);
-insert into t251 values (1),(2);
-insert into t252 values (1),(2);
-insert into t253 values (1),(2);
-insert into t254 values (1),(2);
-insert into t255 values (1),(2);
-insert into t256 values (1),(2);
-select count(*) from t00;
-count(*)
-514
-select count(*) from t00;
-count(*)
-514
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-delete from t256;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-drop table t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t00;
diff --git a/mysql-test/r/query_cache_merge.result b/mysql-test/r/query_cache_merge.result
new file mode 100644
index 00000000000..c6df4266de2
--- /dev/null
+++ b/mysql-test/r/query_cache_merge.result
@@ -0,0 +1,20 @@
+SET @@global.query_cache_size=1355776;
+flush status;
+select count(*) from t00;
+count(*)
+514
+select count(*) from t00;
+count(*)
+514
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 1
+show status like "Qcache_hits";
+Variable_name Value
+Qcache_hits 1
+delete from t256;
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;
+SET @@global.query_cache_size=0;
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 247221a92f3..86203fb6786 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -226,3 +226,31 @@ insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
id1 idnull
drop table t1;
+create table t1 (x int, y int, index(x), index(y));
+insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
+update t1 set y=x;
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 7 and t1.y+0;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 4 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 7 and t2.x <= t1.y+0;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 4 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 1)
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 1)
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 2 Using where
+drop table t1;
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 55dcf2f4f0f..cb5d31c5db8 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+reset master;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
@@ -19,6 +20,9 @@ day id category name
2003-02-22 2461 b a a a @ %  ' " a
2003-03-22 2161 c asdf
2003-04-22 2416 a bbbbb
+show master status;
+File Position Binlog_do_db Binlog_ignore_db
+slave-bin.001 964
drop table t1;
drop table t2;
drop table t3;
diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result
new file mode 100644
index 00000000000..8d8ed749c71
--- /dev/null
+++ b/mysql-test/r/rpl_loaddata_rule_m.result
@@ -0,0 +1,14 @@
+slave stop;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+slave start;
+reset master;
+create database test2;
+create table t1(a int, b int, unique(b));
+use test2;
+load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+drop database test2;
diff --git a/mysql-test/r/rpl_loaddata_rule_s.result b/mysql-test/r/rpl_loaddata_rule_s.result
new file mode 100644
index 00000000000..a84368501a9
--- /dev/null
+++ b/mysql-test/r/rpl_loaddata_rule_s.result
@@ -0,0 +1,14 @@
+slave stop;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+slave start;
+reset master;
+create table t1(a int, b int, unique(b));
+load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
+select count(*) from t1;
+count(*)
+2
+show binlog events from 79;
+Log_name Pos Event_type Server_id Orig_log_pos Info
diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result
index 446dd41e216..4930d20f702 100644
--- a/mysql-test/r/select_safe.result
+++ b/mysql-test/r/select_safe.result
@@ -67,12 +67,12 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
-explain select * from t1,t1 as t2 where t1.b=t2.b;
+explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL b NULL NULL NULL 21
1 SIMPLE t2 ALL b NULL NULL NULL 16 Using where
set MAX_SEEKS_FOR_KEY=1;
-explain select * from t1,t1 as t2 where t1.b=t2.b;
+explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL b NULL NULL NULL 21
1 SIMPLE t2 ref b b 21 test.t1.b 6 Using where
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 201d1b541ae..c02c8d0de88 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -227,6 +227,12 @@ select * from t1;
type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_numeric empty_char type_char type_varchar type_timestamp type_date type_time type_datetime type_year type_enum type_set type_tinyblob type_blob type_medium_blob type_long_blob
0 1 NULL NULL NULL NULL NULL NULL NULL NULL 2003-02-07 10:00:01 0000-00-00 00:00:00 0000-00-00 00:00:00 NULL NULL NULL NULL NULL NULL NULL
drop table t1;
+create table t1 (a int not null);
+create table t2 select max(a) from t1;
+show columns from t2;
+Field Type Null Key Default Extra
+max(a) bigint(20) YES NULL
+drop table t1,t2;
create table t1 (c decimal, d double, f float, r real);
show columns from t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index 4469ca36941..c31d1019d89 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -40,7 +40,7 @@ t9 CREATE TABLE `t9` (
`b` char(16) NOT NULL default '',
`c` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
-) TYPE=MyISAM CHARSET=latin1
+) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
alter table t9 rename t8, add column d int not null;
alter table t8 rename t7;
rename table t7 to t9;
@@ -62,5 +62,5 @@ t9 CREATE TABLE `t9` (
`c` int(11) NOT NULL default '0',
`d` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
-) TYPE=MyISAM CHARSET=latin1
+) TYPE=MyISAM CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
drop database mysqltest;
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index fc72f55172b..888fe1b29f8 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -312,6 +312,131 @@ a b
5 f
6 e
drop table t1,t2,t3,t4;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+create table t2 (a int);
+insert into t2 values (3),(4),(5);
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1) UNION all (SELECT * FROM t2) LIMIT 1;
+a
+1
+select found_rows();
+found_rows()
+6
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all (SELECT * FROM t2) LIMIT 2;
+a
+1
+3
+select found_rows();
+found_rows()
+4
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all (SELECT * FROM t2);
+a
+1
+3
+4
+5
+select found_rows();
+found_rows()
+4
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1) UNION all (SELECT * FROM t2 LIMIT 1);
+a
+1
+2
+3
+3
+select found_rows();
+found_rows()
+4
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1;
+a
+1
+select found_rows();
+found_rows()
+4
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
+a
+1
+3
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2;
+a
+1
+2
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2;
+a
+1
+2
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
+a
+1
+2
+3
+4
+5
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
+a
+1
+2
+3
+4
+5
+select found_rows();
+found_rows()
+5
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2;
+a
+1
+3
+4
+5
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2;
+a
+1
+3
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2;
+a
+3
+4
+select found_rows();
+found_rows()
+6
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 limit 2,2 UNION SELECT * FROM t2;
+a
+3
+4
+5
+select found_rows();
+found_rows()
+5
+SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
+a
+5
+(SELECT * FROM t1 ORDER by a) UNION ALL (SELECT * FROM t2 ORDER BY a) ORDER BY A desc LIMIT 4;
+a
+5
+4
+3
+3
+(SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1;
+Wrong usage/placement of 'SQL_CALC_FOUND_ROWS'
+drop table t1,t2;
CREATE TABLE t1 ( id int(3) unsigned default '0') TYPE=MyISAM;
INSERT INTO t1 (id) VALUES("1");
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) TYPE=MyISAM;
diff --git a/mysql-test/std_data/loaddata2.dat b/mysql-test/std_data/loaddata2.dat
new file mode 100644
index 00000000000..6e9d6745b8d
--- /dev/null
+++ b/mysql-test/std_data/loaddata2.dat
@@ -0,0 +1,5 @@
+Field A,'Field B'
+Field 1,'Field 2'
+Field 3,'Field 4'
+'Field 5' ,'Field 6'
+Field 6, 'Field 7'
diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test
index ae1963dd3f5..95b10c4ffb9 100644
--- a/mysql-test/t/func_test.test
+++ b/mysql-test/t/func_test.test
@@ -1,3 +1,6 @@
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
#
# Testing of comparison functions
#
@@ -65,3 +68,13 @@ select _koi8r'a' COLLATE koi8r_bin LIKE _koi8r'A';
select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin;
--error 1266
select _koi8r'a' LIKE _latin1'A';
+
+#
+# Test for LEAST() BUG in LEFT JOIN
+#
+CREATE TABLE t1 ( faq_group_id int(11) NOT NULL default '0', faq_id int(11) NOT NULL default '0', title varchar(240) default NULL, keywords text, description longblob, solution longblob, status tinyint(4) NOT NULL default '0', access_id smallint(6) default NULL, lang_id smallint(6) NOT NULL default '0', created datetime NOT NULL default '0000-00-00 00:00:00', updated datetime default NULL, last_access datetime default NULL, last_notify datetime default NULL, solved_count int(11) NOT NULL default '0', static_solved int(11) default NULL, solved_1 int(11) default NULL, solved_2 int(11) default NULL, solved_3 int(11) default NULL, solved_4 int(11) default NULL, solved_5 int(11) default NULL, expires datetime default NULL, notes text, assigned_to smallint(6) default NULL, assigned_group smallint(6) default NULL, last_edited_by smallint(6) default NULL, orig_ref_no varchar(15) binary default NULL, c$fundstate smallint(6) default NULL, c$contributor smallint(6) default NULL, UNIQUE KEY t1$faq_id (faq_id), KEY t1$group_id$faq_id (faq_group_id,faq_id), KEY t1$c$fundstate (c$fundstate) ) TYPE=MyISAM;
+INSERT INTO t1 VALUES (82,82,'How to use the DynaVox Usage Counts Feature','usages count, number, corner, white, box, button','<as-html>\r\n<table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n <td width=\"97%\">\r\n <h3><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000000\">How \r\n To</font><!-- #BeginEditable \"CS_troubleshoot_question\" --><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000099\"><font color=\"#000000\">: \r\n Display or Hide the Usage Counts to find out how many times each button is being selected. </font></font><!-- #EndEditable --></h3>\r\n </td>\r\n </tr>\r\n</table>','<as-html>\r\n <table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n \r\n<td width=\"97%\"><!-- #BeginEditable \"CS_troubleshoot_answer\" --> \r\n \r\n<p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">1. Select \r\n the <i>On/Setup</i> button to access the DynaVox Setup Menu.<br>\r\n 2. Select <b>Button Features.</b><br>\r\n 3. Below the <b>OK</b> button is the <b>Usage Counts</b> button.<br>\r\n a. If it says \"Hidden\" then the Usage Counts will not be displayed.<br>\r\n b. If it says \"Displayed\" then the Usage Counts will be shown.<br>\r\n c. Select the <b>Usage Counts</b> Option Ring once and it will toggle \r\n to the alternative option.<br>\r\n 4. Once the correct setting has been chosen, select <b>OK</b> to leave the <i>Button \r\n Features</i> menu.<br>\r\n 5. Select <b>OK</b> out of the <i>Setup</i> menu and return to the communication \r\n page.</font></p>\r\n <p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">For \r\n further information on <i>Usage Counts,</i> see the <i>Button Features \r\n Menu Entry</i> in the DynaVox/DynaMyte Reference Manual.</font></p>\r\n<!-- #EndEditable --></td>\r\n </tr>\r\n</table>',4,1,1,'2001-11-16 16:43:34','2002-11-25 12:09:43','2003-07-24 01:04:48',NULL,11,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,11,NULL,NULL,NULL);
+CREATE TABLE t2 ( access_id smallint(6) NOT NULL default '0', name varchar(20) binary default NULL, rank smallint(6) NOT NULL default '0', KEY t2$access_id (access_id) ) TYPE=MyISAM;
+INSERT INTO t2 VALUES (1,'Everyone',2),(2,'Help',3),(3,'Customer Support',1);
+SELECT f_acc.rank, a1.rank, a2.rank FROM t1 LEFT JOIN t1 f1 ON (f1.access_id=1 AND f1.faq_group_id = t1.faq_group_id) LEFT JOIN t2 a1 ON (a1.access_id = f1.access_id) LEFT JOIN t1 f2 ON (f2.access_id=3 AND f2.faq_group_id = t1.faq_group_id) LEFT JOIN t2 a2 ON (a2.access_id = f2.access_id), t2 f_acc WHERE LEAST(a1.rank,a2.rank) = f_acc.rank;
+DROP TABLE t1,t2;
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index f48ada33866..55d2d9f3848 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -69,6 +69,16 @@ REVOKE insert,insert (a) on t1 from mysqltest_1@localhost;
GRANT references on t1 to mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
+grant all on test.* to user1@localhost with grant option;
+revoke all on test.* from user1@localhost;
+show grants for user1@localhost;
+revoke grant option on test.* from user1@localhost;
+show grants for user1@localhost;
+grant all on test.t1 to user2@localhost with grant option;
+revoke all on test.t1 from user2@localhost;
+show grants for user2@localhost;
+revoke grant option on test.t1 from user2@localhost;
+show grants for user2@localhost;
delete from mysql.user where user='mysqltest_1';
delete from mysql.db where user='mysqltest_1';
delete from mysql.tables_priv where user='mysqltest_1';
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 1153622a40f..752896ce7b2 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -429,4 +429,6 @@ select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(q
select id, sum(qty) as sqty from t1 group by id having sqty>2 and count(qty)>1;
select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sqty>2 and cqty>1;
select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and count(qty)>1;
+select count(*), case interval(qty,2,3,4,5,6,7,8) when -1 then NULL when 0 then "zero" when 1 then "one" when 2 then "two" end as category from t1 group by category;
+select count(*), interval(qty,2,3,4,5,6,7,8) as category from t1 group by category;
drop table t1;
diff --git a/mysql-test/t/isam.test b/mysql-test/t/isam.test
index fc2dbac439c..f6c05d0f4bb 100644
--- a/mysql-test/t/isam.test
+++ b/mysql-test/t/isam.test
@@ -70,3 +70,194 @@ show columns from t1;
show full columns from t1;
show index from t1;
drop table t1,t2;
+
+#
+# Test of some show commands
+#
+
+create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
+insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
+create table t2 type=isam select * from t1;
+optimize table t1;
+check table t1,t2;
+repair table t1,t2;
+check table t2,t1;
+lock tables t1 write;
+check table t2,t1;
+show columns from t1;
+show full columns from t1;
+show index from t1;
+drop table t1,t2;
+
+#
+# test of table with huge number of packed fields
+#
+
+create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
+int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
+int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
+i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
+int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
+i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
+int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
+i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
+int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
+i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
+int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
+i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
+int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
+int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
+int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
+int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
+int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
+int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
+int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
+int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
+int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
+int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
+int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
+int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
+int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
+int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
+int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
+int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
+int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
+int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
+int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
+int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
+int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
+int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
+int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
+int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
+int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
+int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
+int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
+int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
+int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
+int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
+int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
+int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
+int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
+int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
+int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
+int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
+int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
+int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
+int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
+int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
+int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
+int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
+int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
+int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
+int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
+int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
+int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
+int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
+int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
+int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
+int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
+int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
+int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
+int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
+int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
+int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
+int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
+int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
+int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
+int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
+int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
+int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
+int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
+int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
+int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
+int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
+int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
+int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
+int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
+int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
+int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
+int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
+int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
+int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
+int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
+int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
+int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
+int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
+int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
+int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
+int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
+int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
+int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
+int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
+int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
+int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
+int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
+int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
+int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
+int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
+int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
+int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
+int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
+int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
+int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
+int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
+int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
+int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
+int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
+int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
+int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
+int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
+int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
+int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
+int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
+int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
+int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
+int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
+int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
+int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
+int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
+int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
+int, i999 int, i1000 int, b blob) row_format=dynamic;
+insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei");
+update t1 set b=repeat('a',256);
+update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0;
+check table t1;
+drop table t1;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 199da9c4a84..1720ae69bbb 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -15,3 +15,8 @@ truncate table t1;
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
SELECT * from t1;
drop table t1;
+
+create table t1 (a text, b text);
+load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
+select concat('|',a,'|'), concat('|',b,'|') from t1;
+drop table t1;
diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test
index 2a3cc5b7e8f..2e5cb5f89fc 100644
--- a/mysql-test/t/lowercase_table.test
+++ b/mysql-test/t/lowercase_table.test
@@ -9,6 +9,10 @@ drop table if exists t1,t2,t3;
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
SELECT * FROM t1;
+SELECT T1.id from T1 LIMIT 1;
+SELECT T2.id from t1 as T2 LIMIT 1;
+--error 1109
+SELECT T2.id from t1 as t2 LIMIT 1;
RENAME TABLE T1 TO T2;
ALTER TABLE T2 ADD new_col int not null;
ALTER TABLE T2 RENAME T3;
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
new file mode 100644
index 00000000000..240aaefb349
--- /dev/null
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -0,0 +1,175 @@
+# Check that binlog is ok when a transaction mixes updates to InnoDB and
+# MyISAM. It would be nice to make this a replication test, but in 4.0 the slave
+# is always with --skip-innodb in the testsuite. I (Guilhem) however did some
+# tests manually on a slave; tables are replicated fine and Exec_master_log_pos
+# advances as expected.
+
+-- source include/have_innodb.inc
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con1;
+
+drop table if exists ti, tm;
+create table ti (a int) type=innodb;
+create table tm (a int) type=myisam;
+
+reset master;
+
+begin;
+insert into ti values(1);
+insert into tm select * from ti;
+commit;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(2);
+insert into tm select * from ti;
+# should say some changes to non-transactional tables couldn't be rolled back
+--error 1196
+rollback;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(3);
+savepoint my_savepoint;
+insert into ti values(4);
+insert into tm select * from ti;
+--error 1196
+rollback to savepoint my_savepoint;
+commit;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(5);
+savepoint my_savepoint;
+insert into ti values(6);
+insert into tm select * from ti;
+--error 1196
+rollback to savepoint my_savepoint;
+insert into ti values(7);
+commit;
+select a from ti order by a; # check that savepoints work :)
+
+show binlog events from 79;
+
+# and when ROLLBACK is not explicit?
+delete from ti;
+delete from tm;
+reset master;
+
+select get_lock("a",10);
+begin;
+insert into ti values(8);
+insert into tm select * from ti;
+disconnect con1;
+
+connection con2;
+# We want to SHOW BINLOG EVENTS, to know what was logged. But there is no
+# guarantee that logging of the terminated con1 has been done yet (it may not
+# even be started, so con1 may have not even attempted to lock the binlog yet;
+# so SHOW BINLOG EVENTS may come before con1 does the loggin. To be sure that
+# logging has been done, we use a user lock.
+select get_lock("a",10);
+show binlog events from 79;
+
+# and when not in a transaction?
+delete from ti;
+delete from tm;
+reset master;
+
+insert into ti values(9);
+insert into tm select * from ti;
+
+show binlog events from 79;
+
+# Check that when the query updating the MyISAM table is the first in the
+# transaction, we log it immediately.
+delete from ti;
+delete from tm;
+reset master;
+
+insert into ti values(10); # first make ti non-empty
+begin;
+insert into tm select * from ti;
+show binlog events from 79;
+insert into ti values(11);
+commit;
+
+show binlog events from 79;
+
+
+# Check that things work like before this BEGIN/ROLLBACK code was added, when tm
+# is INNODB
+
+alter table tm type=INNODB;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(12);
+insert into tm select * from ti;
+commit;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(13);
+insert into tm select * from ti;
+rollback;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(14);
+savepoint my_savepoint;
+insert into ti values(15);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+commit;
+
+show binlog events from 79;
+
+delete from ti;
+delete from tm;
+reset master;
+
+begin;
+insert into ti values(16);
+savepoint my_savepoint;
+insert into ti values(17);
+insert into tm select * from ti;
+rollback to savepoint my_savepoint;
+insert into ti values(18);
+commit;
+select a from ti order by a; # check that savepoints work :)
+
+show binlog events from 79;
+
+drop table ti,tm;
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 8e560cab455..6b59778bbce 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -268,3 +268,10 @@ create table t2(Z varchar(15));
insert into t2(Z) select concat(a.a,b.a,c.a,d.a) from t1 as a, t1 as b, t1 as c, t1 as d;
update t2,t3 set Z =param_scenario_costs;
drop table t1,t2,t3;
+create table t1 (a int, b int);
+create table t2 (a int, b int);
+insert into t1 values (1,1),(2,1),(3,1);
+insert into t2 values (1,1), (3,1);
+update t1 left join t2 on t1.a=t2.a set t1.b=2, t2.b=2 where t1.b=1 and t2.b=1 or t2.a is NULL;
+select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and t2.b=1 or t2.a is NULL;
+drop table t1,t2;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 5267b57259b..2918628e6f3 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -295,6 +295,12 @@ insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei");
+update t1 set b=repeat('a',256);
+update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0;
+check table t1;
+delete from t1 where i8=1;
+select * from t1;
+check table t1;
drop table t1;
#
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index c1c818efb70..39612f680f3 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -10,8 +10,8 @@ insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
grant select on test.* to ssl_user2@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com";
-grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=RU/L=orenburg/O=MySQL AB/OU=client/CN=walrus/Email=walrus@mysql.com" ISSUER "/C=RU/ST=Some-State/L=Orenburg/O=MySQL AB/CN=Walrus/Email=walrus@mysql.com";
+grant select on test.* to ssl_user3@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com";
+grant select on test.* to ssl_user4@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com";
flush privileges;
connect (con1,localhost,ssl_user1,,);
connect (con2,localhost,ssl_user2,,);
diff --git a/mysql-test/t/openssl_2.test b/mysql-test/t/openssl_2.test
deleted file mode 100644
index a8ee62db7f6..00000000000
--- a/mysql-test/t/openssl_2.test
+++ /dev/null
@@ -1,5 +0,0 @@
-# We want to test everything with SSL turned on.
--- source include/have_openssl_2.inc
-
-SHOW STATUS LIKE 'Ssl%';
-
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index 5c4e7efcaf3..cbeaa04ca52 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -12,8 +12,8 @@ set global net_buffer_length=100;
set net_buffer_length=100;
# Have to be > 1024 as min value of net_buffer_length is 1024
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
-# Should return NULL as 200 is bigger than max_allowed_packet
-select repeat('a',200);
+# Should return NULL as 2000 is bigger than max_allowed_packet
+select repeat('a',2000);
#
# Connection 2 should get error for too big packets
@@ -28,4 +28,4 @@ set max_allowed_packet=default;
set global net_buffer_length=default;
set net_buffer_length=default;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
-select length(repeat('a',200));
+select length(repeat('a',2000));
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index b784bcf5076..dcdf70ee612 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -11,7 +11,7 @@ flush query cache; # This crashed in some versions
reset query cache;
flush status;
--disable_warnings
-drop table if exists t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t00,mysqltest.t1;
+drop table if exists t1,t2,t3;
drop database if exists mysqltest;
--enable_warnings
@@ -487,531 +487,3 @@ select * from t1;
show status like "Qcache_queries_in_cache";
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
drop table t1;
-
-#
-# more then 255 (257) merged tables test
-#
-flush status;
-create table t0(a int);
-create table t1(a int);
-create table t2(a int);
-create table t3(a int);
-create table t4(a int);
-create table t5(a int);
-create table t6(a int);
-create table t7(a int);
-create table t8(a int);
-create table t9(a int);
-create table t10(a int);
-create table t11(a int);
-create table t12(a int);
-create table t13(a int);
-create table t14(a int);
-create table t15(a int);
-create table t16(a int);
-create table t17(a int);
-create table t18(a int);
-create table t19(a int);
-create table t20(a int);
-create table t21(a int);
-create table t22(a int);
-create table t23(a int);
-create table t24(a int);
-create table t25(a int);
-create table t26(a int);
-create table t27(a int);
-create table t28(a int);
-create table t29(a int);
-create table t30(a int);
-create table t31(a int);
-create table t32(a int);
-create table t33(a int);
-create table t34(a int);
-create table t35(a int);
-create table t36(a int);
-create table t37(a int);
-create table t38(a int);
-create table t39(a int);
-create table t40(a int);
-create table t41(a int);
-create table t42(a int);
-create table t43(a int);
-create table t44(a int);
-create table t45(a int);
-create table t46(a int);
-create table t47(a int);
-create table t48(a int);
-create table t49(a int);
-create table t50(a int);
-create table t51(a int);
-create table t52(a int);
-create table t53(a int);
-create table t54(a int);
-create table t55(a int);
-create table t56(a int);
-create table t57(a int);
-create table t58(a int);
-create table t59(a int);
-create table t60(a int);
-create table t61(a int);
-create table t62(a int);
-create table t63(a int);
-create table t64(a int);
-create table t65(a int);
-create table t66(a int);
-create table t67(a int);
-create table t68(a int);
-create table t69(a int);
-create table t70(a int);
-create table t71(a int);
-create table t72(a int);
-create table t73(a int);
-create table t74(a int);
-create table t75(a int);
-create table t76(a int);
-create table t77(a int);
-create table t78(a int);
-create table t79(a int);
-create table t80(a int);
-create table t81(a int);
-create table t82(a int);
-create table t83(a int);
-create table t84(a int);
-create table t85(a int);
-create table t86(a int);
-create table t87(a int);
-create table t88(a int);
-create table t89(a int);
-create table t90(a int);
-create table t91(a int);
-create table t92(a int);
-create table t93(a int);
-create table t94(a int);
-create table t95(a int);
-create table t96(a int);
-create table t97(a int);
-create table t98(a int);
-create table t99(a int);
-create table t100(a int);
-create table t101(a int);
-create table t102(a int);
-create table t103(a int);
-create table t104(a int);
-create table t105(a int);
-create table t106(a int);
-create table t107(a int);
-create table t108(a int);
-create table t109(a int);
-create table t110(a int);
-create table t111(a int);
-create table t112(a int);
-create table t113(a int);
-create table t114(a int);
-create table t115(a int);
-create table t116(a int);
-create table t117(a int);
-create table t118(a int);
-create table t119(a int);
-create table t120(a int);
-create table t121(a int);
-create table t122(a int);
-create table t123(a int);
-create table t124(a int);
-create table t125(a int);
-create table t126(a int);
-create table t127(a int);
-create table t128(a int);
-create table t129(a int);
-create table t130(a int);
-create table t131(a int);
-create table t132(a int);
-create table t133(a int);
-create table t134(a int);
-create table t135(a int);
-create table t136(a int);
-create table t137(a int);
-create table t138(a int);
-create table t139(a int);
-create table t140(a int);
-create table t141(a int);
-create table t142(a int);
-create table t143(a int);
-create table t144(a int);
-create table t145(a int);
-create table t146(a int);
-create table t147(a int);
-create table t148(a int);
-create table t149(a int);
-create table t150(a int);
-create table t151(a int);
-create table t152(a int);
-create table t153(a int);
-create table t154(a int);
-create table t155(a int);
-create table t156(a int);
-create table t157(a int);
-create table t158(a int);
-create table t159(a int);
-create table t160(a int);
-create table t161(a int);
-create table t162(a int);
-create table t163(a int);
-create table t164(a int);
-create table t165(a int);
-create table t166(a int);
-create table t167(a int);
-create table t168(a int);
-create table t169(a int);
-create table t170(a int);
-create table t171(a int);
-create table t172(a int);
-create table t173(a int);
-create table t174(a int);
-create table t175(a int);
-create table t176(a int);
-create table t177(a int);
-create table t178(a int);
-create table t179(a int);
-create table t180(a int);
-create table t181(a int);
-create table t182(a int);
-create table t183(a int);
-create table t184(a int);
-create table t185(a int);
-create table t186(a int);
-create table t187(a int);
-create table t188(a int);
-create table t189(a int);
-create table t190(a int);
-create table t191(a int);
-create table t192(a int);
-create table t193(a int);
-create table t194(a int);
-create table t195(a int);
-create table t196(a int);
-create table t197(a int);
-create table t198(a int);
-create table t199(a int);
-create table t200(a int);
-create table t201(a int);
-create table t202(a int);
-create table t203(a int);
-create table t204(a int);
-create table t205(a int);
-create table t206(a int);
-create table t207(a int);
-create table t208(a int);
-create table t209(a int);
-create table t210(a int);
-create table t211(a int);
-create table t212(a int);
-create table t213(a int);
-create table t214(a int);
-create table t215(a int);
-create table t216(a int);
-create table t217(a int);
-create table t218(a int);
-create table t219(a int);
-create table t220(a int);
-create table t221(a int);
-create table t222(a int);
-create table t223(a int);
-create table t224(a int);
-create table t225(a int);
-create table t226(a int);
-create table t227(a int);
-create table t228(a int);
-create table t229(a int);
-create table t230(a int);
-create table t231(a int);
-create table t232(a int);
-create table t233(a int);
-create table t234(a int);
-create table t235(a int);
-create table t236(a int);
-create table t237(a int);
-create table t238(a int);
-create table t239(a int);
-create table t240(a int);
-create table t241(a int);
-create table t242(a int);
-create table t243(a int);
-create table t244(a int);
-create table t245(a int);
-create table t246(a int);
-create table t247(a int);
-create table t248(a int);
-create table t249(a int);
-create table t250(a int);
-create table t251(a int);
-create table t252(a int);
-create table t253(a int);
-create table t254(a int);
-create table t255(a int);
-create table t256(a int);
-create table t00 (a int) type=MERGE UNION=(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256) INSERT_METHOD=FIRST;
-insert into t0 values (1),(2);
-insert into t1 values (1),(2);
-insert into t2 values (1),(2);
-insert into t3 values (1),(2);
-insert into t4 values (1),(2);
-insert into t5 values (1),(2);
-insert into t6 values (1),(2);
-insert into t7 values (1),(2);
-insert into t8 values (1),(2);
-insert into t9 values (1),(2);
-insert into t10 values (1),(2);
-insert into t11 values (1),(2);
-insert into t12 values (1),(2);
-insert into t13 values (1),(2);
-insert into t14 values (1),(2);
-insert into t15 values (1),(2);
-insert into t16 values (1),(2);
-insert into t17 values (1),(2);
-insert into t18 values (1),(2);
-insert into t19 values (1),(2);
-insert into t20 values (1),(2);
-insert into t21 values (1),(2);
-insert into t22 values (1),(2);
-insert into t23 values (1),(2);
-insert into t24 values (1),(2);
-insert into t25 values (1),(2);
-insert into t26 values (1),(2);
-insert into t27 values (1),(2);
-insert into t28 values (1),(2);
-insert into t29 values (1),(2);
-insert into t30 values (1),(2);
-insert into t31 values (1),(2);
-insert into t32 values (1),(2);
-insert into t33 values (1),(2);
-insert into t34 values (1),(2);
-insert into t35 values (1),(2);
-insert into t36 values (1),(2);
-insert into t37 values (1),(2);
-insert into t38 values (1),(2);
-insert into t39 values (1),(2);
-insert into t40 values (1),(2);
-insert into t41 values (1),(2);
-insert into t42 values (1),(2);
-insert into t43 values (1),(2);
-insert into t44 values (1),(2);
-insert into t45 values (1),(2);
-insert into t46 values (1),(2);
-insert into t47 values (1),(2);
-insert into t48 values (1),(2);
-insert into t49 values (1),(2);
-insert into t50 values (1),(2);
-insert into t51 values (1),(2);
-insert into t52 values (1),(2);
-insert into t53 values (1),(2);
-insert into t54 values (1),(2);
-insert into t55 values (1),(2);
-insert into t56 values (1),(2);
-insert into t57 values (1),(2);
-insert into t58 values (1),(2);
-insert into t59 values (1),(2);
-insert into t60 values (1),(2);
-insert into t61 values (1),(2);
-insert into t62 values (1),(2);
-insert into t63 values (1),(2);
-insert into t64 values (1),(2);
-insert into t65 values (1),(2);
-insert into t66 values (1),(2);
-insert into t67 values (1),(2);
-insert into t68 values (1),(2);
-insert into t69 values (1),(2);
-insert into t70 values (1),(2);
-insert into t71 values (1),(2);
-insert into t72 values (1),(2);
-insert into t73 values (1),(2);
-insert into t74 values (1),(2);
-insert into t75 values (1),(2);
-insert into t76 values (1),(2);
-insert into t77 values (1),(2);
-insert into t78 values (1),(2);
-insert into t79 values (1),(2);
-insert into t80 values (1),(2);
-insert into t81 values (1),(2);
-insert into t82 values (1),(2);
-insert into t83 values (1),(2);
-insert into t84 values (1),(2);
-insert into t85 values (1),(2);
-insert into t86 values (1),(2);
-insert into t87 values (1),(2);
-insert into t88 values (1),(2);
-insert into t89 values (1),(2);
-insert into t90 values (1),(2);
-insert into t91 values (1),(2);
-insert into t92 values (1),(2);
-insert into t93 values (1),(2);
-insert into t94 values (1),(2);
-insert into t95 values (1),(2);
-insert into t96 values (1),(2);
-insert into t97 values (1),(2);
-insert into t98 values (1),(2);
-insert into t99 values (1),(2);
-insert into t100 values (1),(2);
-insert into t101 values (1),(2);
-insert into t102 values (1),(2);
-insert into t103 values (1),(2);
-insert into t104 values (1),(2);
-insert into t105 values (1),(2);
-insert into t106 values (1),(2);
-insert into t107 values (1),(2);
-insert into t108 values (1),(2);
-insert into t109 values (1),(2);
-insert into t110 values (1),(2);
-insert into t111 values (1),(2);
-insert into t112 values (1),(2);
-insert into t113 values (1),(2);
-insert into t114 values (1),(2);
-insert into t115 values (1),(2);
-insert into t116 values (1),(2);
-insert into t117 values (1),(2);
-insert into t118 values (1),(2);
-insert into t119 values (1),(2);
-insert into t120 values (1),(2);
-insert into t121 values (1),(2);
-insert into t122 values (1),(2);
-insert into t123 values (1),(2);
-insert into t124 values (1),(2);
-insert into t125 values (1),(2);
-insert into t126 values (1),(2);
-insert into t127 values (1),(2);
-insert into t128 values (1),(2);
-insert into t129 values (1),(2);
-insert into t130 values (1),(2);
-insert into t131 values (1),(2);
-insert into t132 values (1),(2);
-insert into t133 values (1),(2);
-insert into t134 values (1),(2);
-insert into t135 values (1),(2);
-insert into t136 values (1),(2);
-insert into t137 values (1),(2);
-insert into t138 values (1),(2);
-insert into t139 values (1),(2);
-insert into t140 values (1),(2);
-insert into t141 values (1),(2);
-insert into t142 values (1),(2);
-insert into t143 values (1),(2);
-insert into t144 values (1),(2);
-insert into t145 values (1),(2);
-insert into t146 values (1),(2);
-insert into t147 values (1),(2);
-insert into t148 values (1),(2);
-insert into t149 values (1),(2);
-insert into t150 values (1),(2);
-insert into t151 values (1),(2);
-insert into t152 values (1),(2);
-insert into t153 values (1),(2);
-insert into t154 values (1),(2);
-insert into t155 values (1),(2);
-insert into t156 values (1),(2);
-insert into t157 values (1),(2);
-insert into t158 values (1),(2);
-insert into t159 values (1),(2);
-insert into t160 values (1),(2);
-insert into t161 values (1),(2);
-insert into t162 values (1),(2);
-insert into t163 values (1),(2);
-insert into t164 values (1),(2);
-insert into t165 values (1),(2);
-insert into t166 values (1),(2);
-insert into t167 values (1),(2);
-insert into t168 values (1),(2);
-insert into t169 values (1),(2);
-insert into t170 values (1),(2);
-insert into t171 values (1),(2);
-insert into t172 values (1),(2);
-insert into t173 values (1),(2);
-insert into t174 values (1),(2);
-insert into t175 values (1),(2);
-insert into t176 values (1),(2);
-insert into t177 values (1),(2);
-insert into t178 values (1),(2);
-insert into t179 values (1),(2);
-insert into t180 values (1),(2);
-insert into t181 values (1),(2);
-insert into t182 values (1),(2);
-insert into t183 values (1),(2);
-insert into t184 values (1),(2);
-insert into t185 values (1),(2);
-insert into t186 values (1),(2);
-insert into t187 values (1),(2);
-insert into t188 values (1),(2);
-insert into t189 values (1),(2);
-insert into t190 values (1),(2);
-insert into t191 values (1),(2);
-insert into t192 values (1),(2);
-insert into t193 values (1),(2);
-insert into t194 values (1),(2);
-insert into t195 values (1),(2);
-insert into t196 values (1),(2);
-insert into t197 values (1),(2);
-insert into t198 values (1),(2);
-insert into t199 values (1),(2);
-insert into t200 values (1),(2);
-insert into t201 values (1),(2);
-insert into t202 values (1),(2);
-insert into t203 values (1),(2);
-insert into t204 values (1),(2);
-insert into t205 values (1),(2);
-insert into t206 values (1),(2);
-insert into t207 values (1),(2);
-insert into t208 values (1),(2);
-insert into t209 values (1),(2);
-insert into t210 values (1),(2);
-insert into t211 values (1),(2);
-insert into t212 values (1),(2);
-insert into t213 values (1),(2);
-insert into t214 values (1),(2);
-insert into t215 values (1),(2);
-insert into t216 values (1),(2);
-insert into t217 values (1),(2);
-insert into t218 values (1),(2);
-insert into t219 values (1),(2);
-insert into t220 values (1),(2);
-insert into t221 values (1),(2);
-insert into t222 values (1),(2);
-insert into t223 values (1),(2);
-insert into t224 values (1),(2);
-insert into t225 values (1),(2);
-insert into t226 values (1),(2);
-insert into t227 values (1),(2);
-insert into t228 values (1),(2);
-insert into t229 values (1),(2);
-insert into t230 values (1),(2);
-insert into t231 values (1),(2);
-insert into t232 values (1),(2);
-insert into t233 values (1),(2);
-insert into t234 values (1),(2);
-insert into t235 values (1),(2);
-insert into t236 values (1),(2);
-insert into t237 values (1),(2);
-insert into t238 values (1),(2);
-insert into t239 values (1),(2);
-insert into t240 values (1),(2);
-insert into t241 values (1),(2);
-insert into t242 values (1),(2);
-insert into t243 values (1),(2);
-insert into t244 values (1),(2);
-insert into t245 values (1),(2);
-insert into t246 values (1),(2);
-insert into t247 values (1),(2);
-insert into t248 values (1),(2);
-insert into t249 values (1),(2);
-insert into t250 values (1),(2);
-insert into t251 values (1),(2);
-insert into t252 values (1),(2);
-insert into t253 values (1),(2);
-insert into t254 values (1),(2);
-insert into t255 values (1),(2);
-insert into t256 values (1),(2);
-enable_result_log;
-select count(*) from t00;
-select count(*) from t00;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-delete from t256;
-show status like "Qcache_queries_in_cache";
-drop table t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t00;
diff --git a/mysql-test/t/query_cache_merge.test b/mysql-test/t/query_cache_merge.test
new file mode 100644
index 00000000000..02e316932a3
--- /dev/null
+++ b/mysql-test/t/query_cache_merge.test
@@ -0,0 +1,38 @@
+# Test query cache with many tables
+
+--source include/have_query_cache.inc
+let $LIMIT=`SHOW VARIABLES LIKE 'open_files_limit'`;
+let $MIN_LIMIT=600;
+let $MAX_LIMIT=65536;
+--source include/check_var_limit.inc
+
+SET @@global.query_cache_size=1355776;
+
+#
+# more then 255 (257) merged tables test
+#
+
+flush status;
+disable_query_log;
+--disable_warnings
+let $1 = 257;
+while ($1)
+{
+ eval drop table if exists t$1;
+ eval create table t$1(a int);
+ eval insert into t$1 values (1),(2);
+ dec $1;
+}
+--enable_warnings
+
+create table t00 (a int) type=MERGE UNION=(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257) INSERT_METHOD=FIRST;
+enable_query_log;
+select count(*) from t00;
+select count(*) from t00;
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_hits";
+delete from t256;
+show status like "Qcache_queries_in_cache";
+drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;
+
+SET @@global.query_cache_size=0;
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 8d341837acd..70780a0676a 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -186,3 +186,20 @@ insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
drop table t1;
+#
+# BETWEEN problems
+#
+create table t1 (x int, y int, index(x), index(y));
+insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
+update t1 set y=x;
+# between with only one end fixed
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 7 and t1.y+0;
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 7 and t2.x <= t1.y+0;
+# between with both expressions on both ends
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1;
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1;
+# equation propagation
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
+drop table t1;
+
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test
index 061066c7a31..478d4b75a36 100644
--- a/mysql-test/t/rpl_loaddata.test
+++ b/mysql-test/t/rpl_loaddata.test
@@ -13,6 +13,10 @@
source include/master-slave.inc;
+connection slave;
+reset master;
+connection master;
+
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
@@ -28,6 +32,14 @@ sync_with_master;
select * from t1;
select * from t3;
+# We want to be sure that LOAD DATA is in the slave's binlog.
+# But we can't simply read this binlog, because as the slave has not been
+# restarted for this test, the file_id is uncertain (would cause test
+# failures). So instead, we test if the binlog looks long enough to
+# contain LOAD DATA. That is, I (Guilhem) have done SHOW BINLOG EVENTS on my
+# machine, saw that the binlog is of size 964 when things go fine.
+# If LOAD DATA was not logged, the binlog would be shorter.
+show master status;
connection master;
@@ -39,6 +51,9 @@ create table t1(a int, b int, unique(b));
save_master_pos;
connection slave;
sync_with_master;
+
+# See if slave stops when there's a duplicate entry for key error in LOAD DATA
+
insert into t1 values(1,10);
connection master;
diff --git a/mysql-test/t/rpl_loaddata_rule_m-master.opt b/mysql-test/t/rpl_loaddata_rule_m-master.opt
new file mode 100644
index 00000000000..9d4a8f0b95e
--- /dev/null
+++ b/mysql-test/t/rpl_loaddata_rule_m-master.opt
@@ -0,0 +1 @@
+--binlog_ignore_db=test
diff --git a/mysql-test/t/rpl_loaddata_rule_m.test b/mysql-test/t/rpl_loaddata_rule_m.test
new file mode 100644
index 00000000000..18f295f8ce2
--- /dev/null
+++ b/mysql-test/t/rpl_loaddata_rule_m.test
@@ -0,0 +1,18 @@
+# See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules
+# exist.
+# This is for BUG#1100 (LOAD DATA INFILE was half-logged).
+
+source include/master-slave.inc;
+connection slave;
+reset master;
+
+# Test logging on master
+
+connection master;
+# 'test' is the current database
+create database test2;
+create table t1(a int, b int, unique(b));
+use test2;
+load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
+show binlog events from 79; # should be nothing
+drop database test2;
diff --git a/mysql-test/t/rpl_loaddata_rule_s-slave.opt b/mysql-test/t/rpl_loaddata_rule_s-slave.opt
new file mode 100644
index 00000000000..9d4a8f0b95e
--- /dev/null
+++ b/mysql-test/t/rpl_loaddata_rule_s-slave.opt
@@ -0,0 +1 @@
+--binlog_ignore_db=test
diff --git a/mysql-test/t/rpl_loaddata_rule_s.test b/mysql-test/t/rpl_loaddata_rule_s.test
new file mode 100644
index 00000000000..1ea4f6825f5
--- /dev/null
+++ b/mysql-test/t/rpl_loaddata_rule_s.test
@@ -0,0 +1,20 @@
+# See if the slave logs (in its own binlog, with --log-slave-updates) a
+# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules.
+# This is for BUG#1100 (LOAD DATA INFILE was half-logged).
+
+source include/master-slave.inc;
+connection slave;
+reset master;
+
+connection master;
+# 'test' is the current database
+create table t1(a int, b int, unique(b));
+load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
+
+# Test logging on slave;
+
+save_master_pos;
+connection slave;
+sync_with_master;
+select count(*) from t1; # check that LOAD was replicated
+show binlog events from 79; # should be nothing
diff --git a/mysql-test/t/rpl_log-slave.opt b/mysql-test/t/rpl_log-slave.opt
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/mysql-test/t/rpl_log-slave.opt
@@ -0,0 +1 @@
+
diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test
index f64aa292d30..77be92f64fd 100644
--- a/mysql-test/t/rpl_log.test
+++ b/mysql-test/t/rpl_log.test
@@ -15,6 +15,16 @@ sync_with_master;
stop slave;
reset master;
reset slave;
+# We are going to read the slave's binlog which contains file_id (for some LOAD
+# DATA INFILE); to make it repeatable (not influenced by other tests), we need
+# to stop and start the slave, to be sure file_id will start from 1.
+# This can be done with 'server_stop slave', but
+# this would require the manager, so most of the time the test will be skipped
+# :(
+# To workaround this, I (Guilhem) add a (empty) rpl_log-slave.opt (because when
+# mysql-test-run finds such a file it restarts the slave before doing the
+# test). That's not very elegant but I could find no better way, sorry.
+
let $VERSION=`select version()`;
connection master;
@@ -23,7 +33,8 @@ create table t1(n int not null auto_increment primary key);
insert into t1 values (NULL);
drop table t1;
create table t1 (word char(20) not null);
-load data infile '../../std_data/words.dat' into table t1;
+load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
+select count(*) from t1;
drop table t1;
--replace_result $VERSION VERSION
show binlog events;
@@ -45,8 +56,8 @@ flush logs;
# So, depending on a few milliseconds, we end up with 2 rotate events in the
# relay log or one, which influences the output of SHOW SLAVE STATUS, making
# it not predictable and causing random test failures.
-# To make it predictable, we do a useless update now, but which has the interest
-# of making the slave catch both rotate events.
+# To make it predictable, we do a useless update now, but which has the
+# interest of making the slave catch both rotate events.
create table t5 (a int);
drop table t5;
diff --git a/mysql-test/t/select_safe.test b/mysql-test/t/select_safe.test
index 1f46355d39b..3cafd31a879 100644
--- a/mysql-test/t/select_safe.test
+++ b/mysql-test/t/select_safe.test
@@ -59,9 +59,9 @@ SELECT * from t1;
SELECT @@MAX_SEEKS_FOR_KEY;
analyze table t1;
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
-explain select * from t1,t1 as t2 where t1.b=t2.b;
+explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
set MAX_SEEKS_FOR_KEY=1;
-explain select * from t1,t1 as t2 where t1.b=t2.b;
+explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
SET MAX_SEEKS_FOR_KEY=DEFAULT;
drop table t1;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index f6f0ac0b82b..633826186be 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -120,6 +120,13 @@ insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
select * from t1;
drop table t1;
+#
+# Check metadata
+#
+create table t1 (a int not null);
+create table t2 select max(a) from t1;
+show columns from t2;
+drop table t1,t2;
# Check auto conversions of types
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index a8daf36ed10..f618c342936 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -49,6 +49,7 @@ check table t9;
optimize table t9;
repair table t9;
alter table t9 add column c int not null;
+--replace_result $MYSQL_TEST_DIR TEST_DIR
show create table t9;
# Test renames
@@ -89,5 +90,6 @@ enable_query_log;
alter table t9 rename mysqltest.t9;
select count(*) from mysqltest.t9;
+--replace_result $MYSQL_TEST_DIR TEST_DIR
show create table mysqltest.t9;
drop database mysqltest;
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 3506c713907..e7bda27d43e 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -194,6 +194,60 @@ select * from t4;
drop table t1,t2,t3,t4;
#
+# Test of SQL_CALC_FOUND_ROW handling
+#
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+create table t2 (a int);
+insert into t2 values (3),(4),(5);
+
+# Test global limits
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1) UNION all (SELECT * FROM t2) LIMIT 1;
+select found_rows();
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all (SELECT * FROM t2) LIMIT 2;
+select found_rows();
+
+# Test cases where found_rows() should return number of returned rows
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all (SELECT * FROM t2);
+select found_rows();
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1) UNION all (SELECT * FROM t2 LIMIT 1);
+select found_rows();
+(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1;
+select found_rows();
+
+# In these case found_rows() should work
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2;
+select found_rows();
+
+# The following examples will not be exact
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2;
+select found_rows();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 limit 2,2 UNION SELECT * FROM t2;
+select found_rows();
+
+# Test some limits with ORDER BY
+SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
+(SELECT * FROM t1 ORDER by a) UNION ALL (SELECT * FROM t2 ORDER BY a) ORDER BY A desc LIMIT 4;
+
+# Wrong usage
+--error 1234
+(SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1;
+
+drop table t1,t2;
+
+#
# Test for another bug with UNION and LEFT JOIN
#
CREATE TABLE t1 ( id int(3) unsigned default '0') TYPE=MyISAM;
diff --git a/mysys/default.c b/mysys/default.c
index 9f7181b7da9..8bdf8d4f741 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -15,22 +15,22 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/****************************************************************************
-** Add all options from files named "group".cnf from the default_directories
-** before the command line arguments.
-** On Windows defaults will also search in the Windows directory for a file
-** called 'group'.ini
-** As long as the program uses the last argument for conflicting
-** options one only have to add a call to "load_defaults" to enable
-** use of default values.
-** pre- and end 'blank space' are removed from options and values. The
-** following escape sequences are recognized in values: \b \t \n \r \\
-**
-** The following arguments are handled automaticly; If used, they must be
-** first argument on the command line!
-** --no-defaults ; no options are read.
-** --defaults-file=full-path-to-default-file ; Only this file will be read.
-** --defaults-extra-file=full-path-to-default-file ; Read this file before ~/
-** --print-defaults ; Print the modified command line and exit
+ Add all options from files named "group".cnf from the default_directories
+ before the command line arguments.
+ On Windows defaults will also search in the Windows directory for a file
+ called 'group'.ini
+ As long as the program uses the last argument for conflicting
+ options one only have to add a call to "load_defaults" to enable
+ use of default values.
+ pre- and end 'blank space' are removed from options and values. The
+ following escape sequences are recognized in values: \b \t \n \r \\
+
+ The following arguments are handled automaticly; If used, they must be
+ first argument on the command line!
+ --no-defaults ; no options are read.
+ --defaults-file=full-path-to-default-file ; Only this file will be read.
+ --defaults-extra-file=full-path-to-default-file ; Read this file before ~/
+ --print-defaults ; Print the modified command line and exit
****************************************************************************/
#include "mysys_priv.h"
@@ -66,13 +66,46 @@ NullS,
#define windows_ext ".ini"
#endif
-static my_bool search_default_file(DYNAMIC_ARRAY *args,MEM_ROOT *alloc,
- const char *dir, const char *config_file,
- const char *ext, TYPELIB *group);
+static int search_default_file(DYNAMIC_ARRAY *args,MEM_ROOT *alloc,
+ const char *dir, const char *config_file,
+ const char *ext, TYPELIB *group);
static char *remove_end_comment(char *ptr);
-void load_defaults(const char *conf_file, const char **groups,
+
+/*
+ Read options from configurations files
+
+ SYNOPSIS
+ load_defaults()
+ conf_file Basename for configuration file to search for.
+ If this is a path, then only this file is read.
+ groups Which [group] entrys to read.
+ Points to an null terminated array of pointers
+ argc Pointer to argc of original program
+ argv Pointer to argv of original program
+
+ IMPLEMENTATION
+
+ Read options from configuration files and put them BEFORE the arguments
+ that are already in argc and argv. This way the calling program can
+ easily command line options override options in configuration files
+
+ NOTES
+ In case of fatal error, the function will print a warning and do
+ exit(1)
+
+ To free used memory one should call free_defaults() with the argument
+ that was put in *argv
+
+ RETURN
+ 0 ok
+ 1 The given conf_file didn't exists
+ 2 The given conf_file was not a normal readable file
+*/
+
+
+int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv)
{
DYNAMIC_ARRAY args;
@@ -80,6 +113,7 @@ void load_defaults(const char *conf_file, const char **groups,
TYPELIB group;
my_bool found_print_defaults=0;
uint args_used=0;
+ int error= 0;
MEM_ROOT alloc;
char *ptr,**res;
DBUG_ENTER("load_defaults");
@@ -100,7 +134,7 @@ void load_defaults(const char *conf_file, const char **groups,
(*argc)--;
*argv=res;
*(MEM_ROOT*) ptr= alloc; /* Save alloc root for free */
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
/* Check if we want to force the use a specific default file */
@@ -129,14 +163,14 @@ void load_defaults(const char *conf_file, const char **groups,
goto err;
if (forced_default_file)
{
- if (search_default_file(&args, &alloc, "", forced_default_file, "",
- &group))
+ if ((error= search_default_file(&args, &alloc, "",
+ forced_default_file, "", &group)) < 0)
goto err;
}
else if (dirname_length(conf_file))
{
- if (search_default_file(&args, &alloc, NullS, conf_file, default_ext,
- &group))
+ if ((error= search_default_file(&args, &alloc, NullS, conf_file,
+ default_ext, &group)) < 0)
goto err;
}
else
@@ -144,29 +178,36 @@ void load_defaults(const char *conf_file, const char **groups,
#ifdef __WIN__
char system_dir[FN_REFLEN];
GetWindowsDirectory(system_dir,sizeof(system_dir));
- if (search_default_file(&args, &alloc, system_dir, conf_file, windows_ext,
- &group))
+ if ((search_default_file(&args, &alloc, system_dir, conf_file,
+ windows_ext, &group)))
goto err;
#endif
#if defined(__EMX__) || defined(OS2)
if (getenv("ETC") &&
- search_default_file(&args, &alloc, getenv("ETC"), conf_file,
- default_ext, &group))
+ (search_default_file(&args, &alloc, getenv("ETC"), conf_file,
+ default_ext, &group)) < 0)
goto err;
#endif
for (dirs=default_directories ; *dirs; dirs++)
{
- int error=0;
if (**dirs)
- error=search_default_file(&args, &alloc, *dirs, conf_file,
- default_ext, &group);
+ {
+ if (search_default_file(&args, &alloc, *dirs, conf_file,
+ default_ext, &group) < 0)
+ goto err;
+ }
else if (defaults_extra_file)
- error=search_default_file(&args, &alloc, NullS, defaults_extra_file,
- default_ext, &group);
- if (error)
- goto err;
+ {
+ if (search_default_file(&args, &alloc, NullS, defaults_extra_file,
+ default_ext, &group) < 0)
+ goto err; /* Fatal error */
+ }
}
}
+ /*
+ Here error contains <> 0 only if we have a fully specified conf_file
+ or a forced default file
+ */
if (!(ptr=(char*) alloc_root(&alloc,sizeof(alloc)+
(args.elements + *argc +1) *sizeof(char*))))
goto err;
@@ -202,12 +243,12 @@ void load_defaults(const char *conf_file, const char **groups,
for (i=1 ; i < *argc ; i++)
printf("%s ", (*argv)[i]);
puts("");
- exit(1);
+ exit(0);
}
- DBUG_VOID_RETURN;
+ DBUG_RETURN(error);
err:
- fprintf(stderr,"Program aborted\n");
+ fprintf(stderr,"Fatal error in defaults handling. Program aborted\n");
exit(1);
}
@@ -220,9 +261,28 @@ void free_defaults(char **argv)
}
-static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
- const char *dir, const char *config_file,
- const char *ext, TYPELIB *group)
+/*
+ Open a configuration file (if exists) and read given options from it
+
+ SYNOPSIS
+ search_default_file()
+ args Store pointer to found options here
+ alloc Allocate strings in this object
+ dir directory to read
+ config_file Name of configuration file
+ ext Extension for configuration file
+ group groups to read
+
+ RETURN
+ 0 Success
+ -1 Fatal error, abort
+ 1 File not found (Warning)
+ 2 File is not a regular file (Warning)
+*/
+
+static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
+ const char *dir, const char *config_file,
+ const char *ext, TYPELIB *group)
{
char name[FN_REFLEN+10],buff[4096],*ptr,*end,*value,*tmp;
FILE *fp;
@@ -247,7 +307,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{
MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(0)))
- return 0;
+ return 1;
/*
Ignore world-writable regular files.
This is mainly done to protect us to not read a file created by
@@ -364,7 +424,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
err:
my_fclose(fp,MYF(0));
- return 1;
+ return -1; /* Fatal error */
}
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 0f35ee048bb..d96d4c0db3c 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -988,6 +988,20 @@ end:
}
+int my_b_safe_write(IO_CACHE *info, const byte *Buffer, uint Count)
+{
+ /*
+ Sasha: We are not writing this with the ? operator to avoid hitting
+ a possible compiler bug. At least gcc 2.95 cannot deal with
+ several layers of ternary operators that evaluated comma(,) operator
+ expressions inside - I do have a test case if somebody wants it
+ */
+ if (info->type == SEQ_READ_APPEND)
+ return my_b_append(info, Buffer, Count);
+ return my_b_write(info, Buffer, Count);
+}
+
+
/*
Write a block to disk where part of the data may be inside the record
buffer. As all write calls to the data goes through the cache,
diff --git a/mysys/my_chsize.c b/mysys/my_chsize.c
index 06e8f159f4a..8e46b0808c0 100644
--- a/mysys/my_chsize.c
+++ b/mysys/my_chsize.c
@@ -30,74 +30,83 @@
MyFlags Flags
DESCRIPTION
- my_chsize() truncates file if shorter, else fill with the filler character
+ my_chsize() truncates file if shorter else fill with the filler character
RETURN VALUE
0 Ok
1 Error
*/
-
int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
+ my_off_t oldsize;
+ char buff[IO_SIZE];
DBUG_ENTER("my_chsize");
DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %d",fd,(ulong) newlength,
MyFlags));
-#ifdef HAVE_CHSIZE
- if (chsize(fd,(off_t) newlength))
+ oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE));
+ DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
+
+ if (oldsize > newlength)
+#if defined(HAVE_SETFILEPOINTER)
+ /* This is for the moment only true on windows */
{
- DBUG_PRINT("error",("errno: %d",errno));
- my_errno=errno;
- if (MyFlags & MY_WME)
- my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno);
- DBUG_RETURN(1);
+ HANDLE win_file= (HANDLE) _get_osfhandle(fd);
+ long length_low, length_high;
+ length_low= (long) (ulong) newlength;
+ length_high= (long) ((ulonglong) newlength >> 32);
+ if (SetFilePointer(win_file, length_low, &length_high, FILE_BEGIN))
+ {
+ if (SetEndOfFile(win_file))
+ DBUG_RETURN(0);
+ }
+ my_errno= errno;
+ goto err;
}
- DBUG_RETURN(0);
-#else
- /* if file is shorter, expand with null, else fill unused part with null */
+#elif defined(HAVE_FTRUNCATE)
{
- my_off_t oldsize;
- char buff[IO_SIZE];
-
- oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE));
- DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
-
-#ifdef HAVE_FTRUNCATE
- if (oldsize > newlength)
+ if (ftruncate(fd, (off_t) newlength))
{
- if (ftruncate(fd, (off_t) newlength))
- {
- my_errno=errno;
- DBUG_PRINT("error",("errno: %d",errno));
- if (MyFlags & MY_WME)
- my_error(EE_CANT_CHSIZE, MYF(ME_BELL+ME_WAITTANG), errno);
- DBUG_RETURN(1);
- }
- DBUG_RETURN(0);
- }
-#else
- if (oldsize > newlength)
- { /* Fill diff with null */
- VOID(my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE)));
- swap(my_off_t, newlength, oldsize);
+ my_errno= errno;
+ goto err;
}
-#endif
- /* Full file with 0 until it's as big as requested */
- bfill(buff, IO_SIZE, filler);
- while (newlength-oldsize > IO_SIZE)
+ DBUG_RETURN(0);
+ }
+#elif defined(HAVE_CHSIZE)
+ {
+ if (chsize(fd, (off_t) newlength))
{
- if (my_write(fd,(byte*) buff,IO_SIZE,MYF(MY_NABP)))
- goto err;
- oldsize+= IO_SIZE;
- }
- if (my_write(fd,(byte*) buff,(uint) (newlength-oldsize),MYF(MY_NABP)))
+ my_errno=errno;
goto err;
+ }
DBUG_RETURN(0);
- err:
- if (MyFlags & MY_WME)
- my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),my_errno);
- DBUG_PRINT("error",("errno: %d",my_errno));
- DBUG_RETURN(1);
+ }
+#else
+ {
+ /*
+ Fill space between requested length and true length with 'filler'
+ We should never come here on any modern machine
+ */
+ VOID(my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE)));
+ swap(my_off_t, newlength, oldsize);
}
#endif
-} /* my_chsize */
+
+ /* Full file with 'filler' until it's as big as requested */
+ bfill(buff, IO_SIZE, filler);
+ while (newlength-oldsize > IO_SIZE)
+ {
+ if (my_write(fd,(byte*) buff,IO_SIZE,MYF(MY_NABP)))
+ goto err;
+ oldsize+= IO_SIZE;
+ }
+ if (my_write(fd,(byte*) buff,(uint) (newlength-oldsize),MYF(MY_NABP)))
+ goto err;
+ DBUG_RETURN(0);
+
+err:
+ DBUG_PRINT("error", ("errno: %d", errno));
+ if (MyFlags & MY_WME)
+ my_error(EE_CANT_CHSIZE, MYF(ME_BELL+ME_WAITTANG), my_errno);
+ DBUG_RETURN(1);
+} /* my_chsize */
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index cbbf876ac06..06e7b626bd7 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -525,8 +525,7 @@ static int setval(const struct my_option *opts, gptr *value, char *argument,
break;
case GET_STR_ALLOC:
if ((*((char**) result_pos)))
- my_free((*(char**) result_pos),
- MYF(MY_WME | MY_FAE));
+ my_free((*(char**) result_pos), MYF(MY_WME | MY_FAE));
if (!(*((char**) result_pos)= my_strdup(argument, MYF(MY_WME))))
return EXIT_OUT_OF_MEMORY;
break;
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 32528707480..f10a2210064 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -92,7 +92,7 @@ void *my_pthread_getspecific_imp(pthread_key_t key)
#ifdef __NETWARE__
/*
-don't kill the LibC Reaper thread or the main thread
+ Don't kill the LibC Reaper thread or the main thread
*/
#include <nks/thread.h>
#undef pthread_exit
@@ -105,8 +105,10 @@ void my_pthread_exit(void *status)
NXThreadGetContext(tid, &ctx);
NXContextGetName(ctx, name, PATH_MAX);
- // "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
- // with a debug build of LibC the reaper can have different names
+ /*
+ "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
+ with a debug build of LibC the reaper can have different names
+ */
if (!strindex(name, "\'s"))
{
pthread_exit(status);
@@ -114,8 +116,10 @@ void my_pthread_exit(void *status)
}
#endif
-/* Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7
- (and DEC OSF/1 3.2 too) */
+/*
+ Some functions for RTS threads, AIX, Siemens Unix and UnixWare 7
+ (and DEC OSF/1 3.2 too)
+*/
int my_pthread_create_detached=1;
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 1731a7555e0..9d166fc1baa 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -61,7 +61,7 @@ case $system in
esac
-mkdir $BASE $BASE/bin \
+mkdir $BASE $BASE/bin $BASE/docs \
$BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/scripts \
$BASE/mysql-test $BASE/mysql-test/t $BASE/mysql-test/r \
$BASE/mysql-test/include $BASE/mysql-test/std_data
@@ -73,9 +73,20 @@ if [ $BASE_SYSTEM != "netware" ] ; then
chmod o-rwx $BASE/data $BASE/data/*
fi
-for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \
- MySQLEULA.txt Docs/manual.html Docs/manual.txt Docs/manual_toc.html \
- LICENSE.doc README.NW Docs/mysqlbug.txt
+for i in ChangeLog \
+ Docs/manual.html \
+ Docs/manual.txt \
+ Docs/manual_toc.html \
+ Docs/mysql.info
+do
+ if [ -f $i ]
+ then
+ $CP $i $BASE/docs
+ fi
+done
+
+for i in COPYING COPYING.LIB README Docs/INSTALL-BINARY \
+ MySQLEULA.txt LICENSE.doc README.NW
do
if [ -f $i ]
then
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index df7ac29ee0d..c6b9a41e08e 100755
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -14,6 +14,7 @@ SILENT=0
SUFFIX=""
DIRNAME=""
OUTTAR=0
+OUTZIP=0
#
# This script must run from MySQL top directory
@@ -62,7 +63,8 @@ show_usage()
echo " --suffix Suffix name for the package"
echo " --dirname Directory name to copy files (intermediate)"
echo " --silent Do not list verbosely files processed"
- echo " --tar Create tar.gz package instead of .zip"
+ echo " --tar Create tar.gz package"
+ echo " --zip Create zip package"
echo " --help Show this help message"
exit 0
@@ -75,12 +77,14 @@ show_usage()
parse_arguments() {
for arg do
case "$arg" in
+ --add-tar) ADDTAR=1 ;;
--debug) DEBUG=1;;
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
--dirname=*) DIRNAME=`echo "$arg" | sed -e "s;--dirname=;;"` ;;
--silent) SILENT=1 ;;
--tar) OUTTAR=1 ;;
+ --zip) OUTZIP=1 ;;
--help) show_usage ;;
*)
echo "Unknown argument '$arg'"
@@ -98,16 +102,30 @@ parse_arguments "$@"
for i in $TMP $TMPDIR $TEMPDIR $TEMP /tmp
do
- if [ "$i" ]; then
+ if [ "$i" ]; then
print_debug "Setting TMP to '$i'"
- TMP=$i
+ TMP=$i
break
fi
done
-
+
+#
+# Convert argument file from unix to DOS text
#
+unix_to_dos()
+{
+ for arg do
+ print_debug "Replacing LF -> CRLF from '$arg'"
+
+ sed -e 's/$/\r/' $arg > $arg.tmp
+ rm -f $arg
+ mv $arg.tmp $arg
+ done
+}
+
+
#
# Create a tmp dest directory to copy files
#
@@ -123,14 +141,9 @@ $CP -r $SOURCE/VC++Files $BASE
(
find $BASE \( -name "*.dsp" -o -name "*.dsw" \) -and -not -path \*SCCS\* -print
)|(
- while read v
+ while read v
do
- print_debug "Replacing LF -> CRLF from '$v'"
-
- # ^M -> type CTRL V + CTRL M
- cat $v | sed 's/ //' | sed 's/$/ /' > $v.tmp
- rm $v
- mv $v.tmp $v
+ unix_to_dos $v
done
)
@@ -147,7 +160,7 @@ rm -r -f "$BASE/share/Makefile.am"
# Clean up if we did this from a bk tree
#
-if [ -d $BASE/SCCS ]
+if [ -d $BASE/SCCS ]
then
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
fi
@@ -169,9 +182,9 @@ copy_dir_files()
mkdir $BASE/$arg
fi
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
- README INSTALL* LICENSE
- do
- if [ -f $i ]
+ README INSTALL* LICENSE
+ do
+ if [ -f $i ]
then
$CP $SOURCE/$arg/$i $BASE/$arg/$i
fi
@@ -195,21 +208,19 @@ copy_dir_dirs() {
for arg do
- basedir=$arg
-
- if [ ! -d $BASE/$arg ]; then
- mkdir $BASE/$arg
- fi
-
- copy_dir_files $arg
-
- cd $SOURCE/$arg/
- for i in *
- do
- if [ -d $SOURCE/$basedir/$i ] && [ "$i" != "SCCS" ]; then
- copy_dir_files $basedir/$i
- fi
- done
+ cd $SOURCE
+ (
+ find $arg -type d \
+ -and -not -path \*SCCS\* \
+ -and -not -path \*.deps\* \
+ -and -not -path \*autom4te.cache -print
+ )|(
+ while read v
+ do
+ copy_dir_files $v
+ done
+ )
+
done
}
@@ -220,7 +231,7 @@ copy_dir_dirs() {
for i in client dbug extra heap include isam \
libmysql libmysqld merge myisam \
myisammrg mysys regex sql strings sql-common \
- vio zlib
+ tools vio zlib
do
copy_dir_files $i
done
@@ -249,31 +260,49 @@ touch $BASE/innobase/ib_config.h
#
cd $SOURCE
-for i in COPYING ChangeLog README \
+for i in COPYING COPYING.LIB ChangeLog README \
INSTALL-SOURCE INSTALL-WIN \
INSTALL-WIN-SOURCE \
Docs/manual_toc.html Docs/manual.html \
- Docs/mysqld_error.txt Docs/INSTALL-BINARY
-
+ Docs/manual.txt Docs/mysqld_error.txt \
+ Docs/INSTALL-BINARY
+
do
print_debug "Copying file '$i'"
- if [ -f $i ]
+ if [ -f $i ]
then
$CP $i $BASE/$i
fi
done
#
+# Raw dirs from source tree
+#
+
+for i in Docs/Flags scripts sql-bench SSL \
+ tests
+do
+ print_debug "Copying directory '$i'"
+ if [ -d $i ]
+ then
+ $CP -R $i $BASE/$i
+ fi
+done
+
+#
# Fix some windows files
#
./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp
+unix_to_dos $BASE/README
+mv $BASE/README $BASE/README.txt
+
#
# Initialize the initial data directory
#
-if [ -f scripts/mysql_install_db ]; then
+if [ -f scripts/mysql_install_db ]; then
print_debug "Initializing the 'data' directory"
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
fi
@@ -334,9 +363,13 @@ which_1 ()
# Create the result zip/tar file
#
-set_tarzip_options()
+if [ [ "$OUTTAR" = "0" ] && [ "$OUTZIP" = "0" ] ]; then
+ OUTZIP=1
+fi
+
+set_tarzip_options()
{
- for arg
+ for arg
do
if [ "$arg" = "tar" ]; then
ZIPFILE1=gnutar
@@ -360,43 +393,60 @@ set_tarzip_options()
done
}
-if [ "$OUTTAR" = "1" ]; then
- set_tarzip_options 'tar'
-else
- set_tarzip_options 'zip'
-fi
-
-tar=`which_1 $ZIPFILE1 $ZIPFILE2`
-if test "$?" = "1" -o "$tar" = ""
-then
- print_debug "Search failed for '$ZIPFILE1', '$ZIPFILE2', using default 'tar'"
- tar=tar
- set_tarzip_options 'tar'
-fi
#
# Create the archive
#
+create_archive()
+{
-print_debug "Using $tar to create archive"
+ print_debug "Using $tar to create archive"
-cd $TMP
+ cd $TMP
-rm -f $SOURCE/$NEW_NAME$EXT
-$tar $OPT $SOURCE/$NEW_NAME$EXT $NEW_DIR_NAME
-cd $SOURCE
+ rm -f $SOURCE/$NEW_NAME$EXT
+ $tar $OPT $SOURCE/$NEW_NAME$EXT $NEW_DIR_NAME
+ cd $SOURCE
-if [ "$NEED_COMPRESS" = "1" ]
-then
- print_debug "Compressing archive"
- gzip -9 $NEW_NAME$EXT
- EXT="$EXT.gz"
+ if [ "$NEED_COMPRESS" = "1" ]
+ then
+ print_debug "Compressing archive"
+ gzip -9 $NEW_NAME$EXT
+ EXT="$EXT.gz"
+ fi
+
+ if [ "$SILENT" = "0" ] ; then
+ echo "$NEW_NAME$EXT created successfully !!"
+ fi
+}
+
+if [ "$OUTTAR" = "1" ]; then
+ set_tarzip_options 'tar'
+
+ tar=`which_1 $ZIPFILE1 $ZIPFILE2`
+ if test "$?" = "1" -o "$tar" = ""
+ then
+ print_debug "Search failed for '$ZIPFILE1', '$ZIPFILE2', using default 'tar'"
+ tar=tar
+ set_tarzip_options 'tar'
+ fi
+
+ create_archive
+fi
+
+if [ "$OUTZIP" = "1" ]; then
+ set_tarzip_options 'zip'
+
+ tar=`which_1 $ZIPFILE1 $ZIPFILE2`
+ if test "$?" = "1" -o "$tar" = ""
+ then
+ echo "Search failed for '$ZIPFILE1', '$ZIPFILE2', cannot create zip!"
+ fi
+
+ create_archive
fi
print_debug "Removing temporary directory"
rm -r -f $BASE
-if [ "$SILENT" = "0" ] ; then
- echo "$NEW_NAME$EXT created successfully !!"
-fi
# End of script
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 309463441b5..d95c13698ae 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -138,13 +138,8 @@ then
fi
fi
-# Try to determine the fully qualified domain name (FQDN)
-HOSTNAME="@HOSTNAME@"
-if $HOSTNAME -f > /dev/null 2>&1 ; then
- hostname=`$HOSTNAME -f`
-else
- hostname=`$HOSTNAME`
-fi
+# Try to determine the hostname
+hostname=`@HOSTNAME@`
# Check if hostname is valid
if test "$windows" -eq 0 -a "$in_rpm" -eq 0 -a $force -eq 0
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index d7e3eedb84e..1c056e963cb 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -148,7 +148,7 @@ else
fi
args=
-parse_arguments `$print_defaults $defaults mysqld server mysqld_safe safe_mysqld`
+parse_arguments `$print_defaults --loose-verbose $defaults mysqld server mysqld_safe safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
if test ! -x $ledir/$MYSQLD
diff --git a/sql-bench/limits/mysql.cfg b/sql-bench/limits/mysql.cfg
index cebb85d8dfd..feaa79e43e9 100644
--- a/sql-bench/limits/mysql.cfg
+++ b/sql-bench/limits/mysql.cfg
@@ -177,7 +177,7 @@ compute=no # Compute
###> execute error: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 'compute sum(a) by a' at line 1
###
###As far as some queries didnt return OK, result is NO
-connections=99 # Simultaneous connections (installation default)
+connections=101 # Simultaneous connections (installation default)
constraint_check=syntax only # Column constraints
###< create table crash_q (a int check (a>0))
###> OK
@@ -345,7 +345,7 @@ date_format_inresult=iso # Date format in result
###> OK
###
###< select a from crash_me_d
- ###> 2003-03-26
+ ###> 2003-08-27
###< delete from crash_me_d
###> OK
date_infinity=error # Supports 'infinity dates
@@ -695,7 +695,7 @@ func_extra_elt=yes # Function ELT
func_extra_encrypt=yes # Function ENCRYPT
###
###<select encrypt('hello')
- ###>tJNum3fO44bOE
+ ###>tHrzZO8Aq1FG6
func_extra_expand2arg=no # Function EXPAND
###
###<select expand('abcd',6)
@@ -991,7 +991,7 @@ func_extra_subtime=no # Function SUBTIME
func_extra_sysdate=yes # Function SYSDATE
###
###<select sysdate()
- ###>2003-03-26 13:44:57
+ ###>2003-08-27 19:55:21
func_extra_tail=no # Function TAIL
###
###<select tail('ABCDEFG',3)
@@ -1056,7 +1056,7 @@ func_extra_uid=no # Function UID
func_extra_unix_timestamp=yes # Function UNIX_TIMESTAMP
###
###<select unix_timestamp()
- ###>1048679097
+ ###>1062003321
func_extra_userenv=no # Function USERENV
###
###<select userenv
@@ -1068,7 +1068,7 @@ func_extra_value=no # Function VALUE
func_extra_version=yes # Function VERSION
###
###<select version()
- ###>4.0.12-debug
+ ###>4.0.15-debug-log
func_extra_weekday=yes # Function WEEKDAY
###
###<select weekday('1997-11-29') from crash_me_d
@@ -1136,11 +1136,11 @@ func_odbc_cot=yes # Function COT
func_odbc_curdate=yes # Function CURDATE
###
###<select curdate()
- ###>2003-03-26
+ ###>2003-08-27
func_odbc_curtime=yes # Function CURTIME
###
###<select curtime()
- ###>13:44:57
+ ###>19:55:21
func_odbc_database=yes # Function DATABASE
###
###<select database()
@@ -1269,7 +1269,7 @@ func_odbc_monthname=yes # Function MONTHNAME
func_odbc_now=yes # Function NOW
###
###<select now()
- ###>2003-03-26 13:44:57
+ ###>2003-08-27 19:55:21
func_odbc_pi=yes # Function PI
###
###<select pi()
@@ -1416,15 +1416,15 @@ func_sql_concat_as_||=error # Function concatenation with ||
func_sql_current_date=yes # Function CURRENT_DATE
###
###<select current_date
- ###>2003-03-26
+ ###>2003-08-27
func_sql_current_time=yes # Function CURRENT_TIME
###
###<select current_time
- ###>13:44:57
+ ###>19:55:21
func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP
###
###<select current_timestamp
- ###>2003-03-26 13:44:57
+ ###>2003-08-27 19:55:21
func_sql_current_user=with_parenthesis # CURRENT_USER
###< select CURRENT_USER
###> execute error:Unknown column 'CURRENT_USER' in 'field list'
@@ -1438,11 +1438,11 @@ func_sql_extract_sql=yes # Function EXTRACT
func_sql_localtime=yes # Function LOCALTIME
###
###<select localtime
- ###>2003-03-26 13:44:57
+ ###>2003-08-27 19:55:21
func_sql_localtimestamp=yes # Function LOCALTIMESTAMP
###
###<select localtimestamp
- ###>2003-03-26 13:44:57
+ ###>2003-08-27 19:55:21
func_sql_lower=yes # Function LOWER
###
###<select LOWER('ABC')
@@ -1846,6 +1846,16 @@ left_outer_join_using=yes # left outer join using
###> OK
###
###As far as all queries returned OK, result is YES
+length_of_varchar_field=actual length # CHARACTER_LENGTH(varchar_field)
+ ###< CREATE TABLE crash_me1 (S1 VARCHAR(100))
+ ###> OK
+ ###< INSERT INTO crash_me1 VALUES ('X')
+ ###> OK
+ ###
+ ###< SELECT CHARACTER_LENGTH(S1) FROM crash_me1
+ ### > 1
+ ###< drop table crash_me1
+ ###> OK
like_with_column=yes # column LIKE column
###< create table crash_q (a char(10),b char(10))
###> OK
@@ -1880,7 +1890,7 @@ logical_value=1 # Value of logical operation (1=1)
###>1
max_big_expressions=10 # big expressions
###We are trying (example with N=5):
- ###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(16398)
+ ###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(14308)
### 50:FAIL 10:OK 30:FAIL 14:FAIL 11:FAIL
max_char_size=255 # max char() size
###We are trying (example with N=5):
@@ -1902,10 +1912,10 @@ max_conditions=85660 # OR and AND in WHERE
###We are trying (example with N=5):
###select a from crash_me where a=1 and b='a' or a=0 and b='0' or a=1 and b='1' or a=2 and b='2' or a=3 and b='3' or a=4 and b='4'
### 27592:OK 41389:OK 48287:FAIL 42769:OK 45528:FAIL 43321:FAIL 42880:FAIL 42791:OK 42835:FAIL 42800:OK 42817:OK 42826:OK 42830:OK 42832:FAIL 42831:FAIL
-max_expressions=1659 # simple expressions
+max_expressions=1450 # simple expressions
###We are trying (example with N=5):
###select 1+1+1+1+1+1
- ### 5000:FAIL 1000:OK 3000:FAIL 1400:OK 2200:FAIL 1560:OK 1880:FAIL 1624:OK 1752:FAIL 1650:OK 1701:FAIL 1660:FAIL 1652:OK 1656:OK 1658:OK 1659:OK
+ ### 5000:FAIL 1000:OK 3000:FAIL 1400:OK 2200:FAIL 1560:FAIL 1432:OK 1496:FAIL 1445:OK 1470:FAIL 1450:OK 1460:FAIL 1452:FAIL 1451:FAIL
max_index=32 # max index
### max_unique_index=32 ,so max_index must be same
max_index_length=500 # index length
@@ -1946,10 +1956,10 @@ max_row_length_with_null=65502 # table row length with nulls (without blobs)
max_select_alias_name=+512 # select alias name length
###We are trying (example with N=5):
###select b as aaaaa from crash_me
-max_stack_expression=1659 # stacked expressions
+max_stack_expression=1450 # stacked expressions
###We are trying (example with N=5):
###select 1+(1+(1+(1+(1+(1)))))
- ### 1000:OK 1500:OK 1750:FAIL 1550:OK 1650:OK 1700:FAIL 1660:FAIL 1652:OK 1656:OK 1658:OK 1659:OK
+ ### 1000:OK 1500:FAIL 1100:OK 1300:OK 1400:OK 1450:OK 1475:FAIL 1455:FAIL 1451:FAIL
max_table_alias_name=+512 # table alias name length
###We are trying (example with N=5):
###select aaaaa.b from crash_me aaaaa
@@ -2119,7 +2129,7 @@ odbc_left_outer_join=yes # left outer join odbc style
###> OK
###
###As far as all queries returned OK, result is YES
-operating_system=Linux 2.4.18-my-4GB i686 # crash-me tested on
+operating_system=Linux 2.4.20-64GB-SMP i686 # crash-me tested on
order_by=yes # Order by
###< select a from crash_me order by a
###> OK
@@ -3696,7 +3706,7 @@ reserved_word_ansi-92/99_section=no # Keyword SECTION
###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_select=yes # Keyword SELECT
###< create table crash_me10 (SELECT int not null)
- ###> execute error: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 'SELECT int not null)' at line 1
+ ###> execute error: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 'int not null)' at line 1
###< drop table crash_me10
###> execute error:Unknown table 'crash_me10'
###
@@ -6043,12 +6053,56 @@ select_without_from=yes # SELECT without FROM
###> OK
###
###As far as all queries returned OK, result is YES
-server_version=MySQL 4.0.12 debug/ # server version
+server_version=MySQL 4.0.15 debug log/ # server version
simple_joins=yes # ANSI SQL simple joins
###< select crash_me.a from crash_me, crash_me t0
###> OK
###
###As far as all queries returned OK, result is YES
+sorted_group_by=yes # Group by always sorted
+ ###< create table crash_me_t1 (a int not null, b int not null)
+ ###> OK
+ ###< insert into crash_me_t1 values (1,1)
+ ###> OK
+ ###< insert into crash_me_t1 values (1,2)
+ ###> OK
+ ###< insert into crash_me_t1 values (3,1)
+ ###> OK
+ ###< insert into crash_me_t1 values (3,2)
+ ###> OK
+ ###< insert into crash_me_t1 values (2,2)
+ ###> OK
+ ###< insert into crash_me_t1 values (2,1)
+ ###> OK
+ ###< create table crash_me_t2 (a int not null, b int not null)
+ ###> OK
+ ###< create index crash_me_t2_ind on crash_me_t2 (a)
+ ###> OK
+ ###< insert into crash_me_t2 values (1,3)
+ ###> OK
+ ###< insert into crash_me_t2 values (3,1)
+ ###> OK
+ ###< insert into crash_me_t2 values (2,2)
+ ###> OK
+ ###< insert into crash_me_t2 values (1,1)
+ ###> OK
+ ###
+ ###< select crash_me_t1.a,crash_me_t2.b from crash_me_t1,crash_me_t2 where crash_me_t1.a=crash_me_t2.a group by crash_me_t1.a,crash_me_t2.b
+ ### > 1,1
+ ### > 1,3
+ ### > 2,2
+ ### > 3,1
+ ###
+ ### Check recordset:
+ ### 1,1 expected: 1,1
+ ### 1,3 expected: 1,3
+ ### 2,2 expected: 2,2
+ ### 3,1 expected: 3,1
+ ### Recordset corresponds with template
+ ###< drop table crash_me_t1
+ ###> OK
+ ###< drop table crash_me_t2
+ ###> OK
storage_of_float=round # Storage of float values
###< create table crash_q (q1 float(4,1))
###> OK
@@ -6166,7 +6220,7 @@ time_format_inresult=iso # Time format in result
###> OK
###
###< select a from crash_me_t
- ###> 13:44:57
+ ###> 19:55:21
###< delete from crash_me_t
###> OK
transactions=yes # transactions
diff --git a/sql/field.cc b/sql/field.cc
index 051a4fa8057..efdf1762c0b 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -771,7 +771,7 @@ int Field_decimal::store(double nr)
char buff[320];
fyllchar = zerofill ? (char) '0' : (char) ' ';
-#ifdef HAVE_SNPRINTF_
+#ifdef HAVE_SNPRINTF
buff[sizeof(buff)-1]=0; // Safety
snprintf(buff,sizeof(buff)-1, "%.*f",(int) dec,nr);
length=(uint) strlen(buff);
@@ -2016,9 +2016,16 @@ double Field_longlong::val_real(void)
else
#endif
longlongget(j,ptr);
- return unsigned_flag ? ulonglong2double((ulonglong) j) : (double) j;
+ /* The following is open coded to avoid a bug in gcc 3.3 */
+ if (unsigned_flag)
+ {
+ ulonglong tmp= (ulonglong) j;
+ return ulonglong2double(tmp);
+ }
+ return (double) j;
}
+
longlong Field_longlong::val_int(void)
{
longlong j;
@@ -4413,8 +4420,11 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
Field_blob::store_length(length);
if (table->copy_blobs || length <= MAX_FIELD_WIDTH)
{ // Must make a copy
- value.copy(from,length,charset());
- from=value.ptr();
+ if (from != value.ptr()) // For valgrind
+ {
+ value.copy(from,length,charset());
+ from=value.ptr();
+ }
}
bmove(ptr+packlength,(char*) &from,sizeof(char*));
}
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index d870d0debfd..bcdb01da9ca 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -28,7 +28,6 @@ InnoDB */
#include "mysql_priv.h"
#include "slave.h"
-#include "sql_cache.h"
#ifdef HAVE_INNOBASE_DB
#include <m_ctype.h>
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index e8e4798c2b2..043cdafa275 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -1109,7 +1109,7 @@ THR_LOCK_DATA **ha_myisam::store_lock(THD *thd,
void ha_myisam::update_create_info(HA_CREATE_INFO *create_info)
{
- table->file->info(HA_STATUS_AUTO | HA_STATUS_CONST);
+ ha_myisam::info(HA_STATUS_AUTO | HA_STATUS_CONST);
if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
{
create_info->auto_increment_value=auto_increment_value;
diff --git a/sql/handler.cc b/sql/handler.cc
index b4d370491bb..a8e9f9cf50a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -359,7 +359,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
if (trans == &thd->transaction.all && mysql_bin_log.is_open() &&
my_b_tell(&thd->transaction.trans_log))
{
- mysql_bin_log.write(thd, &thd->transaction.trans_log);
+ mysql_bin_log.write(thd, &thd->transaction.trans_log, 1);
reinit_io_cache(&thd->transaction.trans_log,
WRITE_CACHE, (my_off_t) 0, 0, 1);
thd->transaction.trans_log.end_of_file= max_binlog_cache_size;
@@ -442,9 +442,21 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
}
#endif
if (trans == &thd->transaction.all)
+ {
+ /*
+ Update the binary log with a BEGIN/ROLLBACK block if we have cached some
+ queries and we updated some non-transactional table. Such cases should
+ be rare (updating a non-transactional table inside a transaction...).
+ */
+ if (unlikely((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) &&
+ mysql_bin_log.is_open() &&
+ my_b_tell(&thd->transaction.trans_log)))
+ mysql_bin_log.write(thd, &thd->transaction.trans_log, 0);
+ /* Flushed or not, empty the binlog cache */
reinit_io_cache(&thd->transaction.trans_log,
- WRITE_CACHE, (my_off_t) 0, 0, 1);
- thd->transaction.trans_log.end_of_file= max_binlog_cache_size;
+ WRITE_CACHE, (my_off_t) 0, 0, 1);
+ thd->transaction.trans_log.end_of_file= max_binlog_cache_size;
+ }
thd->variables.tx_isolation=thd->session_tx_isolation;
if (operation_done)
{
@@ -458,9 +470,27 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
/*
-Rolls the current transaction back to a savepoint.
-Return value: 0 if success, 1 if there was not a savepoint of the given
-name.
+ Rolls the current transaction back to a savepoint.
+ Return value: 0 if success, 1 if there was not a savepoint of the given
+ name.
+ NOTE: how do we handle this (unlikely but legal) case:
+ [transaction] + [update to non-trans table] + [rollback to savepoint] ?
+ The problem occurs when a savepoint is before the update to the
+ non-transactional table. Then when there's a rollback to the savepoint, if we
+ simply truncate the binlog cache, we lose the part of the binlog cache where
+ the update is. If we want to not lose it, we need to write the SAVEPOINT
+ command and the ROLLBACK TO SAVEPOINT command to the binlog cache. The latter
+ is easy: it's just write at the end of the binlog cache, but the former should
+ be *inserted* to the place where the user called SAVEPOINT. The solution is
+ that when the user calls SAVEPOINT, we write it to the binlog cache (so no
+ need to later insert it). As transactions are never intermixed in the binary log
+ (i.e. they are serialized), we won't have conflicts with savepoint names when
+ using mysqlbinlog or in the slave SQL thread.
+ Then when ROLLBACK TO SAVEPOINT is called, if we updated some
+ non-transactional table, we don't truncate the binlog cache but instead write
+ ROLLBACK TO SAVEPOINT to it; otherwise we truncate the binlog cache (which
+ will chop the SAVEPOINT command from the binlog cache, which is good as in
+ that case there is no need to have it in the binlog).
*/
int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
@@ -485,8 +515,24 @@ int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
error=1;
}
else
- reinit_io_cache(&thd->transaction.trans_log, WRITE_CACHE,
- binlog_cache_pos, 0, 0);
+ {
+ /*
+ Write ROLLBACK TO SAVEPOINT to the binlog cache if we have updated some
+ non-transactional table. Otherwise, truncate the binlog cache starting
+ from the SAVEPOINT command.
+ */
+ if (unlikely((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) &&
+ mysql_bin_log.is_open() &&
+ my_b_tell(&thd->transaction.trans_log)))
+ {
+ Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
+ if (mysql_bin_log.write(&qinfo))
+ error= 1;
+ }
+ else
+ reinit_io_cache(&thd->transaction.trans_log, WRITE_CACHE,
+ binlog_cache_pos, 0, 0);
+ }
operation_done=1;
#endif
if (operation_done)
@@ -515,6 +561,13 @@ int ha_savepoint(THD *thd, char *savepoint_name)
#ifdef HAVE_INNOBASE_DB
innobase_savepoint(thd,savepoint_name, binlog_cache_pos);
#endif
+ /* Write it to the binary log (see comments of ha_rollback_to_savepoint). */
+ if (mysql_bin_log.is_open())
+ {
+ Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
+ if (mysql_bin_log.write(&qinfo))
+ error= 1;
+ }
}
#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
@@ -1051,14 +1104,25 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
void ha_key_cache(void)
{
- if (keybuff_size)
- (void) init_key_cache((ulong) keybuff_size);
+ /*
+ The following mutex is not really needed as long as keybuff_size is
+ treated as a long value, but we use the mutex here to guard for future
+ changes.
+ */
+ pthread_mutex_lock(&LOCK_global_system_variables);
+ long tmp= (long) keybuff_size;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
+ if (tmp)
+ (void) init_key_cache(tmp);
}
void ha_resize_key_cache(void)
{
- (void) resize_key_cache((ulong) keybuff_size);
+ pthread_mutex_lock(&LOCK_global_system_variables);
+ long tmp= (long) keybuff_size;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
+ (void) resize_key_cache(tmp);
}
diff --git a/sql/item.cc b/sql/item.cc
index 0ea2231ca4b..371ce0a947d 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -903,6 +903,13 @@ void Item::make_field(Send_field *tmp_field)
init_make_field(tmp_field, field_type());
}
+
+void Item_empty_string::make_field(Send_field *tmp_field)
+{
+ init_make_field(tmp_field,FIELD_TYPE_VAR_STRING);
+}
+
+
enum_field_types Item::field_type() const
{
return ((result_type() == STRING_RESULT) ? FIELD_TYPE_VAR_STRING :
diff --git a/sql/item.h b/sql/item.h
index 07be964092a..12f047bbebc 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -505,6 +505,7 @@ public:
Item_empty_string(const char *header,uint length) :Item_string("",0,
&my_charset_bin)
{ name=(char*) header; max_length=length;}
+ void make_field(Send_field *field);
};
class Item_return_int :public Item_int
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 3471ddd30e9..09b92d7df40 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -545,6 +545,7 @@ void Item_func_interval::fix_length_and_dec()
used_tables_cache|= row->used_tables();
not_null_tables_cache&= row->not_null_tables();
with_sum_func= with_sum_func || row->with_sum_func;
+ const_item_cache&= row->const_item();
}
@@ -1458,17 +1459,20 @@ void Item_func_in::fix_length_and_dec()
DBUG_ASSERT(0);
return;
}
- uint j=0;
- for (uint i=1 ; i < arg_count ; i++)
+ if (array && !(current_thd->fatal_error)) // If not EOM
{
- array->set(j,args[i]);
- if (!args[i]->null_value) // Skip NULL values
- j++;
- else
- have_null= 1;
+ uint j=0;
+ for (uint i=1 ; i < arg_count ; i++)
+ {
+ array->set(j,args[i]);
+ if (!args[i]->null_value) // Skip NULL values
+ j++;
+ else
+ have_null= 1;
+ }
+ if ((array->used_count=j))
+ array->sort();
}
- if ((array->used_count=j))
- array->sort();
}
else
{
@@ -1567,7 +1571,7 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
and_tables_cache= ~(table_map) 0;
if (thd && check_stack_overrun(thd,buff))
- return 0; // Fatal error flag is set!
+ return 1; // Fatal error flag is set!
while ((item=li++))
{
table_map tmp_table_map;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 4bda8ae78cd..bfb62febce4 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -173,13 +173,15 @@ bool
Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
Item **arg,**arg_end;
+#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
char buff[STACK_BUFF_ALLOC]; // Max argument in function
+#endif
used_tables_cache= not_null_tables_cache= 0;
const_item_cache=1;
if (thd && check_stack_overrun(thd,buff))
- return 0; // Fatal error if flag is set!
+ return 1; // Fatal error if flag is set!
if (arg_count)
{ // Print purify happy
for (arg=args, arg_end=args+arg_count; arg != arg_end ; arg++)
@@ -1431,13 +1433,15 @@ bool
udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func,
uint arg_count, Item **arguments)
{
+#ifndef EMBEDDED_LIBRARY // Avoid compiler warning
char buff[STACK_BUFF_ALLOC]; // Max argument in function
+#endif
DBUG_ENTER("Item_udf_func::fix_fields");
if (thd)
{
if (check_stack_overrun(thd,buff))
- return 0; // Fatal error flag is set!
+ DBUG_RETURN(1); // Fatal error flag is set!
}
else
thd=current_thd; // In WHERE / const clause
diff --git a/sql/item_func.h b/sql/item_func.h
index 7fedbcf48ee..2b114f5c87d 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -538,6 +538,7 @@ public:
String *val_str(String *);
void fix_length_and_dec();
enum Item_result result_type () const { return cmp_type; }
+ table_map not_null_tables() const { return 0; }
};
class Item_func_min :public Item_func_min_max
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index c429346a2e6..de6282b1324 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -70,6 +70,8 @@ void Item_sum::make_field(Send_field *tmp_field)
tmp_field->db_name=(char*)"";
tmp_field->org_table_name=tmp_field->table_name=(char*)"";
tmp_field->org_col_name=tmp_field->col_name=name;
+ if (maybe_null)
+ tmp_field->flags&= ~NOT_NULL_FLAG;
}
else
init_make_field(tmp_field, field_type());
@@ -197,7 +199,8 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
max_length=item->max_length;
}
decimals=item->decimals;
- maybe_null=item->maybe_null;
+ /* MIN/MAX can return NULL for empty set indepedent of the used column */
+ maybe_null= 1;
unsigned_flag=item->unsigned_flag;
collation.set(item->collation);
result_field=0;
@@ -388,15 +391,15 @@ void Item_sum_variance::reset_field()
}
}
-void Item_sum_variance::update_field(int offset)
+void Item_sum_variance::update_field()
{
double nr,old_nr,old_sqr;
longlong field_count;
char *res=result_field->ptr;
- float8get(old_nr,res+offset);
- float8get(old_sqr,res+offset+sizeof(double));
- field_count=sint8korr(res+offset+sizeof(double)*2);
+ float8get(old_nr, res);
+ float8get(old_sqr, res+sizeof(double));
+ field_count=sint8korr(res+sizeof(double)*2);
nr=args[0]->val();
if (!args[0]->null_value)
@@ -753,12 +756,12 @@ void Item_sum_bit::reset_field()
** calc next value and merge it with field_value
*/
-void Item_sum_sum::update_field(int offset)
+void Item_sum_sum::update_field()
{
double old_nr,nr;
char *res=result_field->ptr;
- float8get(old_nr,res+offset);
+ float8get(old_nr,res);
nr=args[0]->val();
if (!args[0]->null_value)
{
@@ -769,12 +772,12 @@ void Item_sum_sum::update_field(int offset)
}
-void Item_sum_count::update_field(int offset)
+void Item_sum_count::update_field()
{
longlong nr;
char *res=result_field->ptr;
- nr=sint8korr(res+offset);
+ nr=sint8korr(res);
if (!args[0]->maybe_null)
nr++;
else
@@ -787,14 +790,14 @@ void Item_sum_count::update_field(int offset)
}
-void Item_sum_avg::update_field(int offset)
+void Item_sum_avg::update_field()
{
double nr,old_nr;
longlong field_count;
char *res=result_field->ptr;
- float8get(old_nr,res+offset);
- field_count=sint8korr(res+offset+sizeof(double));
+ float8get(old_nr,res);
+ field_count=sint8korr(res+sizeof(double));
nr=args[0]->val();
if (!args[0]->null_value)
@@ -807,77 +810,65 @@ void Item_sum_avg::update_field(int offset)
int8store(res,field_count);
}
-void Item_sum_hybrid::update_field(int offset)
+void Item_sum_hybrid::update_field()
{
if (hybrid_type == STRING_RESULT)
- min_max_update_str_field(offset);
+ min_max_update_str_field();
else if (hybrid_type == INT_RESULT)
- min_max_update_int_field(offset);
+ min_max_update_int_field();
else
- min_max_update_real_field(offset);
+ min_max_update_real_field();
}
void
-Item_sum_hybrid::min_max_update_str_field(int offset)
+Item_sum_hybrid::min_max_update_str_field()
{
String *res_str=args[0]->val_str(&value);
- if (args[0]->null_value)
- result_field->copy_from_tmp(offset); // Use old value
- else
+ if (!args[0]->null_value)
{
res_str->strip_sp();
- result_field->ptr+=offset; // Get old max/min
result_field->val_str(&tmp_value,&tmp_value);
- result_field->ptr-=offset;
if (result_field->is_null() ||
(cmp_sign * sortcmp(res_str,&tmp_value,cmp_charset)) < 0)
result_field->store(res_str->ptr(),res_str->length(),res_str->charset());
- else
- { // Use old value
- char *res=result_field->ptr;
- memcpy(res,res+offset,result_field->pack_length());
- }
result_field->set_notnull();
}
}
void
-Item_sum_hybrid::min_max_update_real_field(int offset)
+Item_sum_hybrid::min_max_update_real_field()
{
double nr,old_nr;
- result_field->ptr+=offset;
old_nr=result_field->val_real();
nr=args[0]->val();
if (!args[0]->null_value)
{
- if (result_field->is_null(offset) ||
+ if (result_field->is_null(0) ||
(cmp_sign > 0 ? old_nr > nr : old_nr < nr))
old_nr=nr;
result_field->set_notnull();
}
- else if (result_field->is_null(offset))
+ else if (result_field->is_null(0))
result_field->set_null();
- result_field->ptr-=offset;
result_field->store(old_nr);
}
void
-Item_sum_hybrid::min_max_update_int_field(int offset)
+Item_sum_hybrid::min_max_update_int_field()
{
longlong nr,old_nr;
- result_field->ptr+=offset;
old_nr=result_field->val_int();
nr=args[0]->val_int();
if (!args[0]->null_value)
{
- if (result_field->is_null(offset))
+ if (result_field->is_null(0))
old_nr=nr;
else
{
@@ -890,30 +881,29 @@ Item_sum_hybrid::min_max_update_int_field(int offset)
}
result_field->set_notnull();
}
- else if (result_field->is_null(offset))
+ else if (result_field->is_null(0))
result_field->set_null();
- result_field->ptr-=offset;
result_field->store(old_nr);
}
-void Item_sum_or::update_field(int offset)
+void Item_sum_or::update_field()
{
ulonglong nr;
char *res=result_field->ptr;
- nr=uint8korr(res+offset);
+ nr=uint8korr(res);
nr|= (ulonglong) args[0]->val_int();
int8store(res,nr);
}
-void Item_sum_and::update_field(int offset)
+void Item_sum_and::update_field()
{
ulonglong nr;
char *res=result_field->ptr;
- nr=uint8korr(res+offset);
+ nr=uint8korr(res);
nr&= (ulonglong) args[0]->val_int();
int8store(res,nr);
}
@@ -1931,6 +1921,3 @@ String* Item_func_group_concat::val_str(String* str)
}
return &result;
}
-
-
-
diff --git a/sql/item_sum.h b/sql/item_sum.h
index e9f9890f41d..6cc8d768be5 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -66,7 +66,7 @@ public:
virtual void clear()= 0;
virtual bool add()=0;
virtual void reset_field()=0;
- virtual void update_field(int offset)=0;
+ virtual void update_field()=0;
virtual bool keep_field_type(void) const { return 0; }
virtual void fix_length_and_dec() { maybe_null=1; null_value=1; }
virtual const char *func_name() const { return "?"; }
@@ -129,7 +129,7 @@ class Item_sum_sum :public Item_sum_num
bool add();
double val();
void reset_field();
- void update_field(int offset);
+ void update_field();
void no_rows_in_result() {}
const char *func_name() const { return "sum"; }
Item *copy_or_same(THD* thd);
@@ -158,7 +158,7 @@ class Item_sum_count :public Item_sum_int
void make_const(longlong count_arg) { count=count_arg; used_table_cache=0; }
longlong val_int();
void reset_field();
- void update_field(int offset);
+ void update_field();
const char *func_name() const { return "count"; }
Item *copy_or_same(THD* thd);
};
@@ -230,7 +230,7 @@ class Item_sum_count_distinct :public Item_sum_int
bool add();
longlong val_int();
void reset_field() { return ;} // Never called
- void update_field(int offset) { return ; } // Never called
+ void update_field() { return ; } // Never called
const char *func_name() const { return "count_distinct"; }
bool setup(THD *thd);
void make_unique();
@@ -274,7 +274,7 @@ class Item_sum_avg :public Item_sum_num
bool add();
double val();
void reset_field();
- void update_field(int offset);
+ void update_field();
Item *result_item(Field *field)
{ return new Item_avg_field(this); }
const char *func_name() const { return "avg"; }
@@ -327,7 +327,7 @@ class Item_sum_variance : public Item_sum_num
bool add();
double val();
void reset_field();
- void update_field(int offset);
+ void update_field();
Item *result_item(Field *field)
{ return new Item_variance_field(this); }
const char *func_name() const { return "variance"; }
@@ -407,10 +407,10 @@ class Item_sum_hybrid :public Item_sum
bool keep_field_type(void) const { return 1; }
enum Item_result result_type () const { return hybrid_type; }
enum enum_field_types field_type() const { return hybrid_field_type; }
- void update_field(int offset);
- void min_max_update_str_field(int offset);
- void min_max_update_real_field(int offset);
- void min_max_update_int_field(int offset);
+ void update_field();
+ void min_max_update_str_field();
+ void min_max_update_real_field();
+ void min_max_update_int_field();
};
@@ -465,7 +465,7 @@ class Item_sum_or :public Item_sum_bit
Item_sum_or(Item *item_par) :Item_sum_bit(item_par,LL(0)) {}
Item_sum_or(THD *thd, Item_sum_or &item) :Item_sum_bit(thd, item) {}
bool add();
- void update_field(int offset);
+ void update_field();
const char *func_name() const { return "bit_or"; }
Item *copy_or_same(THD* thd);
};
@@ -477,7 +477,7 @@ class Item_sum_and :public Item_sum_bit
Item_sum_and(Item *item_par) :Item_sum_bit(item_par, ~(ulonglong) LL(0)) {}
Item_sum_and(THD *thd, Item_sum_and &item) :Item_sum_bit(thd, item) {}
bool add();
- void update_field(int offset);
+ void update_field();
const char *func_name() const { return "bit_and"; }
Item *copy_or_same(THD* thd);
};
@@ -512,7 +512,7 @@ public:
void clear();
bool add();
void reset_field() {};
- void update_field(int offset_arg) {};
+ void update_field() {};
};
@@ -593,7 +593,7 @@ class Item_sum_udf_float :public Item_sum_num
double val() { return 0.0; }
void clear() {}
bool add() { return 0; }
- void update_field(int offset) {}
+ void update_field() {}
};
@@ -610,7 +610,7 @@ public:
double val() { return 0; }
void clear() {}
bool add() { return 0; }
- void update_field(int offset) {}
+ void update_field() {}
};
@@ -630,7 +630,7 @@ public:
enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
void clear() {}
bool add() { return 0; }
- void update_field(int offset) {}
+ void update_field() {}
};
#endif /* HAVE_DLOPEN */
@@ -720,7 +720,7 @@ class Item_func_group_concat : public Item_sum
bool fix_fields(THD *, TABLE_LIST *, Item **);
bool setup(THD *thd);
void make_unique();
- virtual void update_field(int offset) {};
+ virtual void update_field() {}
double val()
{
String *res; res=val_str(&str_value);
diff --git a/sql/item_uniq.h b/sql/item_uniq.h
index e41397dac44..9b370b70181 100644
--- a/sql/item_uniq.h
+++ b/sql/item_uniq.h
@@ -44,7 +44,7 @@ public:
void clear() {}
bool add() { return 0; }
void reset_field() {}
- void update_field(int offset) {}
+ void update_field() {}
bool fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref)
{
fixed= 1;
diff --git a/sql/log.cc b/sql/log.cc
index d3ba5b63e19..f279d6d679c 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -270,7 +270,8 @@ bool MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
an extension for the binary log files.
In this case we write a standard header to it.
*/
- if (my_b_write(&log_file, (byte*) BINLOG_MAGIC, BIN_LOG_HEADER_SIZE))
+ if (my_b_safe_write(&log_file, (byte*) BINLOG_MAGIC,
+ BIN_LOG_HEADER_SIZE))
goto err;
bytes_written += BIN_LOG_HEADER_SIZE;
write_file_name_to_index_file=1;
@@ -1175,14 +1176,24 @@ bool MYSQL_LOG::write(Log_event* event_info)
*/
if (is_open())
{
- const char *local_db = event_info->get_db();
+ const char *local_db= event_info->get_db();
+ IO_CACHE *file= &log_file;
#ifdef USING_TRANSACTIONS
- IO_CACHE *file = ((event_info->get_cache_stmt()) ?
- &thd->transaction.trans_log :
- &log_file);
-#else
- IO_CACHE *file = &log_file;
-#endif
+ /*
+ Should we write to the binlog cache or to the binlog on disk?
+ Write to the binlog cache if:
+ - it is already not empty (meaning we're in a transaction; note that the
+ present event could be about a non-transactional table, but still we need
+ to write to the binlog cache in that case to handle updates to mixed
+ trans/non-trans table types the best possible in binlogging)
+ - or if the event asks for it (cache_stmt == true).
+ */
+ if (opt_using_transactions &&
+ (event_info->get_cache_stmt() ||
+ (thd && my_b_tell(&thd->transaction.trans_log))))
+ file= &thd->transaction.trans_log;
+#endif
+ DBUG_PRINT("info",("event type=%d",event_info->get_type_code()));
#ifdef HAVE_REPLICATION
/*
In the future we need to add to the following if tests like
@@ -1401,6 +1412,13 @@ uint MYSQL_LOG::next_file_id()
/*
Write a cached log entry to the binary log
+ SYNOPSIS
+ write()
+ thd
+ cache The cache to copy to the binlog
+ commit_or_rollback If true, will write "COMMIT" in the end, if false will
+ write "ROLLBACK".
+
NOTE
- We only come here if there is something in the cache.
- The thing in the cache is always a complete transaction
@@ -1408,10 +1426,13 @@ uint MYSQL_LOG::next_file_id()
IMPLEMENTATION
- To support transaction over replication, we wrap the transaction
- with BEGIN/COMMIT in the binary log.
+ with BEGIN/COMMIT or BEGIN/ROLLBACK in the binary log.
+ We want to write a BEGIN/ROLLBACK block when a non-transactional table was
+ updated in a transaction which was rolled back. This is to ensure that the
+ same updates are run on the slave.
*/
-bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache)
+bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback)
{
VOID(pthread_mutex_lock(&LOCK_log));
DBUG_ENTER("MYSQL_LOG::write(cache");
@@ -1465,7 +1486,10 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache)
*/
{
- Query_log_event qinfo(thd, "COMMIT", 6, TRUE);
+ Query_log_event qinfo(thd,
+ commit_or_rollback ? "COMMIT" : "ROLLBACK",
+ commit_or_rollback ? 6 : 8,
+ TRUE);
qinfo.set_log_pos(this);
if (qinfo.write(&log_file) || flush_io_cache(&log_file))
goto err;
@@ -1642,6 +1666,9 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
SYNOPSIS
wait_for_update()
thd Thread variable
+ master_or_slave If 0, the caller is the Binlog_dump thread from master;
+ if 1, the caller is the SQL thread from the slave. This
+ influences only thd->proc_info.
NOTES
One must have a lock on LOCK_log before calling this function.
@@ -1653,11 +1680,15 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
If you don't do it this way, you will get a deadlock in THD::awake()
*/
-void MYSQL_LOG:: wait_for_update(THD* thd)
+void MYSQL_LOG:: wait_for_update(THD* thd, bool master_or_slave)
{
safe_mutex_assert_owner(&LOCK_log);
const char* old_msg = thd->enter_cond(&update_cond, &LOCK_log,
- "Slave: waiting for binlog update");
+ master_or_slave ?
+ "Has read all relay log; waiting for \
+the I/O slave thread to update it" :
+ "Has sent all binlog to slave; \
+waiting for binlog to be updated");
pthread_cond_wait(&update_cond, &LOCK_log);
pthread_mutex_unlock(&LOCK_log); // See NOTES
thd->exit_cond(old_msg);
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 8a52ad9ebca..48c2000d11b 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -27,25 +27,6 @@
#define log_cs &my_charset_latin1
/*
- my_b_safe_write()
-*/
-
-inline int my_b_safe_write(IO_CACHE* file, const byte *buf,
- int len)
-{
- /*
- Sasha: We are not writing this with the ? operator to avoid hitting
- a possible compiler bug. At least gcc 2.95 cannot deal with
- several layers of ternary operators that evaluated comma(,) operator
- expressions inside - I do have a test case if somebody wants it
- */
- if (file->type == SEQ_READ_APPEND)
- return my_b_append(file, buf,len);
- return my_b_write(file, buf,len);
-}
-
-
-/*
pretty_print_str()
*/
@@ -239,12 +220,11 @@ const char* Log_event::get_type_str()
#ifndef MYSQL_CLIENT
Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans)
- :temp_buf(0), exec_time(0), cached_event_len(0), flags(flags_arg),
- thd(thd_arg)
+ :log_pos(0), temp_buf(0), exec_time(0), cached_event_len(0),
+ flags(flags_arg), thd(thd_arg)
{
server_id= thd->server_id;
when= thd->start_time;
- log_pos= thd->log_pos;
cache_stmt= (using_trans &&
(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)));
}
@@ -331,7 +311,6 @@ int Log_event::exec_event(struct st_relay_log_info* rli)
handler and MyISAM and STOP SLAVE is issued in the middle of the
"transaction". START SLAVE will resume at BEGIN while the MyISAM table
has already been updated.
-
*/
if ((thd->options & OPTION_BEGIN) && opt_using_transactions)
rli->inc_event_relay_log_pos(get_event_len());
@@ -605,6 +584,8 @@ Log_event* Log_event::read_log_event(const char* buf, int event_len,
ev = new Query_log_event(buf, event_len, old_format);
break;
case LOAD_EVENT:
+ ev = new Create_file_log_event(buf, event_len, old_format);
+ break;
case NEW_LOAD_EVENT:
ev = new Load_log_event(buf, event_len, old_format);
break;
@@ -932,6 +913,18 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli)
mysql_parse(thd, thd->query, q_len);
/*
+ Set a flag if we are inside an transaction so that we can restart
+ the transaction from the start if we are killed
+
+ This will only be done if we are supporting transactional tables
+ in the slave.
+ */
+ if (!strcmp(thd->query,"BEGIN"))
+ rli->inside_transaction= opt_using_transactions;
+ else if (!(strcmp(thd->query,"COMMIT") && strcmp(thd->query,"ROLLBACK")))
+ rli->inside_transaction=0;
+
+ /*
If we expected a non-zero error code, and we don't get the same error
code, and none of them should be ignored.
*/
@@ -988,14 +981,14 @@ Default database: '%s'",
*/
} /* End of if (db_ok(... */
-end:
-
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->db= 0; // prevent db from being freed
thd->query= 0; // just to be sure
VOID(pthread_mutex_unlock(&LOCK_thread_count));
// assume no convert for next query unless set explictly
- //thd->variables.convert_set = 0;
+#ifdef TO_BE_REMOVED
+ thd->variables.convert_set = 0;
+#endif
close_thread_tables(thd);
free_root(&thd->mem_root,0);
return (thd->query_error ? thd->query_error : Log_event::exec_event(rli));
@@ -1091,15 +1084,6 @@ int Start_log_event::write_data(IO_CACHE* file)
the use of a bit of memory for a user lock which will not be used
anymore. If the user lock is later used, the old one will be released. In
other words, no deadlock problem.
- - If we have an active transaction at this point, the master died
- in the middle while writing the transaction to the binary log.
- In this case we should stop the slave.
- Guilhem 2003-06: I don't think we should. As the binlog is written before
- the table changes are committed, rollback has occured on the master; we
- should rather rollback on the slave and go on. If we don't rollback, and
- the next query is not BEGIN, then it will be considered as part of the
- unfinished transaction, and so will be rolled back at next BEGIN, which
- is a bug.
*/
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
@@ -1471,6 +1455,13 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len,
#ifdef MYSQL_CLIENT
void Load_log_event::print(FILE* file, bool short_form, char* last_db)
{
+ print(file, short_form, last_db, 0);
+}
+
+
+void Load_log_event::print(FILE* file, bool short_form, char* last_db,
+ bool commented)
+{
if (!short_form)
{
print_header(file);
@@ -1486,9 +1477,12 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
}
if (db && db[0] && !same_db)
- fprintf(file, "use %s;\n", db);
+ fprintf(file, "%suse %s;\n",
+ commented ? "# " : "",
+ db);
- fprintf(file, "LOAD DATA ");
+ fprintf(file, "%sLOAD DATA ",
+ commented ? "# " : "");
if (check_fname_outside_temp_buf())
fprintf(file, "LOCAL ");
fprintf(file, "INFILE '%-*s' ", fname_len, fname);
@@ -1535,8 +1529,8 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
pretty_print_str(file, sql_ex.line_start, sql_ex.line_start_len);
}
- if ((int)skip_lines > 0)
- fprintf(file, " IGNORE %ld LINES ", (long) skip_lines);
+ if ((long) skip_lines > 0)
+ fprintf(file, " IGNORE %ld LINES", (long) skip_lines);
if (num_fields)
{
@@ -1613,6 +1607,18 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
thd->query = 0; // Should not be needed
thd->query_error = 0;
+ /*
+ We test replicate_*_db rules. Note that we have already prepared the file
+ to load, even if we are going to ignore and delete it now. So it is
+ possible that we did a lot of disk writes for nothing. In other words, a
+ big LOAD DATA INFILE on the master will still consume a lot of space on
+ the slave (space in the relay log + space of temp files: twice the space
+ of the file to load...) even if it will finally be ignored.
+ TODO: fix this; this can be done by testing rules in
+ Create_file_log_event::exec_event() and then discarding Append_block and
+ al. Another way is do the filtering in the I/O thread (more efficient: no
+ disk writes at all).
+ */
if (db_ok(thd->db, replicate_do_db, replicate_ignore_db))
{
thd->set_time((time_t)when);
@@ -1642,20 +1648,22 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
else if (sql_ex.opt_flags & IGNORE_FLAG)
handle_dup= DUP_IGNORE;
else
+ {
/*
- Note that when replication is running fine, if it was DUP_ERROR on the
+ When replication is running fine, if it was DUP_ERROR on the
master then we could choose DUP_IGNORE here, because if DUP_ERROR
suceeded on master, and data is identical on the master and slave,
then there should be no uniqueness errors on slave, so DUP_IGNORE is
the same as DUP_ERROR. But in the unlikely case of uniqueness errors
- (because the data on the master and slave happen to be different (user
- error or bug), we want LOAD DATA to print an error message on the
- slave to discover the problem.
+ (because the data on the master and slave happen to be different
+ (user error or bug), we want LOAD DATA to print an error message on
+ the slave to discover the problem.
If reading from net (a 3.23 master), mysql_load() will change this
to DUP_IGNORE.
*/
handle_dup= DUP_ERROR;
+ }
sql_exchange ex((char*)fname, sql_ex.opt_flags & DUMPFILE_FLAG);
String field_term(sql_ex.field_term,sql_ex.field_term_len,log_cs);
@@ -1731,7 +1739,7 @@ Slave: load data infile on table '%s' at log position %s in log \
err=ER(sql_errno);
}
slave_print_error(rli,sql_errno,"\
-Error '%s' running lOAD DATA INFILE on table '%s'. Default database: '%s'",
+Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
err, (char*)table_name, print_slave_db_safe(db));
free_root(&thd->mem_root,0);
return 1;
@@ -1762,14 +1770,13 @@ Fatal error running LOAD DATA INFILE on table '%s'. Default database: '%s'",
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
void Rotate_log_event::pack_info(Protocol *protocol)
{
- char *buf, *b_pos;
- if (!(buf= my_malloc(ident_len + 45, MYF(MY_WME))))
- return;
- memcpy(buf, new_log_ident, ident_len);
- b_pos= strmov(buf + ident_len, ";pos=");
- b_pos= longlong10_to_str(pos, b_pos, 10);
- protocol->store(buf, (uint) (b_pos-buf), &my_charset_bin);
- my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
+ char buf1[256], buf[22];
+ String tmp(buf1, sizeof(buf1));
+ tmp.length(0);
+ tmp.append(new_log_ident, ident_len);
+ tmp.append(";pos=");
+ tmp.append(llstr(pos,buf));
+ protocol->store(tmp.ptr(), tmp.length(), &my_charset_bin);
}
#endif
@@ -1858,6 +1865,25 @@ int Rotate_log_event::write_data(IO_CACHE* file)
We can't rotate the slave as this will cause infinitive rotations
in a A -> B -> A setup.
+ NOTES
+ As a transaction NEVER spans on 2 or more binlogs:
+ if we have an active transaction at this point, the master died while
+ writing the transaction to the binary log, i.e. while flushing the binlog
+ cache to the binlog. As the write was started, the transaction had been
+ committed on the master, so we lack of information to replay this
+ transaction on the slave; all we can do is stop with error.
+ If we didn't detect it, then positions would start to become garbage (as we
+ are incrementing rli->relay_log_pos whereas we are in a transaction: the
+ new rli->relay_log_pos will be
+ relay_log_pos of the BEGIN + size of the Rotate event = garbage.
+
+ Since MySQL 4.0.14, the master ALWAYS sends a Rotate event when it starts
+ sending the next binlog, so we are sure to receive a Rotate event just
+ after the end of the "dead master"'s binlog; so this exec_event() is the
+ right place to catch the problem. If we would wait until
+ Start_log_event::exec_event() it would be too late, rli->relay_log_pos
+ would already be garbage.
+
RETURN VALUES
0 ok
*/
@@ -1869,6 +1895,18 @@ int Rotate_log_event::exec_event(struct st_relay_log_info* rli)
DBUG_ENTER("Rotate_log_event::exec_event");
pthread_mutex_lock(&rli->data_lock);
+
+ if (rli->inside_transaction)
+ {
+ slave_print_error(rli, 0,
+ "there is an unfinished transaction in the relay log \
+(could find neither COMMIT nor ROLLBACK in the relay log); it could be that \
+the master died while writing the transaction to its binary log. Now the slave \
+is rolling back the transaction.");
+ pthread_mutex_unlock(&rli->data_lock);
+ DBUG_RETURN(1);
+ }
+
memcpy(log_name, new_log_ident, ident_len+1);
rli->group_master_log_pos = pos;
rli->event_relay_log_pos += get_event_len();
@@ -1894,8 +1932,8 @@ int Rotate_log_event::exec_event(struct st_relay_log_info* rli)
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
void Intvar_log_event::pack_info(Protocol *protocol)
{
- char buf[64], *pos;
- pos= strmov(buf, get_var_type_name());
+ char buf[256], *pos;
+ pos= strmake(buf, get_var_type_name(), sizeof(buf)-23);
*pos++= '=';
pos= longlong10_to_str(val, pos, -10);
protocol->store(buf, (uint) (pos-buf), &my_charset_bin);
@@ -2462,8 +2500,8 @@ void Stop_log_event::print(FILE* file, bool short_form, char* last_db)
Stop_log_event::exec_event()
The master stopped.
- We used to clean up all temporary tables but this is useless as, as the master
- has shut down properly, it has written all DROP TEMPORARY TABLE and DO
+ We used to clean up all temporary tables but this is useless as, as the
+ master has shut down properly, it has written all DROP TEMPORARY TABLE and DO
RELEASE_LOCK (prepared statements' deletion is TODO).
We used to clean up slave_load_tmpdir, but this is useless as it has been
cleared at the end of LOAD DATA INFILE.
@@ -2605,10 +2643,12 @@ void Create_file_log_event::print(FILE* file, bool short_form,
if (enable_local)
{
- if (!check_fname_outside_temp_buf())
- fprintf(file, "#");
- Load_log_event::print(file, 1, last_db);
- fprintf(file, "#");
+ Load_log_event::print(file, 1, last_db, !check_fname_outside_temp_buf());
+ /*
+ That one is for "file_id: etc" below: in mysqlbinlog we want the #, in
+ SHOW BINLOG EVENTS we don't.
+ */
+ fprintf(file, "#");
}
fprintf(file, " file_id: %d block_len: %d\n", file_id, block_len);
@@ -2641,7 +2681,7 @@ void Create_file_log_event::pack_info(Protocol *protocol)
pos= int10_to_str((long) block_len, pos, 10);
protocol->store(buf, (uint) (pos-buf), &my_charset_bin);
}
-#endif
+#endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
/*
@@ -2665,7 +2705,7 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP)))
{
- slave_print_error(rli,my_errno, "Could not open file '%s'", fname_buf);
+ slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf);
goto err;
}
@@ -2676,7 +2716,9 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
if (write_base(&file))
{
strmov(p, ".info"); // to have it right in the error message
- slave_print_error(rli,my_errno, "Could not write to file '%s'", fname_buf);
+ slave_print_error(rli,my_errno,
+ "Error in Create_file event: could not write to file '%s'",
+ fname_buf);
goto err;
}
end_io_cache(&file);
@@ -2686,16 +2728,14 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC,
MYF(MY_WME))) < 0)
{
- slave_print_error(rli,my_errno, "Could not open file '%s'", fname_buf);
+ slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf);
goto err;
}
if (my_write(fd, (byte*) block, block_len, MYF(MY_WME+MY_NABP)))
{
- slave_print_error(rli,my_errno, "Write to '%s' failed", fname_buf);
+ slave_print_error(rli,my_errno, "Error in Create_file event: write to '%s' failed", fname_buf);
goto err;
}
- if (mysql_bin_log.is_open())
- mysql_bin_log.write(this);
error=0; // Everything is ok
err:
@@ -2705,7 +2745,7 @@ err:
my_close(fd, MYF(0));
return error ? 1 : Log_event::exec_event(rli);
}
-#endif
+#endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
/**************************************************************************
@@ -2717,11 +2757,12 @@ err:
*/
#ifndef MYSQL_CLIENT
-Append_block_log_event::Append_block_log_event(THD* thd_arg, char* block_arg,
+Append_block_log_event::Append_block_log_event(THD* thd_arg, const char* db_arg,
+ char* block_arg,
uint block_len_arg,
bool using_trans)
:Log_event(thd_arg,0, using_trans), block(block_arg),
- block_len(block_len_arg), file_id(thd_arg->file_id)
+ block_len(block_len_arg), file_id(thd_arg->file_id), db(db_arg)
{
}
#endif
@@ -2787,7 +2828,7 @@ void Append_block_log_event::pack_info(Protocol *protocol)
block_len));
protocol->store(buf, length, &my_charset_bin);
}
-#endif
+#endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
/*
@@ -2805,16 +2846,14 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli)
memcpy(p, ".data", 6);
if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY, MYF(MY_WME))) < 0)
{
- slave_print_error(rli,my_errno, "Could not open file '%s'", fname);
+ slave_print_error(rli,my_errno, "Error in Append_block event: could not open file '%s'", fname);
goto err;
}
if (my_write(fd, (byte*) block, block_len, MYF(MY_WME+MY_NABP)))
{
- slave_print_error(rli,my_errno, "Write to '%s' failed", fname);
+ slave_print_error(rli,my_errno, "Error in Append_block event: write to '%s' failed", fname);
goto err;
}
- if (mysql_bin_log.is_open())
- mysql_bin_log.write(this);
error=0;
err:
@@ -2834,8 +2873,9 @@ err:
*/
#ifndef MYSQL_CLIENT
-Delete_file_log_event::Delete_file_log_event(THD *thd_arg, bool using_trans)
- :Log_event(thd_arg, 0, using_trans),file_id(thd_arg->file_id)
+Delete_file_log_event::Delete_file_log_event(THD *thd_arg, const char* db_arg,
+ bool using_trans)
+ :Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id), db(db_arg)
{
}
#endif
@@ -2908,11 +2948,9 @@ int Delete_file_log_event::exec_event(struct st_relay_log_info* rli)
(void) my_delete(fname, MYF(MY_WME));
memcpy(p, ".info", 6);
(void) my_delete(fname, MYF(MY_WME));
- if (mysql_bin_log.is_open())
- mysql_bin_log.write(this);
return Log_event::exec_event(rli);
}
-#endif
+#endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
/**************************************************************************
@@ -2924,8 +2962,9 @@ int Delete_file_log_event::exec_event(struct st_relay_log_info* rli)
*/
#ifndef MYSQL_CLIENT
-Execute_load_log_event::Execute_load_log_event(THD *thd_arg, bool using_trans)
- :Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id)
+Execute_load_log_event::Execute_load_log_event(THD *thd_arg, const char* db_arg,
+ bool using_trans)
+ :Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id), db(db_arg)
{
}
#endif
@@ -2997,7 +3036,6 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
char *p= slave_load_file_stem(fname, file_id, server_id);
int fd;
int error = 1;
- ulong save_options;
IO_CACHE file;
Load_log_event* lev = 0;
@@ -3006,7 +3044,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP)))
{
- slave_print_error(rli,my_errno, "Could not open file '%s'", fname);
+ slave_print_error(rli,my_errno, "Error in Exec_load event: could not open file '%s'", fname);
goto err;
}
if (!(lev = (Load_log_event*)Log_event::read_log_event(&file,
@@ -3014,21 +3052,16 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
(bool)0)) ||
lev->get_type_code() != NEW_LOAD_EVENT)
{
- slave_print_error(rli,0, "File '%s' appears corrupted", fname);
+ slave_print_error(rli,0, "Error in Exec_load event: file '%s' appears corrupted", fname);
goto err;
}
- /*
- We are going to create a Load_log_event to finally load into the table.
- This event should not go into the binlog: in the binlog we only want the
- Create_file, Append_blocks and Execute_load. We disable binary logging and
- restore the thread's options just after finishing the load.
- */
- save_options = thd->options;
- thd->options &= ~ (ulong) (OPTION_BIN_LOG);
+
lev->thd = thd;
/*
lev->exec_event should use rli only for errors
- i.e. should not advance rli's position
+ i.e. should not advance rli's position.
+ lev->exec_event is the place where the table is loaded (it calls
+ mysql_load()).
*/
if (lev->exec_event(0,rli,1))
{
@@ -3049,15 +3082,11 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
tmp, fname);
my_free(tmp,MYF(0));
}
- thd->options= save_options;
goto err;
}
- thd->options = save_options;
(void) my_delete(fname, MYF(MY_WME));
memcpy(p, ".data", 6);
(void) my_delete(fname, MYF(MY_WME));
- if (mysql_bin_log.is_open())
- mysql_bin_log.write(this);
error = 0;
err:
diff --git a/sql/log_event.h b/sql/log_event.h
index a58479e2589..8ba5d0379a0 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -590,6 +590,7 @@ public:
#endif /* HAVE_REPLICATION */
#else
void print(FILE* file, bool short_form = 0, char* last_db = 0);
+ void print(FILE* file, bool short_form, char* last_db, bool commented);
#endif
Load_log_event(const char* buf, int event_len, bool old_format);
@@ -934,9 +935,20 @@ public:
char* block;
uint block_len;
uint file_id;
-
+ /*
+ 'db' is filled when the event is created in mysql_load() (the event needs to
+ have a 'db' member to be well filtered by binlog-*-db rules). 'db' is not
+ written to the binlog (it's not used by Append_block_log_event::write()), so
+ it can't be read in the Append_block_log_event(const char* buf, int
+ event_len) constructor.
+ In other words, 'db' is used only for filtering by binlog-*-db rules.
+ Create_file_log_event is different: its 'db' (which is inherited from
+ Load_log_event) is written to the binlog and can be re-read.
+ */
+ const char* db;
+
#ifndef MYSQL_CLIENT
- Append_block_log_event(THD* thd, char* block_arg,
+ Append_block_log_event(THD* thd, const char* db_arg, char* block_arg,
uint block_len_arg, bool using_trans);
#ifdef HAVE_REPLICATION
int exec_event(struct st_relay_log_info* rli);
@@ -952,6 +964,7 @@ public:
int get_data_size() { return block_len + APPEND_BLOCK_HEADER_LEN ;}
bool is_valid() { return block != 0; }
int write_data(IO_CACHE* file);
+ const char* get_db() { return db; }
};
/*****************************************************************************
@@ -963,9 +976,10 @@ class Delete_file_log_event: public Log_event
{
public:
uint file_id;
+ const char* db; /* see comment in Append_block_log_event */
#ifndef MYSQL_CLIENT
- Delete_file_log_event(THD* thd, bool using_trans);
+ Delete_file_log_event(THD* thd, const char* db_arg, bool using_trans);
#ifdef HAVE_REPLICATION
void pack_info(Protocol* protocol);
int exec_event(struct st_relay_log_info* rli);
@@ -981,6 +995,7 @@ public:
int get_data_size() { return DELETE_FILE_HEADER_LEN ;}
bool is_valid() { return file_id != 0; }
int write_data(IO_CACHE* file);
+ const char* get_db() { return db; }
};
/*****************************************************************************
@@ -992,9 +1007,10 @@ class Execute_load_log_event: public Log_event
{
public:
uint file_id;
-
+ const char* db; /* see comment in Append_block_log_event */
+
#ifndef MYSQL_CLIENT
- Execute_load_log_event(THD* thd, bool using_trans);
+ Execute_load_log_event(THD* thd, const char* db_arg, bool using_trans);
#ifdef HAVE_REPLICATION
void pack_info(Protocol* protocol);
int exec_event(struct st_relay_log_info* rli);
@@ -1009,6 +1025,7 @@ public:
int get_data_size() { return EXEC_LOAD_HEADER_LEN ;}
bool is_valid() { return file_id != 0; }
int write_data(IO_CACHE* file);
+ const char* get_db() { return db; }
};
#ifdef MYSQL_CLIENT
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index a5d9ce5bce3..269846db446 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -212,16 +212,17 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
#define MODE_NOT_USED 16
#define MODE_ONLY_FULL_GROUP_BY 32
#define MODE_NO_UNSIGNED_SUBTRACTION 64
-#define MODE_POSTGRESQL 128
-#define MODE_ORACLE 256
-#define MODE_MSSQL 512
-#define MODE_DB2 1024
-#define MODE_SAPDB 2048
-#define MODE_NO_KEY_OPTIONS 4096
-#define MODE_NO_TABLE_OPTIONS 8192
-#define MODE_NO_FIELD_OPTIONS 16384
-#define MODE_MYSQL323 32768
-#define MODE_MYSQL40 65536
+#define MODE_NO_DIR_IN_CREATE 128
+#define MODE_POSTGRESQL 256
+#define MODE_ORACLE 512
+#define MODE_MSSQL 1024
+#define MODE_DB2 2048
+#define MODE_SAPDB 4096
+#define MODE_NO_KEY_OPTIONS 8192
+#define MODE_NO_TABLE_OPTIONS 16384
+#define MODE_NO_FIELD_OPTIONS 32768
+#define MODE_MYSQL323 65536
+#define MODE_MYSQL40 (MODE_MYSQL323*2)
#define MODE_ANSI (MODE_MYSQL40*2)
#define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2)
@@ -558,7 +559,8 @@ void mysqld_list_processes(THD *thd,const char *user,bool verbose);
int mysqld_show_status(THD *thd);
int mysqld_show_variables(THD *thd,const char *wild);
int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
- enum enum_var_type value_type);
+ enum enum_var_type value_type,
+ pthread_mutex_t *mutex);
int mysqld_show_charsets(THD *thd,const char *wild);
int mysqld_show_collations(THD *thd,const char *wild);
int mysqld_show_table_types(THD *thd);
@@ -746,6 +748,7 @@ extern ulong ha_read_first_count, ha_read_last_count;
extern ulong ha_read_rnd_count, ha_read_rnd_next_count;
extern ulong ha_commit_count, ha_rollback_count,table_cache_size;
extern ulong max_connections,max_connect_errors, connect_timeout;
+extern ulong slave_net_timeout;
extern ulong max_insert_delayed_threads, max_user_connections;
extern ulong long_query_count, what_to_log,flush_time;
extern ulong query_buff_size, thread_stack,thread_stack_min;
@@ -963,6 +966,12 @@ inline void mark_as_null_row(TABLE *table)
bfill(table->null_flags,table->null_bytes,255);
}
+inline void table_case_convert(char * name, uint length)
+{
+ if (lower_case_table_names)
+ my_casedn(files_charset_info, name, length);
+}
+
compare_func_creator comp_eq_creator(bool invert);
compare_func_creator comp_ge_creator(bool invert);
compare_func_creator comp_gt_creator(bool invert);
@@ -979,6 +988,7 @@ compare_func_creator comp_ne_creator(bool invert);
table_list TABLE_LIST structure pointer (owner of TABLE)
tablenr - table number
*/
+
inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
{
table->used_fields= 0;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 41bd9706fc3..d6b1426ed35 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -210,6 +210,7 @@ const char *sql_mode_names[] =
{
"REAL_AS_FLOAT", "PIPES_AS_CONCAT", "ANSI_QUOTES", "IGNORE_SPACE",
"?", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION",
+ "NO_DIR_IN_CREATE",
"POSTGRESQL", "ORACLE", "MSSQL", "DB2", "SAPDB", "NO_KEY_OPTIONS",
"NO_TABLE_OPTIONS", "NO_FIELD_OPTIONS", "MYSQL323", "MYSQL40", "ANSI",
"NO_AUTO_VALUE_ON_ZERO", NullS
@@ -1119,7 +1120,14 @@ static void server_init(void)
IPaddr.sin_family = AF_INET;
IPaddr.sin_addr.s_addr = my_bind_addr;
IPaddr.sin_port = (unsigned short) htons((unsigned short) mysqld_port);
+
+#ifndef __WIN__
+ /*
+ We should not use SO_REUSEADDR on windows as this would enable a
+ user to open two mysqld servers with the same TCP/IP port.
+ */
(void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));
+#endif /* __WIN__ */
if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
sizeof(IPaddr)) < 0)
{
@@ -2050,7 +2058,10 @@ static int init_common_variables(const char *conf_file_name, int argc,
max_connections,table_cache_size));
sql_print_error("Warning: Changed limits: max_connections: %ld table_cache: %ld",max_connections,table_cache_size);
}
+ open_files_limit= files;
}
+#else
+ open_files_limit= 0; /* Can't set or detect limit */
#endif
unireg_init(opt_specialflag); /* Set up extern variabels */
init_errmessage(); /* Read error messages from file */
@@ -3104,6 +3115,12 @@ extern "C" pthread_handler_decl(handle_connections_sockets,
}
if (sock == unix_sock)
thd->host=(char*) 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);
}
@@ -4196,7 +4213,7 @@ replicating a LOAD DATA INFILE command.",
"Max packetlength to send/receive from to server.",
(gptr*) &global_system_variables.max_allowed_packet,
(gptr*) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
- REQUIRED_ARG, 1024*1024L, 80, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
+ REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE,
"Can be used to restrict the total size used to cache a multi-transaction query.",
(gptr*) &max_binlog_cache_size, (gptr*) &max_binlog_cache_size, 0,
@@ -5563,6 +5580,19 @@ static void fix_paths(void)
}
+/*
+ set how many open files we want to be able to handle
+
+ SYNOPSIS
+ set_maximum_open_files()
+ max_file_limit Files to open
+
+ NOTES
+ The request may not fulfilled becasue of system limitations
+
+ RETURN
+ Files available to open
+*/
#ifdef SET_RLIMIT_NOFILE
static uint set_maximum_open_files(uint max_file_limit)
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index f12705572d6..d39fca595ac 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -240,10 +240,12 @@ my_bool net_flush(NET *net)
*****************************************************************************/
/*
-** Write a logical packet with packet header
-** Format: Packet length (3 bytes), packet number(1 byte)
-** When compression is used a 3 byte compression length is added
-** NOTE: If compression is used the original package is modified!
+ Write a logical packet with packet header
+ Format: Packet length (3 bytes), packet number(1 byte)
+ When compression is used a 3 byte compression length is added
+
+ NOTE
+ If compression is used the original package is modified!
*/
my_bool
@@ -364,8 +366,8 @@ net_write_command(NET *net,uchar command,
The cached buffer can be sent as it is with 'net_flush()'.
In this code we have to be careful to not send a packet longer than
- MAX_PACKET_LENGTH to net_real_write() if we are using the compressed protocol
- as we store the length of the compressed packet in 3 bytes.
+ MAX_PACKET_LENGTH to net_real_write() if we are using the compressed
+ protocol as we store the length of the compressed packet in 3 bytes.
RETURN
0 ok
@@ -483,6 +485,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, net->write_timeout);
#endif /* NO_ALARM */
pos=(char*) packet; end=pos+len;
@@ -674,6 +677,8 @@ my_real_read(NET *net, ulong *complen)
#ifndef NO_ALARM
if (net_blocking)
thr_alarm(&alarmed,net->read_timeout,&alarm_buff);
+#else
+ vio_timeout(net->vio, net->read_timeout);
#endif /* NO_ALARM */
pos = net->buff + net->where_b; /* net->packet -4 */
@@ -877,20 +882,23 @@ my_net_read(NET *net)
{
/* We are using the compressed protocol */
- ulong buf_length= net->buf_length;
- ulong start_of_packet= net->buf_length - net->remain_in_buf;
- ulong first_packet_offset=start_of_packet;
+ ulong buf_length;
+ ulong start_of_packet;
+ ulong first_packet_offset;
uint read_length, multi_byte_packet=0;
if (net->remain_in_buf)
{
+ buf_length= net->buf_length; // Data left in old packet
+ first_packet_offset= start_of_packet= (net->buf_length -
+ net->remain_in_buf);
/* Restore the character that was overwritten by the end 0 */
- net->buff[start_of_packet]=net->save_char;
+ net->buff[start_of_packet]= net->save_char;
}
else
{
/* reuse buffer, as there is nothing in it that we need */
- buf_length=start_of_packet=first_packet_offset=0;
+ buf_length= start_of_packet= first_packet_offset= 0;
}
for (;;)
{
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 23fb36c0c91..947c930b2f4 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -341,8 +341,8 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
DBUG_RETURN(0);
if (!(select= new SQL_SELECT))
{
- *error= 1;
- DBUG_RETURN(0); /* purecov: inspected */
+ *error= 1; // out of memory
+ DBUG_RETURN(0); /* purecov: inspected */
}
select->read_tables=read_tables;
select->const_tables=const_tables;
@@ -456,15 +456,17 @@ SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg)
SEL_ARG *tmp;
if (type != KEY_RANGE)
{
- tmp=new SEL_ARG(type);
+ if(!(tmp=new SEL_ARG(type)))
+ return 0; // out of memory
tmp->prev= *next_arg; // Link into next/prev chain
(*next_arg)->next=tmp;
(*next_arg)= tmp;
}
else
{
- tmp=new SEL_ARG(field,part, min_value,max_value,
- min_flag, max_flag, maybe_flag);
+ if(!(tmp=new SEL_ARG(field,part, min_value,max_value,
+ min_flag, max_flag, maybe_flag)))
+ return 0; // out of memory
tmp->parent=new_parent;
tmp->next_key_part=next_key_part;
if (left != &null_element)
@@ -762,6 +764,8 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
while ((item=li++))
{
SEL_TREE *new_tree=get_mm_tree(param,item);
+ if(current_thd->fatal_error)
+ DBUG_RETURN(0); // out of memory
tree=tree_and(param,tree,new_tree);
if (tree && tree->type == SEL_TREE::IMPOSSIBLE)
break;
@@ -777,7 +781,7 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
{
SEL_TREE *new_tree=get_mm_tree(param,item);
if (!new_tree)
- DBUG_RETURN(0);
+ DBUG_RETURN(0); // out of memory
tree=tree_or(param,tree,new_tree);
if (!tree || tree->type == SEL_TREE::ALWAYS)
break;
@@ -793,18 +797,16 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
DBUG_RETURN(new SEL_TREE(SEL_TREE::ALWAYS));
DBUG_RETURN(new SEL_TREE(SEL_TREE::IMPOSSIBLE));
}
+
table_map ref_tables=cond->used_tables();
- if (ref_tables & ~(param->prev_tables | param->read_tables |
- param->current_table))
- DBUG_RETURN(0); // Can't be calculated yet
if (cond->type() != Item::FUNC_ITEM)
{ // Should be a field
- if (ref_tables & param->current_table)
+ if ((ref_tables & param->current_table) ||
+ (ref_tables & ~(param->prev_tables | param->read_tables)))
DBUG_RETURN(0);
DBUG_RETURN(new SEL_TREE(SEL_TREE::MAYBE));
}
- if (!(ref_tables & param->current_table))
- DBUG_RETURN(new SEL_TREE(SEL_TREE::MAYBE)); // This may be false or true
+
Item_func *cond_func= (Item_func*) cond;
if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE)
DBUG_RETURN(0); // Can't be calculated
@@ -815,12 +817,13 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
{
Field *field=((Item_field*) (cond_func->arguments()[0]))->field;
Item_result cmp_type=field->cmp_type();
- tree= get_mm_parts(param,field,Item_func::GE_FUNC,
- cond_func->arguments()[1],cmp_type);
- DBUG_RETURN(tree_and(param,tree,
+ DBUG_RETURN(tree_and(param,
+ get_mm_parts(param, field,
+ Item_func::GE_FUNC,
+ cond_func->arguments()[1], cmp_type),
get_mm_parts(param, field,
Item_func::LE_FUNC,
- cond_func->arguments()[2],cmp_type)));
+ cond_func->arguments()[2], cmp_type)));
}
DBUG_RETURN(0);
}
@@ -846,6 +849,12 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
DBUG_RETURN(0); // Can't optimize this IN
}
+ if (ref_tables & ~(param->prev_tables | param->read_tables |
+ param->current_table))
+ DBUG_RETURN(0); // Can't be calculated yet
+ if (!(ref_tables & param->current_table))
+ DBUG_RETURN(new SEL_TREE(SEL_TREE::MAYBE)); // This may be false or true
+
/* check field op const */
/* btw, ft_func's arguments()[0] isn't FIELD_ITEM. SerG*/
if (cond_func->arguments()[0]->type() == Item::FIELD_ITEM)
@@ -877,14 +886,15 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
static SEL_TREE *
-get_mm_parts(PARAM *param,Field *field, Item_func::Functype type,Item *value,
- Item_result cmp_type)
+get_mm_parts(PARAM *param, Field *field, Item_func::Functype type,
+ Item *value, Item_result cmp_type)
{
DBUG_ENTER("get_mm_parts");
if (field->table != param->table)
DBUG_RETURN(0);
- KEY_PART *key_part = param->key_parts,*end=param->key_parts_end;
+ KEY_PART *key_part = param->key_parts;
+ KEY_PART *end = param->key_parts_end;
SEL_TREE *tree=0;
if (value &&
value->used_tables() & ~(param->prev_tables | param->read_tables))
@@ -894,8 +904,8 @@ get_mm_parts(PARAM *param,Field *field, Item_func::Functype type,Item *value,
if (field->eq(key_part->field))
{
SEL_ARG *sel_arg=0;
- if (!tree)
- tree=new SEL_TREE();
+ if (!tree && !(tree=new SEL_TREE()))
+ DBUG_RETURN(0); // out of memory
if (!value || !(value->used_tables() & ~param->read_tables))
{
sel_arg=get_mm_leaf(param,key_part->field,key_part,type,value);
@@ -907,8 +917,11 @@ get_mm_parts(PARAM *param,Field *field, Item_func::Functype type,Item *value,
DBUG_RETURN(tree);
}
}
- else
- sel_arg=new SEL_ARG(SEL_ARG::MAYBE_KEY);// This key may be used later
+ else {
+ // This key may be used later
+ if(!(sel_arg=new SEL_ARG(SEL_ARG::MAYBE_KEY)))
+ DBUG_RETURN(0); // out of memory
+ }
sel_arg->part=(uchar) key_part->part;
tree->keys[key_part->key]=sel_add(tree->keys[key_part->key],sel_arg);
}
@@ -995,9 +1008,8 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
DBUG_RETURN(0);
if (!maybe_null) // Not null field
DBUG_RETURN(type == Item_func::ISNULL_FUNC ? &null_element : 0);
- tree=new SEL_ARG(field,is_null_string,is_null_string);
- if (!tree)
- DBUG_RETURN(0);
+ if (!(tree=new SEL_ARG(field,is_null_string,is_null_string)))
+ DBUG_RETURN(0); // out of memory
if (type == Item_func::ISNOTNULL_FUNC)
{
tree->min_flag=NEAR_MIN; /* IS NOT NULL -> X > NULL */
@@ -1035,7 +1047,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
field->get_key_image(str+maybe_null,key_part->part_length,
field->charset(),key_part->image_type);
if (!(tree=new SEL_ARG(field,str,str)))
- DBUG_RETURN(0);
+ DBUG_RETURN(0); // out of memory
switch (type) {
case Item_func::LT_FUNC:
@@ -1475,7 +1487,8 @@ key_or(SEL_ARG *key1,SEL_ARG *key2)
SEL_ARG *key2_next=key2->next;
if (key2_shared)
{
- key2=new SEL_ARG(*key2);
+ if(!(key2=new SEL_ARG(*key2)))
+ return 0; // out of memory
key2->increment_use_count(key1->use_count+1);
key2->next=key2_next; // New copy of key2
}
@@ -2319,16 +2332,16 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key,
}
/* Get range for retrieving rows in QUICK_SELECT::get_next */
- range= new QUICK_RANGE(param->min_key,
- (uint) (tmp_min_key - param->min_key),
- param->max_key,
- (uint) (tmp_max_key - param->max_key),
- flag);
+ if(!(range= new QUICK_RANGE(param->min_key,
+ (uint) (tmp_min_key - param->min_key),
+ param->max_key,
+ (uint) (tmp_max_key - param->max_key),
+ flag)))
+ return 1; // out of memory
+
set_if_bigger(quick->max_used_key_length,range->min_length);
set_if_bigger(quick->max_used_key_length,range->max_length);
set_if_bigger(quick->used_key_parts, (uint) key_tree->part+1);
- if (!range) // Not enough memory
- return 1;
quick->ranges.push_back(range);
end:
@@ -2389,17 +2402,17 @@ QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref)
uint part;
if (!quick)
- return 0;
+ return 0; /* no ranges found */
if (cp_buffer_from_ref(ref))
{
if (current_thd->is_fatal_error)
- return 0; // End of memory
+ return 0; // out of memory
return quick; // empty range
}
QUICK_RANGE *range= new QUICK_RANGE();
if (!range)
- goto err;
+ goto err; // out of memory
range->min_key=range->max_key=(char*) ref->key_buff;
range->min_length=range->max_length=ref->key_length;
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index e9c3b1ed0b0..402a37efc37 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -250,6 +250,18 @@ static int find_target_pos(LEX_MASTER_INFO *mi, IO_CACHE *log, char *errmsg)
/* Impossible */
}
+/*
+ Before 4.0.15 we had a member of THD called log_pos, it was meant for
+ failsafe replication code in repl_failsafe.cc which is disabled until
+ it is reworked. Event's log_pos used to be preserved through
+ log-slave-updates to make code in repl_failsafe.cc work (this
+ function, SHOW NEW MASTER); but on the other side it caused unexpected
+ values in Exec_master_log_pos in A->B->C replication setup,
+ synchronization problems in master_pos_wait(), ... So we
+ (Dmitri & Guilhem) removed it.
+
+ So for now this function is broken.
+*/
int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg)
{
@@ -415,6 +427,9 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
return (Slave_log_event*)ev;
}
+/*
+ This function is broken now. See comment for translate_master().
+ */
int show_new_master(THD* thd)
{
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 91583759c70..cce9298c4ac 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -615,13 +615,6 @@ struct show_var_st init_vars[]= {
{"protocol_version", (char*) &protocol_version, SHOW_INT},
{sys_preload_buff_size.name, (char*) &sys_preload_buff_size, SHOW_SYS},
{sys_pseudo_thread_id.name, (char*) &sys_pseudo_thread_id, SHOW_SYS},
- {sys_read_buff_size.name, (char*) &sys_read_buff_size, SHOW_SYS},
- {sys_readonly.name, (char*) &sys_readonly, SHOW_SYS},
- {sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size, SHOW_SYS},
-#ifdef HAVE_REPLICATION
- {sys_relay_log_purge.name, (char*) &sys_relay_log_purge, SHOW_SYS},
-#endif
- {sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS},
#ifdef HAVE_QUERY_CACHE
{sys_query_cache_limit.name,(char*) &sys_query_cache_limit, SHOW_SYS},
{sys_query_cache_min_res_unit.name, (char*) &sys_query_cache_min_res_unit,
@@ -629,6 +622,13 @@ struct show_var_st init_vars[]= {
{sys_query_cache_size.name, (char*) &sys_query_cache_size, SHOW_SYS},
{sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS},
#endif /* HAVE_QUERY_CACHE */
+ {sys_read_buff_size.name, (char*) &sys_read_buff_size, SHOW_SYS},
+ {sys_readonly.name, (char*) &sys_readonly, SHOW_SYS},
+ {sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size, SHOW_SYS},
+#ifdef HAVE_REPLICATION
+ {sys_relay_log_purge.name, (char*) &sys_relay_log_purge, SHOW_SYS},
+#endif
+ {sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS},
#ifdef HAVE_SMEM
{"shared_memory", (char*) &opt_enable_shared_memory, SHOW_MY_BOOL},
{"shared_memory_base_name", (char*) &shared_memory_base_name, SHOW_CHAR_PTR},
@@ -845,10 +845,12 @@ void fix_max_relay_log_size(THD *thd, enum_var_type type)
bool sys_var_long_ptr::update(THD *thd, set_var *var)
{
ulonglong tmp= var->value->val_int();
+ pthread_mutex_lock(&LOCK_global_system_variables);
if (option_limits)
*value= (ulong) getopt_ull_limit_value(tmp, option_limits);
else
*value= (ulong) tmp;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
return 0;
}
@@ -862,17 +864,21 @@ void sys_var_long_ptr::set_default(THD *thd, enum_var_type type)
bool sys_var_ulonglong_ptr::update(THD *thd, set_var *var)
{
ulonglong tmp= var->value->val_int();
+ pthread_mutex_lock(&LOCK_global_system_variables);
if (option_limits)
*value= (ulonglong) getopt_ull_limit_value(tmp, option_limits);
else
*value= (ulonglong) tmp;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
return 0;
}
void sys_var_ulonglong_ptr::set_default(THD *thd, enum_var_type type)
{
+ pthread_mutex_lock(&LOCK_global_system_variables);
*value= (ulonglong) option_limits->def_value;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
}
@@ -1164,9 +1170,21 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
case SHOW_LONG:
return new Item_uint((int32) *(ulong*) value_ptr(thd, var_type, base));
case SHOW_LONGLONG:
- return new Item_int(*(longlong*) value_ptr(thd, var_type, base));
+ {
+ longlong value;
+ pthread_mutex_lock(&LOCK_global_system_variables);
+ value= *(longlong*) value_ptr(thd, var_type, base);
+ pthread_mutex_unlock(&LOCK_global_system_variables);
+ return new Item_int(value);
+ }
case SHOW_HA_ROWS:
- return new Item_int((longlong) *(ha_rows*) value_ptr(thd, var_type, base));
+ {
+ ha_rows value;
+ pthread_mutex_lock(&LOCK_global_system_variables);
+ value= *(ha_rows*) value_ptr(thd, var_type, base);
+ pthread_mutex_unlock(&LOCK_global_system_variables);
+ return new Item_int((longlong) value);
+ }
case SHOW_MY_BOOL:
return new Item_int((int32) *(my_bool*) value_ptr(thd, var_type, base),1);
case SHOW_CHAR:
diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt
index 99a940e62ab..b1b607ca6e3 100644
--- a/sql/share/portuguese/errmsg.txt
+++ b/sql/share/portuguese/errmsg.txt
@@ -219,26 +219,26 @@
"Não pode acrescentar uma restrição de chave estrangeira",
"Não pode acrescentar uma linha filha: uma restrição de chave estrangeira falhou",
"Não pode apagar uma linha pai: uma restrição de chave estrangeira falhou",
-"Erro connectando para o master: %-.128s",
+"Erro conectando com o master: %-.128s",
"Erro rodando consulta no master: %-.128s",
"Erro quando executando comando %s: %-.128s",
"Uso errado de %s e %s",
-"Os comandos SELECT usados têm diferentes números de colunas",
-"Não pode executar a consulta porque você tem um conflitante travamento de leitura",
-"Combinação de tabelas transacionais e não transacionais está desativada",
+"Os comandos SELECT usados têm diferente número de colunas",
+"Não posso executar a consulta porque você tem um conflito de travamento de leitura",
+"Mistura de tabelas transacional e não-transacional está desabilitada",
"Opção '%s' usada duas vezes no comando",
-"Usuário '%-.64s' há excedido o '%s' de recursos (atual valor: %ld)",
-"Acesso negado. Você necessita o privilégio %-.128s para essa operação",
+"Usuário '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)",
+"Acesso negado. Você precisa o privilégio %-.128s para essa operação",
"Variável '%-.64s' é uma LOCAL variável e não pode ser usada com SET GLOBAL",
-"Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL",
-"Variável '%-.64s' não tem um valor default (padrão)",
+"Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL",
+"Variável '%-.64s' não tem um valor padrão",
"Variável '%-.64s' não pode ser configurada para o valor de '%-.64s'",
-"Tipo de argumento errado para a variável '%-.64s'",
+"Tipo errado de argumento para variável '%-.64s'",
"Variável '%-.64s' somente pode ser configurada, não lida",
-"Uso/localização errada de '%s'",
+"Errado uso/colocação de '%s'",
"Esta versão de MySQL não suporta ainda '%s'",
-"Obteve fatal error %d: '%-.128s' a partir do master quando lendo dados do binary log",
-"Slave SQL thread ignored the query because of replicate-*-table rules",
+"Obteve fatal erro %d: '%-.128s' do master quando lendo dados do binary log",
+"Slave SQL thread ignorado a consulta devido às normas de replicação-*-tabela"
"Definição errada da chave estrangeira para '%-.64s': %s",
"Referência da chave e referência da tabela não coincidem",
"Error de cardinalidade (mais/menos que %d colunas)",
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index df18b8bf7f0..2b3a6a042fc 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -223,23 +223,23 @@
"Error de coneccion a master: %-128s",
"Error executando el query en master: %-128%",
"Error de %s: %-128%",
-"Wrong usage of %s and %s",
-"The used SELECT statements have a different number of columns",
-"Can't execute the query because you have a conflicting read lock",
-"Mixing of transactional and non-transactional tables is disabled",
-"Option '%s' used twice in statement",
-"User '%-.64s' has exceeded the '%s' resource (current value: %ld)",
-"Access denied. You need the %-.128s privilege for this operation",
-"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL",
-"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL",
-"Variable '%-.64s' doesn't have a default value",
-"Variable '%-.64s' can't be set to the value of '%-.64s'",
-"Wrong argument type to variable '%-.64s'",
-"Variable '%-.64s' can only be set, not read",
-"Wrong usage/placement of '%s'",
-"This version of MySQL doesn't yet support '%s'",
-"Got fatal error %d: '%-.128s' from master when reading data from binary log",
-"Slave SQL thread ignored the query because of replicate-*-table rules",
+"Equivocado uso de %s y %s",
+"El comando SELECT usado tiene diferente número de columnas",
+"No puedo ejecutar el query porque usted tiene conflicto de traba de lectura",
+"Mezla de transancional y no-transancional tablas está deshabilitada",
+"Opción '%s' usada dos veces en el comando",
+"Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)",
+"Acceso negado. Usted necesita el privilegio %-.128s para esta operación",
+"Variable '%-.64s' es una LOCAL variable y no puede ser usada con SET GLOBAL",
+"Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL",
+"Variable '%-.64s' no tiene un valor patrón",
+"Variable '%-.64s' no puede ser configurada para el valor de '%-.64s'",
+"Tipo de argumento equivocado para variable '%-.64s'",
+"Variable '%-.64s' solamente puede ser configurada, no leída",
+"Equivocado uso/colocación de '%s'",
+"Esta versión de MySQL no soporta todavia '%s'",
+"Recibió fatal error %d: '%-.128s' del master cuando leyendo datos del binary log",
+"Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla"
"Wrong foreign key definition for '%-.64s': %s",
"Key reference and table reference doesn't match",
"Cardinality error (more/less than %d columns)",
diff --git a/sql/slave.cc b/sql/slave.cc
index d5da8325c93..9e03856e284 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1505,11 +1505,10 @@ static bool wait_for_relay_log_space(RELAY_LOG_INFO* rli)
DBUG_ENTER("wait_for_relay_log_space");
pthread_mutex_lock(&rli->log_space_lock);
- save_proc_info = thd->proc_info;
- thd->proc_info = "Waiting for relay log space to free";
save_proc_info= thd->enter_cond(&rli->log_space_cond,
&rli->log_space_lock,
- "Waiting for relay log space to free");
+ "\
+Waiting for the SQL slave thread to free enough relay log space");
while (rli->log_space_limit < rli->log_space_total &&
!(slave_killed=io_slave_killed(thd,mi)) &&
!rli->ignore_log_space_limit)
@@ -2058,7 +2057,8 @@ int st_relay_log_info::wait_for_pos(THD* thd, String* log_name,
DBUG_PRINT("info",("Waiting for master update"));
const char* msg = thd->enter_cond(&data_cond, &data_lock,
- "Waiting for master update");
+ "Waiting for the SQL slave thread to \
+advance position");
/*
We are going to pthread_cond_(timed)wait(); if the SQL thread stops it
will wake us up.
@@ -2125,7 +2125,13 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd->master_access= ~0;
thd->priv_user = 0;
thd->slave_thread = 1;
- thd->options = (((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | OPTION_AUTO_IS_NULL) ;
+ thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) |
+ OPTION_AUTO_IS_NULL;
+ /*
+ It's nonsense to constraint the slave threads with max_join_size; if a
+ query succeeded on master, we HAVE to execute it.
+ */
+ thd->variables.max_join_size= HA_POS_ERROR;
thd->client_capabilities = CLIENT_LOCAL_FILES;
thd->real_id=pthread_self();
pthread_mutex_lock(&LOCK_thread_count);
@@ -2145,11 +2151,8 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
#endif
- if (thd->variables.max_join_size == HA_POS_ERROR)
- thd->options |= OPTION_BIG_SELECTS;
-
if (thd_type == SLAVE_THD_SQL)
- thd->proc_info= "Waiting for the next event in slave queue";
+ thd->proc_info= "Waiting for the next event in relay log";
else
thd->proc_info= "Waiting for master update";
thd->version=refresh_version;
@@ -2390,7 +2393,6 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
if (!ev->when)
ev->when = time(NULL);
ev->thd = thd;
- thd->log_pos = ev->log_pos;
exec_res = ev->exec_event(rli);
DBUG_ASSERT(rli->sql_thd==thd);
delete ev;
@@ -2398,7 +2400,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
}
else
{
- sql_print_error("\
+ slave_print_error(rli, 0, "\
Could not parse relay log event entry. The possible reasons are: the master's \
binary log is corrupted (you can check this by running 'mysqlbinlog' on the \
binary log), the slave's relay log is corrupted (you can check this by running \
@@ -2473,7 +2475,7 @@ slave_begin:
}
- thd->proc_info = "connecting to master";
+ thd->proc_info = "Connecting to master";
// we can get killed during safe_connect
if (!safe_connect(thd, mysql, mi))
sql_print_error("Slave I/O thread: connected to master '%s@%s:%d',\
@@ -2520,7 +2522,7 @@ dump");
goto err;
}
- thd->proc_info = "Waiting to reconnect after a failed dump request";
+ thd->proc_info= "Waiting to reconnect after a failed binlog dump request";
end_server(mysql);
/*
First time retry immediately, assuming that we can recover
@@ -2541,7 +2543,7 @@ dump");
goto err;
}
- thd->proc_info = "Reconnecting after a failed dump request";
+ thd->proc_info = "Reconnecting after a failed binlog dump request";
if (!suppress_warnings)
sql_print_error("Slave I/O thread: failed dump request, \
reconnecting to try again, log '%s' at postion %s", IO_RPL_LOG_NAME,
@@ -2560,7 +2562,13 @@ after reconnect");
while (!io_slave_killed(thd,mi))
{
bool suppress_warnings= 0;
- thd->proc_info = "Reading master update";
+ /*
+ We say "waiting" because read_event() will wait if there's nothing to
+ read. But if there's something to read, it will not wait. The important
+ thing is to not confuse users by saying "reading" whereas we're in fact
+ receiving nothing.
+ */
+ thd->proc_info = "Waiting for master to send event";
ulong event_len = read_event(mysql, mi, &suppress_warnings);
if (io_slave_killed(thd,mi))
{
@@ -2587,7 +2595,7 @@ max_allowed_packet",
mysql_error(mysql));
goto err;
}
- thd->proc_info = "Waiting to reconnect after a failed read";
+ thd->proc_info = "Waiting to reconnect after a failed master event read";
end_server(mysql);
if (retry_count++)
{
@@ -2603,7 +2611,7 @@ max_allowed_packet",
reconnect after a failed read");
goto err;
}
- thd->proc_info = "Reconnecting after a failed read";
+ thd->proc_info = "Reconnecting after a failed master event read";
if (!suppress_warnings)
sql_print_error("Slave I/O thread: Failed reading log event, \
reconnecting to retry, log '%s' position %s", IO_RPL_LOG_NAME,
@@ -2620,7 +2628,7 @@ reconnect done to recover from failed read");
} // if (event_len == packet_error)
retry_count=0; // ok event, reset retry counter
- thd->proc_info = "Queueing event from master";
+ thd->proc_info = "Queueing master event to the relay log";
if (queue_event(mi,(const char*)mysql->net.read_pos + 1,
event_len))
{
@@ -2802,7 +2810,7 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME,
while (!sql_slave_killed(thd,rli))
{
- thd->proc_info = "Processing master log event";
+ thd->proc_info = "Reading event from the relay log";
DBUG_ASSERT(rli->sql_thd == thd);
THD_CHECK_SENTRY(thd);
if (exec_relay_log_event(thd,rli))
@@ -2834,6 +2842,12 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
DBUG_ASSERT(rli->slave_running == 1); // tracking buffer overrun
/* When master_pos_wait() wakes up it will check this and terminate */
rli->slave_running= 0;
+ /*
+ Going out of the transaction. Necessary to mark it, in case the user
+ restarts replication from a non-transactional statement (with CHANGE
+ MASTER).
+ */
+ rli->inside_transaction= 0;
/* Wake up master_pos_wait() */
pthread_mutex_unlock(&rli->data_lock);
DBUG_PRINT("info",("Signaling possibly waiting master_pos_wait() functions"));
@@ -2909,7 +2923,7 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev)
in the loop
*/
{
- Append_block_log_event aev(thd,0,0,0);
+ Append_block_log_event aev(thd,0,0,0,0);
for (;;)
{
@@ -2922,7 +2936,7 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev)
if (unlikely(!num_bytes)) /* eof */
{
net_write_command(net, 0, "", 0, "", 0);/* 3.23 master wants it */
- Execute_load_log_event xev(thd,0);
+ Execute_load_log_event xev(thd,0,0);
xev.log_pos = mi->master_log_pos;
if (unlikely(mi->rli.relay_log.append(&xev)))
{
@@ -3049,6 +3063,12 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
tmp_buf[event_len]=0; // Create_file constructor wants null-term buffer
buf = (const char*)tmp_buf;
}
+ /*
+ This will transform LOAD_EVENT into CREATE_FILE_EVENT, ask the master to
+ send the loaded file, and write it to the relay log in the form of
+ Append_block/Exec_load (the SQL thread needs the data, as that thread is not
+ connected to the master).
+ */
Log_event *ev = Log_event::read_log_event(buf,event_len, &errmsg,
1 /*old format*/ );
if (unlikely(!ev))
@@ -3076,6 +3096,12 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
inc_pos= 0;
break;
case CREATE_FILE_EVENT:
+ /*
+ Yes it's possible to have CREATE_FILE_EVENT here, even if we're in
+ queue_old_event() which is for 3.23 events which don't comprise
+ CREATE_FILE_EVENT. This is because read_log_event() above has just
+ transformed LOAD_EVENT into CREATE_FILE_EVENT.
+ */
{
/* We come here when and only when tmp_buf != 0 */
DBUG_ASSERT(tmp_buf);
@@ -3575,7 +3601,7 @@ Before assert, my_b_tell(cur_log)=%s rli->event_relay_log_pos=%s",
pthread_mutex_unlock(&rli->log_space_lock);
pthread_cond_broadcast(&rli->log_space_cond);
// Note that wait_for_update unlocks lock_log !
- rli->relay_log.wait_for_update(rli->sql_thd);
+ rli->relay_log.wait_for_update(rli->sql_thd, 1);
// re-acquire data lock since we released it earlier
pthread_mutex_lock(&rli->data_lock);
continue;
diff --git a/sql/slave.h b/sql/slave.h
index 0cd291a50f8..3afa1723cf1 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -32,6 +32,30 @@
*****************************************************************************/
+/*
+ MUTEXES in replication:
+
+ LOCK_active_mi: this is meant for multimaster, when we can switch from a
+ master to another. It protects active_mi. We don't care of it for the moment,
+ as active_mi never moves (it's created at startup and deleted at shutdown,
+ and not changed: it always points to the same MASTER_INFO struct), because we
+ don't have multimaster. So for the moment, mi does not move, and mi->rli does
+ not either.
+
+ In MASTER_INFO: run_lock, data_lock
+ run_lock protects all information about the run state: slave_running, and the
+ existence of the I/O thread (to stop/start it, you need this mutex).
+ data_lock protects some moving members of the struct: counters (log name,
+ position) and relay log (MYSQL_LOG object).
+
+ In RELAY_LOG_INFO: run_lock, data_lock
+ see MASTER_INFO
+
+ In MYSQL_LOG: LOCK_log, LOCK_index of the binlog and the relay log
+ LOCK_log: when you write to it. LOCK_index: when you create/delete a binlog
+ (so that you have to update the .index file).
+*/
+
extern ulong master_retry_count;
extern MY_BITMAP slave_error_mask;
extern bool use_slave_mask;
@@ -43,10 +67,6 @@ extern my_bool opt_log_slave_updates;
extern ulonglong relay_log_space_limit;
struct st_master_info;
-extern "C" {
- extern ulong slave_net_timeout;
-};
-
enum enum_binlog_formats {
BINLOG_FORMAT_CURRENT=0, /* 0 is important for easy 'if (mi->old_format)' */
BINLOG_FORMAT_323_LESS_57,
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 9738c0c5d9e..904080f3745 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -599,6 +599,9 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
{
Vio *vio=thd->net.vio;
+#ifdef HAVE_OPENSSL
+ SSL *ssl= (SSL*) vio->ssl_arg;
+#endif
/*
At this point we know that user is allowed to connect
from given host by given username/password pair. Now
@@ -624,8 +627,8 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
we should reject connection.
*/
if (vio_type(vio) == VIO_TYPE_SSL &&
- SSL_get_verify_result(vio->ssl_) == X509_V_OK &&
- SSL_get_peer_certificate(vio->ssl_))
+ SSL_get_verify_result(ssl) == X509_V_OK &&
+ SSL_get_peer_certificate(ssl))
user_access=acl_user->access;
break;
case SSL_TYPE_SPECIFIED: /* Client should have specified attrib */
@@ -636,27 +639,27 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
use.
*/
if (vio_type(vio) != VIO_TYPE_SSL ||
- SSL_get_verify_result(vio->ssl_) != X509_V_OK)
+ SSL_get_verify_result(ssl) != X509_V_OK)
break;
if (acl_user->ssl_cipher)
{
DBUG_PRINT("info",("comparing ciphers: '%s' and '%s'",
- acl_user->ssl_cipher,SSL_get_cipher(vio->ssl_)));
- if (!strcmp(acl_user->ssl_cipher,SSL_get_cipher(vio->ssl_)))
+ acl_user->ssl_cipher,SSL_get_cipher(ssl)));
+ if (!strcmp(acl_user->ssl_cipher,SSL_get_cipher(ssl)))
user_access=acl_user->access;
else
{
if (global_system_variables.log_warnings)
sql_print_error("X509 ciphers mismatch: should be '%s' but is '%s'",
acl_user->ssl_cipher,
- SSL_get_cipher(vio->ssl_));
+ SSL_get_cipher(ssl));
user_access=NO_ACCESS;
break;
}
}
/* Prepare certificate (if exists) */
DBUG_PRINT("info",("checkpoint 1"));
- X509* cert=SSL_get_peer_certificate(vio->ssl_);
+ X509* cert=SSL_get_peer_certificate(ssl);
DBUG_PRINT("info",("checkpoint 2"));
/* If X509 issuer is speified, we check it... */
if (acl_user->x509_issuer)
@@ -2445,7 +2448,7 @@ int mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
{
my_printf_error(ER_WRONG_USAGE, ER(ER_WRONG_USAGE), MYF(0),
"DB GRANT","GLOBAL PRIVILEGES");
- result= -1;
+ result= 1;
}
}
}
@@ -3172,6 +3175,8 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (test_all_bits(table_access, (TABLE_ACLS & ~GRANT_ACL)))
global.append("ALL PRIVILEGES",14);
+ else if (!(table_access & ~GRANT_ACL))
+ global.append("USAGE",5);
else
{
int found= 0;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 763408dc5c2..e743c3ecdb8 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -133,7 +133,6 @@ THD::THD():user_time(0), is_fatal_error(0),
where="field list";
server_id = ::server_id;
slave_net = 0;
- log_pos = 0;
command=COM_CONNECT;
set_query_id=1;
db_access=NO_ACCESS;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index e10795c4d9d..9149be9f1ae 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -129,7 +129,7 @@ public:
}
void set_max_size(ulong max_size_arg);
void signal_update() { pthread_cond_broadcast(&update_cond);}
- void wait_for_update(THD* thd);
+ void wait_for_update(THD* thd, bool master_or_slave);
void set_need_start_event() { need_start_event = 1; }
void init(enum_log_type log_type_arg,
enum cache_type io_cache_type_arg,
@@ -146,7 +146,7 @@ public:
bool write(THD *thd, const char *query, uint query_length,
time_t query_start=0);
bool write(Log_event* event_info); // binary log write
- bool write(THD *thd, IO_CACHE *cache);
+ bool write(THD *thd, IO_CACHE *cache, bool commit_or_rollback);
/*
v stands for vector
@@ -560,7 +560,6 @@ public:
char scramble[SCRAMBLE41_LENGTH+1];
// old scramble is needed to handle old clients
char old_scramble[SCRAMBLE_LENGTH+1];
- uint8 query_cache_type; // type of query cache processing
bool slave_thread;
bool set_query_id,locked,count_cuted_fields,some_tables_deleted;
bool last_cuted_field;
@@ -580,7 +579,6 @@ public:
*/
LOG_INFO* current_linfo;
NET* slave_net; // network connection from slave -> m.
- my_off_t log_pos;
/* Used by the sys_var class to store temporary values */
union
{
@@ -965,7 +963,6 @@ typedef struct st_sort_buffer {
SORT_FIELD *sortorder;
} SORT_BUFFER;
-
/* Structure for db & table in sql_yacc */
class Table_ident :public Sql_alloc
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 947205949f1..66af0298f3e 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1448,6 +1448,8 @@ void select_insert::send_error(uint errcode,const char *err)
table->file->has_transactions());
mysql_bin_log.write(&qinfo);
}
+ if (!table->tmp_table)
+ thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
}
if (info.copied || info.deleted)
query_cache_invalidate3(thd, table, 1);
@@ -1468,7 +1470,11 @@ bool select_insert::send_eof()
*/
if (info.copied || info.deleted)
+ {
query_cache_invalidate3(thd, table, 1);
+ if (!(table->file->has_transactions() || table->tmp_table))
+ thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
+ }
if (last_insert_id)
thd->insert_id(last_insert_id); // For binary log
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index d030eaf617c..8820629c73f 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -171,7 +171,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
else
#endif
{
- read_file_from_client=0;
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
ex->file_name+=dirname_length(ex->file_name);
#endif
@@ -311,7 +310,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
which is nonsense.
*/
read_info.end_io_cache();
- Delete_file_log_event d(thd, log_delayed);
+ Delete_file_log_event d(thd, db, log_delayed);
mysql_bin_log.write(&d);
}
}
@@ -343,7 +342,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
read_info.end_io_cache(); // make sure last block gets logged
if (lf_info.wrote_create_file)
{
- Execute_load_log_event e(thd, log_delayed);
+ Execute_load_log_event e(thd, db, log_delayed);
mysql_bin_log.write(&e);
}
}
@@ -806,9 +805,13 @@ int READ_INFO::read_field()
row_end= to;
return 0;
}
- /* Copy the found '"' character */
+ /*
+ The string didn't terminate yet.
+ Store back next character for the loop
+ */
PUSH(chr);
- chr='"';
+ /* copy the found term character to 'to' */
+ chr= found_enclosed_char;
}
else if (chr == field_term_char && found_enclosed_char == INT_MAX)
{
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 33e96cc2776..890334e8c94 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1878,6 +1878,7 @@ mysql_execute_command(THD *thd)
{
if (check_global_access(thd, REPL_SLAVE_ACL))
goto error;
+ /* This query don't work now. See comment in repl_failsafe.cc */
#ifndef WORKING_NEW_MASTER
net_printf(thd, ER_NOT_SUPPORTED_YET, "SHOW NEW MASTER");
res= 1;
@@ -2678,11 +2679,12 @@ mysql_execute_command(THD *thd)
break;
case SQLCOM_SHOW_STATUS:
res= mysqld_show(thd,(lex->wild ? lex->wild->ptr() : NullS),status_vars,
- OPT_GLOBAL);
+ OPT_GLOBAL, &LOCK_status);
break;
case SQLCOM_SHOW_VARIABLES:
res= mysqld_show(thd, (lex->wild ? lex->wild->ptr() : NullS),
- init_vars, lex->option_type);
+ init_vars, lex->option_type,
+ &LOCK_global_system_variables);
break;
case SQLCOM_SHOW_LOGS:
#ifdef DONT_ALLOW_SHOW_COMMANDS
@@ -3204,7 +3206,16 @@ mysql_execute_command(THD *thd)
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
if (!ha_rollback(thd))
{
- if (thd->options & OPTION_STATUS_NO_TRANS_UPDATE)
+ /*
+ If a non-transactional table was updated, warn; don't warn if this is a
+ slave thread (because when a slave thread executes a ROLLBACK, it has
+ been read from the binary log, so it's 100% sure and normal to produce
+ error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the
+ slave SQL thread, it would not stop the thread but just be printed in
+ the error log; but we don't want users to wonder why they have this
+ message in the error log, so we don't send it.
+ */
+ if ((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) && !thd->slave_thread)
send_warning(thd,ER_WARNING_NOT_COMPLETE_ROLLBACK,0);
else
send_ok(thd);
@@ -3216,7 +3227,7 @@ mysql_execute_command(THD *thd)
case SQLCOM_ROLLBACK_TO_SAVEPOINT:
if (!ha_rollback_to_savepoint(thd, lex->savepoint_name))
{
- if (thd->options & OPTION_STATUS_NO_TRANS_UPDATE)
+ if ((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) && !thd->slave_thread)
send_warning(thd, ER_WARNING_NOT_COMPLETE_ROLLBACK, 0);
else
send_ok(thd);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 3cdf033c477..2bfc73ae1a1 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -545,7 +545,7 @@ Increase max_allowed_packet on master";
if (!thd->killed)
{
/* Note that the following call unlocks lock_log */
- mysql_bin_log.wait_for_update(thd);
+ mysql_bin_log.wait_for_update(thd, 0);
}
else
pthread_mutex_unlock(log_lock);
@@ -560,7 +560,7 @@ Increase max_allowed_packet on master";
if (read_packet)
{
- thd->proc_info = "sending update to slave";
+ thd->proc_info = "Sending binlog event to slave";
if (my_net_write(net, (char*)packet->ptr(), packet->length()) )
{
errmsg = "Failed on my_net_write()";
@@ -597,7 +597,7 @@ Increase max_allowed_packet on master";
{
bool loop_breaker = 0;
// need this to break out of the for loop from switch
- thd->proc_info = "switching to next log";
+ thd->proc_info = "Finished reading one binlog; switching to next binlog";
switch (mysql_bin_log.find_next_log(&linfo, 1)) {
case LOG_INFO_EOF:
loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
@@ -636,14 +636,14 @@ end:
(void)my_close(file, MYF(MY_WME));
send_eof(thd);
- thd->proc_info = "waiting to finalize termination";
+ thd->proc_info = "Waiting to finalize termination";
pthread_mutex_lock(&LOCK_thread_count);
thd->current_linfo = 0;
pthread_mutex_unlock(&LOCK_thread_count);
DBUG_VOID_RETURN;
err:
- thd->proc_info = "waiting to finalize termination";
+ thd->proc_info = "Waiting to finalize termination";
end_io_cache(&log);
/*
Exclude iteration through thread list
@@ -903,7 +903,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
DBUG_RETURN(1);
}
- thd->proc_info = "changing master";
+ thd->proc_info = "Changing master";
LEX_MASTER_INFO* lex_mi = &thd->lex.mi;
// TODO: see if needs re-write
if (init_master_info(mi, master_info_file, relay_log_info_file, 0))
@@ -969,7 +969,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
if (need_relay_log_purge)
{
relay_log_purge= 1;
- thd->proc_info="purging old relay logs";
+ thd->proc_info="Purging old relay logs";
if (purge_relay_logs(&mi->rli, thd,
0 /* not only reset, but also reinit */,
&errmsg))
@@ -1258,7 +1258,7 @@ int log_loaded_block(IO_CACHE* file)
lf_info->last_pos_in_file = file->pos_in_file;
if (lf_info->wrote_create_file)
{
- Append_block_log_event a(lf_info->thd, buffer, block_len,
+ Append_block_log_event a(lf_info->thd, lf_info->db, buffer, block_len,
lf_info->log_delayed);
mysql_bin_log.write(&a);
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index de6b2ce443f..771a3d701bb 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1414,7 +1414,6 @@ JOIN::exec()
curr_join->group_list : curr_join->order,
curr_join->select_limit, unit->select_limit_cnt))
DBUG_VOID_RETURN;
- }
}
curr_join->having= curr_join->tmp_having;
thd->proc_info="Sending data";
@@ -2046,28 +2045,34 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end,
static void
add_key_field(KEY_FIELD **key_fields,uint and_level,
- Field *field,bool eq_func,Item *value,
+ Field *field,bool eq_func,Item **value, uint num_values,
table_map usable_tables)
{
uint exists_optimize= 0;
if (!(field->flags & PART_KEY_FLAG))
{
// Don't remove column IS NULL on a LEFT JOIN table
- if (!eq_func || !value || value->type() != Item::NULL_ITEM ||
- !field->table->maybe_null || field->null_ptr)
+ if (!eq_func || (*value)->type() != Item::NULL_ITEM ||
+ !field->table->maybe_null || field->null_ptr)
return; // Not a key. Skip it
exists_optimize= KEY_OPTIMIZE_EXISTS;
}
else
{
table_map used_tables=0;
- if (value && ((used_tables=value->used_tables()) &
- (field->table->map | RAND_TABLE_BIT)))
+ bool optimizable=0;
+ for (uint i=0; i<num_values; i++)
+ {
+ used_tables|=(*value)->used_tables();
+ if (!((*value)->used_tables() & (field->table->map | RAND_TABLE_BIT)))
+ optimizable=1;
+ }
+ if (!optimizable)
return;
if (!(usable_tables & field->table->map))
{
- if (!eq_func || !value || value->type() != Item::NULL_ITEM ||
- !field->table->maybe_null || field->null_ptr)
+ if (!eq_func || (*value)->type() != Item::NULL_ITEM ||
+ !field->table->maybe_null || field->null_ptr)
return; // Can't use left join optimize
exists_optimize= KEY_OPTIMIZE_EXISTS;
}
@@ -2078,12 +2083,6 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
field->table->keys_in_use_for_query);
stat[0].keys|= possible_keys; // Add possible keys
- if (!value)
- { // Probably BETWEEN or IN
- stat[0].const_keys |= possible_keys;
- return; // Can't be used as eq key
- }
-
/*
Save the following cases:
Field op constant
@@ -2092,26 +2091,38 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
Field op formula
Field IS NULL
Field IS NOT NULL
+ Field BETWEEN ...
+ Field IN ...
*/
stat[0].key_dependent|=used_tables;
- if (value->const_item())
- stat[0].const_keys |= possible_keys;
+ bool is_const=1;
+ for (uint i=0; i<num_values; i++)
+ is_const&= (*value)->const_item();
+ if (is_const)
+ stat[0].const_keys |= possible_keys;
/*
We can't always use indexes when comparing a string index to a
- number. cmp_type() is checked to allow compare of dates to numbers
- */
+ number. cmp_type() is checked to allow compare of dates to numbers.
+ eq_func is NEVER true when num_values > 1
+ */
if (!eq_func ||
field->result_type() == STRING_RESULT &&
- value->result_type() != STRING_RESULT &&
- field->cmp_type() != value->result_type())
+ (*value)->result_type() != STRING_RESULT &&
+ field->cmp_type() != (*value)->result_type())
return;
}
}
+ DBUG_ASSERT(num_values == 1);
+ /*
+ For the moment eq_func is always true. This slot is reserved for future
+ extensions where we want to remembers other things than just eq comparisons
+ */
+ DBUG_ASSERT(eq_func);
/* Store possible eq field */
(*key_fields)->field= field;
(*key_fields)->eq_func= eq_func;
- (*key_fields)->val= value;
+ (*key_fields)->val= *value;
(*key_fields)->level= and_level;
(*key_fields)->optimize= exists_optimize;
(*key_fields)++;
@@ -2160,12 +2171,13 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
case Item_func::OPTIMIZE_NONE:
break;
case Item_func::OPTIMIZE_KEY:
+ // BETWEEN or IN
if (cond_func->key_item()->real_item()->type() == Item::FIELD_ITEM &&
!(cond_func->used_tables() & OUTER_REF_TABLE_BIT))
add_key_field(key_fields,*and_level,
- ((Item_field*) (cond_func->key_item()->real_item()))
- ->field,
- 0,(Item*) 0,usable_tables);
+ ((Item_field*) (cond_func->key_item()->real_item()))->field, 0,
+ cond_func->arguments()+1, cond_func->argument_count()-1,
+ usable_tables);
break;
case Item_func::OPTIMIZE_OP:
{
@@ -2179,7 +2191,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
((Item_field*) (cond_func->arguments()[0])->real_item())
->field,
equal_func,
- (cond_func->arguments()[1]),usable_tables);
+ cond_func->arguments()+1, 1, usable_tables);
}
if (cond_func->arguments()[1]->real_item()->type() == Item::FIELD_ITEM &&
cond_func->functype() != Item_func::LIKE_FUNC &&
@@ -2189,7 +2201,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
((Item_field*) (cond_func->arguments()[1])->real_item())
->field,
equal_func,
- (cond_func->arguments()[0]),usable_tables);
+ cond_func->arguments(),1,usable_tables);
}
break;
}
@@ -2198,11 +2210,14 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
if (cond_func->arguments()[0]->real_item()->type() == Item::FIELD_ITEM &&
!(cond_func->used_tables() & OUTER_REF_TABLE_BIT))
{
+ Item *tmp=new Item_null;
+ if (!tmp) // Should never be true
+ return;
add_key_field(key_fields,*and_level,
((Item_field*) (cond_func->arguments()[0])->real_item())
->field,
cond_func->functype() == Item_func::ISNULL_FUNC,
- new Item_null, usable_tables);
+ &tmp, 1, usable_tables);
}
break;
}
@@ -3992,7 +4007,7 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father,
static void
-propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_level,
+propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_father,
COND *cond)
{
if (cond->type() == Item::COND_ITEM)
@@ -4018,7 +4033,7 @@ propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_level,
cond_cmp->cmp_func->arguments()[1]);
}
}
- else if (and_level != cond && !cond->marker) // In a AND group
+ else if (and_father != cond && !cond->marker) // In a AND group
{
if (cond->type() == Item::FUNC_ITEM &&
(((Item_func*) cond)->functype() == Item_func::EQ_FUNC ||
@@ -4036,7 +4051,7 @@ propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_level,
func->arguments()[1]=resolve_const_item(func->arguments()[1],
func->arguments()[0]);
func->update_used_tables();
- change_cond_ref_to_const(save_list,and_level,and_level,
+ change_cond_ref_to_const(save_list,and_father,and_father,
func->arguments()[0],
func->arguments()[1]);
}
@@ -4045,7 +4060,7 @@ propagate_cond_constants(I_List<COND_CMP> *save_list,COND *and_level,
func->arguments()[0]=resolve_const_item(func->arguments()[0],
func->arguments()[1]);
func->update_used_tables();
- change_cond_ref_to_const(save_list,and_level,and_level,
+ change_cond_ref_to_const(save_list,and_father,and_father,
func->arguments()[1],
func->arguments()[0]);
}
@@ -8206,7 +8221,7 @@ update_tmptable_sum_func(Item_sum **func_ptr,
{
Item_sum *func;
while ((func= *(func_ptr++)))
- func->update_field(0);
+ func->update_field();
}
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 9084269f486..997dcce55b4 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -791,9 +791,14 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
DBUG_RETURN(1);
}
+ if (store_create_info(thd, table, &buffer))
+ DBUG_RETURN(-1);
+
List<Item> field_list;
field_list.push_back(new Item_empty_string("Table",NAME_LEN));
- field_list.push_back(new Item_empty_string("Create Table", MAX_BLOB_WIDTH));
+ // 1024 is for not to confuse old clients
+ field_list.push_back(new Item_empty_string("Create Table",
+ max(buffer.length(),1024)));
if (protocol->send_fields(&field_list, 1))
DBUG_RETURN(1);
@@ -1017,11 +1022,38 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
}
}
+
+/* Append directory name (if exists) to CREATE INFO */
+
+static void append_directory(THD *thd, String *packet, const char *dir_type,
+ const char *filename)
+{
+ uint length;
+ if (filename && !(thd->sql_mode & MODE_NO_DIR_IN_CREATE))
+ {
+ length= dirname_length(filename);
+ packet->append(' ');
+ packet->append(dir_type);
+ packet->append(" DIRECTORY='", 12);
+ packet->append(filename, length);
+ packet->append('\'');
+ }
+}
+
+
#define LIST_PROCESS_HOST_LEN 64
static int
store_create_info(THD *thd, TABLE *table, String *packet)
{
+ List<Item> field_list;
+ char tmp[MAX_FIELD_WIDTH], *for_str, buff[128], *end;
+ String type(tmp, sizeof(tmp),&my_charset_bin);
+ Field **ptr,*field;
+ uint primary_key;
+ KEY *key_info;
+ handler *file= table->file;
+ HA_CREATE_INFO create_info;
my_bool foreign_db_mode= (thd->variables.sql_mode & (MODE_POSTGRESQL |
MODE_ORACLE |
MODE_MSSQL |
@@ -1037,9 +1069,6 @@ store_create_info(THD *thd, TABLE *table, String *packet)
restore_record(table,default_values); // Get empty record
- List<Item> field_list;
- char tmp[MAX_FIELD_WIDTH];
- String type(tmp, sizeof(tmp),&my_charset_bin);
if (table->tmp_table)
packet->append("CREATE TEMPORARY TABLE ", 23);
else
@@ -1047,13 +1076,14 @@ store_create_info(THD *thd, TABLE *table, String *packet)
append_identifier(thd,packet, table->real_name, strlen(table->real_name));
packet->append(" (\n", 3);
- Field **ptr,*field;
for (ptr=table->field ; (field= *ptr); ptr++)
{
+ bool has_default;
+ uint flags = field->flags;
+
if (ptr != table->field)
packet->append(",\n", 2);
- uint flags = field->flags;
packet->append(" ", 2);
append_identifier(thd,packet,field->field_name, strlen(field->field_name));
packet->append(' ');
@@ -1090,9 +1120,9 @@ store_create_info(THD *thd, TABLE *table, String *packet)
if (flags & NOT_NULL_FLAG)
packet->append(" NOT NULL", 9);
- bool has_default = (field->type() != FIELD_TYPE_BLOB &&
- field->type() != FIELD_TYPE_TIMESTAMP &&
- field->unireg_check != Field::NEXT_NUMBER);
+ has_default= (field->type() != FIELD_TYPE_BLOB &&
+ field->type() != FIELD_TYPE_TIMESTAMP &&
+ field->unireg_check != Field::NEXT_NUMBER);
if (has_default)
{
@@ -1122,9 +1152,11 @@ store_create_info(THD *thd, TABLE *table, String *packet)
}
}
- KEY *key_info=table->key_info;
- table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME);
- uint primary_key = table->primary_key;
+ key_info= table->key_info;
+ file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME);
+ bzero((char*) &create_info, sizeof(create_info));
+ file->update_create_info(&create_info);
+ primary_key= table->primary_key;
for (uint i=0 ; i < table->keys ; i++,key_info++)
{
@@ -1175,7 +1207,6 @@ store_create_info(THD *thd, TABLE *table, String *packet)
table->field[key_part->fieldnr-1]->key_length() &&
!(key_info->flags & HA_FULLTEXT)))
{
- char buff[64];
buff[0] = '(';
char* end=int10_to_str((long) key_part->length, buff + 1,10);
*end++ = ')';
@@ -1189,10 +1220,8 @@ store_create_info(THD *thd, TABLE *table, String *packet)
Get possible foreign key definitions stored in InnoDB and append them
to the CREATE TABLE statement
*/
- handler *file = table->file;
- char* for_str= file->get_foreign_key_create_info();
- if (for_str)
+ if ((for_str= file->get_foreign_key_create_info()))
{
packet->append(for_str, strlen(for_str));
file->free_foreign_key_create_info(for_str);
@@ -1203,8 +1232,6 @@ store_create_info(THD *thd, TABLE *table, String *packet)
{
packet->append(" TYPE=", 6);
packet->append(file->table_type());
- char buff[128];
- char* p;
if (table->table_charset &&
!(thd->variables.sql_mode & MODE_MYSQL323) &&
@@ -1222,21 +1249,22 @@ store_create_info(THD *thd, TABLE *table, String *packet)
if (table->min_rows)
{
packet->append(" MIN_ROWS=");
- p = longlong10_to_str(table->min_rows, buff, 10);
- packet->append(buff, (uint) (p - buff));
+ end= longlong10_to_str(table->min_rows, buff, 10);
+ packet->append(buff, (uint) (end- buff));
}
if (table->max_rows)
{
packet->append(" MAX_ROWS=");
- p = longlong10_to_str(table->max_rows, buff, 10);
- packet->append(buff, (uint) (p - buff));
+ end= longlong10_to_str(table->max_rows, buff, 10);
+ packet->append(buff, (uint) (end - buff));
}
+
if (table->avg_row_length)
{
packet->append(" AVG_ROW_LENGTH=");
- p=longlong10_to_str(table->avg_row_length, buff,10);
- packet->append(buff, (uint) (p - buff));
+ end= longlong10_to_str(table->avg_row_length, buff,10);
+ packet->append(buff, (uint) (end - buff));
}
if (table->db_create_options & HA_OPTION_PACK_KEYS)
@@ -1260,12 +1288,15 @@ store_create_info(THD *thd, TABLE *table, String *packet)
}
if (file->raid_type)
{
- char buff[100];
- sprintf(buff," RAID_TYPE=%s RAID_CHUNKS=%d RAID_CHUNKSIZE=%ld",
- my_raid_type(file->raid_type), file->raid_chunks,
- file->raid_chunksize/RAID_BLOCK_SIZE);
- packet->append(buff);
+ uint length;
+ length= my_snprintf(buff,sizeof(buff),
+ " RAID_TYPE=%s RAID_CHUNKS=%d RAID_CHUNKSIZE=%ld",
+ my_raid_type(file->raid_type), file->raid_chunks,
+ file->raid_chunksize/RAID_BLOCK_SIZE);
+ packet->append(buff, length);
}
+ append_directory(thd, packet, "DATA", create_info.data_file_name);
+ append_directory(thd, packet, "INDEX", create_info.index_file_name);
}
DBUG_RETURN(0);
}
@@ -1522,7 +1553,8 @@ err:
int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
- enum enum_var_type value_type)
+ enum enum_var_type value_type,
+ pthread_mutex_t *mutex)
{
char buff[1024];
List<Item> field_list;
@@ -1536,8 +1568,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
DBUG_RETURN(1); /* purecov: inspected */
null_lex_str.str= 0; // For sys_var->value_ptr()
- /* pthread_mutex_lock(&THR_LOCK_keycache); */
- pthread_mutex_lock(&LOCK_status);
+ pthread_mutex_lock(mutex);
for (; variables->name; variables++)
{
if (!(wild && wild[0] && wild_case_compare(system_charset_info,
@@ -1625,83 +1656,83 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
case SHOW_SSL_CTX_SESS_ACCEPT:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_accept(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_ACCEPT_GOOD:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_accept_good(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_CONNECT_GOOD:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_connect_good(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_ACCEPT_RENEGOTIATE:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_accept_renegotiate(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_sess_accept_renegotiate(ssl_acceptor_fd->ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_CONNECT_RENEGOTIATE:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_connect_renegotiate(ssl_acceptor_fd-> ssl_context_)),
+ SSL_CTX_sess_connect_renegotiate(ssl_acceptor_fd-> ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_CB_HITS:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_cb_hits(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_HITS:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_hits(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_CACHE_FULL:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_cache_full(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_MISSES:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
SSL_CTX_sess_misses(ssl_acceptor_fd->
- ssl_context_)),
+ ssl_context)),
buff, 10);
break;
case SHOW_SSL_CTX_SESS_TIMEOUTS:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_timeouts(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_sess_timeouts(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_SESS_NUMBER:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_number(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_sess_number(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_SESS_CONNECT:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_connect(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_sess_connect(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_SESS_GET_CACHE_SIZE:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_get_cache_size(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_sess_get_cache_size(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_GET_VERIFY_MODE:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_get_verify_mode(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_get_verify_mode(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_GET_VERIFY_DEPTH:
end= int10_to_str((long) (!ssl_acceptor_fd ? 0 :
- SSL_CTX_get_verify_depth(ssl_acceptor_fd->ssl_context_)),
+ SSL_CTX_get_verify_depth(ssl_acceptor_fd->ssl_context)),
buff,10);
break;
case SHOW_SSL_CTX_GET_SESSION_CACHE_MODE:
@@ -1711,7 +1742,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
end= pos+4;
break;
}
- switch (SSL_CTX_get_session_cache_mode(ssl_acceptor_fd->ssl_context_))
+ switch (SSL_CTX_get_session_cache_mode(ssl_acceptor_fd->ssl_context))
{
case SSL_SESS_CACHE_OFF:
pos= "OFF";
@@ -1739,40 +1770,50 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
break;
/* First group - functions relying on SSL */
case SHOW_SSL_GET_VERSION:
- pos= thd->net.vio->ssl_ ? SSL_get_version(thd->net.vio->ssl_) : "";
+ pos= (thd->net.vio->ssl_arg ?
+ SSL_get_version((SSL*) thd->net.vio->ssl_arg) : "");
end= strend(pos);
break;
case SHOW_SSL_SESSION_REUSED:
- end= int10_to_str((long) (thd->net.vio->ssl_ ?
- SSL_session_reused(thd->net.vio->ssl_):
- 0), buff, 10);
+ end= int10_to_str((long) (thd->net.vio->ssl_arg ?
+ SSL_session_reused((SSL*) thd->net.vio->
+ ssl_arg) :
+ 0),
+ buff, 10);
break;
case SHOW_SSL_GET_DEFAULT_TIMEOUT:
- end= int10_to_str((long) (thd->net.vio->ssl_ ?
- SSL_get_default_timeout(thd->net.vio->ssl_):
- 0), buff, 10);
+ end= int10_to_str((long) (thd->net.vio->ssl_arg ?
+ SSL_get_default_timeout((SSL*) thd->net.vio->
+ ssl_arg) :
+ 0),
+ buff, 10);
break;
case SHOW_SSL_GET_VERIFY_MODE:
- end= int10_to_str((long) (thd->net.vio->ssl_ ?
- SSL_get_verify_mode(thd->net.vio->ssl_):
- 0), buff, 10);
+ end= int10_to_str((long) (thd->net.vio->ssl_arg ?
+ SSL_get_verify_mode((SSL*) thd->net.vio->
+ ssl_arg):
+ 0),
+ buff, 10);
break;
case SHOW_SSL_GET_VERIFY_DEPTH:
- end= int10_to_str((long) (thd->net.vio->ssl_ ?
- SSL_get_verify_depth(thd->net.vio->ssl_):
- 0), buff, 10);
+ end= int10_to_str((long) (thd->net.vio->ssl_arg ?
+ SSL_get_verify_depth((SSL*) thd->net.vio->
+ ssl_arg):
+ 0),
+ buff, 10);
break;
case SHOW_SSL_GET_CIPHER:
- pos= thd->net.vio->ssl_ ? SSL_get_cipher(thd->net.vio->ssl_) : "";
+ pos= (thd->net.vio->ssl_arg ?
+ SSL_get_cipher((SSL*) thd->net.vio->ssl_arg) : "" );
end= strend(pos);
break;
case SHOW_SSL_GET_CIPHER_LIST:
- if (thd->net.vio->ssl_)
+ if (thd->net.vio->ssl_arg)
{
char *to= buff;
for (int i=0 ; i++ ;)
{
- const char *p= SSL_get_cipher_list(thd->net.vio->ssl_,i);
+ const char *p= SSL_get_cipher_list((SSL*) thd->net.vio->ssl_arg,i);
if (p == NULL)
break;
to= strmov(to, p);
@@ -1796,14 +1837,12 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
goto err; /* purecov: inspected */
}
}
- pthread_mutex_unlock(&LOCK_status);
- /* pthread_mutex_unlock(&THR_LOCK_keycache); */
+ pthread_mutex_unlock(mutex);
send_eof(thd);
DBUG_RETURN(0);
err:
- pthread_mutex_unlock(&LOCK_status);
- /* pthread_mutex_unlock(&THR_LOCK_keycache); */
+ pthread_mutex_unlock(mutex);
DBUG_RETURN(1);
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 37f8d0d7f4f..b1141d15309 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -914,7 +914,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
thd->proc_info="creating table";
+ if (thd->sql_mode & MODE_NO_DIR_IN_CREATE)
+ create_info->data_file_name= create_info->index_file_name= 0;
create_info->table_options=db_options;
+
if (rea_create_table(thd, path, create_info, fields, key_count,
key_info_buffer))
{
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 24497589c73..2b10fe2cd2a 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -123,8 +123,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *sel_result,
DBUG_RETURN(0);
prepared= 1;
res= 0;
- found_rows_for_union= test(first_select_in_union()->options
- & OPTION_FOUND_ROWS);
+ found_rows_for_union= first_select_in_union()->options & OPTION_FOUND_ROWS;
TMP_TABLE_PARAM tmp_table_param;
result= sel_result;
t_and_f= tables_and_fields_initied;
@@ -239,7 +238,7 @@ int st_select_lex_unit::exec()
{
SELECT_LEX *lex_select_save= thd->lex.current_select;
SELECT_LEX *select_cursor=first_select_in_union();
- ha_rows add_rows=0;
+ ulonglong add_rows=0;
DBUG_ENTER("st_select_lex_unit::exec");
if (executed && !(dependent || uncacheable))
@@ -263,10 +262,30 @@ int st_select_lex_unit::exec()
res= sl->join->reinit();
else
{
- offset_limit_cnt= sl->offset_limit;
- select_limit_cnt= sl->select_limit+sl->offset_limit;
+ /* Don't use offset for the last union if there is no braces */
+ if (sl != lex_sl)
+ {
+ offset_limit_cnt= sl->offset_limit;
+ select_limit_cnt= sl->select_limit+sl->offset_limit;
+ }
+ else
+ {
+ offset_limit_cnt= 0;
+ /*
+ We can't use LIMIT at this stage if we are using ORDER BY for the
+ whole query
+ */
+ select_limit_cnt= HA_POS_ERROR;
+ if (! sl->order_list.first)
+ select_limit_cnt= sl->select_limit+sl->offset_limit;
+ }
if (select_limit_cnt < sl->select_limit)
select_limit_cnt= HA_POS_ERROR; // no limit
+
+ /*
+ When using braces, SQL_CALC_FOUND_ROWS affects the whole query.
+ We don't calculate found_rows() per union part
+ */
if (select_limit_cnt == HA_POS_ERROR || sl->braces)
sl->options&= ~OPTION_FOUND_ROWS;
else
@@ -318,11 +337,13 @@ int st_select_lex_unit::exec()
thd->lex.current_select= lex_select_save;
DBUG_RETURN(res);
}
+ /* Needed for the following test and for records_at_start in next loop */
+ table->file->info(HA_STATUS_VARIABLE);
if (found_rows_for_union & sl->options)
{
/*
- This is a union without braces. Remember the number of rows that could
- also have been part of the result set.
+ This is a union without braces. Remember the number of rows that
+ could also have been part of the result set.
We get this from the difference of between total number of possible
rows and actual rows added to the temporary table.
*/
@@ -341,7 +362,7 @@ int st_select_lex_unit::exec()
List<Item_func_match> empty_list;
empty_list.empty();
- if (!thd->is_fatal_error) // Check if EOM
+ if (!thd->is_fatal_error) // Check if EOM
{
ulong options= thd->options;
thd->lex.current_select= fake_select_lex;
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 29138f10989..7430029a5e5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -600,6 +600,7 @@ multi_update::initialize_tables(JOIN *join)
{
TABLE *table=table_ref->table;
uint cnt= table_ref->shared;
+ Item_field *If;
List<Item> temp_fields= *fields_for_table[cnt];
ORDER group;
@@ -623,7 +624,10 @@ multi_update::initialize_tables(JOIN *join)
/* ok to be on stack as this is not referenced outside of this func */
Field_string offset(table->file->ref_length, 0, "offset",
table, &my_charset_bin);
- if (temp_fields.push_front(new Item_field(((Field *) &offset))))
+ if (!(If=new Item_field(((Field *) &offset))))
+ DBUG_RETURN(1);
+ If->maybe_null=0;
+ if (temp_fields.push_front(If))
DBUG_RETURN(1);
/* Make an unique key over the first field to avoid duplicated updates */
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 643ea77c73e..da212d06a3d 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -51,7 +51,7 @@
#ifdef HAVE_CHARSET_tis620
-static uchar* thai2sortable(const uchar *tstr,uint len);
+static uchar* thai2sortable(const uchar *tstr,int len);
#define BUFFER_MULTIPLY 4
#define buffsize(s) (BUFFER_MULTIPLY * (strlen(s) + 1))
@@ -458,7 +458,7 @@ uchar NEAR sort_order_tis620[]=
/*
NOTE: isn't it faster to alloc buffer in calling function?
*/
-static uchar* thai2sortable(const uchar * tstr,uint len)
+static uchar* thai2sortable(const uchar * tstr,int len)
{
/* We use only 3 levels (neglect capitalization). */
@@ -469,16 +469,16 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
uint bufSize;
uint RightSize;
- len= (uint) strnlen((char*) tstr,len);
+ len= (int) strnlen((char*) tstr,len);
bufSize= (uint) buffsize((char*) tstr);
RightSize= sizeof(uchar) * (len + 1);
- if (!(outBuf= pLeft1= pRight1=
+ if (!(outBuf= pLeft1= pRight1=
(uchar *)malloc(sizeof(uchar) * bufSize + RightSize*2)))
return (uchar*) tstr;
pLeft2= pRight2= pRight1 + sizeof(uchar) * bufSize;
pLeft3= pRight3= pRight2 + RightSize;
- while (--len)
+ while (--len > 0)
{
int *t_ctype0= t_ctype[p[0]];
if (isldvowel(*p) && isconsnt(p[1]))
@@ -584,8 +584,8 @@ int my_strcoll_tis620(const uchar * s1, const uchar * s2)
{
uchar *tc1, *tc2;
int i;
- tc1= thai2sortable(s1, (uint) strlen((char*)s1));
- tc2= thai2sortable(s2, (uint) strlen((char*)s2));
+ tc1= thai2sortable(s1, (int) strlen((char*)s1));
+ tc2= thai2sortable(s2, (int) strlen((char*)s2));
i= strcmp((char*)tc1, (char*)tc2);
free(tc1);
free(tc2);
diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
index b8047942190..ff16fa3235a 100644
--- a/support-files/MacOSX/Makefile.am
+++ b/support-files/MacOSX/Makefile.am
@@ -22,7 +22,11 @@ EXTRA_DIST = Info.plist.sh \
StartupParameters.plist.sh \
postinstall.sh \
preinstall.sh \
- ReadMe.txt
+ ReadMe.txt \
+ MySQL \
+ StartupItem.Description.plist \
+ StartupItem.Info.plist \
+ StartupItem.postinstall
pkgdata_DATA = Info.plist \
Description.plist \
diff --git a/support-files/MacOSX/MySQL b/support-files/MacOSX/MySQL
new file mode 100755
index 00000000000..dfba5f8f982
--- /dev/null
+++ b/support-files/MacOSX/MySQL
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# /Library/StartupItems/MySQL/MySQL
+#
+# A script to automatically start up MySQL on system bootup
+# for Mac OS X. This is actually just a wrapper script around
+# the standard mysql.server init script, which is included in
+# the binary distribution.
+#
+# (c) 2003 MySQL AB
+# Written by Lenz Grimmer <lenz@mysql.com>
+#
+
+# Source the common setup functions for startup scripts
+test -r /etc/rc.common || exit 1
+. /etc/rc.common
+
+# The path to the mysql.server init script. The official MySQL
+# Mac OS X packages are being installed into /usr/local/mysql.
+SCRIPT="/usr/local/mysql/support-files/mysql.server"
+
+StartService ()
+{
+ if [ "${MYSQLCOM:=-NO-}" = "-YES-" ] ; then
+ ConsoleMessage "Starting MySQL database server"
+ $SCRIPT start > /dev/null 2>&1
+ fi
+}
+
+StopService ()
+{
+ ConsoleMessage "Stopping MySQL database server"
+ $SCRIPT stop > /dev/null 2>&1
+}
+
+RestartService ()
+{
+ ConsoleMessage "Restarting MySQL database server"
+ $SCRIPT restart > /dev/null 2>&1
+}
+
+if test -x $SCRIPT ; then
+ RunService "$1"
+else
+ ConsoleMessage "Could not find MySQL startup script!"
+fi
diff --git a/support-files/MacOSX/StartupItem.Description.plist b/support-files/MacOSX/StartupItem.Description.plist
new file mode 100644
index 00000000000..1f0023bde0d
--- /dev/null
+++ b/support-files/MacOSX/StartupItem.Description.plist
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IFPkgDescriptionDeleteWarning</key>
+ <string></string>
+ <key>IFPkgDescriptionDescription</key>
+ <string>This package enables MySQL to be started up automatically
+ on system bootup.</string>
+ <key>IFPkgDescriptionTitle</key>
+ <string>MySQL Startup Item</string>
+ <key>IFPkgDescriptionVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/support-files/MacOSX/StartupItem.Info.plist b/support-files/MacOSX/StartupItem.Info.plist
new file mode 100644
index 00000000000..f403fbe7e84
--- /dev/null
+++ b/support-files/MacOSX/StartupItem.Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleGetInfoString</key>
+ <string>MySQL Startup Item</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mysql.mysqlstartup</string>
+ <key>CFBundleName</key>
+ <string>MySQL Startup Item</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>IFMajorVersion</key>
+ <integer>1</integer>
+ <key>IFMinorVersion</key>
+ <integer>0</integer>
+ <key>IFPkgFlagAllowBackRev</key>
+ <false/>
+ <key>IFPkgFlagAuthorizationAction</key>
+ <string>RootAuthorization</string>
+ <key>IFPkgFlagDefaultLocation</key>
+ <string>/Library/StartupItems</string>
+ <key>IFPkgFlagInstallFat</key>
+ <false/>
+ <key>IFPkgFlagIsRequired</key>
+ <false/>
+ <key>IFPkgFlagRelocatable</key>
+ <false/>
+ <key>IFPkgFlagRestartAction</key>
+ <string>NoRestart</string>
+ <key>IFPkgFlagRootVolumeOnly</key>
+ <true/>
+ <key>IFPkgFlagUpdateInstalledLanguages</key>
+ <false/>
+ <key>IFPkgFormatVersion</key>
+ <real>0.10000000149011612</real>
+</dict>
+</plist>
diff --git a/support-files/MacOSX/StartupItem.postinstall b/support-files/MacOSX/StartupItem.postinstall
new file mode 100755
index 00000000000..f6f6f46f211
--- /dev/null
+++ b/support-files/MacOSX/StartupItem.postinstall
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# postinstall script for the MySQL Startup Item Installation package
+#
+# This script modifies /etc/hostconfig in the following ways:
+#
+# - On Mac OS X Server, it disables the startup of the default MySQL
+# installation by changing the "MYSQL" start variable to "-NO-".
+# - If not existent already, it adds a "MYSQLCOM" start variable, which
+# defaults to "-YES-". An already existing MYSQLCOM variable will remain
+# untouched.
+#
+# (c) 2003 MySQL AB
+# Author: Lenz Grimmer <lenz@mysql.com>
+#
+
+CONFFILE="/etc/hostconfig"
+TMPFILE=`basename $CONFFILE` || exit 1
+TMPFILE=`mktemp -t $TMPFILE.tmp` || exit 1
+
+test -e $CONFFILE || exit 1
+
+# Disable the startup of the default MySQL installation that ships with
+# Mac OS X Server to avoid conflicts with our installation on bootup
+sed -e s/^MYSQL=-YES-/MYSQL=-NO-/g < $CONFFILE > $TMPFILE
+
+# Add our MYSQLCOM startup variable (enabled by default)
+grep -q "^MYSQLCOM" $CONFFILE > /dev/null 2>&1
+if [ $? -ne 0 ] ; then
+ echo "MYSQLCOM=-YES-" >> $TMPFILE
+fi
+
+# Install the modified file into the default location
+cp -f $CONFFILE $CONFFILE~ || exit 1
+mv -f $TMPFILE $CONFFILE || echo "Error while installing new $CONFFILE!"
+chmod 644 $CONFFILE
diff --git a/vio/Makefile.am b/vio/Makefile.am
index d5d26dec344..9c961025080 100644
--- a/vio/Makefile.am
+++ b/vio/Makefile.am
@@ -18,7 +18,7 @@ INCLUDES= -I$(top_srcdir)/include $(openssl_includes)
LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs)
pkglib_LIBRARIES= libvio.a
noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
-noinst_HEADERS=
+noinst_HEADERS= vio_priv.h
test_ssl_SOURCES= test-ssl.c
test_ssl_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
../mysys/libmysys.a ../strings/libmystrings.a \
diff --git a/vio/vio.c b/vio/vio.c
index e629cd043b5..05bfb220986 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -21,13 +21,7 @@
the file descriptior.
*/
-#define DONT_MAP_VIO
-#include <my_global.h>
-#include <mysql_com.h>
-#include <my_sys.h>
-#include <m_string.h>
-#include <violite.h>
-#include <errno.h>
+#include "vio_priv.h"
/*
* Helper to fill most of the Vio* with defaults.
@@ -97,6 +91,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;
}
else /* default is VIO_TYPE_TCPIP */
#endif /* HAVE_OPENSSL */
@@ -113,6 +108,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
vio->in_addr =vio_in_addr;
vio->vioblocking =vio_blocking;
vio->is_blocking =vio_is_blocking;
+ vio->timeout =vio_timeout;
}
#endif /* HAVE_VIO */
DBUG_VOID_RETURN;
diff --git a/vio/vio_priv.h b/vio/vio_priv.h
new file mode 100644
index 00000000000..66a9bde4e0d
--- /dev/null
+++ b/vio/vio_priv.h
@@ -0,0 +1,54 @@
+/* Copyright (C) 2003 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Structures and functions private to the vio package */
+
+#define DONT_MAP_VIO
+#include <my_global.h>
+#include <mysql_com.h>
+#include <my_sys.h>
+#include <m_string.h>
+#include <violite.h>
+
+#ifdef HAVE_OPENSSL
+#include "my_net.h" /* needed because of struct in_addr */
+
+void vio_ssl_delete(Vio* vio);
+int vio_ssl_read(Vio *vio,gptr buf, int size);
+int vio_ssl_write(Vio *vio,const gptr buf,int size);
+void vio_ssl_timeout(Vio *vio, uint timeout);
+
+/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible. */
+int vio_ssl_fastsend(Vio *vio);
+/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible. */
+int vio_ssl_keepalive(Vio *vio, my_bool onoff);
+/* Whenever we should retry the last read/write operation. */
+my_bool vio_ssl_should_retry(Vio *vio);
+/* When the workday is over... */
+int vio_ssl_close(Vio *vio);
+/* Return last error number */
+int vio_ssl_errno(Vio *vio);
+my_bool vio_ssl_peer_addr(Vio *vio, char *buf, uint16 *port);
+void vio_ssl_in_addr(Vio *vio, struct in_addr *in);
+int vio_ssl_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode);
+
+/* Single copy for server */
+enum vio_ssl_acceptorfd_state
+{
+ state_connect = 1,
+ state_accept = 2
+};
+#endif /* HAVE_OPENSSL */
diff --git a/vio/viosocket.c b/vio/viosocket.c
index ac2f7939a4c..f631dca5268 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -21,19 +21,7 @@
the file descriptior.
*/
-#define DONT_MAP_VIO
-#include <my_global.h>
-#include <mysql_com.h>
-
-#include <errno.h>
-#include <my_sys.h>
-#include <violite.h>
-#include <my_net.h>
-#include <m_string.h>
-
-#ifndef __WIN__
-#define HANDLE void *
-#endif
+#include "vio_priv.h"
int vio_errno(Vio *vio __attribute__((unused)))
{
@@ -309,6 +297,18 @@ my_bool vio_poll_read(Vio *vio,uint timeout)
#endif
}
+
+void vio_timeout(Vio *vio __attribute__((unused)),
+ uint timeout __attribute__((unused)))
+{
+#ifdef __WIN__
+ ulong wait_timeout= (ulong) timeout * 1000;
+ (void) setsockopt(vio->sd, SOL_SOCKET, SO_RCVTIMEO, (char*) &wait_timeout,
+ sizeof(wait_timeout));
+#endif /* __WIN__ */
+}
+
+
#ifdef __WIN__
int vio_read_pipe(Vio * vio, gptr buf, int size)
{
@@ -458,5 +458,5 @@ int vio_close_shared_memory(Vio * vio)
vio->sd= -1;
DBUG_RETURN(r);
}
-#endif
-#endif
+#endif /* HAVE_SMEM */
+#endif /* __WIN__ */
diff --git a/vio/viossl.c b/vio/viossl.c
index fc95b0755ce..fafe48b7a84 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -21,23 +21,10 @@
the file descriptior.
*/
-#include <my_global.h>
+#include "vio_priv.h"
#ifdef HAVE_OPENSSL
-#include <mysql_com.h>
-
-#include <errno.h>
-#include <assert.h>
-#include <violite.h>
-#include <my_sys.h>
-#include <my_net.h>
-#include <m_string.h>
-
-#ifndef __WIN__
-#define HANDLE void *
-#endif
-
static void
report_errors()
{
@@ -88,11 +75,11 @@ int vio_ssl_read(Vio * vio, gptr buf, int size)
int r;
DBUG_ENTER("vio_ssl_read");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d, ssl_=%p",
- vio->sd, buf, size, vio->ssl_));
+ vio->sd, buf, size, vio->ssl_arg));
- if ((r= SSL_read(vio->ssl_, buf, size)) < 0)
+ if ((r= SSL_read((SSL*) vio->ssl_arg, buf, size)) < 0)
{
- int err= SSL_get_error(vio->ssl_, r);
+ int err= SSL_get_error((SSL*) vio->ssl_arg, r);
DBUG_PRINT("error",("SSL_read(): %d SSL_get_error(): %d", r, err));
report_errors();
}
@@ -107,7 +94,7 @@ int vio_ssl_write(Vio * vio, const gptr buf, int size)
DBUG_ENTER("vio_ssl_write");
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
- if ((r= SSL_write(vio->ssl_, buf, size)) < 0)
+ if ((r= SSL_write((SSL*) vio->ssl_arg, buf, size)) < 0)
report_errors();
DBUG_PRINT("exit", ("%d", r));
DBUG_RETURN(r);
@@ -171,11 +158,11 @@ int vio_ssl_close(Vio * vio)
int r;
DBUG_ENTER("vio_ssl_close");
r=0;
- if (vio->ssl_)
+ if ((SSL*) vio->ssl_arg)
{
- r = SSL_shutdown(vio->ssl_);
- SSL_free(vio->ssl_);
- vio->ssl_= 0;
+ r = SSL_shutdown((SSL*) vio->ssl_arg);
+ SSL_free((SSL*) vio->ssl_arg);
+ vio->ssl_arg= 0;
}
if (vio->sd >= 0)
{
@@ -273,8 +260,8 @@ int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
net_blocking = vio_is_blocking(vio);
vio_blocking(vio, 1, &unused); /* Must be called before reset */
vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE);
- vio->ssl_=0;
- if (!(vio->ssl_ = SSL_new(ptr->ssl_context_)))
+ vio->ssl_arg= 0;
+ if (!(vio->ssl_arg= (void*) SSL_new(ptr->ssl_context)))
{
DBUG_PRINT("error", ("SSL_new failure"));
report_errors();
@@ -282,25 +269,25 @@ int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
vio_blocking(vio, net_blocking, &unused);
DBUG_RETURN(1);
}
- DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
- SSL_clear(vio->ssl_);
- SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);
- SSL_set_fd(vio->ssl_,vio->sd);
- SSL_set_accept_state(vio->ssl_);
- if (SSL_do_handshake(vio->ssl_) < 1)
+ DBUG_PRINT("info", ("ssl_=%p timeout=%ld",(SSL*) vio->ssl_arg, timeout));
+ SSL_clear((SSL*) vio->ssl_arg);
+ SSL_SESSION_set_timeout(SSL_get_session((SSL*) vio->ssl_arg), timeout);
+ SSL_set_fd((SSL*) vio->ssl_arg,vio->sd);
+ SSL_set_accept_state((SSL*) vio->ssl_arg);
+ if (SSL_do_handshake((SSL*) vio->ssl_arg) < 1)
{
DBUG_PRINT("error", ("SSL_do_handshake failure"));
report_errors();
- SSL_free(vio->ssl_);
- vio->ssl_=0;
+ SSL_free((SSL*) vio->ssl_arg);
+ vio->ssl_arg= 0;
vio_reset(vio, old_type,vio->sd,0,FALSE);
vio_blocking(vio, net_blocking, &unused);
DBUG_RETURN(1);
}
#ifndef DBUF_OFF
DBUG_PRINT("info",("SSL_get_cipher_name() = '%s'"
- ,SSL_get_cipher_name(vio->ssl_)));
- client_cert = SSL_get_peer_certificate (vio->ssl_);
+ ,SSL_get_cipher_name((SSL*) vio->ssl_arg)));
+ client_cert = SSL_get_peer_certificate ((SSL*) vio->ssl_arg);
if (client_cert != NULL)
{
DBUG_PRINT("info",("Client certificate:"));
@@ -317,7 +304,7 @@ int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
else
DBUG_PRINT("info",("Client does not have certificate."));
- str=SSL_get_shared_ciphers(vio->ssl_, buf, sizeof(buf));
+ str=SSL_get_shared_ciphers((SSL*) vio->ssl_arg, buf, sizeof(buf));
if (str)
{
DBUG_PRINT("info",("SSL_get_shared_ciphers() returned '%s'",str));
@@ -340,14 +327,14 @@ int sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
my_bool net_blocking;
enum enum_vio_type old_type;
DBUG_ENTER("sslconnect");
- DBUG_PRINT("enter", ("sd=%d ptr=%p ctx: %p", vio->sd,ptr,ptr->ssl_context_));
+ DBUG_PRINT("enter", ("sd=%d ptr=%p ctx: %p", vio->sd,ptr,ptr->ssl_context));
old_type= vio->type;
net_blocking = vio_is_blocking(vio);
vio_blocking(vio, 1, &unused); /* Must be called before reset */
vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE);
- vio->ssl_=0;
- if (!(vio->ssl_ = SSL_new(ptr->ssl_context_)))
+ vio->ssl_arg= 0;
+ if (!(vio->ssl_arg = SSL_new(ptr->ssl_context)))
{
DBUG_PRINT("error", ("SSL_new failure"));
report_errors();
@@ -355,25 +342,25 @@ int sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
vio_blocking(vio, net_blocking, &unused);
DBUG_RETURN(1);
}
- DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
- SSL_clear(vio->ssl_);
- SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);
- SSL_set_fd (vio->ssl_, vio->sd);
- SSL_set_connect_state(vio->ssl_);
- if (SSL_do_handshake(vio->ssl_) < 1)
+ DBUG_PRINT("info", ("ssl_=%p timeout=%ld",(SSL*) vio->ssl_arg, timeout));
+ SSL_clear((SSL*) vio->ssl_arg);
+ SSL_SESSION_set_timeout(SSL_get_session((SSL*) vio->ssl_arg), timeout);
+ SSL_set_fd ((SSL*) vio->ssl_arg, vio->sd);
+ SSL_set_connect_state((SSL*) vio->ssl_arg);
+ if (SSL_do_handshake((SSL*) vio->ssl_arg) < 1)
{
DBUG_PRINT("error", ("SSL_do_handshake failure"));
report_errors();
- SSL_free(vio->ssl_);
- vio->ssl_=0;
+ SSL_free((SSL*) vio->ssl_arg);
+ vio->ssl_arg= 0;
vio_reset(vio, old_type,vio->sd,0,FALSE);
vio_blocking(vio, net_blocking, &unused);
DBUG_RETURN(1);
}
#ifndef DBUG_OFF
DBUG_PRINT("info",("SSL_get_cipher_name() = '%s'"
- ,SSL_get_cipher_name(vio->ssl_)));
- server_cert = SSL_get_peer_certificate (vio->ssl_);
+ ,SSL_get_cipher_name((SSL*) vio->ssl_arg)));
+ server_cert = SSL_get_peer_certificate ((SSL*) vio->ssl_arg);
if (server_cert != NULL)
{
DBUG_PRINT("info",("Server certificate:"));
@@ -407,4 +394,10 @@ int vio_ssl_blocking(Vio * vio __attribute__((unused)),
return set_blocking_mode ? 0 : 1;
}
+
+void vio_ssl_timeout(Vio *vio __attribute__((unused)),
+ uint timeout __attribute__((unused)))
+{
+ /* Not yet implemented (non critical) */
+}
#endif /* HAVE_OPENSSL */
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 69d4f3007b8..0997e3909db 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -14,15 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <my_global.h>
+#include "vio_priv.h"
#ifdef HAVE_OPENSSL
-#include <mysql_com.h>
-#include <my_sys.h>
-#include <violite.h>
-
-
static bool ssl_algorithms_added = FALSE;
static bool ssl_error_strings_loaded= FALSE;
static int verify_depth = 0;
@@ -203,8 +198,8 @@ new_VioSSLConnectorFd(const char* key_file,
my_malloc(sizeof(struct st_VioSSLConnectorFd),MYF(0)))))
DBUG_RETURN(0);
- ptr->ssl_context_= 0;
- ptr->ssl_method_= 0;
+ ptr->ssl_context= 0;
+ ptr->ssl_method= 0;
/* FIXME: constants! */
if (!ssl_algorithms_added)
@@ -219,10 +214,10 @@ new_VioSSLConnectorFd(const char* key_file,
ssl_error_strings_loaded = TRUE;
SSL_load_error_strings();
}
- ptr->ssl_method_ = TLSv1_client_method();
- ptr->ssl_context_ = SSL_CTX_new(ptr->ssl_method_);
- DBUG_PRINT("info", ("ssl_context_: %p",ptr->ssl_context_));
- if (ptr->ssl_context_ == 0)
+ ptr->ssl_method = TLSv1_client_method();
+ ptr->ssl_context = SSL_CTX_new(ptr->ssl_method);
+ DBUG_PRINT("info", ("ssl_context: %p",ptr->ssl_context));
+ if (ptr->ssl_context == 0)
{
DBUG_PRINT("error", ("SSL_CTX_new failed"));
report_errors();
@@ -234,20 +229,20 @@ new_VioSSLConnectorFd(const char* key_file,
*/
if (cipher)
{
- result=SSL_CTX_set_cipher_list(ptr->ssl_context_, cipher);
+ result=SSL_CTX_set_cipher_list(ptr->ssl_context, cipher);
DBUG_PRINT("info",("SSL_set_cipher_list() returned %d",result));
}
- SSL_CTX_set_verify(ptr->ssl_context_, verify, vio_verify_callback);
- if (vio_set_cert_stuff(ptr->ssl_context_, cert_file, key_file) == -1)
+ SSL_CTX_set_verify(ptr->ssl_context, verify, vio_verify_callback);
+ if (vio_set_cert_stuff(ptr->ssl_context, cert_file, key_file) == -1)
{
DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
report_errors();
goto ctor_failure;
}
- if (SSL_CTX_load_verify_locations( ptr->ssl_context_, ca_file,ca_path) == 0)
+ if (SSL_CTX_load_verify_locations( ptr->ssl_context, ca_file,ca_path) == 0)
{
DBUG_PRINT("warning", ("SSL_CTX_load_verify_locations failed"));
- if (SSL_CTX_set_default_verify_paths(ptr->ssl_context_) == 0)
+ if (SSL_CTX_set_default_verify_paths(ptr->ssl_context) == 0)
{
DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed"));
report_errors();
@@ -257,7 +252,7 @@ new_VioSSLConnectorFd(const char* key_file,
/* DH stuff */
dh=get_dh512();
- SSL_CTX_set_tmp_dh(ptr->ssl_context_,dh);
+ SSL_CTX_set_tmp_dh(ptr->ssl_context,dh);
DH_free(dh);
DBUG_RETURN(ptr);
@@ -292,10 +287,10 @@ new_VioSSLAcceptorFd(const char *key_file,
ptr= ((struct st_VioSSLAcceptorFd*)
my_malloc(sizeof(struct st_VioSSLAcceptorFd),MYF(0)));
- ptr->ssl_context_=0;
- ptr->ssl_method_=0;
+ ptr->ssl_context=0;
+ ptr->ssl_method=0;
/* FIXME: constants! */
- ptr->session_id_context_ = ptr;
+ ptr->session_id_context= ptr;
if (!ssl_algorithms_added)
{
@@ -310,9 +305,9 @@ new_VioSSLAcceptorFd(const char *key_file,
ssl_error_strings_loaded = TRUE;
SSL_load_error_strings();
}
- ptr->ssl_method_= TLSv1_server_method();
- ptr->ssl_context_= SSL_CTX_new(ptr->ssl_method_);
- if (ptr->ssl_context_ == 0)
+ ptr->ssl_method= TLSv1_server_method();
+ ptr->ssl_context= SSL_CTX_new(ptr->ssl_method);
+ if (ptr->ssl_context == 0)
{
DBUG_PRINT("error", ("SSL_CTX_new failed"));
report_errors();
@@ -320,31 +315,31 @@ new_VioSSLAcceptorFd(const char *key_file,
}
if (cipher)
{
- result=SSL_CTX_set_cipher_list(ptr->ssl_context_, cipher);
+ result=SSL_CTX_set_cipher_list(ptr->ssl_context, cipher);
DBUG_PRINT("info",("SSL_set_cipher_list() returned %d",result));
}
/* SSL_CTX_set_quiet_shutdown(ctx,1); */
- SSL_CTX_sess_set_cache_size(ptr->ssl_context_,128);
+ SSL_CTX_sess_set_cache_size(ptr->ssl_context,128);
/* DH? */
- SSL_CTX_set_verify(ptr->ssl_context_, verify, vio_verify_callback);
- SSL_CTX_set_session_id_context(ptr->ssl_context_,
- (const uchar*) &(ptr->session_id_context_),
- sizeof(ptr->session_id_context_));
+ SSL_CTX_set_verify(ptr->ssl_context, verify, vio_verify_callback);
+ SSL_CTX_set_session_id_context(ptr->ssl_context,
+ (const uchar*) &(ptr->session_id_context),
+ sizeof(ptr->session_id_context));
/*
SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile));
*/
- if (vio_set_cert_stuff(ptr->ssl_context_, cert_file, key_file) == -1)
+ if (vio_set_cert_stuff(ptr->ssl_context, cert_file, key_file) == -1)
{
DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
report_errors();
goto ctor_failure;
}
- if (SSL_CTX_load_verify_locations( ptr->ssl_context_, ca_file, ca_path) == 0)
+ if (SSL_CTX_load_verify_locations( ptr->ssl_context, ca_file, ca_path) == 0)
{
DBUG_PRINT("warning", ("SSL_CTX_load_verify_locations failed"));
- if (SSL_CTX_set_default_verify_paths(ptr->ssl_context_)==0)
+ if (SSL_CTX_set_default_verify_paths(ptr->ssl_context)==0)
{
DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed"));
report_errors();
@@ -353,7 +348,7 @@ new_VioSSLAcceptorFd(const char *key_file,
}
/* DH stuff */
dh=get_dh512();
- SSL_CTX_set_tmp_dh(ptr->ssl_context_,dh);
+ SSL_CTX_set_tmp_dh(ptr->ssl_context,dh);
DH_free(dh);
DBUG_RETURN(ptr);
@@ -362,6 +357,4 @@ ctor_failure:
my_free((gptr) ptr,MYF(0));
DBUG_RETURN(0);
}
-
-
#endif /* HAVE_OPENSSL */