From d40f7056ae4075339b1adefdadc990fcf4e5f4d0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jan 2006 08:30:54 +0100 Subject: [PATCH 01/13] Make it possible to run mysql-test-run.pl with default test suite in different vardir. mysql-test/include/have_outfile.inc: Use MYSQLTEST_VARDIR mysql-test/include/test_outfile.inc: Use MYSQLTEST_VARDIR mysql-test/mysql-test-run.pl: Create variable $MYSQLTEST_VARDIR that points to the vardir Don't create a symlink from var/ to the physical vardir if it's somewhere else Setup a symlink(or copy dir on windows) for std_data so it is available in the physical vardir Use "../tmp" as slave-load-tmpdir, since the server is started in var/master-data and slave in var/slave-data they will both find the dumps in "../tmp" mysql-test/mysql-test-run.sh: Export MYSQLTEST_VARDIR, always pointing at mysql-test/var mysql-test/r/backup.result: Use MYSQLTEST_VARDIR mysql-test/r/blackhole.result: Use "../std_data_ln" to find std_data files mysql-test/r/loaddata.result: Use "../std_data_ln" to find std_data files mysql-test/r/mysqlbinlog.result: Use "../std_data_ln" to find std_data files mysql-test/r/mysqltest.result: Use MYSQLTEST_VARDIR mysql-test/r/outfile.result: Use MYSQLTEST_VARDIR mysql-test/r/query_cache.result: Add missing drop function mysql-test/r/rpl000001.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl000004.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_innodb.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata_rule_m.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata_rule_s.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddatalocal.result: Use MYSQLTEST_VARDIR mysql-test/r/rpl_log.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_misc_functions.result: Use MYSQLTEST_VARDIR mysql-test/r/rpl_replicate_do.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_rewrite_db.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_timezone.result: Use "../std_data_ln" to find std_data files mysql-test/r/symlink.result: Use MYSQLTEST_VARDIR mysql-test/r/trigger.result: Use "../std_data_ln" to find std_data files mysql-test/r/view.result: Use "../std_data_ln" to find std_data files mysql-test/r/warnings.result: Use "../std_data_ln" to find std_data files mysql-test/t/backup-master.sh: Use MYSQLTEST_VARDIR mysql-test/t/backup.test: Use MYSQLTEST_VARDIR mysql-test/t/blackhole.test: Use "../std_data_ln" to find std_data files mysql-test/t/ctype_ucs_binlog.test: Use MYSQLTEST_VARDIR mysql-test/t/im_daemon_life_cycle-im.opt: Use MYSQLTEST_VARDIR mysql-test/t/im_options_set.imtest: Use MYSQLTEST_VARDIR mysql-test/t/im_options_unset.imtest: Use MYSQLTEST_VARDIR mysql-test/t/loaddata.test: Use "../std_data_ln" to find std_data files mysql-test/t/myisam.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqlbinlog.test: Use "../std_data_ln" to find std_data files mysql-test/t/mysqlbinlog2.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqldump.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqltest.test: Use MYSQLTEST_VARDIR mysql-test/t/ndb_autodiscover.test: Use MYSQLTEST_VARDIR mysql-test/t/outfile.test: Use MYSQLTEST_VARDIR mysql-test/t/query_cache.test: Add missing drop function mysql-test/t/repair.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl000001.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl000004.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl000009.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl000015-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl000017-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_EE_error.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_charset.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_drop_db.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-master.opt: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-master.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-slave.opt: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_innodb.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata_rule_m.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata_rule_s.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddatalocal.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_log.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_misc_functions-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_misc_functions.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_replicate_do.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_rewrite_db.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_rotate_logs-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_rotate_logs.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_timezone.test: Use MYSQLTEST_VARDIR mysql-test/t/show_check.test: Use MYSQLTEST_VARDIR mysql-test/t/sp-destruct.test: Use MYSQLTEST_VARDIR mysql-test/t/symlink.test: Use MYSQLTEST_VARDIR mysql-test/t/temp_table-master.opt: Use MYSQLTEST_VARDIR mysql-test/t/trigger-compat.test: Use MYSQLTEST_VARDIR mysql-test/t/trigger-grant.test: Use MYSQLTEST_VARDIR mysql-test/t/trigger.test: Use "../std_data_ln" to find std_data files mysql-test/t/type_varchar.test: Use MYSQLTEST_VARDIR mysql-test/t/user_var-binlog.test: Use MYSQLTEST_VARDIR mysql-test/t/view.test: Use "../std_data_ln" to find std_data files mysql-test/t/warnings.test: Use "../std_data_ln" to find std_data files mysql-test/include/sourced.inc: New BitKeeper file ``mysql-test/include/sourced.inc'' mysql-test/include/sourced1.inc: New BitKeeper file ``mysql-test/include/sourced1.inc'' --- mysql-test/include/have_outfile.inc | 2 +- mysql-test/include/sourced.inc | 1 + mysql-test/include/sourced1.inc | 1 + mysql-test/include/test_outfile.inc | 2 +- mysql-test/mysql-test-run.pl | 77 +++++++++--- mysql-test/mysql-test-run.sh | 3 +- mysql-test/r/backup.result | 6 +- mysql-test/r/blackhole.result | 4 +- mysql-test/r/loaddata.result | 30 ++--- mysql-test/r/mysqlbinlog.result | 26 ++-- mysql-test/r/mysqltest.result | 10 +- mysql-test/r/outfile.result | Bin 959 -> 1130 bytes mysql-test/r/query_cache.result | 1 + mysql-test/r/rpl000001.result | 2 +- mysql-test/r/rpl000004.result | 4 +- mysql-test/r/rpl_innodb.result | 4 +- mysql-test/r/rpl_loaddata.result | 16 +-- mysql-test/r/rpl_loaddata_rule_m.result | 4 +- mysql-test/r/rpl_loaddata_rule_s.result | 2 +- mysql-test/r/rpl_loaddatalocal.result | 8 +- mysql-test/r/rpl_log.result | 18 +-- mysql-test/r/rpl_misc_functions.result | 2 +- mysql-test/r/rpl_replicate_do.result | 2 +- mysql-test/r/rpl_rewrite_db.result | 12 +- mysql-test/r/rpl_timezone.result | 2 +- mysql-test/r/symlink.result | 6 +- mysql-test/r/trigger.result | 8 +- mysql-test/r/view.result | 8 +- mysql-test/r/warnings.result | 2 +- mysql-test/t/backup-master.sh | 2 +- mysql-test/t/backup.test | 8 +- mysql-test/t/blackhole.test | 2 +- mysql-test/t/ctype_ucs_binlog.test | 2 +- mysql-test/t/im_daemon_life_cycle-im.opt | 2 +- mysql-test/t/im_options_set.imtest | 8 +- mysql-test/t/im_options_unset.imtest | 8 +- mysql-test/t/loaddata.test | 42 +++---- mysql-test/t/myisam.test | 6 +- mysql-test/t/mysqlbinlog.test | 42 +++---- mysql-test/t/mysqlbinlog2.test | 24 ++-- mysql-test/t/mysqldump.test | 44 +++---- mysql-test/t/mysqltest.test | 133 +++++++++++---------- mysql-test/t/ndb_autodiscover.test | 34 +++--- mysql-test/t/outfile.test | 46 +++---- mysql-test/t/query_cache.test | 1 + mysql-test/t/repair.test | 2 +- mysql-test/t/rpl000001.test | 2 +- mysql-test/t/rpl000004.test | 4 +- mysql-test/t/rpl000009.test | 4 +- mysql-test/t/rpl000015-slave.sh | 2 +- mysql-test/t/rpl000017-slave.sh | 6 +- mysql-test/t/rpl_EE_error.test | 2 +- mysql-test/t/rpl_charset.test | 2 +- mysql-test/t/rpl_drop_db.test | 2 +- mysql-test/t/rpl_flush_log_loop-master.opt | 2 +- mysql-test/t/rpl_flush_log_loop-master.sh | 6 +- mysql-test/t/rpl_flush_log_loop-slave.opt | 2 +- mysql-test/t/rpl_flush_log_loop-slave.sh | 6 +- mysql-test/t/rpl_innodb.test | 4 +- mysql-test/t/rpl_loaddata.test | 14 +-- mysql-test/t/rpl_loaddata_rule_m.test | 2 +- mysql-test/t/rpl_loaddata_rule_s.test | 2 +- mysql-test/t/rpl_loaddatalocal.test | 19 +-- mysql-test/t/rpl_log.test | 2 +- mysql-test/t/rpl_misc_functions-slave.sh | 2 +- mysql-test/t/rpl_misc_functions.test | 3 +- mysql-test/t/rpl_replicate_do.test | 2 +- mysql-test/t/rpl_rewrite_db.test | 12 +- mysql-test/t/rpl_rotate_logs-slave.sh | 4 +- mysql-test/t/rpl_rotate_logs.test | 6 +- mysql-test/t/rpl_timezone.test | 6 +- mysql-test/t/show_check.test | 2 +- mysql-test/t/sp-destruct.test | 14 +-- mysql-test/t/symlink.test | 26 ++-- mysql-test/t/temp_table-master.opt | 2 +- mysql-test/t/trigger-compat.test | 4 +- mysql-test/t/trigger-grant.test | 6 +- mysql-test/t/trigger.test | 8 +- mysql-test/t/type_varchar.test | 2 +- mysql-test/t/user_var-binlog.test | 2 +- mysql-test/t/view.test | 8 +- mysql-test/t/warnings.test | 2 +- 82 files changed, 459 insertions(+), 404 deletions(-) create mode 100644 mysql-test/include/sourced.inc create mode 100644 mysql-test/include/sourced1.inc diff --git a/mysql-test/include/have_outfile.inc b/mysql-test/include/have_outfile.inc index 31e95f4810a..10f093ec3ef 100644 --- a/mysql-test/include/have_outfile.inc +++ b/mysql-test/include/have_outfile.inc @@ -1,5 +1,5 @@ -- require r/have_outfile.require disable_query_log; select load_file(concat(@tmpdir,"/outfile.test")); ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile.test +--exec rm $MYSQLTEST_VARDIR/tmp/outfile.test enable_query_log; diff --git a/mysql-test/include/sourced.inc b/mysql-test/include/sourced.inc new file mode 100644 index 00000000000..be1a270641a --- /dev/null +++ b/mysql-test/include/sourced.inc @@ -0,0 +1 @@ +echo here is the sourced script; diff --git a/mysql-test/include/sourced1.inc b/mysql-test/include/sourced1.inc new file mode 100644 index 00000000000..920561e5de2 --- /dev/null +++ b/mysql-test/include/sourced1.inc @@ -0,0 +1 @@ +--source include/sourced.inc diff --git a/mysql-test/include/test_outfile.inc b/mysql-test/include/test_outfile.inc index 0bede4938c6..b67e67a4dd4 100644 --- a/mysql-test/include/test_outfile.inc +++ b/mysql-test/include/test_outfile.inc @@ -1 +1 @@ -eval select "Outfile OK" into outfile "$MYSQL_TEST_DIR/var/tmp/outfile.test"; +eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test"; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 8ccd87fc7a8..a5594e121e5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -76,6 +76,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff #require 5.6.1; use File::Path; use File::Basename; +use File::Copy; use Cwd; use Getopt::Long; use Sys::Hostname; @@ -152,7 +153,6 @@ our $path_client_bindir; our $path_language; our $path_timefile; our $path_manager_log; # Used by mysqldadmin -our $path_slave_load_tmpdir; # What is this?! our $path_my_basedir; our $opt_vardir; # A path but set directly on cmd line our $opt_tmpdir; # A path but set directly on cmd line @@ -462,9 +462,6 @@ sub initial_setup () { $glob_basedir= dirname($glob_mysql_test_dir); $glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable - # needs to be same length to test logging (FIXME what???) - $path_slave_load_tmpdir= "../../var/tmp"; - $path_my_basedir= $opt_source_dist ? $glob_mysql_test_dir : $glob_basedir; @@ -1066,6 +1063,7 @@ sub environment_setup () { $ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server; $ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir; $ENV{'MYSQL_TEST_WINDIR'}= $glob_mysql_test_dir; + $ENV{'MYSQLTEST_VARDIR'}= $opt_vardir; $ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'}; $ENV{'MASTER_WINMYSOCK'}= $master->[0]->{'path_mysock'}; $ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'}; @@ -1163,10 +1161,40 @@ sub kill_and_cleanup () { mtr_report("Removing Stale Files"); - rmtree("$opt_vardir/log"); - rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port"); - rmtree("$opt_vardir/run"); - rmtree("$opt_vardir/tmp"); + if ( $opt_vardir eq "$glob_mysql_test_dir/var" ) + { + # + # Running with "var" in mysql-test dir + # + if ( -l "$glob_mysql_test_dir/var" ) + { + # Some users creates a soft link in mysql-test/var to another area + # - allow it + mtr_report("WARNING: Using the 'mysql-test/var' symlink"); + rmtree("$opt_vardir/log"); + rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port"); + rmtree("$opt_vardir/run"); + rmtree("$opt_vardir/tmp"); + } + else + { + # Remove the entire "var" dir + rmtree("$opt_vardir/"); + } + } + else + { + # + # Running with "var" in some other place + # + + # Remove the var/ dir in mysql-test dir if any + # this could be an old symlink that shouldn't be there + rmtree("$glob_mysql_test_dir/var"); + + # Remove the "var" dir + rmtree("$opt_vardir/"); + } mkpath("$opt_vardir/log"); mkpath("$opt_vardir/run"); @@ -1182,7 +1210,7 @@ sub kill_and_cleanup () { $slave->[0]->{'path_myddir'}, $slave->[1]->{'path_myddir'}, $slave->[2]->{'path_myddir'}); - + foreach my $instance (@{$instance_manager->{'instances'}}) { push(@data_dir_lst, $instance->{'path_datadir'}); @@ -1195,18 +1223,27 @@ sub kill_and_cleanup () { mkpath("$data_dir/test"); } - # To make some old test cases work, we create a soft - # link from the old "var" location to the new one - - if ( ! $glob_win32 and $opt_vardir ne "$glob_mysql_test_dir/var" ) + # Make a link std_data_ln in var/ that points to std_data + if ( ! $glob_win32 ) { - # FIXME why bother with the above, why not always remove all of var?! - rmtree("$glob_mysql_test_dir/var"); # Clean old var, FIXME or rename it?! - symlink($opt_vardir, "$glob_mysql_test_dir/var"); + symlink("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data_ln"); + } + else + { + # on windows, copy all files from std_data into var/std_data_ln + mkpath("$opt_vardir/std_data_ln"); + opendir(DIR, "$glob_mysql_test_dir/std_data") + or mtr_error("Can't find the std_data directory: $!"); + for(readdir(DIR)) { + next if -d "$glob_mysql_test_dir/std_data/$_"; + copy("$glob_mysql_test_dir/std_data/$_", "$opt_vardir/std_data_ln/$_"); + } + closedir(DIR); } } + sub check_ssl_support () { if ($opt_skip_ssl) @@ -2107,8 +2144,12 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--skip-innodb", $prefix); mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); mtr_add_arg($args, "%s--skip-slave-start", $prefix); + + # Directory where slaves find the dumps generated by "load data" + # on the server. The path need to have constant length otherwise + # test results will vary, thus a relative path is used. mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix, - $path_slave_load_tmpdir); + "../tmp"); mtr_add_arg($args, "%s--socket=%s", $prefix, $slave->[$idx]->{'path_mysock'}); mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix); @@ -2730,7 +2771,7 @@ Options to control what engine/variation to run ps-protocol Use the binary protocol between client and server compress Use the compressed protocol between client and server ssl Use ssl protocol between client and server - skip-ssl Dont start sterver with support for ssl connections + skip-ssl Dont start server with support for ssl connections bench Run the benchmark suite FIXME small-bench FIXME diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index c84763713e1..1538fc42faf 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -171,7 +171,8 @@ BASEDIR=`pwd` cd $CWD MYSQL_TEST_DIR=$BASEDIR/mysql-test MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR -export MYSQL_TEST_DIR MYSQL_TEST_WINDIR +MYSQLTEST_VARDIR=$MYSQL_TEST_DIR/var +export MYSQL_TEST_DIR MYSQL_TEST_WINDIR MYSQLTEST_VARDIR STD_DATA=$MYSQL_TEST_DIR/std_data hostname=`hostname` # Installed in the mysql privilege table diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index c7b4b1c4155..29702e583cc 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -6,7 +6,7 @@ Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed Warnings: -Error 1 Can't create/write to file 'MYSQL_TEST_DIR/var/bogus/t4.frm' (Errcode: X) +Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X) backup table t4 to '../tmp'; Table Op Msg_type Msg_text test.t4 backup status OK @@ -15,7 +15,7 @@ Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed Warnings: -Error 1 Can't create/write to file 'MYSQL_TEST_DIR/var/tmp/t4.frm' (Errcode: X) +Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X) drop table t4; restore table t4 from '../tmp'; Table Op Msg_type Msg_text @@ -33,7 +33,7 @@ restore table t1 from '../bogus'; Table Op Msg_type Msg_text t1 restore error Failed copying .frm file Warnings: -Error 29 File 'MYSQL_TEST_DIR/var/bogus/t1.frm' not found (Errcode: X) +Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) restore table t1 from '../tmp'; Table Op Msg_type Msg_text test.t1 restore status OK diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result index 38e548490fe..140d7e73d48 100644 --- a/mysql-test/r/blackhole.result +++ b/mysql-test/r/blackhole.result @@ -92,7 +92,7 @@ insert into t1 values(1); insert ignore into t1 values(1); replace into t1 values(100); create table t2 (a varchar(200)) engine=blackhole; -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; alter table t1 add b int; alter table t1 drop b; create table t3 like t1; @@ -116,7 +116,7 @@ master-bin.000001 # Query 1 # use `test`; insert ignore into t1 values(1) master-bin.000001 # Query 1 # use `test`; replace into t1 values(100) master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200)) engine=blackhole master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 -master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=1 +master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t2 ;file_id=1 master-bin.000001 # Query 1 # use `test`; alter table t1 add b int master-bin.000001 # Query 1 # use `test`; alter table t1 drop b master-bin.000001 # Query 1 # use `test`; create table t3 like t1 diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 4e47ce6f82c..17e1966dbc9 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -1,6 +1,6 @@ drop table if exists t1, t2; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 @@ -8,7 +8,7 @@ Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'a' at row 2 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 2 -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; a b c d 0000-00-00 NULL 0000-00-00 0000-00-00 @@ -16,7 +16,7 @@ a b c d 2003-03-03 2003-03-03 2003-03-03 NULL 2003-03-03 2003-03-03 2003-03-03 NULL truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 @@ -29,7 +29,7 @@ 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 ''''; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; Warnings: Warning 1261 Row 3 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from t1; @@ -41,7 +41,7 @@ Field 3,'Field 4| |Field 6| | 'Field 7'| drop table t1; create table t1 (a int, b char(10)); -load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 3 Warning 1262 Row 3 was truncated; it contained more data than there were input columns @@ -55,7 +55,7 @@ a b 3 row 3 0 1234567890 truncate table t1; -load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 4 Warning 1261 Row 4 doesn't contain data for all columns @@ -78,7 +78,7 @@ id SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1; create table t1 (a varchar(20), b varchar(20)); -load data infile '../../std_data/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); +load data infile '../std_data_ln/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); select * from t1; a b field1 field2 @@ -86,25 +86,25 @@ a"b cd"ef a"b c"d"e drop table t1; create table t1 (a int default 100, b int, c varchar(60)); -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); select * from t1; a b c NULL 20 b=10 NULL 25 b=15 truncate table t1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); select * from t1; a b c NULL NULL oops NULL NULL oops truncate table t1; set @c:=123; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); select * from t1; a b c 100 10 123 100 15 123 -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, @b); select * from t1; a b c 100 10 123 @@ -115,25 +115,25 @@ select @a, @b; @a @b NULL 15 truncate table t1; -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; select * from t1; a b c 1 2 Wow 3 4 Wow 5 6 Wow truncate table t1; -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); select * from t1; a b c 1 2 1+2+123+2+NIL 3 4 3+4+123+4+NIL 5 6 5+6+123+6+NIL -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); ERROR HY000: Can't load value from file with fixed size rows to variable create table t2 (num int primary key, str varchar(10)); insert into t2 values (10,'Ten'), (15,'Fifteen'); truncate table t1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); select * from t1; a b c 10 NULL Ten diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index cab3d924dd2..fda69b15fd1 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -4,11 +4,11 @@ create table t1 (word varchar(20)); create table t2 (id int auto_increment not null primary key); insert into t1 values ("abirvalg"); insert into t2 values (); -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; insert into t1 values ("Alas"); flush logs; @@ -32,13 +32,13 @@ SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-0' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-0' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-0' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-0' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -98,13 +98,13 @@ SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-2' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-2' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-2' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1; SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-2' INTO table t1; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 5ff931dafb5..c5f83571ddf 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -221,8 +221,8 @@ mysqltest: At line 1: Variable name in =hi does not start with '$' mysqltest: At line 1: Missing assignment operator in let mysqltest: At line 1: Missing file name in source mysqltest: At line 1: Could not open file ./non_existingFile -mysqltest: In included file "./var/tmp/recursive.sql": At line 1: Source directives are nesting too deep -mysqltest: In included file "./var/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: 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 'garbage' at line 1 +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: 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 'garbage' at line 1 2 = outer loop variable after while here is the sourced script @@ -353,9 +353,9 @@ mysqltest: At line 1: Missing connection db mysqltest: At line 1: Could not open connection 'con2': Unknown database 'illegal_db' mysqltest: At line 1: Illegal argument for port: 'illegal_port' mysqltest: At line 1: Illegal option to connect: SMTP -mysqltest: In included file "./var/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c -mysqltest: In included file "./var/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool -mysqltest: In included file "./var/tmp/con.sql": At line 2: Connection test_con1 already exists +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 2: Connection test_con1 already exists Output from mysqltest-x.inc Output from mysqltest-x.inc Output from mysqltest-x.inc diff --git a/mysql-test/r/outfile.result b/mysql-test/r/outfile.result index 5eb24a78ef0d0242fcdd2f0ad1dfbf47f9d60dac..ee8c3249c9debafaf7a7e751d5de03d56dadc072 100644 GIT binary patch delta 187 zcmdnb{)%J60mgdQpdkMs1&>Gr0|P4sx6GVW1$8|={gT`Q{ru9BG$3EMB(=Ci&rn?< oF{dasF{M%=wIZ{)q?n6HjYjx2YU8%j7+vSY0)x%(880vb0ACV5EC2ui delta 15 XcmaFGv7ddz0mg}i`kQAlU0?(NH=G80 diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 405669e95f8..5a7c387a650 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1074,6 +1074,7 @@ a f1() 1 2 2 2 drop procedure p1// +drop function f1// drop table t1// flush query cache; reset query cache; diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result index 450e728090e..65728f9600e 100644 --- a/mysql-test/r/rpl000001.result +++ b/mysql-test/r/rpl000001.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; create table t1 (word char(20) not null); -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1; select * from t1 limit 10; word diff --git a/mysql-test/r/rpl000004.result b/mysql-test/r/rpl000004.result index 9abb4db7974..e25a48939e3 100644 --- a/mysql-test/r/rpl000004.result +++ b/mysql-test/r/rpl000004.result @@ -6,9 +6,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; set SQL_LOG_BIN=0; create table t1 (word char(20) not null, index(word)); -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; create table t2 (word char(20) not null); -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; create table t3 (word char(20) not null primary key); load table t1 from master; load table t2 from master; diff --git a/mysql-test/r/rpl_innodb.result b/mysql-test/r/rpl_innodb.result index ebf1d79c4d0..765de8af458 100644 --- a/mysql-test/r/rpl_innodb.result +++ b/mysql-test/r/rpl_innodb.result @@ -12,7 +12,7 @@ PRIMARY KEY (id), UNIQUE KEY unique_rec (name,number) ) ENGINE=InnoDB; LOAD DATA -INFILE '../../std_data/loaddata_pair.dat' +INFILE '../std_data_ln/loaddata_pair.dat' REPLACE INTO TABLE t4 (name,number); SELECT * FROM t4; @@ -24,7 +24,7 @@ id name number 1 XXX 12345 2 XXY 12345 LOAD DATA -INFILE '../../std_data/loaddata_pair.dat' +INFILE '../std_data_ln/loaddata_pair.dat' REPLACE INTO TABLE t4 (name,number); SELECT * FROM t4; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index dc11d10fab8..016cea3bfaf 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -6,9 +6,9 @@ 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; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); insert into t3 select * from t2; select * from t1; @@ -22,13 +22,13 @@ day id category name 2003-03-22 2416 a bbbbb show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1286 +slave-bin.000001 1272 drop table t1; drop table t2; drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; set global sql_slave_skip_counter=1; start slave; show slave status; @@ -37,7 +37,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; stop slave; change master to master_user='test'; change master to master_user='root'; @@ -49,7 +49,7 @@ start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; stop slave; reset slave; show slave status; @@ -58,7 +58,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 1 @@ -73,7 +73,7 @@ day id category name 2003-03-22 2161 c asdf alter table t2 drop key day; delete from t2; -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 1 diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index 3571c9973ea..553a9e1b720 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -9,11 +9,11 @@ stop slave; create database mysqltest; create table t1(a int, b int, unique(b)); use mysqltest; -load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest master-bin.000001 # Query 1 # create database mysqltest master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=12 -master-bin.000001 # Execute_load_query 1 # use `mysqltest`; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1 ;file_id=1 +master-bin.000001 # Execute_load_query 1 # use `mysqltest`; load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1 ;file_id=1 drop database mysqltest; diff --git a/mysql-test/r/rpl_loaddata_rule_s.result b/mysql-test/r/rpl_loaddata_rule_s.result index 16720c81374..5e9dcf73f49 100644 --- a/mysql-test/r/rpl_loaddata_rule_s.result +++ b/mysql-test/r/rpl_loaddata_rule_s.result @@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; reset master; create table t1(a int, b int, unique(b)); -load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; select count(*) from t1; count(*) 2 diff --git a/mysql-test/r/rpl_loaddatalocal.result b/mysql-test/r/rpl_loaddatalocal.result index c29825c3c98..20e56a62133 100644 --- a/mysql-test/r/rpl_loaddatalocal.result +++ b/mysql-test/r/rpl_loaddatalocal.result @@ -5,19 +5,19 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; create table t1(a int); -select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; truncate table t1; -load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; select a,count(*) from t1 group by a; a count(*) 1 10000 drop table t1; create table t1(a int); insert into t1 values (1), (2), (2), (3); -select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; drop table t1; create table t1(a int primary key); -load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; select * from t1; a 1 diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index be8d5291ad9..93c2cac3bec 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -12,7 +12,7 @@ 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 ignore 1 lines; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; select count(*) from t1; count(*) 69 @@ -26,7 +26,7 @@ master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) master-bin.000001 338 Query 1 414 use `test`; drop table t1 master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 -master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 master-bin.000001 1269 Query 1 1345 use `test`; drop table t1 show binlog events from 98 limit 1; Log_name Pos Event_type Server_id End_log_pos Info @@ -56,7 +56,7 @@ master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) master-bin.000001 338 Query 1 414 use `test`; drop table t1 master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 -master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 master-bin.000001 1269 Query 1 1345 use `test`; drop table t1 master-bin.000001 1345 Rotate 1 1389 master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; @@ -74,7 +74,7 @@ master-bin.000002 510 start slave; show binary logs; Log_name File_size -slave-bin.000001 1559 +slave-bin.000001 1552 slave-bin.000002 348 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info @@ -85,11 +85,11 @@ slave-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) slave-bin.000001 338 Query 1 414 use `test`; drop table t1 slave-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) slave-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 -slave-bin.000001 1121 Execute_load_query 1 1278 use `test`; load data INFILE '../../var/tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 -slave-bin.000001 1278 Query 1 1354 use `test`; drop table t1 -slave-bin.000001 1354 Query 1 1440 use `test`; create table t5 (a int) -slave-bin.000001 1440 Query 1 1516 use `test`; drop table t5 -slave-bin.000001 1516 Rotate 2 1559 slave-bin.000002;pos=4 +slave-bin.000001 1121 Execute_load_query 1 1271 use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 +slave-bin.000001 1271 Query 1 1347 use `test`; drop table t1 +slave-bin.000001 1347 Query 1 1433 use `test`; create table t5 (a int) +slave-bin.000001 1433 Query 1 1509 use `test`; drop table t5 +slave-bin.000001 1509 Rotate 2 1552 slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4 diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result index a687063706d..364d5d13454 100644 --- a/mysql-test/r/rpl_misc_functions.result +++ b/mysql-test/r/rpl_misc_functions.result @@ -15,7 +15,7 @@ insert into t1 values(3, 0, 0, 0, password('does_this_work?')); insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); select * into outfile 'rpl_misc_functions.outfile' from t1; create table t2 like t1; -load data local infile './var/master-data/test/rpl_misc_functions.outfile' into table t2; +load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); id i r1 r2 p id i r1 r2 p stop slave; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index d8666080a71..6fafe413f99 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -9,7 +9,7 @@ drop table if exists t11; create table t2 (n int); insert into t2 values(4); create table t2 (s char(20)); -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; insert into t2 values('five'); create table t1 (m int); insert into t1 values(15),(16),(17); diff --git a/mysql-test/r/rpl_rewrite_db.result b/mysql-test/r/rpl_rewrite_db.result index d4a24626cc3..71ac39010b5 100644 --- a/mysql-test/r/rpl_rewrite_db.result +++ b/mysql-test/r/rpl_rewrite_db.result @@ -24,7 +24,7 @@ drop database if exists rewrite; create database rewrite; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 @@ -32,7 +32,7 @@ Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'a' at row 2 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 2 -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; select * from rewrite.t1; a b c d 0000-00-00 NULL 0000-00-00 0000-00-00 @@ -40,7 +40,7 @@ a b c d 2003-03-03 2003-03-03 2003-03-03 NULL 2003-03-03 2003-03-03 2003-03-03 NULL truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 @@ -53,7 +53,7 @@ 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 ''''; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; Warnings: Warning 1261 Row 3 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; @@ -65,7 +65,7 @@ Field 3,'Field 4| |Field 6| | 'Field 7'| drop table t1; create table t1 (a int, b char(10)); -load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 3 Warning 1262 Row 3 was truncated; it contained more data than there were input columns @@ -79,7 +79,7 @@ a b 3 row 3 0 1234567890 truncate table t1; -load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 4 Warning 1261 Row 4 doesn't contain data for all columns diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index 64d05aa787e..e1e6fa36be9 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -68,7 +68,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone.dat' into table t1; +load data infile '../std_data_ln/rpl_timezone.dat' into table t1; select * from t1; t 2004-01-01 00:00:00 diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index b36020bc2a3..f4dcb2baa02 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, `c` int(11) NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' alter table t9 rename t8, add column d int not null; alter table t8 rename t7; rename table t7 to t9; @@ -53,7 +53,7 @@ t9 CREATE TABLE `t9` ( `c` int(11) NOT NULL, `d` int(11) NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' Got one of the listed errors Got one of the listed errors Got one of the listed errors @@ -71,7 +71,7 @@ t9 CREATE TABLE `t9` ( `c` int(11) NOT NULL, `d` int(11) NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' drop database mysqltest; create table t1 (a int not null) engine=myisam; show create table t1; diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index ff92fc543d4..5a45eff846e 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -404,13 +404,13 @@ create table t1 (i int, j int, k int); create trigger trg1 before insert on t1 for each row set new.k = new.i; create trigger trg2 after insert on t1 for each row set @b:= "Fired"; set @b:=""; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, i); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, i); select *, @b from t1; i j k @b 10 NULL 10 Fired 15 NULL 15 Fired set @b:=""; -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); select *, @b from t1; i j k @b 10 NULL 10 Fired @@ -447,7 +447,7 @@ ERROR 42S22: Unknown column 'at' in 'OLD' select * from t1; i k 1 1 -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); ERROR 42S22: Unknown column 'at' in 'NEW' select * from t1; i k @@ -528,7 +528,7 @@ select * from t1; i k 1 1 2 2 -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); ERROR 42S22: Unknown column 'bt' in 'NEW' select * from t1; i k diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index e4f2671eb34..871126a6eda 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1293,7 +1293,7 @@ drop view v2, v1; drop table t1; create table t1 (a int, b char(10)); create view v1 as select * from t1 where a != 0 with check option; -load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; ERROR HY000: CHECK OPTION failed 'test.v1' select * from t1; a b @@ -1304,7 +1304,7 @@ a b 1 row 1 2 row 2 delete from t1; -load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 3 Error 1369 CHECK OPTION failed 'test.v1' @@ -1324,14 +1324,14 @@ drop view v1; drop table t1; create table t1 (a text, b text); create view v1 as select * from t1 where a <> 'Field A' with check option; -load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../std_data_ln/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; ERROR HY000: CHECK OPTION failed 'test.v1' select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') select concat('|',a,'|'), concat('|',b,'|') from v1; concat('|',a,'|') concat('|',b,'|') delete from t1; -load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../std_data_ln/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; Warnings: Error 1369 CHECK OPTION failed 'test.v1' Warning 1261 Row 2 doesn't contain data for all columns diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index d8329e446ac..f9006ebca37 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -70,7 +70,7 @@ select @@warning_count; 1 drop table t1; create table t1(a tinyint, b int not null, c date, d char(5)); -load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ','; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 3 diff --git a/mysql-test/t/backup-master.sh b/mysql-test/t/backup-master.sh index 99da5857afe..c099064f6b7 100755 --- a/mysql-test/t/backup-master.sh +++ b/mysql-test/t/backup-master.sh @@ -1,5 +1,5 @@ #!/bin/sh if [ "$MYSQL_TEST_DIR" ] then - rm -f $MYSQL_TEST_DIR/var/tmp/*.frm $MYSQL_TEST_DIR/var/tmp/*.MY? + rm -f $MYSQLTEST_VARDIR/tmp/*.frm $MYSQLTEST_VARDIR/tmp/*.MY? fi diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test index 40a9fa73b60..a3339ecce69 100644 --- a/mysql-test/t/backup.test +++ b/mysql-test/t/backup.test @@ -10,10 +10,10 @@ set SQL_LOG_BIN=0; drop table if exists t1, t2, t3; --enable_warnings create table t4(n int); ---replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR backup table t4 to '../bogus'; backup table t4 to '../tmp'; ---replace_result ": 7" ": X" ": 17" ": X" $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result ": 7" ": X" ": 17" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR backup table t4 to '../tmp'; drop table t4; restore table t4 from '../tmp'; @@ -23,7 +23,7 @@ create table t1(n int); insert into t1 values (23),(45),(67); backup table t1 to '../tmp'; drop table t1; ---replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR restore table t1 from '../bogus'; restore table t1 from '../tmp'; select n from t1; @@ -52,6 +52,6 @@ unlock tables; connection con1; reap; drop table t5; ---system rm $MYSQL_TEST_DIR/var/tmp/t?.* +--system rm $MYSQLTEST_VARDIR/tmp/t?.* # End of 4.1 tests diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test index 257770d311c..ce26d2447eb 100644 --- a/mysql-test/t/blackhole.test +++ b/mysql-test/t/blackhole.test @@ -108,7 +108,7 @@ insert into t1 values(1); insert ignore into t1 values(1); replace into t1 values(100); create table t2 (a varchar(200)) engine=blackhole; -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; alter table t1 add b int; alter table t1 drop b; create table t3 like t1; diff --git a/mysql-test/t/ctype_ucs_binlog.test b/mysql-test/t/ctype_ucs_binlog.test index 1ce55edd469..2467d34386c 100644 --- a/mysql-test/t/ctype_ucs_binlog.test +++ b/mysql-test/t/ctype_ucs_binlog.test @@ -14,7 +14,7 @@ show binlog events from 98; # absolutely need variables names to be quoted and strings to be # escaped). --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 drop table t2; # End of 4.1 tests diff --git a/mysql-test/t/im_daemon_life_cycle-im.opt b/mysql-test/t/im_daemon_life_cycle-im.opt index 6bfd9a24107..21c01191e4c 100644 --- a/mysql-test/t/im_daemon_life_cycle-im.opt +++ b/mysql-test/t/im_daemon_life_cycle-im.opt @@ -1,2 +1,2 @@ --run-as-service ---log=$MYSQL_TEST_DIR/var/log/im.log +--log=$MYSQLTEST_VARDIR/log/im.log diff --git a/mysql-test/t/im_options_set.imtest b/mysql-test/t/im_options_set.imtest index 785c6d05fef..a9b64861f99 100644 --- a/mysql-test/t/im_options_set.imtest +++ b/mysql-test/t/im_options_set.imtest @@ -48,7 +48,7 @@ # - check the configuration file; ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - check the running instances. @@ -79,7 +79,7 @@ SET mysqld1.server_id = 11; # - check that the configuration file has been updated (i.e. contains # server_id=SERVER_ID for the instance); ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - (for mysqld1) check that the running instance has not been affected: # connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id'' @@ -104,7 +104,7 @@ SET mysqld2.server_id = 12; # - check that the configuration file has been updated (i.e. contains # server_id=SERVER_ID for the instance); ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - check that internal cache of Instance Manager has not been affected # (i.e. SHOW INSTANCE OPTIONS does not contain updated value). @@ -122,7 +122,7 @@ FLUSH INSTANCES; # - check that the configuration file has not been updated; ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - (for mysqld1) check that the running instance has not been affected: # connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id'' diff --git a/mysql-test/t/im_options_unset.imtest b/mysql-test/t/im_options_unset.imtest index 74ec42ac3f9..40629805d45 100644 --- a/mysql-test/t/im_options_unset.imtest +++ b/mysql-test/t/im_options_unset.imtest @@ -55,7 +55,7 @@ # - check the configuration file; ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - check the running instances. @@ -86,7 +86,7 @@ UNSET mysqld1.server_id; # - check that the configuration file has been updated (i.e. does not # contain 'server_id=' line for the instance); ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; # - check that the running instance has not been affected: connect to the # instance and check that 'SHOW VARIABLES LIKE 'server_id'' returns non-zero @@ -111,7 +111,7 @@ UNSET mysqld2.server_id; # - check that the configuration file has been updated (i.e. does not # contain 'server_id=' line for the instance); ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf || true; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf || true; # - check that internal cache of Instance Manager is not affected (i.e. SHOW # INSTANCE OPTIONS contains non-zero value for server_id); @@ -130,7 +130,7 @@ FLUSH INSTANCES; # - check that the configuration file has not been updated (i.e. does not # contain 'server_id=' for the instance); ---exec grep server_id $MYSQL_TEST_DIR/var/im.cnf || true; +--exec grep server_id $MYSQLTEST_VARDIR/im.cnf || true; # - (for mysqld1) check that the running instance has not been affected: # connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id'' diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 09d97a42714..27c8005ca0c 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -7,25 +7,25 @@ drop table if exists t1, t2; --enable_warnings create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../std_data_ln/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 ''''; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; drop table t1; create table t1 (a int, b char(10)); -load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1; truncate table t1; -load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; # The empty line last comes from the end line field in the file select * from t1; @@ -38,23 +38,23 @@ SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; create table t1(id integer not null auto_increment primary key); insert into t1 values(0); disable_query_log; -eval SELECT * INTO OUTFILE '$MYSQL_TEST_DIR/var/tmp/t1' from t1; +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1; delete from t1; -eval load data infile '$MYSQL_TEST_DIR/var/tmp/t1' into table t1; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1; enable_query_log; select * from t1; ---exec rm $MYSQL_TEST_DIR/var/tmp/t1 +--exec rm $MYSQLTEST_VARDIR/tmp/t1 disable_query_log; -eval SELECT * INTO OUTFILE '$MYSQL_TEST_DIR/var/tmp/t1' +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FROM t1; delete from t1; -eval load data infile '$MYSQL_TEST_DIR/var/tmp/t1' into table t1 +eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1 FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; enable_query_log; select * from t1; ---exec rm $MYSQL_TEST_DIR/var/tmp/t1 +--exec rm $MYSQLTEST_VARDIR/tmp/t1 SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1; @@ -63,7 +63,7 @@ drop table t1; # ENCLOSED # create table t1 (a varchar(20), b varchar(20)); -load data infile '../../std_data/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); +load data infile '../std_data_ln/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); select * from t1; drop table t1; @@ -74,40 +74,40 @@ drop table t1; # create table t1 (a int default 100, b int, c varchar(60)); # we can do something like this -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); select * from t1; truncate table t1; # we can use filled fields in expressions # we also assigning NULL value to field with non-NULL default here -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); select * from t1; truncate table t1; # we even can use variables in set clause, and missed columns will be set # with default values set @c:=123; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); select * from t1; # let us test side-effect of such load -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, @b); select * from t1; select @a, @b; truncate table t1; # now going to test fixed field-row file format -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; select * from t1; truncate table t1; # this also should work -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); select * from t1; # and this should bark --error 1409 -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); # Now let us test LOAD DATA with subselect create table t2 (num int primary key, str varchar(10)); insert into t2 values (10,'Ten'), (15,'Fifteen'); truncate table t1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); select * from t1; # cleanup diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index fb90c16bb86..4f07df4e4f2 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -711,14 +711,14 @@ eval set storage_engine=$default; # Test how DROP TABLE works if the index or data file doesn't exists create table t1 (a int) engine=myisam; -system rm ./var/master-data/test/t1.MYI ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; drop table if exists t1; create table t1 (a int) engine=myisam; -system rm ./var/master-data/test/t1.MYI ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; --error 1051,6 drop table t1; create table t1 (a int) engine=myisam; -system rm ./var/master-data/test/t1.MYD ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYD ; --error 1105,6,29 drop table t1; --error 1051 diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 61d7d9994ba..f153a3eac6f 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -22,11 +22,11 @@ insert into t2 values (); # test for load data and load data distributed among the several # files (we need to fill up first binlog) -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; # simple query to show more in second binlog insert into t1 values ("Alas"); flush logs; @@ -41,29 +41,29 @@ select "--- Local --" as ""; # be time dependend. Better than nothing. # ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ $MYSQL_TEST_DIR/var/log/master-bin.000001 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000001 # this should not fail but shouldn't produce any working statements --disable_query_log select "--- Broken LOAD DATA --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ $MYSQL_TEST_DIR/var/log/master-bin.000002 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000002 # this should show almost nothing --disable_query_log select "--- --database --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --database=nottest $MYSQL_TEST_DIR/var/log/master-bin.000001 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLTEST_VARDIR/log/master-bin.000001 # this test for position option --disable_query_log select "--- --position --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=231 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=231 $MYSQLTEST_VARDIR/log/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -73,29 +73,29 @@ select "--- Remote --" as ""; --enable_query_log # This is broken now ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 # This is broken too --disable_query_log select "--- Broken LOAD DATA --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # And this too ! (altough it is documented) --disable_query_log select "--- --database --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 # Strangely but this works --disable_query_log select "--- --position --" as ""; --enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=231 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=231 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 (mysqlbinlog does not accept input from stdin) --disable_query_log diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index a2f1aba05b0..6afae538f04 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -40,28 +40,28 @@ select "--- Local --" as ""; # be time dependent (the Start events). Better than nothing. # ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- offset --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=600 $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- stop-datetime --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- Local with 2 binlogs on command line --" as ""; @@ -69,28 +69,28 @@ select "--- Local with 2 binlogs on command line --" as ""; # This is to verify that some options apply only to first, or last binlog ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- offset --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=126 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=126 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- stop-datetime --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 --disable_query_log select "--- Remote --" as ""; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index e54bf6386c5..0d2d46a2819 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -125,14 +125,14 @@ drop table t1; create table t1(a int); insert into t1 values (1),(2),(3); ---exec $MYSQL_DUMP --skip-comments --tab=$MYSQL_TEST_DIR/var/tmp/ test ---exec cat $MYSQL_TEST_DIR/var/tmp/t1.sql ---exec cat $MYSQL_TEST_DIR/var/tmp/t1.txt ---exec rm $MYSQL_TEST_DIR/var/tmp/t1.sql ---exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt ---exec $MYSQL_DUMP --tab=$MYSQL_TEST_DIR/var/tmp/ test ---exec rm $MYSQL_TEST_DIR/var/tmp/t1.sql ---exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt +--exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test +--exec cat $MYSQLTEST_VARDIR/tmp/t1.sql +--exec cat $MYSQLTEST_VARDIR/tmp/t1.txt +--exec rm $MYSQLTEST_VARDIR/tmp/t1.sql +--exec rm $MYSQLTEST_VARDIR/tmp/t1.txt +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test +--exec rm $MYSQLTEST_VARDIR/tmp/t1.sql +--exec rm $MYSQLTEST_VARDIR/tmp/t1.txt drop table t1; # @@ -587,7 +587,7 @@ create view v1 as select * from t2; create view v2 as select * from t1; # dump tables and view from db2 ---exec $MYSQL_DUMP db2 > var/tmp/bug10713.sql +--exec $MYSQL_DUMP db2 > $MYSQLTEST_VARDIR/tmp/bug10713.sql # drop the db, tables and views drop table t1, t2; @@ -597,7 +597,7 @@ drop database db2; # create db1 and reload dump create database db1; use db1; ---exec $MYSQL db1 < var/tmp/bug10713.sql +--exec $MYSQL db1 < $MYSQLTEST_VARDIR/tmp/bug10713.sql # check that all tables and views could be created show tables; @@ -705,9 +705,9 @@ drop table t1, t2; create table t1 (a text character set utf8, b text character set latin1); insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E); select * from t1; ---exec $MYSQL_DUMP --tab=$MYSQL_TEST_DIR/var/tmp/ test ---exec $MYSQL test < $MYSQL_TEST_DIR/var/tmp/t1.sql ---exec $MYSQL_IMPORT test $MYSQL_TEST_DIR/var/tmp/t1.txt +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql +--exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/t1.txt select * from t1; drop table t1; @@ -817,9 +817,9 @@ update t1 set a = 4 where a=3; # Skip dumping triggers --exec $MYSQL_DUMP --skip-comments --databases --skip-triggers test # Dump and reload... ---exec $MYSQL_DUMP --skip-comments --databases test > var/tmp/mysqldump.sql +--exec $MYSQL_DUMP --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql drop table t1; ---exec $MYSQL test < var/tmp/mysqldump.sql +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqldump.sql # Check that tables have been reloaded show tables; --replace_column 6 # @@ -830,11 +830,11 @@ DROP TABLE t1, t2; # Bugs #9136, #12917: problems with --defaults-extra-file option # ---exec echo "[mysqltest1]" > $MYSQL_TEST_DIR/var/tmp/tmp.cnf ---exec echo "port=1234" >> $MYSQL_TEST_DIR/var/tmp/tmp.cnf ---exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQL_TEST_DIR/var/tmp/tmp.cnf mysqltest1 ---exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQL_TEST_DIR/var/tmp/tmp.cnf mysqltest1 mysqltest1 ---exec rm $MYSQL_TEST_DIR/var/tmp/tmp.cnf +--exec echo "[mysqltest1]" > $MYSQLTEST_VARDIR/tmp/tmp.cnf +--exec echo "port=1234" >> $MYSQLTEST_VARDIR/tmp/tmp.cnf +--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 +--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1 +--exec rm $MYSQLTEST_VARDIR/tmp/tmp.cnf # # Test of fix to BUG 12597 @@ -859,13 +859,13 @@ INSERT INTO `test1` VALUES (1); SELECT * FROM `test2`; # dump ---exec $MYSQL_DUMP --skip-comments --databases test > var/tmp/mysqldump.sql +--exec $MYSQL_DUMP --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/mysqldump.sql #DROP TRIGGER testref; #DROP TABLE test1; #DROP TABLE test2; # restore ---exec $MYSQL test < var/tmp/mysqldump.sql +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqldump.sql SHOW TRIGGERS; SELECT * FROM `test1`; SELECT * FROM `test2`; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 8ccf2cb0c7a..ee4b156aa16 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -358,11 +358,11 @@ select 3 from t1 ; # Missing delimiter # The comment will be "sucked into" the sleep command since # delimiter is missing until after "show status" ---system echo "sleep 4" > var/tmp/mysqltest.sql ---system echo "# A comment" >> var/tmp/mysqltest.sql ---system echo "show status;" >> var/tmp/mysqltest.sql +--system echo "sleep 4" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "# A comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "show status;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --error 1 ---exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1 +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 # # Extra delimiter @@ -543,25 +543,26 @@ echo $novar1; --exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1 # Too many source ---exec echo "source var/tmp/recursive.sql;" > var/tmp/recursive.sql +--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" > $MYSQLTEST_VARDIR/tmp/recursive.sql +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source var/tmp/recursive.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" | $MYSQL_TEST 2>&1 # Source a file with error ---exec echo "garbage ;" > var/tmp/error.sql +--exec echo "garbage ;" > $MYSQLTEST_VARDIR/tmp/error.sql +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source var/tmp/error.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/error.sql;" | $MYSQL_TEST 2>&1 # Test execution of source in a while loop ---exec echo "echo here is the sourced script;" > var/tmp/sourced.sql --disable_query_log let $outer= 2; # Number of outer loops while ($outer) { eval SELECT '$outer = outer loop variable after while' AS ""; - --source var/tmp/sourced.sql + --source include/sourced.inc eval SELECT '$outer = outer loop variable before dec' AS ""; dec $outer; @@ -582,7 +583,6 @@ while ($outer) # Test execution of source in a while loop ---exec echo "--source var/tmp/sourced.sql" > var/tmp/sourced1.sql --disable_abort_on_error # Sourcing of a file within while loop, sourced file will # source other file @@ -590,7 +590,7 @@ let $num= 9; while ($num) { SELECT 'In loop' AS ""; - --source var/tmp/sourced1.sql + --source include/sourced1.inc dec $num; } --enable_abort_on_error @@ -728,20 +728,20 @@ while ($i) --error 1 --exec echo "{;" | $MYSQL_TEST 2>&1 ---system echo "while (0)" > var/log/mysqltest.sql ---system echo "echo hej;" >> var/log/mysqltest.sql +--system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --error 1 ---exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 ---system echo "while (0)" > var/log/mysqltest.sql ---system echo "{echo hej;" >> var/log/mysqltest.sql +--system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "{echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --error 1 ---exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 ---system echo "while (0){" > var/log/mysqltest.sql ---system echo "echo hej;" >> var/log/mysqltest.sql +--system echo "while (0){" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --error 1 ---exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 # ---------------------------------------------------------------------------- # Test error messages returned from comments starting with a command @@ -832,38 +832,41 @@ select "a" as col1, "c" as col2; --exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect ---exec echo "let \$i=100;" > var/tmp/con.sql ---exec echo "while (\$i)" >> var/tmp/con.sql ---exec echo "{" >> var/tmp/con.sql ---exec echo " connect (test_con1,localhost,root,,); " >> var/tmp/con.sql ---exec echo " disconnect test_con1; " >> var/tmp/con.sql ---exec echo " dec \$i; " >> var/tmp/con.sql ---exec echo "}" >> var/tmp/con.sql ---exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "let \$i=100;" > $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "{" >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect, exceed max number of connections ---exec echo "let \$i=200;" > var/tmp/con.sql ---exec echo "while (\$i)" >> var/tmp/con.sql ---exec echo "{" >> var/tmp/con.sql ---exec echo " connect (test_con1,localhost,root,,); " >> var/tmp/con.sql ---exec echo " disconnect test_con1; " >> var/tmp/con.sql ---exec echo " dec \$i; " >> var/tmp/con.sql ---exec echo "}" >> var/tmp/con.sql +--exec echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "{" >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 # Select disconnected connection ---exec echo "connect (test_con1,localhost,root,,);" > var/tmp/con.sql ---exec echo "disconnect test_con1; " >> var/tmp/con.sql ---exec echo "connection test_con1;" >> var/tmp/con.sql +--exec echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "connection test_con1;" >> $MYSQLTEST_VARDIR/tmp/con.sql +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 # Connection name already used ---exec echo "connect (test_con1,localhost,root,,);" > var/tmp/con.sql ---exec echo "connect (test_con1,localhost,root,,);" >> var/tmp/con.sql +--exec echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/con.sql +--exec echo "connect (test_con1,localhost,root,,);" >> $MYSQLTEST_VARDIR/tmp/con.sql +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 @@ -954,43 +957,43 @@ select "this will be executed"; # Failing multi statement query # PS does not support multi statement ---exec echo "--disable_ps_protocol" > var/tmp/bug11731.sql ---exec echo "delimiter ||||;" >> var/tmp/bug11731.sql ---exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql ---exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql ---exec echo "select 'select-me';" >> var/tmp/bug11731.sql ---exec echo "insertz 'error query'||||" >> var/tmp/bug11731.sql ---exec echo "delimiter ;||||" >> var/tmp/bug11731.sql +--exec echo "--disable_ps_protocol" > $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "delimiter ||||;" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "create table t1 (a int primary key);" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "insert into t1 values (1);" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "select 'select-me';" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "insertz 'error query'||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --error 1 ---exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1 +--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1 drop table t1; --error 1 ---exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out +--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out # The .out file should be empty, cat will fail! --error 1 ---exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out +--exec cat $MYSQLTEST_VARDIR/tmp/bug11731.out drop table t1; # Using expected error # PS does not support multi statement ---exec echo "--disable_ps_protocol" > var/tmp/bug11731.sql ---exec echo "delimiter ||||;" >> var/tmp/bug11731.sql ---exec echo "--error 1064" >> var/tmp/bug11731.sql ---exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql ---exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql ---exec echo "select 'select-me';" >> var/tmp/bug11731.sql ---exec echo "insertz "error query"||||" >> var/tmp/bug11731.sql ---exec echo "delimiter ;||||" >> var/tmp/bug11731.sql +--exec echo "--disable_ps_protocol" > $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "delimiter ||||;" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "--error 1064" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "create table t1 (a int primary key);" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "insert into t1 values (1);" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "select 'select-me';" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "insertz "error query"||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql +--exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql # These two should work since the error is expected ---exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1 +--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1 drop table t1; ---exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out ---exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out +--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out +--exec cat $MYSQLTEST_VARDIR/tmp/bug11731.out drop table t1; diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test index 6bbb1c2f2f2..6eb039c2df2 100644 --- a/mysql-test/t/ndb_autodiscover.test +++ b/mysql-test/t/ndb_autodiscover.test @@ -24,7 +24,7 @@ create table t1( insert into t1 values(1, "Autodiscover"); flush tables; -system rm var/master-data/test/t1.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; select * from t1; show status like 'handler_discover%'; @@ -33,13 +33,13 @@ show status like 'handler_discover%'; # flush tables; -system rm var/master-data/test/t1.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; insert into t1 values (2, "Auto 2"); show status like 'handler_discover%'; insert into t1 values (3, "Discover 3"); show status like 'handler_discover%'; flush tables; -system rm var/master-data/test/t1.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; select * from t1 order by id; show status like 'handler_discover%'; @@ -48,7 +48,7 @@ show status like 'handler_discover%'; # flush tables; -system rm var/master-data/test/t1.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; update t1 set name="Autodiscover" where id = 2; show status like 'handler_discover%'; select * from t1 order by id; @@ -59,7 +59,7 @@ show status like 'handler_discover%'; # flush tables; -system rm var/master-data/test/t1.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; delete from t1 where id = 3; select * from t1 order by id; show status like 'handler_discover%'; @@ -85,7 +85,7 @@ show status like 'handler_discover%'; flush tables; # Modify the frm file on disk -system echo "blaj" >> var/master-data/test/t2.frm ; +system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; select * from t2; show status like 'handler_discover%'; @@ -111,7 +111,7 @@ show status like 'handler_discover%'; flush tables; # Remove the frm file from disk -system rm var/master-data/test/t3.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t3.frm ; --error 1050 create table t3( @@ -168,14 +168,14 @@ show status like 'handler_discover%'; # Remove the frm file from disk flush tables; -system rm var/master-data/test/t7.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm ; show tables from test; show status like 'handler_discover%'; # Remove the frm file from disk again flush tables; -system rm var/master-data/test/t7.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm ; --replace_column 7 # 8 # 9 # 12 # 13 # 15 # 18 # show table status; @@ -290,8 +290,8 @@ insert into t9 values (9); system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; # Remove t6, t7 from disk -system rm var/master-data/test/t6.frm > /dev/null ; -system rm var/master-data/test/t7.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; SHOW TABLES; @@ -332,8 +332,8 @@ insert into t9 values (9); system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; # Remove t6, t7 from disk -system rm var/master-data/test/t6.frm > /dev/null ; -system rm var/master-data/test/t7.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; SHOW TABLES LIKE 't6'; @@ -375,9 +375,9 @@ insert into t3 values (3, "ndb table 3"); insert into t4 values (4); # Remove t1, t2, t3 from disk -system rm var/master-data/test/t1.frm > /dev/null ; -system rm var/master-data/test/t2.frm > /dev/null ; -system rm var/master-data/test/t3.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t2.frm > /dev/null ; +system rm $MYSQLTEST_VARDIR/master-data/test/t3.frm > /dev/null ; flush tables; # Select from the table which only exists in NDB. @@ -530,7 +530,7 @@ CREATE TABLE t9 ( insert t9 values(1, 2), (2,3), (3, 4), (4, 5); #Don't drop the table, instead remove the frm file -system rm var/master-data/test/t9.frm ; +system rm $MYSQLTEST_VARDIR/master-data/test/t9.frm ; # Now leave test case, when ndb_autodiscover2 will run, this # MySQL Server will have been restarted because it has a diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 37e96d9d38d..d404a6fff9f 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -1,6 +1,7 @@ disable_query_log; -- source include/test_outfile.inc -eval set @tmpdir="$MYSQL_TEST_DIR/var/tmp"; +# Server are started in "var/master-data", so "../tmp" will be "var/tmp" +eval set @tmpdir="../tmp"; enable_query_log; -- source include/have_outfile.inc @@ -15,42 +16,43 @@ drop table if exists t1; create table t1 (`a` blob); insert into t1 values("hello world"),("Hello mars"),(NULL); disable_query_log; -eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1; +eval select * into outfile "../tmp/outfile-test.1" from t1; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.1")); disable_query_log; -eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1 limit 1; +eval select * into dumpfile "../tmp/outfile-test.2" from t1 limit 1; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.2")); disable_query_log; -eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1 where a is null; +eval select * into dumpfile "../tmp/outfile-test.3" from t1 where a is null; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.3")); # the following should give errors -#disabled as error message has variable path -#disable_query_log; -#--error 1086 -#eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1; -#--error 1086 -#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1; -#--error 1086 -#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1; -#enable_query_log; +disable_query_log; +--error 1086 +eval select * into outfile "../tmp/outfile-test.1" from t1; + +--error 1086 +eval select * into dumpfile "../tmp/outfile-test.2" from t1; + +--error 1086 +eval select * into dumpfile "../tmp/outfile-test.3" from t1; +enable_query_log; --error 13,2 select load_file(concat(@tmpdir,"/outfile-test.not-exist")); ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.1 ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.2 ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.3 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.1 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.2 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.3 drop table t1; # Bug#8191 disable_query_log; -eval select 1 into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.4"; +eval select 1 into outfile "../tmp/outfile-test.4"; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.4")); ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.4 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4 # # Bug #5382: 'explain select into outfile' crashes the server @@ -70,16 +72,16 @@ DROP TABLE t1; # Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails # disable_query_log; -eval SELECT * INTO OUTFILE "$MYSQL_TEST_DIR/var/tmp/outfile-test.4" +eval SELECT * INTO OUTFILE "../tmp/outfile-test.4" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM information_schema.schemata LIMIT 0, 5; # enable_query_log; ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.4 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4 use information_schema; # disable_query_log; -eval SELECT * INTO OUTFILE "$MYSQL_TEST_DIR/var/tmp/outfile-test.4" +eval SELECT * INTO OUTFILE "../tmp/outfile-test.4" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM schemata LIMIT 0, 5; enable_query_log; ---exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.4 +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4 diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index a9f171ff5b5..2dca45470cc 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -783,6 +783,7 @@ begin end// call p1()// drop procedure p1// +drop function f1// drop table t1// delimiter ;// diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 5e39e0b6a50..16e1d76d460 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -29,7 +29,7 @@ repair table t1 use_frm; create table t1 engine=myisam SELECT 1,"table 1"; flush tables; -system echo 1 > $MYSQL_TEST_DIR/var/master-data/test/t1.MYI ; +system echo 1 > $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; repair table t1; repair table t1 use_frm; drop table t1; diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 3d03823d474..4f7b2b23fa5 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -1,7 +1,7 @@ source include/master-slave.inc; create table t1 (word char(20) not null); -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1; select * from t1 limit 10; diff --git a/mysql-test/t/rpl000004.test b/mysql-test/t/rpl000004.test index f2a02bd4dd6..9c8c535c67d 100644 --- a/mysql-test/t/rpl000004.test +++ b/mysql-test/t/rpl000004.test @@ -2,9 +2,9 @@ source include/master-slave.inc; set SQL_LOG_BIN=0; create table t1 (word char(20) not null, index(word)); -load data infile '../../std_data/words.dat' into table t1; +load data infile '../std_data_ln/words.dat' into table t1; create table t2 (word char(20) not null); -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; create table t3 (word char(20) not null primary key); connection slave; load table t1 from master; diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl000009.test index 81e9860c186..161e01ad293 100644 --- a/mysql-test/t/rpl000009.test +++ b/mysql-test/t/rpl000009.test @@ -138,10 +138,10 @@ select * from mysqltest.t1; # DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX # insert into mysqltest.t1 values(10, 'should be there'); # flush tables; -# system chmod 500 var/slave-data/mysqltest/; +# system chmod 500 $MYSQLTEST_VARDIR/slave-data/mysqltest/; # --error 6 # load data from master; # should fail (errno 13) -# system chmod 700 var/slave-data/mysqltest/; +# system chmod 700 $MYSQLTEST_VARDIR/slave-data/mysqltest/; # select * from mysqltest.t1; # should contain the row (10, ...) diff --git a/mysql-test/t/rpl000015-slave.sh b/mysql-test/t/rpl000015-slave.sh index 62748605af1..7deeca3d2d6 100755 --- a/mysql-test/t/rpl000015-slave.sh +++ b/mysql-test/t/rpl000015-slave.sh @@ -1 +1 @@ -rm -f $MYSQL_TEST_DIR/var/slave-data/master.info +rm -f $MYSQLTEST_VARDIR/slave-data/master.info diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh index 4dbbaec31ce..17188aba0db 100755 --- a/mysql-test/t/rpl000017-slave.sh +++ b/mysql-test/t/rpl000017-slave.sh @@ -1,6 +1,6 @@ -rm -f $MYSQL_TEST_DIR/var/log/*relay* -rm -f $MYSQL_TEST_DIR/var/slave-data/relay-log.info -cat > $MYSQL_TEST_DIR/var/slave-data/master.info < $MYSQLTEST_VARDIR/slave-data/master.info <' ignore 1 lines; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); insert into t3 select * from t2; @@ -56,7 +56,7 @@ sync_with_master; insert into t1 values(1,10); connection master; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; @@ -80,7 +80,7 @@ connection master; set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; # The SQL slave thread should be stopped now. @@ -105,7 +105,7 @@ connection master; set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; # The SQL slave thread should be stopped now. @@ -125,7 +125,7 @@ reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; # no transactions --error 1062 -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; select * from t2; @@ -141,7 +141,7 @@ alter table t2 drop key day; connection master; delete from t2; --error 1062 -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; connection slave; diff --git a/mysql-test/t/rpl_loaddata_rule_m.test b/mysql-test/t/rpl_loaddata_rule_m.test index c956f2c7720..a44a49e2690 100644 --- a/mysql-test/t/rpl_loaddata_rule_m.test +++ b/mysql-test/t/rpl_loaddata_rule_m.test @@ -18,7 +18,7 @@ connection master; create database mysqltest; create table t1(a int, b int, unique(b)); use mysqltest; -load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; # Starting from 5.0.3 LOAD DATA is replicated much in the same way as ordinary # query so "show binlog ..." should show two events (before 5.0.3 no events # were returned). diff --git a/mysql-test/t/rpl_loaddata_rule_s.test b/mysql-test/t/rpl_loaddata_rule_s.test index 98fad3cc06f..fec56c358ba 100644 --- a/mysql-test/t/rpl_loaddata_rule_s.test +++ b/mysql-test/t/rpl_loaddata_rule_s.test @@ -9,7 +9,7 @@ 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; +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; # Test logging on slave; diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test index 0b54de8462e..af4fd0106bd 100644 --- a/mysql-test/t/rpl_loaddatalocal.test +++ b/mysql-test/t/rpl_loaddatalocal.test @@ -14,17 +14,18 @@ disable_query_log; set SQL_LOG_BIN=0; while ($1) { -#eval means expand $ expressions - eval insert into t1 values(1); + insert into t1 values(1); dec $1; } set SQL_LOG_BIN=1; enable_query_log; -select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; #This will generate a 20KB file, now test LOAD DATA LOCAL truncate table t1; -load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; -system rm ./var/master-data/rpl_loaddatalocal.select_outfile ; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +system rm $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile ; save_master_pos; connection slave; sync_with_master; @@ -45,11 +46,13 @@ sync_with_master; connection master; create table t1(a int); insert into t1 values (1), (2), (2), (3); -select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; drop table t1; create table t1(a int primary key); -load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; -system rm ./var/master-data/rpl_loaddatalocal.select_outfile ; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +system rm $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile ; select * from t1; save_master_pos; connection slave; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 1f71d2981c5..6e614991d36 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -33,7 +33,7 @@ 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 ignore 1 lines; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; select count(*) from t1; drop table t1; --replace_result $VERSION VERSION diff --git a/mysql-test/t/rpl_misc_functions-slave.sh b/mysql-test/t/rpl_misc_functions-slave.sh index c293715e16f..8ce79797822 100755 --- a/mysql-test/t/rpl_misc_functions-slave.sh +++ b/mysql-test/t/rpl_misc_functions-slave.sh @@ -1 +1 @@ -rm -f $MYSQL_TEST_DIR/var/master-data/test/rpl_misc_functions.outfile +rm -f $MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test index f20d0aa83e4..06fa75e2bb5 100644 --- a/mysql-test/t/rpl_misc_functions.test +++ b/mysql-test/t/rpl_misc_functions.test @@ -24,7 +24,8 @@ select * into outfile 'rpl_misc_functions.outfile' from t1; sync_slave_with_master; create table t2 like t1; # read the values from the master table -load data local infile './var/master-data/test/rpl_misc_functions.outfile' into table t2; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; # compare them with the replica; the SELECT below should return no row select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); stop slave; diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test index b8559af2394..ff246f85a2d 100644 --- a/mysql-test/t/rpl_replicate_do.test +++ b/mysql-test/t/rpl_replicate_do.test @@ -12,7 +12,7 @@ create table t2 (n int); insert into t2 values(4); connection master; create table t2 (s char(20)); -load data infile '../../std_data/words.dat' into table t2; +load data infile '../std_data_ln/words.dat' into table t2; insert into t2 values('five'); create table t1 (m int); insert into t1 values(15),(16),(17); diff --git a/mysql-test/t/rpl_rewrite_db.test b/mysql-test/t/rpl_rewrite_db.test index 1e8e5a992d8..6b8624aff39 100644 --- a/mysql-test/t/rpl_rewrite_db.test +++ b/mysql-test/t/rpl_rewrite_db.test @@ -31,8 +31,8 @@ create database rewrite; connection master; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; sync_slave_with_master; connection slave; @@ -40,7 +40,7 @@ select * from rewrite.t1; connection master; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); sync_slave_with_master; connection slave; @@ -49,7 +49,7 @@ select * from rewrite.t1; connection master; 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 ''''; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; sync_slave_with_master; connection slave; @@ -58,7 +58,7 @@ select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; connection master; drop table t1; create table t1 (a int, b char(10)); -load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; sync_slave_with_master; connection slave; @@ -66,7 +66,7 @@ select * from rewrite.t1; connection master; truncate table t1; -load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; sync_slave_with_master; connection slave; diff --git a/mysql-test/t/rpl_rotate_logs-slave.sh b/mysql-test/t/rpl_rotate_logs-slave.sh index 9259f593e54..81490a54b4b 100755 --- a/mysql-test/t/rpl_rotate_logs-slave.sh +++ b/mysql-test/t/rpl_rotate_logs-slave.sh @@ -1,2 +1,2 @@ -rm -f $MYSQL_TEST_DIR/var/slave-data/master.info -rm -f $MYSQL_TEST_DIR/var/slave-data/*relay* +rm -f $MYSQLTEST_VARDIR/slave-data/master.info +rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test index b125408d89e..77a8fb7d9a4 100644 --- a/mysql-test/t/rpl_rotate_logs.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -14,8 +14,8 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); drop table if exists t1, t2, t3, t4; --enable_warnings connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock); -system cat /dev/null > var/slave-data/master.info; -system chmod 000 var/slave-data/master.info; +system cat /dev/null > $MYSQLTEST_VARDIR/slave-data/master.info; +system chmod 000 $MYSQLTEST_VARDIR/slave-data/master.info; connection slave; --disable_warnings drop table if exists t1, t2, t3, t4; @@ -26,7 +26,7 @@ drop table if exists t1, t2, t3, t4; --replace_result $MYSQL_TEST_DIR TESTDIR --error 1105,1105,29 start slave; -system chmod 600 var/slave-data/master.info; +system chmod 600 $MYSQLTEST_VARDIR/slave-data/master.info; # It will fail again because the file is empty so the slave cannot get valuable # info about how to connect to the master from it (failure in # init_strvar_from_file() in init_master_info()). diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test index 2e9883141d8..0f35c9dc0b6 100644 --- a/mysql-test/t/rpl_timezone.test +++ b/mysql-test/t/rpl_timezone.test @@ -46,15 +46,15 @@ sync_slave_with_master; set time_zone='Europe/Moscow'; select * from t1; connection master; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 # Let us check with LOAD DATA INFILE # (we do it after mysqlbinlog because the temp files names are not constant) connection master; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone.dat' into table t1; +load data infile '../std_data_ln/rpl_timezone.dat' into table t1; select * from t1; sync_slave_with_master; set time_zone='UTC'; diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 4d418303e6d..52d262677ff 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -392,7 +392,7 @@ DROP TABLE t1; flush tables; # Create a junk frm file on disk -system echo "this is a junk file for test" >> var/master-data/test/t1.frm ; +system echo "this is a junk file for test" >> $MYSQLTEST_VARDIR/master-data/test/t1.frm ; --replace_column 6 # 7 # 8 # 9 # SHOW TABLE STATUS like 't1'; --error 1033 diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test index a2a66090866..ac74a1be9b0 100644 --- a/mysql-test/t/sp-destruct.test +++ b/mysql-test/t/sp-destruct.test @@ -11,9 +11,9 @@ --source include/not_windows.inc # Backup proc table ---system rm -rf var/master-data/mysql/backup ---system mkdir var/master-data/mysql/backup ---system cp var/master-data/mysql/proc.* var/master-data/mysql/backup/ +--system rm -rf $MYSQLTEST_VARDIR/master-data/mysql/backup +--system mkdir $MYSQLTEST_VARDIR/master-data/mysql/backup +--system cp $MYSQLTEST_VARDIR/master-data/mysql/proc.* $MYSQLTEST_VARDIR/master-data/mysql/backup/ use test; @@ -45,7 +45,7 @@ insert into t1 values (0); flush table mysql.proc; # Thrashing the .frm file ---system echo 'saljdlfa' > var/master-data/mysql/proc.frm +--system echo 'saljdlfa' > $MYSQLTEST_VARDIR/master-data/mysql/proc.frm --error ER_NOT_FORM_FILE call bug14233(); --error ER_NOT_FORM_FILE @@ -57,7 +57,7 @@ insert into t1 values (0); flush table mysql.proc; # Drop the mysql.proc table ---system rm var/master-data/mysql/proc.* +--system rm $MYSQLTEST_VARDIR/master-data/mysql/proc.* --error ER_NO_SUCH_TABLE call bug14233(); --error ER_NO_SUCH_TABLE @@ -66,8 +66,8 @@ create view v1 as select bug14233_f(); insert into t1 values (0); # Restore mysql.proc ---system mv var/master-data/mysql/backup/* var/master-data/mysql/ ---system rmdir var/master-data/mysql/backup +--system mv $MYSQLTEST_VARDIR/master-data/mysql/backup/* $MYSQLTEST_VARDIR/master-data/mysql/ +--system rmdir $MYSQLTEST_VARDIR/master-data/mysql/backup flush table mysql.proc; flush privileges; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index b7a7e83d569..76dc7cfc5a0 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -41,7 +41,7 @@ drop table t2; # disable_query_log; -eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" index directory="$MYSQL_TEST_DIR/var/run"; +eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run"; enable_query_log; insert into t9 select * from t1; @@ -50,7 +50,7 @@ optimize table t9; repair table t9; alter table t9 add column c int not null; ---replace_result $MYSQL_TEST_DIR TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t9; # Test renames @@ -65,7 +65,7 @@ drop table t1; # Note that we are using the above table t9 here! # ---replace_result $MYSQL_TEST_DIR TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SHOW CREATE TABLE t9; disable_query_log; @@ -84,11 +84,11 @@ create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, p # Should fail becasue the file t9.MYI already exist in 'run' --error 1,1,1105 -eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQL_TEST_DIR/var/run"; +eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run"; # Should fail becasue the file t9.MYD already exist in 'tmp' --error 1,1 -eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp"; +eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp"; enable_query_log; # Check moving table t9 from default database to mysqltest; @@ -96,7 +96,7 @@ enable_query_log; alter table t9 rename mysqltest.t9; select count(*) from mysqltest.t9; ---replace_result $MYSQL_TEST_DIR TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table mysqltest.t9; drop database mysqltest; @@ -106,18 +106,18 @@ drop database mysqltest; create table t1 (a int not null) engine=myisam; disable_query_log; -eval alter table t1 data directory="$MYSQL_TEST_DIR/var/tmp"; +eval alter table t1 data directory="$MYSQLTEST_VARDIR/tmp"; enable_query_log; ---replace_result $MYSQL_TEST_DIR TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; alter table t1 add b int; disable_query_log; -eval alter table t1 data directory="$MYSQL_TEST_DIR/var/log"; +eval alter table t1 data directory="$MYSQLTEST_VARDIR/log"; enable_query_log; ---replace_result $MYSQL_TEST_DIR TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; disable_query_log; -eval alter table t1 index directory="$MYSQL_TEST_DIR/var/log"; +eval alter table t1 index directory="$MYSQLTEST_VARDIR/log"; enable_query_log; show create table t1; drop table t1; @@ -127,12 +127,12 @@ drop table t1; # have been chosen. (Bug #8707) # disable_query_log; -eval create table t1 (i int) data directory = "$MYSQL_TEST_DIR/var/master-data/test/"; +eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/"; enable_query_log; show create table t1; drop table t1; disable_query_log; -eval create table t1 (i int) index directory = "$MYSQL_TEST_DIR/var/master-data/test/"; +eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/"; enable_query_log; show create table t1; drop table t1; diff --git a/mysql-test/t/temp_table-master.opt b/mysql-test/t/temp_table-master.opt index 026d3d4640c..5ac2ca8495b 100644 --- a/mysql-test/t/temp_table-master.opt +++ b/mysql-test/t/temp_table-master.opt @@ -1 +1 @@ ---tmpdir=$MYSQL_TEST_DIR/var//tmp +--tmpdir=$MYSQLTEST_VARDIR//tmp diff --git a/mysql-test/t/trigger-compat.test b/mysql-test/t/trigger-compat.test index ace18639172..4fd8cf68423 100644 --- a/mysql-test/t/trigger-compat.test +++ b/mysql-test/t/trigger-compat.test @@ -61,8 +61,8 @@ CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 --echo --echo ---> patching t1.TRG... ---exec grep --text -v 'definers=' $MYSQL_TEST_DIR/var/master-data/mysqltest_db1/t1.TRG > $MYSQL_TEST_DIR/var/tmp/t1.TRG ---exec mv $MYSQL_TEST_DIR/var/tmp/t1.TRG $MYSQL_TEST_DIR/var/master-data/mysqltest_db1/t1.TRG +--exec grep --text -v 'definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG +--exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG # # Create a new trigger. diff --git a/mysql-test/t/trigger-grant.test b/mysql-test/t/trigger-grant.test index c058816ee75..131e88a72c0 100644 --- a/mysql-test/t/trigger-grant.test +++ b/mysql-test/t/trigger-grant.test @@ -449,9 +449,9 @@ CREATE TRIGGER trg5 BEFORE DELETE ON t1 FOR EACH ROW SET @a = 5; ---exec egrep --text -v '^definers=' $MYSQL_TEST_DIR/var/master-data/mysqltest_db1/t1.TRG > $MYSQL_TEST_DIR/var/tmp/t1.TRG ---exec echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >> $MYSQL_TEST_DIR/var/tmp/t1.TRG ---exec mv $MYSQL_TEST_DIR/var/tmp/t1.TRG $MYSQL_TEST_DIR/var/master-data/mysqltest_db1/t1.TRG +--exec egrep --text -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG +--exec echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >> $MYSQLTEST_VARDIR/tmp/t1.TRG +--exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG --echo diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index d4fa5268762..581bc74e081 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -463,11 +463,11 @@ create trigger trg1 before insert on t1 for each row set new.k = new.i; create trigger trg2 after insert on t1 for each row set @b:= "Fired"; set @b:=""; # Test triggers with file with separators -load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, i); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, i); select *, @b from t1; set @b:=""; # Test triggers with fixed size row file -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); select *, @b from t1; # This also will drop triggers drop table t1; @@ -501,7 +501,7 @@ delete from t1 where i = 2; select * from t1; # Should fail and insert only 1 row --error 1054 -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); select * from t1; --error 1054 insert into t1 select 3, 3; @@ -561,7 +561,7 @@ select * from t1; delete from t1; select * from t1; --error 1054 -load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); select * from t1; --error 1054 insert into t1 select 3, 3; diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test index 1a3a93018a4..1e4d2697a1c 100644 --- a/mysql-test/t/type_varchar.test +++ b/mysql-test/t/type_varchar.test @@ -3,7 +3,7 @@ drop table if exists t1, t2; --enable_warnings create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text); -system cp std_data/vchar.frm var/master-data/test/; +system cp $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLTEST_VARDIR/master-data/test/; truncate table vchar; show create table t1; show create table vchar; diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test index 004154339b2..12a5e616fa2 100644 --- a/mysql-test/t/user_var-binlog.test +++ b/mysql-test/t/user_var-binlog.test @@ -15,7 +15,7 @@ show binlog events from 98; # absolutely need variables names to be quoted and strings to be # escaped). --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 6d2afb908a4..7bcb4f274c5 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1221,11 +1221,11 @@ drop table t1; create table t1 (a int, b char(10)); create view v1 as select * from t1 where a != 0 with check option; -- error 1369 -load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1; select * from v1; delete from t1; -load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../std_data_ln/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1; select * from v1; drop view v1; @@ -1234,11 +1234,11 @@ drop table t1; create table t1 (a text, b text); create view v1 as select * from t1 where a <> 'Field A' with check option; -- error 1369 -load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../std_data_ln/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; select concat('|',a,'|'), concat('|',b,'|') from v1; delete from t1; -load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../std_data_ln/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; select concat('|',a,'|'), concat('|',b,'|') from v1; drop view v1; diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index f6ae7cdaf30..71e847d1d8c 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -50,7 +50,7 @@ drop table t1; # create table t1(a tinyint, b int not null, c date, d char(5)); -load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ','; # PS doesn't work good with @@warning_count --disable_ps_protocol select @@warning_count; From 50cec50527285163da8f6113a43289d18da7fb62 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jan 2006 13:33:00 +0100 Subject: [PATCH 02/13] Merge mysql-test/t/mysqltest.test: Update after merge --- mysql-test/t/mysqltest.test | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 18ba13a0c16..31752eadfe5 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -368,10 +368,10 @@ select 3 from t1 ; # Missing delimiter until eof # The comment will be "sucked into" the sleep command since # delimiter is missing ---system echo "sleep 7" > var/tmp/mysqltest.sql ---system echo "# Another comment" >> var/tmp/mysqltest.sql +--system echo "sleep 7" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "# Another comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --error 1 ---exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1 +--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 # # Extra delimiter @@ -884,8 +884,7 @@ select "a" as col1, "c" as col2; --exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql --exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql --exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 ---exec echo "source var/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect, exceed max number of connections --exec echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/con.sql @@ -1004,26 +1003,26 @@ select "this will be executed"; # # Test zero length result file. Should not pass # ---exec touch $MYSQL_TEST_DIR/var/tmp/zero_length_file.result ---exec echo "echo ok;" > $MYSQL_TEST_DIR/var/tmp/query.sql +--exec touch $MYSQLTEST_VARDIR/tmp/zero_length_file.result +--exec echo "echo ok;" > $MYSQLTEST_VARDIR/tmp/query.sql --error 1 ---exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/zero_length_file.result 2>&1 +--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result 2>&1 # # Test that a test file that does not generate any output fails. # ---exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql +--exec echo "let \$i= 1;" > $MYSQLTEST_VARDIR/tmp/query.sql --error 1 ---exec $MYSQL_TEST -x var/tmp/query.sql 2>&1 +--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql 2>&1 # # Test that mysqltest fails when there are no queries executed # but a result file exist # NOTE! This will never happen as long as it's not allowed to have # test files that does not produce any output -#--exec echo "something" > $MYSQL_TEST_DIR/var/tmp/result_file.result -#--exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql +#--exec echo "something" > $MYSQLTEST_VARDIR/tmp/result_file.result +#--exec echo "let \$i= 1;" > $MYSQLTEST_VARDIR/tmp/query.sql #--error 1 -#--exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/result_file.result 2>&1 +#--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/result_file.result 2>&1 # # Bug #11731 mysqltest in multi-statement queries ignores errors in @@ -1045,13 +1044,9 @@ echo Failing multi statement query; drop table t1; --error 1 ---exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out -# The .out file should be empty, cat will fail! ---error 1 ---exec cat $MYSQLTEST_VARDIR/tmp/bug11731.out ---exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out 2>&1 +--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1 # The .out file should be non existent ---exec test ! -s $MYSQL_TEST_DIR/var/tmp/bug11731.out +--exec test ! -s $MYSQLTEST_VARDIR/tmp/bug11731.out drop table t1; From bb8d87bf2ac3c225ce9021fc7b787add14d74729 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jan 2006 15:51:02 +0100 Subject: [PATCH 03/13] Make mysql-test-run.sh compatible mysql-test/mysql-test-run.sh: Add a symlink from std_data to var/std_data_ln --- mysql-test/mysql-test-run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 1538fc42faf..0b7b4c6a379 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -590,7 +590,8 @@ fi [ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp [ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run [ -d $MYSQL_TEST_DIR/var/log ] || mkdir $MYSQL_TEST_DIR/var/log - +ln -s $MYSQL_TEST_DIR/std_data $MYSQL_TEST_DIR/var/std_data_ln + if test ${COLUMNS:-0} -lt 80 ; then COLUMNS=80 ; fi E=`$EXPR $COLUMNS - 8` DASH72=`$ECHO '-------------------------------------------------------'|$CUT -c 1-$E` From 484f56967ae467abfd639f83b38c3842279fc09c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jan 2006 12:35:36 +0100 Subject: [PATCH 04/13] Update 5.1 to use MYSQLTEST_VARDIR mysql-test/extra/rpl_tests/rpl_loaddata.test: Update to use std_data_ln mysql-test/mysql-test-run.pl: Add back variable path_mysqltest_log mysql-test/r/rpl_loaddata.result: Binlog offset changed when using std_data_ln instead of std_data mysql-test/r/rpl_stm_log.result: Binlog offset changed when using std_data_ln instead of std_data --- mysql-test/extra/rpl_tests/rpl_loaddata.test | 14 +++++++------- mysql-test/mysql-test-run.pl | 2 +- mysql-test/r/rpl_loaddata.result | 2 +- mysql-test/r/rpl_stm_log.result | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 0da3a8b8011..5d7c69bd959 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -21,10 +21,10 @@ 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; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); insert into t3 select * from t2; @@ -59,7 +59,7 @@ sync_with_master; insert into t1 values(1,10); connection master; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; @@ -83,7 +83,7 @@ connection master; set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; # The SQL slave thread should be stopped now. @@ -108,7 +108,7 @@ connection master; set sql_log_bin=0; delete from t1; set sql_log_bin=1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; # The SQL slave thread should be stopped now. @@ -128,7 +128,7 @@ reset master; eval create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=$engine_type; # no transactions --error 1062 -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; select * from t2; @@ -144,7 +144,7 @@ alter table t2 drop key day; connection master; delete from t2; --error 1062 -load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; connection slave; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 28fe740b539..013fac40425 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -157,7 +157,7 @@ our $path_client_bindir; our $path_language; our $path_timefile; our $path_manager_log; # Used by mysqldadmin -our $path_slave_load_tmpdir; # What is this?! +our $path_mysqltest_log; our $path_my_basedir; our $opt_vardir; # A path but set directly on cmd line our $opt_tmpdir; # A path but set directly on cmd line diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index d04aa39c46a..03c370d2dd7 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -22,7 +22,7 @@ day id category name 2003-03-22 2416 a bbbbb show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1290 +slave-bin.000001 1276 drop table t1; drop table t2; drop table t3; diff --git a/mysql-test/r/rpl_stm_log.result b/mysql-test/r/rpl_stm_log.result index 997d1e49acb..82d50ff2810 100644 --- a/mysql-test/r/rpl_stm_log.result +++ b/mysql-test/r/rpl_stm_log.result @@ -74,7 +74,7 @@ master-bin.000002 514 start slave; show binary logs; Log_name File_size -slave-bin.000001 1563 +slave-bin.000001 1556 slave-bin.000002 352 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info From 615e35fb7f543e3547c8f7cc20acc748d09413b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jan 2006 12:38:01 +0100 Subject: [PATCH 05/13] Merge --- mysql-test/t/mysqltest.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index ee4b156aa16..5a315c09ddb 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -839,7 +839,7 @@ select "a" as col1, "c" as col2; --exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql --exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql --exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect, exceed max number of connections --exec echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/con.sql From 313ea47da4c20a89a5d1178ae4bec913126ad38f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jan 2006 17:54:34 +0100 Subject: [PATCH 06/13] Add new option "check-testcases" to mysql-test-run.pl Cleanup the sideeffects from most of the testcases with sideeffects. mysql-test/mysql-test-run.pl: Add option "check-testcases" to mysql-test-run.pl Will execute "include/check-testcase.test" once before each tescase and record the output into "var/tmp/check-testcase.result" After the teastcase it will run again and this time compare the output with previously recorded file. mysql-test/r/analyze.result: Drop table t1 at end of test mysql-test/r/create_select_tmp.result: Drop table t1 at end of test mysql-test/r/ctype_cp932.result: Drop table t1 at end of test mysql-test/r/ctype_recoding.result: Drop table t1 at end of test mysql-test/r/grant2.result: Drop user mysqltest_2 and mysqltest_A@'%' mysql-test/r/join_outer.result: Drop view v1 to cleanup mysql-test/r/ps_1general.result: Drop table t1 at end of test mysql-test/r/query_cache.result: Drop function "f1" mysql-test/r/read_only.result: Reset the "read_only" flag mysql-test/r/rpl000001.result: Remove user "blafasel2" mysql-test/r/rpl000017.result: Remove user "replicate" mysql-test/r/rpl_failed_optimize.result: Drop table t1 to cleanup mysql-test/r/rpl_flush_tables.result: Drop tables t3, t4, t5 mysql-test/r/rpl_ignore_revoke.result: Delete user "user_foo" mysql-test/r/rpl_insert_id.result: Drop table t1 to cleanup mysql-test/r/rpl_loaddata.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_m.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_s.result: Drop tyable t1 to cleanup mysql-test/r/rpl_misc_functions.result: Drop tyable t1 to cleanup mysql-test/r/rpl_multi_update3.result: Drop tyable t1 and t2 to cleanup mysql-test/r/rpl_replicate_do.result: Drop tyable t1 to cleanup mysql-test/r/rpl_skip_error.result: Drop tyable t1 to cleanup mysql-test/r/rpl_slave_status.result: Drop tyable t1 to cleanup mysql-test/r/sp-prelocking.result: Drop view v1 and tables t1, t2, t3 and t4 to cleanup mysql-test/r/sp-security.result: Delete users to cleanup Delete remaining traces in tables_priv and procs_priv mysql-test/r/subselect_innodb.result: Drop procedure p1 to cleanup mysql-test/r/trigger-compat.result: Drop trigger wl2818_trg1 and wl2818_trg2. Drop table t1, t2 Drop database mysqltest_db1 And the users "mysqltest_dfn@localhost" and "mysqltest_inv@localhost" mysql-test/r/type_bit.result: Drop tables t1 and t2 to cleanup mysql-test/r/variables.result: Set GLOBAL max_join_size to 10 as it originally was in variables-master.opt mysql-test/r/view_grant.result: Dop user "test@localhost" to cleanup mysql-test/t/analyze.test: Drop table t1 to cleanup mysql-test/t/create_select_tmp.test: Drop table t1 to cleanup mysql-test/t/ctype_cp932.test: Drop table t1 to cleanup mysql-test/t/ctype_recoding.test: Drop table t1 to cleanup mysql-test/t/fulltext_var.test: Restore the original ft_boolean_syntax mysql-test/t/grant2.test: Drop users "mysqltest_2" and "mysqltest_A@'%'" to cleanup mysql-test/t/innodb_cache.test: Reset query_cache_size to original value mysql-test/t/join_outer.test: Drop view v1 to cleanup mysql-test/t/ps_1general.test: Drop table t1 to cleanup mysql-test/t/query_cache.test: Drop function "f1" to cleanup mysql-test/t/read_only.test: Reset the readonly flag mysql-test/t/rpl000001.test: Delete user "blafasel2" to cleanup mysql-test/t/rpl000017.test: Delete user "replicate" to cleanup mysql-test/t/rpl_failed_optimize.test: Drop table t1 to cleanup mysql-test/t/rpl_flush_tables.test: Droip table t3, t4 and t5 to cleanup mysql-test/t/rpl_ignore_revoke.test: Delet user "user_foo" to cleanup mysql-test/t/rpl_insert_id.test: drop table t1 to cleanup mysql-test/t/rpl_loaddata.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_m.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_s.test: Drop table t1 to cleanup mysql-test/t/rpl_misc_functions.test: Drop table t1 to cleanup mysql-test/t/rpl_multi_update3.test: Drop table t1 and t2 to cleanup mysql-test/t/rpl_replicate_do.test: Drop table t1 to cleanup mysql-test/t/rpl_skip_error.test: Drop table t1 to cleanup mysql-test/t/rpl_slave_status.test: Drop table t1 to cleanup mysql-test/t/sp-prelocking.test: Drop table t1, t2 t3 and t4 to cleanup Drop view v1 mysql-test/t/sp-security.test: Delete test users from mysql.user, mysql.db, mysql.procs_priv and mysql.tables_priv Drop table t1 to cleanup mysql-test/t/subselect_innodb.test: Drop procedure p1 to cleanup mysql-test/t/trigger-compat.test: Drop trigger wl2818_trg1 and wl2818_trg2 to cleanup Drop table t1, t2 Drop users drop database mysqltest_db1 mysql-test/t/type_bit.test: drop table t1 and t2 to cleanup mysql-test/t/variables-master.opt: Increase max_join_size to 100. mysql-test/t/variables.test: Set max_join_size to 10, which was the original value in variables-master.opt mysql-test/t/view_grant.test: Drop the user "test@localhost" mysql-test/include/check-testcase.test: New BitKeeper file ``mysql-test/include/check-testcase.test'' --- mysql-test/include/check-testcase.test | 51 ++++++++++++++++++++ mysql-test/mysql-test-run.pl | 64 ++++++++++++++++++++++++- mysql-test/r/analyze.result | 1 + mysql-test/r/create_select_tmp.result | 1 + mysql-test/r/ctype_cp932.result | 1 + mysql-test/r/ctype_recoding.result | 1 + mysql-test/r/grant2.result | 2 + mysql-test/r/join_outer.result | 1 + mysql-test/r/ps_1general.result | 2 +- mysql-test/r/query_cache.result | 1 + mysql-test/r/read_only.result | 1 + mysql-test/r/rpl000001.result | 1 + mysql-test/r/rpl000017.result | 1 + mysql-test/r/rpl_failed_optimize.result | 1 + mysql-test/r/rpl_flush_tables.result | 1 + mysql-test/r/rpl_ignore_revoke.result | 1 + mysql-test/r/rpl_insert_id.result | 1 + mysql-test/r/rpl_loaddata.result | 1 + mysql-test/r/rpl_loaddata_rule_m.result | 2 + mysql-test/r/rpl_loaddata_rule_s.result | 1 + mysql-test/r/rpl_misc_functions.result | 2 + mysql-test/r/rpl_multi_update3.result | 1 + mysql-test/r/rpl_replicate_do.result | 1 + mysql-test/r/rpl_skip_error.result | 1 + mysql-test/r/rpl_slave_status.result | 1 + mysql-test/r/sp-prelocking.result | 3 +- mysql-test/r/sp-security.result | 7 +++ mysql-test/r/subselect_innodb.result | 1 + mysql-test/r/trigger-compat.result | 10 ++++ mysql-test/r/type_bit.result | 1 + mysql-test/r/variables.result | 1 + mysql-test/r/view_grant.result | 1 + mysql-test/t/analyze.test | 1 + mysql-test/t/create_select_tmp.test | 1 + mysql-test/t/ctype_cp932.test | 1 + mysql-test/t/ctype_recoding.test | 2 +- mysql-test/t/fulltext_var.test | 8 ++++ mysql-test/t/grant2.test | 2 + mysql-test/t/innodb_cache.test | 4 ++ mysql-test/t/join_outer.test | 1 + mysql-test/t/ps_1general.test | 2 +- mysql-test/t/query_cache.test | 1 + mysql-test/t/read_only.test | 2 + mysql-test/t/rpl000001.test | 1 + mysql-test/t/rpl000017.test | 1 + mysql-test/t/rpl_failed_optimize.test | 3 ++ mysql-test/t/rpl_flush_tables.test | 3 ++ mysql-test/t/rpl_ignore_revoke.test | 4 ++ mysql-test/t/rpl_insert_id.test | 3 ++ mysql-test/t/rpl_loaddata.test | 3 +- mysql-test/t/rpl_loaddata_rule_m.test | 3 ++ mysql-test/t/rpl_loaddata_rule_s.test | 3 ++ mysql-test/t/rpl_misc_functions.test | 4 ++ mysql-test/t/rpl_multi_update3.test | 3 ++ mysql-test/t/rpl_replicate_do.test | 4 ++ mysql-test/t/rpl_skip_error.test | 3 ++ mysql-test/t/rpl_slave_status.test | 4 ++ mysql-test/t/sp-prelocking.test | 3 +- mysql-test/t/sp-security.test | 10 +++- mysql-test/t/subselect_innodb.test | 1 + mysql-test/t/trigger-compat.test | 13 +++++ mysql-test/t/type_bit.test | 1 + mysql-test/t/variables-master.opt | 2 +- mysql-test/t/variables.test | 2 +- mysql-test/t/view_grant.test | 2 + 65 files changed, 256 insertions(+), 11 deletions(-) create mode 100644 mysql-test/include/check-testcase.test diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test new file mode 100644 index 00000000000..30cb7391f30 --- /dev/null +++ b/mysql-test/include/check-testcase.test @@ -0,0 +1,51 @@ +# +# This test is executed twice for each test case if mysql-test-run is passed +# the flag --check-testcase. +# Before every testcase it's run with mysqltest in record mode and will +# thus produce an output file +# that can be compared to output from after the tescase. +# In that way it's possible to check that a testcase does not have +# any unwanted side affects. +# + +# +# Dump all global variables +# +show global variables; + +# +# Dump all databases +# +show databases; + +# +# Dump the "test" database, all it's tables and their data +# +--exec $MYSQL_DUMP --skip-comments test + +# +# Dump the "mysql" database and it's tables +# Select data separately to add "order by" +# +--exec $MYSQL_DUMP --skip-comments --no-data mysql +use mysql; +select * from columns_priv; +select * from db order by host, db, user; +select * from func; +select * from help_category; +select * from help_keyword; +select * from help_relation; +select * from help_relation; +select * from host; +select * from proc; +select * from procs_priv; +select * from tables_priv; +select * from time_zone; +select * from time_zone_leap_second; +select * from time_zone_name; +select * from time_zone_transition; +select * from time_zone_transition_type; +select * from user; + + + diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fdee6d96d3a..2d553eb82d2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -239,6 +239,7 @@ our $opt_manager_port; # Does nothing now, we never use manager our $opt_old_master; our $opt_record; +our $opt_check_testcases; our $opt_result_ext; @@ -545,6 +546,7 @@ sub command_line_setup () { # Test case authoring 'record' => \$opt_record, + 'check-testcases' => \$opt_check_testcases, # ??? 'mysqld=s' => \@opt_extra_mysqld_opt, @@ -2497,6 +2499,54 @@ sub im_stop($) { $instance_manager->{'pid'} = undef; } +# +# Run include/check-testcase.test +# Before a testcase, run in record mode, save result file to var +# After testcase, run and compare with the recorded file, they should be equal! +# +sub run_check_testcase ($) { + + my $mode= shift; + + my $args; + mtr_init_args(\$args); + + mtr_add_arg($args, "--no-defaults"); + mtr_add_arg($args, "--silent"); + mtr_add_arg($args, "-v"); + mtr_add_arg($args, "--skip-safemalloc"); + mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir); + + mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'}); + mtr_add_arg($args, "--port=%d", $master->[0]->{'path_myport'}); + mtr_add_arg($args, "--database=test"); + mtr_add_arg($args, "--user=%s", $opt_user); + mtr_add_arg($args, "--password="); + + mtr_add_arg($args, "-R"); + mtr_add_arg($args, "$opt_vardir/tmp/check-testcase.result"); + + if ( $mode eq "before" ) + { + mtr_add_arg($args, "--record"); + } + + my $res = mtr_run_test($exe_mysqltest,$args, + "include/check-testcase.test", "", "", ""); + + if ( $res == 1 and $mode = "after") + { + mtr_run("diff",["-u", + "$opt_vardir/tmp/check-testcase.result", + "$opt_vardir/tmp/check-testcase.reject"], + "", "", "", ""); + } + elsif ( $res ) + { + mtr_error("Could not execute 'check-testcase' $mode testcase"); + } +} + sub run_mysqltest ($) { my $tinfo= shift; @@ -2726,7 +2776,18 @@ sub run_mysqltest ($) { mtr_add_arg($args, "--record"); } - return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,""); + if ( $opt_check_testcases ) + { + run_check_testcase("before"); + } + + my $res = mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,""); + + if ( $opt_check_testcases ) + { + run_check_testcase("after"); + } + return $res; } @@ -2808,6 +2869,7 @@ Options that specify ports Options for test case authoring record TESTNAME (Re)genereate the result file for TESTNAME + check-testcases Check testcases for sideeffects Options that pass on options diff --git a/mysql-test/r/analyze.result b/mysql-test/r/analyze.result index 17686d597a4..65c6955a959 100644 --- a/mysql-test/r/analyze.result +++ b/mysql-test/r/analyze.result @@ -46,3 +46,4 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_ execute stmt1; Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype deallocate prepare stmt1; +drop table t1; diff --git a/mysql-test/r/create_select_tmp.result b/mysql-test/r/create_select_tmp.result index b99bf3e3591..668547bcff9 100644 --- a/mysql-test/r/create_select_tmp.result +++ b/mysql-test/r/create_select_tmp.result @@ -17,3 +17,4 @@ CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist +drop table t1; diff --git a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result index 1afceb86381..61540cb8467 100755 --- a/mysql-test/r/ctype_cp932.result +++ b/mysql-test/r/ctype_cp932.result @@ -11366,3 +11366,4 @@ col1 a a a +drop table t1; diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 1b92da2a7a3..996f6fa8645 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -247,3 +247,4 @@ lpad(c1,3,' select rpad(c1,3,'ö'), rpad('ö',3,c1) from t1; rpad(c1,3,'ö') rpad('ö',3,c1) ßöö ößß +drop table t1; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 246aaa3a93e..e38953b6446 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -238,6 +238,7 @@ ERROR HY000: Operation DROP USER failed for 'mysqltest_2b'@'%' create user 'mysqltest_2' identified by 'Mysqltest-2'; drop user 'mysqltest_2' identified by 'Mysqltest-2'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Mysqltest-2'' at line 1 +drop user 'mysqltest_2'; create user '%@b'@'b'; show grants for '%@b'@'b'; Grants for %@b@b @@ -279,6 +280,7 @@ Warning 1364 Field 'x509_subject' doesn't have a default value create user mysqltest_A@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%'; drop user mysqltest_C@'%'; +drop user mysqltest_A@'%'; drop user mysqltest_3@localhost; set @@sql_mode=''; create database mysqltest_1; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 92b352aa608..bd725d9ac84 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -992,6 +992,7 @@ SELECT * FROM v1 WHERE EMPNUM < 10; EMPNUM NAME GRP 0 KERI 10 9 BARRY NULL +DROP VIEW v1; DROP TABLE t1,t2; CREATE TABLE t1 (c11 int); CREATE TABLE t2 (c21 int); diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index aba3da02c4c..8e22c5daa8e 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -797,4 +797,4 @@ prepare stmt1 from @string ; execute stmt1 ; prepare stmt1 from ' select * from t5 ' ; execute stmt1 ; -drop table t5, t9; +drop table t1, t5, t9; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 405669e95f8..5a7c387a650 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1074,6 +1074,7 @@ a f1() 1 2 2 2 drop procedure p1// +drop function f1// drop table t1// flush query cache; reset query cache; diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 55a14bcaec8..1a1991a6255 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -41,3 +41,4 @@ insert into t1 values(1); ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement drop table t1,t2; drop user test@localhost; +set global read_only=0; diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result index de9f6f16b2a..3017a2b76ce 100644 --- a/mysql-test/r/rpl000001.result +++ b/mysql-test/r/rpl000001.result @@ -79,3 +79,4 @@ select select_priv,user from mysql.user where user = _binary'blafasel2'; select_priv user Y blafasel2 drop table t1; +delete from mysql.user where user="blafasel2"; diff --git a/mysql-test/r/rpl000017.result b/mysql-test/r/rpl000017.result index 64e13042e9c..7a283699370 100644 --- a/mysql-test/r/rpl000017.result +++ b/mysql-test/r/rpl000017.result @@ -9,3 +9,4 @@ select * from t1; n 24 drop table t1; +delete from mysql.user where user="replicate"; diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index fd711f89222..c2c07dc6343 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -18,3 +18,4 @@ Table Op Msg_type Msg_text test.non_existing optimize error Table 'test.non_existing' doesn't exist Warnings: Error 1146 Table 'test.non_existing' doesn't exist +drop table t1; diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index 667530c4071..7d0bc54ae31 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -44,3 +44,4 @@ flush tables with read lock; start slave; stop slave; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +drop table t3, t4, t5; diff --git a/mysql-test/r/rpl_ignore_revoke.result b/mysql-test/r/rpl_ignore_revoke.result index 094b571f4f4..42625119f28 100644 --- a/mysql-test/r/rpl_ignore_revoke.result +++ b/mysql-test/r/rpl_ignore_revoke.result @@ -26,3 +26,4 @@ select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; select_priv Y revoke select on *.* FROM 'user_foo'; +delete from mysql.user where user="user_foo"; diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result index 8482f631553..d7b6946f7e5 100644 --- a/mysql-test/r/rpl_insert_id.result +++ b/mysql-test/r/rpl_insert_id.result @@ -73,3 +73,4 @@ CREATE TABLE t1 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); ERROR 23000: Duplicate entry '1' for key 1 +drop table t1; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index dc11d10fab8..b8190bc0c5b 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -79,3 +79,4 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by ERROR 23000: Duplicate entry '2003-03-22' for key 1 drop table t2; drop table t2; +drop table t1; diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index 3571c9973ea..dd68df4fd64 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -17,3 +17,5 @@ master-bin.000001 # Query 1 # create database mysqltest master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=12 master-bin.000001 # Execute_load_query 1 # use `mysqltest`; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1 ;file_id=1 drop database mysqltest; +use test; +drop table t1; diff --git a/mysql-test/r/rpl_loaddata_rule_s.result b/mysql-test/r/rpl_loaddata_rule_s.result index 16720c81374..b0a5c07d24b 100644 --- a/mysql-test/r/rpl_loaddata_rule_s.result +++ b/mysql-test/r/rpl_loaddata_rule_s.result @@ -12,3 +12,4 @@ count(*) 2 show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info +drop table t1; diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result index a687063706d..864b9660bf7 100644 --- a/mysql-test/r/rpl_misc_functions.result +++ b/mysql-test/r/rpl_misc_functions.result @@ -19,3 +19,5 @@ load data local infile './var/master-data/test/rpl_misc_functions.outfile' into select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); id i r1 r2 p id i r1 r2 p stop slave; +drop table t1; +drop table t1; diff --git a/mysql-test/r/rpl_multi_update3.result b/mysql-test/r/rpl_multi_update3.result index b81af7c6e39..bf454c7bb48 100644 --- a/mysql-test/r/rpl_multi_update3.result +++ b/mysql-test/r/rpl_multi_update3.result @@ -194,3 +194,4 @@ idpro price nbprice 1 1.0000 3 2 1.0000 2 3 2.0000 1 +drop table t1, t2; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index d8666080a71..1991567d23d 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -40,3 +40,4 @@ set one_shot time_zone='met'; select * from t1; ts 2005-08-12 00:00:00 +drop table t1; diff --git a/mysql-test/r/rpl_skip_error.result b/mysql-test/r/rpl_skip_error.result index e52426c381c..adc61f8c2c8 100644 --- a/mysql-test/r/rpl_skip_error.result +++ b/mysql-test/r/rpl_skip_error.result @@ -13,3 +13,4 @@ n 1 2 3 +drop table t1; diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result index 2146132aeb0..9a4ec4131b0 100644 --- a/mysql-test/r/rpl_slave_status.result +++ b/mysql-test/r/rpl_slave_status.result @@ -52,3 +52,4 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master NULL +drop table t1; diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result index 32d6d4e6264..c2614892016 100644 --- a/mysql-test/r/sp-prelocking.result +++ b/mysql-test/r/sp-prelocking.result @@ -208,7 +208,8 @@ select f3() // f3() 1 call sp1() // -drop table t1,t2,t3; +drop view v1; +drop table t1,t2,t3,t4; drop function f1; drop function f2; drop function f3; diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 614e670f25d..82fef25e906 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -134,7 +134,11 @@ drop database db2; select type,db,name from mysql.proc; type db name delete from mysql.user where user='user1' or user='user2'; +delete from mysql.user where user='' and host='%'; delete from mysql.procs_priv where user='user1' or user='user2'; +delete from mysql.procs_priv where user='' and host='%'; +delete from mysql.db where user='user2'; +flush privileges; grant usage on *.* to usera@localhost; grant usage on *.* to userb@localhost; grant usage on *.* to userc@localhost; @@ -195,6 +199,9 @@ use test; drop database sptest; delete from mysql.user where user='usera' or user='userb' or user='userc'; delete from mysql.procs_priv where user='usera' or user='userb' or user='userc'; +delete from mysql.tables_priv where user='usera'; +flush privileges; +drop table t1; drop function if exists bug_9503; create database mysqltest// use mysqltest// diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index 4dec7882d58..6c6d563e284 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -243,4 +243,5 @@ x NULL x NULL +drop procedure p1; drop tables t1,t2,t3; diff --git a/mysql-test/r/trigger-compat.result b/mysql-test/r/trigger-compat.result index 5c104a2d2d5..5a203561662 100644 --- a/mysql-test/r/trigger-compat.result +++ b/mysql-test/r/trigger-compat.result @@ -38,3 +38,13 @@ NULL mysqltest_db1 wl2818_trg1 INSERT NULL mysqltest_db1 t1 0 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW BEFORE NULL NULL OLD NEW NULL NULL mysqltest_db1 wl2818_trg2 INSERT NULL mysqltest_db1 t1 0 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW AFTER NULL NULL OLD NEW NULL mysqltest_dfn@localhost +DROP TRIGGER wl2818_trg1; +Warnings: +Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'wl2818_trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. +DROP TRIGGER wl2818_trg2; +use mysqltest_db1; +DROP TABLE t1; +DROP TABLE t2; +DROP USER mysqltest_dfn@localhost; +DROP USER mysqltest_inv@localhost; +DROP DATABASE mysqltest_db1; diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 0213dbaffde..c6f204e8452 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -563,3 +563,4 @@ b1+0 sum(b1) sum(b2) 0 0 0 1 4 4 2 2 2 +drop table t1, t2; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index df180218a09..0d4c1386148 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -71,6 +71,7 @@ c_id c_name c_country 1 Bozo USA 4 Mr. Floppy GB drop table t1; +set GLOBAL max_join_size=10; set max_join_size=100; show variables like 'max_join_size'; Variable_name Value diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index e2ee02351d7..259106c4e9f 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -7,6 +7,7 @@ revoke create view on test.* from test@localhost; show grants for test@localhost; Grants for test@localhost GRANT USAGE ON *.* TO 'test'@'localhost' +drop user test@localhost; create database mysqltest; create table mysqltest.t1 (a int, b int); create table mysqltest.t2 (a int, b int); diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test index 656ff752c9b..a8fd0a4283e 100644 --- a/mysql-test/t/analyze.test +++ b/mysql-test/t/analyze.test @@ -61,5 +61,6 @@ prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()"; execute stmt1; execute stmt1; deallocate prepare stmt1; +drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test index 1661a115f72..c527548e282 100644 --- a/mysql-test/t/create_select_tmp.test +++ b/mysql-test/t/create_select_tmp.test @@ -27,5 +27,6 @@ select * from t2; CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146 select * from t2; +drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test index 082786e38af..0c70e264891 100644 --- a/mysql-test/t/ctype_cp932.test +++ b/mysql-test/t/ctype_cp932.test @@ -434,3 +434,4 @@ insert into t1 values ('ab'); select * from t1; insert into t1 values ('abc'); select * from t1; +drop table t1; diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index 5648cea7fd3..2d6b55600b1 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -186,5 +186,5 @@ select rpad(c1,3,' # TODO #select case c1 when 'ß' then 'ß' when 'ö' then 'ö' else 'c' end from t1; #select export_set(5,c1,'ö'), export_set(5,'ö',c1) from t1; - +drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/fulltext_var.test b/mysql-test/t/fulltext_var.test index 6b0b8aa463b..a048dab7f40 100644 --- a/mysql-test/t/fulltext_var.test +++ b/mysql-test/t/fulltext_var.test @@ -5,6 +5,9 @@ drop table if exists t1; --enable_warnings +# Save ft_boolean_syntax variable +let $saved_ft_boolean_syntax=`select @@global.ft_boolean_syntax`; + show variables like "ft\_%"; create table t1 (b text not null); @@ -25,4 +28,9 @@ set global ft_boolean_syntax='@ -><()~*:""@|'; set global ft_boolean_syntax='+ -><()~*:""@!|'; drop table t1; +# Restore ft_boolean_syntax variable +--disable_query_log +eval set global ft_boolean_syntax='$saved_ft_boolean_syntax'; +--enable_query_log + # End of 4.1 tests diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index c19bb1482d6..430a3a5dd4a 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -286,6 +286,7 @@ drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b'; create user 'mysqltest_2' identified by 'Mysqltest-2'; --error 1064 drop user 'mysqltest_2' identified by 'Mysqltest-2'; +drop user 'mysqltest_2'; # # Strange user names create user '%@b'@'b'; @@ -325,6 +326,7 @@ insert into mysql.user set host='%', user='mysqltest_B'; create user mysqltest_A@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%'; drop user mysqltest_C@'%'; +drop user mysqltest_A@'%'; disconnect user4; connection default; drop user mysqltest_3@localhost; diff --git a/mysql-test/t/innodb_cache.test b/mysql-test/t/innodb_cache.test index a811d660bd7..8ed2853e4f7 100644 --- a/mysql-test/t/innodb_cache.test +++ b/mysql-test/t/innodb_cache.test @@ -63,6 +63,7 @@ drop table t1; # # one statement roll back inside transation # +let $save_query_cache_size=`select @@global.query_cache_size`; set GLOBAL query_cache_size=1355776; CREATE TABLE t1 ( id int(10) NOT NULL auto_increment, a varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY a (a)) ENGINE=innodb; CREATE TABLE t2 ( id int(10) NOT NULL auto_increment, b varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY b (b)) ENGINE=innodb; @@ -79,5 +80,8 @@ insert into t3 VALUES ( NULL, 1, 1, 2 ); commit; select t1.* from t1, t2, t3 where t3.state & 1 = 0 and t3.t1_id = t1.id and t3.t2_id = t2.id and t1.id = 1 order by t1.a asc; drop table t3,t2,t1; +--disable_query_log +eval set GLOBAL query_cache_size=$save_query_cache_size; +--enable_query_log # End of 4.1 tests diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 367b98f2485..03ad56ed2b6 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -700,6 +700,7 @@ SELECT COALESCE(t2.EMPNUM,t1.EMPNUM) AS EMPNUM, NAME, GRP SELECT * FROM v1; SELECT * FROM v1 WHERE EMPNUM < 10; +DROP VIEW v1; DROP TABLE t1,t2; # diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index 6abfd8f28a7..89fad3fa4fb 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -831,7 +831,7 @@ execute stmt1 ; --disable_metadata --horizontal_results -drop table t5, t9; +drop table t1, t5, t9; ##### RULES OF THUMB TO PRESERVE THE SYSTEMATICS OF THE PS TEST CASES ##### # diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index a9f171ff5b5..2dca45470cc 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -783,6 +783,7 @@ begin end// call p1()// drop procedure p1// +drop function f1// drop table t1// delimiter ;// diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test index 0861951a6a1..b9008ac34a3 100644 --- a/mysql-test/t/read_only.test +++ b/mysql-test/t/read_only.test @@ -101,3 +101,5 @@ insert into t1 values(1); connection default; drop table t1,t2; drop user test@localhost; + +set global read_only=0; diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 45d621b730f..98be18cb23e 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -123,6 +123,7 @@ select n from t1; select select_priv,user from mysql.user where user = _binary'blafasel2'; connection master1; drop table t1; +delete from mysql.user where user="blafasel2"; save_master_pos; connection slave; sync_with_master; diff --git a/mysql-test/t/rpl000017.test b/mysql-test/t/rpl000017.test index 3b4574e9547..866b7fd1c25 100644 --- a/mysql-test/t/rpl000017.test +++ b/mysql-test/t/rpl000017.test @@ -16,6 +16,7 @@ sync_slave_with_master; select * from t1; connection master; drop table t1; +delete from mysql.user where user="replicate"; sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_failed_optimize.test b/mysql-test/t/rpl_failed_optimize.test index 57afaa89e83..8c4698c0d9b 100644 --- a/mysql-test/t/rpl_failed_optimize.test +++ b/mysql-test/t/rpl_failed_optimize.test @@ -17,4 +17,7 @@ OPTIMIZE TABLE t1; OPTIMIZE TABLE non_existing; sync_slave_with_master; +connection master; +drop table t1; +sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test index 92aef9c85d0..bbc5c33770c 100644 --- a/mysql-test/t/rpl_flush_tables.test +++ b/mysql-test/t/rpl_flush_tables.test @@ -49,5 +49,8 @@ sleep 1; --error 1192 stop slave; +connection master; +drop table t3, t4, t5; + # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/t/rpl_ignore_revoke.test b/mysql-test/t/rpl_ignore_revoke.test index e5b5bafb3c5..cdeb40df069 100644 --- a/mysql-test/t/rpl_ignore_revoke.test +++ b/mysql-test/t/rpl_ignore_revoke.test @@ -41,3 +41,7 @@ connection slave; --disable_abort_on_error revoke select on *.* FROM 'user_foo'; --enable_abort_on_error + +connection master; +delete from mysql.user where user="user_foo"; +sync_slave_with_master; diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test index 49d3a03640c..f025ae9e587 100644 --- a/mysql-test/t/rpl_insert_id.test +++ b/mysql-test/t/rpl_insert_id.test @@ -74,4 +74,7 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); sync_slave_with_master; +connection master; +drop table t1; +sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 00121092bbf..8dbb4679339 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -149,5 +149,6 @@ wait_for_slave_to_stop; drop table t2; connection master; drop table t2; - +drop table t1; +sync_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_loaddata_rule_m.test b/mysql-test/t/rpl_loaddata_rule_m.test index c956f2c7720..43975fd11e2 100644 --- a/mysql-test/t/rpl_loaddata_rule_m.test +++ b/mysql-test/t/rpl_loaddata_rule_m.test @@ -24,7 +24,10 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; # were returned). --replace_column 2 # 5 # show binlog events from 98; + drop database mysqltest; +use test; +drop table t1; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012: Delete me diff --git a/mysql-test/t/rpl_loaddata_rule_s.test b/mysql-test/t/rpl_loaddata_rule_s.test index 98fad3cc06f..a552e7f182b 100644 --- a/mysql-test/t/rpl_loaddata_rule_s.test +++ b/mysql-test/t/rpl_loaddata_rule_s.test @@ -19,4 +19,7 @@ sync_with_master; select count(*) from t1; # check that LOAD was replicated show binlog events from 98; # should be nothing +connection master; +drop table t1; + # End of 4.1 tests diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test index f20d0aa83e4..ca9c6419cb6 100644 --- a/mysql-test/t/rpl_misc_functions.test +++ b/mysql-test/t/rpl_misc_functions.test @@ -28,5 +28,9 @@ load data local infile './var/master-data/test/rpl_misc_functions.outfile' into # compare them with the replica; the SELECT below should return no row select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); stop slave; +drop table t1; + +connection master; +drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test index 36ac7a59cb3..8d566764ad9 100644 --- a/mysql-test/t/rpl_multi_update3.test +++ b/mysql-test/t/rpl_multi_update3.test @@ -217,4 +217,7 @@ select "-- SLAVE AFTER JOIN --" as ""; select * from t1; select * from t2; +connection master; +drop table t1, t2; +sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test index b8559af2394..276508864fc 100644 --- a/mysql-test/t/rpl_replicate_do.test +++ b/mysql-test/t/rpl_replicate_do.test @@ -54,4 +54,8 @@ connection slave; set one_shot time_zone='met'; select * from t1; +connection master; +drop table t1; +sync_slave_with_master; + # End of 4.1 tests diff --git a/mysql-test/t/rpl_skip_error.test b/mysql-test/t/rpl_skip_error.test index e0e569a65b7..f6fc73f58f2 100644 --- a/mysql-test/t/rpl_skip_error.test +++ b/mysql-test/t/rpl_skip_error.test @@ -13,4 +13,7 @@ connection slave; sync_with_master; select * from t1; +connection master; +drop table t1; +sync_with_master; # End of 4.1 tests diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test index 67d3816f443..985cebabe7e 100644 --- a/mysql-test/t/rpl_slave_status.test +++ b/mysql-test/t/rpl_slave_status.test @@ -29,4 +29,8 @@ start slave; --vertical_results show slave status; +connection master; +drop table t1; +sync_with_master; + # end of 4.1 tests diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test index e5f35b19fa7..049dcc576dd 100644 --- a/mysql-test/t/sp-prelocking.test +++ b/mysql-test/t/sp-prelocking.test @@ -234,7 +234,8 @@ select f3() // call sp1() // delimiter ;// -drop table t1,t2,t3; +drop view v1; +drop table t1,t2,t3,t4; drop function f1; drop function f2; drop function f3; diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test index 8d4f99abd71..74105eeec0b 100644 --- a/mysql-test/t/sp-security.test +++ b/mysql-test/t/sp-security.test @@ -196,7 +196,6 @@ use db2; call q(); select * from t2; - # # BUG#6030: Stored procedure has no appropriate DROP privilege # (or ALTER for that matter) @@ -233,9 +232,13 @@ drop database db2; select type,db,name from mysql.proc; # Get rid of the users delete from mysql.user where user='user1' or user='user2'; +delete from mysql.user where user='' and host='%'; # And any routine privileges delete from mysql.procs_priv where user='user1' or user='user2'; - +# Delete the grants to user ''@'%' that was created above +delete from mysql.procs_priv where user='' and host='%'; +delete from mysql.db where user='user2'; +flush privileges; # # Test the new security acls # @@ -304,6 +307,9 @@ use test; drop database sptest; delete from mysql.user where user='usera' or user='userb' or user='userc'; delete from mysql.procs_priv where user='usera' or user='userb' or user='userc'; +delete from mysql.tables_priv where user='usera'; +flush privileges; +drop table t1; # # BUG#9503: reseting correct parameters of thread after error in SP function diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index 4bfc4d17588..573fe0c1810 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -236,4 +236,5 @@ delimiter ;// call p1(); call p1(); call p1(); +drop procedure p1; drop tables t1,t2,t3; diff --git a/mysql-test/t/trigger-compat.test b/mysql-test/t/trigger-compat.test index c2acc235135..e59b38343af 100644 --- a/mysql-test/t/trigger-compat.test +++ b/mysql-test/t/trigger-compat.test @@ -81,3 +81,16 @@ SELECT trigger_name, definer FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_n --echo SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name; + +# Clean up +DROP TRIGGER wl2818_trg1; +DROP TRIGGER wl2818_trg2; +disconnect wl2818_definer_con; +connection default; +use mysqltest_db1; +DROP TABLE t1; +DROP TABLE t2; +DROP USER mysqltest_dfn@localhost; +DROP USER mysqltest_inv@localhost; +DROP DATABASE mysqltest_db1; + diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 0c45dea21bb..1f05a9574d6 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -226,3 +226,4 @@ select a1, a2, b1+0, b2+0 from t1 join t2 on b1 = b2; select sum(a1), b1+0, b2+0 from t1 join t2 on b1 = b2 group by b1 order by 1; select 1 from t1 join t2 on b1 = b2 group by b1 order by 1; select b1+0,sum(b1), sum(b2) from t1 join t2 on b1 = b2 group by b1 order by 1; +drop table t1, t2; diff --git a/mysql-test/t/variables-master.opt b/mysql-test/t/variables-master.opt index a0577107f74..abd826bc7fa 100644 --- a/mysql-test/t/variables-master.opt +++ b/mysql-test/t/variables-master.opt @@ -1 +1 @@ ---max_join_size=10 +--max_join_size=100 diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 2d0e2dbc9c9..df0c90ea563 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -48,7 +48,7 @@ drop table t1; # # Test system variables # - +set GLOBAL max_join_size=10; set max_join_size=100; show variables like 'max_join_size'; --replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index 04d6d2f323b..2490b8808da 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -6,6 +6,8 @@ grant create view on test.* to test@localhost; show grants for test@localhost; revoke create view on test.* from test@localhost; show grants for test@localhost; +# The grant above creates a new user test@localhost, delete it +drop user test@localhost; # grant create view test # From f300c891870c3b0874c3c4a1cfb70d116af17457 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Jan 2006 09:24:45 +0100 Subject: [PATCH 07/13] Use MYSQLTEST_VARDIR mysql-test/t/information_schema.test: Use MYSQLTEST_VARDIR instead of MYSQL_TEST_DIR/var --- mysql-test/t/information_schema.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 85d56bfc78b..5e0d57e10dd 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -796,9 +796,9 @@ DROP FUNCTION func2; # create database mysqltest; create table mysqltest.t1(a int); ---exec chmod -r $MYSQL_TEST_DIR/var/master-data/mysqltest +--exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest select table_schema from information_schema.tables where table_schema='mysqltest'; ---exec chmod +r $MYSQL_TEST_DIR/var/master-data/mysqltest +--exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest drop database mysqltest; # From c35be281497edaef66fa139071cd6c7062cb3153 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Jan 2006 12:47:22 +0100 Subject: [PATCH 08/13] Bug #15302 LOAD DATA FROM MASTER -> Packets out of order (Found: 2, expected 1) - Change "mysql_create_db" to not call "send_ok" if in silent mode i.e. called from "load_master_data" - Change mysqltest to detect when there aren't as many warnings available as was reported. client/mysqltest.c: Call "die" if warnings were reported but there weren't any warnings to retrieve sql/sql_db.cc: Don't call "send_ok" if in silent mode. --- client/mysqltest.c | 8 ++++---- sql/sql_db.cc | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index d10ad054798..613c4e12763 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2966,8 +2966,8 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) warn_res= mysql_store_result(mysql); } if (!warn_res) - verbose_msg("Warning count is %u but didn't get any warnings\n", - count); + die("Warning count is %u but didn't get any warnings\n", + count); else { dynstr_append_mem(ds, "Warnings:\n", 10); @@ -3446,8 +3446,8 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds) { MYSQL_RES *warn_res= mysql_store_result(mysql); if (!warn_res) - verbose_msg("Warning count is %u but didn't get any warnings\n", - count); + die("Warning count is %u but didn't get any warnings\n", + count); else { dynstr_append_mem(ds, "Warnings:\n", 10); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 7c834c91183..035a0b22a6b 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -388,6 +388,12 @@ bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create) silent Used by replication when internally creating a database. In this case the entry should not be logged. + SIDE-EFFECTS + 1. Report back to client that command succeeded (send_ok) + 2. Report errors to client + 3. Log event to binary log + (The 'silent' flags turns off 1 and 3.) + RETURN VALUES 0 ok -1 Error @@ -421,16 +427,17 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, if (my_stat(path,&stat_info,MYF(0))) { - if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS)) + if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS)) { my_error(ER_DB_CREATE_EXISTS,MYF(0),db); error= -1; goto exit; } push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, - ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db); + ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db); + if (!silent) + send_ok(thd); error= 0; - send_ok(thd); goto exit; } else From db16cfc578e389cd63770aab9fe7bc1f520b2413 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Feb 2006 11:36:32 +0100 Subject: [PATCH 09/13] Use common function 'append_field' to output the value of one field to the result. Fix for extra zero in exponent of double values on windows. client/mysqltest.c: Write new function 'append_field' which takes care of appending one field to the dynamic string. Use function 'append_field' from both ps and normal execution Add hack to 'append_field' that removes the extra '0' in exponent for double values on Windows. mysql-test/r/type_float.result: One zero too much was removed( I think ) mysql-test/t/insert.test: Remove the "replace_result" for extra zero in exponent mysql-test/t/type_float.test: Remove the "replace_result" for extra zero in exponent mysql-test/t/variables.test: Remove the "replace_result" for extra zero in exponent --- client/mysqltest.c | 162 +++++++++++++++------------------ mysql-test/r/type_float.result | 4 +- mysql-test/t/insert.test | 9 -- mysql-test/t/type_float.test | 3 - mysql-test/t/variables.test | 1 - 5 files changed, 75 insertions(+), 104 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 6a2a7b072de..24be5de8021 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3039,6 +3039,58 @@ static void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val) } +/* + Append the result for one field to the dynamic string ds +*/ + +static void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD* field, + const char* val, ulonglong len, bool is_null) +{ + + char buf[256]; + if (col_idx < max_replace_column && replace_column[col_idx]) + { + val= replace_column[col_idx]; + len= strlen(val); + } + else if (is_null) + { + val= "NULL"; + len= 4; + } +#ifdef __WIN__ + else if (field->type == MYSQL_TYPE_DOUBLE && + field->decimals >= 31) + { + /* Convert 1.2e+018 to 1.2e+18 and 1.2e-018 to 1.2e-18 */ + char *start= strchr(val, 'e'); + if (start && strlen(start) >= 5 && + (start[1] == '-' || start[1] == '+') && start[2] == '0') + { + start+=2; /* Now points at first '0' */ + /* Move all chars after the first '0' one step left */ + memmove(start, start + 1, strlen(start)); + len--; + } + } +#endif + + if (!display_result_vertically) + { + if (col_idx) + dynstr_append_mem(ds, "\t", 1); + replace_dynstr_append_mem(ds, val, (int)len); + } + else + { + dynstr_append(ds, field->name); + dynstr_append_mem(ds, "\t", 1); + replace_dynstr_append_mem(ds, val, (int)len); + dynstr_append_mem(ds, "\n", 1); + } +} + + /* Append all results to the dynamic string separated with '\t' Values may be converted with 'replace_column' @@ -3048,41 +3100,16 @@ static void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res) { MYSQL_ROW row; uint num_fields= mysql_num_fields(res); - MYSQL_FIELD *fields= !display_result_vertically ? 0 : mysql_fetch_fields(res); + MYSQL_FIELD *fields= mysql_fetch_fields(res); ulong *lengths; + while ((row = mysql_fetch_row(res))) { uint i; lengths = mysql_fetch_lengths(res); for (i = 0; i < num_fields; i++) - { - const char *val= row[i]; - ulonglong len= lengths[i]; - - if (i < max_replace_column && replace_column[i]) - { - val= replace_column[i]; - len= strlen(val); - } - if (!val) - { - val= "NULL"; - len= 4; - } - if (!display_result_vertically) - { - if (i) - dynstr_append_mem(ds, "\t", 1); - replace_dynstr_append_mem(ds, val, (int)len); - } - else - { - dynstr_append(ds, fields[i].name); - dynstr_append_mem(ds, "\t", 1); - replace_dynstr_append_mem(ds, val, (int)len); - dynstr_append_mem(ds, "\n", 1); - } - } + append_field(ds, i, &fields[i], + (const char*)row[i], lengths[i], !row[i]); if (!display_result_vertically) dynstr_append_mem(ds, "\n", 1); } @@ -3096,13 +3123,12 @@ static void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res) */ static void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt, - MYSQL_FIELD *field, uint num_fields) + MYSQL_FIELD *fields, uint num_fields) { MYSQL_BIND *bind; my_bool *is_null; ulong *length; - ulonglong num_rows; - uint col_idx, row_idx; + uint i; /* Allocate array with bind structs, lengths and NULL flags */ bind= (MYSQL_BIND*) my_malloc(num_fields * sizeof(MYSQL_BIND), @@ -3112,71 +3138,29 @@ static void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt, is_null= (my_bool*) my_malloc(num_fields * sizeof(my_bool), MYF(MY_WME | MY_FAE)); - for (col_idx= 0; col_idx < num_fields; col_idx++) + /* Allocate data for the result of each field */ + for (i= 0; i < num_fields; i++) { - /* Allocate data for output */ - uint max_length= field[col_idx].max_length + 1; - char *str_data= (char *) my_malloc(max_length, MYF(MY_WME | MY_FAE)); - - bind[col_idx].buffer_type= MYSQL_TYPE_STRING; - bind[col_idx].buffer= (char *)str_data; - bind[col_idx].buffer_length= max_length; - bind[col_idx].is_null= &is_null[col_idx]; - bind[col_idx].length= &length[col_idx]; + uint max_length= fields[i].max_length + 1; + bind[i].buffer_type= MYSQL_TYPE_STRING; + bind[i].buffer= (char *)my_malloc(max_length, MYF(MY_WME | MY_FAE)); + bind[i].buffer_length= max_length; + bind[i].is_null= &is_null[i]; + bind[i].length= &length[i]; DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %d", - col_idx, - bind[col_idx].buffer_type, - bind[col_idx].buffer_length)); + i, bind[i].buffer_type, bind[i].buffer_length)); } - /* Fill in the data into the structures created above */ if (mysql_stmt_bind_result(stmt, bind)) die("mysql_stmt_bind_result failed: %d: %s", mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); - /* Read result from each row */ - num_rows= mysql_stmt_num_rows(stmt); - for (row_idx= 0; row_idx < num_rows; row_idx++) + while (mysql_stmt_fetch(stmt) == 0) { - if (mysql_stmt_fetch(stmt)) - die("mysql_stmt_fetch failed: %d %s", - mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); - - /* Read result from each column */ - for (col_idx= 0; col_idx < num_fields; col_idx++) - { - const char *val; - ulonglong len; - if (col_idx < max_replace_column && replace_column[col_idx]) - { - val= replace_column[col_idx]; - len= strlen(val); - } - else if (*bind[col_idx].is_null) - { - val= "NULL"; - len= 4; - } - else - { - val= (const char *) bind[col_idx].buffer; - len= *bind[col_idx].length; - } - if (!display_result_vertically) - { - if (col_idx) /* No tab before first col */ - dynstr_append_mem(ds, "\t", 1); - replace_dynstr_append_mem(ds, val, (int)len); - } - else - { - dynstr_append(ds, field[col_idx].name); - dynstr_append_mem(ds, "\t", 1); - replace_dynstr_append_mem(ds, val, (int)len); - dynstr_append_mem(ds, "\n", 1); - } - } + for (i= 0; i < num_fields; i++) + append_field(ds, i, &fields[i], (const char *) bind[i].buffer, + *bind[i].length, *bind[i].is_null); if (!display_result_vertically) dynstr_append_mem(ds, "\n", 1); } @@ -3187,10 +3171,10 @@ static void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt, free_replace_column(); - for (col_idx= 0; col_idx < num_fields; col_idx++) + for (i= 0; i < num_fields; i++) { /* Free data for output */ - my_free((gptr)bind[col_idx].buffer, MYF(MY_WME | MY_FAE)); + my_free((gptr)bind[i].buffer, MYF(MY_WME | MY_FAE)); } /* Free array with bind structs, lengths and NULL flags */ my_free((gptr)bind , MYF(MY_WME | MY_FAE)); diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index c10cb7d71f7..5998074ea53 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -31,14 +31,14 @@ select * from t1; f1 f2 10 10 100000 100000 -1.23457e+9 1234567890 +1.23457e+09 1234567890 1e+10 10000000000 1e+15 1e+15 1e+20 1e+20 3.40282e+38 1e+50 3.40282e+38 1e+150 -10 -10 -1e-5 1e-5 +1e-05 1e-05 1e-10 1e-10 1e-15 1e-15 1e-20 1e-20 diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 51d936f5b4f..ddde6cfa5d3 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -99,27 +99,22 @@ create table t1(number int auto_increment primary key, original_value varchar(50 set @value= "aa"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= "1aa"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= "aa1"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= "1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= "-1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() --error 1367 @@ -130,22 +125,18 @@ set @value= -1e+1111111111; set @value= 1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= -1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= 1; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() set @value= -1; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); ---replace_result e-0 e- e+0 e+ --query_vertical select * from t1 where number =last_insert_id() drop table t1; diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 6a0814ef113..50b47aeb81c 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -6,9 +6,7 @@ drop table if exists t1,t2; --enable_warnings ---replace_result e-0 e- e+0 e+ SELECT 10,10.0,10.,.1e+2,100.0e-1; ---replace_result e-00 e-0 SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1; SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01; @@ -21,7 +19,6 @@ create table t1 (f1 float(24),f2 float(52)); show full columns from t1; insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150); ---replace_result e-0 e- e+0 e+ select * from t1; drop table t1; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 2d0e2dbc9c9..4737866392a 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -20,7 +20,6 @@ select @test, @`test`, @TEST, @`TEST`, @"teSt"; set @select=2,@t5=1.23456; select @`select`,@not_used; set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL; ---replace_result e-0 e- e+0 e+ select @test_int,@test_double,@test_string,@test_string2,@select; set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello"; select @test_int,@test_double,@test_string,@test_string2; From fb6928cb24db155027074e06f619736e50e86015 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Feb 2006 11:45:37 +0100 Subject: [PATCH 10/13] Convert exponent results for MYSQL_TYPE_FLOAT on Windows client/mysqltest.c: Do the magic for MYSQL_TYPE_FLOAT as well --- client/mysqltest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 24be5de8021..3179535347d 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3059,7 +3059,8 @@ static void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD* field, len= 4; } #ifdef __WIN__ - else if (field->type == MYSQL_TYPE_DOUBLE && + else if ((field->type == MYSQL_TYPE_DOUBLE || + field->type == MYSQL_TYPE_FLOAT ) && field->decimals >= 31) { /* Convert 1.2e+018 to 1.2e+18 and 1.2e-018 to 1.2e-18 */ From 752b68818187f1ea32d0a45070b83b8ded3692e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Feb 2006 19:02:38 +0100 Subject: [PATCH 11/13] Bug #17188 CRBR: ignores --binlog_ignore_db= settings mysql-test/r/ndb_binlog_ignore_db.result: New BitKeeper file ``mysql-test/r/ndb_binlog_ignore_db.result'' mysql-test/t/ndb_binlog_ignore_db-master.opt: New BitKeeper file ``mysql-test/t/ndb_binlog_ignore_db-master.opt'' mysql-test/t/ndb_binlog_ignore_db.test: New BitKeeper file ``mysql-test/t/ndb_binlog_ignore_db.test'' --- mysql-test/r/ndb_binlog_ddl_multi.result | 12 ++++++------ mysql-test/r/ndb_binlog_ignore_db.result | 10 ++++++++++ mysql-test/t/ndb_binlog_ddl_multi.test | 6 ++++++ mysql-test/t/ndb_binlog_ignore_db-master.opt | 1 + mysql-test/t/ndb_binlog_ignore_db.test | 19 +++++++++++++++++++ sql/ha_ndbcluster_binlog.cc | 7 +++++++ 6 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 mysql-test/r/ndb_binlog_ignore_db.result create mode 100644 mysql-test/t/ndb_binlog_ignore_db-master.opt create mode 100644 mysql-test/t/ndb_binlog_ignore_db.test diff --git a/mysql-test/r/ndb_binlog_ddl_multi.result b/mysql-test/r/ndb_binlog_ddl_multi.result index 46789069324..e9a3f80281d 100644 --- a/mysql-test/r/ndb_binlog_ddl_multi.result +++ b/mysql-test/r/ndb_binlog_ddl_multi.result @@ -8,12 +8,12 @@ create database mysqltest; use mysqltest; create table t1 (a int primary key) engine=ndb; create table t2 (a int primary key) engine=ndb; -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin1.000001 # Query # # create database mysqltest master-bin1.000001 # Query # # use `mysqltest`; create table t1 (a int primary key) engine=ndb master-bin1.000001 # Query # # use `test`; create table t2 (a int primary key) engine=ndb -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # create database mysqltest master-bin.000001 # Query # # use `mysqltest`; create table t1 (a int primary key) engine=ndb @@ -21,7 +21,7 @@ master-bin.000001 # Query # # use `test`; create table t2 (a int primary key) en reset master; reset master; alter table t2 add column (b int); -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Table_map # # cluster_replication.apply_status @@ -32,7 +32,7 @@ reset master; reset master; ALTER DATABASE mysqltest CHARACTER SET latin1; drop table mysqltest.t1; -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # ALTER DATABASE mysqltest CHARACTER SET latin1 master-bin.000001 # Query # # BEGIN @@ -46,7 +46,7 @@ use test; insert into t2 values (1,2); drop database mysqltest; create table t1 (a int primary key) engine=ndb; -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Table_map # # cluster_replication.apply_status @@ -88,7 +88,7 @@ ENGINE = NDB; DROP LOGFILE GROUP lg1 ENGINE =NDB; drop table t1; -show binlog events from 102; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin1.000001 # Query # # CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/r/ndb_binlog_ignore_db.result b/mysql-test/r/ndb_binlog_ignore_db.result new file mode 100644 index 00000000000..8dc2c1ff1f8 --- /dev/null +++ b/mysql-test/r/ndb_binlog_ignore_db.result @@ -0,0 +1,10 @@ +drop table if exists t1; +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +create table t1 (a int primary key, b int) engine=ndb; +insert into t1 values (1, 1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; drop table if exists t1 +drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_ddl_multi.test b/mysql-test/t/ndb_binlog_ddl_multi.test index 17d304db0b1..3aa3b9469fd 100644 --- a/mysql-test/t/ndb_binlog_ddl_multi.test +++ b/mysql-test/t/ndb_binlog_ddl_multi.test @@ -33,10 +33,12 @@ create table t1 (a int primary key) engine=ndb; --connection server2 create table t2 (a int primary key) engine=ndb; +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start --connection server1 +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start @@ -51,6 +53,7 @@ reset master; alter table t2 add column (b int); --connections server1 +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start @@ -70,6 +73,7 @@ ALTER DATABASE mysqltest CHARACTER SET latin1; drop table mysqltest.t1; --connection server1 +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start @@ -87,6 +91,7 @@ drop database mysqltest; create table t1 (a int primary key) engine=ndb; --connection server2 +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start @@ -139,5 +144,6 @@ ENGINE =NDB; drop table t1; --connection server2 +--replace_result $binlog_start --replace_column 2 # 4 # 5 # --eval show binlog events from $binlog_start diff --git a/mysql-test/t/ndb_binlog_ignore_db-master.opt b/mysql-test/t/ndb_binlog_ignore_db-master.opt new file mode 100644 index 00000000000..e3947c0eeed --- /dev/null +++ b/mysql-test/t/ndb_binlog_ignore_db-master.opt @@ -0,0 +1 @@ +--binlog-ignore-db=mysqltest diff --git a/mysql-test/t/ndb_binlog_ignore_db.test b/mysql-test/t/ndb_binlog_ignore_db.test new file mode 100644 index 00000000000..a46266f209a --- /dev/null +++ b/mysql-test/t/ndb_binlog_ignore_db.test @@ -0,0 +1,19 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc + +--let $binlog_start=102 + +--disable_warnings +drop table if exists t1; +drop database if exists mysqltest; +--enable_warnings + +create database mysqltest; +use mysqltest; +create table t1 (a int primary key, b int) engine=ndb; +insert into t1 values (1, 1); +--replace_result $binlog_start +--replace_column 2 # 4 # 5 # +--eval show binlog events from $binlog_start + +drop database mysqltest; diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 0fa9daa66b4..b349e3320de 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -20,6 +20,7 @@ #ifdef HAVE_NDB_BINLOG #include "rpl_injector.h" +#include "rpl_filter.h" #include "slave.h" #include "ha_ndbcluster_binlog.h" @@ -2019,6 +2020,12 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab, DBUG_RETURN(0); } + if (!binlog_filter->db_ok(share->db)) + { + share->flags|= NSF_NO_BINLOG; + DBUG_RETURN(0); + } + if (share->op) { assert(share->op->getCustomData() == (void *) share); From 7eefe3da4d00cf76e36a3a0f13020bd3e3cbc050 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Feb 2006 19:18:33 +0100 Subject: [PATCH 12/13] Update after merge 5.0 -> 5.1 mysql-test/r/rpl_failed_optimize.result: Updates test result mysql-test/r/rpl_insert_id.result: Updates test result mysql-test/r/rpl_loaddata.result: Updates test result mysql-test/r/rpl_loaddata_s.result: Updates test result mysql-test/r/rpl_multi_update3.result: Updates test result --- mysql-test/r/rpl_failed_optimize.result | 1 - mysql-test/r/rpl_insert_id.result | 1 - mysql-test/r/rpl_loaddata.result | 1 - mysql-test/r/rpl_loaddata_s.result | 1 - mysql-test/r/rpl_multi_update3.result | 1 - 5 files changed, 5 deletions(-) diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index c2c07dc6343..fd711f89222 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -18,4 +18,3 @@ Table Op Msg_type Msg_text test.non_existing optimize error Table 'test.non_existing' doesn't exist Warnings: Error 1146 Table 'test.non_existing' doesn't exist -drop table t1; diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result index d7b6946f7e5..8482f631553 100644 --- a/mysql-test/r/rpl_insert_id.result +++ b/mysql-test/r/rpl_insert_id.result @@ -73,4 +73,3 @@ CREATE TABLE t1 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); ERROR 23000: Duplicate entry '1' for key 1 -drop table t1; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index f74476de678..03c370d2dd7 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -79,4 +79,3 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by ERROR 23000: Duplicate entry '2003-03-22' for key 1 drop table t2; drop table t2; -drop table t1; diff --git a/mysql-test/r/rpl_loaddata_s.result b/mysql-test/r/rpl_loaddata_s.result index 11f75d43bf9..86527b6d190 100644 --- a/mysql-test/r/rpl_loaddata_s.result +++ b/mysql-test/r/rpl_loaddata_s.result @@ -12,4 +12,3 @@ count(*) 2 show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info -drop table t1; diff --git a/mysql-test/r/rpl_multi_update3.result b/mysql-test/r/rpl_multi_update3.result index bf454c7bb48..b81af7c6e39 100644 --- a/mysql-test/r/rpl_multi_update3.result +++ b/mysql-test/r/rpl_multi_update3.result @@ -194,4 +194,3 @@ idpro price nbprice 1 1.0000 3 2 1.0000 2 3 2.0000 1 -drop table t1, t2; From 56f138b9459c41ea635c7a342a410f7452ad2b38 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Feb 2006 19:59:19 +0100 Subject: [PATCH 13/13] Removed extra "drop view v1" mysql-test/r/sp-prelocking.result: Update test result mysql-test/t/sp-prelocking.test: One drop too many --- mysql-test/r/sp-prelocking.result | 1 - mysql-test/t/sp-prelocking.test | 1 - 2 files changed, 2 deletions(-) diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result index b4728b278cc..c2614892016 100644 --- a/mysql-test/r/sp-prelocking.result +++ b/mysql-test/r/sp-prelocking.result @@ -214,4 +214,3 @@ drop function f1; drop function f2; drop function f3; drop procedure sp1; -drop view v1; diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test index cd48025188b..edb8ae5b92d 100644 --- a/mysql-test/t/sp-prelocking.test +++ b/mysql-test/t/sp-prelocking.test @@ -240,4 +240,3 @@ drop function f1; drop function f2; drop function f3; drop procedure sp1; -drop view v1;