diff options
author | unknown <msvensson@pilot.mysql.com> | 2007-12-12 18:19:24 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2007-12-12 18:19:24 +0100 |
commit | 1370500c0d1dbe051deaedd0fc6815a321b1379b (patch) | |
tree | d8f656e22aba024da4a03e6e02e35d33d6f184a8 /mysql-test/t | |
parent | abd1317033c435e8028a0f4bd4cabd9f58cd17ff (diff) | |
download | mariadb-git-1370500c0d1dbe051deaedd0fc6815a321b1379b.tar.gz |
WL#4189
- dynamic configuration support
- safe process
- cleanups
- create new suite for fedarated
BitKeeper/deleted/.del-basic.test:
Rename: mysql-test/ndb/basic.test -> BitKeeper/deleted/.del-basic.test
BitKeeper/deleted/.del-basic_log.result:
Rename: mysql-test/ndb/basic_log.result -> BitKeeper/deleted/.del-basic_log.result
mysql-test/suite/federated/federated_transactions.result:
Rename: mysql-test/r/federated_transactions.result -> mysql-test/suite/federated/federated_transactions.result
BitKeeper/deleted/.del-have_bug25714.require:
Rename: mysql-test/r/have_bug25714.require -> BitKeeper/deleted/.del-have_bug25714.require
BitKeeper/deleted/.del-kill_master.sh:
Rename: mysql-test/misc/kill_master.sh -> BitKeeper/deleted/.del-kill_master.sh
BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a:
Rename: mysql-test/ndb/ndb_config_4_node.ini -> BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a
BitKeeper/deleted/.del-restart.result:
Rename: mysql-test/ndb/restart.result -> BitKeeper/deleted/.del-restart.result
mysql-test/suite/federated/federated_cleanup.inc:
Rename: mysql-test/include/federated_cleanup.inc -> mysql-test/suite/federated/federated_cleanup.inc
mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt:
Rename: mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi -> mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt
BitKeeper/deleted/.del-install_test_db.sh:
Rename: mysql-test/install_test_db.sh -> BitKeeper/deleted/.del-install_test_db.sh
BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16:
Rename: mysql-test/ndb/ndb_config_1_node.ini -> BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16
BitKeeper/deleted/.del-mtr_timer.pl:
Rename: mysql-test/lib/mtr_timer.pl -> BitKeeper/deleted/.del-mtr_timer.pl
BitKeeper/deleted/.del-create-test-result:
Rename: mysql-test/create-test-result -> BitKeeper/deleted/.del-create-test-result
BitKeeper/deleted/.del-fix-result:
Rename: mysql-test/fix-result -> BitKeeper/deleted/.del-fix-result
BitKeeper/deleted/.del-mysql-test-run-shell.sh:
Rename: mysql-test/mysql-test-run-shell.sh -> BitKeeper/deleted/.del-mysql-test-run-shell.sh
BitKeeper/deleted/.del-mysql-test_V1.9.pl:
Rename: mysql-test/misc/mysql-test_V1.9.pl -> BitKeeper/deleted/.del-mysql-test_V1.9.pl
BitKeeper/deleted/.del-resolve-stack:
Rename: mysql-test/resolve-stack -> BitKeeper/deleted/.del-resolve-stack
BitKeeper/deleted/.del-restart_log.result:
Rename: mysql-test/ndb/restart_log.result -> BitKeeper/deleted/.del-restart_log.result
mysql-test/suite/rpl/t/rpl_000015-slave.opt:
Rename: mysql-test/suite/rpl/t/rpl_000015.slave-mi -> mysql-test/suite/rpl/t/rpl_000015-slave.opt
BitKeeper/deleted/.del-ndb_config_2_node.ini:
Rename: mysql-test/ndb/ndb_config_2_node.ini -> BitKeeper/deleted/.del-ndb_config_2_node.ini
BitKeeper/deleted/.del-ndbcluster.sh:
Rename: mysql-test/ndb/ndbcluster.sh -> BitKeeper/deleted/.del-ndbcluster.sh
BitKeeper/deleted/.del-basic.result:
Rename: mysql-test/ndb/basic.result -> BitKeeper/deleted/.del-basic.result
BitKeeper/deleted/.del-restart.test:
Rename: mysql-test/ndb/restart.test -> BitKeeper/deleted/.del-restart.test
BitKeeper/deleted/.del-have_bug25714.inc:
Rename: mysql-test/include/have_bug25714.inc -> BitKeeper/deleted/.del-have_bug25714.inc
BitKeeper/deleted/.del-mtr_diff.pl:
Rename: mysql-test/lib/mtr_diff.pl -> BitKeeper/deleted/.del-mtr_diff.pl
mysql-test/suite/federated/federated_transactions-slave.opt:
Rename: mysql-test/t/federated_transactions-slave.opt -> mysql-test/suite/federated/federated_transactions-slave.opt
BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b:
Rename: mysql-test/ndb/Makefile.am -> BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b
BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949:
Rename: mysql-test/lib/mtr_im.pl -> BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949
mysql-test/suite/federated/federated_innodb-slave.opt:
Rename: mysql-test/t/federated_innodb-slave.opt -> mysql-test/suite/federated/federated_innodb-slave.opt
client/mysqltest.c:
Use current files path first when looking for include file
configure.in:
Remove mysql-test/nbd
mysql-test/Makefile.am:
Cleanup mysql-test/Makefile.am
mysql-test/extra/binlog_tests/blackhole.test:
Use new paths
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Use new paths
mysql-test/mysql-test-run.pl:
Dynamic configuration support
Safe process
mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_EE_err.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_loaddata.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_log.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_row_001.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_row_charset.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_stm_000001.test:
Use new paths
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
Use new paths
mysql-test/include/have_blackhole.inc:
Use new paths
mysql-test/include/have_ndbapi_examples.inc:
Use new paths
mysql-test/include/loaddata_autocom.inc:
Use new paths
mysql-test/include/mix1.inc:
Use new paths
mysql-test/include/ndb_backup.inc:
Use new paths
mysql-test/include/ndb_restore_master.inc:
Use new paths
mysql-test/include/ndb_restore_slave_eoption.inc:
Use new paths
mysql-test/include/testdb_only.inc:
Use new paths
mysql-test/lib/My/Config.pm:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_cases.pm:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_io.pl:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_misc.pl:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_process.pl:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_report.pl:
dynamic configuration
safe process
cleanups
mysql-test/lib/mtr_stress.pl:
dynamic configuration
safe process
cleanups
mysql-test/r/backup.result:
Use new paths
mysql-test/r/ctype_big5.result:
Use new paths
mysql-test/r/gis.result:
Use new paths
mysql-test/r/loaddata.result:
Use new paths
mysql-test/r/loaddata_autocom_innodb.result:
Use new paths
mysql-test/r/mysqlbinlog.result:
Use new paths
mysql-test/r/mysqlbinlog_base64.result:
Use new paths
mysql-test/r/outfile.result:
Use new paths
mysql-test/r/partition_error.result:
Use new paths
mysql-test/r/partition_not_windows.result:
Use new paths
mysql-test/r/partition_symlink.result:
Use new paths
mysql-test/r/query_cache.result:
Use new paths
mysql-test/r/sp.result:
Use new paths
mysql-test/r/symlink.result:
Use new paths
mysql-test/r/system_mysql_db.result:
Use new paths
mysql-test/r/trigger.result:
Use new paths
mysql-test/r/type_blob.result:
Use new paths
mysql-test/r/view.result:
Use new paths
mysql-test/r/warnings.result:
Use new paths
mysql-test/suite/binlog/r/binlog_killed_simulate.result:
Use new paths
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Use new paths
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
Use new paths
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Use new paths
mysql-test/suite/binlog/t/binlog_killed.test:
Use new paths
mysql-test/suite/binlog/t/binlog_killed_simulate.test:
Use new paths
mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test:
Use new paths
mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test:
Use new paths
mysql-test/suite/federated/federated.inc:
Use new paths
mysql-test/suite/federated/federated.result:
Use new paths
mysql-test/suite/federated/federated.test:
Use new paths
mysql-test/suite/federated/federated_archive.result:
Use new paths
mysql-test/suite/federated/federated_archive.test:
Use new paths
mysql-test/suite/federated/federated_bug_13118.result:
Use new paths
mysql-test/suite/federated/federated_bug_13118.test:
Use new paths
mysql-test/suite/federated/federated_bug_25714.result:
Use new paths
mysql-test/suite/federated/federated_bug_25714.test:
Use new paths
mysql-test/suite/federated/federated_innodb.result:
Use new paths
mysql-test/suite/federated/federated_innodb.test:
Use new paths
mysql-test/suite/federated/federated_server.result:
Use new paths
mysql-test/suite/federated/federated_server.test:
Use new paths
mysql-test/suite/federated/federated_transactions.test:
Use new paths
mysql-test/suite/federated/have_federated_db.inc:
Use new paths
mysql-test/suite/ndb/r/loaddata_autocom_ndb.result:
Use new paths
mysql-test/suite/ndb/r/ndb_config.result:
Use new paths
mysql-test/suite/ndb/r/ndb_dd_backuprestore.result:
Use new paths
mysql-test/suite/ndb/r/ndb_load.result:
Use new paths
mysql-test/suite/ndb/r/ndb_loaddatalocal.result:
Use new paths
mysql-test/suite/ndb/r/ndb_replace.result:
Use new paths
mysql-test/suite/ndb/r/ndb_restore.result:
Use new paths
mysql-test/suite/ndb/r/ndb_restore_partition.result:
Use new paths
mysql-test/suite/ndb/r/ndb_restore_print.result:
Use new paths
mysql-test/suite/ndb/r/ndb_trigger.result:
Use new paths
mysql-test/suite/ndb/t/ndb_alter_table.test:
Use new paths
mysql-test/suite/ndb/t/ndb_config.test:
Use new paths
mysql-test/suite/ndb/t/ndb_load.test:
Use new paths
mysql-test/suite/ndb/t/ndb_loaddatalocal.test:
Use new paths
mysql-test/suite/ndb/t/ndb_replace.test:
Use new paths
mysql-test/suite/ndb/t/ndb_restore.test:
Use new paths
mysql-test/suite/ndb/t/ndb_single_user.test:
Use new paths
mysql-test/suite/ndb/t/ndb_trigger.test:
Use new paths
mysql-test/suite/ndb/t/ndbapi.test:
Use new paths
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
Use new paths
mysql-test/suite/rpl/r/rpl_LD_INFILE.result:
Use new paths
mysql-test/suite/rpl/r/rpl_flushlog_loop.result:
Use new paths
mysql-test/suite/rpl/r/rpl_innodb.result:
Use new paths
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
Use new paths
mysql-test/suite/rpl/r/rpl_load_table_from_master.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata_charset.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata_fatal.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata_m.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata_s.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddata_simple.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
Use new paths
mysql-test/suite/rpl/r/rpl_loadfile.result:
Use new paths
mysql-test/suite/rpl/r/rpl_misc_functions.result:
Use new paths
mysql-test/suite/rpl/r/rpl_replicate_do.result:
Use new paths
mysql-test/suite/rpl/r/rpl_rewrt_db.result:
Use new paths
mysql-test/suite/rpl/r/rpl_row_001.result:
Use new paths
mysql-test/suite/rpl/r/rpl_row_loaddata_m.result:
Use new paths
mysql-test/suite/rpl/r/rpl_row_log.result:
Use new paths
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
Use new paths
mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result:
Use new paths
mysql-test/suite/rpl/r/rpl_stm_000001.result:
Use new paths
mysql-test/suite/rpl/r/rpl_stm_log.result:
Use new paths
mysql-test/suite/rpl/r/rpl_timezone.result:
Use new paths
mysql-test/suite/rpl/t/disabled.def:
Use new paths
mysql-test/suite/rpl/t/rpl000017-slave.sh:
Use new paths
mysql-test/suite/rpl/t/rpl_LD_INFILE.test:
Use new paths
mysql-test/suite/rpl/t/rpl_drop_db.test:
Use new paths
mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt:
Use new paths
mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt:
Use new paths
mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
Use new paths
mysql-test/suite/rpl/t/rpl_innodb.test:
Use new paths
mysql-test/suite/rpl/t/rpl_innodb_bug30919.test:
Use new paths
mysql-test/suite/rpl/t/rpl_load_from_master.test:
Use new paths
mysql-test/suite/rpl/t/rpl_load_table_from_master.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddata_charset.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddata_m.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddata_s.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddata_simple.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
Use new paths
mysql-test/suite/rpl/t/rpl_loadfile.test:
Use new paths
mysql-test/suite/rpl/t/rpl_misc_functions.test:
Use new paths
mysql-test/suite/rpl/t/rpl_replicate_do.test:
Use new paths
mysql-test/suite/rpl/t/rpl_rewrt_db.test:
Use new paths
mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt:
Use new paths
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
Use new paths
mysql-test/suite/rpl/t/rpl_row_charset_innodb.test:
Use new paths
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
Use new paths
mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test:
Use new paths
mysql-test/suite/rpl/t/rpl_timezone.test:
Use new paths
mysql-test/suite/rpl/t/rpl_trigger.test:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result:
Use new paths
mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test:
Use new paths
mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test:
Use new paths
mysql-test/t/backup.test:
Use new paths
mysql-test/t/bootstrap.test:
Use new paths
mysql-test/t/crash_commit_before.test:
Use new paths
mysql-test/t/create_not_windows.test:
Use new paths
mysql-test/t/csv.test:
Use new paths
mysql-test/t/ctype_big5.test:
Use new paths
mysql-test/t/disabled.def:
Use new paths
mysql-test/t/distinct.test:
Use new paths
mysql-test/t/gis.test:
Use new paths
mysql-test/t/grant_cache_no_prot.test:
Use new paths
mysql-test/t/grant_cache_ps_prot.test:
Use new paths
mysql-test/t/information_schema_chmod.test:
Use new paths
mysql-test/t/loaddata.test:
Use new paths
mysql-test/t/log_state.test:
Use new paths
mysql-test/t/myisam-system.test:
Use new paths
mysql-test/t/mysql_upgrade.test:
Use new paths
mysql-test/t/mysqlbinlog-cp932.test:
Use new paths
mysql-test/t/mysqlbinlog.test:
Use new paths
mysql-test/t/mysqlbinlog2.test:
Use new paths
mysql-test/t/mysqlbinlog_base64.test:
Use new paths
mysql-test/t/mysqldump.test:
Use new paths
mysql-test/t/outfile.test:
Use new paths
mysql-test/t/partition.test:
Use new paths
mysql-test/t/partition_error.test:
Use new paths
mysql-test/t/partition_federated.test:
Use new paths
mysql-test/t/partition_mgm.test:
Use new paths
mysql-test/t/partition_not_windows.test:
Use new paths
mysql-test/t/partition_symlink.test:
Use new paths
mysql-test/t/query_cache.test:
Use new paths
mysql-test/t/repair.test:
Use new paths
mysql-test/t/show_check.test:
Use new paths
mysql-test/t/sp-destruct.test:
Use new paths
mysql-test/t/sp.test:
Use new paths
mysql-test/t/symlink.test:
Use new paths
mysql-test/t/system_mysql_db.test:
Use new paths
mysql-test/t/system_mysql_db_fix30020.test:
Use new paths
mysql-test/t/system_mysql_db_fix40123.test:
Use new paths
mysql-test/t/system_mysql_db_fix50030.test:
Use new paths
mysql-test/t/system_mysql_db_fix50117.test:
Use new paths
mysql-test/t/trigger-compat.test:
Use new paths
mysql-test/t/trigger-grant.test:
Use new paths
mysql-test/t/trigger.test:
Use new paths
mysql-test/t/type_blob.test:
Use new paths
mysql-test/t/type_varchar.test:
Use new paths
mysql-test/t/upgrade.test:
Use new paths
mysql-test/t/user_var-binlog.test:
Use new paths
mysql-test/t/varbinary.test:
Use new paths
mysql-test/t/view.test:
Use new paths
mysql-test/t/warnings.test:
Use new paths
mysql-test/lib/My/ConfigFactory.pm:
Initial version
mysql-test/lib/My/Find.pm:
Initial version
mysql-test/lib/My/SafeProcess.pm:
Initial version
mysql-test/std_data/ndb_config_config.ini:
Add "old" style config.ini for ndb
mysql-test/suite/federated/disabled.def:
Move disabled federated to it's new suite
mysql-test/suite/federated/my.cnf:
Add config for federated
mysql-test/suite/ndb/my.cnf:
Add config for ndb
mysql-test/suite/rpl/my.cnf:
Add config for rpl
mysql-test/suite/rpl/rpl_1slave_base.cnf:
Add base config for rpl
mysql-test/suite/rpl/t/rpl_000015-master.opt:
Use new paths
mysql-test/suite/rpl_ndb/my.cnf:
Add config for rpl_ndb
mysql-test/lib/My/File/Path.pm:
Initial version
mysql-test/lib/My/SafeProcess/Base.pm:
Initial version
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
Initial version
mysql-test/lib/My/SafeProcess/safe_process.pl:
Initial version
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Initial version
mysql-test/lib/t/Base.t:
Initial version
mysql-test/lib/t/Find.t:
Initial version
mysql-test/lib/t/SafeProcess.t:
Initial version
mysql-test/lib/t/SafeProcessStress.pl:
Initial version
mysql-test/lib/t/copytree.t:
Initial version
mysql-test/lib/t/dummyd.pl:
Initial version
mysql-test/lib/t/rmtree.t:
Initial version
mysql-test/lib/t/testMyConfig.t:
Initial version
mysql-test/lib/t/testMyConfigFactory.t:
Initial version
mysql-test/lib/t/test_child.pl:
Initial version
mysql-test/include/default_my.cnf:
Add default config file used when no suite specific file is found
mysql-test/include/default_mysqld.cnf:
New BitKeeper file ``mysql-test/include/default_mysqld.cnf''
mysql-test/include/default_ndbd.cnf:
Add default settings for all ndbds
mysql-test/lib/mtr_settings.pl:
Initial version
Diffstat (limited to 'mysql-test/t')
58 files changed, 314 insertions, 2640 deletions
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test index cdbf7b69615..61e80ec682e 100644 --- a/mysql-test/t/backup.test +++ b/mysql-test/t/backup.test @@ -1,6 +1,6 @@ # The server need to be started in $MYSQLTEST_VARDIR since it -# uses ../std_data_ln/ +# uses ../../std_data/ -- source include/uses_vardir.inc # @@ -16,41 +16,41 @@ drop table if exists t1, t2, t3, t4; --enable_warnings create table t4(n int); --replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -backup table t4 to '../bogus'; -backup table t4 to '../tmp'; +backup table t4 to '../../bogus'; +backup table t4 to '../../tmp'; --replace_result ": 7" ": X" ": 17" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -backup table t4 to '../tmp'; +backup table t4 to '../../tmp'; drop table t4; -restore table t4 from '../tmp'; +restore table t4 from '../../tmp'; select count(*) from t4; create table t1(n int); insert into t1 values (23),(45),(67); -backup table t1 to '../tmp'; +backup table t1 to '../../tmp'; drop table t1; --replace_result ": 1" ": X" ": 2" ": X" ": 22" ": X" ": 23" ": X" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -restore table t1 from '../bogus'; -restore table t1 from '../tmp'; +restore table t1 from '../../bogus'; +restore table t1 from '../../tmp'; select n from t1; create table t2(m int not null primary key); create table t3(k int not null primary key); insert into t2 values (123),(145),(167); insert into t3 values (223),(245),(267); -backup table t2,t3 to '../tmp'; +backup table t2,t3 to '../../tmp'; drop table t1,t2,t3; -restore table t1,t2,t3 from '../tmp'; +restore table t1,t2,t3 from '../../tmp'; select n from t1; select m from t2; select k from t3; drop table t1,t2,t3,t4; -restore table t1 from '../tmp'; +restore table t1 from '../../tmp'; connection con2; rename table t1 to t5; --send lock tables t5 write; connection con1; --send -backup table t5 to '../tmp'; +backup table t5 to '../../tmp'; connection con2; reap; unlock tables; @@ -80,11 +80,11 @@ DROP TABLE IF EXISTS `t+1`; --enable_warnings CREATE TABLE `t+1` (c1 INT); INSERT INTO `t+1` VALUES (1), (2), (3); -BACKUP TABLE `t+1` TO '../tmp'; +BACKUP TABLE `t+1` TO '../../tmp'; DROP TABLE `t+1`; # # Same for restore. -RESTORE TABLE `t+1` FROM '../tmp'; +RESTORE TABLE `t+1` FROM '../../tmp'; SELECT * FROM `t+1`; DROP TABLE `t+1`; diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test index 203ba9b2914..db89269b35d 100644 --- a/mysql-test/t/bootstrap.test +++ b/mysql-test/t/bootstrap.test @@ -6,6 +6,10 @@ drop table if exists t1; --enable_warnings +# Add the datadir to the bootstrap command +let $MYSQLD_DATADIR= `select @@datadir`; +let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR; + # # Check that --bootstrap reads from stdin # diff --git a/mysql-test/t/crash_commit_before.test b/mysql-test/t/crash_commit_before.test index 4e212d81e66..e3dba58d4df 100644 --- a/mysql-test/t/crash_commit_before.test +++ b/mysql-test/t/crash_commit_before.test @@ -15,7 +15,7 @@ insert into t1 values(9); SET SESSION debug="d,crash_commit_before"; # Write file to make mysql-test-run.pl expect crash and restart ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/master0.expect +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect # Run the crashing query --error 2013 diff --git a/mysql-test/t/create_not_windows.test b/mysql-test/t/create_not_windows.test index 56b4002106d..b612e31e3aa 100644 --- a/mysql-test/t/create_not_windows.test +++ b/mysql-test/t/create_not_windows.test @@ -29,7 +29,8 @@ drop table if exists t1; --enable_warnings create table t1(a int) engine=myisam; insert into t1 values(1); ---system rm -f $MYSQLTEST_VARDIR/master-data/test/t1.frm +let $MYSQLD_DATADIR= `select @@datadir`; +remove_file $MYSQLD_DATADIR/test/t1.frm; --echo "We get an error because the table is in the definition cache" --error ER_TABLE_EXISTS_ERROR create table t1(a int, b int); diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 6c83fbfdc9c..4cb300a223f 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1406,7 +1406,8 @@ DROP TABLE test_repair_table; # CREATE TABLE test_repair_table2 ( val integer not null ) ENGINE = CSV; ---remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM +let $MYSQLD_DATADIR= `select @@datadir`; +--remove_file $MYSQLD_DATADIR/test/test_repair_table2.CSM # Should give a warning and perform autorepair. We also disable ps-protocol # here, as mysql-test eats up warnings in ps-protocol mode @@ -1417,15 +1418,15 @@ SELECT * from test_repair_table2; # this should work ok, as the table is already repaired SELECT * from test_repair_table2; # check that the metafile appeared again. ---file_exists $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM +--file_exists $MYSQLD_DATADIR/test/test_repair_table2.CSM CHECK TABLE test_repair_table2; DROP TABLE test_repair_table2; # Corrupt csv file and see if we can repair it CREATE TABLE test_repair_table3 ( val integer not null ) ENGINE = CSV; ---remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV ---write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV +--remove_file $MYSQLD_DATADIR/test/test_repair_table3.CSV +--write_file $MYSQLD_DATADIR/test/test_repair_table3.CSV "1" "4" "3 @@ -1444,7 +1445,7 @@ CREATE TABLE test_repair_table4 ( founded char(4) DEFAULT '' NOT NULL ) ENGINE = CSV; ---remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table4.CSM +--remove_file $MYSQLD_DATADIR/test/test_repair_table4.CSM --disable_ps_protocol SELECT * FROM test_repair_table4; --enable_ps_protocol @@ -1477,8 +1478,8 @@ CREATE TABLE test_repair_table5 ( ) ENGINE = CSV; # Corrupt a table -- put a file with wrong # of columns ---remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV ---write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV +--remove_file $MYSQLD_DATADIR/test/test_repair_table5.CSV +--write_file $MYSQLD_DATADIR/test/test_repair_table5.CSV "1","101","IBM" EOF @@ -1489,7 +1490,7 @@ INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876); SELECT * FROM test_repair_table5; # Corrupt a table -- put a row with wrong # of columns at end of file ---append_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV +--append_file $MYSQLD_DATADIR/test/test_repair_table5.CSV "1","101","IBM" EOF @@ -1502,7 +1503,7 @@ INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876); SELECT * FROM test_repair_table5; # Corrupt table again -- put a row with wrong # of columns at end of file ---append_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV +--append_file $MYSQLD_DATADIR/test/test_repair_table5.CSV "1","101","IBM" EOF @@ -1585,14 +1586,14 @@ drop table t1; create table bug15205 (val int(11) not null) engine=csv; create table bug15205_2 (val int(11) not null) engine=csv; ---remove_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV +--remove_file $MYSQLD_DATADIR/test/bug15205.CSV # system error (can't open the datafile) --replace_result $MYSQLTEST_VARDIR . master-data/ '' --error 13 select * from bug15205; select * from bug15205_2; # Create empty file ---write_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV +--write_file $MYSQLD_DATADIR/test/bug15205.CSV EOF select * from bug15205; drop table bug15205; @@ -1631,16 +1632,16 @@ insert into bug22080_1 values(2,'string'); insert into bug22080_1 values(3,'string'); # Create first corrupt file as described in bug report ---remove_file $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV ---write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV +--remove_file $MYSQLD_DATADIR/test/bug22080_2.CSV +--write_file $MYSQLD_DATADIR/test/bug22080_2.CSV 1,"string" 2","string" 3,"string" EOF # Create second corrupt file as described in bug report ---remove_file $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV ---write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV +--remove_file $MYSQLD_DATADIR/test/bug22080_3.CSV +--write_file $MYSQLD_DATADIR/test/bug22080_3.CSV 1,"string" "2",string" 3,"string" @@ -1700,8 +1701,8 @@ check table t1; drop table t1; create table t1(a int not null, b int not null) engine=csv; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV ---write_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV +--remove_file $MYSQLD_DATADIR/test/t1.CSV +--write_file $MYSQLD_DATADIR/test/t1.CSV 1, 1E-2 -2E2, .9 -10E-1, -.9 diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test index 5f3357e0406..b1d7d49adc9 100644 --- a/mysql-test/t/ctype_big5.test +++ b/mysql-test/t/ctype_big5.test @@ -73,11 +73,12 @@ create table t1 (a blob); insert into t1 values (0xEE00); select * into outfile 'test/t1.txt' from t1; delete from t1; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---eval select hex(load_file('$MYSQLTEST_VARDIR/master-data/test/t1.txt')); +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--eval select hex(load_file('$MYSQLD_DATADIR/test/t1.txt')); load data infile 't1.txt' into table t1; select hex(a) from t1; ---exec rm $MYSQLTEST_VARDIR/master-data/test/t1.txt +--remove_file $MYSQLD_DATADIR/test/t1.txt drop table t1; --echo End of 5.0 tests diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index ab50548499f..ec4385412d0 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -4,12 +4,10 @@ # # Separate the test case name and the comment with ':'. # -# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment> +# <testcasename> : BUG#<xxxx> <comment> # # Do not use any TAB characters for whitespace. # ############################################################################## -user_limits : Bug#23921 random failure of user_limits.test - -concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences -federated_transactions : Bug#29523 Transactions do not work +user_limits : Bug#23921 random failure of user_limits.test +concurrent_innodb : BUG#21579 innodb_concurrent random failures with varying differences diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index bfdb5f8b9f8..60715c8e9cc 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -490,13 +490,13 @@ DROP TABLE t1; #default NULL); # #SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE -#'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; -#LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2; +#'../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +#LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2; #--exec rm $MYSQL_TEST_DIR/var/tmp/data1.tmp # #SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE -#'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; -#LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2; +#'../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +#LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2; #--exec rm $MYSQL_TEST_DIR/var/tmp/data2.tmp # #SELECT @v19, @v20; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test deleted file mode 100644 index 90f1fa36bb4..00000000000 --- a/mysql-test/t/federated.test +++ /dev/null @@ -1,1769 +0,0 @@ -# should work with embedded server after mysqltest is fixed ---source include/not_embedded.inc ---source include/federated.inc - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; -# test too many items (malformed) in the comment string url ---error 1432 -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:@/too/many/items/federated/t1'; - -# test not enough items (malformed) in the comment string url ---error 1432 -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1'; - -# test non-existant table ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'; ---error 1431 -SELECT * FROM federated.t1; -DROP TABLE federated.t1; - -# test bad user/password ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1'; ---error 1429 -SELECT * FROM federated.t1; -DROP TABLE federated.t1; - -# # correct connection, same named tables ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); -INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); - -SELECT * FROM federated.t1; -DELETE FROM federated.t1; -DROP TABLE federated.t1; - -# correct connection, differently named tables -DROP TABLE IF EXISTS federated.t2; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t2 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval SHOW CREATE TABLE federated.t2; - -INSERT INTO federated.t2 (id, name) VALUES (1, 'foo'); -INSERT INTO federated.t2 (id, name) VALUES (2, 'fee'); - -SELECT * FROM federated.t2 ORDER BY id, name; -DROP TABLE federated.t2; - -connection slave; -DROP TABLE IF EXISTS federated.t1; - -DROP TABLE IF EXISTS federated.`t1%`; -CREATE TABLE federated.`t1%` ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%'; - -INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); -INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); - -SELECT * FROM federated.t1 ORDER BY id,name; -DELETE FROM federated.t1; -DROP TABLE IF EXISTS federated.t1; - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.`t1%` ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%'; - -INSERT INTO federated.`t1%` (id, name) VALUES (1, 'foo'); -INSERT INTO federated.`t1%` (id, name) VALUES (2, 'fee'); - -SELECT * FROM federated.`t1%` ORDER BY id, name; -DELETE FROM federated.`t1%`; -DROP TABLE IF EXISTS federated.`t1%`; - -connection slave; -DROP TABLE IF EXISTS federated.`t1%`; - -# I wanted to use timestamp, but results will fail if so!!! -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `other` int(20) NOT NULL default '0', - `created` datetime default '2004-04-04 04:04:04', - PRIMARY KEY (`id`)) - DEFAULT CHARSET=latin1; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `other` int(20) NOT NULL default '0', - `created` datetime default '2004-04-04 04:04:04', - PRIMARY KEY (`id`)) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111); -INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222); -INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333); -INSERT INTO federated.t1 (name, other) VALUES ('Fourth Name', 44444); -INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555); -INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666); -INSERT INTO federated.t1 (name, other) VALUES ('Seventh Name', 77777); -INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888); -INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999); -INSERT INTO federated.t1 (name, other) VALUES ('Tenth Name', 101010); - -# basic select -SELECT * FROM federated.t1; -# with PRIMARY KEY index_read_idx -SELECT * FROM federated.t1 WHERE id = 5; -SELECT * FROM federated.t1 WHERE name = 'Sixth Name'; -SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name'; -SELECT * FROM federated.t1 WHERE name = 'Sixth Name' AND other = 44444; -SELECT * FROM federated.t1 WHERE name like '%th%'; -UPDATE federated.t1 SET name = '3rd name' WHERE id = 3; -SELECT * FROM federated.t1 WHERE name = '3rd name'; -UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name'; -SELECT * FROM federated.t1 WHERE name = 'Third name'; -# rnd_post, ::position -SELECT * FROM federated.t1 ORDER BY id DESC; -SELECT * FROM federated.t1 ORDER BY name; -SELECT * FROM federated.t1 ORDER BY name DESC; -SELECT * FROM federated.t1 ORDER BY name ASC; -SELECT * FROM federated.t1 GROUP BY other; - -# ::delete_row -DELETE FROM federated.t1 WHERE id = 5; -SELECT * FROM federated.t1 WHERE id = 5; - -# ::delete_all_rows -DELETE FROM federated.t1; -SELECT * FROM federated.t1 WHERE id = 5; - -# previous test, but this time with indexes -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `other` int(20) NOT NULL default '0', - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - key name(`name`), - key other(`other`), - key created(`created`)) - DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `other` int(20) NOT NULL default '0', - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - key name(`name`), - key other(`other`), - key created(`created`)) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, other, created) - VALUES ('First Name', 11111, '2004-01-01 01:01:01'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Second Name', 22222, '2004-01-23 02:43:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Third Name', 33333, '2004-02-14 02:14:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Fourth Name', 44444, '2003-04-05 00:00:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Fifth Name', 55555, '2001-02-02 02:02:02'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Sixth Name', 66666, '2005-06-06 15:30:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Seventh Name', 77777, '2003-12-12 18:32:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Eigth Name', 88888, '2005-03-12 11:00:00'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Ninth Name', 99999, '2005-03-12 11:00:01'); -INSERT INTO federated.t1 (name, other, created) - VALUES ('Tenth Name', 101010, '2005-03-12 12:00:01'); - -# basic select -SELECT * FROM federated.t1; -# with PRIMARY KEY index_read_idx -SELECT * FROM federated.t1 WHERE id = 5; -# with regular key index_read -> index_read_idx -# regular and PRIMARY KEY index_read_idx -SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name'; -# with regular key index_read -> index_read_idx -SELECT * FROM federated.t1 WHERE other = 44444; -SELECT * FROM federated.t1 WHERE name like '%th%'; -# update - update_row, index_read_idx -UPDATE federated.t1 SET name = '3rd name' WHERE id = 3; -SELECT * FROM federated.t1 WHERE name = '3rd name'; -# update - update_row, index_read -> index_read_idx -UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name'; -SELECT * FROM federated.t1 WHERE name = 'Third name'; -# rnd_post, ::position -SELECT * FROM federated.t1 ORDER BY id DESC; -SELECT * FROM federated.t1 ORDER BY name; -SELECT * FROM federated.t1 ORDER BY name DESC; -SELECT * FROM federated.t1 ORDER BY name ASC; -SELECT * FROM federated.t1 GROUP BY other; - -# ::delete_row -DELETE FROM federated.t1 WHERE id = 5; -SELECT * FROM federated.t1 WHERE id = 5; - -# ::delete_all_rows -DELETE FROM federated.t1; -SELECT * FROM federated.t1 WHERE id = 5; -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32), - `other` varchar(20), - PRIMARY KEY (`id`) ); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32), - `other` varchar(20), - PRIMARY KEY (`id`) ) - ENGINE="FEDERATED" - DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111); -INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL); -INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333); -INSERT INTO federated.t1 (name, other) VALUES (NULL, NULL); -INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555); -INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666); -INSERT INTO federated.t1 (name) VALUES ('Seventh Name'); -INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888); -INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999); -INSERT INTO federated.t1 (other) VALUES ('fee fie foe fum'); - -SELECT * FROM federated.t1 WHERE other IS NULL; -SELECT * FROM federated.t1 WHERE name IS NULL; -SELECT * FROM federated.t1 WHERE name IS NULL and other IS NULL; -SELECT * FROM federated.t1 WHERE name IS NULL or other IS NULL; - -UPDATE federated.t1 -SET name = 'Fourth Name', other = 'four four four' -WHERE name IS NULL AND other IS NULL; - -UPDATE federated.t1 SET other = 'two two two two' WHERE name = 'Second Name'; -UPDATE federated.t1 SET other = 'seven seven' WHERE name like 'Sev%'; -UPDATE federated.t1 SET name = 'Tenth Name' WHERE other like 'fee fie%'; -SELECT * FROM federated.t1 WHERE name IS NULL OR other IS NULL ; -SELECT * FROM federated.t1; - -# test multi-keys -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL DEFAULT '', - `other` varchar(20) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY nameoth (name, other) ); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `name` varchar(32) NOT NULL DEFAULT '', - `other` varchar(20) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY nameoth (name, other)) - ENGINE="FEDERATED" DEFAULT - CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111'); -INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222'); -INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333'); -SELECT * FROM federated.t1 WHERE name = 'Second Name'; -SELECT * FROM federated.t1 WHERE other = '2222'; -SELECT * FROM federated.t1 WHERE name = 'Third Name'; -SELECT * FROM federated.t1 WHERE name = 'Third Name' AND other = '3333'; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int NOT NULL auto_increment, - `name` char(32) NOT NULL DEFAULT '', - `bincol` binary(1) NOT NULL, - `floatval` decimal(5,2) NOT NULL DEFAULT 0.0, - `other` int NOT NULL DEFAULT 0, - PRIMARY KEY (id), - KEY nameoth(name, other), - KEY bincol(bincol), - KEY floatval(floatval)); - -# test other types of indexes -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int NOT NULL auto_increment, - `name` char(32) NOT NULL DEFAULT '', - `bincol` binary(1) NOT NULL, - `floatval` decimal(5,2) NOT NULL DEFAULT 0.0, - `other` int NOT NULL DEFAULT 0, - PRIMARY KEY (id), - KEY nameoth(name,other), - KEY bincol(bincol), - KEY floatval(floatval)) - ENGINE="FEDERATED" - DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, bincol, floatval, other) - VALUES ('first', 0x65, 11.11, 1111); -INSERT INTO federated.t1 (name, bincol, floatval, other) - VALUES ('second', 0x66, 22.22, 2222); -INSERT INTO federated.t1 (name, bincol, floatval, other) - VALUES ('third', 'g', 22.22, 2222); -SELECT * FROM federated.t1; -SELECT * FROM federated.t1 WHERE name = 'second'; -SELECT * FROM federated.t1 WHERE bincol= 'f'; -SELECT * FROM federated.t1 WHERE bincol= 0x66; -SELECT * FROM federated.t1 WHERE bincol= 0x67; -SELECT * FROM federated.t1 WHERE bincol= 'g'; -SELECT * FROM federated.t1 WHERE floatval=11.11; -SELECT * FROM federated.t1 WHERE name='third'; -SELECT * FROM federated.t1 WHERE other=2222; -SELECT * FROM federated.t1 WHERE name='third' and other=2222; - -# more multi-column indexes, in the primary key -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int NOT NULL auto_increment, - `col1` int(10) NOT NULL DEFAULT 0, - `col2` varchar(64) NOT NULL DEFAULT '', - `col3` int(20) NOT NULL, - `col4` int(40) NOT NULL, - primary key (`id`, `col1`, `col2`, `col3`, `col4`), - key col1(col1), - key col2(col2), - key col3(col3), - key col4(col4)); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int NOT NULL auto_increment, - `col1` int(10) NOT NULL DEFAULT 0, - `col2` varchar(64) NOT NULL DEFAULT '', - `col3` int(20) NOT NULL, - `col4` int(40) NOT NULL, - primary key (`id`, `col1`, `col2`, `col3`, `col4`), - key col1(col1), - key col2(col2), - key col3(col3), - key col4(col4)) - ENGINE="FEDERATED" - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (1, 'one One', 11, 1111); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (2, 'Two two', 22, 2222); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (3, 'three Three', 33, 33333); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (4, 'fourfourfour', 444, 4444444); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (5, 'five 5 five five 5', 5, 55555); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (6, 'six six Sixsix', 6666, 6); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (7, 'seven Sevenseven', 77777, 7777); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (8, 'eight eight eight', 88888, 88); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (9, 'nine Nine', 999999, 999999); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES (10, 'Tenth ten TEN', 1010101, 1010); - -SELECT * FROM federated.t1 WHERE col2 = 'two two'; -SELECT * FROM federated.t1 WHERE col2 = 'two Two'; -SELECT * FROM federated.t1 WHERE id = 3; -SELECT * FROM federated.t1 WHERE id = 3 AND col1 = 3; -SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'Two two'; -SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'fourfourfour'; -SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5' - AND col3 = 5; -SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5' - AND col3 = 5 - AND col4 = 55555; -SELECT * FROM federated.t1 WHERE id = 5 - AND col2 = 'Two two' AND col3 = 22 - AND col4 = 33; -SELECT * FROM federated.t1 WHERE id = 5 - AND col2 = 'five 5 five five 5' AND col3 = 5 - AND col4 = 55555; -SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'five 5 five five 5') - OR (col2 = 'three Three' AND col3 = 33); -SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'Two two') - OR (col2 = 444 AND col3 = 4444444); -SELECT * FROM federated.t1 WHERE id = 1 - OR col1 = 10 - OR col2 = 'Two two' - OR col3 = 33 - OR col4 = 4444444; -SELECT * FROM federated.t1 WHERE id > 5; -SELECT * FROM federated.t1 WHERE id >= 5; -SELECT * FROM federated.t1 WHERE id < 5; -SELECT * FROM federated.t1 WHERE id <= 5; -SELECT * FROM federated.t1 WHERE id != 5; -SELECT * FROM federated.t1 WHERE id > 3 AND id < 7; -SELECT * FROM federated.t1 WHERE id > 3 AND id <= 7; -SELECT * FROM federated.t1 WHERE id >= 3 AND id <= 7; -SELECT * FROM federated.t1 WHERE id < 3 AND id <= 7; -SELECT * FROM federated.t1 WHERE id < 3 AND id > 7; -SELECT * FROM federated.t1 WHERE id < 3 OR id > 7; -SELECT * FROM federated.t1 WHERE col2 = 'three Three'; -SELECT * FROM federated.t1 WHERE col2 > 'one'; -SELECT * FROM federated.t1 WHERE col2 LIKE 's%'; -SELECT * FROM federated.t1 WHERE col2 LIKE 'si%'; -SELECT * FROM federated.t1 WHERE col2 LIKE 'se%'; -SELECT * FROM federated.t1 WHERE col2 NOT LIKE 'e%'; -SELECT * FROM federated.t1 WHERE col2 <> 'one One'; - -# more multi-column indexes, in the primary key -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `col1` varchar(8) NOT NULL DEFAULT '', - `col2` varchar(128) NOT NULL DEFAULT '', - `col3` varchar(20) NOT NULL DEFAULT '', - `col4` varchar(40) NOT NULL DEFAULT '', - primary key (`col1`, `col2`, `col3`, `col4`), - key 3key(`col2`,`col3`,`col4`), - key 2key (`col3`,`col4`), - key col4(col4)); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `col1` varchar(8) NOT NULL DEFAULT '', - `col2` varchar(128) NOT NULL DEFAULT '', - `col3` varchar(20) NOT NULL DEFAULT '', - `col4` varchar(40) NOT NULL DEFAULT '', - primary key (`col1`, `col2`, `col3`, `col4`), - key 3key(`col2`,`col3`,`col4`), - key 2key (`col3`,`col4`), - key col4(col4)) - ENGINE="FEDERATED" - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('aaaa', 'aaaaaaaaaaaaaaaaaaa', 'ababababab', 'acacacacacacacac'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('bbbb', 'bbbbbbbbbbbbbbbbbbb', 'bababababa', 'bcbcbcbcbcbcbcbc'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('cccc', 'ccccccccccccccccccc', 'cacacacaca', 'cbcbcbcbcbcbcbcb'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('dddd', 'ddddddddddddddddddd', 'dadadadada', 'dcdcdcdcdcdcdcdc'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('eeee', 'eeeeeeeeeeeeeeeeeee', 'eaeaeaeaea', 'ecececececececec'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('ffff', 'fffffffffffffffffff', 'fafafafafa', 'fcfcfcfcfcfcfcfc'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('gggg', 'ggggggggggggggggggg', 'gagagagaga', 'gcgcgcgcgcgcgcgc'); -INSERT INTO federated.t1 (col1, col2, col3, col4) - VALUES ('hhhh', 'hhhhhhhhhhhhhhhhhhh', 'hahahahaha', 'hchchchchchchchc'); - -SELECT * FROM federated.t1 WHERE col1 = 'cccc'; -SELECT * FROM federated.t1 WHERE col2 = 'eeeeeeeeeeeeeeeeeee'; -SELECT * FROM federated.t1 WHERE col3 = 'bababababa'; -SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col2 = 'ggggggggggggggggggg'; -SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col3 = 'gagagagaga'; -SELECT * FROM federated.t1 WHERE col1 = 'ffff' AND col4 = 'fcfcfcfcfcfcfcfc'; -SELECT * FROM federated.t1 WHERE col1 > 'bbbb'; -SELECT * FROM federated.t1 WHERE col1 >= 'bbbb'; -SELECT * FROM federated.t1 WHERE col1 < 'bbbb'; -SELECT * FROM federated.t1 WHERE col1 <= 'bbbb'; -SELECT * FROM federated.t1 WHERE col1 <> 'bbbb'; -SELECT * FROM federated.t1 WHERE col1 LIKE 'b%'; -SELECT * FROM federated.t1 WHERE col4 LIKE '%b%'; -SELECT * FROM federated.t1 WHERE col1 NOT LIKE 'c%'; -SELECT * FROM federated.t1 WHERE col4 NOT LIKE '%c%'; -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `col1` varchar(8) NOT NULL DEFAULT '', - `col2` int(8) NOT NULL DEFAULT 0, - `col3` varchar(8) NOT NULL DEFAULT '', - primary key (`col1`, `col2`, `col3`)); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `col1` varchar(8) NOT NULL DEFAULT '', - `col2` varchar(8) NOT NULL DEFAULT '', - `col3` varchar(8) NOT NULL DEFAULT '', - primary key (`col1`, `col2`, `col3`)) - ENGINE="FEDERATED" - DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES ('a00', '110', 'cc0'); -INSERT INTO federated.t1 VALUES ('aaa', '111', 'ccc'); -INSERT INTO federated.t1 VALUES ('bbb', '222', 'yyy'); -INSERT INTO federated.t1 VALUES ('ccc', '111', 'zzz'); -INSERT INTO federated.t1 VALUES ('ccd', '112', 'zzzz'); - -# let's see what the foreign database says -connection slave; -SELECT col3 FROM federated.t1 WHERE ( -(col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND -(col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111')); - -connection master; -SELECT col3 FROM federated.t1 WHERE ( -(col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND -(col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111')); - -# test NULLs -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int, - `name` varchar(32), - `floatval` float, - `other` int) -DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int, - `name` varchar(32), - `floatval` float, - `other` int) -ENGINE="FEDERATED" -DEFAULT CHARSET=latin1 -CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -# these both should be the same -INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL); -INSERT INTO federated.t1 values (); -INSERT INTO federated.t1 (id) VALUES (1); -INSERT INTO federated.t1 (name, floatval, other) - VALUES ('foo', 33.33333332, NULL); -INSERT INTO federated.t1 (name, floatval, other) - VALUES (0, 00.3333, NULL); -SELECT * FROM federated.t1; -SELECT count(*) FROM federated.t1 -WHERE id IS NULL -AND name IS NULL -AND floatval IS NULL -AND other IS NULL; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `blurb_id` int NOT NULL DEFAULT 0, - `blurb` text default '', - PRIMARY KEY (blurb_id)) - DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `blurb_id` int NOT NULL DEFAULT 0, - `blurb` text default '', - PRIMARY KEY (blurb_id)) - ENGINE="FEDERATED" - DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values."); -INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE."); -INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. "); -INSERT INTO federated.t1 VALUES(4, "Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt:"); -SELECT * FROM federated.t1; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `a` int NOT NULL, - `b` int NOT NULL, - `c` int NOT NULL, - PRIMARY KEY (a),key(b)); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `a` int NOT NULL, - `b` int NOT NULL, - `c` int NOT NULL, - PRIMARY KEY (a), - KEY (b)) - ENGINE="FEDERATED" - DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4); - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 -int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 -int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, -i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 -int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, -i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 -int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, -i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 -int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, -i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 -int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, -i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 -int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 -int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 -int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 -int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 -int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 -int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 -int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 -int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 -int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 -int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 -int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 -int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 -int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 -int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 -int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 -int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 -int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 -int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 -int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 -int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 -int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 -int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 -int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 -int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 -int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 -int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 -int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 -int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 -int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 -int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 -int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 -int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 -int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 -int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 -int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 -int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 -int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 -int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 -int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 -int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 -int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 -int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 -int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 -int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 -int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 -int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 -int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 -int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 -int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 -int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 -int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 -int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 -int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 -int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 -int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 -int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 -int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 -int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 -int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 -int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 -int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 -int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 -int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 -int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 -int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 -int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 -int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 -int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 -int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 -int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 -int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 -int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 -int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 -int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 -int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 -int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 -int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 -int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 -int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 -int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 -int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 -int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 -int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 -int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 -int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 -int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 -int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 -int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 -int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 -int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 -int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 -int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 -int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 -int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 -int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 -int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 -int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 -int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 -int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 -int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 -int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 -int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 -int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 -int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 -int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 -int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 -int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 -int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 -int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 -int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 -int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 -int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 -int, i999 int, i1000 int, b varchar(256)) row_format=dynamic; - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 -(i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 -int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, -i17 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, -i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 -int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, -i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 -int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, -i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 -int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, -i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 -int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, -i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 -int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 -int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 -int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 -int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 -int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 -int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 -int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 -int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 -int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 -int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 -int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 -int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 -int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 -int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 -int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 -int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 -int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 -int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 -int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 -int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 -int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 -int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 -int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 -int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 -int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 -int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 -int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 -int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 -int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 -int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 -int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 -int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 -int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 -int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 -int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 -int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 -int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 -int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 -int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 -int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 -int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 -int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 -int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 -int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 -int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 -int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 -int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 -int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 -int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 -int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 -int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 -int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 -int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 -int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 -int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 -int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 -int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 -int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 -int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 -int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 -int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 -int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 -int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 -int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 -int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 -int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 -int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 -int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 -int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 -int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 -int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 -int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 -int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 -int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 -int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 -int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 -int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 -int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 -int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 -int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 -int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 -int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 -int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 -int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 -int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 -int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 -int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 -int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 -int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 -int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 -int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 -int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 -int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 -int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 -int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 -int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 -int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 -int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 -int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 -int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 -int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 -int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 -int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 -int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 -int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 -int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 -int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 -int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 -int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 -int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 -int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 -int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 -int, i999 int, i1000 int, b varchar(256)) -row_format=dynamic -ENGINE="FEDERATED" -DEFAULT CHARSET=latin1 -CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 -values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG"); -UPDATE federated.t1 SET b=repeat('a',256); -UPDATE federated.t1 SET i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0; -SELECT * FROM federated.t1 WHERE i9=0 and i10=0; -UPDATE federated.t1 SET i50=20; -SELECT * FROM federated.t1; -DELETE FROM federated.t1 WHERE i51=20; -SELECT * FROM federated.t1; -DELETE FROM federated.t1 WHERE i50=20; -SELECT * FROM federated.t1; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', PRIMARY KEY(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1; - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - id int NOT NULL auto_increment, - code char(20) NOT NULL, - fileguts blob NOT NULL, - creation_date datetime, - entered_time datetime default '2004-04-04 04:04:04', - PRIMARY KEY(id), - index(code), - index(fileguts(10))) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; -INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03'); -INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04'); -INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04'); -SELECT * FROM federated.t1; -# test blob indexes -SELECT * FROM federated.t1 WHERE fileguts = 'jimbob'; - -# test blob with binary -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 (`a` BLOB); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `a` BLOB) -ENGINE="FEDERATED" -CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES (0x00); -INSERT INTO federated.t1 VALUES (0x0001); -INSERT INTO federated.t1 VALUES (0x0100); -SELECT HEX(a) FROM federated.t1; - -# # simple tests for cyrillic, given to me by -# DROP TABLE IF EXISTS federated.t1; -# --replace_result $SLAVE_MYPORT SLAVE_PORT -# eval CREATE TABLE federated.t1 -# (a char(20)) charset=cp1251 -# ENGINE="FEDERATED" CONNECTION="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1"; -# # -# connection slave; -# DROP TABLE IF EXISTS federated.t1; -# CREATE TABLE federated.t1 (a char(20)) charset=cp1251; -# # -# connection master; -# INSERT INTO federated.t1 values (_cp1251'À-ÁÂÃ-1'); -# INSERT INTO federated.t1 values (_cp1251'Á-ÂÃÄ-2'); -# SELECT * FROM federated.t1; -# SET names cp1251; -# INSERT INTO federated.t1 values ('Â-ÃÄÅ-3'); -# INSERT INTO federated.t1 values ('Ã-ŨÆ-4'); -# SELECT * FROM federated.t1; -# SELECT hex(a) from federated.t1; -# SELECT hex(a) from federated.t1 ORDER BY a desc; -# UPDATE federated.t1 SET a='À-ÁÂÃ-1íîâûé' WHERE a='À-ÁÂÃ-1'; -# SELECT * FROM federated.t1; -# DELETE FROM federated.t1 WHERE a='Ã-ŨÆ-4'; -# SELECT * FROM federated.t1; -# DELETE FROM federated.t1 WHERE a>'Â-'; -# SELECT * FROM federated.t1; -# SET names default; -# DROP TABLE IF EXISTS federated.t1; - -# -# DROP TABLE IF EXISTS federated.t1; -# - -# test joins with non-federated table -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `country_id` int(20) NOT NULL DEFAULT 0, - `name` varchar(32), - `other` varchar(20), - PRIMARY KEY (`id`), - key (country_id)); - -connection master; -DROP TABLE IF EXISTS federated.countries; -CREATE TABLE federated.countries ( - `id` int(20) NOT NULL auto_increment, - `country` varchar(32), - PRIMARY KEY (id)); -INSERT INTO federated.countries (country) VALUES ('India'); -INSERT INTO federated.countries (country) VALUES ('Germany'); -INSERT INTO federated.countries (country) VALUES ('Italy'); -INSERT INTO federated.countries (country) VALUES ('Finland'); -INSERT INTO federated.countries (country) VALUES ('Ukraine'); - -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - `country_id` int(20) NOT NULL DEFAULT 0, - `name` varchar(32), - `other` varchar(20), - PRIMARY KEY (`id`), - KEY (country_id) ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111); -INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222); -INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333); -INSERT INTO federated.t1 (name, country_id, other) VALUES ('Monty', 4, 33333); -INSERT INTO federated.t1 (name, country_id, other) VALUES ('Sanja', 5, 33333); - -#inner join -SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, -federated.t1.other AS other, federated.countries.country AS country -FROM federated.t1, federated.countries WHERE -federated.t1.country_id = federated.countries.id; - -SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, -federated.t1.other AS other, federated.countries.country AS country -FROM federated.t1 INNER JOIN federated.countries ON -federated.t1.country_id = federated.countries.id; - -SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, -federated.t1.other AS other, federated.countries.country AS country -FROM federated.t1 INNER JOIN federated.countries ON -federated.t1.country_id = federated.countries.id -WHERE federated.t1.name = 'Monty'; - -#left join -SELECT federated.t1.*, federated.countries.country -FROM federated.t1 LEFT JOIN federated.countries -ON federated.t1.country_id = federated.countries.id -ORDER BY federated.countries.id; - -SELECT federated.t1.*, federated.countries.country -FROM federated.t1 LEFT JOIN federated.countries -ON federated.t1.country_id = federated.countries.id -ORDER BY federated.countries.country; - -#right join -SELECT federated.t1.*, federated.countries.country -FROM federated.t1 RIGHT JOIN federated.countries -ON federated.t1.country_id = federated.countries.id -ORDER BY federated.t1.country_id; - -DROP TABLE federated.countries; - -#BEGIN optimize and repair tests -OPTIMIZE TABLE federated.t1; -REPAIR TABLE federated.t1; -REPAIR TABLE federated.t1 QUICK; -REPAIR TABLE federated.t1 EXTENDED; -REPAIR TABLE federated.t1 USE_FRM; -#END optimize and repair tests - - -# BEGIN ALTER TEST -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.normal_table; ---enable_warnings - -CREATE TABLE federated.normal_table ( - `id` int(4) NOT NULL, - `name` varchar(10) default NULL - ) DEFAULT CHARSET=latin1; - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.alter_me; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.alter_me ( - `id` int(4) NOT NULL, - `name` varchar(10) default NULL, - PRIMARY KEY (`id`) - ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/normal_table'; - -INSERT INTO federated.alter_me (id, name) VALUES (1, 'Monty'); -INSERT INTO federated.alter_me (id, name) VALUES (2, 'David'); - -SELECT * FROM federated.alter_me; - ---error 1031 -ALTER TABLE federated.alter_me MODIFY COLUMN id int(16) NOT NULL; - -SELECT * FROM federated.alter_me; - -DROP TABLE federated.alter_me; -connection slave; -DROP TABLE federated.normal_table; -# END ALTER TEST - -# -# Test BUG #14532 - bit columns broken in federated -# storage engine -# ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings -CREATE TABLE federated.t1 ( - `bitty` bit(3) -) DEFAULT CHARSET=latin1; - -connection master; - ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `bitty` bit(3) -) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES (b'001'); -INSERT INTO federated.t1 VALUES (b'010'); -INSERT INTO federated.t1 VALUES (b'011'); -INSERT INTO federated.t1 VALUES (b'100'); -INSERT INTO federated.t1 VALUES (b'101'); -INSERT INTO federated.t1 VALUES (b'110'); -INSERT INTO federated.t1 VALUES (b'111'); -select * FROM federated.t1; -drop table federated.t1; - -connection slave; -drop table federated.t1; - -# -# BUG# 14768 test auto_increment last_insert_id() -# -connection slave; -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - PRIMARY KEY (`id`)); - -connection master; -DROP TABLE IF EXISTS federated.t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL auto_increment, - PRIMARY KEY (`id`) - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -INSERT INTO federated.t1 VALUES (); -SELECT LAST_INSERT_ID(); -INSERT INTO federated.t1 VALUES (); -SELECT LAST_INSERT_ID(); -INSERT INTO federated.t1 VALUES (); -SELECT LAST_INSERT_ID(); -INSERT INTO federated.t1 VALUES (); -SELECT LAST_INSERT_ID(); -INSERT INTO federated.t1 VALUES (); -SELECT LAST_INSERT_ID(); -SELECT * FROM federated.t1; -DROP TABLE federated.t1; - -connection slave; -DROP TABLE federated.t1; - -# -# Bug#17377 Federated Engine returns wrong Data, always the rows -# with the highest ID -# - -connection slave; - ---disable_warnings -DROP TABLE IF EXISTS federated.bug_17377_table; ---enable_warnings - -CREATE TABLE federated.bug_17377_table ( -`fld_cid` bigint(20) NOT NULL auto_increment, -`fld_name` varchar(255) NOT NULL default '', -`fld_parentid` bigint(20) NOT NULL default '0', -`fld_delt` int(1) NOT NULL default '0', -PRIMARY KEY (`fld_cid`), -KEY `fld_parentid` (`fld_parentid`), -KEY `fld_delt` (`fld_delt`), -KEY `fld_cid` (`fld_cid`) -) ENGINE=MyISAM; - -# Insert some test-data -insert into federated.bug_17377_table( fld_name ) -values -("Mats"), ("Sivert"), ("Sigvard"), ("Torgny"), ("Torkel"); - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( -`fld_cid` bigint(20) NOT NULL auto_increment, -`fld_name` varchar(255) NOT NULL default '', -`fld_parentid` bigint(20) NOT NULL default '0', -`fld_delt` int(1) NOT NULL default '0', -PRIMARY KEY (`fld_cid`), -KEY `fld_parentid` (`fld_parentid`), -KEY `fld_delt` (`fld_delt`), -KEY `fld_cid` (`fld_cid`) -) ENGINE=FEDERATED -CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/bug_17377_table'; - -select * from federated.t1 where fld_parentid=0 and fld_delt=0 -order by fld_name; - -select * from federated.t1 where fld_parentid=0 and fld_delt=0; - -DROP TABLE federated.t1; -connection slave; -DROP TABLE federated.bug_17377_table; - -# -# Test multi updates and deletes without keys -# - -# The following can be enabled when bug #19773 has been fixed ---disable_parsing -connection slave; -create table federated.t1 (i1 int, i2 int, i3 int); -create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)); -connection master; -eval create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; -eval create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2'; -insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2); -insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test"); -select * from federated.t1 order by i1; -select * from federated.t2; -update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -delete t1.*,t2.* from federated.t1,federated.t2 where t1.i2=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -drop table federated.t1, federated.t2; -connection slave; -drop table federated.t1, federated.t2; -connection master; - -# Test multi updates and deletes with keys - -connection slave; -create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1)); -create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id)); -connection master; -eval create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; -eval create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2'; -insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2); -insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test"); -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -delete t1.*,t2.* from federated.t1,federated.t2 where t1.i2=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -drop table federated.t1, federated.t2; -connection slave; -drop table federated.t1, federated.t2; -connection master; ---enable_parsing - -# -# BUG #18764: Delete conditions causing inconsistencies in Federated tables -# -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.test; ---enable_warnings -CREATE TABLE federated.test ( - `id` int(11) NOT NULL, - `val1` varchar(255) NOT NULL, - `val2` varchar(255) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.test_local; -DROP TABLE IF EXISTS federated.test_remote; ---enable_warnings -CREATE TABLE federated.test_local ( - `id` int(11) NOT NULL, - `val1` varchar(255) NOT NULL, - `val2` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -INSERT INTO federated.test_local VALUES (1, 'foo', 'bar'), -(2, 'bar', 'foo'); - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.test_remote ( - `id` int(11) NOT NULL, - `val1` varchar(255) NOT NULL, - `val2` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=FEDERATED DEFAULT CHARSET=latin1 -CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test'; - -insert into federated.test_remote select * from federated.test_local; - -select * from federated.test_remote; - -delete from federated.test_remote where id in (1,2); - -insert into federated.test_remote select * from federated.test_local; - -select * from federated.test_remote; ---disable_warnings -DROP TABLE federated.test_local; -DROP TABLE federated.test_remote; ---enable_warnings -connection slave; ---disable_warnings -DROP TABLE federated.test; ---enable_warnings - -# -# Additional test for bug#18437 "Wrong values inserted with a before -# update trigger on NDB table". SQL-layer didn't properly inform -# handler about fields which were read and set in triggers. In some -# cases this resulted in incorrect (garbage) values of OLD variables -# and lost changes to NEW variables. -# Since for federated engine only operation which is affected by wrong -# fields mark-up is handler::write_row() this file constains coverage -# for ON INSERT triggers only. Tests for other types of triggers reside -# in ndb_trigger.test. -# -connection slave; ---disable_warnings -drop table if exists federated.t1; ---enable_warnings -create table federated.t1 (a int, b int, c int); -connection master; ---disable_warnings -drop table if exists federated.t1; -drop table if exists federated.t2; ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (a int, b int, c int) engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; -create trigger federated.t1_bi before insert on federated.t1 for each row set new.c= new.a * new.b; -create table federated.t2 (a int, b int); -insert into federated.t2 values (13, 17), (19, 23); -# Each of three statements should correctly set values for all three fields -# insert -insert into federated.t1 (a, b) values (1, 2), (3, 5), (7, 11); -select * from federated.t1 order by a; -delete from federated.t1; -# insert ... select -insert into federated.t1 (a, b) select * from federated.t2; -select * from federated.t1 order by a; -delete from federated.t1; -# load -load data infile '../std_data_ln/loaddata5.dat' into table federated.t1 fields terminated by '' enclosed by '' ignore 1 lines (a, b); -select * from federated.t1 order by a; -drop tables federated.t1, federated.t2; - -connection slave; -drop table federated.t1; - -# -# BUG 19773 Crash when using multi-table updates, deletes -# with federated tables -# -connection slave; -create table federated.t1 (i1 int, i2 int, i3 int); -create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)); - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2'; -insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2); -insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test"); -select * from federated.t1 order by i1; -select * from federated.t2; -update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -drop table federated.t1, federated.t2; -connection slave; -drop table federated.t1, federated.t2; - -# Test multi updates and deletes with keys -connection slave; -create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1)); -create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id)); - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2'; -insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2); -insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test"); -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id; -select * from federated.t1 order by i1; -select * from federated.t2 order by id; -drop table federated.t1, federated.t2; - -connection slave; -drop table federated.t1, federated.t2; -# -# Bug #16494: Updates that set a column to NULL fail sometimes -# -connection slave; -create table t1 (id int not null auto_increment primary key, val int); -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table t1 - (id int not null auto_increment primary key, val int) engine=federated - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'; -insert into t1 values (1,0),(2,0); -update t1 set val = NULL where id = 1; -select * from t1; -connection slave; -select * from t1; -drop table t1; -connection master; -drop table t1; - -# -# Bug #17608: String literals lost during INSERT query on FEDERATED table -# -connection slave; -create table t1 (a longblob not null); -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table t1 - (a longblob not null) engine=federated - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'; -insert into t1 values (repeat('a',5000)); -select length(a) from t1; -connection slave; -select length(a) from t1; -drop table t1; -connection master; -drop table t1; - -# -# BUG #15133: unique index with nullable value not accepted in federated table -# - -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.test; -CREATE TABLE federated.test ( - `i` int(11) NOT NULL, - `j` int(11) NOT NULL, - `c` varchar(30) default NULL, - PRIMARY KEY (`i`,`j`), - UNIQUE KEY `i` (`i`,`c`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; ---enable_warnings - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.test1; -DROP TABLE IF EXISTS federated.test2; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.test1 ( - i int not null, - j int not null, - c varchar(30), - primary key (i,j), - unique key (i, c)) -engine = federated -connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test'; - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.test2 ( - i int default null, - j int not null, - c varchar(30), - key (i)) -engine = federated -connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test'; -drop table federated.test1, federated.test2; - -connection slave; -drop table federated.test; - -# -# BUG# 17044 Federated Storage Engine not UTF8 clean -# -connection slave; -set names utf8; -create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8; - -insert into federated.t1 values (0x6DC3A56E6164); -select hex(a) from federated.t1; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (a varchar(64)) -ENGINE=FEDERATED -connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' -DEFAULT CHARSET=utf8; -set names utf8; -select hex(a) from federated.t1; -insert into federated.t1 values (0xC3A4C3B6C3BCC39F); -insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E); -select hex(a) from federated.t1; - -connection slave; -select hex(a) from federated.t1; - -connection master; -drop table federated.t1; - -connection slave; -drop table federated.t1; - -# -# Bug#26909: Specified key was too long; max key length is 255 bytes -# when creating a table -# -connection slave; -CREATE TABLE federated.t1 ( - categoryId int(11) NOT NULL AUTO_INCREMENT, - domainId varchar(745) NOT NULL DEFAULT '', - categoryName varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (categoryId), - UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName), - KEY idx_category_domainId (domainId) - ) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - categoryId int(11) NOT NULL AUTO_INCREMENT, - domainId varchar(745) NOT NULL DEFAULT '', - categoryName varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (categoryId), - UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName), - KEY idx_category_domainId (domainId) - ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - - -insert into federated.t1 (domainId, categoryName) values ( '1231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231 300', '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 250'); -insert into federated.t1 (domainId, categoryName) values ( '12312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312 301', '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 250'); -insert into federated.t1 (domainId, categoryName) values ('a', 'b'); - -select categoryId from federated.t1 order by domainId, categoryName; -select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId; -select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId; -select categoryId from federated.t1 where domainId<>'a' and categoryName<>'b' order by categoryId; - -drop table federated.t1; - -connection slave; -drop table federated.t1; - -# -# BUG#21019 Federated Engine does not support REPLACE/INSERT IGNORE/UPDATE IGNORE -# -connection slave; -create table federated.t1 (a int primary key, b varchar(64)) - DEFAULT CHARSET=utf8; -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (a int primary key, b varchar(64)) - ENGINE=FEDERATED - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' - DEFAULT CHARSET=utf8; - -insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); -select * from federated.t1; - -truncate federated.t1; -replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); -select * from federated.t1; - -update ignore federated.t1 set a=a+1; -select * from federated.t1; - -drop table federated.t1; -connection slave; -drop table federated.t1; - -# -# BUG#25511 Federated Insert failures. -# -# When the user performs a INSERT...ON DUPLICATE KEY UPDATE, we want -# it to fail if a duplicate key exists instead of ignoring it. -# -connection slave; -create table federated.t1 (a int primary key, b varchar(64)) - DEFAULT CHARSET=utf8; -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (a int primary key, b varchar(64)) - ENGINE=FEDERATED - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' - DEFAULT CHARSET=utf8; - ---error ER_DUP_KEY -insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe") -on duplicate key update a=a+100; -select * from federated.t1; - -drop table federated.t1; -connection slave; -drop table federated.t1; - ---echo ---echo Bug#18287 create federated table always times out, error 1159 ' ' ---echo ---echo Test that self-references work ---echo -connection slave; -create table federated.t1 (a int primary key); ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t2 (a int primary key) - ENGINE=FEDERATED - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; -insert into federated.t1 (a) values (1); -select * from federated.t2; -drop table federated.t1, federated.t2; - -# -# BUG#29875 Disable support for transactions -# -connection slave; -CREATE TABLE federated.t1 (a INT PRIMARY KEY) DEFAULT CHARSET=utf8; -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 (a INT PRIMARY KEY) - ENGINE=FEDERATED - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' - DEFAULT CHARSET=utf8; - -SELECT transactions FROM information_schema.engines WHERE engine="FEDERATED"; -INSERT INTO federated.t1 VALUES (1); -SET autocommit=0; -INSERT INTO federated.t1 VALUES (2); -ROLLBACK; -SET autocommit=1; -SELECT * FROM federated.t1; - -DROP TABLE federated.t1; -connection slave; -DROP TABLE federated.t1; - ---echo End of 5.1 tests - -source include/federated_cleanup.inc; diff --git a/mysql-test/t/federated_archive.test b/mysql-test/t/federated_archive.test deleted file mode 100644 index f8df5f1c51a..00000000000 --- a/mysql-test/t/federated_archive.test +++ /dev/null @@ -1,60 +0,0 @@ -# should work with embedded server after mysqltest is fixed --- source include/not_embedded.inc -source include/have_archive.inc; -source include/federated.inc; - - -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.archive_table; ---enable_warnings - -CREATE TABLE federated.archive_table ( - `id` int(4) NOT NULL, - `name` varchar(54) default NULL - ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1; - - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(4) NOT NULL, - `name` varchar(54) default NULL, - PRIMARY KEY (`id`) - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/archive_table'; - -INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); -INSERT INTO federated.t1 (id, name) VALUES (2, 'bar'); - -SELECT * FROM federated.t1; - ---error 1296 -DELETE FROM federated.t1 WHERE id = 1; - -SELECT * FROM federated.t1; - - ---error 1296 -UPDATE federated.t1 SET name='baz' WHERE id = 1; - -SELECT * FROM federated.t1; - - -# --error 1296 -# TRUNCATE federated.t1; -# -# SELECT * from federated.t1; - -DROP TABLE federated.t1; -connection slave; -DROP TABLE federated.archive_table; - - -source include/federated_cleanup.inc; - diff --git a/mysql-test/t/federated_bug_13118.test b/mysql-test/t/federated_bug_13118.test deleted file mode 100644 index e429a660489..00000000000 --- a/mysql-test/t/federated_bug_13118.test +++ /dev/null @@ -1,44 +0,0 @@ -# should work with embedded server after mysqltest is fixed --- source include/not_embedded.inc -source include/federated.inc; - - -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.bug_13118_table; ---enable_warnings - -CREATE TABLE federated.bug_13118_table ( - `foo` integer, - `bar` integer - ); - - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `foo` integer, - `bar` integer - ) ENGINE="FEDERATED" - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/bug_13118_table'; - -SELECT * from federated.t1; - -INSERT INTO federated.t1 VALUES (1,1); -SELECT * FROM federated.t1; - -INSERT INTO federated.t1 VALUES (1,1); -SELECT * FROM federated.t1; - - -DROP TABLE federated.t1; -connection slave; -DROP TABLE federated.bug_13118_table; - - -source include/federated_cleanup.inc; - diff --git a/mysql-test/t/federated_bug_25714.test b/mysql-test/t/federated_bug_25714.test deleted file mode 100644 index 9c185181511..00000000000 --- a/mysql-test/t/federated_bug_25714.test +++ /dev/null @@ -1,47 +0,0 @@ ---source include/have_bug25714.inc -source include/federated.inc; - - -connection slave; ---disable_warnings -DROP TABLE IF EXISTS federated.bug_13118_table; ---enable_warnings - -CREATE TABLE federated.t1 ( - `id` int auto_increment primary key, - `value` int - ) ENGINE=MyISAM; -INSERT INTO federated.t1 SET value=1; -INSERT INTO federated.t1 SET value=2; -INSERT INTO federated.t1 SET value=2; - -connection master; ---disable_warnings -DROP TABLE IF EXISTS federated.t1; ---enable_warnings - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int auto_increment primary key, - `value` int - ) ENGINE=FEDERATED - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -SELECT * from federated.t1; - -INSERT INTO federated.t1 SET value=4; - -SELECT LAST_INSERT_ID(); - ---exec $MYSQL_BUG25714 $SLAVE_MYPORT ---exec $MYSQL_BUG25714 $MASTER_MYPORT - -SELECT * from federated.t1; - -DROP TABLE federated.t1; -connection slave; -DROP TABLE federated.t1; - - -source include/federated_cleanup.inc; - diff --git a/mysql-test/t/federated_innodb-slave.opt b/mysql-test/t/federated_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/federated_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/federated_innodb.test b/mysql-test/t/federated_innodb.test deleted file mode 100644 index 772e37a2929..00000000000 --- a/mysql-test/t/federated_innodb.test +++ /dev/null @@ -1,34 +0,0 @@ -source include/federated.inc; -source include/have_innodb.inc; - -# -# Bug#25513 Federated transaction failures -# -connection slave; -create table federated.t1 (a int primary key, b varchar(64)) - engine=myisam; -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create table federated.t1 (a int primary key, b varchar(64)) - engine=federated - connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - ---error ER_DUP_KEY -insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); -select * from federated.t1; - -connection slave; -truncate federated.t1; -alter table federated.t1 engine=innodb; -connection master; - ---error ER_DUP_KEY -insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); -select * from federated.t1; - -drop table federated.t1; -connection slave; -drop table federated.t1; - - -source include/federated_cleanup.inc; diff --git a/mysql-test/t/federated_server.test b/mysql-test/t/federated_server.test deleted file mode 100644 index 444285ac045..00000000000 --- a/mysql-test/t/federated_server.test +++ /dev/null @@ -1,337 +0,0 @@ -# WL #3031 This test tests the new servers table as well as -# if federated can utilise the servers table -# should work with embedded server after mysqltest is fixed --- source include/not_embedded.inc --- source include/federated.inc --- source include/big_test.inc - -connection slave; -create database first_db; -create database second_db; - -use first_db; - -DROP TABLE IF EXISTS first_db.t1; -CREATE TABLE first_db.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -DROP TABLE IF EXISTS first_db.t2; -CREATE TABLE first_db.t2 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -use second_db; -DROP TABLE IF EXISTS second_db.t1; -CREATE TABLE second_db.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -DROP TABLE IF EXISTS second_db.t2; -CREATE TABLE second_db.t2 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - DEFAULT CHARSET=latin1; - -connection master; - -drop server if exists 'server_one'; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create server 'server_one' foreign data wrapper 'mysql' options - (HOST '127.0.0.1', - DATABASE 'first_db', - USER 'root', - PASSWORD '', - PORT $SLAVE_MYPORT, - SOCKET '', - OWNER 'root'); - -drop server if exists 'server_two'; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create server 'server_two' foreign data wrapper 'mysql' options - (HOST '127.0.0.1', - DATABASE 'second_db', - USER 'root', - PASSWORD '', - PORT $SLAVE_MYPORT, - SOCKET '', - OWNER 'root'); - ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval select * from mysql.servers; - -DROP TABLE IF EXISTS federated.old; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.old ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/first_db/t1'; - -INSERT INTO federated.old (id, name) values (1, 'federated.old-> first_db.t1, url format'); - -SELECT * FROM federated.old; - -DROP TABLE IF EXISTS federated.old2; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.old2 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/first_db/t2'; - -INSERT INTO federated.old2 (id, name) values (1, 'federated.old2-> first_db.t2, url format'); -SELECT * FROM federated.old2; - -DROP TABLE IF EXISTS federated.urldb2t1; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.urldb2t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/second_db/t1'; -INSERT INTO federated.urldb2t1 (id, name) values (1, 'federated.urldb2t1 -> second_db.t1, url format'); -SELECT * FROM federated.urldb2t1; - -DROP TABLE IF EXISTS federated.urldb2t2; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.urldb2t2 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/second_db/t2'; -INSERT INTO federated.urldb2t2 (id, name) values (1, 'federated.urldb2t2 -> second_db.t2, url format'); -SELECT * FROM federated.urldb2t2; - -DROP TABLE IF EXISTS federated.t1; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='server_one'; - -INSERT INTO federated.t1 (id, name) values (1, 'server_one, new scheme, first_db.t1'); - -SELECT * FROM federated.t1; - -DROP TABLE IF EXISTS federated.whatever; -CREATE TABLE federated.whatever ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='server_one/t1'; -INSERT INTO federated.whatever (id, name) values (1, 'server_one, new scheme, whatever, first_db.t1'); -SELECT * FROM federated.whatever; - -ALTER SERVER 'server_one' options(DATABASE 'second_db'); - -# FLUSH TABLES is now unneccessary - -INSERT INTO federated.t1 (id, name) values (1, 'server_two, new scheme, second_db.t1'); -SELECT * FROM federated.t1; - -INSERT INTO federated.whatever (id, name) values (1, 'server_two, new scheme, whatever, second_db.t1'); -SELECT * FROM federated.whatever; - -drop table federated.t1; - -drop server 'server_one'; -drop server 'server_two'; -select * from mysql.servers; - -connection slave; -drop table first_db.t1; -drop table second_db.t1; -drop database first_db; -drop database second_db; - -# -# Bug#25671 - CREATE/DROP/ALTER SERVER should require privileges -# -# Changes to SERVER declarations should require SUPER privilege. -# Based upon test case by Giuseppe Maxia - -create database db_legitimate; -create database db_bogus; - -use db_legitimate; -CREATE TABLE db_legitimate.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ); -INSERT INTO db_legitimate.t1 VALUES ('1','this is legitimate'); - -use db_bogus; -CREATE TABLE db_bogus.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) - ; -INSERT INTO db_bogus.t1 VALUES ('2','this is bogus'); - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create server 's1' foreign data wrapper 'mysql' options - (HOST '127.0.0.1', - DATABASE 'db_legitimate', - USER 'root', - PASSWORD '', - PORT $SLAVE_MYPORT, - SOCKET '', - OWNER 'root'); - -create user guest_select@localhost; -grant select on federated.* to guest_select@localhost; - -create user guest_super@localhost; -grant select,SUPER,RELOAD on *.* to guest_super@localhost; - -create user guest_usage@localhost; -grant usage on *.* to guest_usage@localhost; - -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(64) NOT NULL default '' - ) ENGINE = FEDERATED CONNECTION = 's1'; - -select * from federated.t1; - -connect (conn_select,127.0.0.1,guest_select,,federated,$MASTER_MYPORT); -connect (conn_usage,127.0.0.1,guest_usage,,,$MASTER_MYPORT); -connect (conn_super,127.0.0.1,guest_super,,,$MASTER_MYPORT); - -connection conn_select; ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -alter server s1 options (database 'db_bogus'); - -connection master; -flush tables; -select * from federated.t1; - -connection conn_usage; ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -alter server s1 options (database 'db_bogus'); - -connection master; -flush tables; -select * from federated.t1; - -connection conn_super; -alter server s1 options (database 'db_bogus'); - -connection master; -flush tables; -select * from federated.t1; - -connection conn_select; ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -drop server if exists 's1'; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -eval create server 's1' foreign data wrapper 'mysql' options - (HOST '127.0.0.1', - DATABASE 'db_legitimate', - USER 'root', - PASSWORD '', - PORT $SLAVE_MYPORT, - SOCKET '', - OWNER 'root'); - -connection conn_super; -drop server 's1'; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval create server 's1' foreign data wrapper 'mysql' options - (HOST '127.0.0.1', - DATABASE 'db_legitimate', - USER 'root', - PASSWORD '', - PORT $SLAVE_MYPORT, - SOCKET '', - OWNER 'root'); - -connection master; -flush tables; -select * from federated.t1; - -# clean up test -connection slave; -drop database db_legitimate; -drop database db_bogus; - -disconnect conn_select; -disconnect conn_usage; -disconnect conn_super; - -connection master; -drop user guest_super@localhost; -drop user guest_usage@localhost; -drop user guest_select@localhost; -drop table federated.t1; -drop server 's1'; - -# -# Bug#30671 - ALTER SERVER causes the server to crash -# -create server 's1' foreign data wrapper 'mysql' options (port 3306); -alter server 's1' options - (host 'localhost', database '', user '', - password '', socket '', owner '', port 3306); -# The next statement would crash unpatched server -alter server 's1' options - (host 'localhost', database 'database1', user '', - password '', socket '', owner '', port 3306); -drop server 's1'; - ---echo # End of 5.1 tests - - -# -# Bug#25721 - deadlock with ALTER/CREATE SERVER -# -connect (other,localhost,root,,); -connection master; -use test; -delimiter //; -create procedure p1 () -begin - DECLARE v INT DEFAULT 0; - DECLARE e INT DEFAULT 0; - DECLARE i INT; - DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1; - SET i = sleep(5); - WHILE v < 10000 do - CREATE SERVER s - FOREIGN DATA WRAPPER mysql - OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); - ALTER SERVER s OPTIONS (USER 'Remote'); - DROP SERVER s; - SET v = v + 1; - END WHILE; - SELECT e > 0; -END// -delimiter ;// -connection other; -use test; -send call p1(); -connection master; -call p1(); -connection other; -reap; -drop procedure p1; -drop server if exists s; - - -source include/federated_cleanup.inc; diff --git a/mysql-test/t/federated_transactions-slave.opt b/mysql-test/t/federated_transactions-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/federated_transactions-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/federated_transactions.test b/mysql-test/t/federated_transactions.test deleted file mode 100644 index 2fc737730bf..00000000000 --- a/mysql-test/t/federated_transactions.test +++ /dev/null @@ -1,40 +0,0 @@ -# should work with embedded server after mysqltest is fixed --- source include/not_embedded.inc -source include/have_innodb.inc; -source include/federated.inc; - -connection slave; -DROP TABLE IF EXISTS federated.t1; -#SHOW ENGINES; -CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - DEFAULT CHARSET=latin1 ENGINE=innodb; - -connection master; -DROP TABLE IF EXISTS federated.t1; -# # correct connection, same named tables ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CREATE TABLE federated.t1 ( - `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' - ) - ENGINE="FEDERATED" DEFAULT CHARSET=latin1 - CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; - -set autocommit=0; -INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); -INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); -COMMIT; -INSERT INTO federated.t1 (id, name) VALUES (3, 'fie'); -INSERT INTO federated.t1 (id, name) VALUES (4, 'fum'); -ROLLBACK; -set autocommit=1; -INSERT INTO federated.t1 (id, name) VALUES (5, 'foe'); -INSERT INTO federated.t1 (id, name) VALUES (6, 'fig'); - -SELECT * FROM federated.t1; -DELETE FROM federated.t1; - -source include/federated_cleanup.inc; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index b4c515d2e8c..b6151659020 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -386,7 +386,7 @@ drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b)); alter table t1 disable keys; --error 1263 -load data infile '../std_data_ln/bad_gis_data.dat' into table t1; +load data infile '../../std_data/bad_gis_data.dat' into table t1; alter table t1 enable keys; drop table t1; diff --git a/mysql-test/t/grant_cache_no_prot.test b/mysql-test/t/grant_cache_no_prot.test index 1f6a9aeb9ed..31209f343b9 100644 --- a/mysql-test/t/grant_cache_no_prot.test +++ b/mysql-test/t/grant_cache_no_prot.test @@ -18,7 +18,7 @@ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) { - --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled + --skip Need normal protocol } # The main testing script diff --git a/mysql-test/t/grant_cache_ps_prot.test b/mysql-test/t/grant_cache_ps_prot.test index 7b579f869e9..27b3f23de3f 100644 --- a/mysql-test/t/grant_cache_ps_prot.test +++ b/mysql-test/t/grant_cache_ps_prot.test @@ -17,7 +17,7 @@ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0 OR $PS_PROTOCOL = 0`) { - --skip Test requires: ps-protocol enabled, other protocols disabled + --skip Need ps-protocol } # The main testing script diff --git a/mysql-test/t/information_schema_chmod.test b/mysql-test/t/information_schema_chmod.test index 51e67a0c956..39e2f680bb8 100644 --- a/mysql-test/t/information_schema_chmod.test +++ b/mysql-test/t/information_schema_chmod.test @@ -17,7 +17,8 @@ # create database mysqltest; create table mysqltest.t1(a int); -chmod 0000 $MYSQLTEST_VARDIR/master-data/mysqltest; +let $MYSQLD_DATADIR= `select @@datadir`; +chmod 0000 $MYSQLD_DATADIR/mysqltest; select table_schema from information_schema.tables where table_schema='mysqltest'; -chmod 0777 $MYSQLTEST_VARDIR/master-data/mysqltest; +chmod 0777 $MYSQLD_DATADIR/mysqltest; drop database mysqltest; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 5433d787c14..3ed6852fb46 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_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; +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; SELECT * from t1; truncate table t1; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); SELECT * from t1; drop table t1; create table t1 (a text, b text); -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; +load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; drop table t1; create table t1 (a int, b char(10)); -load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1; truncate table t1; -load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +load data infile '../../std_data/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; @@ -63,7 +63,7 @@ drop table t1; # ENCLOSED # create table t1 (a varchar(20), b varchar(20)); -load data infile '../std_data_ln/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); +load data infile '../../std_data/loaddata_dq.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); select * from t1; drop table t1; @@ -108,44 +108,44 @@ DROP TABLE t1,t2; # create table t1 (a int default 100, b int, c varchar(60)); # we can do something like this -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +load data infile '../../std_data/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_ln/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +load data infile '../../std_data/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_ln/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +load data infile '../../std_data/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_ln/rpl_loaddata.dat' into table t1 (@a, @b); +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); select * from t1; select @a, @b; truncate table t1; # Reading of all columns with set -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 set c=b; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 set c=b; select * from t1; truncate table t1; # now going to test fixed field-row file format -load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +load data infile '../../std_data/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_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)); +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)); select * from t1; # and this should bark --error 1409 -load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); +load data infile '../../std_data/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_ln/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); select * from t1; # @@ -262,6 +262,7 @@ select @@character_set_filesystem; LOAD DATA INFILE 't@002d1' INTO TABLE t1; SELECT * FROM t1; DROP TABLE t1; -remove_file $MYSQLTEST_VARDIR/master-data/test/t@002d1; +let $MYSQLD_DATADIR= `select @@datadir`; +remove_file $MYSQLD_DATADIR/test/t@002d1; SET character_set_filesystem=default; select @@character_set_filesystem; diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index f7795e49b37..f05d687da47 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -224,4 +224,5 @@ disconnect con1; # Remove the log files that was created in the "default location" # i.e var/run ---remove_file $MYSQLTEST_VARDIR/run/master.log +--remove_file $MYSQLTEST_VARDIR/run/mysqld.log +--remove_file $MYSQLTEST_VARDIR/run/mysqld-slow.log diff --git a/mysql-test/t/myisam-system.test b/mysql-test/t/myisam-system.test index c4a7651ac7d..dc5bb58b6a2 100644 --- a/mysql-test/t/myisam-system.test +++ b/mysql-test/t/myisam-system.test @@ -7,14 +7,15 @@ drop table if exists t1,t2; --enable_warnings create table t1 (a int) engine=myisam; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYI +let $MYSQLD_DATADIR= `select @@datadir`; +--remove_file $MYSQLD_DATADIR/test/t1.MYI drop table if exists t1; create table t1 (a int) engine=myisam; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYI +--remove_file $MYSQLD_DATADIR/test/t1.MYI --error 1051,6 drop table t1; create table t1 (a int) engine=myisam; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD +--remove_file $MYSQLD_DATADIR/test/t1.MYD --error 1105,6,29 drop table t1; --error 1051 diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index 233e8c7c256..6b2ce0cd2d6 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -15,7 +15,8 @@ select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade; --exec $MYSQL_UPGRADE --skip-verbose 2>&1 # It should have created a file in the MySQL Servers datadir -file_exists $MYSQLTEST_VARDIR/master-data/mysql_upgrade_info; +let $MYSQLD_DATADIR= `select @@datadir`; +file_exists $MYSQLD_DATADIR/mysql_upgrade_info; --echo Run it again - should say already completed --replace_result $MYSQL_SERVER_VERSION VERSION @@ -23,13 +24,13 @@ file_exists $MYSQLTEST_VARDIR/master-data/mysql_upgrade_info; --exec $MYSQL_UPGRADE --skip-verbose 2>&1 # It should have created a file in the MySQL Servers datadir -file_exists $MYSQLTEST_VARDIR/master-data/mysql_upgrade_info; +file_exists $MYSQLD_DATADIR/mysql_upgrade_info; --echo Force should run it regardless of wether it's been run before --exec $MYSQL_UPGRADE --skip-verbose --force 2>&1 # It should have created a file in the MySQL Servers datadir -file_exists $MYSQLTEST_VARDIR/master-data/mysql_upgrade_info; +file_exists $MYSQLD_DATADIR/mysql_upgrade_info; # diff --git a/mysql-test/t/mysqlbinlog-cp932.test b/mysql-test/t/mysqlbinlog-cp932.test index 4ca0eedaece..a7055bfc8ca 100644 --- a/mysql-test/t/mysqlbinlog-cp932.test +++ b/mysql-test/t/mysqlbinlog-cp932.test @@ -13,7 +13,8 @@ create table t4 (f text character set cp932); --exec $MYSQL --default-character-set=cp932 test -e "insert into t4 values(_cp932'ƒ\');" flush logs; rename table t3 to t03, t4 to t04; ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000002 | $MYSQL --default-character-set=utf8 +let $MYSQLD_DATADIR= `select @@datadir`; +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000002 | $MYSQL --default-character-set=utf8 # original and recovered data must be equal select HEX(f) from t03; select HEX(f) from t3; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 18b08cf11d6..569c5a10c6a 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -23,11 +23,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_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; +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; # simple query to show more in second binlog insert into t1 values ("Alas"); flush logs; @@ -41,30 +41,30 @@ select "--- Local --" as ""; # We should use --short-form everywhere because in other case output will # be time dependend. Better than nothing. # - +let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/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 $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000002 2> /dev/null +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000002 2> /dev/null # this should show almost nothing --disable_query_log select "--- --database --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLTEST_VARDIR/log/master-bin.000001 2> /dev/null +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLD_DATADIR/master-bin.000001 2> /dev/null # this test for position option --disable_query_log select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=239 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=239 $MYSQLD_DATADIR/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -127,7 +127,7 @@ EOF # must be digestable for both client and server. In 4.1 the client # should use default-character-set same as the server. flush logs; ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000004 | $MYSQL +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000004 | $MYSQL select * from t5 /* must be (1),(1) */; drop table t5; @@ -146,7 +146,7 @@ insert into t5 values (3, date_format('2001-01-01','%W')); select * from t5 order by c1; flush logs; drop table t5; ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000006 | $MYSQL select * from t5 order by c1; drop table t5; @@ -169,8 +169,8 @@ call p1(); drop procedure p1; --error 1305 call p1(); ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 | $MYSQL +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 | $MYSQL call p1(); drop procedure p1; @@ -189,22 +189,22 @@ drop procedure p1; flush logs; create table t1 (a varchar(64) character set utf8); -load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1; set character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1; set character_set_database=latin1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1; set character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1; set character_set_database=latin1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; +load data infile '../../std_data/loaddata6.dat' into table t1; +load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r; select hex(a) from t1; drop table t1; flush logs; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000010 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000010 # # Bug#28293 missed '#' sign in the hex dump when the dump length @@ -217,7 +217,7 @@ flush logs; INSERT INTO t1 VALUES ('0123456789'); flush logs; DROP TABLE t1; ---exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000012 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g' +--exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000012 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g' # # Bug #29928: incorrect connection_id() restoring from mysqlbinlog out @@ -227,7 +227,7 @@ create table t1(a int); insert into t1 values(connection_id()); let $a= `select a from t1`; flush logs; ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000014 > $MYSQLTEST_VARDIR/tmp/bug29928.sql +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000014 > $MYSQLTEST_VARDIR/tmp/bug29928.sql drop table t1; connect (con1, localhost, root, , test); connection con1; @@ -251,8 +251,8 @@ exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTES # flush logs; --error 1 ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null ---exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null +--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null --echo BUG#31611: Security risk with BINLOG statement @@ -268,7 +268,7 @@ flush logs; INSERT INTO t1 VALUES (1,USER()); flush logs; echo mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql; -exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; connect (unsecure,localhost,untrusted,,mysqltest1); echo mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql; error 1; @@ -301,7 +301,7 @@ query_vertical SELECT * FROM t1; DROP TABLE t1; echo >> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql; -exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000019 > $MYSQLTEST_VARDIR/tmp/bug32580.sql; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000019 > $MYSQLTEST_VARDIR/tmp/bug32580.sql; echo >> mysql test < var/tmp/bug32580.sql; exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug32580.sql; remove_file $MYSQLTEST_VARDIR/tmp/bug32580.sql; diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index be9397aafee..d197114d920 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -40,34 +40,34 @@ select "--- Local --" as ""; # We should use --short-form everywhere because in other case output will # be time dependent (the Start events). Better than nothing. # - +let $MYSQLD_DATADIR= `select @@datadir`; --replace_regex /[[:<:]][0-9]{6} [0-9 ][0-9]:[0-9]{2}:[0-9]{2}[[:>:]]/{yymmdd} {HH:MM:SS}/ /=[0-9]+ /={integer} / /# at [0-9]+/# at {pos}/ /(pos:?) [0-9]+/\1 {pos}/ /binlog v [0-9]+, server v [^ ]* created/binlog v #, server v ## created/ ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- offset --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=608 $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=608 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 $MYSQLD_DATADIR/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" $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/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" $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- Local with 2 binlogs on command line --" as ""; @@ -76,28 +76,28 @@ select "--- Local with 2 binlogs on command line --" as ""; # This is to verify that some options apply only to first, or last binlog flush logs; ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- offset --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=134 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=134 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/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" $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/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" $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002 +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- Remote --" as ""; diff --git a/mysql-test/t/mysqlbinlog_base64.test b/mysql-test/t/mysqlbinlog_base64.test index 1b5dc67c150..9425fd3301d 100644 --- a/mysql-test/t/mysqlbinlog_base64.test +++ b/mysql-test/t/mysqlbinlog_base64.test @@ -10,7 +10,7 @@ update t1 set a=a+2 where a=2; update t1 set a=a+2 where a=3; create table t2 (word varchar(20)); -load data infile '../std_data_ln/words.dat' into table t2; +load data infile '../../std_data/words.dat' into table t2; # # Save binlog @@ -38,7 +38,7 @@ select * from t2; flush logs; drop table t2; create table t2 (word varchar(20)); -load data infile '../std_data_ln/words.dat' into table t2; +load data infile '../../std_data/words.dat' into table t2; insert into t2 select * from t2; insert into t2 select * from t2; insert into t2 select * from t2; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 0e4e9989ffa..1f6a39c50d1 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1633,7 +1633,7 @@ select * from t2; # Now we test with multiple threads, but less threads than files. create table words(a varchar(255)); create table words2(b varchar(255)); ---exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat +--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat select * from t1; select * from t2; select * from words; @@ -1643,7 +1643,7 @@ select * from words2; drop table words; --replace_regex /.*mysqlimport(\.exe)*/mysql-import/ --error 1 ---exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat 2>&1 +--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat 2>&1 drop table t1; drop table t2; diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 2b80b0b9d93..064aaa4612e 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -1,7 +1,7 @@ disable_query_log; -- source include/test_outfile.inc -# Server are started in "var/master-data", so "../tmp" will be "var/tmp" -eval set @tmpdir="../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 @@ -16,15 +16,15 @@ 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 "../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 "../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 "../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")); @@ -32,13 +32,13 @@ select load_file(concat(@tmpdir,"/outfile-test.3")); disable_query_log; --error 1086 -eval select * into outfile "../tmp/outfile-test.1" from t1; +eval select * into outfile "../../tmp/outfile-test.1" from t1; --error 1086 -eval select * into dumpfile "../tmp/outfile-test.2" from t1; +eval select * into dumpfile "../../tmp/outfile-test.2" from t1; --error 1086 -eval select * into dumpfile "../tmp/outfile-test.3" from t1; +eval select * into dumpfile "../../tmp/outfile-test.3" from t1; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.not-exist")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.1 @@ -48,7 +48,7 @@ drop table t1; # Bug#8191 disable_query_log; -eval select 1 into outfile "../tmp/outfile-test.4"; +eval select 1 into outfile "../../tmp/outfile-test.4"; enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.4")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 @@ -71,7 +71,7 @@ DROP TABLE t1; # Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails # disable_query_log; -eval SELECT * INTO OUTFILE "../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; @@ -79,7 +79,7 @@ FROM information_schema.schemata LIMIT 0, 5; use information_schema; # disable_query_log; -eval SELECT * INTO OUTFILE "../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; @@ -107,7 +107,7 @@ connect (con28181_1,localhost,user_1,,mysqltest); --error 1044 eval select schema_name -into outfile "../tmp/outfile-test.4" +into outfile "../../tmp/outfile-test.4" fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from information_schema.schemata @@ -118,7 +118,7 @@ grant file on *.* to user_1@localhost; connect (con28181_2,localhost,user_1,,mysqltest); eval select schema_name -into outfile "../tmp/outfile-test.4" +into outfile "../../tmp/outfile-test.4" fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from information_schema.schemata diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 65e78a5e740..c6b6df2c8fd 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1392,13 +1392,15 @@ drop table t1, t2; # Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables # +let $MYSQLD_DATADIR= `select @@datadir`; + disable_query_log; eval create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" + data directory="$MYSQLD_DATADIR/test/" + index directory="$MYSQLD_DATADIR/test/" ); enable_query_log; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index c9b95fc1664..37fef050147 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -103,7 +103,8 @@ partitions 3 partition x2 tablespace ts2, partition x3 tablespace ts3); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +let $MYSQLD_DATADIR= `select @@datadir`; +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Partition by hash, invalid field in function # @@ -199,7 +200,7 @@ partition by hash (a) partitions 2 (partition x1 values less than (4), partition x2 values less than (5)); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Partition by hash, values in error @@ -214,7 +215,7 @@ partition by hash (a) partitions 2 (partition x1 values in (4), partition x2 values in (5)); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Partition by hash, values in error @@ -229,7 +230,7 @@ partition by hash (a) partitions 2 (partition x1 values in (4,6), partition x2 values in (5,7)); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by key, no partitions defined, single field @@ -242,7 +243,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by key, no partitions defined, list of fields @@ -255,7 +256,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (a, b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by hash, no partitions defined @@ -268,7 +269,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by hash (a+b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by key, no partitions defined, single field @@ -281,7 +282,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by key, no partitions defined, list of fields @@ -294,7 +295,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by key (a, b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by hash, no partitions defined @@ -307,7 +308,7 @@ c int not null, primary key (a,b)) partition by key (a) subpartition by hash (a+b); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by hash, no partitions defined, wrong subpartition function @@ -334,7 +335,7 @@ partition by key (a) subpartition by hash (sin(a+b)) (partition x1 (subpartition x11, subpartition x12), partition x2 (subpartition x21, subpartition x22)); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by hash, no partitions defined, wrong subpartition function @@ -363,7 +364,7 @@ partition by range (a) subpartition by key (a,d) (partition x1 values less than (1) (subpartition x11, subpartition x12), partition x2 values less than (2) (subpartition x21, subpartition x22)); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Subpartition by hash, no partitions defined, wrong subpartition function @@ -401,7 +402,7 @@ b int not null, c int not null, primary key(a,b)) partition by range (a); -select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); +select load_file('$MYSQLD_DATADIR/test/t1.par'); # # Partition by range, invalid field in function diff --git a/mysql-test/t/partition_federated.test b/mysql-test/t/partition_federated.test index c8483291228..0fe692ecd01 100644 --- a/mysql-test/t/partition_federated.test +++ b/mysql-test/t/partition_federated.test @@ -3,7 +3,7 @@ # -- source include/have_partition.inc -- source include/not_embedded.inc --- source include/have_federated_db.inc +-- source suite/federated/have_federated_db.inc --disable_warnings drop table if exists t1; diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test index 68da4a5b390..1e4f723ccc6 100644 --- a/mysql-test/t/partition_mgm.test +++ b/mysql-test/t/partition_mgm.test @@ -22,18 +22,19 @@ drop table t1; CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30)) PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2; SHOW CREATE TABLE t1; --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par +let $MYSQLD_DATADIR= `select @@datadir`; +-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD +-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI +-- file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD +-- file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI +-- file_exists $MYSQLD_DATADIR/test/t1.frm +-- file_exists $MYSQLD_DATADIR/test/t1.par ALTER TABLE t1 COALESCE PARTITION 1; SHOW CREATE TABLE t1; --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par +-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD +-- file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI +-- file_exists $MYSQLD_DATADIR/test/t1.frm +-- file_exists $MYSQLD_DATADIR/test/t1.par drop table t1; # # Bug 20767: REORGANIZE partition crashes diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 012b8b50dee..4e285535677 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -12,16 +12,17 @@ # doesn't remove old directory --disable_query_log ---exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true -eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpdata'''; +let $MYSQLD_DATADIR= `select @@datadir`; +--exec mkdir $MYSQLD_DATADIR/tmpdata || true +eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLD_DATADIR/tmpdata'''; let $data_directory = `select @data_dir`; ---exec mkdir $MYSQLTEST_VARDIR/master-data/tmpinx || true -eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx'''; +--exec mkdir $MYSQLD_DATADIR/tmpinx || true +eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLD_DATADIR/tmpinx'''; let $inx_directory = `select @inx_dir`; --enable_query_log ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval create table t1 (a int) engine myisam partition by range (a) subpartition by hash (a) @@ -29,18 +30,18 @@ subpartition by hash (a) (SUBPARTITION subpart00, SUBPARTITION subpart01)); --echo Checking if file exists before alter ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI +--file_exists $MYSQLD_DATADIR/test/t1.frm +--file_exists $MYSQLD_DATADIR/test/t1.par +--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYI +--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYI +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p0#SP#subpart00.MYD +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p0#SP#subpart01.MYD +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p0#SP#subpart00.MYI +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p0#SP#subpart01.MYI ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (partition p1 VALUES LESS THAN (1) $data_directory $inx_directory (SUBPARTITION subpart10, SUBPARTITION subpart11), @@ -48,28 +49,28 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (SUBPARTITION subpart20, SUBPARTITION subpart21)); --echo Checking if file exists after alter ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI +--file_exists $MYSQLD_DATADIR/test/t1.frm +--file_exists $MYSQLD_DATADIR/test/t1.par +--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYI +--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYI +--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYI +--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYD +--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYI +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p1#SP#subpart10.MYD +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p1#SP#subpart11.MYD +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p2#SP#subpart20.MYD +--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p2#SP#subpart21.MYD +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p1#SP#subpart10.MYI +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p1#SP#subpart11.MYI +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p2#SP#subpart20.MYI +--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p2#SP#subpart21.MYI drop table t1; ---exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true ---exec rmdir $MYSQLTEST_VARDIR/master-data/tmpinx || true +--exec rmdir $MYSQLD_DATADIR/tmpdata || true +--exec rmdir $MYSQLD_DATADIR/tmpinx || true # End Windows specific test failures. diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test index ab779ec2b68..0ca60c14c6c 100644 --- a/mysql-test/t/partition_symlink.test +++ b/mysql-test/t/partition_symlink.test @@ -35,21 +35,22 @@ DROP DATABASE IF EXISTS mysqltest2; connect(con1,localhost,mysqltest_1,,); -- echo # user mysqltest_1: USE test; - -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +let $MYSQLD_DATADIR= `select @@datadir`; + --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLD_DATADIR/mysqltest2' + INDEX DIRECTORY '$MYSQLD_DATADIR/mysqltest2', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test', + DATA DIRECTORY '$MYSQLD_DATADIR/test' + INDEX DIRECTORY '$MYSQLD_DATADIR/test', PARTITION p2 VALUES IN (2) ); -- echo # without the patch for bug#32091 this would create -- echo # files mysqltest2/t1.MYD + .MYI and possible overwrite -- echo # the mysqltest2.t1 table (depending on bug#32111) - -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR ALTER TABLE t1 REMOVE PARTITIONING; INSERT INTO t1 VALUES (1); SELECT * FROM t1; @@ -76,40 +77,41 @@ connection default; -- echo # user root: CREATE DATABASE mysqltest2; USE mysqltest2; - -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLD_DATADIR/mysqltest2' + INDEX DIRECTORY '$MYSQLD_DATADIR/mysqltest2', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' + DATA DIRECTORY '$MYSQLD_DATADIR/test' + INDEX DIRECTORY '$MYSQLD_DATADIR/test' ); connection con1; -- echo # user mysqltest_1: USE test; - -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -- error 1,1 eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLD_DATADIR/mysqltest2' + INDEX DIRECTORY '$MYSQLD_DATADIR/mysqltest2', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' + DATA DIRECTORY '$MYSQLD_DATADIR/test' + INDEX DIRECTORY '$MYSQLD_DATADIR/test' ); - -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR + + --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -- error 1,1 eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test', + DATA DIRECTORY '$MYSQLD_DATADIR/test' + INDEX DIRECTORY '$MYSQLD_DATADIR/test', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' + DATA DIRECTORY '$MYSQLD_DATADIR/mysqltest2' + INDEX DIRECTORY '$MYSQLD_DATADIR/mysqltest2' ); connection default; -- echo # user root (cleanup): diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 9e250372d51..25d9ed653c2 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -423,7 +423,7 @@ create table t1 (word char(20) not null); select * from t1; show status like "Qcache_queries_in_cache"; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data infile '$MYSQLTEST_VARDIR/std_data_ln/words.dat' into table t1; +eval load data infile '$MYSQLTEST_VARDIR/std_data/words.dat' into table t1; show status like "Qcache_queries_in_cache"; select count(*) from t1; drop table t1; diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index b433b8720b9..84614798832 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -29,7 +29,8 @@ repair table t1 use_frm; create table t1 engine=myisam SELECT 1,"table 1"; flush tables; -system echo 1 > $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; +let $MYSQLD_DATADIR= `select @@datadir`; +system echo 1 > $MYSQLD_DATADIR/test/t1.MYI ; repair table t1; repair table t1 use_frm; drop table t1; diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 34e1941c9d7..50062dfb0c3 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -422,14 +422,15 @@ DROP TABLE t1; flush tables; # Create a junk frm file on disk -system echo "this is a junk file for test" >> $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +let $MYSQLD_DATADIR= `select @@datadir`; +system echo "this is a junk file for test" >> $MYSQLD_DATADIR/test/t1.frm ; --replace_column 6 # 7 # 8 # 9 # SHOW TABLE STATUS like 't1'; --error 1033 show create table t1; drop table if exists t1; --error 1,0 ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +--remove_file $MYSQLD_DATADIR/test/t1.frm # # BUG 12183 - SHOW OPEN TABLES behavior doesn't match grammar diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test index 56d99c4435c..ae2bb9f7ea3 100644 --- a/mysql-test/t/sp-destruct.test +++ b/mysql-test/t/sp-destruct.test @@ -13,9 +13,10 @@ -- source include/not_embedded.inc # Backup proc table ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI +let $MYSQLD_DATADIR= `select @@datadir`; +--copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm +--copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD +--copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI use test; @@ -50,8 +51,8 @@ insert into t1 values (0); flush table mysql.proc; # Thrashing the .frm file ---remove_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm ---write_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm +--remove_file $MYSQLD_DATADIR/mysql/proc.frm +--write_file $MYSQLD_DATADIR/mysql/proc.frm saljdfa EOF --replace_result $MYSQLTEST_VARDIR . master-data// '' '\\' '/' @@ -67,9 +68,9 @@ insert into t1 values (0); flush table mysql.proc; # Drop the mysql.proc table ---remove_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm ---remove_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD ---remove_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI +--remove_file $MYSQLD_DATADIR/mysql/proc.frm +--remove_file $MYSQLD_DATADIR/mysql/proc.MYD +--remove_file $MYSQLD_DATADIR/mysql/proc.MYI --error ER_NO_SUCH_TABLE call bug14233(); --error ER_NO_SUCH_TABLE @@ -78,9 +79,9 @@ create view v1 as select bug14233_f(); insert into t1 values (0); # Restore mysql.proc ---copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLTEST_VARDIR/master-data/mysql/proc.frm ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI +--copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI --remove_file $MYSQLTEST_VARDIR/tmp/proc.frm --remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD --remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 004e1c4ddd2..979141fb573 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -703,7 +703,7 @@ drop procedure into_test4| --disable_warnings drop procedure if exists into_outfile| --enable_warnings ---replace_result $MYSQLTEST_VARDIR .. +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create procedure into_outfile(x char(16), y int) begin insert into test.t1 values (x, y); @@ -722,7 +722,7 @@ drop procedure into_outfile| --disable_warnings drop procedure if exists into_dumpfile| --enable_warnings ---replace_result $MYSQLTEST_VARDIR .. +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create procedure into_dumpfile(x char(16), y int) begin insert into test.t1 values (x, y); @@ -5260,9 +5260,9 @@ drop procedure if exists bug13012| create procedure bug13012() BEGIN REPAIR TABLE t1; - BACKUP TABLE t1 to '../tmp'; + BACKUP TABLE t1 to '../../tmp'; DROP TABLE t1; - RESTORE TABLE t1 FROM '../tmp'; + RESTORE TABLE t1 FROM '../../tmp'; END| call bug13012()| --enable_warnings diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index f339b29c83a..69b1b3cdb4e 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -123,11 +123,12 @@ drop table t1; # # BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE # ---replace_result $MYSQLTEST_VARDIR TEST_DIR +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval CREATE TABLE t1(a INT) -DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql' -INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; ---replace_result $MYSQLTEST_VARDIR TEST_DIR +DATA DIRECTORY='$MYSQLD_DATADIR/mysql' +INDEX DIRECTORY='$MYSQLD_DATADIR/mysql'; +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/ --error 1 RENAME TABLE t1 TO user; DROP TABLE t1; @@ -137,12 +138,12 @@ DROP TABLE t1; # have been chosen. (Bug #8707) # disable_query_log; -eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/"; +eval create table t1 (i int) data directory = "$MYSQLD_DATADIR/test/"; enable_query_log; show create table t1; drop table t1; disable_query_log; -eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/"; +eval create table t1 (i int) index directory = "$MYSQLD_DATADIR/test/"; enable_query_log; show create table t1; drop table t1; @@ -196,7 +197,7 @@ CREATE DATABASE db2; USE db2; --disable_query_log eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; +DATA DIRECTORY = '$MYSQLD_DATADIR/db1/'; --enable_query_log INSERT INTO db2.t1 VALUES (1); diff --git a/mysql-test/t/system_mysql_db.test b/mysql-test/t/system_mysql_db.test index e3d58ab7139..398a222b642 100644 --- a/mysql-test/t/system_mysql_db.test +++ b/mysql-test/t/system_mysql_db.test @@ -6,11 +6,6 @@ # depends on the presence of the log tables (which are CSV-based). --source include/have_csv.inc -# First delete some tables maybe left over from previous tests ---disable_warnings -drop table if exists t1,t1aa,t2aa; ---enable_warnings - -- disable_query_log use mysql; -- enable_query_log diff --git a/mysql-test/t/system_mysql_db_fix30020.test b/mysql-test/t/system_mysql_db_fix30020.test index dc68f469d3a..a3dc9adb254 100644 --- a/mysql-test/t/system_mysql_db_fix30020.test +++ b/mysql-test/t/system_mysql_db_fix30020.test @@ -21,10 +21,6 @@ if (`SELECT LENGTH("$MYSQL_FIX_SYSTEM_TABLES") <= 0`) # mysql_fix_system_tables which should be ignored. # Instead, concentrate on the errors in r/system_mysql_db.reject ---disable_warnings -drop table if exists t1,t1aa,t2aa; ---enable_warnings - -- disable_result_log -- disable_query_log diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test index 419a9cd1827..440fcc8aa8a 100644 --- a/mysql-test/t/system_mysql_db_fix40123.test +++ b/mysql-test/t/system_mysql_db_fix40123.test @@ -18,10 +18,6 @@ if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) # mysql_fix_system_tables which should be ignored. # Instead, concentrate on the errors in r/system_mysql_db.reject ---disable_warnings -drop table if exists t1,t1aa,t2aa; ---enable_warnings - -- disable_result_log -- disable_query_log diff --git a/mysql-test/t/system_mysql_db_fix50030.test b/mysql-test/t/system_mysql_db_fix50030.test index b4e0ed65242..a1fbe9872f8 100644 --- a/mysql-test/t/system_mysql_db_fix50030.test +++ b/mysql-test/t/system_mysql_db_fix50030.test @@ -11,10 +11,6 @@ # mysql_fix_system_tables which should be ignored. # Instead, concentrate on the errors in r/system_mysql_db.reject ---disable_warnings -drop table if exists t1,t1aa,t2aa; ---enable_warnings - -- disable_result_log -- disable_query_log diff --git a/mysql-test/t/system_mysql_db_fix50117.test b/mysql-test/t/system_mysql_db_fix50117.test index 5f259ac6133..9dc77cdbfc0 100644 --- a/mysql-test/t/system_mysql_db_fix50117.test +++ b/mysql-test/t/system_mysql_db_fix50117.test @@ -11,10 +11,6 @@ # mysql_fix_system_tables which should be ignored. # Instead, concentrate on the errors in r/system_mysql_db.reject ---disable_warnings - drop table if exists t1,t1aa,t2aa; ---enable_warnings - -- disable_result_log -- disable_query_log diff --git a/mysql-test/t/trigger-compat.test b/mysql-test/t/trigger-compat.test index 9f7fd8bc505..bf119cd89e6 100644 --- a/mysql-test/t/trigger-compat.test +++ b/mysql-test/t/trigger-compat.test @@ -60,8 +60,9 @@ CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 --echo --echo ---> patching t1.TRG... ---exec grep -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 +let $MYSQLD_DATADIR= `select @@datadir`; +--exec grep -v 'definers=' $MYSQLD_DATADIR/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG +--exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLD_DATADIR/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 8145212ed5b..c31864662d1 100644 --- a/mysql-test/t/trigger-grant.test +++ b/mysql-test/t/trigger-grant.test @@ -360,10 +360,11 @@ CREATE TRIGGER trg5 BEFORE DELETE ON t1 SET @a = 5; # Replace definers with the "weird" definers +let MYSQLD_DATADIR= `select @@datadir`; perl; use strict; use warnings; -my $fname= "$ENV{'MYSQLTEST_VARDIR'}/master-data/mysqltest_db1/t1.TRG"; +my $fname= "$ENV{'MYSQLD_DATADIR'}/mysqltest_db1/t1.TRG"; open(FILE, "<", $fname) or die; my @content= grep($_ !~ /^definers=/, <FILE>); close FILE; diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 1c98a0f8d29..688cf7a996c 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -472,11 +472,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_ln/rpl_loaddata.dat' into table t1 (@a, i); +load data infile '../../std_data/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_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); select *, @b from t1; # This also will drop triggers drop table t1; @@ -510,7 +510,7 @@ delete from t1 where i = 2; select * from t1; # Should fail and insert only 1 row --error ER_BAD_FIELD_ERROR -load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); select * from t1; --error ER_BAD_FIELD_ERROR insert into t1 select 3, 3; @@ -567,7 +567,7 @@ select * from t1; delete from t1; select * from t1; --error ER_BAD_FIELD_ERROR -load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); select * from t1; --error ER_BAD_FIELD_ERROR insert into t1 select 3, 3; @@ -1142,10 +1142,11 @@ select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; # Trick which makes update of second .TRN file impossible -write_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; +let $MYSQLD_DATADIR= `select @@datadir`; +write_file $MYSQLD_DATADIR/test/t1_ai.TRN~; dummy EOF -chmod 0000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; +chmod 0000 $MYSQLD_DATADIR/test/t1_ai.TRN~; # Normalize the datadir path; the embedded server doesn't chdir to datadir --replace_result $MYSQLTEST_VARDIR . master-data/ '' --error 1 @@ -1156,8 +1157,8 @@ select @a, @b; select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; -chmod 0600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; -remove_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; +chmod 0600 $MYSQLD_DATADIR/test/t1_ai.TRN~; +remove_file $MYSQLD_DATADIR/test/t1_ai.TRN~; # Let us check that updates to .TRN files were rolled back too drop trigger t1_bi; drop trigger t1_ai; @@ -1190,7 +1191,7 @@ insert into t1 (a) values create trigger t2_ai after insert on t2 for each row set @a:= (select max(a) from t2); insert into t2 select * from t1; -load data infile '../std_data_ln/words.dat' into table t1 (a); +load data infile '../../std_data/words.dat' into table t1 (a); drop trigger t1_ai; drop trigger t2_ai; # Test that the problem for functions is fixed as well @@ -1200,7 +1201,7 @@ insert into t1 values ("And",f1()),("the",f1()),("mome", f1()),("raths",f1()),("outgrabe",f1()); create function f2() returns int return (select max(b) from t2); insert into t2 select a, f2() from t1; -load data infile '../std_data_ln/words.dat' into table t1 (a) set b:= f1(); +load data infile '../../std_data/words.dat' into table t1 (a) set b:= f1(); drop function f1; drop function f2; drop table t1, t2; diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index b6febf8e76d..ba66914aac9 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -308,20 +308,20 @@ create table t1 (id integer auto_increment unique,imagem LONGBLOB not null defau insert into t1 (id) values (1); # We have to clean up the path in the results for safe comparison eval select - charset(load_file('../std_data_ln/words.dat')), - collation(load_file('../std_data_ln/words.dat')), - coercibility(load_file('../std_data_ln/words.dat')); + charset(load_file('../../std_data/words.dat')), + collation(load_file('../../std_data/words.dat')), + coercibility(load_file('../../std_data/words.dat')); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval explain extended select - charset(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat')), - collation(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat')), - coercibility(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat')); + charset(load_file('$MYSQLTEST_VARDIR/std_data/words.dat')), + collation(load_file('$MYSQLTEST_VARDIR/std_data/words.dat')), + coercibility(load_file('$MYSQLTEST_VARDIR/std_data/words.dat')); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval update t1 set imagem=load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat') where id=1; +eval update t1 set imagem=load_file('$MYSQLTEST_VARDIR/std_data/words.dat') where id=1; select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1; drop table t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval create table t1 select load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat') l; +eval create table t1 select load_file('$MYSQLTEST_VARDIR/std_data/words.dat') l; # We mask out the Privileges column because it differs for embedded server --replace_column 8 # show full fields from t1; diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test index 1eb949a21e3..9098881e379 100644 --- a/mysql-test/t/type_varchar.test +++ b/mysql-test/t/type_varchar.test @@ -3,7 +3,8 @@ drop table if exists t1, t2; --enable_warnings create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text); -copy_file $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLTEST_VARDIR/master-data/test/vchar.frm; +let $MYSQLD_DATADIR= `select @@datadir`; +copy_file $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLD_DATADIR/test/vchar.frm; truncate table vchar; show create table t1; show create table vchar; @@ -162,8 +163,8 @@ create table t3 ( en varchar(255) character set utf8, cz varchar(255) character set utf8 ); -remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm; -copy_file $MYSQL_TEST_DIR/std_data/14897.frm $MYSQLTEST_VARDIR/master-data/test/t3.frm; +remove_file $MYSQLD_DATADIR/test/t3.frm; +copy_file $MYSQL_TEST_DIR/std_data/14897.frm $MYSQLD_DATADIR/test/t3.frm; truncate table t3; insert into t3 (id, en, cz) values (1,'en string 1','cz string 1'), diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test index 05f430b087b..fa1db9fcfb7 100644 --- a/mysql-test/t/upgrade.test +++ b/mysql-test/t/upgrade.test @@ -57,7 +57,8 @@ drop table `txu#p#p1`; # Check if old tables work # -system cp $MYSQL_TEST_DIR/std_data/old_table-323.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm; +let $MYSQLD_DATADIR= `select @@datadir`; +system cp $MYSQL_TEST_DIR/std_data/old_table-323.frm $MYSQLD_DATADIR/test/t1.frm; truncate t1; drop table t1; @@ -75,11 +76,11 @@ create table tabc.t1 (a int); FLUSH TABLES; # Manually make a 5.0 database from the template ---exec mkdir $MYSQLTEST_VARDIR/master-data/a-b-c ---copy_file $MYSQLTEST_VARDIR/master-data/tabc/db.opt $MYSQLTEST_VARDIR/master-data/a-b-c/db.opt ---copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.frm $MYSQLTEST_VARDIR/master-data/a-b-c/t1.frm ---copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYD $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYD ---copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYI $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYI +--exec mkdir $MYSQLD_DATADIR/a-b-c +--copy_file $MYSQLD_DATADIR/tabc/db.opt $MYSQLD_DATADIR/a-b-c/db.opt +--copy_file $MYSQLD_DATADIR/tabc/t1.frm $MYSQLD_DATADIR/a-b-c/t1.frm +--copy_file $MYSQLD_DATADIR/tabc/t1.MYD $MYSQLD_DATADIR/a-b-c/t1.MYD +--copy_file $MYSQLD_DATADIR/tabc/t1.MYI $MYSQLD_DATADIR/a-b-c/t1.MYI show databases like '%a-b-c%'; ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME; diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test index 70f2f0fa7a6..0098f237de9 100644 --- a/mysql-test/t/user_var-binlog.test +++ b/mysql-test/t/user_var-binlog.test @@ -16,9 +16,9 @@ source include/show_binlog_events.inc; # more important than SHOW BINLOG EVENTS, mysqlbinlog (where we # absolutely need variables names to be quoted and strings to be # escaped). ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +let $MYSQLD_DATADIR= `select @@datadir`; flush logs; ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 drop table t1; # End of 4.1 tests diff --git a/mysql-test/t/varbinary.test b/mysql-test/t/varbinary.test index 9ccbac7cdda..192c9a427f2 100644 --- a/mysql-test/t/varbinary.test +++ b/mysql-test/t/varbinary.test @@ -47,12 +47,13 @@ drop table t1; # # Test with a saved table from 4.1 -copy_file std_data/bug19371.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm; -chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.frm; -copy_file std_data/bug19371.MYD $MYSQLTEST_VARDIR/master-data/test/t1.MYD; -chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYD; -copy_file std_data/bug19371.MYI $MYSQLTEST_VARDIR/master-data/test/t1.MYI; -chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYI; +let $MYSQLD_DATADIR= `select @@datadir`; +copy_file std_data/bug19371.frm $MYSQLD_DATADIR/test/t1.frm; +chmod 0777 $MYSQLD_DATADIR/test/t1.frm; +copy_file std_data/bug19371.MYD $MYSQLD_DATADIR/test/t1.MYD; +chmod 0777 $MYSQLD_DATADIR/test/t1.MYD; +copy_file std_data/bug19371.MYI $MYSQLD_DATADIR/test/t1.MYI; +chmod 0777 $MYSQLD_DATADIR/test/t1.MYI; # Everything _looks_ fine show create table t1; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index e388aa61803..e7e361ac9f8 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1228,11 +1228,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_ln/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../../std_data/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_ln/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1 order by a,b; select * from v1 order by a,b; drop view v1; @@ -1241,11 +1241,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_ln/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../../std_data/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_ln/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; +load data infile '../../std_data/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 b5bae109f5f..26cef584252 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_ln/warnings_loaddata.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; # PS doesn't work good with @@warning_count --disable_ps_protocol select @@warning_count; |