From a40e44efed0794ed91e7d454743fdaa7d6099f45 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 14:28:02 +0200 Subject: WL#3933 Split main test suite to rpl, rpl_ndb and ndb - Update mysql-test-run.pl to collect tests from several suites - Group test into suites - Add suite.opt file mysql-test/suite/ndb/r/ndb_multi.result: Rename: mysql-test/r/ndb_multi.result -> mysql-test/suite/ndb/r/ndb_multi.result mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test: Rename: mysql-test/t/rpl_replicate_ignore_db.test -> mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test mysql-test/suite/rpl/t/rpl_row_trig001.test: Rename: mysql-test/t/rpl_row_trig001.test -> mysql-test/suite/rpl/t/rpl_row_trig001.test mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result: Rename: mysql-test/r/rpl_ndb_sp003.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result mysql-test/suite/binlog/r/binlog_stm_insert_select.result: Rename: mysql-test/r/binlog_stm_insert_select.result -> mysql-test/suite/binlog/r/binlog_stm_insert_select.result mysql-test/suite/ndb/t/ndb_condition_pushdown.test: Rename: mysql-test/t/ndb_condition_pushdown.test -> mysql-test/suite/ndb/t/ndb_condition_pushdown.test mysql-test/suite/ndb/t/ndb_dd_dump.test: Rename: mysql-test/t/ndb_dd_dump.test -> mysql-test/suite/ndb/t/ndb_dd_dump.test mysql-test/suite/ndb/t/ndb_partition_range.test: Rename: mysql-test/t/ndb_partition_range.test -> mysql-test/suite/ndb/t/ndb_partition_range.test mysql-test/suite/ndb/t/strict_autoinc_5ndb.test: Rename: mysql-test/t/strict_autoinc_5ndb.test -> mysql-test/suite/ndb/t/strict_autoinc_5ndb.test mysql-test/suite/rpl/r/rpl_commit_after_flush.result: Rename: mysql-test/r/rpl_commit_after_flush.result -> mysql-test/suite/rpl/r/rpl_commit_after_flush.result mysql-test/suite/rpl/r/rpl_view.result: Rename: mysql-test/r/rpl_view.result -> mysql-test/suite/rpl/r/rpl_view.result mysql-test/suite/rpl/t/rpl_insert_select.test: Rename: mysql-test/t/rpl_insert_select.test -> mysql-test/suite/rpl/t/rpl_insert_select.test mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt: Rename: mysql-test/t/rpl_load_from_master-slave.opt -> mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt mysql-test/suite/rpl/t/rpl_many_optimize.test: Rename: mysql-test/t/rpl_many_optimize.test -> mysql-test/suite/rpl/t/rpl_many_optimize.test mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test: Rename: mysql-test/t/rpl_mixed_ddl_dml.test -> mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test mysql-test/suite/rpl/t/rpl_multi_delete.test: Rename: mysql-test/t/rpl_multi_delete.test -> mysql-test/suite/rpl/t/rpl_multi_delete.test mysql-test/suite/rpl/t/rpl_row_log_innodb.test: Rename: mysql-test/t/rpl_row_log_innodb.test -> mysql-test/suite/rpl/t/rpl_row_log_innodb.test mysql-test/suite/rpl/t/rpl_row_reset_slave.test: Rename: mysql-test/t/rpl_row_reset_slave.test -> mysql-test/suite/rpl/t/rpl_row_reset_slave.test mysql-test/suite/rpl/t/rpl_row_stop_middle.test: Rename: mysql-test/t/rpl_row_stop_middle.test -> mysql-test/suite/rpl/t/rpl_row_stop_middle.test mysql-test/suite/rpl/t/rpl_stm_log-master.opt: Rename: mysql-test/t/rpl_stm_log-master.opt -> mysql-test/suite/rpl/t/rpl_stm_log-master.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result: Rename: mysql-test/r/rpl_ndb_delete_nowhere.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Rename: mysql-test/t/rpl_ndb_sync.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Rename: mysql-test/r/binlog_row_mix_innodb_myisam.result -> mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result mysql-test/suite/ndb/r/ndb_dd_alter.result: Rename: mysql-test/r/ndb_dd_alter.result -> mysql-test/suite/ndb/r/ndb_dd_alter.result mysql-test/suite/ndb/r/ndb_index_unique.result: Rename: mysql-test/r/ndb_index_unique.result -> mysql-test/suite/ndb/r/ndb_index_unique.result mysql-test/suite/ndb/r/ndb_rename.result: Rename: mysql-test/r/ndb_rename.result -> mysql-test/suite/ndb/r/ndb_rename.result mysql-test/suite/ndb/r/ndb_update.result: Rename: mysql-test/r/ndb_update.result -> mysql-test/suite/ndb/r/ndb_update.result mysql-test/suite/ndb/r/ndb_view.result: Rename: mysql-test/r/ndb_view.result -> mysql-test/suite/ndb/r/ndb_view.result mysql-test/suite/ndb/t/ndb_alter_table2.test: Rename: mysql-test/t/ndb_alter_table2.test -> mysql-test/suite/ndb/t/ndb_alter_table2.test mysql-test/suite/ndb/t/ndb_autodiscover.test: Rename: mysql-test/t/ndb_autodiscover.test -> mysql-test/suite/ndb/t/ndb_autodiscover.test mysql-test/suite/ndb/t/ndb_binlog_discover.test: Rename: mysql-test/t/ndb_binlog_discover.test -> mysql-test/suite/ndb/t/ndb_binlog_discover.test mysql-test/suite/ndb/t/ndb_binlog_multi.test: Rename: mysql-test/t/ndb_binlog_multi.test -> mysql-test/suite/ndb/t/ndb_binlog_multi.test mysql-test/suite/ndb/t/ndb_cache_multi.test: Rename: mysql-test/t/ndb_cache_multi.test -> mysql-test/suite/ndb/t/ndb_cache_multi.test mysql-test/suite/ndb/t/ndb_partition_error2-master.opt: Rename: mysql-test/t/ndb_partition_error2-master.opt -> mysql-test/suite/ndb/t/ndb_partition_error2-master.opt mysql-test/suite/rpl/r/rpl000001.a.result: Rename: mysql-test/r/rpl000001.a.result -> mysql-test/suite/rpl/r/rpl000001.a.result mysql-test/suite/rpl/r/rpl_alter.result: Rename: mysql-test/r/rpl_alter.result -> mysql-test/suite/rpl/r/rpl_alter.result mysql-test/suite/rpl/r/rpl_insert_ignore.result: Rename: mysql-test/r/rpl_insert_ignore.result -> mysql-test/suite/rpl/r/rpl_insert_ignore.result mysql-test/suite/rpl/r/rpl_relayspace.result: Rename: mysql-test/r/rpl_relayspace.result -> mysql-test/suite/rpl/r/rpl_relayspace.result mysql-test/suite/rpl/r/rpl_row_func001.result: Rename: mysql-test/r/rpl_row_func001.result -> mysql-test/suite/rpl/r/rpl_row_func001.result mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Rename: mysql-test/r/rpl_row_inexist_tbl.result -> mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result: Rename: mysql-test/r/rpl_stm_insert_delayed.result -> mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result mysql-test/suite/rpl/t/rpl_create_database.test: Rename: mysql-test/t/rpl_create_database.test -> mysql-test/suite/rpl/t/rpl_create_database.test mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt: Rename: mysql-test/t/rpl_dual_pos_advance-master.opt -> mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh: Rename: mysql-test/t/rpl_flushlog_loop-slave.sh -> mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh mysql-test/suite/rpl/t/rpl_ignore_grant.test: Rename: mysql-test/t/rpl_ignore_grant.test -> mysql-test/suite/rpl/t/rpl_ignore_grant.test mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt: Rename: mysql-test/t/rpl_multi_update2-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt mysql-test/suite/rpl/t/rpl_multi_update4.test: Rename: mysql-test/t/rpl_multi_update4.test -> mysql-test/suite/rpl/t/rpl_multi_update4.test mysql-test/suite/rpl/t/rpl_rewrt_db.test: Rename: mysql-test/t/rpl_rewrt_db.test -> mysql-test/suite/rpl/t/rpl_rewrt_db.test mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt: Rename: mysql-test/t/rpl_rotate_logs-master.opt -> mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt mysql-test/suite/rpl/t/rpl_row_4_bytes.test: Rename: mysql-test/t/rpl_row_4_bytes.test -> mysql-test/suite/rpl/t/rpl_row_4_bytes.test mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt: Rename: mysql-test/t/rpl_row_create_table-slave.opt -> mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: Rename: mysql-test/t/rpl_row_flsh_tbls.test -> mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test mysql-test/suite/rpl/t/rpl_row_func003.test: Rename: mysql-test/t/rpl_row_func003.test -> mysql-test/suite/rpl/t/rpl_row_func003.test mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test: Rename: mysql-test/t/rpl_row_sp007_innodb.test -> mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt: Rename: mysql-test/t/rpl_row_stop_middle_update-slave.opt -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test: Rename: mysql-test/t/rpl_row_tabledefs_3innodb.test -> mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test mysql-test/suite/rpl/t/rpl_ssl1.test: Rename: mysql-test/t/rpl_ssl1.test -> mysql-test/suite/rpl/t/rpl_ssl1.test mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test: Rename: mysql-test/t/rpl_stm_max_relay_size.test -> mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test mysql-test/suite/rpl/t/rpl_stm_mystery22.test: Rename: mysql-test/t/rpl_stm_mystery22.test -> mysql-test/suite/rpl/t/rpl_stm_mystery22.test mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test: Rename: mysql-test/t/rpl_truncate_7ndb_2.test -> mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test mysql-test/suite/rpl/t/rpl_variables.test: Rename: mysql-test/t/rpl_variables.test -> mysql-test/suite/rpl/t/rpl_variables.test mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result: Rename: mysql-test/r/rpl_ndb_auto_inc.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result: Rename: mysql-test/r/rpl_ndb_do_db.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: Rename: mysql-test/r/rpl_truncate_7ndb.result -> mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test: Rename: mysql-test/t/rpl_ndb_do_table.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: Rename: mysql-test/t/rpl_ndb_multi.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test mysql-test/suite/binlog/r/binlog_row_blackhole.result: Rename: mysql-test/r/binlog_row_blackhole.result -> mysql-test/suite/binlog/r/binlog_row_blackhole.result mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result: Rename: mysql-test/r/binlog_row_ctype_cp932.result -> mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result mysql-test/suite/binlog/r/binlog_row_insert_select.result: Rename: mysql-test/r/binlog_row_insert_select.result -> mysql-test/suite/binlog/r/binlog_row_insert_select.result mysql-test/suite/binlog/r/binlog_stm_ps.result: Rename: mysql-test/r/binlog_stm_ps.result -> mysql-test/suite/binlog/r/binlog_stm_ps.result mysql-test/suite/binlog/t/binlog_row_binlog-master.opt: Rename: mysql-test/t/binlog_row_binlog-master.opt -> mysql-test/suite/binlog/t/binlog_row_binlog-master.opt mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt: Rename: mysql-test/t/binlog_row_innodb_stat-master.opt -> mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt mysql-test/suite/binlog/t/binlog_row_innodb_stat.test: Rename: mysql-test/t/binlog_row_innodb_stat.test -> mysql-test/suite/binlog/t/binlog_row_innodb_stat.test mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test: Rename: mysql-test/t/binlog_stm_ctype_ucs.test -> mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result: Rename: mysql-test/r/ndb_binlog_ddl_multi.result -> mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result mysql-test/suite/ndb/r/ndb_dd_backuprestore.result: Rename: mysql-test/r/ndb_dd_backuprestore.result -> mysql-test/suite/ndb/r/ndb_dd_backuprestore.result mysql-test/suite/ndb/r/ndb_index_ordered.result: Rename: mysql-test/r/ndb_index_ordered.result -> mysql-test/suite/ndb/r/ndb_index_ordered.result mysql-test/suite/ndb/r/ndb_lock.result: Rename: mysql-test/r/ndb_lock.result -> mysql-test/suite/ndb/r/ndb_lock.result mysql-test/suite/ndb/r/ndb_partition_range.result: Rename: mysql-test/r/ndb_partition_range.result -> mysql-test/suite/ndb/r/ndb_partition_range.result mysql-test/suite/ndb/r/ndb_replace.result: Rename: mysql-test/r/ndb_replace.result -> mysql-test/suite/ndb/r/ndb_replace.result mysql-test/suite/ndb/t/ndb_alter_table3.test: Rename: mysql-test/t/ndb_alter_table3.test -> mysql-test/suite/ndb/t/ndb_alter_table3.test mysql-test/suite/ndb/t/ndb_binlog_basic.test: Rename: mysql-test/t/ndb_binlog_basic.test -> mysql-test/suite/ndb/t/ndb_binlog_basic.test mysql-test/suite/ndb/t/ndb_bitfield.test: Rename: mysql-test/t/ndb_bitfield.test -> mysql-test/suite/ndb/t/ndb_bitfield.test mysql-test/suite/ndb/t/ndb_blob_partition.test: Rename: mysql-test/t/ndb_blob_partition.test -> mysql-test/suite/ndb/t/ndb_blob_partition.test mysql-test/suite/ndb/t/ndb_cache.test: Rename: mysql-test/t/ndb_cache.test -> mysql-test/suite/ndb/t/ndb_cache.test mysql-test/suite/ndb/t/ndb_cache2.test: Rename: mysql-test/t/ndb_cache2.test -> mysql-test/suite/ndb/t/ndb_cache2.test mysql-test/suite/ndb/t/ndb_dd_alter.test: Rename: mysql-test/t/ndb_dd_alter.test -> mysql-test/suite/ndb/t/ndb_dd_alter.test mysql-test/suite/ndb/t/ndb_dd_backuprestore.test: Rename: mysql-test/t/ndb_dd_backuprestore.test -> mysql-test/suite/ndb/t/ndb_dd_backuprestore.test mysql-test/suite/ndb/t/ndb_limit.test: Rename: mysql-test/t/ndb_limit.test -> mysql-test/suite/ndb/t/ndb_limit.test mysql-test/suite/ndb/t/ndb_minmax.test: Rename: mysql-test/t/ndb_minmax.test -> mysql-test/suite/ndb/t/ndb_minmax.test mysql-test/suite/ndb/t/ndb_partition_list.test: Rename: mysql-test/t/ndb_partition_list.test -> mysql-test/suite/ndb/t/ndb_partition_list.test mysql-test/suite/ndb/t/ndb_restore_partition.test: Rename: mysql-test/t/ndb_restore_partition.test -> mysql-test/suite/ndb/t/ndb_restore_partition.test mysql-test/suite/ndb/t/ndb_restore_print.test: Rename: mysql-test/t/ndb_restore_print.test -> mysql-test/suite/ndb/t/ndb_restore_print.test mysql-test/suite/rpl/r/rpl000001.b.result: Rename: mysql-test/r/rpl000001.b.result -> mysql-test/suite/rpl/r/rpl000001.b.result mysql-test/suite/rpl/r/rpl000017.result: Rename: mysql-test/r/rpl000017.result -> mysql-test/suite/rpl/r/rpl000017.result mysql-test/suite/rpl/r/rpl_bit.result: Rename: mysql-test/r/rpl_bit.result -> mysql-test/suite/rpl/r/rpl_bit.result mysql-test/suite/rpl/r/rpl_dual_pos_advance.result: Rename: mysql-test/r/rpl_dual_pos_advance.result -> mysql-test/suite/rpl/r/rpl_dual_pos_advance.result mysql-test/suite/rpl/r/rpl_failed_optimize.result: Rename: mysql-test/r/rpl_failed_optimize.result -> mysql-test/suite/rpl/r/rpl_failed_optimize.result mysql-test/suite/rpl/r/rpl_ignore_table_update.result: Rename: mysql-test/r/rpl_ignore_table_update.result -> mysql-test/suite/rpl/r/rpl_ignore_table_update.result mysql-test/suite/rpl/r/rpl_insert_id_pk.result: Rename: mysql-test/r/rpl_insert_id_pk.result -> mysql-test/suite/rpl/r/rpl_insert_id_pk.result mysql-test/suite/rpl/r/rpl_known_bugs_detection.result: Rename: mysql-test/r/rpl_known_bugs_detection.result -> mysql-test/suite/rpl/r/rpl_known_bugs_detection.result mysql-test/suite/rpl/r/rpl_loaddata.result: Rename: mysql-test/r/rpl_loaddata.result -> mysql-test/suite/rpl/r/rpl_loaddata.result mysql-test/suite/rpl/r/rpl_redirect.result: Rename: mysql-test/r/rpl_redirect.result -> mysql-test/suite/rpl/r/rpl_redirect.result mysql-test/suite/rpl/r/rpl_row_NOW.result: Rename: mysql-test/r/rpl_row_NOW.result -> mysql-test/suite/rpl/r/rpl_row_NOW.result mysql-test/suite/rpl/r/rpl_row_func002.result: Rename: mysql-test/r/rpl_row_func002.result -> mysql-test/suite/rpl/r/rpl_row_func002.result mysql-test/suite/rpl/r/rpl_row_loaddata_m.result: Rename: mysql-test/r/rpl_row_loaddata_m.result -> mysql-test/suite/rpl/r/rpl_row_loaddata_m.result mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: Rename: mysql-test/r/rpl_row_stop_middle_update.result -> mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result mysql-test/suite/rpl/r/rpl_row_trig001.result: Rename: mysql-test/r/rpl_row_trig001.result -> mysql-test/suite/rpl/r/rpl_row_trig001.result mysql-test/suite/rpl/r/rpl_stm_no_op.result: Rename: mysql-test/r/rpl_stm_no_op.result -> mysql-test/suite/rpl/r/rpl_stm_no_op.result mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: Rename: mysql-test/r/rpl_truncate_3innodb.result -> mysql-test/suite/rpl/r/rpl_truncate_3innodb.result mysql-test/suite/rpl/t/rpl000011.test: Rename: mysql-test/t/rpl000011.test -> mysql-test/suite/rpl/t/rpl000011.test mysql-test/suite/rpl/t/rpl_alter_db.test: Rename: mysql-test/t/rpl_alter_db.test -> mysql-test/suite/rpl/t/rpl_alter_db.test mysql-test/suite/rpl/t/rpl_delete_no_where.test: Rename: mysql-test/t/rpl_delete_no_where.test -> mysql-test/suite/rpl/t/rpl_delete_no_where.test mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Rename: mysql-test/t/rpl_dual_pos_advance.test -> mysql-test/suite/rpl/t/rpl_dual_pos_advance.test mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Rename: mysql-test/t/rpl_flushlog_loop-master.opt -> mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh: Rename: mysql-test/t/rpl_flushlog_loop-master.sh -> mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh mysql-test/suite/rpl/t/rpl_get_lock.test: Rename: mysql-test/t/rpl_get_lock.test -> mysql-test/suite/rpl/t/rpl_get_lock.test mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt: Rename: mysql-test/t/rpl_ignore_grant-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt mysql-test/suite/rpl/t/rpl_incident.test: Rename: mysql-test/t/rpl_incident.test -> mysql-test/suite/rpl/t/rpl_incident.test mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt: Rename: mysql-test/t/rpl_insert_ignore-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt: Rename: mysql-test/t/rpl_known_bugs_detection-master.opt -> mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt mysql-test/suite/rpl/t/rpl_loaddata_m.test: Rename: mysql-test/t/rpl_loaddata_m.test -> mysql-test/suite/rpl/t/rpl_loaddata_m.test mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt: Rename: mysql-test/t/rpl_loaddata_s-slave.opt -> mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt mysql-test/suite/rpl/t/rpl_loadfile.test: Rename: mysql-test/t/rpl_loadfile.test -> mysql-test/suite/rpl/t/rpl_loadfile.test mysql-test/suite/rpl/t/rpl_read_only.test: Rename: mysql-test/t/rpl_read_only.test -> mysql-test/suite/rpl/t/rpl_read_only.test mysql-test/suite/rpl/t/rpl_redirect.test: Rename: mysql-test/t/rpl_redirect.test -> mysql-test/suite/rpl/t/rpl_redirect.test mysql-test/suite/rpl/t/rpl_relay_space_innodb.test: Rename: mysql-test/t/rpl_relay_space_innodb.test -> mysql-test/suite/rpl/t/rpl_relay_space_innodb.test mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt: Rename: mysql-test/t/rpl_row_basic_11bugs-master.opt -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt: Rename: mysql-test/t/rpl_row_err_daisychain-slave.opt -> mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt mysql-test/suite/rpl/t/rpl_row_log-slave.opt: Rename: mysql-test/t/rpl_row_log-slave.opt -> mysql-test/suite/rpl/t/rpl_row_log-slave.opt mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt: Rename: mysql-test/t/rpl_row_mysqlbinlog-master.opt -> mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test: Rename: mysql-test/t/rpl_row_sp006_InnoDB.test -> mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt: Rename: mysql-test/t/rpl_row_sp007_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt: Rename: mysql-test/t/rpl_row_stop_middle_update-master.opt -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt: Rename: mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt: Rename: mysql-test/t/rpl_sp_effects-slave.opt -> mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt mysql-test/suite/rpl/t/rpl_sp_effects.test: Rename: mysql-test/t/rpl_sp_effects.test -> mysql-test/suite/rpl/t/rpl_sp_effects.test mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt: Rename: mysql-test/t/rpl_sporadic_master-master.opt -> mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Rename: mysql-test/t/rpl_switch_stm_row_mixed.test -> mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test mysql-test/suite/rpl/t/rpl_temporary.test: Rename: mysql-test/t/rpl_temporary.test -> mysql-test/suite/rpl/t/rpl_temporary.test mysql-test/suite/rpl/t/rpl_timezone-master.opt: Rename: mysql-test/t/rpl_timezone-master.opt -> mysql-test/suite/rpl/t/rpl_timezone-master.opt mysql-test/suite/rpl/t/rpl_trigger.test: Rename: mysql-test/t/rpl_trigger.test -> mysql-test/suite/rpl/t/rpl_trigger.test mysql-test/suite/rpl/t/rpl_trunc_temp.test: Rename: mysql-test/t/rpl_trunc_temp.test -> mysql-test/suite/rpl/t/rpl_trunc_temp.test mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result: Rename: mysql-test/r/rpl_ndb_bank.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result: Rename: mysql-test/r/rpl_ndb_blob.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result: Rename: mysql-test/r/rpl_ndb_blob2.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result: Rename: mysql-test/r/rpl_ndb_relayrotate.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test: Rename: mysql-test/t/rpl_ndb_2innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test: Rename: mysql-test/t/rpl_ndb_charset.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test: Rename: mysql-test/t/rpl_ndb_dd_basic.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test: Rename: mysql-test/t/rpl_ndb_ddl.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test: Rename: mysql-test/t/rpl_ndb_delete_nowhere.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt: Rename: mysql-test/t/rpl_ndb_do_db-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt: Rename: mysql-test/t/rpl_ndb_innodb2ndb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt: Rename: mysql-test/t/rpl_ndb_log-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt: Rename: mysql-test/t/rpl_ndb_relayrotate-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test: Rename: mysql-test/t/rpl_ndb_sp006.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test: Rename: mysql-test/t/rpl_ndb_trig004.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result: Rename: mysql-test/r/binlog_stm_ctype_cp932.result -> mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result mysql-test/suite/ndb/r/ndb_basic.result: Rename: mysql-test/r/ndb_basic.result -> mysql-test/suite/ndb/r/ndb_basic.result mysql-test/suite/ndb/r/ndb_binlog_log_bin.result: Rename: mysql-test/r/ndb_binlog_log_bin.result -> mysql-test/suite/ndb/r/ndb_binlog_log_bin.result mysql-test/suite/ndb/r/ndb_cursor.result: Rename: mysql-test/r/ndb_cursor.result -> mysql-test/suite/ndb/r/ndb_cursor.result mysql-test/suite/ndb/r/ndb_dd_basic.result: Rename: mysql-test/r/ndb_dd_basic.result -> mysql-test/suite/ndb/r/ndb_dd_basic.result mysql-test/suite/ndb/r/ndb_dd_sql_features.result: Rename: mysql-test/r/ndb_dd_sql_features.result -> mysql-test/suite/ndb/r/ndb_dd_sql_features.result mysql-test/suite/ndb/r/ndb_gis.result: Rename: mysql-test/r/ndb_gis.result -> mysql-test/suite/ndb/r/ndb_gis.result mysql-test/suite/ndb/r/ndb_load.result: Rename: mysql-test/r/ndb_load.result -> mysql-test/suite/ndb/r/ndb_load.result mysql-test/suite/ndb/r/ndb_multi_row.result: Rename: mysql-test/r/ndb_multi_row.result -> mysql-test/suite/ndb/r/ndb_multi_row.result mysql-test/suite/ndb/r/ndb_trigger.result: Rename: mysql-test/r/ndb_trigger.result -> mysql-test/suite/ndb/r/ndb_trigger.result mysql-test/suite/ndb/r/ndb_types.result: Rename: mysql-test/r/ndb_types.result -> mysql-test/suite/ndb/r/ndb_types.result mysql-test/suite/ndb/t/ndb_alter_table.test: Rename: mysql-test/t/ndb_alter_table.test -> mysql-test/suite/ndb/t/ndb_alter_table.test mysql-test/suite/ndb/t/ndb_basic.test: Rename: mysql-test/t/ndb_basic.test -> mysql-test/suite/ndb/t/ndb_basic.test mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt: Rename: mysql-test/t/ndb_binlog_ignore_db-master.opt -> mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt mysql-test/suite/ndb/t/ndb_blob.test: Rename: mysql-test/t/ndb_blob.test -> mysql-test/suite/ndb/t/ndb_blob.test mysql-test/suite/ndb/t/ndb_dd_ddl.test: Rename: mysql-test/t/ndb_dd_ddl.test -> mysql-test/suite/ndb/t/ndb_dd_ddl.test mysql-test/suite/ndb/t/ndb_dd_disk2memory.test: Rename: mysql-test/t/ndb_dd_disk2memory.test -> mysql-test/suite/ndb/t/ndb_dd_disk2memory.test mysql-test/suite/ndb/t/ndb_index_unique.test: Rename: mysql-test/t/ndb_index_unique.test -> mysql-test/suite/ndb/t/ndb_index_unique.test mysql-test/suite/ndb/t/ndb_read_multi_range.test: Rename: mysql-test/t/ndb_read_multi_range.test -> mysql-test/suite/ndb/t/ndb_read_multi_range.test mysql-test/suite/ndb/t/ndb_row_format.test: Rename: mysql-test/t/ndb_row_format.test -> mysql-test/suite/ndb/t/ndb_row_format.test mysql-test/suite/rpl/r/rpl_alter_db.result: Rename: mysql-test/r/rpl_alter_db.result -> mysql-test/suite/rpl/r/rpl_alter_db.result mysql-test/suite/rpl/r/rpl_drop_db.result: Rename: mysql-test/r/rpl_drop_db.result -> mysql-test/suite/rpl/r/rpl_drop_db.result mysql-test/suite/rpl/r/rpl_log_pos.result: Rename: mysql-test/r/rpl_log_pos.result -> mysql-test/suite/rpl/r/rpl_log_pos.result mysql-test/suite/rpl/r/rpl_multi_update3.result: Rename: mysql-test/r/rpl_multi_update3.result -> mysql-test/suite/rpl/r/rpl_multi_update3.result mysql-test/suite/rpl/r/rpl_rewrt_db.result: Rename: mysql-test/r/rpl_rewrt_db.result -> mysql-test/suite/rpl/r/rpl_rewrt_db.result mysql-test/suite/rpl/r/rpl_row_create_table.result: Rename: mysql-test/r/rpl_row_create_table.result -> mysql-test/suite/rpl/r/rpl_row_create_table.result mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: Rename: mysql-test/r/rpl_row_flsh_tbls.result -> mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result mysql-test/suite/rpl/r/rpl_row_func003.result: Rename: mysql-test/r/rpl_row_func003.result -> mysql-test/suite/rpl/r/rpl_row_func003.result mysql-test/suite/rpl/r/rpl_row_sp008.result: Rename: mysql-test/r/rpl_row_sp008.result -> mysql-test/suite/rpl/r/rpl_row_sp008.result mysql-test/suite/rpl/r/rpl_row_trig002.result: Rename: mysql-test/r/rpl_row_trig002.result -> mysql-test/suite/rpl/r/rpl_row_trig002.result mysql-test/suite/rpl/r/rpl_sp004.result: Rename: mysql-test/r/rpl_sp004.result -> mysql-test/suite/rpl/r/rpl_sp004.result mysql-test/suite/rpl/r/rpl_ssl.result: Rename: mysql-test/r/rpl_ssl.result -> mysql-test/suite/rpl/r/rpl_ssl.result mysql-test/suite/rpl/r/rpl_stm_EE_err2.result: Rename: mysql-test/r/rpl_stm_EE_err2.result -> mysql-test/suite/rpl/r/rpl_stm_EE_err2.result mysql-test/suite/rpl/r/rpl_stm_multi_query.result: Rename: mysql-test/r/rpl_stm_multi_query.result -> mysql-test/suite/rpl/r/rpl_stm_multi_query.result mysql-test/suite/rpl/t/rpl000013.test: Rename: mysql-test/t/rpl000013.test -> mysql-test/suite/rpl/t/rpl000013.test mysql-test/suite/rpl/t/rpl000017-slave.opt: Rename: mysql-test/t/rpl000017-slave.opt -> mysql-test/suite/rpl/t/rpl000017-slave.opt mysql-test/suite/rpl/t/rpl_drop_db.test: Rename: mysql-test/t/rpl_drop_db.test -> mysql-test/suite/rpl/t/rpl_drop_db.test mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Rename: mysql-test/t/rpl_flushlog_loop.test -> mysql-test/suite/rpl/t/rpl_flushlog_loop.test mysql-test/suite/rpl/t/rpl_load_from_master.test: Rename: mysql-test/t/rpl_load_from_master.test -> mysql-test/suite/rpl/t/rpl_load_from_master.test mysql-test/suite/rpl/t/rpl_locale.test: Rename: mysql-test/t/rpl_locale.test -> mysql-test/suite/rpl/t/rpl_locale.test mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt: Rename: mysql-test/t/rpl_multi_delete-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs.test: Rename: mysql-test/t/rpl_rotate_logs.test -> mysql-test/suite/rpl/t/rpl_rotate_logs.test mysql-test/suite/rpl/t/rpl_row_NOW.test: Rename: mysql-test/t/rpl_row_NOW.test -> mysql-test/suite/rpl/t/rpl_row_NOW.test mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt: Rename: mysql-test/t/rpl_row_err_daisychain-master.opt -> mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Rename: mysql-test/t/rpl_row_inexist_tbl.test -> mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test mysql-test/suite/rpl/t/rpl_row_mystery22.test: Rename: mysql-test/t/rpl_row_mystery22.test -> mysql-test/suite/rpl/t/rpl_row_mystery22.test mysql-test/suite/rpl/t/rpl_row_sp003.test: Rename: mysql-test/t/rpl_row_sp003.test -> mysql-test/suite/rpl/t/rpl_row_sp003.test mysql-test/suite/rpl/t/rpl_row_sp011.test: Rename: mysql-test/t/rpl_row_sp011.test -> mysql-test/suite/rpl/t/rpl_row_sp011.test mysql-test/suite/rpl/t/rpl_server_id1.test: Rename: mysql-test/t/rpl_server_id1.test -> mysql-test/suite/rpl/t/rpl_server_id1.test mysql-test/suite/rpl/t/rpl_session_var.test: Rename: mysql-test/t/rpl_session_var.test -> mysql-test/suite/rpl/t/rpl_session_var.test mysql-test/suite/rpl/t/rpl_skip_error.test: Rename: mysql-test/t/rpl_skip_error.test -> mysql-test/suite/rpl/t/rpl_skip_error.test mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result: Rename: mysql-test/r/rpl_ndb_commit_afterflush.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test: Rename: mysql-test/t/rpl_ndb_do_db.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt: Rename: mysql-test/t/rpl_ndb_innodb2ndb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt: Rename: mysql-test/t/rpl_ndb_multi_update2-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test: Rename: mysql-test/t/rpl_ndb_multi_update2.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: Rename: mysql-test/r/binlog_statement_insert_delayed.result -> mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result mysql-test/suite/binlog/t/binlog_row_blackhole.test: Rename: mysql-test/t/binlog_row_blackhole.test -> mysql-test/suite/binlog/t/binlog_row_blackhole.test mysql-test/suite/ndb/r/ndb_limit.result: Rename: mysql-test/r/ndb_limit.result -> mysql-test/suite/ndb/r/ndb_limit.result mysql-test/suite/ndb/t/ndb_dd_basic.test: Rename: mysql-test/t/ndb_dd_basic.test -> mysql-test/suite/ndb/t/ndb_dd_basic.test mysql-test/suite/ndb/t/ndb_types.test: Rename: mysql-test/t/ndb_types.test -> mysql-test/suite/ndb/t/ndb_types.test mysql-test/suite/ndb/t/ndb_update.test: Rename: mysql-test/t/ndb_update.test -> mysql-test/suite/ndb/t/ndb_update.test mysql-test/suite/rpl/r/rpl_extraCol_innodb.result: Rename: mysql-test/r/rpl_extraCol_innodb.result -> mysql-test/suite/rpl/r/rpl_extraCol_innodb.result mysql-test/suite/rpl/r/rpl_loaddata_charset.result: Rename: mysql-test/r/rpl_loaddata_charset.result -> mysql-test/suite/rpl/r/rpl_loaddata_charset.result mysql-test/suite/rpl/r/rpl_loaddata_m.result: Rename: mysql-test/r/rpl_loaddata_m.result -> mysql-test/suite/rpl/r/rpl_loaddata_m.result mysql-test/suite/rpl/r/rpl_multi_delete.result: Rename: mysql-test/r/rpl_multi_delete.result -> mysql-test/suite/rpl/r/rpl_multi_delete.result mysql-test/suite/rpl/r/rpl_multi_delete2.result: Rename: mysql-test/r/rpl_multi_delete2.result -> mysql-test/suite/rpl/r/rpl_multi_delete2.result mysql-test/suite/rpl/r/rpl_row_sp009.result: Rename: mysql-test/r/rpl_row_sp009.result -> mysql-test/suite/rpl/r/rpl_row_sp009.result mysql-test/suite/rpl/r/rpl_row_sp010.result: Rename: mysql-test/r/rpl_row_sp010.result -> mysql-test/suite/rpl/r/rpl_row_sp010.result mysql-test/suite/rpl/r/rpl_set_charset.result: Rename: mysql-test/r/rpl_set_charset.result -> mysql-test/suite/rpl/r/rpl_set_charset.result mysql-test/suite/rpl/r/rpl_skip_error.result: Rename: mysql-test/r/rpl_skip_error.result -> mysql-test/suite/rpl/r/rpl_skip_error.result mysql-test/suite/rpl/r/rpl_stm_charset.result: Rename: mysql-test/r/rpl_stm_charset.result -> mysql-test/suite/rpl/r/rpl_stm_charset.result mysql-test/suite/rpl/r/rpl_trigger.result: Rename: mysql-test/r/rpl_trigger.result -> mysql-test/suite/rpl/r/rpl_trigger.result mysql-test/suite/rpl/t/rpl_auto_increment-master.opt: Rename: mysql-test/t/rpl_auto_increment-master.opt -> mysql-test/suite/rpl/t/rpl_auto_increment-master.opt mysql-test/suite/rpl/t/rpl_bit_npk.test: Rename: mysql-test/t/rpl_bit_npk.test -> mysql-test/suite/rpl/t/rpl_bit_npk.test mysql-test/suite/rpl/t/rpl_extraCol_innodb.test: Rename: mysql-test/t/rpl_extraCol_innodb.test -> mysql-test/suite/rpl/t/rpl_extraCol_innodb.test mysql-test/suite/rpl/t/rpl_free_items-slave.opt: Rename: mysql-test/t/rpl_free_items-slave.opt -> mysql-test/suite/rpl/t/rpl_free_items-slave.opt mysql-test/suite/rpl/t/rpl_init_slave.test: Rename: mysql-test/t/rpl_init_slave.test -> mysql-test/suite/rpl/t/rpl_init_slave.test mysql-test/suite/rpl/t/rpl_packet-slave.opt: Rename: mysql-test/t/rpl_packet-slave.opt -> mysql-test/suite/rpl/t/rpl_packet-slave.opt mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt: Rename: mysql-test/t/rpl_relay_space_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi: Rename: mysql-test/t/rpl_rotate_logs.slave-mi -> mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi mysql-test/suite/rpl/t/rpl_row_USER.test: Rename: mysql-test/t/rpl_row_USER.test -> mysql-test/suite/rpl/t/rpl_row_USER.test mysql-test/suite/rpl/t/rpl_row_delayed_ins.test: Rename: mysql-test/t/rpl_row_delayed_ins.test -> mysql-test/suite/rpl/t/rpl_row_delayed_ins.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt: Rename: mysql-test/t/rpl_row_sp002_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_trig002.test: Rename: mysql-test/t/rpl_row_trig002.test -> mysql-test/suite/rpl/t/rpl_row_trig002.test mysql-test/suite/rpl/t/rpl_sf.test: Rename: mysql-test/t/rpl_sf.test -> mysql-test/suite/rpl/t/rpl_sf.test mysql-test/suite/rpl/t/rpl_stm_no_op.test: Rename: mysql-test/t/rpl_stm_no_op.test -> mysql-test/suite/rpl/t/rpl_stm_no_op.test mysql-test/suite/rpl/t/rpl_udf-slave.opt: Rename: mysql-test/t/rpl_udf-slave.opt -> mysql-test/suite/rpl/t/rpl_udf-slave.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result: Rename: mysql-test/r/rpl_ndb_dd_partitions.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: Rename: mysql-test/r/rpl_ndb_multi.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result: Rename: mysql-test/r/rpl_ndb_rep_ignore.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result: Rename: mysql-test/r/rpl_ndb_sp006.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt: Rename: mysql-test/t/rpl_ndb_2myisam-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: Rename: mysql-test/t/rpl_ndb_idempotent.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test: Rename: mysql-test/t/rpl_ndb_sp003.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test mysql-test/suite/binlog/r/binlog_row_binlog.result: Rename: mysql-test/r/binlog_row_binlog.result -> mysql-test/suite/binlog/r/binlog_row_binlog.result mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Rename: mysql-test/r/binlog_stm_blackhole.result -> mysql-test/suite/binlog/r/binlog_stm_blackhole.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Rename: mysql-test/r/binlog_stm_mix_innodb_myisam.result -> mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test: Rename: mysql-test/t/binlog_row_drop_tmp_tbl.test -> mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt: Rename: mysql-test/t/binlog_row_mix_innodb_myisam-master.opt -> mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test: Rename: mysql-test/t/binlog_statement_insert_delayed.test -> mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt: Rename: mysql-test/t/binlog_stm_binlog-master.opt -> mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt mysql-test/suite/ndb/r/ndb_alter_table2.result: Rename: mysql-test/r/ndb_alter_table2.result -> mysql-test/suite/ndb/r/ndb_alter_table2.result mysql-test/suite/ndb/r/ndb_blob.result: Rename: mysql-test/r/ndb_blob.result -> mysql-test/suite/ndb/r/ndb_blob.result mysql-test/suite/ndb/r/ndb_cache_multi2.result: Rename: mysql-test/r/ndb_cache_multi2.result -> mysql-test/suite/ndb/r/ndb_cache_multi2.result mysql-test/suite/ndb/r/ndb_config2.result: Rename: mysql-test/r/ndb_config2.result -> mysql-test/suite/ndb/r/ndb_config2.result mysql-test/suite/ndb/t/ndb_truncate.test: Rename: mysql-test/t/ndb_truncate.test -> mysql-test/suite/ndb/t/ndb_truncate.test mysql-test/suite/ndb/t/ndbapi.test: Rename: mysql-test/t/ndbapi.test -> mysql-test/suite/ndb/t/ndbapi.test mysql-test/suite/rpl/r/rpl_charset_sjis.result: Rename: mysql-test/r/rpl_charset_sjis.result -> mysql-test/suite/rpl/r/rpl_charset_sjis.result mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: Rename: mysql-test/r/rpl_extraCol_myisam.result -> mysql-test/suite/rpl/r/rpl_extraCol_myisam.result mysql-test/suite/rpl/r/rpl_locale.result: Rename: mysql-test/r/rpl_locale.result -> mysql-test/suite/rpl/r/rpl_locale.result mysql-test/suite/rpl/r/rpl_multi_update2.result: Rename: mysql-test/r/rpl_multi_update2.result -> mysql-test/suite/rpl/r/rpl_multi_update2.result mysql-test/suite/rpl/r/rpl_relay_space_innodb.result: Rename: mysql-test/r/rpl_relay_space_innodb.result -> mysql-test/suite/rpl/r/rpl_relay_space_innodb.result mysql-test/suite/rpl/r/rpl_row_insert_delayed.result: Rename: mysql-test/r/rpl_row_insert_delayed.result -> mysql-test/suite/rpl/r/rpl_row_insert_delayed.result mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Rename: mysql-test/r/rpl_row_log_innodb.result -> mysql-test/suite/rpl/r/rpl_row_log_innodb.result mysql-test/suite/rpl/r/rpl_row_multi_query.result: Rename: mysql-test/r/rpl_row_multi_query.result -> mysql-test/suite/rpl/r/rpl_row_multi_query.result mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: Rename: mysql-test/r/rpl_row_tabledefs_3innodb.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result mysql-test/suite/rpl/r/rpl_row_trig003.result: Rename: mysql-test/r/rpl_row_trig003.result -> mysql-test/suite/rpl/r/rpl_row_trig003.result mysql-test/suite/rpl/r/rpl_row_until.result: Rename: mysql-test/r/rpl_row_until.result -> mysql-test/suite/rpl/r/rpl_row_until.result mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt: Rename: mysql-test/t/rpl_empty_master_crash-master.opt -> mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt mysql-test/suite/rpl/t/rpl_free_items.test: Rename: mysql-test/t/rpl_free_items.test -> mysql-test/suite/rpl/t/rpl_free_items.test mysql-test/suite/rpl/t/rpl_ps.test: Rename: mysql-test/t/rpl_ps.test -> mysql-test/suite/rpl/t/rpl_ps.test mysql-test/suite/rpl/t/rpl_relay_space_myisam.test: Rename: mysql-test/t/rpl_relay_space_myisam.test -> mysql-test/suite/rpl/t/rpl_relay_space_myisam.test mysql-test/suite/rpl/t/rpl_relayrotate.test: Rename: mysql-test/t/rpl_relayrotate.test -> mysql-test/suite/rpl/t/rpl_relayrotate.test mysql-test/suite/rpl/t/rpl_relayspace.test: Rename: mysql-test/t/rpl_relayspace.test -> mysql-test/suite/rpl/t/rpl_relayspace.test mysql-test/suite/rpl/t/rpl_row_sp003-master.opt: Rename: mysql-test/t/rpl_row_sp003-master.opt -> mysql-test/suite/rpl/t/rpl_row_sp003-master.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: Rename: mysql-test/r/rpl_ndb_sync.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result: Rename: mysql-test/r/rpl_ndbapi_multi.result -> mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test: Rename: mysql-test/t/rpl_ndb_2myisam.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test: Rename: mysql-test/t/rpl_ndb_func003.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: Rename: mysql-test/t/rpl_ndb_innodb_trans.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: Rename: mysql-test/t/rpl_ndb_load.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: Rename: mysql-test/t/rpl_truncate_7ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Rename: mysql-test/t/binlog_row_mix_innodb_myisam.test -> mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test mysql-test/suite/binlog/t/binlog_stm_binlog.test: Rename: mysql-test/t/binlog_stm_binlog.test -> mysql-test/suite/binlog/t/binlog_stm_binlog.test mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test: Rename: mysql-test/t/binlog_stm_ctype_cp932.test -> mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt: Rename: mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt -> mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: Rename: mysql-test/t/binlog_stm_mix_innodb_myisam.test -> mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test mysql-test/suite/ndb/r/ndb_alter_table3.result: Rename: mysql-test/r/ndb_alter_table3.result -> mysql-test/suite/ndb/r/ndb_alter_table3.result mysql-test/suite/ndb/r/ndb_autodiscover2.result: Rename: mysql-test/r/ndb_autodiscover2.result -> mysql-test/suite/ndb/r/ndb_autodiscover2.result mysql-test/suite/ndb/r/ndb_backup_print.result: Rename: mysql-test/r/ndb_backup_print.result -> mysql-test/suite/ndb/r/ndb_backup_print.result mysql-test/suite/ndb/r/ndb_binlog_basic.result: Rename: mysql-test/r/ndb_binlog_basic.result -> mysql-test/suite/ndb/r/ndb_binlog_basic.result mysql-test/suite/ndb/r/ndb_condition_pushdown.result: Rename: mysql-test/r/ndb_condition_pushdown.result -> mysql-test/suite/ndb/r/ndb_condition_pushdown.result mysql-test/suite/ndb/r/ndb_dd_ddl.result: Rename: mysql-test/r/ndb_dd_ddl.result -> mysql-test/suite/ndb/r/ndb_dd_ddl.result mysql-test/suite/ndb/r/ndb_dd_dump.result: Rename: mysql-test/r/ndb_dd_dump.result -> mysql-test/suite/ndb/r/ndb_dd_dump.result mysql-test/suite/ndb/r/ndb_loaddatalocal.result: Rename: mysql-test/r/ndb_loaddatalocal.result -> mysql-test/suite/ndb/r/ndb_loaddatalocal.result mysql-test/suite/ndb/r/ndb_restore_compat.result: Rename: mysql-test/r/ndb_restore_compat.result -> mysql-test/suite/ndb/r/ndb_restore_compat.result mysql-test/suite/ndb/r/ndb_row_format.result: Rename: mysql-test/r/ndb_row_format.result -> mysql-test/suite/ndb/r/ndb_row_format.result mysql-test/suite/ndb/r/ndb_sp.result: Rename: mysql-test/r/ndb_sp.result -> mysql-test/suite/ndb/r/ndb_sp.result mysql-test/suite/ndb/r/ndb_temporary.result: Rename: mysql-test/r/ndb_temporary.result -> mysql-test/suite/ndb/r/ndb_temporary.result mysql-test/suite/ndb/r/ps_7ndb.result: Rename: mysql-test/r/ps_7ndb.result -> mysql-test/suite/ndb/r/ps_7ndb.result mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test: Rename: mysql-test/t/ndb_binlog_ddl_multi.test -> mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test mysql-test/suite/ndb/t/ndb_cache_multi2.test: Rename: mysql-test/t/ndb_cache_multi2.test -> mysql-test/suite/ndb/t/ndb_cache_multi2.test mysql-test/suite/ndb/t/ndb_charset.test: Rename: mysql-test/t/ndb_charset.test -> mysql-test/suite/ndb/t/ndb_charset.test mysql-test/suite/ndb/t/ndb_dd_sql_features.test: Rename: mysql-test/t/ndb_dd_sql_features.test -> mysql-test/suite/ndb/t/ndb_dd_sql_features.test mysql-test/suite/ndb/t/ndb_loaddatalocal.test: Rename: mysql-test/t/ndb_loaddatalocal.test -> mysql-test/suite/ndb/t/ndb_loaddatalocal.test mysql-test/suite/ndb/t/ndb_multi_row.test: Rename: mysql-test/t/ndb_multi_row.test -> mysql-test/suite/ndb/t/ndb_multi_row.test mysql-test/suite/ndb/t/ndb_restore.test: Rename: mysql-test/t/ndb_restore.test -> mysql-test/suite/ndb/t/ndb_restore.test mysql-test/suite/ndb/t/partition_03ndb.test: Rename: mysql-test/t/partition_03ndb.test -> mysql-test/suite/ndb/t/partition_03ndb.test mysql-test/suite/ndb/t/ps_7ndb.test: Rename: mysql-test/t/ps_7ndb.test -> mysql-test/suite/ndb/t/ps_7ndb.test mysql-test/suite/rpl/r/rpl000013.result: Rename: mysql-test/r/rpl000013.result -> mysql-test/suite/rpl/r/rpl000013.result mysql-test/suite/rpl/r/rpl_auto_increment_11932.result: Rename: mysql-test/r/rpl_auto_increment_11932.result -> mysql-test/suite/rpl/r/rpl_auto_increment_11932.result mysql-test/suite/rpl/r/rpl_change_master.result: Rename: mysql-test/r/rpl_change_master.result -> mysql-test/suite/rpl/r/rpl_change_master.result mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result: Rename: mysql-test/r/rpl_foreign_key_innodb.result -> mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result mysql-test/suite/rpl/r/rpl_insert_select.result: Rename: mysql-test/r/rpl_insert_select.result -> mysql-test/suite/rpl/r/rpl_insert_select.result mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result: Rename: mysql-test/r/rpl_mixed_ddl_dml.result -> mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result mysql-test/suite/rpl/r/rpl_replicate_do.result: Rename: mysql-test/r/rpl_replicate_do.result -> mysql-test/suite/rpl/r/rpl_replicate_do.result mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result: Rename: mysql-test/r/rpl_row_basic_2myisam.result -> mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result mysql-test/suite/rpl/r/rpl_row_sp011.result: Rename: mysql-test/r/rpl_row_sp011.result -> mysql-test/suite/rpl/r/rpl_row_sp011.result mysql-test/suite/rpl/r/rpl_row_trig004.result: Rename: mysql-test/r/rpl_row_trig004.result -> mysql-test/suite/rpl/r/rpl_row_trig004.result mysql-test/suite/rpl/r/rpl_slave_status.result: Rename: mysql-test/r/rpl_slave_status.result -> mysql-test/suite/rpl/r/rpl_slave_status.result mysql-test/suite/rpl/r/rpl_stm_log.result: Rename: mysql-test/r/rpl_stm_log.result -> mysql-test/suite/rpl/r/rpl_stm_log.result mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: Rename: mysql-test/r/rpl_stm_max_relay_size.result -> mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Rename: mysql-test/r/rpl_switch_stm_row_mixed.result -> mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result mysql-test/suite/rpl/r/rpl_temp_table.result: Rename: mysql-test/r/rpl_temp_table.result -> mysql-test/suite/rpl/r/rpl_temp_table.result mysql-test/suite/rpl/r/rpl_timezone.result: Rename: mysql-test/r/rpl_timezone.result -> mysql-test/suite/rpl/r/rpl_timezone.result mysql-test/suite/rpl/t/rpl000017-slave.sh: Rename: mysql-test/t/rpl000017-slave.sh -> mysql-test/suite/rpl/t/rpl000017-slave.sh mysql-test/suite/rpl/t/rpl000018-slave.opt: Rename: mysql-test/t/rpl000018-slave.opt -> mysql-test/suite/rpl/t/rpl000018-slave.opt mysql-test/suite/rpl/t/rpl_auto_increment_11932.test: Rename: mysql-test/t/rpl_auto_increment_11932.test -> mysql-test/suite/rpl/t/rpl_auto_increment_11932.test mysql-test/suite/rpl/t/rpl_commit_after_flush.test: Rename: mysql-test/t/rpl_commit_after_flush.test -> mysql-test/suite/rpl/t/rpl_commit_after_flush.test mysql-test/suite/rpl/t/rpl_create_database-master.opt: Rename: mysql-test/t/rpl_create_database-master.opt -> mysql-test/suite/rpl/t/rpl_create_database-master.opt mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt: Rename: mysql-test/t/rpl_deadlock_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt mysql-test/suite/rpl/t/rpl_drop.test: Rename: mysql-test/t/rpl_drop.test -> mysql-test/suite/rpl/t/rpl_drop.test mysql-test/suite/rpl/t/rpl_empty_master_crash.test: Rename: mysql-test/t/rpl_empty_master_crash.test -> mysql-test/suite/rpl/t/rpl_empty_master_crash.test mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Rename: mysql-test/t/rpl_flushlog_loop-slave.opt -> mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt mysql-test/suite/rpl/t/rpl_ignore_table_update.test: Rename: mysql-test/t/rpl_ignore_table_update.test -> mysql-test/suite/rpl/t/rpl_ignore_table_update.test mysql-test/suite/rpl/t/rpl_innodb.test: Rename: mysql-test/t/rpl_innodb.test -> mysql-test/suite/rpl/t/rpl_innodb.test mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: Rename: mysql-test/t/rpl_known_bugs_detection.test -> mysql-test/suite/rpl/t/rpl_known_bugs_detection.test mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt: Rename: mysql-test/t/rpl_multi_update4-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt mysql-test/suite/rpl/t/rpl_packet-master.opt: Rename: mysql-test/t/rpl_packet-master.opt -> mysql-test/suite/rpl/t/rpl_packet-master.opt mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt: Rename: mysql-test/t/rpl_row_4_bytes-master.opt -> mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test: Rename: mysql-test/t/rpl_row_basic_3innodb.test -> mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test mysql-test/suite/rpl/t/rpl_row_func001.test: Rename: mysql-test/t/rpl_row_func001.test -> mysql-test/suite/rpl/t/rpl_row_func001.test mysql-test/suite/rpl/t/rpl_row_func003-slave.opt: Rename: mysql-test/t/rpl_row_func003-slave.opt -> mysql-test/suite/rpl/t/rpl_row_func003-slave.opt mysql-test/suite/rpl/t/rpl_row_until.test: Rename: mysql-test/t/rpl_row_until.test -> mysql-test/suite/rpl/t/rpl_row_until.test mysql-test/suite/rpl/t/rpl_set_charset.test: Rename: mysql-test/t/rpl_set_charset.test -> mysql-test/suite/rpl/t/rpl_set_charset.test mysql-test/suite/rpl/t/rpl_skip_error-slave.opt: Rename: mysql-test/t/rpl_skip_error-slave.opt -> mysql-test/suite/rpl/t/rpl_skip_error-slave.opt mysql-test/suite/rpl/t/rpl_slave_status.test: Rename: mysql-test/t/rpl_slave_status.test -> mysql-test/suite/rpl/t/rpl_slave_status.test mysql-test/suite/rpl/t/rpl_sp-master.opt: Rename: mysql-test/t/rpl_sp-master.opt -> mysql-test/suite/rpl/t/rpl_sp-master.opt mysql-test/suite/rpl/t/rpl_sp004.test: Rename: mysql-test/t/rpl_sp004.test -> mysql-test/suite/rpl/t/rpl_sp004.test mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Rename: mysql-test/t/rpl_start_stop_slave.test -> mysql-test/suite/rpl/t/rpl_start_stop_slave.test mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test: Rename: mysql-test/t/rpl_stm_flsh_tbls.test -> mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test mysql-test/suite/rpl/t/rpl_stm_log.test: Rename: mysql-test/t/rpl_stm_log.test -> mysql-test/suite/rpl/t/rpl_stm_log.test mysql-test/suite/rpl/t/rpl_truncate_2myisam.test: Rename: mysql-test/t/rpl_truncate_2myisam.test -> mysql-test/suite/rpl/t/rpl_truncate_2myisam.test mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result: Rename: mysql-test/r/rpl_ndb_UUID.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result: Rename: mysql-test/r/rpl_ndb_insert_ignore.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: Rename: mysql-test/t/rpl_ndb_circular.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test: Rename: mysql-test/t/rpl_ndb_commit_afterflush.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test: Rename: mysql-test/t/rpl_ndb_relayrotate.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt: Rename: mysql-test/t/rpl_ndb_rep_ignore-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result: Rename: mysql-test/r/binlog_stm_ctype_ucs.result -> mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test: Rename: mysql-test/t/binlog_stm_drop_tmp_tbl.test -> mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt: Rename: mysql-test/t/binlog_stm_innodb_stat-master.opt -> mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt mysql-test/suite/ndb/r/loaddata_autocom_ndb.result: Rename: mysql-test/r/loaddata_autocom_ndb.result -> mysql-test/suite/ndb/r/loaddata_autocom_ndb.result mysql-test/suite/ndb/r/ndb_autodiscover3.result: Rename: mysql-test/r/ndb_autodiscover3.result -> mysql-test/suite/ndb/r/ndb_autodiscover3.result mysql-test/suite/ndb/r/ndb_binlog_basic2.result: Rename: mysql-test/r/ndb_binlog_basic2.result -> mysql-test/suite/ndb/r/ndb_binlog_basic2.result mysql-test/suite/ndb/r/ndb_blob_partition.result: Rename: mysql-test/r/ndb_blob_partition.result -> mysql-test/suite/ndb/r/ndb_blob_partition.result mysql-test/suite/ndb/r/ndb_insert.result: Rename: mysql-test/r/ndb_insert.result -> mysql-test/suite/ndb/r/ndb_insert.result mysql-test/suite/ndb/r/ndb_partition_error2.result: Rename: mysql-test/r/ndb_partition_error2.result -> mysql-test/suite/ndb/r/ndb_partition_error2.result mysql-test/suite/ndb/r/ndb_partition_list.result: Rename: mysql-test/r/ndb_partition_list.result -> mysql-test/suite/ndb/r/ndb_partition_list.result mysql-test/suite/ndb/r/ndb_restore_print.result: Rename: mysql-test/r/ndb_restore_print.result -> mysql-test/suite/ndb/r/ndb_restore_print.result mysql-test/suite/ndb/r/ndb_transaction.result: Rename: mysql-test/r/ndb_transaction.result -> mysql-test/suite/ndb/r/ndb_transaction.result mysql-test/suite/ndb/r/partition_03ndb.result: Rename: mysql-test/r/partition_03ndb.result -> mysql-test/suite/ndb/r/partition_03ndb.result mysql-test/suite/ndb/t/loaddata_autocom_ndb.test: Rename: mysql-test/t/loaddata_autocom_ndb.test -> mysql-test/suite/ndb/t/loaddata_autocom_ndb.test mysql-test/suite/ndb/t/ndb_autodiscover3.test: Rename: mysql-test/t/ndb_autodiscover3.test -> mysql-test/suite/ndb/t/ndb_autodiscover3.test mysql-test/suite/ndb/t/ndb_config2.test: Rename: mysql-test/t/ndb_config2.test -> mysql-test/suite/ndb/t/ndb_config2.test mysql-test/suite/ndb/t/ndb_cursor.test: Rename: mysql-test/t/ndb_cursor.test -> mysql-test/suite/ndb/t/ndb_cursor.test mysql-test/suite/ndb/t/ndb_database.test: Rename: mysql-test/t/ndb_database.test -> mysql-test/suite/ndb/t/ndb_database.test mysql-test/suite/ndb/t/ndb_index_ordered.test: Rename: mysql-test/t/ndb_index_ordered.test -> mysql-test/suite/ndb/t/ndb_index_ordered.test mysql-test/suite/ndb/t/ndb_restore_partition-master.opt: Rename: mysql-test/t/ndb_restore_partition-master.opt -> mysql-test/suite/ndb/t/ndb_restore_partition-master.opt mysql-test/suite/rpl/r/rpl_000015.result: Rename: mysql-test/r/rpl_000015.result -> mysql-test/suite/rpl/r/rpl_000015.result mysql-test/suite/rpl/r/rpl_bit_npk.result: Rename: mysql-test/r/rpl_bit_npk.result -> mysql-test/suite/rpl/r/rpl_bit_npk.result mysql-test/suite/rpl/r/rpl_critical_errors.result: Rename: mysql-test/r/rpl_critical_errors.result -> mysql-test/suite/rpl/r/rpl_critical_errors.result mysql-test/suite/rpl/r/rpl_delete_no_where.result: Rename: mysql-test/r/rpl_delete_no_where.result -> mysql-test/suite/rpl/r/rpl_delete_no_where.result mysql-test/suite/rpl/r/rpl_do_grant.result: Rename: mysql-test/r/rpl_do_grant.result -> mysql-test/suite/rpl/r/rpl_do_grant.result mysql-test/suite/rpl/r/rpl_events.result: Rename: mysql-test/r/rpl_events.result -> mysql-test/suite/rpl/r/rpl_events.result mysql-test/suite/rpl/r/rpl_get_lock.result: Rename: mysql-test/r/rpl_get_lock.result -> mysql-test/suite/rpl/r/rpl_get_lock.result mysql-test/suite/rpl/r/rpl_incident.result: Rename: mysql-test/r/rpl_incident.result -> mysql-test/suite/rpl/r/rpl_incident.result mysql-test/suite/rpl/r/rpl_init_slave.result: Rename: mysql-test/r/rpl_init_slave.result -> mysql-test/suite/rpl/r/rpl_init_slave.result mysql-test/suite/rpl/r/rpl_insert.result: Rename: mysql-test/r/rpl_insert.result -> mysql-test/suite/rpl/r/rpl_insert.result mysql-test/suite/rpl/r/rpl_insert_id.result: Rename: mysql-test/r/rpl_insert_id.result -> mysql-test/suite/rpl/r/rpl_insert_id.result mysql-test/suite/rpl/r/rpl_loaddata_s.result: Rename: mysql-test/r/rpl_loaddata_s.result -> mysql-test/suite/rpl/r/rpl_loaddata_s.result mysql-test/suite/rpl/r/rpl_multi_update4.result: Rename: mysql-test/r/rpl_multi_update4.result -> mysql-test/suite/rpl/r/rpl_multi_update4.result mysql-test/suite/rpl/r/rpl_optimize.result: Rename: mysql-test/r/rpl_optimize.result -> mysql-test/suite/rpl/r/rpl_optimize.result mysql-test/suite/rpl/r/rpl_row_blob_innodb.result: Rename: mysql-test/r/rpl_row_blob_innodb.result -> mysql-test/suite/rpl/r/rpl_row_blob_innodb.result mysql-test/suite/rpl/r/rpl_row_charset.result: Rename: mysql-test/r/rpl_row_charset.result -> mysql-test/suite/rpl/r/rpl_row_charset.result mysql-test/suite/rpl/r/rpl_row_drop.result: Rename: mysql-test/r/rpl_row_drop.result -> mysql-test/suite/rpl/r/rpl_row_drop.result mysql-test/suite/rpl/r/rpl_row_sp001.result: Rename: mysql-test/r/rpl_row_sp001.result -> mysql-test/suite/rpl/r/rpl_row_sp001.result mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result: Rename: mysql-test/r/rpl_row_sp006_InnoDB.result -> mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result mysql-test/suite/rpl/r/rpl_row_sp012.result: Rename: mysql-test/r/rpl_row_sp012.result -> mysql-test/suite/rpl/r/rpl_row_sp012.result mysql-test/suite/rpl/r/rpl_row_stop_middle.result: Rename: mysql-test/r/rpl_row_stop_middle.result -> mysql-test/suite/rpl/r/rpl_row_stop_middle.result mysql-test/suite/rpl/r/rpl_sp_effects.result: Rename: mysql-test/r/rpl_sp_effects.result -> mysql-test/suite/rpl/r/rpl_sp_effects.result mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result: Rename: mysql-test/r/rpl_stm_flsh_tbls.result -> mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result mysql-test/suite/rpl/r/rpl_stm_mystery22.result: Rename: mysql-test/r/rpl_stm_mystery22.result -> mysql-test/suite/rpl/r/rpl_stm_mystery22.result mysql-test/suite/rpl/t/rpl000010.test: Rename: mysql-test/t/rpl000010.test -> mysql-test/suite/rpl/t/rpl000010.test mysql-test/suite/rpl/t/rpl000017.test: Rename: mysql-test/t/rpl000017.test -> mysql-test/suite/rpl/t/rpl000017.test mysql-test/suite/rpl/t/rpl_000015.slave-mi: Rename: mysql-test/t/rpl_000015.slave-mi -> mysql-test/suite/rpl/t/rpl_000015.slave-mi mysql-test/suite/rpl/t/rpl_EE_err.test: Rename: mysql-test/t/rpl_EE_err.test -> mysql-test/suite/rpl/t/rpl_EE_err.test mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Rename: mysql-test/t/rpl_LD_INFILE.test -> mysql-test/suite/rpl/t/rpl_LD_INFILE.test mysql-test/suite/rpl/t/rpl_charset_sjis.test: Rename: mysql-test/t/rpl_charset_sjis.test -> mysql-test/suite/rpl/t/rpl_charset_sjis.test mysql-test/suite/rpl/t/rpl_create_database-slave.opt: Rename: mysql-test/t/rpl_create_database-slave.opt -> mysql-test/suite/rpl/t/rpl_create_database-slave.opt mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: Rename: mysql-test/t/rpl_err_ignoredtable.test -> mysql-test/suite/rpl/t/rpl_err_ignoredtable.test mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt: Rename: mysql-test/t/rpl_extraCol_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt mysql-test/suite/rpl/t/rpl_extraCol_myisam.test: Rename: mysql-test/t/rpl_extraCol_myisam.test -> mysql-test/suite/rpl/t/rpl_extraCol_myisam.test mysql-test/suite/rpl/t/rpl_failed_optimize.test: Rename: mysql-test/t/rpl_failed_optimize.test -> mysql-test/suite/rpl/t/rpl_failed_optimize.test mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt: Rename: mysql-test/t/rpl_foreign_key_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt mysql-test/suite/rpl/t/rpl_insert_id-slave.opt: Rename: mysql-test/t/rpl_insert_id-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_id-slave.opt mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Rename: mysql-test/t/rpl_load_table_from_master.test -> mysql-test/suite/rpl/t/rpl_load_table_from_master.test mysql-test/suite/rpl/t/rpl_loaddata.test: Rename: mysql-test/t/rpl_loaddata.test -> mysql-test/suite/rpl/t/rpl_loaddata.test mysql-test/suite/rpl/t/rpl_loaddata_s.test: Rename: mysql-test/t/rpl_loaddata_s.test -> mysql-test/suite/rpl/t/rpl_loaddata_s.test mysql-test/suite/rpl/t/rpl_master_pos_wait.test: Rename: mysql-test/t/rpl_master_pos_wait.test -> mysql-test/suite/rpl/t/rpl_master_pos_wait.test mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh: Rename: mysql-test/t/rpl_misc_functions-slave.sh -> mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh mysql-test/suite/rpl/t/rpl_multi_update2.test: Rename: mysql-test/t/rpl_multi_update2.test -> mysql-test/suite/rpl/t/rpl_multi_update2.test mysql-test/suite/rpl/t/rpl_packet.test: Rename: mysql-test/t/rpl_packet.test -> mysql-test/suite/rpl/t/rpl_packet.test mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt: Rename: mysql-test/t/rpl_relay_space_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt: Rename: mysql-test/t/rpl_row_basic_11bugs-slave.opt -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt: Rename: mysql-test/t/rpl_row_inexist_tbl-slave.opt -> mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt mysql-test/suite/rpl/t/rpl_row_insert_delayed.test: Rename: mysql-test/t/rpl_row_insert_delayed.test -> mysql-test/suite/rpl/t/rpl_row_insert_delayed.test mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt: Rename: mysql-test/t/rpl_row_log_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_max_relay_size.test: Rename: mysql-test/t/rpl_row_max_relay_size.test -> mysql-test/suite/rpl/t/rpl_row_max_relay_size.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test: Rename: mysql-test/t/rpl_row_sp002_innodb.test -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt: Rename: mysql-test/t/rpl_row_sp003-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt: Rename: mysql-test/t/rpl_row_sp006_InnoDB-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt mysql-test/suite/rpl/t/rpl_row_sp012.test: Rename: mysql-test/t/rpl_row_sp012.test -> mysql-test/suite/rpl/t/rpl_row_sp012.test mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Rename: mysql-test/t/rpl_row_stop_middle_update.test -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test: Rename: mysql-test/t/rpl_row_tabledefs_2myisam.test -> mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test mysql-test/suite/rpl/t/rpl_row_trig003.test: Rename: mysql-test/t/rpl_row_trig003.test -> mysql-test/suite/rpl/t/rpl_row_trig003.test mysql-test/suite/rpl/t/rpl_server_id2.test: Rename: mysql-test/t/rpl_server_id2.test -> mysql-test/suite/rpl/t/rpl_server_id2.test mysql-test/suite/rpl/t/rpl_sporadic_master.test: Rename: mysql-test/t/rpl_sporadic_master.test -> mysql-test/suite/rpl/t/rpl_sporadic_master.test mysql-test/suite/rpl/t/rpl_stm_000001.test: Rename: mysql-test/t/rpl_stm_000001.test -> mysql-test/suite/rpl/t/rpl_stm_000001.test mysql-test/suite/rpl/t/rpl_stm_reset_slave.test: Rename: mysql-test/t/rpl_stm_reset_slave.test -> mysql-test/suite/rpl/t/rpl_stm_reset_slave.test mysql-test/suite/rpl/t/rpl_temp_table.test: Rename: mysql-test/t/rpl_temp_table.test -> mysql-test/suite/rpl/t/rpl_temp_table.test mysql-test/suite/rpl/t/rpl_timezone-slave.opt: Rename: mysql-test/t/rpl_timezone-slave.opt -> mysql-test/suite/rpl/t/rpl_timezone-slave.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result: Rename: mysql-test/r/rpl_ndb_2innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result: Rename: mysql-test/r/rpl_ndb_circular.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: Rename: mysql-test/r/rpl_ndb_innodb_trans.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test: Rename: mysql-test/t/rpl_ndb_blob2.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt: Rename: mysql-test/t/rpl_ndb_do_table-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test: Rename: mysql-test/t/rpl_ndb_innodb2ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test: Rename: mysql-test/t/rpl_ndb_insert_ignore.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test: Rename: mysql-test/t/rpl_ndb_multi_update3.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test: Rename: mysql-test/t/rpl_ndb_myisam2ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result: Rename: mysql-test/r/binlog_stm_drop_tmp_tbl.result -> mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result: Rename: mysql-test/r/binlog_stm_innodb_stat.result -> mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result mysql-test/suite/binlog/t/binlog_stm_blackhole.test: Rename: mysql-test/t/binlog_stm_blackhole.test -> mysql-test/suite/binlog/t/binlog_stm_blackhole.test mysql-test/suite/binlog/t/binlog_stm_insert_select.test: Rename: mysql-test/t/binlog_stm_insert_select.test -> mysql-test/suite/binlog/t/binlog_stm_insert_select.test mysql-test/suite/ndb/r/ndb_binlog_discover.result: Rename: mysql-test/r/ndb_binlog_discover.result -> mysql-test/suite/ndb/r/ndb_binlog_discover.result mysql-test/suite/ndb/r/ndb_bitfield.result: Rename: mysql-test/r/ndb_bitfield.result -> mysql-test/suite/ndb/r/ndb_bitfield.result mysql-test/suite/ndb/r/ndb_minmax.result: Rename: mysql-test/r/ndb_minmax.result -> mysql-test/suite/ndb/r/ndb_minmax.result mysql-test/suite/ndb/r/ndb_single_user.result: Rename: mysql-test/r/ndb_single_user.result -> mysql-test/suite/ndb/r/ndb_single_user.result mysql-test/suite/ndb/r/ndb_subquery.result: Rename: mysql-test/r/ndb_subquery.result -> mysql-test/suite/ndb/r/ndb_subquery.result mysql-test/suite/ndb/t/ndb_binlog_log_bin.test: Rename: mysql-test/t/ndb_binlog_log_bin.test -> mysql-test/suite/ndb/t/ndb_binlog_log_bin.test mysql-test/suite/ndb/t/ndb_config.test: Rename: mysql-test/t/ndb_config.test -> mysql-test/suite/ndb/t/ndb_config.test mysql-test/suite/ndb/t/ndb_replace.test: Rename: mysql-test/t/ndb_replace.test -> mysql-test/suite/ndb/t/ndb_replace.test mysql-test/suite/ndb/t/ndb_transaction.test: Rename: mysql-test/t/ndb_transaction.test -> mysql-test/suite/ndb/t/ndb_transaction.test mysql-test/suite/ndb/t/ndb_trigger.test: Rename: mysql-test/t/ndb_trigger.test -> mysql-test/suite/ndb/t/ndb_trigger.test mysql-test/suite/ndb/t/ndb_view.test: Rename: mysql-test/t/ndb_view.test -> mysql-test/suite/ndb/t/ndb_view.test mysql-test/suite/rpl/r/rpl000011.result: Rename: mysql-test/r/rpl000011.result -> mysql-test/suite/rpl/r/rpl000011.result mysql-test/suite/rpl/r/rpl_free_items.result: Rename: mysql-test/r/rpl_free_items.result -> mysql-test/suite/rpl/r/rpl_free_items.result mysql-test/suite/rpl/r/rpl_ignore_revoke.result: Rename: mysql-test/r/rpl_ignore_revoke.result -> mysql-test/suite/rpl/r/rpl_ignore_revoke.result mysql-test/suite/rpl/r/rpl_innodb.result: Rename: mysql-test/r/rpl_innodb.result -> mysql-test/suite/rpl/r/rpl_innodb.result mysql-test/suite/rpl/r/rpl_loadfile.result: Rename: mysql-test/r/rpl_loadfile.result -> mysql-test/suite/rpl/r/rpl_loadfile.result mysql-test/suite/rpl/r/rpl_multi_update.result: Rename: mysql-test/r/rpl_multi_update.result -> mysql-test/suite/rpl/r/rpl_multi_update.result mysql-test/suite/rpl/r/rpl_ps.result: Rename: mysql-test/r/rpl_ps.result -> mysql-test/suite/rpl/r/rpl_ps.result mysql-test/suite/rpl/r/rpl_read_only.result: Rename: mysql-test/r/rpl_read_only.result -> mysql-test/suite/rpl/r/rpl_read_only.result mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result: Rename: mysql-test/r/rpl_replicate_ignore_db.result -> mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result mysql-test/suite/rpl/r/rpl_row_4_bytes.result: Rename: mysql-test/r/rpl_row_4_bytes.result -> mysql-test/suite/rpl/r/rpl_row_4_bytes.result mysql-test/suite/rpl/r/rpl_row_USER.result: Rename: mysql-test/r/rpl_row_USER.result -> mysql-test/suite/rpl/r/rpl_row_USER.result mysql-test/suite/rpl/r/rpl_row_UUID.result: Rename: mysql-test/r/rpl_row_UUID.result -> mysql-test/suite/rpl/r/rpl_row_UUID.result mysql-test/suite/rpl/r/rpl_row_blob_myisam.result: Rename: mysql-test/r/rpl_row_blob_myisam.result -> mysql-test/suite/rpl/r/rpl_row_blob_myisam.result mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result: Rename: mysql-test/r/rpl_row_err_ignoredtable.result -> mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result: Rename: mysql-test/r/rpl_row_sp002_innodb.result -> mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result: Rename: mysql-test/r/rpl_row_sp007_innodb.result -> mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result mysql-test/suite/rpl/r/rpl_ssl1.result: Rename: mysql-test/r/rpl_ssl1.result -> mysql-test/suite/rpl/r/rpl_ssl1.result mysql-test/suite/rpl/r/rpl_stm_000001.result: Rename: mysql-test/r/rpl_stm_000001.result -> mysql-test/suite/rpl/r/rpl_stm_000001.result mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: Rename: mysql-test/r/rpl_truncate_2myisam.result -> mysql-test/suite/rpl/r/rpl_truncate_2myisam.result mysql-test/suite/rpl/t/rpl000018-master.opt: Rename: mysql-test/t/rpl000018-master.opt -> mysql-test/suite/rpl/t/rpl000018-master.opt mysql-test/suite/rpl/t/rpl_000015.test: Rename: mysql-test/t/rpl_000015.test -> mysql-test/suite/rpl/t/rpl_000015.test mysql-test/suite/rpl/t/rpl_drop_temp.test: Rename: mysql-test/t/rpl_drop_temp.test -> mysql-test/suite/rpl/t/rpl_drop_temp.test mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt: Rename: mysql-test/t/rpl_err_ignoredtable-slave.opt -> mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt: Rename: mysql-test/t/rpl_failed_optimize-master.opt -> mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test: Rename: mysql-test/t/rpl_foreign_key_innodb.test -> mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test mysql-test/suite/rpl/t/rpl_ignore_table.test: Rename: mysql-test/t/rpl_ignore_table.test -> mysql-test/suite/rpl/t/rpl_ignore_table.test mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt: Rename: mysql-test/t/rpl_ignore_table_update-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt mysql-test/suite/rpl/t/rpl_incident-master.opt: Rename: mysql-test/t/rpl_incident-master.opt -> mysql-test/suite/rpl/t/rpl_incident-master.opt mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt: Rename: mysql-test/t/rpl_insert_id_pk-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt: Rename: mysql-test/t/rpl_loaddata_m-master.opt -> mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Rename: mysql-test/t/rpl_loaddatalocal.test -> mysql-test/suite/rpl/t/rpl_loaddatalocal.test mysql-test/suite/rpl/t/rpl_misc_functions.test: Rename: mysql-test/t/rpl_misc_functions.test -> mysql-test/suite/rpl/t/rpl_misc_functions.test mysql-test/suite/rpl/t/rpl_multi_update.test: Rename: mysql-test/t/rpl_multi_update.test -> mysql-test/suite/rpl/t/rpl_multi_update.test mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Rename: mysql-test/t/rpl_row_basic_11bugs.test -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt: Rename: mysql-test/t/rpl_row_blob_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_log-master.opt: Rename: mysql-test/t/rpl_row_log-master.opt -> mysql-test/suite/rpl/t/rpl_row_log-master.opt mysql-test/suite/rpl/t/rpl_row_sp001.test: Rename: mysql-test/t/rpl_row_sp001.test -> mysql-test/suite/rpl/t/rpl_row_sp001.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt: Rename: mysql-test/t/rpl_row_sp002_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_sp008.test: Rename: mysql-test/t/rpl_row_sp008.test -> mysql-test/suite/rpl/t/rpl_row_sp008.test mysql-test/suite/rpl/t/rpl_sp-slave.opt: Rename: mysql-test/t/rpl_sp-slave.opt -> mysql-test/suite/rpl/t/rpl_sp-slave.opt mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt: Rename: mysql-test/t/rpl_stm_000001-slave.opt -> mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt mysql-test/suite/rpl/t/rpl_timezone.test: Rename: mysql-test/t/rpl_timezone.test -> mysql-test/suite/rpl/t/rpl_timezone.test mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result: Rename: mysql-test/r/rpl_ndb_2myisam.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result: Rename: mysql-test/r/rpl_ndb_basic.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: Rename: mysql-test/r/rpl_ndb_extraCol.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result: Rename: mysql-test/r/rpl_ndb_idempotent.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Rename: mysql-test/r/rpl_ndb_log.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: Rename: mysql-test/r/rpl_ndb_row_001.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result: Rename: mysql-test/r/rpl_ndb_stm_innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt: Rename: mysql-test/t/rpl_ndb_2innodb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test: Rename: mysql-test/t/rpl_ndb_blob.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test: Rename: mysql-test/t/rpl_ndb_dd_advance.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt: Rename: mysql-test/t/rpl_ndb_innodb_trans-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt: Rename: mysql-test/t/rpl_ndb_myisam2ndb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test: Rename: mysql-test/t/rpl_ndb_rep_ignore.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: Rename: mysql-test/t/rpl_ndb_stm_innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: Rename: mysql-test/t/rpl_ndbapi_multi.test -> mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test mysql-test/suite/binlog/r/binlog_killed.result: Rename: mysql-test/r/binlog_killed.result -> mysql-test/suite/binlog/r/binlog_killed.result mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result: Rename: mysql-test/r/binlog_row_ctype_ucs.result -> mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result mysql-test/suite/binlog/r/binlog_stm_binlog.result: Rename: mysql-test/r/binlog_stm_binlog.result -> mysql-test/suite/binlog/r/binlog_stm_binlog.result mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test: Rename: mysql-test/t/binlog_row_ctype_ucs.test -> mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test: Rename: mysql-test/t/binlog_stm_innodb_stat.test -> mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test mysql-test/suite/binlog/t/binlog_stm_ps.test: Rename: mysql-test/t/binlog_stm_ps.test -> mysql-test/suite/binlog/t/binlog_stm_ps.test mysql-test/suite/ndb/r/ndb_cache.result: Rename: mysql-test/r/ndb_cache.result -> mysql-test/suite/ndb/r/ndb_cache.result mysql-test/suite/ndb/r/ndb_charset.result: Rename: mysql-test/r/ndb_charset.result -> mysql-test/suite/ndb/r/ndb_charset.result mysql-test/suite/ndb/r/ndb_config.result: Rename: mysql-test/r/ndb_config.result -> mysql-test/suite/ndb/r/ndb_config.result mysql-test/suite/ndb/r/ndb_dd_disk2memory.result: Rename: mysql-test/r/ndb_dd_disk2memory.result -> mysql-test/suite/ndb/r/ndb_dd_disk2memory.result mysql-test/suite/ndb/r/ndb_index.result: Rename: mysql-test/r/ndb_index.result -> mysql-test/suite/ndb/r/ndb_index.result mysql-test/suite/ndb/r/ndb_partition_key.result: Rename: mysql-test/r/ndb_partition_key.result -> mysql-test/suite/ndb/r/ndb_partition_key.result mysql-test/suite/ndb/r/strict_autoinc_5ndb.result: Rename: mysql-test/r/strict_autoinc_5ndb.result -> mysql-test/suite/ndb/r/strict_autoinc_5ndb.result mysql-test/suite/ndb/t/ndb_backup_print.test: Rename: mysql-test/t/ndb_backup_print.test -> mysql-test/suite/ndb/t/ndb_backup_print.test mysql-test/suite/ndb/t/ndb_binlog_basic2.test: Rename: mysql-test/t/ndb_binlog_basic2.test -> mysql-test/suite/ndb/t/ndb_binlog_basic2.test mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test: Rename: mysql-test/t/ndb_binlog_ignore_db.test -> mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test mysql-test/suite/ndb/t/ndb_insert.test: Rename: mysql-test/t/ndb_insert.test -> mysql-test/suite/ndb/t/ndb_insert.test mysql-test/suite/ndb/t/ndb_load.test: Rename: mysql-test/t/ndb_load.test -> mysql-test/suite/ndb/t/ndb_load.test mysql-test/suite/ndb/t/ndb_multi.test: Rename: mysql-test/t/ndb_multi.test -> mysql-test/suite/ndb/t/ndb_multi.test mysql-test/suite/ndb/t/ndb_partition_error.test: Rename: mysql-test/t/ndb_partition_error.test -> mysql-test/suite/ndb/t/ndb_partition_error.test mysql-test/suite/ndb/t/ndb_partition_error2.test: Rename: mysql-test/t/ndb_partition_error2.test -> mysql-test/suite/ndb/t/ndb_partition_error2.test mysql-test/suite/ndb/t/ndb_partition_key.test: Rename: mysql-test/t/ndb_partition_key.test -> mysql-test/suite/ndb/t/ndb_partition_key.test mysql-test/suite/ndb/t/ndb_rename.test: Rename: mysql-test/t/ndb_rename.test -> mysql-test/suite/ndb/t/ndb_rename.test mysql-test/suite/ndb/t/ndb_single_user.test: Rename: mysql-test/t/ndb_single_user.test -> mysql-test/suite/ndb/t/ndb_single_user.test mysql-test/suite/rpl/r/rpl000010.result: Rename: mysql-test/r/rpl000010.result -> mysql-test/suite/rpl/r/rpl000010.result mysql-test/suite/rpl/r/rpl_EE_err.result: Rename: mysql-test/r/rpl_EE_err.result -> mysql-test/suite/rpl/r/rpl_EE_err.result mysql-test/suite/rpl/r/rpl_ddl.result: Rename: mysql-test/r/rpl_ddl.result -> mysql-test/suite/rpl/r/rpl_ddl.result mysql-test/suite/rpl/r/rpl_deadlock_innodb.result: Rename: mysql-test/r/rpl_deadlock_innodb.result -> mysql-test/suite/rpl/r/rpl_deadlock_innodb.result mysql-test/suite/rpl/r/rpl_drop.result: Rename: mysql-test/r/rpl_drop.result -> mysql-test/suite/rpl/r/rpl_drop.result mysql-test/suite/rpl/r/rpl_drop_temp.result: Rename: mysql-test/r/rpl_drop_temp.result -> mysql-test/suite/rpl/r/rpl_drop_temp.result mysql-test/suite/rpl/r/rpl_many_optimize.result: Rename: mysql-test/r/rpl_many_optimize.result -> mysql-test/suite/rpl/r/rpl_many_optimize.result mysql-test/suite/rpl/r/rpl_multi_engine.result: Rename: mysql-test/r/rpl_multi_engine.result -> mysql-test/suite/rpl/r/rpl_multi_engine.result mysql-test/suite/rpl/r/rpl_packet.result: Rename: mysql-test/r/rpl_packet.result -> mysql-test/suite/rpl/r/rpl_packet.result mysql-test/suite/rpl/r/rpl_relayrotate.result: Rename: mysql-test/r/rpl_relayrotate.result -> mysql-test/suite/rpl/r/rpl_relayrotate.result mysql-test/suite/rpl/r/rpl_row_basic_8partition.result: Rename: mysql-test/r/rpl_row_basic_8partition.result -> mysql-test/suite/rpl/r/rpl_row_basic_8partition.result mysql-test/suite/rpl/r/rpl_row_log.result: Rename: mysql-test/r/rpl_row_log.result -> mysql-test/suite/rpl/r/rpl_row_log.result mysql-test/suite/rpl/r/rpl_row_sp003.result: Rename: mysql-test/r/rpl_row_sp003.result -> mysql-test/suite/rpl/r/rpl_row_sp003.result mysql-test/suite/rpl/r/rpl_row_view01.result: Rename: mysql-test/r/rpl_row_view01.result -> mysql-test/suite/rpl/r/rpl_row_view01.result mysql-test/suite/rpl/r/rpl_session_var.result: Rename: mysql-test/r/rpl_session_var.result -> mysql-test/suite/rpl/r/rpl_session_var.result mysql-test/suite/rpl/r/rpl_sporadic_master.result: Rename: mysql-test/r/rpl_sporadic_master.result -> mysql-test/suite/rpl/r/rpl_sporadic_master.result mysql-test/suite/rpl/r/rpl_udf.result: Rename: mysql-test/r/rpl_udf.result -> mysql-test/suite/rpl/r/rpl_udf.result mysql-test/suite/rpl/r/rpl_variables.result: Rename: mysql-test/r/rpl_variables.result -> mysql-test/suite/rpl/r/rpl_variables.result mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt: Rename: mysql-test/t/rpl_auto_increment-slave.opt -> mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt mysql-test/suite/rpl/t/rpl_auto_increment.test: Rename: mysql-test/t/rpl_auto_increment.test -> mysql-test/suite/rpl/t/rpl_auto_increment.test mysql-test/suite/rpl/t/rpl_bit.test: Rename: mysql-test/t/rpl_bit.test -> mysql-test/suite/rpl/t/rpl_bit.test mysql-test/suite/rpl/t/rpl_critical_errors.test: Rename: mysql-test/t/rpl_critical_errors.test -> mysql-test/suite/rpl/t/rpl_critical_errors.test mysql-test/suite/rpl/t/rpl_ddl.test: Rename: mysql-test/t/rpl_ddl.test -> mysql-test/suite/rpl/t/rpl_ddl.test mysql-test/suite/rpl/t/rpl_do_grant.test: Rename: mysql-test/t/rpl_do_grant.test -> mysql-test/suite/rpl/t/rpl_do_grant.test mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt: Rename: mysql-test/t/rpl_extraCol_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt mysql-test/suite/rpl/t/rpl_ignore_revoke.test: Rename: mysql-test/t/rpl_ignore_revoke.test -> mysql-test/suite/rpl/t/rpl_ignore_revoke.test mysql-test/suite/rpl/t/rpl_init_slave-slave.opt: Rename: mysql-test/t/rpl_init_slave-slave.opt -> mysql-test/suite/rpl/t/rpl_init_slave-slave.opt mysql-test/suite/rpl/t/rpl_log_pos.test: Rename: mysql-test/t/rpl_log_pos.test -> mysql-test/suite/rpl/t/rpl_log_pos.test mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt: Rename: mysql-test/t/rpl_multi_delete2-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt mysql-test/suite/rpl/t/rpl_multi_update3.test: Rename: mysql-test/t/rpl_multi_update3.test -> mysql-test/suite/rpl/t/rpl_multi_update3.test mysql-test/suite/rpl/t/rpl_optimize.test: Rename: mysql-test/t/rpl_optimize.test -> mysql-test/suite/rpl/t/rpl_optimize.test mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Rename: mysql-test/t/rpl_rbr_to_sbr.test -> mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt: Rename: mysql-test/t/rpl_replicate_do-slave.opt -> mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt: Rename: mysql-test/t/rpl_rewrt_db-slave.opt -> mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh: Rename: mysql-test/t/rpl_rotate_logs-slave.sh -> mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh mysql-test/suite/rpl/t/rpl_row_UUID.test: Rename: mysql-test/t/rpl_row_UUID.test -> mysql-test/suite/rpl/t/rpl_row_UUID.test mysql-test/suite/rpl/t/rpl_row_blob_innodb.test: Rename: mysql-test/t/rpl_row_blob_innodb.test -> mysql-test/suite/rpl/t/rpl_row_blob_innodb.test mysql-test/suite/rpl/t/rpl_row_create_table.test: Rename: mysql-test/t/rpl_row_create_table.test -> mysql-test/suite/rpl/t/rpl_row_create_table.test mysql-test/suite/rpl/t/rpl_row_func002.test: Rename: mysql-test/t/rpl_row_func002.test -> mysql-test/suite/rpl/t/rpl_row_func002.test mysql-test/suite/rpl/t/rpl_row_log.test: Rename: mysql-test/t/rpl_row_log.test -> mysql-test/suite/rpl/t/rpl_row_log.test mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt: Rename: mysql-test/t/rpl_row_log_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Rename: mysql-test/t/rpl_row_mysqlbinlog.test -> mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test mysql-test/suite/rpl/t/rpl_row_sp005.test: Rename: mysql-test/t/rpl_row_sp005.test -> mysql-test/suite/rpl/t/rpl_row_sp005.test mysql-test/suite/rpl/t/rpl_server_id2-slave.opt: Rename: mysql-test/t/rpl_server_id2-slave.opt -> mysql-test/suite/rpl/t/rpl_server_id2-slave.opt mysql-test/suite/rpl/t/rpl_sp.test: Rename: mysql-test/t/rpl_sp.test -> mysql-test/suite/rpl/t/rpl_sp.test mysql-test/suite/rpl/t/rpl_ssl.test: Rename: mysql-test/t/rpl_ssl.test -> mysql-test/suite/rpl/t/rpl_ssl.test mysql-test/suite/rpl/t/rpl_stm_EE_err2.test: Rename: mysql-test/t/rpl_stm_EE_err2.test -> mysql-test/suite/rpl/t/rpl_stm_EE_err2.test mysql-test/suite/rpl/t/rpl_stm_multi_query.test: Rename: mysql-test/t/rpl_stm_multi_query.test -> mysql-test/suite/rpl/t/rpl_stm_multi_query.test mysql-test/suite/rpl/t/rpl_udf-master.opt: Rename: mysql-test/t/rpl_udf-master.opt -> mysql-test/suite/rpl/t/rpl_udf-master.opt mysql-test/suite/rpl/t/rpl_udf.test: Rename: mysql-test/t/rpl_udf.test -> mysql-test/suite/rpl/t/rpl_udf.test mysql-test/suite/rpl/t/rpl_user_variables.test: Rename: mysql-test/t/rpl_user_variables.test -> mysql-test/suite/rpl/t/rpl_user_variables.test mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result: Rename: mysql-test/r/rpl_ndb_dd_basic.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result: Rename: mysql-test/r/rpl_ndb_ddl.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result: Rename: mysql-test/r/rpl_ndb_do_table.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result: Rename: mysql-test/r/rpl_ndb_func003.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result: Rename: mysql-test/r/rpl_ndb_load.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result: Rename: mysql-test/r/rpl_ndb_multi_update2.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result: Rename: mysql-test/r/rpl_ndb_multi_update3.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result: Rename: mysql-test/r/rpl_row_basic_7ndb.result -> mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt: Rename: mysql-test/t/rpl_ndb_2myisam-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test: Rename: mysql-test/t/rpl_ndb_auto_inc.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: Rename: mysql-test/t/rpl_ndb_basic.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test: Rename: mysql-test/t/rpl_ndb_dd_partitions.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test: Rename: mysql-test/t/rpl_ndb_log.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt: Rename: mysql-test/t/rpl_ndb_myisam2ndb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test: Rename: mysql-test/t/rpl_row_basic_7ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result: Rename: mysql-test/r/binlog_row_drop_tmp_tbl.result -> mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result mysql-test/suite/binlog/r/binlog_row_innodb_stat.result: Rename: mysql-test/r/binlog_row_innodb_stat.result -> mysql-test/suite/binlog/r/binlog_row_innodb_stat.result mysql-test/suite/binlog/t/binlog_killed.test: Rename: mysql-test/t/binlog_killed.test -> mysql-test/suite/binlog/t/binlog_killed.test mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test: Rename: mysql-test/t/binlog_row_ctype_cp932.test -> mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test mysql-test/suite/binlog/t/binlog_row_insert_select.test: Rename: mysql-test/t/binlog_row_insert_select.test -> mysql-test/suite/binlog/t/binlog_row_insert_select.test mysql-test/suite/ndb/r/ndb_alter_table.result: Rename: mysql-test/r/ndb_alter_table.result -> mysql-test/suite/ndb/r/ndb_alter_table.result mysql-test/suite/ndb/r/ndb_binlog_multi.result: Rename: mysql-test/r/ndb_binlog_multi.result -> mysql-test/suite/ndb/r/ndb_binlog_multi.result mysql-test/suite/ndb/r/ndb_cache2.result: Rename: mysql-test/r/ndb_cache2.result -> mysql-test/suite/ndb/r/ndb_cache2.result mysql-test/suite/ndb/r/ndb_database.result: Rename: mysql-test/r/ndb_database.result -> mysql-test/suite/ndb/r/ndb_database.result mysql-test/suite/ndb/r/ndb_grant.result: Rename: mysql-test/r/ndb_grant.result -> mysql-test/suite/ndb/r/ndb_grant.result mysql-test/suite/ndb/r/ndb_restore.result: Rename: mysql-test/r/ndb_restore.result -> mysql-test/suite/ndb/r/ndb_restore.result mysql-test/suite/ndb/r/ndb_restore_partition.result: Rename: mysql-test/r/ndb_restore_partition.result -> mysql-test/suite/ndb/r/ndb_restore_partition.result mysql-test/suite/ndb/r/ndbapi.result: Rename: mysql-test/r/ndbapi.result -> mysql-test/suite/ndb/r/ndbapi.result mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt: Rename: mysql-test/t/ndb_autodiscover2-master.opt -> mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt mysql-test/suite/ndb/t/ndb_autodiscover2.test: Rename: mysql-test/t/ndb_autodiscover2.test -> mysql-test/suite/ndb/t/ndb_autodiscover2.test mysql-test/suite/ndb/t/ndb_index.test: Rename: mysql-test/t/ndb_index.test -> mysql-test/suite/ndb/t/ndb_index.test mysql-test/suite/ndb/t/ndb_lock.test: Rename: mysql-test/t/ndb_lock.test -> mysql-test/suite/ndb/t/ndb_lock.test mysql-test/suite/ndb/t/ndb_restore_compat.test: Rename: mysql-test/t/ndb_restore_compat.test -> mysql-test/suite/ndb/t/ndb_restore_compat.test mysql-test/suite/ndb/t/ndb_sp.test: Rename: mysql-test/t/ndb_sp.test -> mysql-test/suite/ndb/t/ndb_sp.test mysql-test/suite/ndb/t/ndb_subquery.test: Rename: mysql-test/t/ndb_subquery.test -> mysql-test/suite/ndb/t/ndb_subquery.test mysql-test/suite/ndb/t/ndb_temporary.test: Rename: mysql-test/t/ndb_temporary.test -> mysql-test/suite/ndb/t/ndb_temporary.test mysql-test/suite/rpl/r/rpl_LD_INFILE.result: Rename: mysql-test/r/rpl_LD_INFILE.result -> mysql-test/suite/rpl/r/rpl_LD_INFILE.result mysql-test/suite/rpl/r/rpl_auto_increment.result: Rename: mysql-test/r/rpl_auto_increment.result -> mysql-test/suite/rpl/r/rpl_auto_increment.result mysql-test/suite/rpl/r/rpl_create_database.result: Rename: mysql-test/r/rpl_create_database.result -> mysql-test/suite/rpl/r/rpl_create_database.result mysql-test/suite/rpl/r/rpl_critical_errors.result.txt: Rename: mysql-test/r/rpl_critical_errors.result.txt -> mysql-test/suite/rpl/r/rpl_critical_errors.result.txt mysql-test/suite/rpl/r/rpl_empty_master_crash.result: Rename: mysql-test/r/rpl_empty_master_crash.result -> mysql-test/suite/rpl/r/rpl_empty_master_crash.result mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Rename: mysql-test/r/rpl_flushlog_loop.result -> mysql-test/suite/rpl/r/rpl_flushlog_loop.result mysql-test/suite/rpl/r/rpl_ignore_table.result: Rename: mysql-test/r/rpl_ignore_table.result -> mysql-test/suite/rpl/r/rpl_ignore_table.result mysql-test/suite/rpl/r/rpl_load_table_from_master.result: Rename: mysql-test/r/rpl_load_table_from_master.result -> mysql-test/suite/rpl/r/rpl_load_table_from_master.result mysql-test/suite/rpl/r/rpl_loaddata_simple.result: Rename: mysql-test/r/rpl_loaddata_simple.result -> mysql-test/suite/rpl/r/rpl_loaddata_simple.result mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Rename: mysql-test/r/rpl_loaddatalocal.result -> mysql-test/suite/rpl/r/rpl_loaddatalocal.result mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: Rename: mysql-test/r/rpl_rbr_to_sbr.result -> mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result mysql-test/suite/rpl/r/rpl_relay_space_myisam.result: Rename: mysql-test/r/rpl_relay_space_myisam.result -> mysql-test/suite/rpl/r/rpl_relay_space_myisam.result mysql-test/suite/rpl/r/rpl_rotate_logs.result: Rename: mysql-test/r/rpl_rotate_logs.result -> mysql-test/suite/rpl/r/rpl_rotate_logs.result mysql-test/suite/rpl/r/rpl_row_001.result: Rename: mysql-test/r/rpl_row_001.result -> mysql-test/suite/rpl/r/rpl_row_001.result mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt: Rename: mysql-test/r/rpl_row_basic_11bugs-master.opt -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt: Rename: mysql-test/r/rpl_row_basic_11bugs-slave.opt -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result: Rename: mysql-test/r/rpl_row_basic_3innodb.result -> mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: Rename: mysql-test/r/rpl_row_delayed_ins.result -> mysql-test/suite/rpl/r/rpl_row_delayed_ins.result mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: Rename: mysql-test/r/rpl_row_mysqlbinlog.result -> mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result mysql-test/suite/rpl/r/rpl_row_mystery22.result: Rename: mysql-test/r/rpl_row_mystery22.result -> mysql-test/suite/rpl/r/rpl_row_mystery22.result mysql-test/suite/rpl/r/rpl_row_reset_slave.result: Rename: mysql-test/r/rpl_row_reset_slave.result -> mysql-test/suite/rpl/r/rpl_row_reset_slave.result mysql-test/suite/rpl/r/rpl_row_sp005.result: Rename: mysql-test/r/rpl_row_sp005.result -> mysql-test/suite/rpl/r/rpl_row_sp005.result mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result: Rename: mysql-test/r/rpl_row_tabledefs_7ndb.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result mysql-test/suite/rpl/r/rpl_server_id2.result: Rename: mysql-test/r/rpl_server_id2.result -> mysql-test/suite/rpl/r/rpl_server_id2.result mysql-test/suite/rpl/r/rpl_sp.result: Rename: mysql-test/r/rpl_sp.result -> mysql-test/suite/rpl/r/rpl_sp.result mysql-test/suite/rpl/r/rpl_temporary.result: Rename: mysql-test/r/rpl_temporary.result -> mysql-test/suite/rpl/r/rpl_temporary.result mysql-test/suite/rpl/r/rpl_trunc_temp.result: Rename: mysql-test/r/rpl_trunc_temp.result -> mysql-test/suite/rpl/r/rpl_trunc_temp.result mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result: Rename: mysql-test/r/rpl_truncate_7ndb_2.result -> mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result mysql-test/suite/rpl/r/rpl_user_variables.result: Rename: mysql-test/r/rpl_user_variables.result -> mysql-test/suite/rpl/r/rpl_user_variables.result mysql-test/suite/rpl/t/rpl000010-slave.opt: Rename: mysql-test/t/rpl000010-slave.opt -> mysql-test/suite/rpl/t/rpl000010-slave.opt mysql-test/suite/rpl/t/rpl_alter.test: Rename: mysql-test/t/rpl_alter.test -> mysql-test/suite/rpl/t/rpl_alter.test mysql-test/suite/rpl/t/rpl_deadlock_innodb.test: Rename: mysql-test/t/rpl_deadlock_innodb.test -> mysql-test/suite/rpl/t/rpl_deadlock_innodb.test mysql-test/suite/rpl/t/rpl_events.test: Rename: mysql-test/t/rpl_events.test -> mysql-test/suite/rpl/t/rpl_events.test mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt: Rename: mysql-test/t/rpl_ignore_revoke-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt: Rename: mysql-test/t/rpl_ignore_table-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt mysql-test/suite/rpl/t/rpl_insert.test: Rename: mysql-test/t/rpl_insert.test -> mysql-test/suite/rpl/t/rpl_insert.test mysql-test/suite/rpl/t/rpl_insert_id.test: Rename: mysql-test/t/rpl_insert_id.test -> mysql-test/suite/rpl/t/rpl_insert_id.test mysql-test/suite/rpl/t/rpl_insert_id_pk.test: Rename: mysql-test/t/rpl_insert_id_pk.test -> mysql-test/suite/rpl/t/rpl_insert_id_pk.test mysql-test/suite/rpl/t/rpl_insert_ignore.test: Rename: mysql-test/t/rpl_insert_ignore.test -> mysql-test/suite/rpl/t/rpl_insert_ignore.test mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Rename: mysql-test/t/rpl_loaddata_charset.test -> mysql-test/suite/rpl/t/rpl_loaddata_charset.test mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Rename: mysql-test/t/rpl_loaddata_simple.test -> mysql-test/suite/rpl/t/rpl_loaddata_simple.test mysql-test/suite/rpl/t/rpl_multi_delete2.test: Rename: mysql-test/t/rpl_multi_delete2.test -> mysql-test/suite/rpl/t/rpl_multi_delete2.test mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt: Rename: mysql-test/t/rpl_multi_engine-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt mysql-test/suite/rpl/t/rpl_read_only-slave.opt: Rename: mysql-test/t/rpl_read_only-slave.opt -> mysql-test/suite/rpl/t/rpl_read_only-slave.opt mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt: Rename: mysql-test/t/rpl_relayrotate-slave.opt -> mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt mysql-test/suite/rpl/t/rpl_replicate_do.test: Rename: mysql-test/t/rpl_replicate_do.test -> mysql-test/suite/rpl/t/rpl_replicate_do.test mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt: Rename: mysql-test/t/rpl_replicate_ignore_db-slave.opt -> mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt mysql-test/suite/rpl/t/rpl_row_001.test: Rename: mysql-test/t/rpl_row_001.test -> mysql-test/suite/rpl/t/rpl_row_001.test mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test: Rename: mysql-test/t/rpl_row_basic_2myisam.test -> mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt: Rename: mysql-test/t/rpl_row_basic_3innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_basic_8partition.test: Rename: mysql-test/t/rpl_row_basic_8partition.test -> mysql-test/suite/rpl/t/rpl_row_basic_8partition.test mysql-test/suite/rpl/t/rpl_row_charset.test: Rename: mysql-test/t/rpl_row_charset.test -> mysql-test/suite/rpl/t/rpl_row_charset.test mysql-test/suite/rpl/t/rpl_row_drop.test: Rename: mysql-test/t/rpl_row_drop.test -> mysql-test/suite/rpl/t/rpl_row_drop.test mysql-test/suite/rpl/t/rpl_row_trig004.test: Rename: mysql-test/t/rpl_row_trig004.test -> mysql-test/suite/rpl/t/rpl_row_trig004.test mysql-test/suite/rpl/t/rpl_row_view01.test: Rename: mysql-test/t/rpl_row_view01.test -> mysql-test/suite/rpl/t/rpl_row_view01.test mysql-test/suite/rpl/t/rpl_sp_effects-master.opt: Rename: mysql-test/t/rpl_sp_effects-master.opt -> mysql-test/suite/rpl/t/rpl_sp_effects-master.opt mysql-test/suite/rpl/t/rpl_stm_charset.test: Rename: mysql-test/t/rpl_stm_charset.test -> mysql-test/suite/rpl/t/rpl_stm_charset.test mysql-test/suite/rpl/t/rpl_stm_log-slave.opt: Rename: mysql-test/t/rpl_stm_log-slave.opt -> mysql-test/suite/rpl/t/rpl_stm_log-slave.opt mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt: Rename: mysql-test/t/rpl_truncate_7ndb_2-master.opt -> mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt mysql-test/suite/rpl/t/rpl_variables-master.opt: Rename: mysql-test/t/rpl_variables-master.opt -> mysql-test/suite/rpl/t/rpl_variables-master.opt mysql-test/suite/rpl/t/rpl_view-slave.opt: Rename: mysql-test/t/rpl_view-slave.opt -> mysql-test/suite/rpl/t/rpl_view-slave.opt mysql-test/suite/rpl/t/rpl_view.test: Rename: mysql-test/t/rpl_view.test -> mysql-test/suite/rpl/t/rpl_view.test mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result: Rename: mysql-test/r/rpl_ndb_charset.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result: Rename: mysql-test/r/rpl_ndb_circular_simplex.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result: Rename: mysql-test/r/rpl_ndb_dd_advance.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result: Rename: mysql-test/r/rpl_ndb_trig004.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt: Rename: mysql-test/t/rpl_ndb_2innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test: Rename: mysql-test/t/rpl_ndb_UUID.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: Rename: mysql-test/t/rpl_ndb_circular_simplex.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test: Rename: mysql-test/t/rpl_ndb_extraCol.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt: Rename: mysql-test/t/rpl_ndb_stm_innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt mysql-test/suite/binlog/t/binlog_row_binlog.test: Rename: mysql-test/t/binlog_row_binlog.test -> mysql-test/suite/binlog/t/binlog_row_binlog.test mysql-test/suite/ndb/r/ndb_autodiscover.result: Rename: mysql-test/r/ndb_autodiscover.result -> mysql-test/suite/ndb/r/ndb_autodiscover.result mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result: Rename: mysql-test/r/ndb_binlog_ignore_db.result -> mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result mysql-test/suite/ndb/r/ndb_cache_multi.result: Rename: mysql-test/r/ndb_cache_multi.result -> mysql-test/suite/ndb/r/ndb_cache_multi.result mysql-test/suite/ndb/r/ndb_partition_error.result: Rename: mysql-test/r/ndb_partition_error.result -> mysql-test/suite/ndb/r/ndb_partition_error.result mysql-test/suite/ndb/r/ndb_read_multi_range.result: Rename: mysql-test/r/ndb_read_multi_range.result -> mysql-test/suite/ndb/r/ndb_read_multi_range.result mysql-test/suite/ndb/r/ndb_truncate.result: Rename: mysql-test/r/ndb_truncate.result -> mysql-test/suite/ndb/r/ndb_truncate.result mysql-test/suite/ndb/t/ndb_gis.test: Rename: mysql-test/t/ndb_gis.test -> mysql-test/suite/ndb/t/ndb_gis.test mysql-test/suite/ndb/t/ndb_grant.later: Rename: mysql-test/t/ndb_grant.later -> mysql-test/suite/ndb/t/ndb_grant.later mysql-test/suite/rpl/r/rpl_err_ignoredtable.result: Rename: mysql-test/r/rpl_err_ignoredtable.result -> mysql-test/suite/rpl/r/rpl_err_ignoredtable.result mysql-test/suite/rpl/r/rpl_ignore_grant.result: Rename: mysql-test/r/rpl_ignore_grant.result -> mysql-test/suite/rpl/r/rpl_ignore_grant.result mysql-test/suite/rpl/r/rpl_load_from_master.result: Rename: mysql-test/r/rpl_load_from_master.result -> mysql-test/suite/rpl/r/rpl_load_from_master.result mysql-test/suite/rpl/r/rpl_master_pos_wait.result: Rename: mysql-test/r/rpl_master_pos_wait.result -> mysql-test/suite/rpl/r/rpl_master_pos_wait.result mysql-test/suite/rpl/r/rpl_misc_functions.result: Rename: mysql-test/r/rpl_misc_functions.result -> mysql-test/suite/rpl/r/rpl_misc_functions.result mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Rename: mysql-test/r/rpl_row_basic_11bugs.result -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: Rename: mysql-test/r/rpl_row_max_relay_size.result -> mysql-test/suite/rpl/r/rpl_row_max_relay_size.result mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: Rename: mysql-test/r/rpl_row_tabledefs_2myisam.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result mysql-test/suite/rpl/r/rpl_server_id1.result: Rename: mysql-test/r/rpl_server_id1.result -> mysql-test/suite/rpl/r/rpl_server_id1.result mysql-test/suite/rpl/r/rpl_sf.result: Rename: mysql-test/r/rpl_sf.result -> mysql-test/suite/rpl/r/rpl_sf.result mysql-test/suite/rpl/r/rpl_start_stop_slave.result: Rename: mysql-test/r/rpl_start_stop_slave.result -> mysql-test/suite/rpl/r/rpl_start_stop_slave.result mysql-test/suite/rpl/r/rpl_stm_reset_slave.result: Rename: mysql-test/r/rpl_stm_reset_slave.result -> mysql-test/suite/rpl/r/rpl_stm_reset_slave.result mysql-test/suite/rpl/r/rpl_stm_until.result: Rename: mysql-test/r/rpl_stm_until.result -> mysql-test/suite/rpl/r/rpl_stm_until.result mysql-test/suite/rpl/t/rpl_000015-slave.sh: Rename: mysql-test/t/rpl_000015-slave.sh -> mysql-test/suite/rpl/t/rpl_000015-slave.sh mysql-test/suite/rpl/t/rpl_change_master.test: Rename: mysql-test/t/rpl_change_master.test -> mysql-test/suite/rpl/t/rpl_change_master.test mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt: Rename: mysql-test/t/rpl_drop_temp-slave.opt -> mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt mysql-test/suite/rpl/t/rpl_multi_engine.test: Rename: mysql-test/t/rpl_multi_engine.test -> mysql-test/suite/rpl/t/rpl_multi_engine.test mysql-test/suite/rpl/t/rpl_relayspace-slave.opt: Rename: mysql-test/t/rpl_relayspace-slave.opt -> mysql-test/suite/rpl/t/rpl_relayspace-slave.opt mysql-test/suite/rpl/t/rpl_row_blob_myisam.test: Rename: mysql-test/t/rpl_row_blob_myisam.test -> mysql-test/suite/rpl/t/rpl_row_blob_myisam.test mysql-test/suite/rpl/t/rpl_row_sp009.test: Rename: mysql-test/t/rpl_row_sp009.test -> mysql-test/suite/rpl/t/rpl_row_sp009.test mysql-test/suite/rpl/t/rpl_row_sp010.test: Rename: mysql-test/t/rpl_row_sp010.test -> mysql-test/suite/rpl/t/rpl_row_sp010.test mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: Rename: mysql-test/t/rpl_stm_insert_delayed.test -> mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test mysql-test/suite/rpl/t/rpl_stm_until.test: Rename: mysql-test/t/rpl_stm_until.test -> mysql-test/suite/rpl/t/rpl_stm_until.test mysql-test/suite/rpl/t/rpl_truncate_3innodb.test: Rename: mysql-test/t/rpl_truncate_3innodb.test -> mysql-test/suite/rpl/t/rpl_truncate_3innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: Rename: mysql-test/t/rpl_ndb_bank.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test: Rename: mysql-test/t/rpl_ndb_row_001.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test mysql-test/lib/mtr_cases.pl: Reorganize collect function to collect from more than one suite Add new function collect_one_suite Set name of test to . mysql-test/lib/mtr_report.pl: Determine name of files from "result_file" name mysql-test/mysql-test-run.pl: Collect tests from suites main, binlog, rpl, rpl_ndb and ndb as default. Add --suites as a synonym of --suite and allow a semicolon separated list of suite names to be passed to it. Determine name of files to cleanup from "result_file" name Update usage Add possibility to add a suite.opt file mysql-test/t/disabled.def: Move disabled testcases to their respective suite mysql-test/suite/funcs_1/t/suite.opt: New BitKeeper file ``mysql-test/suite/funcs_1/t/suite.opt'' mysql-test/suite/funcs_2/t/suite.opt: New BitKeeper file ``mysql-test/suite/funcs_2/t/suite.opt'' mysql-test/suite/ndb/t/disabled.def: New BitKeeper file ``mysql-test/suite/ndb/t/disabled.def'' mysql-test/suite/rpl/t/disabled.def: New BitKeeper file ``mysql-test/suite/rpl/t/disabled.def'' mysql-test/suite/rpl_ndb/t/disabled.def: New BitKeeper file ``mysql-test/suite/rpl_ndb/t/disabled.def'' --- mysql-test/t/binlog_killed.test | 248 --- mysql-test/t/binlog_row_binlog-master.opt | 1 - mysql-test/t/binlog_row_binlog.test | 5 - mysql-test/t/binlog_row_blackhole.test | 11 - mysql-test/t/binlog_row_ctype_cp932.test | 5 - mysql-test/t/binlog_row_ctype_ucs.test | 6 - mysql-test/t/binlog_row_drop_tmp_tbl.test | 5 - mysql-test/t/binlog_row_innodb_stat-master.opt | 1 - mysql-test/t/binlog_row_innodb_stat.test | 5 - mysql-test/t/binlog_row_insert_select.test | 10 - .../t/binlog_row_mix_innodb_myisam-master.opt | 1 - mysql-test/t/binlog_row_mix_innodb_myisam.test | 32 - mysql-test/t/binlog_statement_insert_delayed.test | 9 - mysql-test/t/binlog_stm_binlog-master.opt | 1 - mysql-test/t/binlog_stm_binlog.test | 18 - mysql-test/t/binlog_stm_blackhole.test | 6 - mysql-test/t/binlog_stm_ctype_cp932.test | 6 - mysql-test/t/binlog_stm_ctype_ucs.test | 6 - mysql-test/t/binlog_stm_drop_tmp_tbl.test | 5 - mysql-test/t/binlog_stm_innodb_stat-master.opt | 1 - mysql-test/t/binlog_stm_innodb_stat.test | 5 - mysql-test/t/binlog_stm_insert_select.test | 5 - .../t/binlog_stm_mix_innodb_myisam-master.opt | 1 - mysql-test/t/binlog_stm_mix_innodb_myisam.test | 24 - mysql-test/t/binlog_stm_ps.test | 26 - mysql-test/t/disabled.def | 23 - mysql-test/t/loaddata_autocom_ndb.test | 4 - mysql-test/t/ndb_alter_table.test | 439 ----- mysql-test/t/ndb_alter_table2.test | 85 - mysql-test/t/ndb_alter_table3.test | 49 - mysql-test/t/ndb_autodiscover.test | 548 ------ mysql-test/t/ndb_autodiscover2-master.opt | 1 - mysql-test/t/ndb_autodiscover2.test | 21 - mysql-test/t/ndb_autodiscover3.test | 86 - mysql-test/t/ndb_backup_print.test | 66 - mysql-test/t/ndb_basic.test | 843 ---------- mysql-test/t/ndb_binlog_basic.test | 72 - mysql-test/t/ndb_binlog_basic2.test | 15 - mysql-test/t/ndb_binlog_ddl_multi.test | 191 --- mysql-test/t/ndb_binlog_discover.test | 36 - mysql-test/t/ndb_binlog_ignore_db-master.opt | 1 - mysql-test/t/ndb_binlog_ignore_db.test | 16 - mysql-test/t/ndb_binlog_log_bin.test | 50 - mysql-test/t/ndb_binlog_multi.test | 83 - mysql-test/t/ndb_bitfield.test | 124 -- mysql-test/t/ndb_blob.test | 499 ------ mysql-test/t/ndb_blob_partition.test | 97 -- mysql-test/t/ndb_cache.test | 122 -- mysql-test/t/ndb_cache2.test | 361 ---- mysql-test/t/ndb_cache_multi.test | 72 - mysql-test/t/ndb_cache_multi2.test | 126 -- mysql-test/t/ndb_charset.test | 257 --- mysql-test/t/ndb_condition_pushdown.test | 1756 -------------------- mysql-test/t/ndb_config.test | 23 - mysql-test/t/ndb_config2.test | 7 - mysql-test/t/ndb_cursor.test | 47 - mysql-test/t/ndb_database.test | 24 - mysql-test/t/ndb_dd_alter.test | 274 --- mysql-test/t/ndb_dd_backuprestore.test | 349 ---- mysql-test/t/ndb_dd_basic.test | 454 ----- mysql-test/t/ndb_dd_ddl.test | 363 ---- mysql-test/t/ndb_dd_disk2memory.test | 292 ---- mysql-test/t/ndb_dd_dump.test | 288 ---- mysql-test/t/ndb_dd_sql_features.test | 551 ------ mysql-test/t/ndb_gis.test | 5 - mysql-test/t/ndb_grant.later | 385 ----- mysql-test/t/ndb_index.test | 131 -- mysql-test/t/ndb_index_ordered.test | 480 ------ mysql-test/t/ndb_index_unique.test | 361 ---- mysql-test/t/ndb_insert.test | 779 --------- mysql-test/t/ndb_limit.test | 85 - mysql-test/t/ndb_load.test | 24 - mysql-test/t/ndb_loaddatalocal.test | 70 - mysql-test/t/ndb_lock.test | 269 --- mysql-test/t/ndb_minmax.test | 65 - mysql-test/t/ndb_multi.test | 126 -- mysql-test/t/ndb_multi_row.test | 76 - mysql-test/t/ndb_partition_error.test | 74 - mysql-test/t/ndb_partition_error2-master.opt | 1 - mysql-test/t/ndb_partition_error2.test | 14 - mysql-test/t/ndb_partition_key.test | 229 --- mysql-test/t/ndb_partition_list.test | 68 - mysql-test/t/ndb_partition_range.test | 264 --- mysql-test/t/ndb_read_multi_range.test | 319 ---- mysql-test/t/ndb_rename.test | 36 - mysql-test/t/ndb_replace.test | 104 -- mysql-test/t/ndb_restore.test | 403 ----- mysql-test/t/ndb_restore_compat.test | 61 - mysql-test/t/ndb_restore_partition-master.opt | 1 - mysql-test/t/ndb_restore_partition.test | 375 ----- mysql-test/t/ndb_restore_print.test | 189 --- mysql-test/t/ndb_row_format.test | 86 - mysql-test/t/ndb_single_user.test | 174 -- mysql-test/t/ndb_sp.test | 42 - mysql-test/t/ndb_subquery.test | 79 - mysql-test/t/ndb_temporary.test | 38 - mysql-test/t/ndb_transaction.test | 298 ---- mysql-test/t/ndb_trigger.test | 221 --- mysql-test/t/ndb_truncate.test | 41 - mysql-test/t/ndb_types.test | 85 - mysql-test/t/ndb_update.test | 41 - mysql-test/t/ndb_view.test | 29 - mysql-test/t/ndbapi.test | 44 - mysql-test/t/partition_03ndb.test | 26 - mysql-test/t/ps_7ndb.test | 25 - mysql-test/t/rpl000010-slave.opt | 1 - mysql-test/t/rpl000010.test | 19 - mysql-test/t/rpl000011.test | 17 - mysql-test/t/rpl000013.test | 53 - mysql-test/t/rpl000017-slave.opt | 1 - mysql-test/t/rpl000017-slave.sh | 12 - mysql-test/t/rpl000017.test | 22 - mysql-test/t/rpl000018-master.opt | 1 - mysql-test/t/rpl000018-slave.opt | 1 - mysql-test/t/rpl_000015-slave.sh | 1 - mysql-test/t/rpl_000015.slave-mi | 1 - mysql-test/t/rpl_000015.test | 48 - mysql-test/t/rpl_EE_err.test | 7 - mysql-test/t/rpl_LD_INFILE.test | 38 - mysql-test/t/rpl_alter.test | 24 - mysql-test/t/rpl_alter_db.test | 10 - mysql-test/t/rpl_auto_increment-master.opt | 1 - mysql-test/t/rpl_auto_increment-slave.opt | 1 - mysql-test/t/rpl_auto_increment.test | 12 - mysql-test/t/rpl_auto_increment_11932.test | 63 - mysql-test/t/rpl_bit.test | 94 -- mysql-test/t/rpl_bit_npk.test | 116 -- mysql-test/t/rpl_change_master.test | 37 - mysql-test/t/rpl_charset_sjis.test | 25 - mysql-test/t/rpl_commit_after_flush.test | 11 - mysql-test/t/rpl_create_database-master.opt | 1 - mysql-test/t/rpl_create_database-slave.opt | 1 - mysql-test/t/rpl_create_database.test | 72 - mysql-test/t/rpl_critical_errors.test | 66 - mysql-test/t/rpl_ddl.test | 32 - mysql-test/t/rpl_deadlock_innodb-slave.opt | 1 - mysql-test/t/rpl_deadlock_innodb.test | 11 - mysql-test/t/rpl_delete_no_where.test | 6 - mysql-test/t/rpl_do_grant.test | 114 -- mysql-test/t/rpl_drop.test | 16 - mysql-test/t/rpl_drop_db.test | 61 - mysql-test/t/rpl_drop_temp-slave.opt | 2 - mysql-test/t/rpl_drop_temp.test | 27 - mysql-test/t/rpl_dual_pos_advance-master.opt | 1 - mysql-test/t/rpl_dual_pos_advance.test | 114 -- mysql-test/t/rpl_empty_master_crash-master.opt | 1 - mysql-test/t/rpl_empty_master_crash.test | 15 - mysql-test/t/rpl_err_ignoredtable-slave.opt | 1 - mysql-test/t/rpl_err_ignoredtable.test | 66 - mysql-test/t/rpl_events.test | 47 - mysql-test/t/rpl_extraCol_innodb-master.opt | 1 - mysql-test/t/rpl_extraCol_innodb-slave.opt | 1 - mysql-test/t/rpl_extraCol_innodb.test | 13 - mysql-test/t/rpl_extraCol_myisam.test | 12 - mysql-test/t/rpl_failed_optimize-master.opt | 1 - mysql-test/t/rpl_failed_optimize.test | 11 - mysql-test/t/rpl_flushlog_loop-master.opt | 1 - mysql-test/t/rpl_flushlog_loop-master.sh | 5 - mysql-test/t/rpl_flushlog_loop-slave.opt | 1 - mysql-test/t/rpl_flushlog_loop-slave.sh | 4 - mysql-test/t/rpl_flushlog_loop.test | 50 - mysql-test/t/rpl_foreign_key_innodb-slave.opt | 1 - mysql-test/t/rpl_foreign_key_innodb.test | 11 - mysql-test/t/rpl_free_items-slave.opt | 1 - mysql-test/t/rpl_free_items.test | 22 - mysql-test/t/rpl_get_lock.test | 43 - mysql-test/t/rpl_ignore_grant-slave.opt | 1 - mysql-test/t/rpl_ignore_grant.test | 59 - mysql-test/t/rpl_ignore_revoke-slave.opt | 1 - mysql-test/t/rpl_ignore_revoke.test | 51 - mysql-test/t/rpl_ignore_table-slave.opt | 1 - mysql-test/t/rpl_ignore_table.test | 164 -- mysql-test/t/rpl_ignore_table_update-slave.opt | 1 - mysql-test/t/rpl_ignore_table_update.test | 38 - mysql-test/t/rpl_incident-master.opt | 1 - mysql-test/t/rpl_incident.test | 42 - mysql-test/t/rpl_init_slave-slave.opt | 1 - mysql-test/t/rpl_init_slave.test | 34 - mysql-test/t/rpl_innodb.test | 48 - mysql-test/t/rpl_insert.test | 44 - mysql-test/t/rpl_insert_id-slave.opt | 1 - mysql-test/t/rpl_insert_id.test | 11 - mysql-test/t/rpl_insert_id_pk-slave.opt | 1 - mysql-test/t/rpl_insert_id_pk.test | 11 - mysql-test/t/rpl_insert_ignore-slave.opt | 1 - mysql-test/t/rpl_insert_ignore.test | 8 - mysql-test/t/rpl_insert_select.test | 19 - mysql-test/t/rpl_known_bugs_detection-master.opt | 1 - mysql-test/t/rpl_known_bugs_detection.test | 93 -- mysql-test/t/rpl_load_from_master-slave.opt | 1 - mysql-test/t/rpl_load_from_master.test | 180 -- mysql-test/t/rpl_load_table_from_master.test | 98 -- mysql-test/t/rpl_loaddata.test | 7 - mysql-test/t/rpl_loaddata_charset.test | 33 - mysql-test/t/rpl_loaddata_m-master.opt | 1 - mysql-test/t/rpl_loaddata_m.test | 52 - mysql-test/t/rpl_loaddata_s-slave.opt | 1 - mysql-test/t/rpl_loaddata_s.test | 28 - mysql-test/t/rpl_loaddata_simple.test | 14 - mysql-test/t/rpl_loaddatalocal.test | 65 - mysql-test/t/rpl_loadfile.test | 52 - mysql-test/t/rpl_locale.test | 24 - mysql-test/t/rpl_log_pos.test | 57 - mysql-test/t/rpl_many_optimize.test | 22 - mysql-test/t/rpl_master_pos_wait.test | 18 - mysql-test/t/rpl_misc_functions-slave.sh | 1 - mysql-test/t/rpl_misc_functions.test | 103 -- mysql-test/t/rpl_mixed_ddl_dml.test | 46 - mysql-test/t/rpl_multi_delete-slave.opt | 1 - mysql-test/t/rpl_multi_delete.test | 26 - mysql-test/t/rpl_multi_delete2-slave.opt | 1 - mysql-test/t/rpl_multi_delete2.test | 68 - mysql-test/t/rpl_multi_engine-slave.opt | 1 - mysql-test/t/rpl_multi_engine.test | 108 -- mysql-test/t/rpl_multi_update.test | 7 - mysql-test/t/rpl_multi_update2-slave.opt | 1 - mysql-test/t/rpl_multi_update2.test | 9 - mysql-test/t/rpl_multi_update3.test | 9 - mysql-test/t/rpl_multi_update4-slave.opt | 1 - mysql-test/t/rpl_multi_update4.test | 45 - mysql-test/t/rpl_ndb_2innodb-master.opt | 1 - mysql-test/t/rpl_ndb_2innodb-slave.opt | 1 - mysql-test/t/rpl_ndb_2innodb.test | 16 - mysql-test/t/rpl_ndb_2myisam-master.opt | 1 - mysql-test/t/rpl_ndb_2myisam-slave.opt | 1 - mysql-test/t/rpl_ndb_2myisam.test | 13 - mysql-test/t/rpl_ndb_UUID.test | 6 - mysql-test/t/rpl_ndb_auto_inc.test | 118 -- mysql-test/t/rpl_ndb_bank.test | 181 -- mysql-test/t/rpl_ndb_basic.test | 261 --- mysql-test/t/rpl_ndb_blob.test | 142 -- mysql-test/t/rpl_ndb_blob2.test | 9 - mysql-test/t/rpl_ndb_charset.test | 6 - mysql-test/t/rpl_ndb_circular.test | 57 - mysql-test/t/rpl_ndb_circular_simplex.test | 82 - mysql-test/t/rpl_ndb_commit_afterflush.test | 9 - mysql-test/t/rpl_ndb_dd_advance.test | 581 ------- mysql-test/t/rpl_ndb_dd_basic.test | 85 - mysql-test/t/rpl_ndb_dd_partitions.test | 310 ---- mysql-test/t/rpl_ndb_ddl.test | 33 - mysql-test/t/rpl_ndb_delete_nowhere.test | 8 - mysql-test/t/rpl_ndb_do_db-slave.opt | 1 - mysql-test/t/rpl_ndb_do_db.test | 57 - mysql-test/t/rpl_ndb_do_table-slave.opt | 1 - mysql-test/t/rpl_ndb_do_table.test | 46 - mysql-test/t/rpl_ndb_extraCol.test | 13 - mysql-test/t/rpl_ndb_func003.test | 12 - mysql-test/t/rpl_ndb_idempotent.test | 117 -- mysql-test/t/rpl_ndb_innodb2ndb-master.opt | 1 - mysql-test/t/rpl_ndb_innodb2ndb-slave.opt | 1 - mysql-test/t/rpl_ndb_innodb2ndb.test | 16 - mysql-test/t/rpl_ndb_innodb_trans-slave.opt | 1 - mysql-test/t/rpl_ndb_innodb_trans.test | 66 - mysql-test/t/rpl_ndb_insert_ignore.test | 8 - mysql-test/t/rpl_ndb_load.test | 66 - mysql-test/t/rpl_ndb_log-master.opt | 1 - mysql-test/t/rpl_ndb_log.test | 12 - mysql-test/t/rpl_ndb_multi.test | 71 - mysql-test/t/rpl_ndb_multi_update2-slave.opt | 1 - mysql-test/t/rpl_ndb_multi_update2.test | 12 - mysql-test/t/rpl_ndb_multi_update3.test | 8 - mysql-test/t/rpl_ndb_myisam2ndb-master.opt | 1 - mysql-test/t/rpl_ndb_myisam2ndb-slave.opt | 1 - mysql-test/t/rpl_ndb_myisam2ndb.test | 15 - mysql-test/t/rpl_ndb_relayrotate-slave.opt | 3 - mysql-test/t/rpl_ndb_relayrotate.test | 8 - mysql-test/t/rpl_ndb_rep_ignore-slave.opt | 1 - mysql-test/t/rpl_ndb_rep_ignore.test | 58 - mysql-test/t/rpl_ndb_row_001.test | 6 - mysql-test/t/rpl_ndb_sp003.test | 9 - mysql-test/t/rpl_ndb_sp006.test | 9 - mysql-test/t/rpl_ndb_stm_innodb-master.opt | 1 - mysql-test/t/rpl_ndb_stm_innodb.test | 62 - mysql-test/t/rpl_ndb_sync.test | 104 -- mysql-test/t/rpl_ndb_trig004.test | 15 - mysql-test/t/rpl_ndbapi_multi.test | 11 - mysql-test/t/rpl_optimize.test | 54 - mysql-test/t/rpl_packet-master.opt | 1 - mysql-test/t/rpl_packet-slave.opt | 1 - mysql-test/t/rpl_packet.test | 80 - mysql-test/t/rpl_ps.test | 51 - mysql-test/t/rpl_rbr_to_sbr.test | 47 - mysql-test/t/rpl_read_only-slave.opt | 1 - mysql-test/t/rpl_read_only.test | 113 -- mysql-test/t/rpl_redirect.test | 47 - mysql-test/t/rpl_relay_space_innodb-master.opt | 1 - mysql-test/t/rpl_relay_space_innodb-slave.opt | 1 - mysql-test/t/rpl_relay_space_innodb.test | 22 - mysql-test/t/rpl_relay_space_myisam.test | 21 - mysql-test/t/rpl_relayrotate-slave.opt | 3 - mysql-test/t/rpl_relayrotate.test | 10 - mysql-test/t/rpl_relayspace-slave.opt | 1 - mysql-test/t/rpl_relayspace.test | 34 - mysql-test/t/rpl_replicate_do-slave.opt | 1 - mysql-test/t/rpl_replicate_do.test | 92 - mysql-test/t/rpl_replicate_ignore_db-slave.opt | 1 - mysql-test/t/rpl_replicate_ignore_db.test | 30 - mysql-test/t/rpl_rewrt_db-slave.opt | 1 - mysql-test/t/rpl_rewrt_db.test | 84 - mysql-test/t/rpl_rotate_logs-master.opt | 1 - mysql-test/t/rpl_rotate_logs-slave.sh | 2 - mysql-test/t/rpl_rotate_logs.slave-mi | 1 - mysql-test/t/rpl_rotate_logs.test | 175 -- mysql-test/t/rpl_row_001.test | 7 - mysql-test/t/rpl_row_4_bytes-master.opt | 1 - mysql-test/t/rpl_row_4_bytes.test | 33 - mysql-test/t/rpl_row_NOW.test | 74 - mysql-test/t/rpl_row_USER.test | 60 - mysql-test/t/rpl_row_UUID.test | 7 - mysql-test/t/rpl_row_basic_11bugs-master.opt | 2 - mysql-test/t/rpl_row_basic_11bugs-slave.opt | 1 - mysql-test/t/rpl_row_basic_11bugs.test | 186 --- mysql-test/t/rpl_row_basic_2myisam.test | 3 - mysql-test/t/rpl_row_basic_3innodb-slave.opt | 1 - mysql-test/t/rpl_row_basic_3innodb.test | 6 - mysql-test/t/rpl_row_basic_7ndb.test | 5 - mysql-test/t/rpl_row_basic_8partition.test | 210 --- mysql-test/t/rpl_row_blob_innodb-slave.opt | 1 - mysql-test/t/rpl_row_blob_innodb.test | 12 - mysql-test/t/rpl_row_blob_myisam.test | 11 - mysql-test/t/rpl_row_charset.test | 7 - mysql-test/t/rpl_row_create_table-slave.opt | 1 - mysql-test/t/rpl_row_create_table.test | 236 --- mysql-test/t/rpl_row_delayed_ins.test | 7 - mysql-test/t/rpl_row_drop.test | 48 - mysql-test/t/rpl_row_err_daisychain-master.opt | 1 - mysql-test/t/rpl_row_err_daisychain-slave.opt | 1 - mysql-test/t/rpl_row_flsh_tbls.test | 17 - mysql-test/t/rpl_row_func001.test | 57 - mysql-test/t/rpl_row_func002.test | 104 -- mysql-test/t/rpl_row_func003-slave.opt | 1 - mysql-test/t/rpl_row_func003.test | 11 - mysql-test/t/rpl_row_inexist_tbl-slave.opt | 1 - mysql-test/t/rpl_row_inexist_tbl.test | 35 - mysql-test/t/rpl_row_insert_delayed.test | 14 - mysql-test/t/rpl_row_log-master.opt | 1 - mysql-test/t/rpl_row_log-slave.opt | 1 - mysql-test/t/rpl_row_log.test | 16 - mysql-test/t/rpl_row_log_innodb-master.opt | 1 - mysql-test/t/rpl_row_log_innodb-slave.opt | 1 - mysql-test/t/rpl_row_log_innodb.test | 13 - mysql-test/t/rpl_row_max_relay_size.test | 11 - mysql-test/t/rpl_row_mysqlbinlog-master.opt | 1 - mysql-test/t/rpl_row_mysqlbinlog.test | 348 ---- mysql-test/t/rpl_row_mystery22.test | 45 - mysql-test/t/rpl_row_reset_slave.test | 5 - mysql-test/t/rpl_row_sp001.test | 146 -- mysql-test/t/rpl_row_sp002_innodb-master.opt | 1 - mysql-test/t/rpl_row_sp002_innodb-slave.opt | 1 - mysql-test/t/rpl_row_sp002_innodb.test | 11 - mysql-test/t/rpl_row_sp003-master.opt | 1 - mysql-test/t/rpl_row_sp003-slave.opt | 1 - mysql-test/t/rpl_row_sp003.test | 11 - mysql-test/t/rpl_row_sp005.test | 110 -- mysql-test/t/rpl_row_sp006_InnoDB-slave.opt | 1 - mysql-test/t/rpl_row_sp006_InnoDB.test | 11 - mysql-test/t/rpl_row_sp007_innodb-slave.opt | 1 - mysql-test/t/rpl_row_sp007_innodb.test | 11 - mysql-test/t/rpl_row_sp008.test | 57 - mysql-test/t/rpl_row_sp009.test | 105 -- mysql-test/t/rpl_row_sp010.test | 80 - mysql-test/t/rpl_row_sp011.test | 111 -- mysql-test/t/rpl_row_sp012.test | 75 - mysql-test/t/rpl_row_stop_middle.test | 44 - mysql-test/t/rpl_row_stop_middle_update-master.opt | 1 - mysql-test/t/rpl_row_stop_middle_update-slave.opt | 1 - mysql-test/t/rpl_row_stop_middle_update.test | 31 - mysql-test/t/rpl_row_tabledefs_2myisam.test | 8 - mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt | 1 - mysql-test/t/rpl_row_tabledefs_3innodb.test | 9 - mysql-test/t/rpl_row_trig001.test | 100 -- mysql-test/t/rpl_row_trig002.test | 80 - mysql-test/t/rpl_row_trig003.test | 152 -- mysql-test/t/rpl_row_trig004.test | 18 - mysql-test/t/rpl_row_until.test | 87 - mysql-test/t/rpl_row_view01.test | 89 - mysql-test/t/rpl_server_id1.test | 26 - mysql-test/t/rpl_server_id2-slave.opt | 1 - mysql-test/t/rpl_server_id2.test | 26 - mysql-test/t/rpl_session_var.test | 42 - mysql-test/t/rpl_set_charset.test | 35 - mysql-test/t/rpl_sf.test | 70 - mysql-test/t/rpl_skip_error-slave.opt | 1 - mysql-test/t/rpl_skip_error.test | 29 - mysql-test/t/rpl_slave_status.test | 58 - mysql-test/t/rpl_sp-master.opt | 1 - mysql-test/t/rpl_sp-slave.opt | 1 - mysql-test/t/rpl_sp.test | 585 ------- mysql-test/t/rpl_sp004.test | 97 -- mysql-test/t/rpl_sp_effects-master.opt | 1 - mysql-test/t/rpl_sp_effects-slave.opt | 1 - mysql-test/t/rpl_sp_effects.test | 211 --- mysql-test/t/rpl_sporadic_master-master.opt | 1 - mysql-test/t/rpl_sporadic_master.test | 29 - mysql-test/t/rpl_ssl.test | 71 - mysql-test/t/rpl_ssl1.test | 97 -- mysql-test/t/rpl_start_stop_slave.test | 36 - mysql-test/t/rpl_stm_000001-slave.opt | 1 - mysql-test/t/rpl_stm_000001.test | 2 - mysql-test/t/rpl_stm_EE_err2.test | 8 - mysql-test/t/rpl_stm_charset.test | 2 - mysql-test/t/rpl_stm_flsh_tbls.test | 8 - mysql-test/t/rpl_stm_insert_delayed.test | 20 - mysql-test/t/rpl_stm_log-master.opt | 1 - mysql-test/t/rpl_stm_log-slave.opt | 1 - mysql-test/t/rpl_stm_log.test | 8 - mysql-test/t/rpl_stm_max_relay_size.test | 11 - mysql-test/t/rpl_stm_multi_query.test | 12 - mysql-test/t/rpl_stm_mystery22.test | 66 - mysql-test/t/rpl_stm_no_op.test | 93 -- mysql-test/t/rpl_stm_reset_slave.test | 6 - mysql-test/t/rpl_stm_until.test | 88 - mysql-test/t/rpl_switch_stm_row_mixed.test | 568 ------- mysql-test/t/rpl_temp_table.test | 59 - mysql-test/t/rpl_temporary.test | 215 --- mysql-test/t/rpl_timezone-master.opt | 1 - mysql-test/t/rpl_timezone-slave.opt | 1 - mysql-test/t/rpl_timezone.test | 142 -- mysql-test/t/rpl_trigger.test | 477 ------ mysql-test/t/rpl_trunc_temp.test | 35 - mysql-test/t/rpl_truncate_2myisam.test | 4 - mysql-test/t/rpl_truncate_3innodb.test | 6 - mysql-test/t/rpl_truncate_7ndb.test | 71 - mysql-test/t/rpl_truncate_7ndb_2-master.opt | 1 - mysql-test/t/rpl_truncate_7ndb_2.test | 6 - mysql-test/t/rpl_udf-master.opt | 1 - mysql-test/t/rpl_udf-slave.opt | 1 - mysql-test/t/rpl_udf.test | 22 - mysql-test/t/rpl_user_variables.test | 362 ---- mysql-test/t/rpl_variables-master.opt | 1 - mysql-test/t/rpl_variables.test | 20 - mysql-test/t/rpl_view-slave.opt | 1 - mysql-test/t/rpl_view.test | 167 -- mysql-test/t/strict_autoinc_5ndb.test | 10 - 434 files changed, 29030 deletions(-) delete mode 100644 mysql-test/t/binlog_killed.test delete mode 100644 mysql-test/t/binlog_row_binlog-master.opt delete mode 100644 mysql-test/t/binlog_row_binlog.test delete mode 100644 mysql-test/t/binlog_row_blackhole.test delete mode 100644 mysql-test/t/binlog_row_ctype_cp932.test delete mode 100644 mysql-test/t/binlog_row_ctype_ucs.test delete mode 100644 mysql-test/t/binlog_row_drop_tmp_tbl.test delete mode 100644 mysql-test/t/binlog_row_innodb_stat-master.opt delete mode 100644 mysql-test/t/binlog_row_innodb_stat.test delete mode 100644 mysql-test/t/binlog_row_insert_select.test delete mode 100644 mysql-test/t/binlog_row_mix_innodb_myisam-master.opt delete mode 100644 mysql-test/t/binlog_row_mix_innodb_myisam.test delete mode 100644 mysql-test/t/binlog_statement_insert_delayed.test delete mode 100644 mysql-test/t/binlog_stm_binlog-master.opt delete mode 100644 mysql-test/t/binlog_stm_binlog.test delete mode 100644 mysql-test/t/binlog_stm_blackhole.test delete mode 100644 mysql-test/t/binlog_stm_ctype_cp932.test delete mode 100644 mysql-test/t/binlog_stm_ctype_ucs.test delete mode 100644 mysql-test/t/binlog_stm_drop_tmp_tbl.test delete mode 100644 mysql-test/t/binlog_stm_innodb_stat-master.opt delete mode 100644 mysql-test/t/binlog_stm_innodb_stat.test delete mode 100644 mysql-test/t/binlog_stm_insert_select.test delete mode 100644 mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt delete mode 100644 mysql-test/t/binlog_stm_mix_innodb_myisam.test delete mode 100644 mysql-test/t/binlog_stm_ps.test delete mode 100644 mysql-test/t/loaddata_autocom_ndb.test delete mode 100644 mysql-test/t/ndb_alter_table.test delete mode 100644 mysql-test/t/ndb_alter_table2.test delete mode 100644 mysql-test/t/ndb_alter_table3.test delete mode 100644 mysql-test/t/ndb_autodiscover.test delete mode 100644 mysql-test/t/ndb_autodiscover2-master.opt delete mode 100644 mysql-test/t/ndb_autodiscover2.test delete mode 100644 mysql-test/t/ndb_autodiscover3.test delete mode 100644 mysql-test/t/ndb_backup_print.test delete mode 100644 mysql-test/t/ndb_basic.test delete mode 100644 mysql-test/t/ndb_binlog_basic.test delete mode 100644 mysql-test/t/ndb_binlog_basic2.test delete mode 100644 mysql-test/t/ndb_binlog_ddl_multi.test delete mode 100644 mysql-test/t/ndb_binlog_discover.test delete mode 100644 mysql-test/t/ndb_binlog_ignore_db-master.opt delete mode 100644 mysql-test/t/ndb_binlog_ignore_db.test delete mode 100644 mysql-test/t/ndb_binlog_log_bin.test delete mode 100644 mysql-test/t/ndb_binlog_multi.test delete mode 100644 mysql-test/t/ndb_bitfield.test delete mode 100644 mysql-test/t/ndb_blob.test delete mode 100644 mysql-test/t/ndb_blob_partition.test delete mode 100644 mysql-test/t/ndb_cache.test delete mode 100644 mysql-test/t/ndb_cache2.test delete mode 100644 mysql-test/t/ndb_cache_multi.test delete mode 100644 mysql-test/t/ndb_cache_multi2.test delete mode 100644 mysql-test/t/ndb_charset.test delete mode 100644 mysql-test/t/ndb_condition_pushdown.test delete mode 100644 mysql-test/t/ndb_config.test delete mode 100644 mysql-test/t/ndb_config2.test delete mode 100644 mysql-test/t/ndb_cursor.test delete mode 100644 mysql-test/t/ndb_database.test delete mode 100644 mysql-test/t/ndb_dd_alter.test delete mode 100644 mysql-test/t/ndb_dd_backuprestore.test delete mode 100644 mysql-test/t/ndb_dd_basic.test delete mode 100644 mysql-test/t/ndb_dd_ddl.test delete mode 100644 mysql-test/t/ndb_dd_disk2memory.test delete mode 100644 mysql-test/t/ndb_dd_dump.test delete mode 100644 mysql-test/t/ndb_dd_sql_features.test delete mode 100644 mysql-test/t/ndb_gis.test delete mode 100644 mysql-test/t/ndb_grant.later delete mode 100644 mysql-test/t/ndb_index.test delete mode 100644 mysql-test/t/ndb_index_ordered.test delete mode 100644 mysql-test/t/ndb_index_unique.test delete mode 100644 mysql-test/t/ndb_insert.test delete mode 100644 mysql-test/t/ndb_limit.test delete mode 100644 mysql-test/t/ndb_load.test delete mode 100644 mysql-test/t/ndb_loaddatalocal.test delete mode 100644 mysql-test/t/ndb_lock.test delete mode 100644 mysql-test/t/ndb_minmax.test delete mode 100644 mysql-test/t/ndb_multi.test delete mode 100644 mysql-test/t/ndb_multi_row.test delete mode 100644 mysql-test/t/ndb_partition_error.test delete mode 100644 mysql-test/t/ndb_partition_error2-master.opt delete mode 100644 mysql-test/t/ndb_partition_error2.test delete mode 100644 mysql-test/t/ndb_partition_key.test delete mode 100644 mysql-test/t/ndb_partition_list.test delete mode 100644 mysql-test/t/ndb_partition_range.test delete mode 100644 mysql-test/t/ndb_read_multi_range.test delete mode 100644 mysql-test/t/ndb_rename.test delete mode 100644 mysql-test/t/ndb_replace.test delete mode 100644 mysql-test/t/ndb_restore.test delete mode 100644 mysql-test/t/ndb_restore_compat.test delete mode 100644 mysql-test/t/ndb_restore_partition-master.opt delete mode 100644 mysql-test/t/ndb_restore_partition.test delete mode 100644 mysql-test/t/ndb_restore_print.test delete mode 100644 mysql-test/t/ndb_row_format.test delete mode 100644 mysql-test/t/ndb_single_user.test delete mode 100644 mysql-test/t/ndb_sp.test delete mode 100644 mysql-test/t/ndb_subquery.test delete mode 100644 mysql-test/t/ndb_temporary.test delete mode 100644 mysql-test/t/ndb_transaction.test delete mode 100644 mysql-test/t/ndb_trigger.test delete mode 100644 mysql-test/t/ndb_truncate.test delete mode 100644 mysql-test/t/ndb_types.test delete mode 100644 mysql-test/t/ndb_update.test delete mode 100644 mysql-test/t/ndb_view.test delete mode 100644 mysql-test/t/ndbapi.test delete mode 100644 mysql-test/t/partition_03ndb.test delete mode 100644 mysql-test/t/ps_7ndb.test delete mode 100644 mysql-test/t/rpl000010-slave.opt delete mode 100644 mysql-test/t/rpl000010.test delete mode 100644 mysql-test/t/rpl000011.test delete mode 100644 mysql-test/t/rpl000013.test delete mode 100644 mysql-test/t/rpl000017-slave.opt delete mode 100755 mysql-test/t/rpl000017-slave.sh delete mode 100644 mysql-test/t/rpl000017.test delete mode 100644 mysql-test/t/rpl000018-master.opt delete mode 100644 mysql-test/t/rpl000018-slave.opt delete mode 100755 mysql-test/t/rpl_000015-slave.sh delete mode 100644 mysql-test/t/rpl_000015.slave-mi delete mode 100644 mysql-test/t/rpl_000015.test delete mode 100644 mysql-test/t/rpl_EE_err.test delete mode 100644 mysql-test/t/rpl_LD_INFILE.test delete mode 100644 mysql-test/t/rpl_alter.test delete mode 100644 mysql-test/t/rpl_alter_db.test delete mode 100644 mysql-test/t/rpl_auto_increment-master.opt delete mode 100644 mysql-test/t/rpl_auto_increment-slave.opt delete mode 100644 mysql-test/t/rpl_auto_increment.test delete mode 100644 mysql-test/t/rpl_auto_increment_11932.test delete mode 100644 mysql-test/t/rpl_bit.test delete mode 100644 mysql-test/t/rpl_bit_npk.test delete mode 100644 mysql-test/t/rpl_change_master.test delete mode 100644 mysql-test/t/rpl_charset_sjis.test delete mode 100644 mysql-test/t/rpl_commit_after_flush.test delete mode 100644 mysql-test/t/rpl_create_database-master.opt delete mode 100644 mysql-test/t/rpl_create_database-slave.opt delete mode 100644 mysql-test/t/rpl_create_database.test delete mode 100644 mysql-test/t/rpl_critical_errors.test delete mode 100644 mysql-test/t/rpl_ddl.test delete mode 100644 mysql-test/t/rpl_deadlock_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_deadlock_innodb.test delete mode 100644 mysql-test/t/rpl_delete_no_where.test delete mode 100644 mysql-test/t/rpl_do_grant.test delete mode 100644 mysql-test/t/rpl_drop.test delete mode 100644 mysql-test/t/rpl_drop_db.test delete mode 100644 mysql-test/t/rpl_drop_temp-slave.opt delete mode 100644 mysql-test/t/rpl_drop_temp.test delete mode 100644 mysql-test/t/rpl_dual_pos_advance-master.opt delete mode 100644 mysql-test/t/rpl_dual_pos_advance.test delete mode 100644 mysql-test/t/rpl_empty_master_crash-master.opt delete mode 100644 mysql-test/t/rpl_empty_master_crash.test delete mode 100644 mysql-test/t/rpl_err_ignoredtable-slave.opt delete mode 100644 mysql-test/t/rpl_err_ignoredtable.test delete mode 100644 mysql-test/t/rpl_events.test delete mode 100644 mysql-test/t/rpl_extraCol_innodb-master.opt delete mode 100644 mysql-test/t/rpl_extraCol_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_extraCol_innodb.test delete mode 100644 mysql-test/t/rpl_extraCol_myisam.test delete mode 100644 mysql-test/t/rpl_failed_optimize-master.opt delete mode 100644 mysql-test/t/rpl_failed_optimize.test delete mode 100644 mysql-test/t/rpl_flushlog_loop-master.opt delete mode 100755 mysql-test/t/rpl_flushlog_loop-master.sh delete mode 100644 mysql-test/t/rpl_flushlog_loop-slave.opt delete mode 100755 mysql-test/t/rpl_flushlog_loop-slave.sh delete mode 100644 mysql-test/t/rpl_flushlog_loop.test delete mode 100644 mysql-test/t/rpl_foreign_key_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_foreign_key_innodb.test delete mode 100644 mysql-test/t/rpl_free_items-slave.opt delete mode 100644 mysql-test/t/rpl_free_items.test delete mode 100644 mysql-test/t/rpl_get_lock.test delete mode 100644 mysql-test/t/rpl_ignore_grant-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_grant.test delete mode 100644 mysql-test/t/rpl_ignore_revoke-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_revoke.test delete mode 100644 mysql-test/t/rpl_ignore_table-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_table.test delete mode 100644 mysql-test/t/rpl_ignore_table_update-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_table_update.test delete mode 100644 mysql-test/t/rpl_incident-master.opt delete mode 100644 mysql-test/t/rpl_incident.test delete mode 100644 mysql-test/t/rpl_init_slave-slave.opt delete mode 100644 mysql-test/t/rpl_init_slave.test delete mode 100644 mysql-test/t/rpl_innodb.test delete mode 100644 mysql-test/t/rpl_insert.test delete mode 100644 mysql-test/t/rpl_insert_id-slave.opt delete mode 100644 mysql-test/t/rpl_insert_id.test delete mode 100644 mysql-test/t/rpl_insert_id_pk-slave.opt delete mode 100644 mysql-test/t/rpl_insert_id_pk.test delete mode 100644 mysql-test/t/rpl_insert_ignore-slave.opt delete mode 100644 mysql-test/t/rpl_insert_ignore.test delete mode 100644 mysql-test/t/rpl_insert_select.test delete mode 100644 mysql-test/t/rpl_known_bugs_detection-master.opt delete mode 100644 mysql-test/t/rpl_known_bugs_detection.test delete mode 100644 mysql-test/t/rpl_load_from_master-slave.opt delete mode 100644 mysql-test/t/rpl_load_from_master.test delete mode 100644 mysql-test/t/rpl_load_table_from_master.test delete mode 100644 mysql-test/t/rpl_loaddata.test delete mode 100644 mysql-test/t/rpl_loaddata_charset.test delete mode 100644 mysql-test/t/rpl_loaddata_m-master.opt delete mode 100644 mysql-test/t/rpl_loaddata_m.test delete mode 100644 mysql-test/t/rpl_loaddata_s-slave.opt delete mode 100644 mysql-test/t/rpl_loaddata_s.test delete mode 100644 mysql-test/t/rpl_loaddata_simple.test delete mode 100644 mysql-test/t/rpl_loaddatalocal.test delete mode 100644 mysql-test/t/rpl_loadfile.test delete mode 100644 mysql-test/t/rpl_locale.test delete mode 100644 mysql-test/t/rpl_log_pos.test delete mode 100644 mysql-test/t/rpl_many_optimize.test delete mode 100644 mysql-test/t/rpl_master_pos_wait.test delete mode 100755 mysql-test/t/rpl_misc_functions-slave.sh delete mode 100644 mysql-test/t/rpl_misc_functions.test delete mode 100644 mysql-test/t/rpl_mixed_ddl_dml.test delete mode 100644 mysql-test/t/rpl_multi_delete-slave.opt delete mode 100644 mysql-test/t/rpl_multi_delete.test delete mode 100644 mysql-test/t/rpl_multi_delete2-slave.opt delete mode 100644 mysql-test/t/rpl_multi_delete2.test delete mode 100644 mysql-test/t/rpl_multi_engine-slave.opt delete mode 100644 mysql-test/t/rpl_multi_engine.test delete mode 100644 mysql-test/t/rpl_multi_update.test delete mode 100644 mysql-test/t/rpl_multi_update2-slave.opt delete mode 100644 mysql-test/t/rpl_multi_update2.test delete mode 100644 mysql-test/t/rpl_multi_update3.test delete mode 100644 mysql-test/t/rpl_multi_update4-slave.opt delete mode 100644 mysql-test/t/rpl_multi_update4.test delete mode 100644 mysql-test/t/rpl_ndb_2innodb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_2innodb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_2innodb.test delete mode 100644 mysql-test/t/rpl_ndb_2myisam-master.opt delete mode 100644 mysql-test/t/rpl_ndb_2myisam-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_2myisam.test delete mode 100644 mysql-test/t/rpl_ndb_UUID.test delete mode 100644 mysql-test/t/rpl_ndb_auto_inc.test delete mode 100644 mysql-test/t/rpl_ndb_bank.test delete mode 100644 mysql-test/t/rpl_ndb_basic.test delete mode 100644 mysql-test/t/rpl_ndb_blob.test delete mode 100644 mysql-test/t/rpl_ndb_blob2.test delete mode 100644 mysql-test/t/rpl_ndb_charset.test delete mode 100644 mysql-test/t/rpl_ndb_circular.test delete mode 100644 mysql-test/t/rpl_ndb_circular_simplex.test delete mode 100644 mysql-test/t/rpl_ndb_commit_afterflush.test delete mode 100644 mysql-test/t/rpl_ndb_dd_advance.test delete mode 100644 mysql-test/t/rpl_ndb_dd_basic.test delete mode 100644 mysql-test/t/rpl_ndb_dd_partitions.test delete mode 100644 mysql-test/t/rpl_ndb_ddl.test delete mode 100644 mysql-test/t/rpl_ndb_delete_nowhere.test delete mode 100644 mysql-test/t/rpl_ndb_do_db-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_do_db.test delete mode 100644 mysql-test/t/rpl_ndb_do_table-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_do_table.test delete mode 100644 mysql-test/t/rpl_ndb_extraCol.test delete mode 100644 mysql-test/t/rpl_ndb_func003.test delete mode 100644 mysql-test/t/rpl_ndb_idempotent.test delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb.test delete mode 100644 mysql-test/t/rpl_ndb_innodb_trans-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb_trans.test delete mode 100644 mysql-test/t/rpl_ndb_insert_ignore.test delete mode 100644 mysql-test/t/rpl_ndb_load.test delete mode 100644 mysql-test/t/rpl_ndb_log-master.opt delete mode 100644 mysql-test/t/rpl_ndb_log.test delete mode 100644 mysql-test/t/rpl_ndb_multi.test delete mode 100644 mysql-test/t/rpl_ndb_multi_update2-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_multi_update2.test delete mode 100644 mysql-test/t/rpl_ndb_multi_update3.test delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb.test delete mode 100644 mysql-test/t/rpl_ndb_relayrotate-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_relayrotate.test delete mode 100644 mysql-test/t/rpl_ndb_rep_ignore-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_rep_ignore.test delete mode 100644 mysql-test/t/rpl_ndb_row_001.test delete mode 100644 mysql-test/t/rpl_ndb_sp003.test delete mode 100644 mysql-test/t/rpl_ndb_sp006.test delete mode 100644 mysql-test/t/rpl_ndb_stm_innodb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_stm_innodb.test delete mode 100644 mysql-test/t/rpl_ndb_sync.test delete mode 100644 mysql-test/t/rpl_ndb_trig004.test delete mode 100644 mysql-test/t/rpl_ndbapi_multi.test delete mode 100644 mysql-test/t/rpl_optimize.test delete mode 100644 mysql-test/t/rpl_packet-master.opt delete mode 100644 mysql-test/t/rpl_packet-slave.opt delete mode 100644 mysql-test/t/rpl_packet.test delete mode 100644 mysql-test/t/rpl_ps.test delete mode 100644 mysql-test/t/rpl_rbr_to_sbr.test delete mode 100644 mysql-test/t/rpl_read_only-slave.opt delete mode 100644 mysql-test/t/rpl_read_only.test delete mode 100644 mysql-test/t/rpl_redirect.test delete mode 100644 mysql-test/t/rpl_relay_space_innodb-master.opt delete mode 100644 mysql-test/t/rpl_relay_space_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_relay_space_innodb.test delete mode 100644 mysql-test/t/rpl_relay_space_myisam.test delete mode 100644 mysql-test/t/rpl_relayrotate-slave.opt delete mode 100644 mysql-test/t/rpl_relayrotate.test delete mode 100644 mysql-test/t/rpl_relayspace-slave.opt delete mode 100644 mysql-test/t/rpl_relayspace.test delete mode 100644 mysql-test/t/rpl_replicate_do-slave.opt delete mode 100644 mysql-test/t/rpl_replicate_do.test delete mode 100644 mysql-test/t/rpl_replicate_ignore_db-slave.opt delete mode 100644 mysql-test/t/rpl_replicate_ignore_db.test delete mode 100644 mysql-test/t/rpl_rewrt_db-slave.opt delete mode 100644 mysql-test/t/rpl_rewrt_db.test delete mode 100644 mysql-test/t/rpl_rotate_logs-master.opt delete mode 100755 mysql-test/t/rpl_rotate_logs-slave.sh delete mode 100644 mysql-test/t/rpl_rotate_logs.slave-mi delete mode 100644 mysql-test/t/rpl_rotate_logs.test delete mode 100644 mysql-test/t/rpl_row_001.test delete mode 100644 mysql-test/t/rpl_row_4_bytes-master.opt delete mode 100644 mysql-test/t/rpl_row_4_bytes.test delete mode 100644 mysql-test/t/rpl_row_NOW.test delete mode 100644 mysql-test/t/rpl_row_USER.test delete mode 100644 mysql-test/t/rpl_row_UUID.test delete mode 100644 mysql-test/t/rpl_row_basic_11bugs-master.opt delete mode 100644 mysql-test/t/rpl_row_basic_11bugs-slave.opt delete mode 100644 mysql-test/t/rpl_row_basic_11bugs.test delete mode 100644 mysql-test/t/rpl_row_basic_2myisam.test delete mode 100644 mysql-test/t/rpl_row_basic_3innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_basic_3innodb.test delete mode 100644 mysql-test/t/rpl_row_basic_7ndb.test delete mode 100644 mysql-test/t/rpl_row_basic_8partition.test delete mode 100644 mysql-test/t/rpl_row_blob_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_blob_innodb.test delete mode 100644 mysql-test/t/rpl_row_blob_myisam.test delete mode 100644 mysql-test/t/rpl_row_charset.test delete mode 100644 mysql-test/t/rpl_row_create_table-slave.opt delete mode 100644 mysql-test/t/rpl_row_create_table.test delete mode 100644 mysql-test/t/rpl_row_delayed_ins.test delete mode 100644 mysql-test/t/rpl_row_drop.test delete mode 100644 mysql-test/t/rpl_row_err_daisychain-master.opt delete mode 100644 mysql-test/t/rpl_row_err_daisychain-slave.opt delete mode 100644 mysql-test/t/rpl_row_flsh_tbls.test delete mode 100644 mysql-test/t/rpl_row_func001.test delete mode 100644 mysql-test/t/rpl_row_func002.test delete mode 100644 mysql-test/t/rpl_row_func003-slave.opt delete mode 100644 mysql-test/t/rpl_row_func003.test delete mode 100644 mysql-test/t/rpl_row_inexist_tbl-slave.opt delete mode 100644 mysql-test/t/rpl_row_inexist_tbl.test delete mode 100644 mysql-test/t/rpl_row_insert_delayed.test delete mode 100644 mysql-test/t/rpl_row_log-master.opt delete mode 100644 mysql-test/t/rpl_row_log-slave.opt delete mode 100644 mysql-test/t/rpl_row_log.test delete mode 100644 mysql-test/t/rpl_row_log_innodb-master.opt delete mode 100644 mysql-test/t/rpl_row_log_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_log_innodb.test delete mode 100644 mysql-test/t/rpl_row_max_relay_size.test delete mode 100644 mysql-test/t/rpl_row_mysqlbinlog-master.opt delete mode 100644 mysql-test/t/rpl_row_mysqlbinlog.test delete mode 100644 mysql-test/t/rpl_row_mystery22.test delete mode 100644 mysql-test/t/rpl_row_reset_slave.test delete mode 100644 mysql-test/t/rpl_row_sp001.test delete mode 100644 mysql-test/t/rpl_row_sp002_innodb-master.opt delete mode 100644 mysql-test/t/rpl_row_sp002_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp002_innodb.test delete mode 100644 mysql-test/t/rpl_row_sp003-master.opt delete mode 100644 mysql-test/t/rpl_row_sp003-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp003.test delete mode 100644 mysql-test/t/rpl_row_sp005.test delete mode 100644 mysql-test/t/rpl_row_sp006_InnoDB-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp006_InnoDB.test delete mode 100644 mysql-test/t/rpl_row_sp007_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp007_innodb.test delete mode 100644 mysql-test/t/rpl_row_sp008.test delete mode 100644 mysql-test/t/rpl_row_sp009.test delete mode 100644 mysql-test/t/rpl_row_sp010.test delete mode 100644 mysql-test/t/rpl_row_sp011.test delete mode 100644 mysql-test/t/rpl_row_sp012.test delete mode 100644 mysql-test/t/rpl_row_stop_middle.test delete mode 100644 mysql-test/t/rpl_row_stop_middle_update-master.opt delete mode 100644 mysql-test/t/rpl_row_stop_middle_update-slave.opt delete mode 100644 mysql-test/t/rpl_row_stop_middle_update.test delete mode 100644 mysql-test/t/rpl_row_tabledefs_2myisam.test delete mode 100644 mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_tabledefs_3innodb.test delete mode 100644 mysql-test/t/rpl_row_trig001.test delete mode 100644 mysql-test/t/rpl_row_trig002.test delete mode 100644 mysql-test/t/rpl_row_trig003.test delete mode 100644 mysql-test/t/rpl_row_trig004.test delete mode 100644 mysql-test/t/rpl_row_until.test delete mode 100644 mysql-test/t/rpl_row_view01.test delete mode 100644 mysql-test/t/rpl_server_id1.test delete mode 100644 mysql-test/t/rpl_server_id2-slave.opt delete mode 100644 mysql-test/t/rpl_server_id2.test delete mode 100644 mysql-test/t/rpl_session_var.test delete mode 100644 mysql-test/t/rpl_set_charset.test delete mode 100644 mysql-test/t/rpl_sf.test delete mode 100644 mysql-test/t/rpl_skip_error-slave.opt delete mode 100644 mysql-test/t/rpl_skip_error.test delete mode 100644 mysql-test/t/rpl_slave_status.test delete mode 100644 mysql-test/t/rpl_sp-master.opt delete mode 100644 mysql-test/t/rpl_sp-slave.opt delete mode 100644 mysql-test/t/rpl_sp.test delete mode 100644 mysql-test/t/rpl_sp004.test delete mode 100644 mysql-test/t/rpl_sp_effects-master.opt delete mode 100644 mysql-test/t/rpl_sp_effects-slave.opt delete mode 100644 mysql-test/t/rpl_sp_effects.test delete mode 100644 mysql-test/t/rpl_sporadic_master-master.opt delete mode 100644 mysql-test/t/rpl_sporadic_master.test delete mode 100644 mysql-test/t/rpl_ssl.test delete mode 100644 mysql-test/t/rpl_ssl1.test delete mode 100644 mysql-test/t/rpl_start_stop_slave.test delete mode 100644 mysql-test/t/rpl_stm_000001-slave.opt delete mode 100644 mysql-test/t/rpl_stm_000001.test delete mode 100644 mysql-test/t/rpl_stm_EE_err2.test delete mode 100644 mysql-test/t/rpl_stm_charset.test delete mode 100644 mysql-test/t/rpl_stm_flsh_tbls.test delete mode 100644 mysql-test/t/rpl_stm_insert_delayed.test delete mode 100644 mysql-test/t/rpl_stm_log-master.opt delete mode 100644 mysql-test/t/rpl_stm_log-slave.opt delete mode 100644 mysql-test/t/rpl_stm_log.test delete mode 100644 mysql-test/t/rpl_stm_max_relay_size.test delete mode 100644 mysql-test/t/rpl_stm_multi_query.test delete mode 100644 mysql-test/t/rpl_stm_mystery22.test delete mode 100644 mysql-test/t/rpl_stm_no_op.test delete mode 100644 mysql-test/t/rpl_stm_reset_slave.test delete mode 100644 mysql-test/t/rpl_stm_until.test delete mode 100644 mysql-test/t/rpl_switch_stm_row_mixed.test delete mode 100644 mysql-test/t/rpl_temp_table.test delete mode 100644 mysql-test/t/rpl_temporary.test delete mode 100644 mysql-test/t/rpl_timezone-master.opt delete mode 100644 mysql-test/t/rpl_timezone-slave.opt delete mode 100644 mysql-test/t/rpl_timezone.test delete mode 100644 mysql-test/t/rpl_trigger.test delete mode 100644 mysql-test/t/rpl_trunc_temp.test delete mode 100644 mysql-test/t/rpl_truncate_2myisam.test delete mode 100644 mysql-test/t/rpl_truncate_3innodb.test delete mode 100644 mysql-test/t/rpl_truncate_7ndb.test delete mode 100644 mysql-test/t/rpl_truncate_7ndb_2-master.opt delete mode 100644 mysql-test/t/rpl_truncate_7ndb_2.test delete mode 100644 mysql-test/t/rpl_udf-master.opt delete mode 100644 mysql-test/t/rpl_udf-slave.opt delete mode 100644 mysql-test/t/rpl_udf.test delete mode 100644 mysql-test/t/rpl_user_variables.test delete mode 100644 mysql-test/t/rpl_variables-master.opt delete mode 100644 mysql-test/t/rpl_variables.test delete mode 100644 mysql-test/t/rpl_view-slave.opt delete mode 100644 mysql-test/t/rpl_view.test delete mode 100644 mysql-test/t/strict_autoinc_5ndb.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/binlog_killed.test b/mysql-test/t/binlog_killed.test deleted file mode 100644 index 6c0b4b46a4e..00000000000 --- a/mysql-test/t/binlog_killed.test +++ /dev/null @@ -1,248 +0,0 @@ --- source include/have_innodb.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source include/not_embedded.inc - -### -### bug#22725 : incorrect killed error in binlogged query -### - -connect (con1, localhost, root,,); -connect (con2, localhost, root,,); - -create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; -create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM; -create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; - -# -# effective test for bug#22725 -# - -connection con1; -select get_lock("a", 20); - -connection con2; -let $ID= `select connection_id()`; -reset master; -send insert into t2 values (null, null), (null, get_lock("a", 10)); - - -connection con1; - -disable_abort_on_error; -disable_query_log; -disable_result_log; - -eval kill query $ID; - -connection con2; ---error 0,ER_QUERY_INTERRUPTED -reap; -let $rows= `select count(*) from t2 /* must be 2 or 0 */`; - ---exec $MYSQL_BINLOG --start-position=134 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -let $error_code= `select @a like "%#%error_code=0%" /* must return 1 or 0*/`; -let $insert_binlogged= `select @a like "%insert into%" /* must return 1 or 0 */`; -eval set @result= $rows- $error_code - $insert_binlogged; - -enable_abort_on_error; -enable_query_log; -enable_result_log; - -select @result /* must be zero either way */; - -# the functions are either *insensitive* to killing or killing can cause -# strange problmes with the error propagation out of SF's stack -# Bug#27563, Bug#27565, BUG#24971 -# -# TODO: use if's block as regression test for the bugs or remove -# -if (0) -{ -delimiter |; -create function bug27563() -RETURNS int(11) -DETERMINISTIC -begin - select get_lock("a", 10) into @a; - return 1; -end| -delimiter ;| - -# the function is sensitive to killing requiring innodb though with wrong client error -# TO FIX in BUG#27565; TODO: remove --error 1105 afterwards -delimiter |; -create function bug27565() -RETURNS int(11) -DETERMINISTIC -begin - select a from t1 where a=1 into @a for update; - return 1; -end| -delimiter ;| - -reset master; - - -### ta table case: killing causes rollback - -# A. autocommit ON -connection con1; -select get_lock("a", 20); - -connection con2; -let $ID= `select connection_id()`; -send insert into t1 values (bug27563(),1); - -connection con1; -eval kill query $ID; - -connection con2; -# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero ---enable_info -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error ---disable_info -###--replace_column 2 # 5 # -### show binlog events from 98 /* nothing in binlog unless Bug#27563 */; -show master status /* must be only FD event unless Bug#27563 */; -select count(*) from t1 /* must be zero unless Bug#27563 */; - -# M. multi-statement-ta -connection con2; -let $ID= `select connection_id()`; -begin; -send insert into t1 values (bug27563(),1); - -connection con1; -eval kill query $ID; -connection con2; -# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero ---enable_info -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; ---disable_info -select count(*) from t1 /* must be zero unless Bug#27563 */; -commit; - - -### non-ta table case: killing must be recorded in binlog - -reset master; - -connection con2; -let $ID= `select connection_id()`; -send insert into t2 values (bug27563(),1); - -connection con1; -eval kill query $ID; - -connection con2; -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; -select count(*) from t2 /* must be one */; -#show binlog events from 98 /* must have the insert on non-ta table */; -show master status /* must have the insert event more to FD */; -# the value of the error flag of KILLED_QUERY is tested further - -connection con1; -select RELEASE_LOCK("a"); - -### test with effective killing of SF() - -delete from t1; -delete from t2; -insert into t1 values (1,1); -insert into t2 values (1,1); - -# -# Bug#27565 -# test where KILL is propagated as error to the top level -# still another bug with the error message to the user -# todo: fix reexecute the result file after fixing -# -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -send update t2 set b=bug27565()-1 where a=1; - -connection con1; -eval kill query $ID; -commit; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error -select * from t1 /* must be: (1,0) */; -select * from t2 /* must be as before: (1,1) */; - -## bug#22725 with effective and propagating killing -# -# top-level ta-table -connection con1; -delete from t3; -reset master; -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -# the query won't perform completely since the function gets interrupted -send insert into t3 values (0,0),(1,bug27565()); - -connection con1; -eval kill query $ID; -rollback; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error -select count(*) from t3 /* must be zero */; -show master status /* nothing in binlog */; - -# top-level non-ta-table -connection con1; -delete from t2; -reset master; -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -# the query won't perform completely since the function gets intrurrupted -send insert into t2 values (0,0),(1,bug27565()) /* non-ta t2 */; - -connection con1; -eval kill query $ID; -rollback; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error - -select count(*) from t2 /* count must be one */; -show master status /* insert into non-ta must be in binlog */; - -drop function bug27563; -drop function bug27565; -} - -system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; - -drop table t1,t2,t3; - diff --git a/mysql-test/t/binlog_row_binlog-master.opt b/mysql-test/t/binlog_row_binlog-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/binlog_row_binlog-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/binlog_row_binlog.test b/mysql-test/t/binlog_row_binlog.test deleted file mode 100644 index 8adc8eee5c1..00000000000 --- a/mysql-test/t/binlog_row_binlog.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/binlog.test diff --git a/mysql-test/t/binlog_row_blackhole.test b/mysql-test/t/binlog_row_blackhole.test deleted file mode 100644 index d5355ad1ff0..00000000000 --- a/mysql-test/t/binlog_row_blackhole.test +++ /dev/null @@ -1,11 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol --- source extra/binlog_tests/blackhole.test ---enable_ps_protocol diff --git a/mysql-test/t/binlog_row_ctype_cp932.test b/mysql-test/t/binlog_row_ctype_cp932.test deleted file mode 100644 index 595af5a3114..00000000000 --- a/mysql-test/t/binlog_row_ctype_cp932.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/t/binlog_row_ctype_ucs.test b/mysql-test/t/binlog_row_ctype_ucs.test deleted file mode 100644 index 96e14ed8882..00000000000 --- a/mysql-test/t/binlog_row_ctype_ucs.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/ctype_ucs_binlog.test - diff --git a/mysql-test/t/binlog_row_drop_tmp_tbl.test b/mysql-test/t/binlog_row_drop_tmp_tbl.test deleted file mode 100644 index 5b503b78d85..00000000000 --- a/mysql-test/t/binlog_row_drop_tmp_tbl.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/t/binlog_row_innodb_stat-master.opt b/mysql-test/t/binlog_row_innodb_stat-master.opt deleted file mode 100644 index 4cb927540bf..00000000000 --- a/mysql-test/t/binlog_row_innodb_stat-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_cache_size=32768 diff --git a/mysql-test/t/binlog_row_innodb_stat.test b/mysql-test/t/binlog_row_innodb_stat.test deleted file mode 100644 index e4e6762226b..00000000000 --- a/mysql-test/t/binlog_row_innodb_stat.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/t/binlog_row_insert_select.test b/mysql-test/t/binlog_row_insert_select.test deleted file mode 100644 index 806d495c8fb..00000000000 --- a/mysql-test/t/binlog_row_insert_select.test +++ /dev/null @@ -1,10 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol --- source extra/binlog_tests/insert_select-binlog.test ---enable_ps_protocol diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt deleted file mode 100644 index e76299453d3..00000000000 --- a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam.test b/mysql-test/t/binlog_row_mix_innodb_myisam.test deleted file mode 100644 index 335a05be146..00000000000 --- a/mysql-test/t/binlog_row_mix_innodb_myisam.test +++ /dev/null @@ -1,32 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol - --- source extra/binlog_tests/mix_innodb_myisam_binlog.test - ---enable_ps_protocol - -# This piece below cannot be put into -# extra/binlog_tests/mix_innodb_myisam_binlog.test -# because the argument of --start-position differs between statement- -# and row-based (and "eval --exec" doesn't work). -# we check that the error code of the "ROLLBACK" event is 0 and not -# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction -# and does not make slave to stop) -flush logs; ---exec $MYSQL_BINLOG --start-position=520 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -drop table t1, t2; diff --git a/mysql-test/t/binlog_statement_insert_delayed.test b/mysql-test/t/binlog_statement_insert_delayed.test deleted file mode 100644 index 9b78296236f..00000000000 --- a/mysql-test/t/binlog_statement_insert_delayed.test +++ /dev/null @@ -1,9 +0,0 @@ -# This test is to verify replication with INSERT DELAY through -# unrecommended STATEMENT binlog format - --- source include/not_embedded.inc --- source include/have_binlog_format_statement.inc --- disable_query_log -reset master; # get rid of previous tests binlog --- enable_query_log --- source extra/binlog_tests/binlog_insert_delayed.test diff --git a/mysql-test/t/binlog_stm_binlog-master.opt b/mysql-test/t/binlog_stm_binlog-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/binlog_stm_binlog-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/binlog_stm_binlog.test b/mysql-test/t/binlog_stm_binlog.test deleted file mode 100644 index 280b7a3aef9..00000000000 --- a/mysql-test/t/binlog_stm_binlog.test +++ /dev/null @@ -1,18 +0,0 @@ -# REQUIREMENT -# replace_regex should replace output of SHOW BINLOG EVENTS - -create table t1 (a int, b int) engine=innodb; -begin; -insert into t1 values (1,2); -commit; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -show binlog events; -drop table t1; - -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed.inc --- source extra/binlog_tests/binlog.test - diff --git a/mysql-test/t/binlog_stm_blackhole.test b/mysql-test/t/binlog_stm_blackhole.test deleted file mode 100644 index 02ba2be095b..00000000000 --- a/mysql-test/t/binlog_stm_blackhole.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/blackhole.test diff --git a/mysql-test/t/binlog_stm_ctype_cp932.test b/mysql-test/t/binlog_stm_ctype_cp932.test deleted file mode 100644 index c0791d81445..00000000000 --- a/mysql-test/t/binlog_stm_ctype_cp932.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/t/binlog_stm_ctype_ucs.test b/mysql-test/t/binlog_stm_ctype_ucs.test deleted file mode 100644 index c8cd7e06398..00000000000 --- a/mysql-test/t/binlog_stm_ctype_ucs.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/ctype_ucs_binlog.test - diff --git a/mysql-test/t/binlog_stm_drop_tmp_tbl.test b/mysql-test/t/binlog_stm_drop_tmp_tbl.test deleted file mode 100644 index 6017f272d01..00000000000 --- a/mysql-test/t/binlog_stm_drop_tmp_tbl.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/t/binlog_stm_innodb_stat-master.opt b/mysql-test/t/binlog_stm_innodb_stat-master.opt deleted file mode 100644 index 4cb927540bf..00000000000 --- a/mysql-test/t/binlog_stm_innodb_stat-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_cache_size=32768 diff --git a/mysql-test/t/binlog_stm_innodb_stat.test b/mysql-test/t/binlog_stm_innodb_stat.test deleted file mode 100644 index a08039c4a41..00000000000 --- a/mysql-test/t/binlog_stm_innodb_stat.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/t/binlog_stm_insert_select.test b/mysql-test/t/binlog_stm_insert_select.test deleted file mode 100644 index 3aefa1e6cf7..00000000000 --- a/mysql-test/t/binlog_stm_insert_select.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/insert_select-binlog.test diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt deleted file mode 100644 index e76299453d3..00000000000 --- a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/t/binlog_stm_mix_innodb_myisam.test deleted file mode 100644 index 72651c13be7..00000000000 --- a/mysql-test/t/binlog_stm_mix_innodb_myisam.test +++ /dev/null @@ -1,24 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/mix_innodb_myisam_binlog.test - -# This piece below cannot be put into -# extra/binlog_tests/mix_innodb_myisam_binlog.test -# because the argument of --start-position differs between statement- -# and row-based (and "eval --exec" doesn't work). -# we check that the error code of the "ROLLBACK" event is 0 and not -# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction -# and does not make slave to stop) -flush logs; ---exec $MYSQL_BINLOG --start-position=555 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -drop table t1, t2; diff --git a/mysql-test/t/binlog_stm_ps.test b/mysql-test/t/binlog_stm_ps.test deleted file mode 100644 index 83add5af3d7..00000000000 --- a/mysql-test/t/binlog_stm_ps.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test is to verify replication with PS - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc - --- disable_query_log -reset master; # get rid of previous tests binlog --- enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings -reset master; - -# -# Bug #26842: master binary log contains invalid queries - replication fails -# -create table t1 (a int); -prepare s from "insert into t1 values (@a),(?)"; -set @a=98; execute s using @a; -prepare s from "insert into t1 values (?)"; -set @a=99; execute s using @a; -prepare s from "insert into t1 select 100 limit ?"; -set @a=100; execute s using @a; -source include/show_binlog_events.inc; -drop table t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 27e3b9bc614..31ff0d58477 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,29 +21,6 @@ im_instance_conf : BUG#28743 Instance manager generates warnings in test im_utils : BUG#28743 Instance manager generates warnings in test suite concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences -ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed - -partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table -rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it stopped -rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated -rpl_ndb_2myisam : BUG#19227 Seems to pass currently -rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD -rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master -rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -#rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly -rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events -#ndb_binlog_discover : bug#21806 2006-08-24 -#ndb_autodiscover3 : bug#21806 - -#rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly - -ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly diff --git a/mysql-test/t/loaddata_autocom_ndb.test b/mysql-test/t/loaddata_autocom_ndb.test deleted file mode 100644 index f4a6743aabe..00000000000 --- a/mysql-test/t/loaddata_autocom_ndb.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/have_ndb.inc -let $engine_type=ndbcluster; - ---source include/loaddata_autocom.inc diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test deleted file mode 100644 index a7b52d54710..00000000000 --- a/mysql-test/t/ndb_alter_table.test +++ /dev/null @@ -1,439 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -connection con2; --- sleep 2 -connection con1; - -# -# Basic test to show that the ALTER TABLE -# is working -# -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; - -DROP TABLE t1; - -# -# Verfify changing table names between databases -# -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -DROP TABLE t1; - -# -# More advanced test -# -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -drop table t1; - - -# -# Check that invalidating dictionary cache works -# - -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; - -connection con2; -select * from t1 order by a; -alter table t1 drop c; - -connection con1; -select * from t1 order by a; -drop table t1; - -connection con2; ---error 1146 -select * from t1 order by a; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -drop table t1; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -drop table t1; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -#engine=ndb; -#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -#create index c on t1(c); -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#alter table t1 drop index c; -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#drop table t1; - -#--disable_warnings -#DROP TABLE IF EXISTS t2; -#--enable_warnings - -#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; -#let $1=12001; -#disable_query_log; -#while ($1) -#{ -# eval insert into t2 values($1); -# dec $1; -#} -#enable_query_log; -#alter table t2 engine=ndbcluster; -#alter table t2 add c int; -#--error 1297 -#delete from t2; -#to make sure we do a full table scan -#select count(*) from t2 where a+0 > 0; -#truncate table t2; -#select count(*) from t2; -#drop table t2; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#connection server1; -#create table t3 (a int primary key) engine=ndbcluster; - -#connection server2; -#begin; -#insert into t3 values (1); - -#connection server1; -#alter table t3 rename t4; - -#connection server2; -## with rbr the below will not work as the "alter" event -## explicitly invalidates the dictionary cache. -### This should work as transaction is ongoing... -##delete from t3; -##insert into t3 values (1); -#commit; - -## This should fail as its a new transaction -#--error 1146 -#select * from t3; -#select * from t4; -#drop table t4; -#show tables; -#connection server1; - -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; - -create index tx2 -on t1 (c010, c011, c012, c013); - -drop table t1; - -# End of 4.1 tests - -# On-line alter table - - -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -# Ndb doesn't support renaming attributes on-line -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---exec rm $MYSQLTEST_VARDIR/master-data/test/tmp.dat || true ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -DROP TABLE t1, ndb_show_tables; - -# simple test that auto incr is not lost at rename or alter -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -drop table t1; - -# some other ALTER combinations -# add/drop pk -create table t1 (a int not null, b varchar(10)) engine=ndb; -show index from t1; -alter table t1 add primary key (a); -show index from t1; -alter table t1 drop primary key; -show index from t1; -drop table t1; - -# alter .. alter -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -alter table t1 alter b set default 1; -show create table t1; -drop table t1; - -# alter .. order by -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -alter table t1 order by b; -select * from t1 order by b; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_alter_table2.test b/mysql-test/t/ndb_alter_table2.test deleted file mode 100644 index afe6e44f698..00000000000 --- a/mysql-test/t/ndb_alter_table2.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connect (con3,localhost,root,,test); -connect (con4,localhost,root,,test); -connect (con5,localhost,root,,test); -connect (con6,localhost,root,,test); - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -connection con1; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -connection con2; -BEGIN; ---send -INSERT INTO t1 VALUES (9411,9412); -connection con3; -BEGIN; ---send -INSERT INTO t1 VALUES (9412,9412); -connection con4; -BEGIN; ---send -INSERT INTO t1 VALUES (9413,9412); -connection con5; -BEGIN; ---send -INSERT INTO t1 VALUES (9414,9412); -connection con6; -BEGIN; ---send -INSERT INTO t1 VALUES (9415,9412); -connection con1; -sleep 1; - -ROLLBACK; -connection con2; -reap; -ROLLBACK; -connection con3; -reap; -ROLLBACK; -connection con4; -reap; -ROLLBACK; -connection con5; -reap; -ROLLBACK; -connection con6; -reap; -ROLLBACK; - -connection server2; - -drop table t1; -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -connection server1; - ---disable_result_log ---error 0,1412 -select * from t1; ---enable_result_log -select * from t1; -select * from t1; -select * from t1; -select * from t1; -select * from t1; - -drop table t1; diff --git a/mysql-test/t/ndb_alter_table3.test b/mysql-test/t/ndb_alter_table3.test deleted file mode 100644 index a5fe613adcf..00000000000 --- a/mysql-test/t/ndb_alter_table3.test +++ /dev/null @@ -1,49 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connection server1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -alter table t1 drop index c; -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -drop table t1; - -connection server1; -create table t3 (a int primary key) engine=ndbcluster; - -connection server2; -begin; -insert into t3 values (1); - -connection server1; -alter table t3 rename t4; - -connection server2; -# with rbr the below will not work as the "alter" event -# explicitly invalidates the dictionary cache. -## This should work as transaction is ongoing... -#delete from t3; -#insert into t3 values (1); -commit; - -# This should fail as its a new transaction ---error 1146 -select * from t3; -select * from t4; -drop table t4; -show tables; -connection server1; diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test deleted file mode 100644 index 06d47693c10..00000000000 --- a/mysql-test/t/ndb_autodiscover.test +++ /dev/null @@ -1,548 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -################################################ -# Test that a table that does not exist as a -# frm file on disk can be "discovered" from a -# connected NDB Cluster -# - -flush status; - -# -# Test discover + SELECT -# - -create table t1( - id int not null primary key, - name char(20) -) engine=ndb; - -insert into t1 values(1, "Autodiscover"); -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1; -show status like 'handler_discover%'; - -# -# Test discover + INSERT -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + UPDATE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + DELETE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -delete from t1 where id = 3; -select * from t1 order by id; -show status like 'handler_discover%'; - -drop table t1; - - - -###################################################### -# Test that a table that is outdated on disk -# can be "discovered" from a connected NDB Cluster -# - -flush status; - -create table t2( - id int not null primary key, - name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -show status like 'handler_discover%'; -flush tables; - -# Modify the frm file on disk -system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; -select * from t2; - -show status like 'handler_discover%'; - -drop table t2; - - -################################################## -# Test that a table that already exists in NDB -# is only discovered if CREATE TABLE IF NOT EXISTS -# is used -# - -flush status; - -create table t3( - id int not null primary key, - name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -show status like 'handler_discover%'; -flush tables; - -# Remove the frm file from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm - ---error 1050 -create table t3( - id int not null primary key, - name char(20), a int, b float, c char(24) -) engine=ndb; - -# The table shall not have been discovered since -# IF NOT EXISTS wasn't specified - -show status like 'handler_discover%'; - -# now it should be discovered -create table IF NOT EXISTS t3( - id int not null primary key, - id2 int not null, - name char(20) -) engine=ndb; - -# NOTE! the table called t3 have now been updated to -# use the same frm as in NDB, thus it's not certain that -# the table schema is the same as was stated in the -# CREATE TABLE statement above - -show status like 'handler_discover%'; - -SHOW CREATE TABLE t3; - -select * from t3; -show status like 'handler_discover%'; - -drop table t3; - -################################################## -# Test that a table that already exists in NDB -# is discovered when SHOW TABLES -# is used -# - -flush status; - -create table t7( - id int not null primary key, - name char(255) -) engine=ndb; -create table t6( - id int not null primary key, - name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -show status like 'handler_discover%'; - -# Remove the frm file from disk -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -show tables from test; -show status like 'handler_discover%'; - -# Remove the frm file from disk again -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - ---replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # -show table status; -show status like 'handler_discover%'; - -drop table t6, t7; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk, get a consistent error message -# saying "No such table existed" -# - -flush status; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -# -# Test that correct error is returned ---error 1146 -select * from t4; ---error 1146 -select * from t4; - -show status like 'handler_discover%'; ---error 1051 -drop table t4; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - ---error 1146 -select * from t4; - -drop table if exists t4; - -# Test that dropping a table that does not exists -# on disk or in NDB gives same result as above ---error 1051 -drop table t5; -drop table if exists t5; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk is deleted from disk -# when SHOW TABLES is called -# - -flush status; - -create table t4( - id int not null primary key, - id2 int, - name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -flush tables; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -SHOW TABLES; - ---error 1146 -select * from t4; - -####################################################### -# Test SHOW TABLES ability to detect new and delete old -# tables. Test all at once using many tables -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -SHOW TABLES; - -select * from t6; -select * from t7; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - -####################################################### -# Test SHOW TABLES LIKE ability to detect new and delete old -# tables. Test all at once using many tables. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - - -SHOW TABLES LIKE 't6'; - -show status like 'handler_discover%'; - -# Check that t3 or t5 can't be created -# frm files for these tables is stilll on disk ---error 1050 -create table t3(a int); ---error 1050 -create table t5(a int); - -SHOW TABLES LIKE 't%'; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - - - -###################################################### -# Test that several tables can be discovered when -# one statement access several table at once. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; - -# Populate tables -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); - -# Remove t1, t2, t3 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm -flush tables; - -# Select from the table which only exists in NDB. -select * from t1, t2, t3, t4; - -# 3 table should have been discovered -show status like 'handler_discover%'; - -drop table t1, t2, t3, t4; - - -######################################################### -# Test that a table that has been changed in NDB -# since it's been opened will be refreshed and discovered -# again -# - -flush status; - -show status like 'handler_discover%'; - -create table t5( - id int not null primary key, - name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; - -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; - -select * from t5; - -insert into t5 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; - -show status like 'handler_discover%'; - -drop table t5; - - -################################################################ -# Test that a table that has been changed with ALTER TABLE -# can be used from the same thread -# - -flush status; - -show status like 'handler_discover%'; - -create table t6( - id int not null primary key, - name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; - -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; - -select * from t6; -insert into t6 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; - -show status like 'handler_discover%'; - -drop table t6; - -##################################################### -# Test that only tables in the current database shows -# up in SHOW TABLES -# - -show tables; - -create table t1 (a int,b longblob) engine=ndb; -show tables; -create database test2; -use test2; -show tables; ---error 1146 -select * from t1; -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -show tables; -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; - -######################################################### -# Bug#8035 -# mysqld would segfault on second select * before bug was fixed -# ---disable_warnings -drop database if exists test_only_ndb_tables; ---enable_warnings -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---error 1015 -select * from t1; ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null -use test; -drop database test_only_ndb_tables; - -##################################################### -# Test that it's not possible to create tables -# with same name as NDB internal tables -# This will also test that it's not possible to create -# a table with tha same name as a table that can't be -# discovered( for example a table created via NDBAPI) - -# Test disabled since it doesn't work on case insensitive systems -#--error 1050 -#CREATE TABLE sys.SYSTAB_0 (a int); -#--error 1105 -#select * from sys.SYSTAB_0; - -#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); -#show warnings; -#--error 1105 -#select * from sys.SYSTAB_0; - -#--error 1051 -#drop table sys.SYSTAB_0; -#drop table IF EXISTS sys.SYSTAB_0; - -###################################################### -# Note! This should always be the last step in this -# file, the table t9 will be used and dropped -# by ndb_autodiscover2 -# - -CREATE TABLE t9 ( - a int NOT NULL PRIMARY KEY, - b int -) engine=ndb; - -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); - -#Don't drop the table, instead remove the frm file ---remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm - -# Now leave test case, when ndb_autodiscover2 will run, this -# MySQL Server will have been restarted because it has a -# ndb_autodiscover2-master.opt file. - -create table t10 ( - a int not null primary key, - b blob -) engine=ndb; - -insert into t10 values (1, 'kalle'); - ---exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_autodiscover2-master.opt b/mysql-test/t/ndb_autodiscover2-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/ndb_autodiscover2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/ndb_autodiscover2.test b/mysql-test/t/ndb_autodiscover2.test deleted file mode 100644 index ebe14696cd2..00000000000 --- a/mysql-test/t/ndb_autodiscover2.test +++ /dev/null @@ -1,21 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Simple test to show use of discover when the server has been restarted -# The previous step has simply removed the frm file -# from disk, but left the table in NDB -# ---sleep 3 -select * from t9 order by a; - -# handler_discover should be 1 -show status like 'handler_discover%'; - -drop table t9; - ---error 1296 -select * from t10; -drop table t10; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test deleted file mode 100644 index d0b9d0983e9..00000000000 --- a/mysql-test/t/ndb_autodiscover3.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# see bug#21563 --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -# Workaround for Bug#27644 -# ndb: connecting api node/mysqld may "steal" node_id from running mysqld -# - let ndb_waiter use a fixed node id so "steal" cannot happen ---let connect_str = "nodeid=6;$NDB_CONNECTSTRING" - -# -# Transaction ongoing while cluster is restarted -# ---connection server1 -create table t1 (a int key) engine=ndbcluster; - -begin; -insert into t1 values (1); - ---exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# Wait for mysqld to reconnect and exit from readonly mode -# Should preferrably be a "while (!"select ndb_readonly")" loop -sleep 2; ---error 1297 -insert into t1 values (2); ---error 1296 -commit; - -drop table t1; - -# -# Stale cache after restart -i -# ---connection server1 -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT -sleep 2; ---connection server2 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried ---connection server1 -select * from t2 order by a limit 3; -reset master; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT -sleep 2; ---connection server1 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 2 should have a stale cache, but with right frm, transaction need not be retried ---connection server2 -select * from t2 order by a limit 3; -reset master; - -drop table t2; -# End of 4.1 tests diff --git a/mysql-test/t/ndb_backup_print.test b/mysql-test/t/ndb_backup_print.test deleted file mode 100644 index 1e516f03ae6..00000000000 --- a/mysql-test/t/ndb_backup_print.test +++ /dev/null @@ -1,66 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -#NO.1 test output of backup ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - -#NO.2 test output of backup after some simple SQL operations ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test deleted file mode 100644 index b9ccdf9fd0d..00000000000 --- a/mysql-test/t/ndb_basic.test +++ /dev/null @@ -1,843 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# workaround for bug#16445 -# remove to reproduce bug and run tests from ndb start -# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; - -# -# Basic test to show that the NDB -# table handler is working -# - -# -# Show status and variables -# ---replace_column 2 # -SHOW GLOBAL STATUS LIKE 'ndb%'; ---replace_column 2 # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -SHOW INDEX FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -SELECT pk1 FROM t1 ORDER BY pk1; -SELECT * FROM t1 ORDER BY pk1; -SELECT t1.* FROM t1 ORDER BY pk1; - -# Update on record by primary key -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; - -# Update primary key -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; - -# Delete the record -DELETE FROM t1; -SELECT * FROM t1; - -# Insert more records and update them all at once -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -# Delete one record by specifying pk -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; - -# Delete all from table -DELETE FROM t1; -SELECT * FROM t1; - -# Insert three records with attr1=4 and two with attr1=5 -# Delete all with attr1=4 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -DELETE FROM t1; - -# Insert two records and delete one -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -DELETE FROM t1; - -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; - -DROP TABLE t1; - -# test create with the keyword "engine=NDBCLUSTER" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - -# test create with the keyword "engine=NDB" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDB; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert more records into tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -enable_query_log; - - -# -# delete every other record in the tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - - -select * from t2 where a = 7 order by b; -select * from t2 where a = 7 order by a; -select * from t2 where a = 7 order by 2; -select * from t2 where a = 7 order by c; - -select * from t2 where a = 7 and b = 16 order by b; -select * from t2 where a = 7 and b = 16 order by a; -select * from t2 where a = 7 and b = 17 order by a; -select * from t2 where a = 7 and b != 16 order by b; - -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -select * from t2 where a = 7 and b != 16 and c = 5 order by b; - -select * from t3 where a = 7 order by b; -select * from t3 where a = 7 order by a; -select * from t3 where a = 7 order by 2; -select * from t3 where a = 7 order by c; - -select * from t3 where a = 7 and b = 16 order by b; -select * from t3 where a = 7 and b = 16 order by a; -select * from t3 where a = 7 and b = 17 order by a; -select * from t3 where a = 7 and b != 16 order by b; - -select * from t4 where a = 7 order by b; -select * from t4 where a = 7 order by a; -select * from t4 where a = 7 order by 2; -select * from t4 where a = 7 order by c; - -select * from t4 where a = 7 and b = 16 order by b; -select * from t4 where a = 7 and b = 16 order by a; -select * from t4 where a = 7 and b = 17 order by a; -select * from t4 where a = 7 and b != 16 order by b; - -# -# update records -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; - - -delete from t2; -delete from t3; -delete from t4; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test delete and update from table with 3 keys -# - -CREATE TABLE t5 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - -insert into t5 values(10, 19, 5, 26010); - -delete from t5 where a=10 and b=19 and c=5; - -select * from t5; - -insert into t5 values(10, 19, 5, 26010); - -update t5 set d=21997 where a=10 and b=19 and c=5; - -select * from t5; - -delete from t5; - -drop table t5; - -# -# Test using table with a char(255) column first in table -# - -CREATE TABLE t6 ( - adress char(255), - a int NOT NULL PRIMARY KEY, - b int -) engine = NDB; - -insert into t6 values - ("Nice road 3456", 1, 23), - ("Street Road 78", 3, 92), - ("Road street 89C", 5, 71), - (NULL, 7, NULL); -select * from t6 order by a; -select a, b from t6 order by a; - -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -select * from t6 where a=1; -delete from t6 where a=1; -select * from t6 order by a; -delete from t6 where b=71; -select * from t6 order by a; - -drop table t6; - -# -# Test using table with a char(255) column first in table and a -# primary key consisting of two columns -# - -CREATE TABLE t7 ( - adress char(255), - a int NOT NULL, - b int, - c int NOT NULL, - PRIMARY KEY(a, c) -) engine = NDB; - -insert into t7 values - ("Highway 3456", 1, 23, 2), - ("Street Road 78", 3, 92, 3), - ("Main street 89C", 5, 71, 4), - (NULL, 8, NULL, 12); -select * from t7 order by a; -select a, b from t7 order by a; - -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -select * from t7 where a=1 and c=2; -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -delete from t7 where b=23; -select * from t7; - -drop table t7; - -# -# Test multiple databases in one statement -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -select b from test.t1, t2 where c = test.t1.attr2; -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; - -drop table test.t1, t2; -drop database mysqltest; - -# -# BUG#6031 - DROP DATABASE doesn't drop database on first try -# - ---disable_warnings -drop database if exists ndbtest1; ---enable_warnings - -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; ---error 1008 -drop database ndbtest1; - -# -# test support of char(0) -# - -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -select * from t1 order by b; -select * from t1 where b IS NULL; -select * from t1 where b IS NOT NULL; -drop table t1; - -# -# test the limit of no of attributes in one table -# -# also tests bug#17179, more than 31 attributes in -# a partitioned table -# -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; - -# -# test max size of attribute name and truncation -# - -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); ---replace_column 9 # -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -select * from t1 where a12345678901234567890123456789a1234567890=2; -drop table t1; - -# -# test fragment creation -# -# first a table with _many_ fragments per node group -# then a table with just one fragment per node group -# -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a,b,c,d)) - engine=ndb - max_rows=800000000; -insert into t1 values - (1,2,3,4),(2,3,4,5),(3,4,5,6), - (3,2,3,4),(1,3,4,5),(2,4,5,6), - (1,2,3,5),(2,3,4,8),(3,4,5,9), - (3,2,3,5),(1,3,4,8),(2,4,5,9), - (1,2,3,6),(2,3,4,6),(3,4,5,7), - (3,2,3,6),(1,3,4,6),(2,4,5,7), - (1,2,3,7),(2,3,4,7),(3,4,5,8), - (3,2,3,7),(1,3,4,7),(2,4,5,8), - (1,3,3,4),(2,4,4,5),(3,5,5,6), - (3,3,3,4),(1,4,4,5),(2,5,5,6), - (1,3,3,5),(2,4,4,8),(3,5,5,9), - (3,3,3,5),(1,4,4,8),(2,5,5,9), - (1,3,3,6),(2,4,4,6),(3,5,5,7), - (3,3,3,6),(1,4,4,6),(2,5,5,7), - (1,3,3,7),(2,4,4,7),(3,5,5,8), - (3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -drop table t1; - -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a)) - engine=ndb - max_rows=1; -drop table t1; - -# -# Test auto_increment -# - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -create table t1 - (counter int(64) NOT NULL auto_increment, - datavalue char(40) default 'XXXX', - primary key (counter) - ) ENGINE=ndbcluster; - -connection con1; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -connection con2; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; - -drop table t1; - -# -# bug#27437 -connection con1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1(a) values (20),(28); -connection con1; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1() values (21), (22); -connection con1; - -drop table t1; - -# -# BUG#14514 Creating table with packed key fails silently -# - -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -drop table t1; - -# -# Bug #17249 delete statement with join where clause fails -# when table do not have pk - # - -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -select * from t2; -drop table t1; -drop table t2; - -# -# Bug #17257 update fails for inner joins if tables -# do not have Primary Key -# - -CREATE TABLE t1 ( - i INT, - j INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t2 ( - i INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t3 ( - j INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); - -UPDATE t1 AS a -INNER JOIN t2 AS b - ON a.i = b.i -INNER JOIN t3 AS c - ON a.j = c.j AND b.k = c.k -SET a.x = b.x, - a.y = b.y, - a.z = ( - SELECT sum(z) - FROM t3 - WHERE y = 34 - ) -WHERE b.x = 23; -select * from t1; -drop table t1; -drop table t2; -drop table t3; - -# End of 4.1 tests - -# -# Test long table name -# -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -drop table atablewithareallylongandirritatingname; - -# -# Bug#15682 -# -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -select * from t1 order by f2; -select * from t1 order by f3; -drop table t1; -# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror -# - -# As long there is no error code 1186 defined by NDB -# we should get a message "Illegal ndb error code: 1186" ---error 1 ---exec $MY_PERROR --ndb 1186 2>&1 - -# -# Bug #25746 - VARCHAR UTF8 PK issue -# - prior to bugfix 4209, illegal length parameter would be -# returned in SELECT * - -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# delete -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -drop table t1,t2; - -# insert ignore -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); ---error ER_DUP_ENTRY -insert into t1 set a=1, b=100; -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -drop table t1; - -# update -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); ---error ER_DUP_ENTRY -update t1 set a = 1 where a = 3; -select * from t1 order by a; -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; ---error ER_DUP_ENTRY -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -drop table t1,t2; - -# End of 5.0 tests ---echo End of 5.0 tests - - -# -# Bug #18483 Cannot create table with FK constraint -# ndb does not support foreign key constraint, it is silently ignored -# in line with other storage engines -# -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, - CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, - b VARCHAR(255) NOT NULL, - c VARCHAR(255) NOT NULL, - CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), - CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; - -# bug#24301 -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -select * from t2 order by a; -drop table t1, t2; - -# create table if not exists ---disable_warnings -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; ---enable_warnings - -# create like -create table t2 like t1; - -# multi rename -rename table t1 to t10, t2 to t20; -drop table t10,t20; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_binlog_basic.test b/mysql-test/t/ndb_binlog_basic.test deleted file mode 100644 index e4642dc3230..00000000000 --- a/mysql-test/t/ndb_binlog_basic.test +++ /dev/null @@ -1,72 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; ---enable_warnings - -# -# basic insert, update, delete test, alter, rename, drop -# check that ndb_binlog_index gets the right info -# - -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; - -# get all in one epoch -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; - -# check that above is ok -# (save_master_pos waits for last gcp to complete, ensuring that we have -# the expected data in the binlog) -save_master_pos; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; - -# -# check that purge clears the ndb_binlog_index -# -flush logs; ---sleep 1 -purge master logs before now(); -select count(*) from mysql.ndb_binlog_index; - -# -# several tables in different databases -# check that same table name in different databases don't mix up -# -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; - -insert into mysqltest.t1 values (2,1),(2,2); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; diff --git a/mysql-test/t/ndb_binlog_basic2.test b/mysql-test/t/ndb_binlog_basic2.test deleted file mode 100644 index bcc6b503320..00000000000 --- a/mysql-test/t/ndb_binlog_basic2.test +++ /dev/null @@ -1,15 +0,0 @@ --- source include/have_ndb.inc --- source include/have_log_bin.inc - ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=row; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=statement; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=row; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=statement; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=default; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=default; diff --git a/mysql-test/t/ndb_binlog_ddl_multi.test b/mysql-test/t/ndb_binlog_ddl_multi.test deleted file mode 100644 index 487dfbf16e5..00000000000 --- a/mysql-test/t/ndb_binlog_ddl_multi.test +++ /dev/null @@ -1,191 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -connection server1; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; ---connection server1 -reset master; ---connection server2 -reset master; ---enable_warnings - -# -# basic test to see if ddl distribution works across -# multiple binlogs -# - -# create database ---connection server1 -create database mysqltest; - -# create table ---connection server1 -use mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 -create table t2 (a int primary key) engine=ndb; ---source include/show_binlog_events2.inc - ---connection server1 ---source include/show_binlog_events2.inc - -# alter table ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -alter table t2 add column (b int); - ---connection server1 ---source include/show_binlog_events2.inc - -# alter database ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -ALTER DATABASE mysqltest CHARACTER SET latin1; - - -# having drop here instead of below sometimes triggers bug#18976 -## drop table and drop should come after data events ---connection server2 -drop table mysqltest.t1; - ---connection server1 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -#--connection server2 -#drop table mysqltest.t1; - -# drop database and drop should come after data events ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 ---source include/show_binlog_events2.inc - ---connection server2 -drop table t2; - -# logfile groups and table spaces ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -# having drop here instead of below sometimes triggers bug#18976 -#drop table t1; - ---connection server2 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -drop table t1; - -# -# Bug #17827 cluster: rename of several tables in one statement, -# gets multiply logged -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; ---connection server2 ---source include/show_binlog_events2.inc - -drop table t1; -drop table t2; -drop table t3; - -# -# Bug #17838 binlog not setup on seconday master after rename -# -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); - -# now we should see data in table t1 _and_ t2 -# prior to bug fix, data was missing for t2 ---connection server2 -drop table t2; ---source include/show_binlog_events2.inc diff --git a/mysql-test/t/ndb_binlog_discover.test b/mysql-test/t/ndb_binlog_discover.test deleted file mode 100644 index 999079ad29c..00000000000 --- a/mysql-test/t/ndb_binlog_discover.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug #14516 Restart of cluster can cause NDB API replication failure -# -create table t1 (a int key) engine=ndb; -reset master; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null - ---disable_query_log -let $mysql_errno= 1; -while ($mysql_errno) -{ - # Table t1 is readonly until the mysqld has reconnected properly - --error 0,1036,1296 - insert into t1 values(1); - if ($mysql_errno) - { - --sleep 0.1 - } -} ---enable_query_log - ---source include/show_binlog_events2.inc -PURGE MASTER LOGS TO 'master-bin.000002'; - ---source include/show_binlog_events2.inc -drop table t1; diff --git a/mysql-test/t/ndb_binlog_ignore_db-master.opt b/mysql-test/t/ndb_binlog_ignore_db-master.opt deleted file mode 100644 index e3947c0eeed..00000000000 --- a/mysql-test/t/ndb_binlog_ignore_db-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-ignore-db=mysqltest diff --git a/mysql-test/t/ndb_binlog_ignore_db.test b/mysql-test/t/ndb_binlog_ignore_db.test deleted file mode 100644 index 8f80e53f2e4..00000000000 --- a/mysql-test/t/ndb_binlog_ignore_db.test +++ /dev/null @@ -1,16 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -reset master; - ---disable_warnings -drop table if exists t1; -drop database if exists mysqltest; ---enable_warnings - -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); --- source include/show_binlog_events2.inc - -drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_log_bin.test b/mysql-test/t/ndb_binlog_log_bin.test deleted file mode 100644 index b2dbaa797b6..00000000000 --- a/mysql-test/t/ndb_binlog_log_bin.test +++ /dev/null @@ -1,50 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -reset master; -connection server1; -drop table if exists t1,t2,t3; -reset master; ---enable_warnings - -# basic SQL_LOG_BIN functionality -# see updates from one thread but not the other -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# do some stuff with SQL_LOG_BIN=0 -connection con2; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -# we should not see it in the local server --- source include/show_binlog_events2.inc -reset master; -# we should not see it in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -reset master; -# but if you do stuff in "default" client setting -connection con1; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); --- source include/show_binlog_events2.inc -# and in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_multi.test b/mysql-test/t/ndb_binlog_multi.test deleted file mode 100644 index c227c7fec93..00000000000 --- a/mysql-test/t/ndb_binlog_multi.test +++ /dev/null @@ -1,83 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -connection server1; -drop table if exists t1,t2,t3; ---enable_warnings - -# Dummy table create/drop to avoid a race where table is created -# before event subscription is set up, causing test failure (BUG#20677). -connection server2; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -connection server1; -DROP TABLE t3; - -# reset for test -connection server1; -reset master; -connection server2; -reset master; - -# -# basic test to see if one server sees the table from the other -# and sets up the replication correctly -# - -# create table on the other server -connection server2; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; - -# insert something on server2 -INSERT INTO t2 VALUES (1,1),(2,2); -# verify that we get the data in the binlog ---source include/show_binlog_events2.inc -select * from t2 order by a; ---replace_column 1 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch= `SELECT @the_epoch`; - -# see if we got something on server1 -connection server1; -SELECT * FROM t2 ORDER BY a; -# doing drop table will ensure that all the events have been received -DROP TABLE t2; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch=$the_epoch; - -# reset for next test -connection server1; -reset master; -connection server2; -reset master; - -# single schema ops will not show -connection server2; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); ---source include/show_binlog_events2.inc ---replace_column 1 -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch2= `SELECT @the_epoch2`; - ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; - -# now see that we have the events on the other server -connection server2; -# doing drop table will ensure that all the events have been received -drop table t1; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/t/ndb_bitfield.test b/mysql-test/t/ndb_bitfield.test deleted file mode 100644 index de0ae23bfe6..00000000000 --- a/mysql-test/t/ndb_bitfield.test +++ /dev/null @@ -1,124 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - pk1 int not null primary key, - b bit(64) -) engine=ndbcluster; - -show create table t1; -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 ( - pk1 int not null primary key, - b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -select b+0 from t1 order by b; -drop table t1; - -create table t1 ( - dummyKey INTEGER NOT NULL, - a001 TINYINT, - a010 TINYINT, - a012 TINYINT, - a015 TINYINT, - a016 TINYINT, - a017 TINYINT, - a019 TINYINT, - a029 TINYINT, - a030 TINYINT, - a031 TINYINT, - a032 TINYINT, - a042 TINYINT, - a043 TINYINT, - a044 TINYINT, - a3001 TINYINT, - a3002 TINYINT, - a3003 TINYINT, - a3004 TINYINT, - a3005 TINYINT, - a3021 TINYINT, - a3022 TINYINT, - a BIT(6), - b BIT(6), - c BIT(6), - d TINYINT, - e TINYINT, - f TINYINT, - g TINYINT, - h TINYINT, - i TINYINT, - j TINYINT, - k TINYINT, - l TINYINT, - m TINYINT, - n TINYINT, - o TINYINT, - a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); ---exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1 -drop table t1; - ---error 1005 -create table t1 ( - pk1 bit(9) not null primary key, - b int -) engine=ndbcluster; -show warnings; - ---error 1005 -create table t1 ( - pk1 int not null primary key, - b bit(9), - key(b) -) engine=ndbcluster; -show warnings; - -# bug#16125 -create table t1 ( - pk1 int primary key, - b bit(32) not null -) engine=ndbcluster; - -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/t/ndb_blob.test b/mysql-test/t/ndb_blob.test deleted file mode 100644 index b9a8c7e20ee..00000000000 --- a/mysql-test/t/ndb_blob.test +++ /dev/null @@ -1,499 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop database if exists test2; ---enable_warnings - -# -# Minimal NDB blobs test. -# -# On NDB API level there is an extensive test program "testBlobs". -# A prerequisite for this handler test is that "testBlobs" succeeds. -# - -# -- general test starts -- - -# make test harder with autocommit off -set autocommit=0; - -create table t1 ( - a int not null primary key, - b text not null, - c int not null, - d longblob, - key (c) -) engine=ndbcluster; - -# -- values -- - -# x0 size 256 (current inline size) -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - -# -- pk ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# pk update -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# pk update -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# pk update to null -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; - -# bug#24028 - does not occur on MySQL level -# bug#17986 - not seen by us anymore but could show as warning here -delete from t1 where a=45567; -commit; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- replace ( bug-6018 ) -- - -# insert -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# update to null -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- hash index ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c = 111; - -# hash key read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; - -# hash key update -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; - -# hash key update to null -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; - -# hash key delete -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; - -# -- table scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select * from t1 order by a; - -# table scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- table scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; - -# table scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- range scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select * from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- range scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- rollback -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -# 626 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -rollback; -select count(*) from t1; - -# -- alter table and multi db -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -create database test2; -use test2; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; - -drop table t2; -use test; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -# -- end general test -- - -drop table t1; -drop database test2; - -# -- bug-5252 tinytext crashes + no-commit result + replace -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b tinytext -) engine=ndbcluster; - -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -delete from t1; -select * from t1; -commit; -replace t1 set a=2, b='y'; -select * from t1; -delete from t1; -select * from t1; -drop table t1; - -# -- bug-5013 insert empty string to text -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b text not null -) engine=ndbcluster; - -insert into t1 values(1, ''); -select * from t1; -commit; -drop table t1; - -# -- bug #5349 -- -set autocommit=1; -use test; -CREATE TABLE t1 ( - a int, - b text, - PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); - -select * from t1 order by a; -alter table t1 engine=ndb; -select * from t1 order by a; - -# -- bug #5872 -- -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -drop table t1; - -# -- bug #7340 -- -create table t1 ( - id int(11) unsigned primary key NOT NULL auto_increment, - msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -drop table t1; - -# -- bug #19201 -create table t1 ( - a int primary key not null auto_increment, - b text -) engine=ndbcluster; ---disable_query_log -set autocommit=1; -# more rows than batch size (64) -# for this bug no blob parts would be necessary -let $1 = 500; -while ($1) -{ - insert into t1 (b) values (repeat('x',4000)); - dec $1; -} ---enable_query_log -select count(*) from t1; -truncate t1; -select count(*) from t1; -drop table t1; - -# -- bug#19956 - var* key, complex key - -create table t1 ( - a varchar(40) not null, - b mediumint not null, - t text, - c varchar(2) not null, - d bigint not null, - primary key (a,b,c), - key (c,a), - unique key (d) -) engine=ndb; - ---disable_query_log -set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; -set @v1 = repeat(@s1,123); -set @v2 = repeat(@s2,234); -set @v3 = repeat(@s3,345); -set @v4 = NULL; ---enable_query_log - -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; - -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; - -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; - -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_blob_partition.test b/mysql-test/t/ndb_blob_partition.test deleted file mode 100644 index 35df57b96ba..00000000000 --- a/mysql-test/t/ndb_blob_partition.test +++ /dev/null @@ -1,97 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB blobs test with range partitions. -# - -create table t1 ( - a mediumint not null, - b text not null, - c int not null, - d longblob, - primary key using hash (a,c), - unique key (c) -) - engine=ndb - partition by range (c) - partitions 3 - ( partition p1 values less than (200), - partition p2 values less than (300), - partition p3 values less than (400)); - ---disable_query_log -sleep 1; - -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; - -set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 -set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 -set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a -set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d -set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e -set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5 -set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e -set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259 ---enable_query_log - -# -- insert -- -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- pk read -- -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; - -# -- pk update -- -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- hash index update -- -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- full scan update -- -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- range scan update -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- delete -- -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -# delete from t1 where c < 300; # XXX coredump -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- clean up -- -drop table t1; diff --git a/mysql-test/t/ndb_cache.test b/mysql-test/t/ndb_cache.test deleted file mode 100644 index 9c299b61c24..00000000000 --- a/mysql-test/t/ndb_cache.test +++ /dev/null @@ -1,122 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Create test table in NDB -CREATE TABLE t1 ( pk int not null primary key, - a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); - -# Perform one query which should be inerted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a=4 where b=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Use transactions and make sure the query cache is not updated until -# transaction is commited -begin; -update t1 set a=5 where pk=1; -# Note!! the below test shows that table is invalidated -# before transaction is committed -# TODO Fix so that cache is not invalidated HERE! -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -# TODO Here query is invalidated once again, commit count in NDB has changed -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1; - -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_cache2.test b/mysql-test/t/ndb_cache2.test deleted file mode 100644 index 352b01ef73f..00000000000 --- a/mysql-test/t/ndb_cache2.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -# Turn on thread that will fetch commit count for open tables -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; - -# Create test tables in NDB -CREATE TABLE t1 ( - pk int not null primary key, - a1 int, - b1 int not null, - c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( - pk int not null primary key, - a2 int, - b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( - pk int not null primary key, - a3 int, - b3 int not null, - c3 int not null, - d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( - a4 int, - b4 int not null, - c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( - pk int not null primary key, - a5 int, - b5 int not null, - c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); - -# Perform one query which should be inserted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a1=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b1=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk desc; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a1=4 where b1=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Load all tables into cache -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The two queries below will not hit cache since transaction is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform insert -# Switch to other transaction and check that insert does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=5; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=5; -select * from t1 where pk=5; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start transaction and perform delete -# Switch to other transaction and check that delete does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start a transaction which updates all tables -# Switch to other transaction and check updates does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below five queries will not be cached, trans is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2, t3, t4, t5; - -# There should be no queries in cache, when tables have been dropped -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; - - diff --git a/mysql-test/t/ndb_cache_multi.test b/mysql-test/t/ndb_cache_multi.test deleted file mode 100644 index 404393c211e..00000000000 --- a/mysql-test/t/ndb_cache_multi.test +++ /dev/null @@ -1,72 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - - - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2; - - -# Turn off query cache on server1 -connection server1; -set GLOBAL query_cache_size=0; - -# Turn off query cache on server2 -connection server2; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/t/ndb_cache_multi2.test b/mysql-test/t/ndb_cache_multi2.test deleted file mode 100644 index 2afcf0c18f7..00000000000 --- a/mysql-test/t/ndb_cache_multi2.test +++ /dev/null @@ -1,126 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -echo == Connected to server1 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -echo == Connected to server2 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -echo == Connected to server1 ==; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -# Run the check query once to load it into qc on server1 -# See at the end of this test why we need to disable ps-protocol for -# this query (*) ---disable_ps_protocol -select a != 3 from t1; ---enable_ps_protocol -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -echo == Connected to server2 ==; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -echo == Connected to server1 ==; - -# Loop and wait for max 10 seconds until query cache thread -# has invalidated the cache and the column a in t1 is equal to 3 -let $retries=20; -while (`select a != 3 from t1`) -{ - dec $retries; - if (!$retries) - { - The query_cache thread failed to invalidate query_cache in 10 seconds; - } - sleep 0.5; -} - -# Select from t1 one last time for the result file -# Column a should be 3 -select * from t1; - -# There should now be three queries in the cache -show status like "Qcache_queries_in_cache"; - -drop table t1, t2; - -# Turn off and reset query cache on server1 and server2 -connection server1; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -connection server2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; - -# (*) Why we need to execute the query in non-ps mode. -# The principle of this test is: two mysqlds connected to one cluster, -# both using their query cache. Queries are cached in server1 -# ("select a!=3 from t1", "select * from t1"), -# table t1 is modified in server2, we want to see that this invalidates -# the query cache of server1. Invalidation with NDB works like this: -# when a query is found in the query cache, NDB is asked if the tables -# have changed. In this test, ha_ndbcluster calls NDB every millisecond -# to collect change information about tables. -# Due to this millisecond delay, there is need for a loop ("while...") -# in this test, which waits until a query1 ("select a!=3 from t1") is -# invalidated (which is equivalent to it returning -# up-to-date results), and then expects query2 ("select * from t1") -# to have been invalidated (see up-to-date results). -# But when enabling --ps-protocol in this test, the logic breaks, -# because query1 is still done via mysql_real_query() (see mysqltest.c: -# eval_expr() always uses mysql_real_query()). So, query1 returning -# up-to-date results is not a sign of it being invalidated in the cache, -# because it was NOT in the cache ("select a!=3 from t1" on line 39 -# was done with prep stmts, while `select a!=3 from t1` is not, -# thus the second does not see the first in the cache). Thus, we may run -# query2 when cache still has not been invalidated. -# The solution is to make the initial "select a!=3 from t1" run -# as a normal query, this repairs the broken logic. -# But note, "select * from t1" is still using prepared statements -# which was the goal of this test with --ps-protocol. diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test deleted file mode 100644 index 2d9f66564bc..00000000000 --- a/mysql-test/t/ndb_charset.test +++ /dev/null @@ -1,257 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB charset test. -# - -# pk - binary - -create table t1 ( - a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -# 3 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - case insensitive - -create table t1 ( - a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values('aaa'); ---error ER_DUP_ENTRY -insert into t1 values('AAA'); -# 1 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - varchar - -create table t1 ( - a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); --- error ER_DUP_ENTRY -insert into t1 values('b'); --- error ER_DUP_ENTRY -insert into t1 values('a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# unique hash index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -# 3 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values(2, 'aaa'); ---error ER_DUP_ENTRY -insert into t1 values(3, 'AAA'); -# 1 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); --- error ER_DUP_ENTRY -insert into t1 values(99,'b'); --- error ER_DUP_ENTRY -insert into t1 values(99,'a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# ordered index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 2 -select * from t1 where a = 'aAa' order by p; -# 2 -select * from t1 where a = 'aaa' order by p; -# 0 -select * from t1 where a = 'AaA' order by p; -# 2 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 6 -select * from t1 where a = 'aAa' order by p; -# 6 -select * from t1 where a = 'aaa' order by p; -# 6 -select * from t1 where a = 'AaA' order by p; -# 6 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - index(a, p) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -select * from t1 where a = 'a ' order by a desc, p desc; -select * from t1 where a >= 'D' order by a, p; -select * from t1 where a < 'D' order by a, p; -# -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -drop table t1; - -# minimal multi-byte test -# removed by jonas as this requires a configure --with-extra-charsets -#create table t1 ( -# a char(5) character set ucs2, -# b varchar(7) character set utf8, -# primary key(a, b) -#) engine=ndb; -# -#insert into t1 values -# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), -# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), -# ('a','C '),('B ','d'),('c','E '),('D','f'); -#-- error ER_DUP_ENTRY -#insert into t1 values('d','f'); -# -#select a,b,length(a),length(b) from t1 order by a,b limit 3; -#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3; -#select a,b,length(a),length(b) from t1 where a='c' and b='c'; -#drop table t1; - -# bug#14007 -create table t1 ( - a char(10) primary key -) engine=ndbcluster default charset=latin1; - -insert into t1 values ('aaabb'); -select * from t1; -replace into t1 set a = 'AAABB'; -select * from t1; -replace into t1 set a = 'aAaBb'; -select * from t1; -replace into t1 set a = 'aaabb'; -select * from t1; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_condition_pushdown.test b/mysql-test/t/ndb_condition_pushdown.test deleted file mode 100644 index ab56430ac1d..00000000000 --- a/mysql-test/t/ndb_condition_pushdown.test +++ /dev/null @@ -1,1756 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4; ---enable_warnings - -# -# Test of condition pushdown to storage engine -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', - '1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, - b'010','two','one,two', - '1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, - b'011','three','one,two,three', - '1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, - b'100','four','one,two,three,four', - '1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); - -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); - -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; - -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = off; - -# Test all types and compare operators -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Various tests -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -set engine_condition_pushdown = on; - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test index scan with filter -create index medium_index on t1(medium); - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE ---replace_column 9 # -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN ---replace_column 9 # -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN ---replace_column 9 # -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Update test -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -# Delete test -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -select count(*) from t1; - -# Various tests ---replace_column 9 # -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; - ---replace_column 9 # -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; - ---replace_column 9 # -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; - ---replace_column 9 # -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; - ---replace_column 9 # -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; - ---replace_column 9 # -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -# Some tests that are currently not supported and should not push condition ---replace_column 9 # -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; ---replace_column 9 # -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; ---replace_column 9 # -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; - -# bug#15722 -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set engine_condition_pushdown = off; -select * from t5 where b like '%jo%' order by a; -set engine_condition_pushdown = on; ---replace_column 9 # -explain select * from t5 where b like '%jo%'; -select * from t5 where b like '%jo%' order by a; - -# bug#21056 ndb pushdown equal/setValue error on datetime -set engine_condition_pushdown = off; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -set engine_condition_pushdown = on; ---replace_column 9 # -explain select auto from t1 where date_time like '1902-02-02 %'; -select auto from t1 where date_time like '1902-02-02 %' order by auto; ---replace_column 9 # -explain select auto from t1 where date_time not like '1902-02-02 %'; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; - -# bug#17421 -1 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# in TUP the constants 'ab' 'abc' were expected in varchar format -# "like" returned error which became "false" -# scan filter negates "or" which exposes the bug -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#17421 -2 -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# test that incorrect MySQL behaviour is preserved -# 'ab ' LIKE 'ab' is true in MySQL -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86) -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); - -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# make sure optimizer does not do some crazy shortcut -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); - -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -set engine_condition_pushdown = @old_ecpd; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/t/ndb_config.test b/mysql-test/t/ndb_config.test deleted file mode 100644 index f63c0087c1e..00000000000 --- a/mysql-test/t/ndb_config.test +++ /dev/null @@ -1,23 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null - -# End of 4.1 tests - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null - - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null diff --git a/mysql-test/t/ndb_config2.test b/mysql-test/t/ndb_config2.test deleted file mode 100644 index 170f1b2e5e7..00000000000 --- a/mysql-test/t/ndb_config2.test +++ /dev/null @@ -1,7 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# Following doesn't work in all configurations (if shm is not defined) - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/t/ndb_cursor.test b/mysql-test/t/ndb_cursor.test deleted file mode 100644 index 406f8629cfe..00000000000 --- a/mysql-test/t/ndb_cursor.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop table if exists t2; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; - -create table t2 ( - a int not null primary key, - b int not null -) engine=ndb; - -insert into t1 values (1,10), (2,20), (3,30), (4, 40); - -delimiter //; -create procedure test_cursor () -begin - declare done int default 0; - declare temp_a int; - declare temp_b int; - declare cur1 cursor for select a,b from t1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - repeat - fetch cur1 into temp_a, temp_b; - if not done then - insert into t2 values (temp_a, temp_b); - end if; - until done end repeat; - close cur1; -end; -// -delimiter ;// - -select * from t2 order by a; -call test_cursor(); -select * from t2 order by a; -drop procedure test_cursor; -drop table t1,t2; - ---echo end of 5.1 tests diff --git a/mysql-test/t/ndb_database.test b/mysql-test/t/ndb_database.test deleted file mode 100644 index 8bfdf40de88..00000000000 --- a/mysql-test/t/ndb_database.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -# -# Check that all tables in a database are dropped when database is dropped -# - -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; - -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; - -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_dd_alter.test b/mysql-test/t/ndb_dd_alter.test deleted file mode 100644 index 7635a8944da..00000000000 --- a/mysql-test/t/ndb_dd_alter.test +++ /dev/null @@ -1,274 +0,0 @@ -############################################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and disk tables together. -############################################################## - -############################################################## -# Author: Nikolay -# Date: 2006-05-12 -# Purpose: To test using ndb memory and disk tables together. -# -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -# ALTER Tests (Meta data testing): -# ALTER from InnoDB to Cluster Disk Data -# ALTER from MyISAM to Cluster Disk Data -# ALTER from Cluster Disk Data to InnoDB -# ALTER from Cluster Disk Data to MyISAM -# ALTER DD Tables and add columns -# ALTER DD Tables and add Indexes -# ALTER DD Tables and drop columns -# -############################################################## -# Author: Jonathan -# Date 2006-08-28 -# Purpose: To take out some of the test that are already -# Covered by other tests. Per Jonas -# The new purpose of this test is testing "Alter" -# Statements. Therefore the name is changed to -# ndb_dd_alter.test -# Removed tests include: -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -############################################################## - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** -################## ALTER Tests (Meta data testing) #################### - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts - ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 12M - ENGINE NDB; - -#### Try to ALTER from InnoDB to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=InnoDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; -DROP TABLE test.t1; - -#### Try to ALTER from MyISAM to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=MyISAM; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; - -#### Try to ALTER from Cluster Disk Data to InnoDB - -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER from Cluster Disk Data to MyISAM - -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -DROP TABLE test.t1; - -#### Try to ALTER DD Tables and add columns - -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1); - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1', - a8 = '07:04:00' where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -disable_query_log; -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -enable_query_log; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg', - a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field', - a14 = @d2 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; - -#### Try to ALTER DD Tables and add Indexes - -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -ALTER TABLE test.t1 DROP INDEX a2_i; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -TRUNCATE TABLE test.t1; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER DD Tables and drop columns - - -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -DROP TABLE test.t1; - - ALTER TABLESPACE ts - DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; - DROP TABLESPACE ts ENGINE NDB; - DROP LOGFILE GROUP lg ENGINE=NDB; - -####################### End section 4 ######################### -#End 5.1 test case - diff --git a/mysql-test/t/ndb_dd_backuprestore.test b/mysql-test/t/ndb_dd_backuprestore.test deleted file mode 100644 index 48db8ec3e0b..00000000000 --- a/mysql-test/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,349 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test deleted file mode 100644 index 3acf4669868..00000000000 --- a/mysql-test/t/ndb_dd_basic.test +++ /dev/null @@ -1,454 +0,0 @@ -################################# -# Author: JO -# Org Date: ? -# Purpose: To test basic Cluster Disk Data -################################# -# Change Author: JBM -# Change Date: 2006-01-11 -# Change: Cleanup and test rename -################################# -# Change Author: Guangbao Ni -# Change Date: 2007-03-20 -# Change: Test insert data when no datafile in spacetable -################################# - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# some negative tests -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; - -################################## -# Basic test of disk tables for NDB -# Start by creating a logfile group -################################## - -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -SHOW CREATE TABLE t1; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -#################################### -# Test error cases with size numbers -#################################### ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; - ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; - ---error ER_SIZE_OVERFLOW_ERROR -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; - -DROP TABLE t1; - -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; - -CREATE TABLE City ( - ID int(11) NOT NULL AUTO_INCREMENT, - Name char(35) NOT NULL, - CountryCode char(3) NOT NULL, - District char(20) NOT NULL, - Population int(11) NOT NULL, - PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; - -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; - -#It will give error messages: NoDatafile in tablespace ---error ER_GET_ERRMSG -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts2 -engine ndb; - -drop table City; - -drop tablespace ts2 -engine ndb; - -############################ -# Test update of mm/dd part -############################ - -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -##### - -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -######################## -# Test for blobs... -######################## - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -# b1 length 2000+256 (blob part aligned) -######################################### -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# b2 length 20000 -########################################## -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); - -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -DROP TABLE t1; - -# bug#20612 INS-DEL bug (not pgman bug) -# found via disk data assert but is not pgman or disk data related - -CREATE TABLE t1 ( - a int NOT NULL, - b varchar(4000), -- must use 2 pages undo - PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; - -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -rollback; - -set autocommit = 1; - - -drop table t1; -############################# -# Customer posted order by test case -# Org in ndb_dd_advance.test -############################# - -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -select f1,f2 from test.t1 order by f2; -select f2 from test.t1 order by f2; -select f1,f2 from test.t1 order by f1; -drop table test.t1; - -################### -# Test Cleanup -################### - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -#End 5.1 test case diff --git a/mysql-test/t/ndb_dd_ddl.test b/mysql-test/t/ndb_dd_ddl.test deleted file mode 100644 index aa692385b07..00000000000 --- a/mysql-test/t/ndb_dd_ddl.test +++ /dev/null @@ -1,363 +0,0 @@ -######################################### -# Author: JBM -# Date: 2006-01-03 -# Purpose: Test the NDB engine reaction to duplicate -# Table spaces and log groups. Also to test -# Statement mixed case. -############################################ -# Change Author:JBM -# Change Date 2006-01-19 -# Change: Adding to test cases feedback from OB -# 1) The 'duplicate' tests. -# a) The test is using the default (test) database and is not -# attempting to create databases (only logs, table spaces and -# tables). Is this intentional? -# b) What about a duplication of table name when one exists on disk and -# you are trying to create it again in memory? -# -#2) 'CaSE SensiTiVE' tests -# a) Suggest you include a test case where the case difference is in -# the file name. I know this is not an issue for *nix systems but -# will be when we expand to Windows and Mac. Better put it in now. -############################################ -# -# Jonas 2006-03-10 -# Add verification that ndb currently is limited to 1 logfile group -# - - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; ---enable_warnings - -############## Duplcate Statement Testing ######### - ---echo **** Begin Duplicate Statement Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -# Verify that one currently can create only 1 logfile group ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -SHOW WARNINGS; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; - - -DROP TABLE mysqltest.t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -DROP DATABASE IF EXISTS mysqltest; - ---echo **** End Duplicate Statement Testing **** -############# End Duplicate Statments ############ ---echo -############ Begin CaSe Testing ################## ---echo **** Begin Statment CaSe Testing **** - -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; - -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; - -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; - -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; - -DROP TABLE t1; - -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; - -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; - -DrOp TaBleSpAcE ts1 -engINE=ndB; - -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; - ---echo **** End Statment CaSe Testing **** -############ End CaSe Testing ################## ---echo -############ Begin = and no = Testing ########## ---echo **** Begin = And No = Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---echo ---echo **** End of = **** ---echo - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; - ---error 1005 -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; - - -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); - -DROP TABLE t1; - -# bug#20053 - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -# bug#20053 - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; - -DROP TABLESPACE ts1 -ENGINE NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - -DROP TABLESPACE ts2 -ENGINE NDB; - -DROP LOGFILE GROUP lg1 -ENGINE NDB; - ---echo **** End = And No = **** -############ End = And No = ################## - -### -# -# bug#16341 -create table t1 (a int primary key) engine = myisam; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; - -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb; - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts1 -engine ndb; - -drop logfile group lg1 -engine ndb; - -drop table t1; - - - -# End 5.1 test diff --git a/mysql-test/t/ndb_dd_disk2memory.test b/mysql-test/t/ndb_dd_disk2memory.test deleted file mode 100644 index 5975f44e087..00000000000 --- a/mysql-test/t/ndb_dd_disk2memory.test +++ /dev/null @@ -1,292 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and -# disk tables together. -######################################## - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - ---echo -##################### Data load for first test #################### ---echo **** Data load for first test **** - -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - - -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - ---echo -##################### Test 1 Section Begins ############### ---echo *** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; ---echo -####################### Test 1 Section End ################ - -##################### Setup for test 2 #################### ---echo *** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); ---echo -############################# Test Section 2 ############### ---echo **** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -SHOW CREATE TABLE test.t2; -SHOW CREATE TABLE test.t1; -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; ---echo -######################### End Test Section 2 ################# -DROP TABLE test.t1; -DROP TABLE test.t2; -##################### Setup for Test Section 3 ############### ---echo *** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( - usr_id INT unsigned NOT NULL, - uniq_id INT unsigned NOT NULL AUTO_INCREMENT, - start_num INT unsigned NOT NULL DEFAULT 1, - increment INT unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (uniq_id), - INDEX usr_uniq_idx (usr_id, uniq_id), - INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - - -CREATE TABLE test.t2 ( - id INT unsigned NOT NULL DEFAULT 0, - usr2_id INT unsigned NOT NULL DEFAULT 0, - max INT unsigned NOT NULL DEFAULT 0, - c_amount INT unsigned NOT NULL DEFAULT 0, - d_max INT unsigned NOT NULL DEFAULT 0, - d_num INT unsigned NOT NULL DEFAULT 0, - orig_time INT unsigned NOT NULL DEFAULT 0, - c_time INT unsigned NOT NULL DEFAULT 0, - active ENUM ("no","yes") NOT NULL, - PRIMARY KEY (id,usr2_id), - INDEX id_idx (id), - INDEX usr2_idx (usr2_id)) -ENGINE=NDB; - -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - ---echo -###################### Test Section 3 ###################### ---echo **** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; - -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); - -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; ---echo -####################### End Section 3 ######################### -DROP TABLE test.t1; -DROP TABLE test.t2; - -########## Test that use to be in ndb_dd_advance.test ######### -########## ndb_dd_advance.test is now ndb_dd_alter.test ####### -#### Use group by asc and dec; Use having; Use order by. #### - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t2 ( - b1 smallint NOT NULL, - b2 int NOT NULL, - b3 bigint NOT NULL, - b4 char(10), - b5 decimal(5,1), - b6 time, - b7 date, - b8 datetime, - b9 VARCHAR(255), - b10 blob, - PRIMARY KEY(b1) -) ENGINE=NDB; - -### ADD Some DATA to tables ###### - - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} - -ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8); -ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8); -SHOW CREATE TABLE test.t1; -SHOW CREATE TABLE test.t2; -SELECT * FROM test.t1 order by a1; -SELECT * FROM test.t2 order by b1; -SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1; -SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2; - -DROP TABLE test.t1; -DROP TABLE test.t2; - -CREATE TABLE test.t1 (a INT NOT NULL, -b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE -table_space1 STORAGE DISK ENGINE=NDB; - -insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2), -(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6), -(7,'g','Serge',7),(8,'h','Clavin',8); -select distinct a from test.t1 group by b,a having a > 4 order by a desc; -select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc; -select distinct a from test.t1 group by b,a having a > 1 order by a asc; -select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc; -drop table test.t1; - -create table test.t1 (a char(1), key(a)) TABLESPACE table_space1 -STORAGE DISK ENGINE=NDB; -insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3'); -select * from test.t1 where a >= '1' order by a; -select distinct a from test.t1 order by a desc; -select distinct a from test.t1 where a >= '1' order by a desc; -select distinct a from test.t1 where a >= '1' order by a asc; -drop table test.t1; - -CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME) -TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB; - -INSERT INTO test.t1 (email, infoID, dateentered) VALUES - ('test1@testdomain.com', 1, '2002-07-30 22:56:38'), - ('test1@testdomain.com', 1, '2002-07-27 22:58:16'), - ('test2@testdomain.com', 1, '2002-06-19 15:22:19'), - ('test2@testdomain.com', 2, '2002-06-18 14:23:47'), - ('test3@testdomain.com', 1, '2002-05-19 22:17:32'); - -INSERT INTO test.t2(infoID, shipcode) VALUES - (1, 'Z001'), - (2, 'R002'); - -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE t1.infoID=t2.infoID order by email, shipcode; -SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC; -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC; - -DROP TABLE test.t1,test.t2; - -################# -# Test Cleanup -################# - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - -#End 5.1 test case - diff --git a/mysql-test/t/ndb_dd_dump.test b/mysql-test/t/ndb_dd_dump.test deleted file mode 100644 index 38ceafb7d80..00000000000 --- a/mysql-test/t/ndb_dd_dump.test +++ /dev/null @@ -1,288 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; - -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); - -INSERT INTO t3 VALUES -(1,1,1); - ---exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - ---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -SELECT DISTINCT - LOGFILE_GROUP_NAME, - FILE_NAME, - TOTAL_EXTENTS, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; - -SELECT DISTINCT - TABLESPACE_NAME, - LOGFILE_GROUP_NAME, - FILE_NAME, - EXTENT_SIZE, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; - -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -SELECT COUNT(*) FROM t3; - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -#### BUG 18856 test case comented out -##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file. - -#CREATE TABLE test.t ( -# a smallint NOT NULL, -# b int NOT NULL, -# c bigint NOT NULL, -# d char(10), -# e TEXT, -# f VARCHAR(255), -# PRIMARY KEY(a) -#) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - -# ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); -# SHOW CREATE TABLE test.t; - -# insert records into tables - -# let $1=100; -# disable_query_log; -# while ($1) -# { -# eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1"); -# dec $1; -# } -# enable_query_log; - -# SELECT * FROM test.t order by a; - -# SELECT * INTO OUTFILE 't_backup' FROM test.t; -# TRUNCATE test.t; - -#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting #transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB; - -# SELECT count(*) FROM test.t; -# LOAD DATA INFILE 't_backup' INTO TABLE test.t; - -# SELECT * FROM test.t order by a; - -# DROP TABLE test.t; - - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - -#End 5.1 test case diff --git a/mysql-test/t/ndb_dd_sql_features.test b/mysql-test/t/ndb_dd_sql_features.test deleted file mode 100644 index f46cb217ab4..00000000000 --- a/mysql-test/t/ndb_dd_sql_features.test +++ /dev/null @@ -1,551 +0,0 @@ -############################################################## -# Author: Nikolay -# Date: 2006-04-01 -# Purpose: Specific Blob and Varchar testing using disk tables. -############################################################## -# Create Stored procedures that use disk based tables. -# Create function that operate on disk based tables. -# Create triggers that operate on disk based tables. -# Create views that operate on disk based tables. -# Try to create FK constraints on disk based tables. -# Create and use disk based table that use auto inc. -# Create test that use transaction (commit, rollback) -# Create large disk base table, do random queries, check cache hits, -# do same query 10 times check cache hits. -# Create test that uses COUNT(), SUM(), MAX(), MIN(), -# NOW(), USER(), ... other built in # SQL functions -# Create test that uses locks. -# Create test using truncate. -############################################################## -# Author: Jonathan -# Date: 2006-08-28 -# Change: Remove all the create and drop LFG and TS except -# The first create and the last drop to make test -# run faster. -# In addition, renamed test to be to a name that -# gives a better idea of what the test is about -########################################################### --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -#### Copy data from table in one table space to table in ### -#### different table space. #### ---echo ***** ---echo **** Copy data from table in one table space to table ---echo **** in different table space ---echo ***** - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts1 - ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 25M - ENGINE NDB; - - CREATE TABLESPACE ts2 - ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 20M - ENGINE NDB; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); - INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT * FROM test.t2 ORDER BY a1; - - DROP TABLE test.t1, test.t2; - - # populate BLOB field with large data - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,@vc1,@d1); - INSERT INTO test.t1 VALUES (2,@vc2,@b1); - INSERT INTO test.t1 VALUES (3,@vc3,@d2); - INSERT INTO test.t1 VALUES (4,@vc4,@b2); - - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t1 where a1=2; - - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t2 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t2 where a1=2; - - - DROP TABLE test.t1, test.t2; - -#### Insert, Update, Delete from NDB table with BLOB fields #### ---echo ***** ---echo **** Insert, Update, Delete from NDB table with BLOB fields ---echo ***** - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); - -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); - -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB) -# TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES (1,@vc1,@bb1); - INSERT INTO test.t1 VALUES (2,@vc2,@bb2); - INSERT INTO test.t1 VALUES (3,@vc3,@bb3); - INSERT INTO test.t1 VALUES (4,@vc4,@bb4); - INSERT INTO test.t1 VALUES (5,@vc5,@bb5); - - UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; - SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) - FROM test.t1 WHERE a1=1; - - UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; - SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) - FROM test.t1 WHERE a1=2; - - UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; - SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) - FROM test.t1 WHERE a1=3; - - UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; - SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) - FROM test.t1 WHERE a1=4; - - UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; - SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) - FROM test.t1 WHERE a1=5; - - DELETE FROM test.t1 where a1=5; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=4; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=3; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=2; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=1; - SELECT count(*) from test.t1; - - DROP TABLE test.t1; - -##### Create Stored procedures that use disk based tables ##### ---echo ***** ---echo **** Create Stored procedures that use disk based tables ---echo ***** - -delimiter //; - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB// - CREATE PROCEDURE test.sp1() - BEGIN - INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); - END// -delimiter ;// - - CALL test.sp1(); - SELECT * FROM test.t1; - -delimiter //; - CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) - BEGIN - UPDATE test.t1 SET a2=vc, a3=blb where a1=n; - END// -delimiter ;// - - CALL test.sp2(1,'222222','bbbbbbbb'); - SELECT * FROM test.t1; - - DELETE FROM test.t1; - DROP PROCEDURE test.sp1; - DROP PROCEDURE test.sp2; - DROP TABLE test.t1; - - -#### Create function that operate on disk based tables #### ---echo ***** ---echo ***** Create function that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - - delimiter //; - CREATE FUNCTION test.fn1(n INT) RETURNS INT - BEGIN - DECLARE v INT; - SELECT a1 INTO v FROM test.t1 WHERE a1=n; - RETURN v; - END// - delimiter ;// - -delimiter //; - CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB - BEGIN - DECLARE vv BLOB; - UPDATE test.t1 SET a3=blb where a1=n; - SELECT a3 INTO vv FROM test.t1 WHERE a1=n; - RETURN vv; - END// - delimiter ;// - - SELECT test.fn1(10) FROM DUAL; - SELECT test.fn2(50, 'new BLOB content') FROM DUAL; - - DELETE FROM test.t1; - DROP FUNCTION test.fn1; - DROP FUNCTION test.fn2; - DROP TABLE test.t1; - -#### Create triggers that operate on disk based tables #### ---echo ***** ---echo ***** Create triggers that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - delimiter //; - CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW - BEGIN - if isnull(new.a2) then - set new.a2:= 'trg1 works on a2 field'; - end if; - if isnull(new.a3) then - set new.a3:= 'trg1 works on a3 field'; - end if; - end// - insert into test.t1 (a1) values (1)// - insert into test.t1 (a1,a2) values (2, 'ccccccc')// - select * from test.t1 order by a1// - delimiter ;// - - DELETE FROM test.t1; - DROP TRIGGER test.trg1; - DROP TABLE test.t1; - -#### Create, update views that operate on disk based tables #### ---echo ***** ---echo ***** Create, update views that operate on disk based tables ---echo ***** - - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - CREATE VIEW test.v1 AS SELECT * FROM test.t1; - SELECT * FROM test.v1 order by a1; - CHECK TABLE test.v1, test.t1; - - UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; - SELECT * FROM test.v1 order by a1; - - DROP VIEW test.v1; - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create and use disk based table that use auto inc #### ---echo ***** ---echo ***** Create and use disk based table that use auto inc ---echo ***** - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - -#### Create test that use transaction (commit, rollback) #### ---echo ***** ---echo ***** Create test that use transaction (commit, rollback) ---echo ***** - - SET AUTOCOMMIT=0; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - SET AUTOCOMMIT=1; - -# Now do the same thing with START TRANSACTION without using AUTOCOMMIT. - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses locks #### ---echo ***** ---echo ***** Create test that uses locks ---echo ***** - - connect (con1,localhost,root,,); - connect (con2,localhost,root,,); - -# connection con1; ---disable_warnings - drop table if exists test.t1; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; ---enable_warnings - - LOCK TABLES test.t1 write; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - SELECT * FROM test.t1 ORDER BY a1; - - connection con2; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - - connection con1; - UNLOCK TABLES; - - connection con2; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - #connection defualt; - -#### Create large disk base table, do random queries, check cache hits #### ---echo ***** ---echo ***** Create large disk base table, do random queries, check cache hits ---echo ***** - -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 values(1,@vc1,@d1); - INSERT INTO test.t1 values(2,@vc2,@d2); - --replace_column 9 # - explain SELECT * from test.t1 WHERE a1 = 1; - - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1 ORDER BY a1; - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=2 ORDER BY a1; - - UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; - UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; - - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=1; - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 where a1=2; - - #SHOW VARIABLES LIKE 'have_query_cache'; - #SHOW STATUS LIKE 'Qcache%'; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses COUNT(), SUM(), MAX(), #### -##### MIN(), NOW(), USER(), TRUNCATE #### ---echo ***** ---echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), ---echo ***** USER(), TRUNCATE ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), - a3 BLOB, a4 DATE, a5 CHAR(250)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1", - "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER()); - dec $1; - } - enable_query_log; - - SELECT COUNT(*) from test.t1; - SELECT SUM(a1) from test.t1; - SELECT MIN(a1) from test.t1; - SELECT MAX(a1) from test.t1; - SELECT a5 from test.t1 where a1=50; - - - SELECT * from test.t1 order by a1; - - DROP TABLE test.t1; - - ALTER TABLESPACE ts1 - DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts1 ENGINE=NDB; - - ALTER TABLESPACE ts2 - DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts2 ENGINE=NDB; - - DROP LOGFILE GROUP lg - ENGINE=NDB; - - -#End 5.1 test case - diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test deleted file mode 100644 index e14f462c32d..00000000000 --- a/mysql-test/t/ndb_gis.test +++ /dev/null @@ -1,5 +0,0 @@ ---source include/have_ndb.inc -SET storage_engine=ndbcluster; ---source include/gis_generic.inc -set engine_condition_pushdown = on; ---source include/gis_generic.inc diff --git a/mysql-test/t/ndb_grant.later b/mysql-test/t/ndb_grant.later deleted file mode 100644 index 5431d94e1f8..00000000000 --- a/mysql-test/t/ndb_grant.later +++ /dev/null @@ -1,385 +0,0 @@ --- source include/have_ndb.inc -# Test of GRANT commands - -# Cleanup ---disable_warnings -drop table if exists t1; ---enable_warnings - -SET NAMES binary; - -# -# Alter mysql system tables to ndb -# make sure you alter all back in the end -# -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; - -# -# Test that SSL options works properly -# -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -show grants for mysqltest_1@localhost; -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -flush privileges; - -# -# Test that the new db privileges are stored/retrieved correctly -# - -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; ---error 1141 -show grants for mysqltest_1@localhost; - -# -# Test what happens when you have same table and colum level grants -# - -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; - -# -# Test some error conditions -# -begin; ---error 1221 -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -commit; -select 1; -- To test that the previous command didn't cause problems - -# -# Bug#6123: GRANT USAGE inserts useless Db row -# -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -delete from mysql.user where user='test6123'; -drop database mysqltest1; - -# -# Test for 'drop user', 'revoke privileges, grant' -# - -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; - -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; - -# -# Bug3086 -# -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -set sql_mode=default; - -set sql_quote_show_create=0; -show grants for drop_user@localhost; -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -set sql_quote_show_create=1; -show grants for drop_user@localhost; -set sql_mode=""; -show grants for drop_user@localhost; - -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -drop user drop_user@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user@localhost; -commit; - -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -# Drop user now implicitly revokes all privileges. -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -commit; -flush privileges; -#--error 1268 -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -drop user mysqltest_1@localhost; - -# -# Bug #3403 Wrong encodin in SHOW GRANTS output -# -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); - -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -DROP DATABASE ÂÄ; -SET NAMES latin1; - -# -# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything -# -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; - -# -# just SHOW PRIVILEGES test -# -SHOW PRIVILEGES; - -# -# Alter mysql system tables back to myisam -# -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_index.test b/mysql-test/t/ndb_index.test deleted file mode 100644 index 272f30e3e6f..00000000000 --- a/mysql-test/t/ndb_index.test +++ /dev/null @@ -1,131 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -CREATE TABLE t1 ( - PORT varchar(16) NOT NULL, - ACCESSNODE varchar(16) NOT NULL, - POP varchar(48) NOT NULL, - ACCESSTYPE int unsigned NOT NULL, - CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, - PROVIDER varchar(16), - TEXPIRE int unsigned, - NUM_IP int unsigned, - LEASED_NUM_IP int unsigned, - LOCKED_IP int unsigned, - STATIC_DNS int unsigned, - SUSPENDED_SERVICE int unsigned, - SUSPENDED_REASON int unsigned, - BGP_COMMUNITY int unsigned, - INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), - INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), - PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; - -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); - - -# Test select using port -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -select port, accessnode, pop, accesstype from t1 where port='foo'; - -# Test select using accessnode -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; - -# Test select using pop -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -# The following two querys will not return any rows since -# the index used for access is case sensitive -# They are thus disabled for now -#select port, accessnode, pop, accesstype from t1 where pop='POP98'; -#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='foo'; - -# Test select using accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; - -# Test select using customer_id -# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive! -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; - -# Test select using provider -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -select port, accessnode, pop, accesstype from t1 where provider='foo'; - -# Test select using texpire -select port, accessnode from t1 where texpire=121212; -select port, accessnode from t1 where texpire=2323; - -# Test select using num_ip -select port, accessnode, pop, accesstype from t1 where num_ip=1; -select port, accessnode, pop, accesstype from t1 where num_ip=89; - -# Test select using leased_num_ip -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; - -# Test select using locked_ip -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -select port, accessnode, pop, accesstype from t1 where locked_ip=89; - -# Test select using static_dns -select port, accessnode, pop, accesstype from t1 where static_dns=8; -select port, accessnode, pop, accesstype from t1 where static_dns=89; - -# Test select using suspended_service -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -select port, accessnode, pop, accesstype from t1 where suspended_service=89; - -# Test select using suspended_reason -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; - -# Test select using bgp_community -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -select port, accessnode, pop, accesstype from t1 where bgp_community=0; - -# Test select using full primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; - -# Test select using partial primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; - -# Test select using CUSTOMER_ID_INDEX -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; - -# Test select using FQPN_INDEX -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test deleted file mode 100644 index 782f17ca5b2..00000000000 --- a/mysql-test/t/ndb_index_ordered.test +++ /dev/null @@ -1,480 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, test1, test2; ---enable_warnings - -# -# Simple test to show use of ordered indexes -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b >= 4 order by b; -select * from t1 where b = 4 order by b; -select * from t1 where b > 4 order by b; -select * from t1 where b < 4 order by b; -select * from t1 where b <= 4 order by b; - -# Test of reset_bounds -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -select a, b, c from t1 where a!=2 and c=6; -select a, b, c from t1 where a!=2 order by a; - -# -# Here we should add some "explain select" to verify that the ordered index is -# used for these queries. -# - -# -# Update using ordered index scan -# - -update t1 set c = 3 where b = 3; -select * from t1 order by a; -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -update t1 set c = 11 where b < 5; -select * from t1 order by a; -update t1 set c = 12 where b > 0; -select * from t1 order by a; -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -# Update primary key -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; - -# -# Delete using ordered index scan -# - -drop table t1; - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); - -delete from t1 where b = 3; -select * from t1 order by a; -delete from t1 where b >= 6; -select * from t1 order by a; -delete from t1 where b < 4; -select * from t1 order by a; -delete from t1 where b > 5; -select * from t1 order by a; -delete from t1 where b <= 4; -select * from t1 order by a; - -drop table t1; - - -# -#multi part key -# -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null -) engine = ndb; - -create index a1 on t1 (b, c); - -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); - - - -select * from t1 order by a; -select * from t1 where b<=5 order by a; -select * from t1 where b<=5 and c=0; -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -select * from t1 where b=4 and c<=5 order by a; -select * from t1 where b<=4 and c<=5 order by a; -select * from t1 where b<=5 and c=0 or b<=5 and c=2; - -select count(*) from t1 where b = 0; -select count(*) from t1 where b = 1; -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - KEY bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; -drop table t1; - -# -# Order by again, including descending. -# - -create table t1 ( - a int unsigned primary key, - b int unsigned, - c char(10), - key bc (b, c) -) engine=ndb; - -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -# -select b, c from t1 where b <= 10 and c <'f' order by b, c; -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -# -select b, c from t1 where b=4000 and c<'k' order by b, c; -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -# -select min(b), max(b) from t1; -# -drop table t1; - -# -# Bug #6435 -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); - -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -select * from test2 order by 1; -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -drop table test1; -drop table test2; - -# bug#7424 + bug#7725 - -create table t1 ( - pk int primary key, - dt datetime not null, - da date not null, - ye year not null, - ti time not null, - ts timestamp not null, - index(dt), - index(da), - index(ye), - index(ti), - index(ts) -) engine=ndb; - -insert into t1 (pk,dt,da,ye,ti,ts) values - (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), - (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), - (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), - (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), - (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), - (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), - (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), - (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), - (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); - -# datetime -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; - -# date -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; - -# year -select count(*)-9 from t1 use index (ye) where ye > '1900'; -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -select count(*)-5 from t1 use index (ye) where ye > '1955'; -select count(*)-5 from t1 use index (ye) where ye < '1970'; -select count(*)-6 from t1 use index (ye) where ye < '2001'; -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -select count(*)-9 from t1 use index (ye) where ye <= '2055'; - -# time -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; - -# timestamp -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; - -drop table t1; - -# decimal (not the new 5.0 thing) - -create table t1 ( - a int primary key, - s decimal(12), - t decimal(12, 5), - u decimal(12) unsigned, - v decimal(12, 5) unsigned, - key (s), - key (t), - key (u), - key (v) -) engine=ndb; -# -insert into t1 values - ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), - ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), - ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), - ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), - ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), - ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), - ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), - ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), - ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), - ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -# -select count(*)- 5 from t1 use index (s) where s < -000000000007; -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -select count(*)- 2 from t1 use index (s) where s = -000000000007; -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -select count(*)- 3 from t1 use index (s) where s > -000000000007; -# -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -# -select count(*)- 2 from t1 use index (u) where u < 000000000061; -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -select count(*)- 2 from t1 use index (u) where u = 000000000061; -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -select count(*)- 6 from t1 use index (u) where u > 000000000061; -# -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; - -drop table t1; - -# bug#7798 -create table t1(a int primary key, b int not null, index(b)); -insert into t1 values (1,1), (2,2); -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -set autocommit=0; -begin; -select count(*) from t1; -connection con2; -ALTER TABLE t1 ADD COLUMN c int; -connection con1; -select a from t1 where b = 2; -show tables; -drop table t1; - -# mysqld 5.0.13 crash, no bug# -create table t1 (a int, c varchar(10), - primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -drop table t1; - -# -- index statistics -- - -set autocommit=1; -show session variables like 'ndb_index_stat_%'; - -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; - -# End of 4.1 tests - -# bug#24039 - -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -begin; -delete from t1 where a > 1; -rollback; - -begin; -select * from t1 order by a; -delete from t1 where a > 2; -select * from t1 order by a; -delete from t1 where a > 1; -select * from t1 order by a; -delete from t1 where a > 0; -select * from t1 order by a; -rollback; -select * from t1 order by a; -delete from t1; -drop table t1; - -# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index - ---error ER_CANT_CREATE_TABLE -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID), - INDEX i USING HASH (countrycode,calories) - ) ENGINE=ndbcluster; - -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID) - ) ENGINE=ndbcluster; - ---error ER_UNSUPPORTED_EXTENSION -create index i on nationaldish(countrycode,calories) using hash; - -drop table nationaldish; diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test deleted file mode 100644 index 78757c3bcf7..00000000000 --- a/mysql-test/t/ndb_index_unique.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; ---enable_warnings - -# -# Simple test to show use of UNIQUE indexes -# - -CREATE TABLE t1 ( - a int NOT NULL PRIMARY KEY, - b int not null, - c int, - UNIQUE ib(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b = 4 order by b; -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t1 values(8, 2, 3); -select * from t1 order by a; -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; - -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -# Bug# #18129 ---error 1169 -create unique index ib on t1(b); - -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; --- error ER_DUP_ENTRY -insert into t1 values(5,1,1); -drop table t1; - - -# -# Show use of UNIQUE USING HASH indexes -# - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -select * from t2 where b = 4; -select * from t2 where c = 6; -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t2 values(8, 2, 3); -select * from t2 order by a; -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; - -# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld -create unique index bi using hash on t2(b); --- error ER_DUP_ENTRY -insert into t2 values(9, 3, 1); -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; - -drop table t2; - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - - -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); - -select * from t2 where c IS NULL order by a; -select * from t2 where b = 3 AND c IS NULL order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = true; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -set engine_condition_pushdown = @old_ecpd; - -drop table t2; - -# -# Show use of PRIMARY KEY USING HASH indexes -# - -CREATE TABLE t3 ( - a int unsigned NOT NULL, - b int unsigned not null, - c int unsigned, - PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; - -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -select * from t3 where b = 4; -select * from t3 where c = 6; -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; - -drop table t3; - -# -# Indexes on NULL-able columns -# - -CREATE TABLE t1 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - UNIQUE KEY (a) -) engine=ndbcluster; - -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); - -select * from t1 order by pk; - ---error ER_DUP_ENTRY -insert into t1 values (5,0); -select * from t1 order by pk; -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; - -CREATE TABLE t2 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - b tinyint NOT NULL, - c VARCHAR(10), - UNIQUE KEY si(a, c) -) engine=ndbcluster; - -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); - -select * from t2 order by pk; - ---error ER_DUP_ENTRY -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; - -drop table t1, t2; - -# -# More complex tables -# - -CREATE TABLE t1 ( - cid smallint(5) unsigned NOT NULL default '0', - cv varchar(250) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( - cid bigint(20) unsigned NOT NULL auto_increment, - cap varchar(255) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( - gid bigint(20) unsigned NOT NULL auto_increment, - gn varchar(255) NOT NULL default '', - must tinyint(4) default NULL, - PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( - rid bigint(20) unsigned NOT NULL auto_increment, - rl varchar(255) NOT NULL default '', - PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( - uid bigint(20) unsigned NOT NULL auto_increment, - un varchar(250) NOT NULL default '', - uc smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (uid), - UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( - mid bigint(20) unsigned NOT NULL PRIMARY KEY, - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); - -select * from t1 where cv = 'dummy'; -select * from t1 where cv = 'test'; -select * from t2 where cap = 'another dummy'; -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by cid; -select * from t4 where rid = 2 order by cid; -select * from t6 where un='test' and uc=8; -select * from t6 where un='test' and uc=7; -select * from t6 where un='test'; -select * from t7 where mid = 8; -select * from t7 where uid = 8; -select * from t7 where uid = 1 order by mid; -select * from t7 where uid = 4 order by mid; -select * from t7 where gid = 4; -select * from t7 where gid = 1 order by mid; -select * from t7 where cid = 4; -select * from t7 where cid = 8; - -# -# insert more records into t4 -# -let $1=100; -disable_query_log; -while ($1) -{ - eval insert into t4 values(1, $1, 5, 12); - eval insert into t4 values($1, 3, 9, 11); - dec $1; -} -enable_query_log; - -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where rid = 2 order by cid; - - -drop table t1,t2,t3,t4,t5,t6,t7; - -# test null in indexes -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) ) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -select * from t1 where b is null and c is null; -select * from t1 where b is null and c = 2; -select * from t1 where b = 4 and c is null; -create table t8 as -select * from t1 where (b = 1 and c = 1) - or (b is null and c is null) - or (b is null and c = 2) - or (b = 4 and c is null); -select * from t8 order by a; -select * from t1 order by a; -drop table t1, t8; - -############################### -# Bug 8101 -# -# Unique index not specified in the same order as in table -# - -create table t1( - id integer not null auto_increment, - month integer not null, - year integer not null, - code varchar( 2) not null, - primary key ( id), - unique idx_t1( month, code, year) -) engine=ndb; - -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); - -select * from t1 where code = '12' and month = 4 and year = 2004 ; - -drop table t1; - -# bug#15918 Unique Key Limit in NDB Engine - -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; - -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); ---error ER_DUP_ENTRY -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -select a, sha1(b) from t1; - -# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum - -drop table t1; - -# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table - -create table t1(id int not null) engine = NDB; - -alter table t1 add constraint uk_test unique (id) using hash; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test deleted file mode 100644 index 5b74cc9202c..00000000000 --- a/mysql-test/t/ndb_insert.test +++ /dev/null @@ -1,779 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); - -SELECT COUNT(*) FROM t1; - - -# -# Insert duplicate rows -# ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (1,1,1); - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -select count(*) from t1; - - -# -# Test that select count(*) can see inserts made in the same transaction -# -begin; -SELECT COUNT(*) FROM t1; -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -rollback; - -# -# Insert duplicate rows, inside transaction -# try to commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to do another insert -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -INSERT INTO t1 values (4000, 40, 44); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - -# -# Insert duplicate rows using "insert .. select" - -# ---error 1022 -insert into t1 select * from t1 where b < 10 order by pk1; - -DELETE FROM t1 WHERE pk1=2; - -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -rollback; - -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; - -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; - -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; - -# Test handling of duplicate unique -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; - -DROP TABLE t1; - -# -# Bug #6331: problem with 'insert ignore' -# - -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# Ignore and NULL values -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -DROP TABLE t1; - -# -# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index -# - -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -drop table t1; - -# Bug#26342 auto_increment_increment AND auto_increment_offset REALLY REALLY anger NDB cluster - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM; - -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_limit.test b/mysql-test/t/ndb_limit.test deleted file mode 100644 index 01613606d66..00000000000 --- a/mysql-test/t/ndb_limit.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t2; ---enable_warnings - - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t2; - -delete from t2 limit 1; -select count(*) from t2; - -delete from t2 limit 100; -select count(*) from t2; - -delete from t2 limit 1000; -select count(*) from t2; - -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -select count(*) from t2 where c=12345678 limit 1000; - -select * from t2 limit 0; - -drop table t2; - -CREATE TABLE `t2` ( - `views` int(11) NOT NULL default '0', - `clicks` int(11) NOT NULL default '0', - `day` date NOT NULL default '0000-00-00', - `hour` tinyint(4) NOT NULL default '0', - `bannerid` smallint(6) NOT NULL default '0', - `zoneid` smallint(6) NOT NULL default '0', - `source` varchar(50) NOT NULL default '', - PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), - KEY `bannerid_day` (`bannerid`,`day`), - KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; - -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_load.test b/mysql-test/t/ndb_load.test deleted file mode 100644 index af2df70b74e..00000000000 --- a/mysql-test/t/ndb_load.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test for different types of loading data -# - -# should give duplicate key -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; ---error 1022 -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -DROP TABLE t1; - -# now without a primary key we should be ok -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -DROP TABLE t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_loaddatalocal.test b/mysql-test/t/ndb_loaddatalocal.test deleted file mode 100644 index 3eae3891f43..00000000000 --- a/mysql-test/t/ndb_loaddatalocal.test +++ /dev/null @@ -1,70 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -create table t1(a int) engine=myisam; -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -enable_query_log; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -drop table t1; - -create table t1(a int) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test deleted file mode 100644 index b6cd1ca7eb4..00000000000 --- a/mysql-test/t/ndb_lock.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; ---enable_warnings - -# -# Transaction lock test to show that the NDB -# table handler is working properly with -# transaction locks -# - -# -# Testing of scan isolation -# -connection con1; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; - -connection con2; -select * from t1 order by x; - -connection con1; -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; - -connection con2; -start transaction; -select * from t1 order by x; - -connection con1; -commit; - -connection con2; -select * from t1 order by x; -commit; - -drop table t1; - -### -# Bug#6020 -create table t1 (pk integer not null primary key, u int not null, o int not null, - unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); - -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -drop table t1; - -# Lock for update - -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; - -insert into t1 values (1,'one',1); - -# PK access -connection con1; -begin; -select * from t1 where x = 1 for update; - -connection con2; -begin; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; - -connection con2; ---error 1205 -select * from t1 where x = 1 for update; -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# table scan -# -# Note that there are two distinct execution paths in which we unlock -# non-matching rows inspected during table scan - one that is used in -# case of filesort and one that used in rest of cases. Below we cover -# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of -# untouched rows in full table scans"). -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And now the test for case with filesort -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -connection con2; -begin; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1105,1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# share locking - -# PK access -connection con1; -begin; -select * from t1 where x = 1 lock in share mode; - -connection con2; -begin; -select * from t1 where x = 1 lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# table scan -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And the same test for case with filesort -connection con1; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; - -connection con2; -begin; -select * from t1 where z = 1 lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -drop table t1; - -# End of 4.1 tests - -# -# Bug #17812 Previous lock table for write causes "stray" lock -# although table is recreated -# -# this creating, locking, and dropping causes a subsequent hang -# on the delete below waiting for table t2 the locking in the -# "other" connection is relevant, as without it there is no problem -# -connection con1; -create table t3 (id2 int) engine=ndb; - -connection con2; -lock tables t3 write; -unlock tables; - -connection con1; -drop table t3; - -connection con1; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; - -connection con2; -lock tables t3 read; - -connection con1; -# here we get a hang before bugfix although we shouldn't -delete t2 from t2, t3 where t2.id = t3.id; - -connection con2; -unlock tables; - -connection con1; -drop table t2, t3; diff --git a/mysql-test/t/ndb_minmax.test b/mysql-test/t/ndb_minmax.test deleted file mode 100644 index a3ac677cd2a..00000000000 --- a/mysql-test/t/ndb_minmax.test +++ /dev/null @@ -1,65 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a int PRIMARY KEY -) engine = ndb; - -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); - -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select * from t1 order by a; -select MIN(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select * from t1 order by a; -drop table t1; - - -CREATE TABLE t2 ( - a int PRIMARY KEY, - b int not null, - c int not null, - KEY(b), - UNIQUE(c) -) engine = ndb; - -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); - - -select MAX(a) from t2; -select MAX(b) from t2; -select MAX(c) from t2; -select MIN(a) from t2; -select MIN(b) from t2; -select MIN(c) from t2; -select * from t2 order by a; -select MIN(b) from t2; -select MAX(a) from t2; -select MAX(c) from t2; -select * from t2 order by a; -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test deleted file mode 100644 index 3482db1d1b2..00000000000 --- a/mysql-test/t/ndb_multi.test +++ /dev/null @@ -1,126 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -connection server1; -drop table if exists t1, t2, t3, t4; ---enable_warnings - -flush status; - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -select * from t1; -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -# bug#21378 -connection server1; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; - -connection server2; -show tables; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; - -connection server1; -alter table t1 engine=ndb; - -connection server2; -show tables; -select * from t1 order by c1; -drop table t1; - -connection server1; -select * from t1 order by c1; -drop table t1; -# End of 4.1 tests - -# Check distributed drop of database in 5.1 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -show tables; - -connection server1; -drop database db; - -connection server2; ---error 1049 -show tables; - -connection server1; - -# bug#21495 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -create table t2(x int) engine=myisam; -show tables; - -connection server1; -drop database db; - -connection server2; -show tables; -drop database db; - -connection server1; diff --git a/mysql-test/t/ndb_multi_row.test b/mysql-test/t/ndb_multi_row.test deleted file mode 100644 index 632a9fda89a..00000000000 --- a/mysql-test/t/ndb_multi_row.test +++ /dev/null @@ -1,76 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc --- source include/have_binlog_format_row.inc - - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -connection server1; -drop table if exists t1, t2, t3, t4; ---enable_warnings - -flush status; - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -## Currently a retry is required remotely -#--error 1412 -#select * from t1; -#show warnings; -#flush table t1; -# Table definition change should be propagated automatically -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -connection server2; -drop table if exists t1, t3, t4; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_partition_error.test b/mysql-test/t/ndb_partition_error.test deleted file mode 100644 index 9db2a6a6f6d..00000000000 --- a/mysql-test/t/ndb_partition_error.test +++ /dev/null @@ -1,74 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - ---disable_query_log -set new=on; ---enable_query_log -# -# Partition by range, generate node group error -# ---error 1005 -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, - partition x2 values less than (10) nodegroup 13, - partition x3 values less than (20) nodegroup 14); -show warnings; - -# -# Partition by range, create normal valid table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -drop table t1; - -# -# Bug #17763 mysqld cores with list partitioning if update to missing partition -# -CREATE TABLE t1 (id INT) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -UPDATE t1 SET id=5 WHERE id=2; -DROP TABLE t1; - -# -# NULL for LIST partition -# -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), - partition x234 values in (5, 1)); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -insert into t1 values (NULL,1,1); -drop table t1; diff --git a/mysql-test/t/ndb_partition_error2-master.opt b/mysql-test/t/ndb_partition_error2-master.opt deleted file mode 100644 index 955f7692c8b..00000000000 --- a/mysql-test/t/ndb_partition_error2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---ndbcluster diff --git a/mysql-test/t/ndb_partition_error2.test b/mysql-test/t/ndb_partition_error2.test deleted file mode 100644 index afedd0e3c5c..00000000000 --- a/mysql-test/t/ndb_partition_error2.test +++ /dev/null @@ -1,14 +0,0 @@ -disable_query_log; ---require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; -enable_query_log; - ---disable_warnings -drop table if exists t1; ---enable_warnings -# -# Bug #27359 Partitions: memory allocation error message -# ---error ER_PARTITION_NOT_DEFINED_ERROR -create table t1 (s1 int) engine=ndbcluster; - diff --git a/mysql-test/t/ndb_partition_key.test b/mysql-test/t/ndb_partition_key.test deleted file mode 100644 index 78e2c9d15c2..00000000000 --- a/mysql-test/t/ndb_partition_key.test +++ /dev/null @@ -1,229 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic syntax test -# - -# Support for partition key verified -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) - ENGINE = NDB - PARTITION BY KEY (a,b); - -insert into t1 values (1,1,1,1); -select * from t1; -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -delete from t1; -select * from t1; - -drop table t1; - -# only support for partition key on primary key ---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (c); - -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (a); - -insert into t1 values - (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), - (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); - -select * from t1 order by b; - -DROP TABLE t1; - -# -# Test partition and char support -# - -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, - PRIMARY KEY (a,b,c) USING HASH) - ENGINE=NDB - DEFAULT CHARSET=latin1 - PARTITION BY KEY (b); - -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); - -# should show only one attribute with DISTRIBUTION KEY ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/' - -# -# Test that explicit partition info is not shown in show create table -# result should not contain (PARTITION P0 ... etc) since this is what shows up in -# mysqldump, and we don't want that info there -# -show create table t1; - -DROP TABLE t1; - -# -# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax -# -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -# -# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE -# Also added a number of general test cases in the same area -# -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; - -alter table t1 engine=heap; -show create table t1; - -alter table t1 engine=ndb; -show create table t1; - -alter table t1 engine=heap remove partitioning; -show create table t1; - -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; - -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; - -alter table t1 remove partitioning; -show create table t1; - ---error ER_MIX_HANDLER_ERROR -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); - -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; - -drop table t1; - -# -# BUG 16810 Out of memory when coalesce partition -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - c4 BIT NOT NULL, - c5 FLOAT, - c6 VARCHAR(255), - c7 TIMESTAMP, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -let $j= 11; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, -b'0', - $j.00,"By JBM $j","2006-01-26"); - dec $j; -} ---enable_query_log -ALTER TABLE t1 COALESCE PARTITION 4; - -DROP TABLE t1; - -# -# Bug 16822: OPTIMIZE TABLE hangs test -# -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); ---error 1031 -ALTER TABLE t1 OPTIMIZE PARTITION p0; ---error 1031 -ALTER TABLE t1 CHECK PARTITION p0; ---error 1031 -ALTER TABLE t1 REPAIR PARTITION p0; ---error 1031 -ALTER TABLE t1 ANALYZE PARTITION p0; ---error 1031 -ALTER TABLE t1 REBUILD PARTITION p0; -DROP TABLE t1; - -# -# BUG 16806: ALTER TABLE fails -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; - -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) - (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -DROP TABLE t1; - -# bug#25587 - -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); - -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -select * from t1 where a = 2; -select * from t1 where a = 3; -select * from t1 where a = 4; -select * from t1 where a = 5; -delete from t1 where a = 1; -select * from t1 order by 1; -delete from t1 where a = 2; -select * from t1 order by 1; -delete from t1 where a = 3; -select * from t1 order by 1; -delete from t1 where a = 4; -select * from t1 order by 1; -delete from t1 where a = 5; -select * from t1 order by 1; - -drop table t1; diff --git a/mysql-test/t/ndb_partition_list.test b/mysql-test/t/ndb_partition_list.test deleted file mode 100644 index ccfcdbc84f4..00000000000 --- a/mysql-test/t/ndb_partition_list.test +++ /dev/null @@ -1,68 +0,0 @@ ---source include/have_ndb.inc -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by list, basic -# - -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, - f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), - PARTITION part_2 VALUES IN (-2), - PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0), - PARTITION part1 VALUES IN (1), - PARTITION part2 VALUES IN (2), - PARTITION part3 VALUES IN (3,4,5)); - -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - -# -# Partition by list, no pk -# - -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0,1), - PARTITION part1 VALUES IN (2)); - -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - diff --git a/mysql-test/t/ndb_partition_range.test b/mysql-test/t/ndb_partition_range.test deleted file mode 100644 index 7952ba502d2..00000000000 --- a/mysql-test/t/ndb_partition_range.test +++ /dev/null @@ -1,264 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); - ---replace_column 16 # 19 # 20 # -select * from information_schema.partitions where table_name= 't1'; - -select * from t1 order by a; - -select * from t1 where a=1 order by a; -select * from t1 where a=15 and b=1 order by a; -select * from t1 where a=21 and b=1 order by a; -select * from t1 where a=21 order by a; -select * from t1 where a in (1,6,10,21) order by a; -select * from t1 where b=1 and a in (1,6,10,21) order by a; - -drop table t1; - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); - -select * from t1 order by a; -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; - -select * from t1 where b=1 order by b; -select * from t1 where b=15 and a=1 order by b; -select * from t1 where b=21 and a=1 order by b; -select * from t1 where b=21 order by b; -select * from t1 where b in (1,6,10,21) order by b; -select * from t1 where a in (1,2,5,6) order by b; -select * from t1 where a=1 and b in (1,6,10,21) order by b; - -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; - -# -# Test that explicit partition info _is_ shown in show create table -# result _should_ contain (PARTITION x1 ... etc) -# -show create table t1; - -drop table t1; - -# -# Bug #17499, #17687 -# Alter partitioned NDB table causes mysqld to core -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -DROP TABLE t1; - -CREATE LOGFILE GROUP lg1 - ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE=1M - ENGINE=NDB; - -CREATE TABLESPACE ts1 - ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 - INITIAL_SIZE 12M - ENGINE NDB; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 INT, - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY LIST (a1) - (PARTITION p0 VALUES IN (1,2,3,4,5), - PARTITION p1 VALUES IN (6,7,8,9, 10), - PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); - -# Alter table directly without any statements inbetween -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 VARCHAR(255), - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY HASH(a1) - PARTITIONS 4; - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 - DROP DATAFILE 'datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; - - -# -# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ADD PARTITION - (PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -DROP TABLE t1; - -# -# Bug #17806 Update on NDB table with list partition causes mysqld to core -# Bug #16385 Partitions: crash when updating a range partitioned NDB table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), - partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -drop table t1; - -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -drop table t1; diff --git a/mysql-test/t/ndb_read_multi_range.test b/mysql-test/t/ndb_read_multi_range.test deleted file mode 100644 index b490eeb68a3..00000000000 --- a/mysql-test/t/ndb_read_multi_range.test +++ /dev/null @@ -1,319 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, r1; ---enable_warnings - -# -# Basic test to see that batching is working -# - -create table t1 ( - a int primary key, - b int not null, - c int not null, - index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values - (1,2,1),(2,3,2),(3,4,3),(4,5,4), - (5,2,12),(6,3,11),(7,4,10),(8,5,9), - (9,2,8),(10,3,7),(11,4,6),(12,5,5); - -# batch on primary key -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch on ordered index -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -drop table r1; - -# batch on unique hash index -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch mixed -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -drop table r1; - -# batch on primary key, missing values -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -drop table r1; - -# batch on ordered index, missing values -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (1,33,5) order by a; -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (45,22) order by a; - -# batch on unique hash index, missing values -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -drop table r1; - -select * from t1 where a in (33,8,12) order by a; -select * from t1 where a in (33,34,35) order by a; -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -select * from t1 where c in (13,2,8,33,12) order by c,a; -drop table t1; - -# -# Somewhat more complicated -# - -create table t1 ( - a int not null, - b int not null, - c int not null, - d int not null, - e int not null, - primary key (a,b,c,d), index (d) -) engine = ndb; - -insert into t1 values - (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), - (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), - (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), - (1,2,1,2,1), - (1,2,1,3,1), - (1,2,1,4,1), - (1,2,1,5,1); - -# batch on primary key -create table r1 as select * from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -drop table r1; - -# batched update ordered index, one value for all -update t1 set e = 100 - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -select * from t1 where d not in (12,6,7) and e = 100; - -# batched update primary key, one value for all -update t1 - set e = 101 - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; -select * - from t1 - where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) - and e=101; - - -# batched update ordered index, different values -update t1 - set e = - (case d - when 12 then 112 - when 6 then 106 - when 7 then 107 - end) - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; - -# batched update primary key, different values -update t1 - set e = - (case d - when 1 then 111 - when 4 then 444 - when 3 then 333 - when 2 then 222 - end) - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; - -# batched delete -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); - -drop table t1; - -# null handling -create table t1 ( - a int not null primary key, - b int, - c int, - d int, - unique index (b), - index(c) -) engine = ndb; - -insert into t1 values - (1,null,1,1), - (2,2,2,2), - (3,null,null,3), - (4,4,null,4), - (5,null,5,null), - (6,6,6,null), - (7,null,null,null), - (8,8,null,null), - (9,null,9,9), - (10,10,10,10), - (11,null,null,11), - (12,12,null,12), - (13,null,13,null), - (14,14,14,null), - (15,null,null,null), - (16,16,null,null); - -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -drop table t1; - -# bug17729 - -CREATE TABLE t1 ( - a int(11) NOT NULL, - b int(11) NOT NULL, - c datetime default NULL, - PRIMARY KEY (a), - KEY idx_bc (b,c) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); - -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; - -select * from t11 order by 1,2,3; -select * from t12 order by 1,2,3; -select * from t21 order by 1,2,3; -select * from t22 order by 1,2,3; - -# join tests -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; - -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; - -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; - -DROP TABLE t1, t11, t12, t21, t22; - -# bug#19956 -CREATE TABLE t1 (id varchar(255) NOT NULL, - tag int(11) NOT NULL, - doc text NOT NULL, - type varchar(150) NOT NULL, - modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (id) - ) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); - -DROP TABLE t1; - -#bug#25522 -CREATE TABLE t1 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -CREATE TABLE t2 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; - - -DELIMITER |; -CREATE TRIGGER testtrigger - AFTER UPDATE ON t1 FOR EACH ROW BEGIN - REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -DELIMITER ;| - -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); - -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); - -DROP TRIGGER testtrigger; - -DROP TABLE t1, t2; - -#bug#25821 -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; - -insert into t1 values (1,1), (10,10); - -select * from t1 use index (ab) where a in(1,10) order by a; - -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); - -insert into t2 values (1,1), (10,10); - -select * from t2 where a in (1,10) order by a; - -drop table t1, t2; diff --git a/mysql-test/t/ndb_rename.test b/mysql-test/t/ndb_rename.test deleted file mode 100644 index 7f9fd0e6984..00000000000 --- a/mysql-test/t/ndb_rename.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; ---enable_warnings - -# -# Table rename tests -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10), - INDEX i1(attr1) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; - -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; - -drop table ndbtest.t2; -drop database ndbtest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test deleted file mode 100644 index aa2072b98dd..00000000000 --- a/mysql-test/t/ndb_replace.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Test of REPLACE with NDB -# - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -CREATE TABLE t1 ( - gesuchnr int(11) DEFAULT '0' NOT NULL, - benutzer_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; - -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error ER_DUP_ENTRY -insert into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -drop table t1; - -# End of 4.1 tests - -# bug#17431 -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, - j INT, - k INT, - UNIQUE INDEX(j) - ) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -DROP TABLE t1; - -# bug#19906 -CREATE TABLE t2 (a INT(11) NOT NULL, - b INT(11) NOT NULL, - c INT(11) NOT NULL, - x TEXT, - y TEXT, - z TEXT, - id INT(10) unsigned NOT NULL AUTO_INCREMENT, - i INT(11) DEFAULT NULL, - PRIMARY KEY (id), - UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; - -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); - -SELECT * FROM t2 ORDER BY id; - -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); - -SELECT * FROM t2 ORDER BY id; - -DROP TABLE t2; - -# -# Bug #20728 "REPLACE does not work correctly for NDB table with PK and -# unique index" -# ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -# Test for plain replace which updates pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -delete from t1; -# Another test for plain replace which doesn't touch pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -delete from t1; -# Test for load data replace which updates pk -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Now test for load data replace which doesn't touch pk -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Finally test for both types of replace ... select -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -# Clean-up -drop table t1; - ---echo End of 5.0 tests. diff --git a/mysql-test/t/ndb_restore.test b/mysql-test/t/ndb_restore.test deleted file mode 100644 index 7f0cafdfd77..00000000000 --- a/mysql-test/t/ndb_restore.test +++ /dev/null @@ -1,403 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---enable_warnings - -# Bug #27775 - mediumint auto inc not restored correctly -# - check mediumint -CREATE TABLE `t1_c` ( - `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -# -# Bug #27758 Restoring NDB backups makes table usable in SQL nodes -# - space in key made table unusable after restore -# -# Bug #27775 - mediumint auto inc not restored correctly -# - check smallint -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); - -# Added ROW_FORMAT=FIXED to use below to see that setting is preserved -# by restore -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check bigint -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check tinyint -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL auto_increment, - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -# Bug #20820 -# auto inc table not handled correctly when restored from cluster backup -# - before fix ndb_restore would not set auto inc value correct, -# seen by select below -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -# Bug #27775 - mediumint auto inc not restored correctly -# - check int -insert into t10_c values (10000),(2000),(3000); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; - -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# Bug #20820 cont'd -select * from t10_c order by a; -# Bug #27775 cont'd -# - auto inc info should be correct ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't1_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't2_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't4_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't7_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't10_c'; - -# -# Try Partitioned tables as well -# -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 5.0 tests (4.1 test intermixed to save test time) diff --git a/mysql-test/t/ndb_restore_compat.test b/mysql-test/t/ndb_restore_compat.test deleted file mode 100644 index 2622aec1d50..00000000000 --- a/mysql-test/t/ndb_restore_compat.test +++ /dev/null @@ -1,61 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc --- source include/have_case_sensitive_file_system.inc - -# This test currently requires case sensitive file system as the tables -# are originally stored with uppercase - -# -# Bug #18594 ndb_restore log boken in 5.1 -# - ---disable_warnings -DROP DATABASE IF EXISTS BANK; ---enable_warnings -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT -USE BANK; -SHOW TABLES; -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; - -# Check that force varpart is set by ndb_restore ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# -# verify restore of 5.0 backup -# here we must use the already created tables as restoring the old -# table definitions will not work -# -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; - -# Check that force varpart is not changed by truncate ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# Restore data ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT - -# Check data -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -DROP DATABASE BANK; diff --git a/mysql-test/t/ndb_restore_partition-master.opt b/mysql-test/t/ndb_restore_partition-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/t/ndb_restore_partition-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/t/ndb_restore_partition.test b/mysql-test/t/ndb_restore_partition.test deleted file mode 100644 index f11324492c2..00000000000 --- a/mysql-test/t/ndb_restore_partition.test +++ /dev/null @@ -1,375 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---enable_warnings - -CREATE TABLE `t1_c` ( - `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); - -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); - -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL default '0', - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; - - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Try Partitioned tables as well -# -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); - -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); - -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); - -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; - -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; - -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_restore_print.test b/mysql-test/t/ndb_restore_print.test deleted file mode 100644 index 6dbbfdf5933..00000000000 --- a/mysql-test/t/ndb_restore_print.test +++ /dev/null @@ -1,189 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# basic datatypes -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine myisam; - -# max values -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -# min values -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -# null values -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - ---vertical_results -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; - -alter table t1 engine ndb; - -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; ---horizontal_results - ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'" ---source include/ndb_backup_print.inc - - -drop table t1; - -# some binary char tests with trailing spaces -create table t1 - (pk int key - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 - ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 - ); - -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; - -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); - ---source include/ndb_backup.inc ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X" ---let ndb_restore_filter=test t1 ---source include/ndb_backup_print.inc - ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt - ---let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append ---let ndb_restore_filter=test ---source include/ndb_backup_print.inc - ---let $message= t1 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t1.txt ---let $message= t2 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t2.txt ---let $message= t3 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t3.txt ---let $message= t4 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t4.txt - ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt - -# now test some other datatypes -drop table t1; -create table t1 - (pk int key - ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED - ) engine ndb; - -# max values -insert into t1 values(1, 8388607, 16777215); -# min values -insert into t1 values(2, -8388608, 0); -# small values -insert into t1 values(3, -1, 1); - -# backup and print ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - -# clean up -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/t/ndb_row_format.test b/mysql-test/t/ndb_row_format.test deleted file mode 100644 index b1582cbe339..00000000000 --- a/mysql-test/t/ndb_row_format.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# some negative tests -# - -# cannot have ROW_FORMAT=FIXED and var attrs mixed ---error 1005 -CREATE TABLE t1 - ( a INT KEY, - b VARCHAR(10) ) - ROW_FORMAT=FIXED - ENGINE=NDB; - -# warnings give more detail on the error -SHOW WARNINGS; - - -# -# Check force var part for different ROW_FORMAT -# - -# default => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# explicit DEFAULT => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DEFAULT - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# FIXED => ForceVarPart: 0 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=FIXED - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# DYNAMIC => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DYNAMIC - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# test of bug -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -drop table t1; diff --git a/mysql-test/t/ndb_single_user.test b/mysql-test/t/ndb_single_user.test deleted file mode 100644 index 3c6656be9f9..00000000000 --- a/mysql-test/t/ndb_single_user.test +++ /dev/null @@ -1,174 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# operations allowed while cluster is in single user mode - ---connection server1 ---let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'` ---disable_query_log ---eval set @node_id= SUBSTRING('$node_id', 20)+0 ---enable_query_log ---let $node_id= `SELECT @node_id` ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT - -# verify that we are indeed in single user mode -# and test that some operations give correct errors ---connection server2 ---error 1005 -create table t1 (a int key, b int unique, c int) engine ndb; -# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed -# - before bug fix these would succeed ---error 1516 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -show warnings; - -# test some sql on first mysqld ---connection server1 -create table t1 (a int key, b int unique, c int) engine ndb; -# Check that we can create logfile group -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; ---connection server2 ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -show warnings; ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show warnings; ---connection server1 -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; ---connection server2 ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -show warnings; ---connection server1 -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; ---connection server2 ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE NDB; -show warnings; ---connection server1 -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -# read with pk -select * from t1 where a = 1; -# read with unique index -select * from t1 where b = 4; -# read with ordered index -select * from t1 where a > 4 order by a; -# update with pk -update t1 set b=102 where a = 2; -# update with unique index -update t1 set b=103 where b = 3; -# update with full table scan -update t1 set b=b+100; -# update with ordered insex scan -update t1 set b=b+100 where a > 7; -# delete with full table scan -delete from t1; -insert into t1 select * from t2; -# Bug #27710 Creating unique index fails during single user mode -# - prior to bugfix this would fail -create unique index new_index on t1 (b,c); - -# test some sql on other mysqld ---connection server2 ---error 1051 -drop table t1; ---error 1296 -create index new_index_fail on t1 (c); ---error 1296 -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); ---error 1296 -select * from t1 where a = 1; ---error 1296 -select * from t1 where b = 4; ---error 1296 -update t1 set b=102 where a = 2; ---error 1296 -update t1 set b=103 where b = 3; ---error 1296 -update t1 set b=b+100; ---error 1296 -update t1 set b=b+100 where a > 7; - ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# -# we should be able to run transaction while in single user mode -# ---connection server1 -BEGIN; -update t1 set b=b+100 where a=1; - ---connection server2 -BEGIN; -update t1 set b=b+100 where a=2; - -# enter single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT - ---connection server1 -update t1 set b=b+100 where a=3; -COMMIT; - -# while on other mysqld it should be aborted ---connection server2 ---error 1296 -update t1 set b=b+100 where a=4; ---error 1296 -COMMIT; - -# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb -# tables for other mysqld nodes ---connection server2 -create table t2 (a int) engine myisam; -alter table t2 add column (b int); - -# exit single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# cleanup ---connection server2 -drop table t2; ---connection server1 -drop table t1; - -# End of 5.0 tests - diff --git a/mysql-test/t/ndb_sp.test b/mysql-test/t/ndb_sp.test deleted file mode 100644 index b833869cad0..00000000000 --- a/mysql-test/t/ndb_sp.test +++ /dev/null @@ -1,42 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); - -delimiter //; -create procedure test_proc1 (in var_in int) -begin - select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin - select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin - select b from t1 where a = var_inout into var_inout; -end; -// -delimiter ;// -call test_proc1(1); -call test_proc2(@test_var); -select @test_var; -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_subquery.test b/mysql-test/t/ndb_subquery.test deleted file mode 100644 index 6282c31c922..00000000000 --- a/mysql-test/t/ndb_subquery.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -########## -# bug#5367 -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; - -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); - -# Use pk ---replace_column 9 # -explain select * from t2 where p NOT IN (select p from t1); -select * from t2 where p NOT IN (select p from t1) order by p; - -# Use unique index ---replace_column 9 # -explain select * from t2 where p NOT IN (select u from t1); -select * from t2 where p NOT IN (select u from t1) order by p; - -# Use ordered index ---replace_column 9 # -explain select * from t2 where p NOT IN (select o from t1); -select * from t2 where p NOT IN (select o from t1) order by p; - -# Use scan ---replace_column 9 # -explain select * from t2 where p NOT IN (select p+0 from t1); -select * from t2 where p NOT IN (select p+0 from t1) order by p; - -drop table t1; -drop table t2; -# bug#5367 -########## - -# End of 4.1 tests - -# -# bug#11205 -# -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); - -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u - and t2.u = t3.u - and t3.u = t4.u - and t4.u = t5.u - and t5.u = t6.u - and t6.u = t7.u - and t7.u = t8.u; - -select * from t2 order by 1; - -select * from t3 where a = any (select c from t4 where c = 1) order by a; -select * from t3 where a in (select c from t4 where c = 1) order by a; -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -select * from t3 where a > all (select c from t4 where c = 1) order by a; -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -select * from t3 where exists (select * from t4 where c = 1) order by a; - -drop table if exists t1, t2, t3, t4; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_temporary.test b/mysql-test/t/ndb_temporary.test deleted file mode 100644 index 7f6902bf745..00000000000 --- a/mysql-test/t/ndb_temporary.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# creating a temporary table with engine=ndb should give an error -# ---error ER_ILLEGAL_HA_CREATE_OPTION -create temporary table t1 (a int key) engine=ndb; - - -# -# alter temporary table to engine=ndb should give an error -# -create temporary table t1 (a int key) engine=myisam; ---error ER_ILLEGAL_HA_CREATE_OPTION -alter table t1 engine=ndb; -drop table t1; - - -# -# if default storage engine=ndb, temporary tables -# without explicit engine= should be created as myisam -# -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); - -# verify that we have a ndb table -select engine from information_schema.tables where table_name = 't1'; -drop table t1; - -# verify that we have a myisam table -create temporary table t1 (a int key); -show create table t1; -drop table t1; diff --git a/mysql-test/t/ndb_transaction.test b/mysql-test/t/ndb_transaction.test deleted file mode 100644 index d3ebadb1a78..00000000000 --- a/mysql-test/t/ndb_transaction.test +++ /dev/null @@ -1,298 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# Transactionc test to show that the NDB -# table handler is working properly with -# transactions -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -# update -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -update t1 set attr1 = attr1 * 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -# delete -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -delete from t1 where attr1 = 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -rollback; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -# update -begin; -update t1 set id = id * 2; -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -rollback; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -begin; -update t1 set id = id * 2; -commit; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -# delete - -DROP TABLE t1; - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert records into tables and rollback -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -rollback; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# insert records into tables and commit; -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -commit; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# delete every other record in the tables -# -let $1=100; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -# -# update records and rollback -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -# -# update records and commit -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test multiple databases in one transaction -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -select count(*) from t2; -select * from test.t1 where pk1 = 1; -select * from t2 where a = 1; -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -rollback; - -select count(*) from test.t1; -select count(*) from t2; - -drop table test.t1, t2; -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_trigger.test b/mysql-test/t/ndb_trigger.test deleted file mode 100644 index 586fdc0ac97..00000000000 --- a/mysql-test/t/ndb_trigger.test +++ /dev/null @@ -1,221 +0,0 @@ -# Tests which involve triggers and NDB storage engine ---source include/have_ndb.inc ---source include/not_embedded.inc - -# -# 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. -# You can find similar tests for ON INSERT triggers in federated.test -# since this engine so far is the only engine in MySQL which cares -# about field mark-up during handler::write_row() operation. -# - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)); -create table t3 select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; - -delimiter //; -create trigger t1_bu before update on t1 for each row -begin - insert into t2 values ("u", old.a, old.b); - set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin - insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 - for each row begin - update t5 set b = b+1; - end; -// -create trigger t4_ad after delete on t4 - for each row begin - update t5 set b = b+1; - end; -// -delimiter ;// - -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); - -# Check that usual update works as it should -update t1 set a=5 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check that everything works for multi-update -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for delete -delete from t1 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for multi-delete -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... on duplicate key update -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... select ... on duplicate key update -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for replace -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for replace ... select ... -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for load data replace -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -select * from t2 order by op, a, b; -update t4 set b = 10 where a = 1; -select * from t5 order by a; -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -drop trigger t4_au; -drop trigger t4_ad; - -drop table t1, t2, t3, t4, t5; -# Test for bug#26242 -# Verify that AFTER UPDATE/DELETE triggers are executed -# after the change has actually taken place - -CREATE TABLE t1 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (1, 0); - -DELIMITER //; -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t2 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t2 VALUES (2, 0); - -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; - -INSERT INTO t3 VALUES (1); - -CREATE TABLE t4 LIKE t1; - -DELIMITER //; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t5 LIKE t2; - -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; - -DELIMITER //; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -DELIMITER ;// - -DELIMITER //; -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -DELIMITER ;// - -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; - -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_truncate.test b/mysql-test/t/ndb_truncate.test deleted file mode 100644 index a1ef4be0d48..00000000000 --- a/mysql-test/t/ndb_truncate.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=500; -disable_query_log; -while ($1) -{ - eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t1; - -select * from t1 order by a limit 2; - -truncate table t1; - -select count(*) from t1; - -insert into t1 values(NULL,1,1),(NULL,2,2); - -select * from t1 order by a; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test deleted file mode 100644 index ab18817132e..00000000000 --- a/mysql-test/t/ndb_types.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Test creation of different column types in NDB -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10) default "hello", - vstring varchar(10) default "hello", - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('one','two','tree') not null, - flags set('one','two','tree') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - PRIMARY KEY (auto), - KEY (utiny), - KEY (tiny), - KEY (short), - KEY any_name (medium), - KEY (longlong), - KEY (real_float), - KEY (ushort), - KEY (umedium), - KEY (ulong), - KEY (ulonglong,ulong), - KEY (options,flags) -); - -set @now = now(); ---sleep 1.5 -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -set @now = now(); ---sleep 1.5 -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -drop table t1; - ---echo End of 4.1 tests diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test deleted file mode 100644 index 73a0ebc69cb..00000000000 --- a/mysql-test/t/ndb_update.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 4 where pk1 = 2; -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_view.test b/mysql-test/t/ndb_view.test deleted file mode 100644 index 3b8fc330b40..00000000000 --- a/mysql-test/t/ndb_view.test +++ /dev/null @@ -1,29 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; ---enable_warnings - -# -# simple operations via view -# - -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); - -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; - -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; - -drop view v1; - -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; - -drop view v1; -drop table t1; diff --git a/mysql-test/t/ndbapi.test b/mysql-test/t/ndbapi.test deleted file mode 100644 index 3424513f8af..00000000000 --- a/mysql-test/t/ndbapi.test +++ /dev/null @@ -1,44 +0,0 @@ --- source include/have_ndb.inc --- source include/have_ndbapi_examples.inc - ---disable_warnings -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; ---enable_warnings - ---exec echo Running ndbapi_simple ---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_simple_index ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_scan ---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_retries ---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async ---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async1 ---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, - primary key(c0, c2)) engine ndb charset latin1; -#--exec echo Running ndbapi_event -#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk -update t0 set c3 = 'f'; -- use scan -update t0 set c3 = 'F'; -- use scan update to 'same' -update t0 set c2 = 'g' where c0 = 1; -- update pk part -update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same' -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK -delete from t0; -drop table t0; - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT diff --git a/mysql-test/t/partition_03ndb.test b/mysql-test/t/partition_03ndb.test deleted file mode 100644 index 3190ab9dfc7..00000000000 --- a/mysql-test/t/partition_03ndb.test +++ /dev/null @@ -1,26 +0,0 @@ -############################################### -# # -# Partition tests NDB tables # -# # -############################################### - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN -# THE SOURCED FIELS ONLY. -# - -# Storage engine to be tested -let $engine= 'NDB' ; --- source include/have_ndb.inc -eval SET SESSION storage_engine=$engine; - - -# Other storage engine <> storage engine to be tested -let $engine_other= 'MEMORY'; -# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments -# on partioned tables -# Attention: In the moment the result files fit to @max_row = 200 only -SET @max_row = 200; - --- source include/partition_1.inc diff --git a/mysql-test/t/ps_7ndb.test b/mysql-test/t/ps_7ndb.test deleted file mode 100644 index e3f65ec2c4e..00000000000 --- a/mysql-test/t/ps_7ndb.test +++ /dev/null @@ -1,25 +0,0 @@ -############################################### -# # -# Prepared Statements test on NDB tables # -# # -############################################### - -# -# NOTE: PLEASE SEE ps_1general.test (bottom) -# BEFORE ADDING NEW TEST CASES HERE !!! - -use test; - --- source include/have_ndb.inc -let $type= 'NDB' ; --- source include/ps_create.inc --- source include/ps_renew.inc - --- source include/ps_query.inc --- source include/ps_modify.inc --- source include/ps_modify1.inc --- source include/ps_conv.inc - -drop table t1, t9; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000010-slave.opt b/mysql-test/t/rpl000010-slave.opt deleted file mode 100644 index 0dbfb311e33..00000000000 --- a/mysql-test/t/rpl000010-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---disconnect-slave-event-count=2 diff --git a/mysql-test/t/rpl000010.test b/mysql-test/t/rpl000010.test deleted file mode 100644 index 261b9148774..00000000000 --- a/mysql-test/t/rpl000010.test +++ /dev/null @@ -1,19 +0,0 @@ -# This tests the offset off by 22 mystery bug -# Must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1 - -source include/master-slave.inc; - -create table t1 (n int not null auto_increment primary key); -insert into t1 values(NULL); -insert into t1 values(2); -save_master_pos; -connection slave; -sync_with_master; -select n from t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000011.test b/mysql-test/t/rpl000011.test deleted file mode 100644 index 32f6227f7c5..00000000000 --- a/mysql-test/t/rpl000011.test +++ /dev/null @@ -1,17 +0,0 @@ -source include/master-slave.inc; - -create table t1 (n int); -insert into t1 values(1); -sync_slave_with_master; -stop slave; -start slave; -connection master; -insert into t1 values(2); -#let slave catch up -sync_slave_with_master; -select * from t1; -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000013.test b/mysql-test/t/rpl000013.test deleted file mode 100644 index 69a102e84ce..00000000000 --- a/mysql-test/t/rpl000013.test +++ /dev/null @@ -1,53 +0,0 @@ -# This test is to verify that DROP TEMPORARY TABLE -# is automatically binlogged and sent to slave -# when a temp table is dropped by disconnection -# of a master's conection. -# So it does not apply to row-based, where we neither need -# nor do this automatic binlogging. And if we run this test -# in row-based, it hangs waiting for an offset which is never -# reached (the "sync_with_master 1"), logically. - ---source include/have_binlog_format_mixed_or_statement.inc -source include/master-slave.inc; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -create table t2(n int); -create temporary table t1 (n int); -insert into t1 values(1),(2),(3); -insert into t2 select * from t1; -connection master1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1 as t10; -save_master_pos; -disconnect master; -connection slave; -#add 1 to catch drop table -sync_with_master 1; -connection master1; -insert into t2 values(6); -save_master_pos; -disconnect master1; -connection slave; -# same trick to go one more event -sync_with_master 1; -select * from t2; -show status like 'Slave_open_temp_tables'; -# -# Clean up -# -connect (master2,localhost,root,,); -connection master2; - -# We will get a warning for t1 as this is a temporary table that doesn't -# exist in this connection. - -drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000017-slave.opt b/mysql-test/t/rpl000017-slave.opt deleted file mode 100644 index 58a964c90d0..00000000000 --- a/mysql-test/t/rpl000017-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-slave-start diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh deleted file mode 100755 index 17188aba0db..00000000000 --- a/mysql-test/t/rpl000017-slave.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/log/*relay* -rm -f $MYSQLTEST_VARDIR/slave-data/relay-log.info -cat > $MYSQLTEST_VARDIR/slave-data/master.info <_binary'' from mysql.user where user=_binary'rpl_do_grant'; - -# -# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES -# -connection master; -update mysql.user set password='' where user='rpl_do_grant'; -flush privileges; -select password<>'' from mysql.user where user='rpl_do_grant'; -set sql_mode='ANSI_QUOTES'; -set password for rpl_do_grant@localhost=password('does it work?'); -set sql_mode=''; -save_master_pos; -connection slave; -sync_with_master; -select password<>'' from mysql.user where user='rpl_do_grant'; - - -# clear what we have done, to not influence other tests. -connection master; -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; -sync_slave_with_master; -# The mysql database is not replicated, so we have to do the deletes -# manually on the slave as well. -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; - -# End of 4.1 tests - -connection master; ---error 1141 -show grants for rpl_do_grant@localhost; -connection slave; ---error 1141 -show grants for rpl_do_grant@localhost; - -connection master; -create user rpl_do_grant@localhost; -show grants for rpl_do_grant@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; - -connection master; -rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -revoke all privileges, grant option from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -drop user rpl_do_grant2@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; ---error 1141 -show grants for rpl_do_grant2@localhost; diff --git a/mysql-test/t/rpl_drop.test b/mysql-test/t/rpl_drop.test deleted file mode 100644 index b38007a755f..00000000000 --- a/mysql-test/t/rpl_drop.test +++ /dev/null @@ -1,16 +0,0 @@ -# Testcase for BUG#4552 (DROP on two tables, one of which does not -# exist, must be binlogged with a non-zero error code) -source include/master-slave.inc; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings -create table t1 (a int); ---error 1051 -drop table t1, t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - - diff --git a/mysql-test/t/rpl_drop_db.test b/mysql-test/t/rpl_drop_db.test deleted file mode 100644 index 7f4a7843c4a..00000000000 --- a/mysql-test/t/rpl_drop_db.test +++ /dev/null @@ -1,61 +0,0 @@ -# test case for BUG#4680 -- if there are extra files in the db directory -# dropping the db on the master causes replication problems - --- source include/master-slave.inc -connection master; - ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; -create table mysqltest1.t1 (n int); -insert into mysqltest1.t1 values (1); -select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; -create table mysqltest1.t2 (n int); -create table mysqltest1.t3 (n int); ---replace_result \\ / ---error 1010 -drop database mysqltest1; -use mysqltest1; -show tables; - -# test the branch of the code that deals with the query buffer overflow - ---disable_query_log -let $1=50; -while ($1) -{ - eval create table mysqltest1.mysqltest_long_table_name$1 (n int); - dec $1; -} ---enable_query_log - ---replace_result \\ / ---error 1010 -drop database mysqltest1; -use mysqltest1; -show tables; -use test; -create table t1 (n int); -insert into t1 values (1234); -sync_slave_with_master; - -connection slave; -use mysqltest1; -show tables; -use test; -select * from t1; - -#cleanup -connection slave; -stop slave; -drop database mysqltest1; - -connection master; -# Remove the "extra" file created above ---remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt -drop database mysqltest1; - -use test; -drop table t1; - diff --git a/mysql-test/t/rpl_drop_temp-slave.opt b/mysql-test/t/rpl_drop_temp-slave.opt deleted file mode 100644 index 2f9244c65ff..00000000000 --- a/mysql-test/t/rpl_drop_temp-slave.opt +++ /dev/null @@ -1,2 +0,0 @@ ---replicate-ignore-table=mysqltest.t2 - diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test deleted file mode 100644 index 305c78d3f06..00000000000 --- a/mysql-test/t/rpl_drop_temp.test +++ /dev/null @@ -1,27 +0,0 @@ -############################################## -# Change Author: JBM -# Change Date: 2006-02-07 -# Change: Added ENGINE=MyISAM -# Purpose: According to TU in 16552 This is how -# to work around NDB's issue with temp tables -############################################## -source include/master-slave.inc; ---disable_warnings -create database if not exists mysqltest; ---enable_warnings - -create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; -create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; -sync_slave_with_master; -connection master; -disconnect master; -connection slave; ---real_sleep 3 # time for DROP to be written -show status like 'Slave_open_temp_tables'; - -# Cleanup -connection default; -drop database mysqltest; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_dual_pos_advance-master.opt b/mysql-test/t/rpl_dual_pos_advance-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_dual_pos_advance-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test deleted file mode 100644 index 27c920a3186..00000000000 --- a/mysql-test/t/rpl_dual_pos_advance.test +++ /dev/null @@ -1,114 +0,0 @@ -# This test checks that in a dual-head setup -# A->B->A, where A has --log-slave-updates (why would it? -# assume that there is a C as slave of A), -# then the Exec_master_log_pos of SHOW SLAVE STATUS does -# not stay too low on B(BUG#13023 due to events ignored because -# of their server id). -# It also will test BUG#13861. - -source include/master-slave.inc; - - -# set up "dual head" - -connection slave; -reset master; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; - -start slave; - -# now we test it - -connection slave; - -create table t1 (n int); - -save_master_pos; -connection master; -sync_with_master; - -# Now test BUG#13861. This will be enabled when Guilhem fixes this -# bug. - -# stop slave - -# create table t2 (n int); # create one ignored event - -# save_master_pos; -# connection slave; -# sync_with_master; - -# connection slave; - -# show tables; - -# save_master_pos; - -# create table t3 (n int); - -# connection master; - -# bug is that START SLAVE UNTIL may stop too late, we test that by -# asking it to stop before creation of t3. - -# start slave until master_log_file="slave-bin.000001",master_log_pos=195; - -# wait until it's started (the position below is the start of "CREATE -# TABLE t2") (otherwise wait_for_slave_to_stop may return at once) - -# select master_pos_wait("slave-bin.000001",137); - -# --source include/wait_for_slave_to_stop.inc - -# then BUG#13861 causes t3 to show up below (because stopped too -# late). - -# show tables; - -# start slave; - -# BUG#13023 is that Exec_master_log_pos may stay too low "forever": - -connection master; - -create table t4 (n int); # create 3 ignored events -create table t5 (n int); -create table t6 (n int); - -save_master_pos; -connection slave; -sync_with_master; - -connection slave; - -save_master_pos; - -connection master; - -# then BUG#13023 caused hang below ("master" looks behind, while it's -# not in terms of updates done). - -sync_with_master; - -show tables; - -# cleanup - -stop slave; -reset slave; -drop table t1,t4,t5,t6; # add t2 and t3 later - -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - -# Cleanup -# The A->B->A replication causes the master to start writing relay logs -# in var/run, remove them -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001; -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index; diff --git a/mysql-test/t/rpl_empty_master_crash-master.opt b/mysql-test/t/rpl_empty_master_crash-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_empty_master_crash-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_empty_master_crash.test b/mysql-test/t/rpl_empty_master_crash.test deleted file mode 100644 index 707d1eca8c2..00000000000 --- a/mysql-test/t/rpl_empty_master_crash.test +++ /dev/null @@ -1,15 +0,0 @@ -source include/master-slave.inc; - ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; - -# -# Load table should not succeed on the master as this is not a slave -# ---error 1218 -load table t1 from master; -connection slave; ---error 1188 -load table t1 from master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_err_ignoredtable-slave.opt b/mysql-test/t/rpl_err_ignoredtable-slave.opt deleted file mode 100644 index cb49119bfcb..00000000000 --- a/mysql-test/t/rpl_err_ignoredtable-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 diff --git a/mysql-test/t/rpl_err_ignoredtable.test b/mysql-test/t/rpl_err_ignoredtable.test deleted file mode 100644 index 4e06a6a7096..00000000000 --- a/mysql-test/t/rpl_err_ignoredtable.test +++ /dev/null @@ -1,66 +0,0 @@ -# Test for -# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave -# still checks that it has the same error as on the master. -########################################################################## -# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY -########################################################################## - --- source include/master-slave.inc - -connection master; -create table t1 (a int primary key); -create table t4 (a int primary key); -# generate an error that goes to the binlog ---error 1022, ER_DUP_ENTRY -insert into t1 values (1),(1); -insert into t4 values (1),(2); -save_master_pos; -connection slave; -# as the t1 table is ignored on the slave, the slave should be able to sync -sync_with_master; -# check that the table has been ignored, because otherwise the test is nonsense -show tables like 't1'; -show tables like 't4'; -SELECT * FROM test.t4 ORDER BY a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# Now test that even critical errors (connection killed) -# are ignored if rules allow it. -# The "kill" idea was copied from rpl000001.test. - -connection master1; -select get_lock('crash_lock%20C', 10); - -connection master; -create table t2 (a int primary key); -insert into t2 values(1); -create table t3 (id int); -insert into t3 values(connection_id()); -send update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); - -connection master1; -real_sleep 2; -select (@id := id) - id from t3; -kill @id; -drop table t2,t3; -insert into t4 values (3),(4); -connection master; ---error 0,1053,2013 -reap; -connection master1; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t4 ORDER BY a; - -connection master1; -DROP TABLE test.t4; -save_master_pos; -connection slave; -sync_with_master; -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed diff --git a/mysql-test/t/rpl_events.test b/mysql-test/t/rpl_events.test deleted file mode 100644 index 62ffead7dcb..00000000000 --- a/mysql-test/t/rpl_events.test +++ /dev/null @@ -1,47 +0,0 @@ -################################################################## -# Author: Giuseppe # -# Date: 2006-12-20 # -# Purpose: To test that event effects are replicated # -# in both row based and statement based format # -################################################################## - -set global event_scheduler=1; - ---source include/not_embedded.inc ---source include/master-slave.inc - -let $engine_type= MyISAM; - -set binlog_format=row; - -# Embedded server doesn't support binlogging ---source include/rpl_events.inc - -set binlog_format=statement; - -# Embedded server doesn't support binlogging ---source include/rpl_events.inc - -# -# Bug #28953 Using events in a replication let the slave crash. -# - -connection master; - -DELIMITER |; -CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR -DO BEGIN - select * from t1; -END;| -DELIMITER ;| - -ALTER EVENT event1 RENAME TO event2; - -sync_slave_with_master; - -connection master; - -DROP EVENT event2; - -sync_slave_with_master; - diff --git a/mysql-test/t/rpl_extraCol_innodb-master.opt b/mysql-test/t/rpl_extraCol_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_extraCol_innodb-slave.opt b/mysql-test/t/rpl_extraCol_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_extraCol_innodb.test b/mysql-test/t/rpl_extraCol_innodb.test deleted file mode 100644 index e9685baf01b..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using innodb -########################################### --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_extraCol_myisam.test b/mysql-test/t/rpl_extraCol_myisam.test deleted file mode 100644 index d56df394ccf..00000000000 --- a/mysql-test/t/rpl_extraCol_myisam.test +++ /dev/null @@ -1,12 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-07 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using MyISAM -########################################### --- source include/have_binlog_format_row.inc --- source include/master-slave.inc -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_failed_optimize-master.opt b/mysql-test/t/rpl_failed_optimize-master.opt deleted file mode 100644 index 3f82baff598..00000000000 --- a/mysql-test/t/rpl_failed_optimize-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb-lock-wait-timeout=1 diff --git a/mysql-test/t/rpl_failed_optimize.test b/mysql-test/t/rpl_failed_optimize.test deleted file mode 100644 index 81e8342b5c0..00000000000 --- a/mysql-test/t/rpl_failed_optimize.test +++ /dev/null @@ -1,11 +0,0 @@ -####################################### -# Wrapper for rpl_failed_optimize.test# -####################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_failed_optimize.test diff --git a/mysql-test/t/rpl_flushlog_loop-master.opt b/mysql-test/t/rpl_flushlog_loop-master.opt deleted file mode 100644 index a4d1d403dc9..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/master-data/relay-log diff --git a/mysql-test/t/rpl_flushlog_loop-master.sh b/mysql-test/t/rpl_flushlog_loop-master.sh deleted file mode 100755 index a321dd690cd..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-master.sh +++ /dev/null @@ -1,5 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*.index - - diff --git a/mysql-test/t/rpl_flushlog_loop-slave.opt b/mysql-test/t/rpl_flushlog_loop-slave.opt deleted file mode 100644 index 95839c831c9..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-slave.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/slave-data/relay-log diff --git a/mysql-test/t/rpl_flushlog_loop-slave.sh b/mysql-test/t/rpl_flushlog_loop-slave.sh deleted file mode 100755 index e46ea6d400b..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-slave.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/master.info -rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/master-data/*.index - diff --git a/mysql-test/t/rpl_flushlog_loop.test b/mysql-test/t/rpl_flushlog_loop.test deleted file mode 100644 index 471c45a1aa3..00000000000 --- a/mysql-test/t/rpl_flushlog_loop.test +++ /dev/null @@ -1,50 +0,0 @@ -# Testing if "flush logs" command bouncing resulting in logs created in a loop -# in case of bi-directional replication --- source include/master-slave.inc - -# -# Start replication master -> slave -# -# We have to sync with master, to ensure slave had time to start properly -# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log. -sync_slave_with_master; -connection slave; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$MASTER_MYPORT; -start slave; - -# -# Start replication slave -> master -# -connection master; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$SLAVE_MYPORT; -start slave; - -# -# Wait for start of slave IO and SQL threads -# -let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%'; ---source include/wait_slave_status.inc - -# -# Flush logs of slave -# -flush logs; -sleep 5; - -# -# Show status of slave -# ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # ---vertical_results -SHOW SLAVE STATUS; diff --git a/mysql-test/t/rpl_foreign_key_innodb-slave.opt b/mysql-test/t/rpl_foreign_key_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_foreign_key_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_foreign_key_innodb.test b/mysql-test/t/rpl_foreign_key_innodb.test deleted file mode 100644 index d085bff2012..00000000000 --- a/mysql-test/t/rpl_foreign_key_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################### -# Wrapper for rpl_foreign_key.test# -################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: FK not supported, skip test when NDB is forced -#################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_foreign_key.test diff --git a/mysql-test/t/rpl_free_items-slave.opt b/mysql-test/t/rpl_free_items-slave.opt deleted file mode 100644 index b828d03fafb..00000000000 --- a/mysql-test/t/rpl_free_items-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=test.% diff --git a/mysql-test/t/rpl_free_items.test b/mysql-test/t/rpl_free_items.test deleted file mode 100644 index 043e84160b8..00000000000 --- a/mysql-test/t/rpl_free_items.test +++ /dev/null @@ -1,22 +0,0 @@ -source include/master-slave.inc; -create table t1 (a int); -create table t2 (a int); -disable_query_log; -SET @query="INSERT INTO t2 SELECT * FROM t1 WHERE a REGEXP \"0\""; -let $1 = 2000; -while ($1) -{ - eval SET @query=concat(@query, " OR a REGEXP '$1'"); - dec $1; -} -let $1=`select @query`; -eval $1; -enable_query_log; -# I have seen the slave crash either now or at shutdown -sync_slave_with_master; -connection master; -drop table t1; -drop table t2; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_get_lock.test b/mysql-test/t/rpl_get_lock.test deleted file mode 100644 index 945bd98c993..00000000000 --- a/mysql-test/t/rpl_get_lock.test +++ /dev/null @@ -1,43 +0,0 @@ -source include/master-slave.inc; - -create table t1(n int); -insert into t1 values(get_lock("lock",2)); -dirty_close master; -connection master1; -select get_lock("lock",2); - -select release_lock("lock"); -#ignore -disable_query_log; -let $1=2000; -while ($1) -{ - do get_lock("lock",2); - do release_lock("lock"); - dec $1; -} -enable_query_log; -save_master_pos; -connection slave; -sync_with_master; -select get_lock("lock",3); -select * from t1; -# There is no point in testing REPLICATIION of the IS_*_LOCK -# functions; slave does not run with the same concurrency context as -# master (generally in slave we can't know that on master this lock -# was already held by another connection and so that the the -# get_lock() we're replicating timed out on master hence returned 0, -# or that the is_free_lock() we're playing returned 0 etc. -# But here all we do is test these functions outside of replication. -select is_free_lock("lock"), is_used_lock("lock") = connection_id(); -explain extended select is_free_lock("lock"), is_used_lock("lock"); -# Check lock functions -select is_free_lock("lock2"); -select is_free_lock(NULL); -connection master1; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ignore_grant-slave.opt b/mysql-test/t/rpl_ignore_grant-slave.opt deleted file mode 100644 index e931bfbd37e..00000000000 --- a/mysql-test/t/rpl_ignore_grant-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/t/rpl_ignore_grant.test b/mysql-test/t/rpl_ignore_grant.test deleted file mode 100644 index 2e6e2ce9a31..00000000000 --- a/mysql-test/t/rpl_ignore_grant.test +++ /dev/null @@ -1,59 +0,0 @@ -# Test that GRANT is not replicated to the slave -# when --replicate-wild-ignore-table=mysql.% -# In BUG#980, this test would _randomly_ fail. - -source include/master-slave.inc; - -# do not be influenced by other tests. -connection master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -save_master_pos; -connection slave; -sync_with_master; -# as these DELETE were not replicated, we need to do them manually on the -# slave. -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; - -# test non-replication of GRANT -connection master; -grant select on *.* to rpl_ignore_grant@localhost; -grant drop on test.* to rpl_ignore_grant@localhost; -show grants for rpl_ignore_grant@localhost; -save_master_pos; -connection slave; -sync_with_master; ---error 1141 #("no such grant for user") -show grants for rpl_ignore_grant@localhost; -# check it another way -select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; -select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; - -# test non-replication of SET PASSWORD -# first force creation of the user on slave (because as the user does not exist -# on slave, the SET PASSWORD may be replicated but silently do nothing; this is -# not what we want; we want it to be not-replicated). -grant select on *.* to rpl_ignore_grant@localhost; -connection master; -set password for rpl_ignore_grant@localhost=password("does it work?"); -save_master_pos; -connection slave; -sync_with_master; -select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; - -# clear what we have done, to not influence other tests. -connection master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -save_master_pos; -connection slave; -sync_with_master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ignore_revoke-slave.opt b/mysql-test/t/rpl_ignore_revoke-slave.opt deleted file mode 100644 index e931bfbd37e..00000000000 --- a/mysql-test/t/rpl_ignore_revoke-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/t/rpl_ignore_revoke.test b/mysql-test/t/rpl_ignore_revoke.test deleted file mode 100644 index 00171605a92..00000000000 --- a/mysql-test/t/rpl_ignore_revoke.test +++ /dev/null @@ -1,51 +0,0 @@ -# test verifies that REVOKE must not be replicated when -# slave server starts with --replicate-wild-ignore-table=mysql.% -# the option is set in rpl_ignore_revoke-slave.opt -# The first part of BUG#9483 for GRANT is checked by -# existed specific rpl_ignore_grant test case (BUG#980) - - -source include/master-slave.inc; - -### CLEAN-UP: create an account and manually duplicate it on the slave - -connection master; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; - -sync_slave_with_master; -#connection slave; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* slave:must be N */; - - -### TEST - -#connection slave; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; - -connection master; -revoke select on *.* from 'user_foo'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; - -sync_slave_with_master; -#connection slave; -select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; - -### CLEAN-UP - -connection slave; ---disable_abort_on_error -revoke select on *.* FROM 'user_foo'; ---enable_abort_on_error - -connection master; -delete from mysql.user where user="user_foo"; -sync_slave_with_master; - -# Since changes to mysql.* are ignored, the revoke need to -# be done on slave as well -delete from mysql.user where user="user_foo"; diff --git a/mysql-test/t/rpl_ignore_table-slave.opt b/mysql-test/t/rpl_ignore_table-slave.opt deleted file mode 100644 index 3aabbb2e0f5..00000000000 --- a/mysql-test/t/rpl_ignore_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 --replicate-wild-ignore-table=%.tmptbl% diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test deleted file mode 100644 index fd4ae64165a..00000000000 --- a/mysql-test/t/rpl_ignore_table.test +++ /dev/null @@ -1,164 +0,0 @@ -source include/master-slave.inc; - -# -# BUG#16487 -# -# Requirement: -# Multi-updates on ignored tables should not fail even if the slave does -# not have the ignored tables. -# -# Note table t1, t2, and t3 are ignored in the option file to this test. -# - ---echo **** Test case for BUG#16487 **** ---echo **** Master **** -connection master; -CREATE TABLE test.t4 (a int); -CREATE TABLE test.t1 (a int); - -# Expect: The row must *not* by updated on slave, since t1 is ignored -UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; - ---echo **** Slave **** -sync_slave_with_master; -SELECT * FROM t4; - -# Cleanup -connection master; -DROP TABLE t1; -DROP TABLE t4; - -sync_slave_with_master; - - -# -# Bug#25482 GRANT statements are not replicated if -# you use "replicate-ignore-table" -# - ---echo **** Test case for BUG#25482 **** ---echo **** Adding GRANTS on master **** - -connection master; -create table test.t1(a int); -create table test.t4(a int); - -# Simple user that should not replicate -GRANT SELECT ON test.t1 TO mysqltest1@localhost; - -# Partial replicate -GRANT INSERT ON test.t4 TO mysqltest2@localhost; -GRANT select, update, insert, references on t1 - to mysqltest2@localhost; - -# Partial replicate 2 -GRANT SELECT ON test.* TO mysqltest3@localhost; -GRANT INSERT ON test.t4 TO mysqltest3@localhost; -GRANT select(a), update(a), insert(a), references(a) on t4 - to mysqltest3@localhost; - -# Create another database and table -create database mysqltest2; -create table mysqltest2.t2 (id int); -# Create a grant that should replicate -GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; - -# Create a grant manually -insert into mysql.user (user, host) values ("mysqltest5", "somehost"); - -# Partial replicate 3 with *.* -GRANT SELECT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON test.* TO mysqltest6@localhost; -GRANT INSERT ON test.t1 TO mysqltest6@localhost; - -show grants for mysqltest1@localhost; -show grants for mysqltest2@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; -show grants for mysqltest6@localhost; - -flush privileges; -show grants for mysqltest5@somehost; - - -sync_slave_with_master; - ---echo **** Checking grants on slave **** - -# Check that grants are replicated to slave -show grants for mysqltest2@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; -show grants for mysqltest5@somehost; -show grants for mysqltest6@localhost; - -# mysqltest1 should not be on slave ---error 1141 -show grants for mysqltest1@localhost; - ---echo **** Revoking grants on master **** -connection master; -REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; -REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; -REVOKE select(a) on t4 - from mysqltest3@localhost; - -show grants for mysqltest1@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; - -sync_slave_with_master; - ---echo **** Checking grants on slave **** - -# mysqltest1 should not be on slave ---error 1141 -show grants for mysqltest1@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; - -# Cleanup -connection master; -drop table t1, t4, mysqltest2.t2; -drop database mysqltest2; -delete from mysql.user where user like "mysqltest%"; -delete from mysql.db where user like "mysqltest%"; -# -# BUG 27606 causes failure to replicate this statement -# move it to slave instead -#delete from mysql.tables_priv where user like "mysqltest%"; -delete from mysql.columns_priv where user like "mysqltest%"; -sync_slave_with_master; - -#BUG27606 -delete from mysql.tables_priv where user like "mysqltest%"; - -connection master; - -#BUG27606 -delete from mysql.tables_priv where user like "mysqltest%"; - -# -# bug#22877 replication character sets get out of sync -# using replicate-wild-ignore-table -# -connection master; ---disable_warnings -DROP TABLE IF EXISTS t5; ---enable_warnings -CREATE TABLE t5 ( - word varchar(50) collate utf8_unicode_ci NOT NULL default '' -) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -SET @@session.character_set_client=33,@@session.collation_connection=192; -CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; -INSERT INTO t5 (word) VALUES ('TEST’'); -SELECT HEX(word) FROM t5; -sync_slave_with_master; -connection slave; -SELECT HEX(word) FROM t5; ---error 1146 -SELECT * FROM tmptbl504451f4258$1; -connection master; -DROP TABLE t5; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ignore_table_update-slave.opt b/mysql-test/t/rpl_ignore_table_update-slave.opt deleted file mode 100644 index 177f89e0910..00000000000 --- a/mysql-test/t/rpl_ignore_table_update-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.mysqltest_foo diff --git a/mysql-test/t/rpl_ignore_table_update.test b/mysql-test/t/rpl_ignore_table_update.test deleted file mode 100644 index fe030f90411..00000000000 --- a/mysql-test/t/rpl_ignore_table_update.test +++ /dev/null @@ -1,38 +0,0 @@ -# This one assumes we are ignoring updates on table mysqltest_foo, but doing -# the ones on all other tables - -source include/master-slave.inc; -connection slave; - -# -# For this test we must be in the test database -# -use test; - ---disable_warnings -drop table if exists mysqltest_foo; -drop table if exists mysqltest_bar; ---enable_warnings - -create table mysqltest_foo (n int); -insert into mysqltest_foo values(4); -connection master; -use test; -create table mysqltest_foo (n int); -insert into mysqltest_foo values(5); -create table mysqltest_bar (m int); -insert into mysqltest_bar values(15); -create table t1 (k int); -insert into t1 values(55); -save_master_pos; -connection slave; -sync_with_master; -select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; -connection master; -drop table mysqltest_foo,mysqltest_bar,t1; -save_master_pos; -connection slave; -sync_with_master; -drop table mysqltest_foo,mysqltest_bar,t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_incident-master.opt b/mysql-test/t/rpl_incident-master.opt deleted file mode 100644 index 912801debc4..00000000000 --- a/mysql-test/t/rpl_incident-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=+d,incident_database_resync_on_replace diff --git a/mysql-test/t/rpl_incident.test b/mysql-test/t/rpl_incident.test deleted file mode 100644 index 507cd0e0798..00000000000 --- a/mysql-test/t/rpl_incident.test +++ /dev/null @@ -1,42 +0,0 @@ ---source include/master-slave.inc ---source include/have_debug.inc - ---echo **** On Master **** -CREATE TABLE t1 (a INT); - -INSERT INTO t1 VALUES (1),(2),(3); -SELECT * FROM t1; - -# This will generate an incident log event and store it in the binary -# log before the replace statement. -REPLACE INTO t1 VALUES (4); ---save_master_pos -SELECT * FROM t1; - -connection slave; ---wait_for_slave_to_stop - -# The 4 should not be inserted into the table, since the incident log -# event should have stop the slave. ---echo **** On Slave **** -SELECT * FROM t1; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; ---sync_with_master - -# Now, we should have inserted the row into the table and the slave -# should be running. We should also have rotated to a new binary log. - -SELECT * FROM t1; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -connection master; -DROP TABLE t1; ---sync_slave_with_master diff --git a/mysql-test/t/rpl_init_slave-slave.opt b/mysql-test/t/rpl_init_slave-slave.opt deleted file mode 100644 index 337e8a60d97..00000000000 --- a/mysql-test/t/rpl_init_slave-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---init-slave="set global max_connections=500" diff --git a/mysql-test/t/rpl_init_slave.test b/mysql-test/t/rpl_init_slave.test deleted file mode 100644 index 139b4902e12..00000000000 --- a/mysql-test/t/rpl_init_slave.test +++ /dev/null @@ -1,34 +0,0 @@ -source include/master-slave.inc; - -# -# Test of init_slave variable -# - -save_master_pos; -connection slave; -sleep 1; -show variables like 'init_slave'; -show variables like 'max_connections'; -sync_with_master; -reset master; -connection master; -show variables like 'init_slave'; -show variables like 'max_connections'; -save_master_pos; -connection slave; -sync_with_master; -# Save variable value -set @my_global_init_connect= @@global.init_connect; -set global init_connect="set @c=1"; -show variables like 'init_connect'; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# Restore changed global variable -set global init_connect= @my_global_init_connect; -set global max_connections= default; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_innodb.test b/mysql-test/t/rpl_innodb.test deleted file mode 100644 index b88276e2107..00000000000 --- a/mysql-test/t/rpl_innodb.test +++ /dev/null @@ -1,48 +0,0 @@ -# File for specialities regarding replication from or to InnoDB -# tables. - -source include/master-slave.inc; -source include/have_innodb.inc; - -# -# Bug#11401: Load data infile 'REPLACE INTO' fails on slave. -# -connection master; -CREATE TABLE t4 ( - id INT(5) unsigned NOT NULL auto_increment, - name varchar(15) NOT NULL default '', - number varchar(35) NOT NULL default 'default', - PRIMARY KEY (id), - UNIQUE KEY unique_rec (name,number) -) ENGINE=InnoDB; - ---disable_warnings -LOAD DATA - INFILE '../std_data_ln/loaddata_pair.dat' - REPLACE INTO TABLE t4 - (name,number); ---enable_warnings -SELECT * FROM t4; - -sync_slave_with_master; -SELECT * FROM t4; - -connection master; ---disable_warnings -LOAD DATA - INFILE '../std_data_ln/loaddata_pair.dat' - REPLACE INTO TABLE t4 - (name,number); ---enable_warnings -SELECT * FROM t4; - -sync_slave_with_master; -SELECT * FROM t4; - -connection master; ---disable_query_log -DROP TABLE t4; ---enable_query_log -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_insert.test b/mysql-test/t/rpl_insert.test deleted file mode 100644 index 0d471a0e0a9..00000000000 --- a/mysql-test/t/rpl_insert.test +++ /dev/null @@ -1,44 +0,0 @@ ---echo # ---echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog ---echo # - ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - ---disable_warnings -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; ---enable_warnings - -CREATE TABLE t1 (id INT, name VARCHAR(64)); - -let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')"; ---exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";" - -# Wait until all the 5000 inserts has been inserted into the table ---disable_query_log -let $counter= 300; # Max 30 seconds wait -while (`select count(*)!=5000 from mysqlslap.t1`) -{ - sleep 0.1; - dec $counter; - if (!$counter) - { - Number of records in t1 didnt reach 5000; - } -} ---enable_query_log - -SELECT COUNT(*) FROM mysqlslap.t1; -sync_slave_with_master; -SELECT COUNT(*) FROM mysqlslap.t1; - ---echo # ---echo # Cleanup ---echo # - -connection master; -USE test; -DROP SCHEMA mysqlslap; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_insert_id-slave.opt b/mysql-test/t/rpl_insert_id-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_id-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test deleted file mode 100644 index bfd66431d3c..00000000000 --- a/mysql-test/t/rpl_insert_id.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_insert_id.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_insert_id.test diff --git a/mysql-test/t/rpl_insert_id_pk-slave.opt b/mysql-test/t/rpl_insert_id_pk-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_id_pk-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_id_pk.test b/mysql-test/t/rpl_insert_id_pk.test deleted file mode 100644 index 01f30b78ac5..00000000000 --- a/mysql-test/t/rpl_insert_id_pk.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_insert_id.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_insert_id_pk.test diff --git a/mysql-test/t/rpl_insert_ignore-slave.opt b/mysql-test/t/rpl_insert_ignore-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_ignore.test b/mysql-test/t/rpl_insert_ignore.test deleted file mode 100644 index dc8994b82f3..00000000000 --- a/mysql-test/t/rpl_insert_ignore.test +++ /dev/null @@ -1,8 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/t/rpl_insert_select.test b/mysql-test/t/rpl_insert_select.test deleted file mode 100644 index 677be526982..00000000000 --- a/mysql-test/t/rpl_insert_select.test +++ /dev/null @@ -1,19 +0,0 @@ -# Testcase for BUG#10456 - INSERT INTO ... SELECT violating a primary key -# breaks replication - --- source include/master-slave.inc -connection master; - -create table t1 (n int not null primary key); -insert into t1 values (1); -create table t2 (n int); -insert into t2 values (1); -insert ignore into t1 select * from t2; -insert into t1 values (2); -sync_slave_with_master; -connection slave; -select * from t1; - -connection master; -drop table t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_known_bugs_detection-master.opt b/mysql-test/t/rpl_known_bugs_detection-master.opt deleted file mode 100644 index d4ba386a1a0..00000000000 --- a/mysql-test/t/rpl_known_bugs_detection-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,pretend_version_50034_in_binlog diff --git a/mysql-test/t/rpl_known_bugs_detection.test b/mysql-test/t/rpl_known_bugs_detection.test deleted file mode 100644 index b300603f454..00000000000 --- a/mysql-test/t/rpl_known_bugs_detection.test +++ /dev/null @@ -1,93 +0,0 @@ -# Test to see if slave can detect certain known bugs present -# on the master, and appropriately decides to stop -# (assuming the bug is fixed in the slave, slave cannot of course -# imitate the bug, so it has to stop). - -source include/have_debug.inc; -source include/master-slave.inc; - -# Currently only statement-based-specific bugs are here --- source include/have_binlog_format_mixed_or_statement.inc - -# -# This is to test that slave properly detects if -# master may suffer from: -# BUG#24432 "INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values" -# (i.e. on master, INSERT ON DUPLICATE KEY UPDATE is used and manipulates -# an auto_increment column, and is binlogged statement-based). -# - -# testcase with INSERT VALUES -CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, -UNIQUE(b)); -sync_slave_with_master; -connection master; -INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; -SELECT * FROM t1; -connection slave; ---source include/wait_for_slave_sql_to_stop.inc -# show the error message ---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # ---query_vertical show slave status; -# show that it was not replicated -SELECT * FROM t1; - -# restart replication for the next testcase -stop slave; -reset slave; -connection master; -reset master; -drop table t1; -connection slave; -start slave; - -# testcase with INSERT SELECT -connection master; -CREATE TABLE t1 ( - id bigint(20) unsigned NOT NULL auto_increment, - field_1 int(10) unsigned NOT NULL, - field_2 varchar(255) NOT NULL, - field_3 varchar(255) NOT NULL, - PRIMARY KEY (id), - UNIQUE KEY field_1 (field_1, field_2) -); -CREATE TABLE t2 ( - field_a int(10) unsigned NOT NULL, - field_b varchar(255) NOT NULL, - field_c varchar(255) NOT NULL -); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); -sync_slave_with_master; -connection master; -# Updating table t1 based on values from table t2 -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -# Inserting new record into t2 -INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); -# Updating t1 again -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -SELECT * FROM t1; -connection slave; ---source include/wait_for_slave_sql_to_stop.inc -# show the error message ---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # ---query_vertical show slave status; -# show that it was not replicated -SELECT * FROM t1; -connection master; -drop table t1, t2; -connection slave; -drop table t1, t2; - -# End of 5.0 tests diff --git a/mysql-test/t/rpl_load_from_master-slave.opt b/mysql-test/t/rpl_load_from_master-slave.opt deleted file mode 100644 index c015c02ba78..00000000000 --- a/mysql-test/t/rpl_load_from_master-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=mysqltest.% diff --git a/mysql-test/t/rpl_load_from_master.test b/mysql-test/t/rpl_load_from_master.test deleted file mode 100644 index 9bab7d5696e..00000000000 --- a/mysql-test/t/rpl_load_from_master.test +++ /dev/null @@ -1,180 +0,0 @@ -# This one assumes we are ignoring updates on tables in database mysqltest2, -# but doing the ones in database mysqltest -################################################################# -# Change Author: JBM -# Change Date: 2006-02-02 -# Change: Added ENGINE=MyISAM -# Reason: LOAD from master is only supported by MyISAM -################################################################# - -source include/master-slave.inc; ---disable_warnings -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -connection slave; -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -connection master; -create database mysqltest2; -create database mysqltest; ---enable_warnings - -save_master_pos; -connection slave; -sync_with_master; -create database mysqltest2; -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(4); -connection master; -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(5); -create table mysqltest.bar (m int)ENGINE=MyISAM; -insert into mysqltest.bar values(15); -save_master_pos; -connection slave; -sync_with_master; -select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; -connection master; -drop database mysqltest; -drop database if exists mysqltest2; -save_master_pos; -connection slave; -sync_with_master; ---error 1008 -drop database mysqltest; -drop database mysqltest2; - -# Now let's test load data from master - -# First create some databases and tables on the master - -connection master; -set sql_log_bin = 0; -create database mysqltest2; -create database mysqltest; -show databases; -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); -insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); - -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); -insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), - (13, 'thirteen test'); -set sql_log_bin = 1; -save_master_pos; -connection slave; -sync_with_master; - -# This should show that the slave is empty at this point -show databases; -# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM -# MASTER will neither touch database mysqltest nor mysqltest3 -create database mysqltest2; -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'original foo.t1'); -create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t3 values (1, 'original foo.t3'); -create database mysqltest3; -create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest3.t1 values (1, 'original foo2.t1'); - -# Create mysqltest, and mysqltest.t1, to check that it gets replaced, -# and mysqltest.t3 to check that it is not touched (there is no -# mysqltest.t3 on master) -create database mysqltest; -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'original bar.t1'); -create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t3 values (1, 'original bar.t3'); - -load data from master; - -# Now let's check if we have the right tables and the right data in them -show databases; -use mysqltest2; - -# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which -# databases have to be copied. So it thinks "mysqltest" has to be -# copied. Before 4.0.16 it would first drop "mysqltest", then create -# "mysqltest". This "drop" is a bug; in that case t3 would disappear. So -# here the effect of this bug (BUG#1248) would be to leave an empty -# "mysqltest" on the slave. - -show tables; # should be t1 & t3 -select * from t1; # should be slave's original -use mysqltest3; -show tables; # should be t1 -select * from t1; # should be slave's original -use mysqltest; -show tables; # should contain master's copied t1&t2, slave's original t3 -select * from mysqltest.t1; -select * from mysqltest.t2; -select * from mysqltest.t3; - -# Now let's see if replication works -connection master; -insert into mysqltest.t1 values (4, 'four test'); -save_master_pos; -connection slave; -sync_with_master; -select * from mysqltest.t1; - -# Check that LOAD DATA FROM MASTER is able to create master.info -# if needed (if RESET SLAVE was used before), before writing to it (BUG#2922). - -stop slave; -reset slave; -load data from master; -start slave; -# see if replication coordinates were restored fine -connection master; -insert into mysqltest.t1 values (5, 'five bar'); -save_master_pos; -connection slave; -sync_with_master; -select * from mysqltest.t1; - -# Check that LOAD DATA FROM MASTER reports the error if it can't drop a -# table to be overwritten. -# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX -# insert into mysqltest.t1 values(10, 'should be there'); -# flush tables; -# system chmod 500 $MYSQLTEST_VARDIR/slave-data/mysqltest/; -# --error 6 -# load data from master; # should fail (errno 13) -# system chmod 700 $MYSQLTEST_VARDIR/slave-data/mysqltest/; -# select * from mysqltest.t1; # should contain the row (10, ...) - - -# Check that LOAD TABLE FROM MASTER fails if the table exists on slave ---error 1050 -load table mysqltest.t1 from master; -drop table mysqltest.t1; -load table mysqltest.t1 from master; - -# Check what happens when requestion not existing table -# ---error 1188 -load table bar.t1 from master; - -# as LOAD DATA FROM MASTER failed it did not restart slave threads -# DISABLED FOR NOW -# start slave; - -# Now time for cleanup -connection master; -drop database mysqltest; -drop database mysqltest2; -save_master_pos; -connection slave; -sync_with_master; -# These have to be dropped on slave because they are not replicated -drop database mysqltest2; -drop database mysqltest3; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_load_table_from_master.test b/mysql-test/t/rpl_load_table_from_master.test deleted file mode 100644 index b9cec3858a9..00000000000 --- a/mysql-test/t/rpl_load_table_from_master.test +++ /dev/null @@ -1,98 +0,0 @@ -########################################################### -# Change Author: JBM -# Change Date: 2006-2-2 -# Change: Added ENGINE=$engine_type for first create table -# Reason: Only MyISAM supports load from master no need to -# run test case for other engines, in addition test will -# fail if other engines are set as default engine -########################################################### -# Change Author: JBM -# Change Date: 2006-2-3 -# Change: removed ENGINE=$engine_type for first create table -# and renamed test file to rpl_load_table_from_master.test. -# In addition added test requirements. -# Reason: Request from review. -############################################################ -# REQUIREMENT TEST 1: -# LOAD TABLE FROM MASTER must work with a forced timestamp. -############################################################ -# -# Test forced timestamp -# --- source include/master-slave.inc - --- echo "******************** Test Requirment 1 *************" - -# Don't log table creating to the slave as we want to test LOAD TABLE -SET SQL_LOG_BIN=0,timestamp=200006; -eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; -INSERT INTO t1 ( a) VALUE ('F'); -select unix_timestamp(t) from t1; -connection slave; -load table t1 from master; -select unix_timestamp(t) from t1; - -# Delete the created table on master and slave -connection master; -set SQL_LOG_BIN=1,timestamp=default; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -# -# Test copying table with checksum -# - -# Don't log table creating to the slave as we want to test LOAD TABLE -set SQL_LOG_BIN=0; - -####################################################### -# REQUIREMENTi TEST 2: -#LOAD TABLE FROM MASTER must work with table checksum -####################################################### --- echo "******************** Test Requirment 2 *************" - -eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; -INSERT INTO t1 VALUES (1); -save_master_pos; -connection slave; -sync_with_master; -load table t1 from master; -check table t1; -drop table t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -connection master; -set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t1; -create table t2 (word char(20) not null)ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t2; -create table t3 (word char(20) not null primary key)ENGINE=MyISAM; -connection slave; -load table t1 from master; -load table t2 from master; -load table t3 from master; -check table t1; -select count(*) from t2; -select count(*) from t3; -connection master; -set SQL_LOG_BIN=1; -drop table if exists t1,t2,t3; -save_master_pos; -connection slave; -sync_with_master; -create table t1(n int); -drop table t1; - - - - - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test deleted file mode 100644 index 6f9ee4ef80a..00000000000 --- a/mysql-test/t/rpl_loaddata.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/t/rpl_loaddata_charset.test b/mysql-test/t/rpl_loaddata_charset.test deleted file mode 100644 index 7f2389cb9f6..00000000000 --- a/mysql-test/t/rpl_loaddata_charset.test +++ /dev/null @@ -1,33 +0,0 @@ -# -# Check LOAD DATA + character sets + replication -# -source include/master-slave.inc; - -# -# Bug#15126 character_set_database is not replicated -# (LOAD DATA INFILE need it) -# -connection master; -create table t1 (a varchar(10) character set utf8); -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -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_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; - -select hex(a) from t1; - -save_master_pos; -connection slave; -sync_with_master; - -select hex(a) from t1; -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddata_m-master.opt b/mysql-test/t/rpl_loaddata_m-master.opt deleted file mode 100644 index 9d4a8f0b95e..00000000000 --- a/mysql-test/t/rpl_loaddata_m-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_ignore_db=test diff --git a/mysql-test/t/rpl_loaddata_m.test b/mysql-test/t/rpl_loaddata_m.test deleted file mode 100644 index 537d4c163ef..00000000000 --- a/mysql-test/t/rpl_loaddata_m.test +++ /dev/null @@ -1,52 +0,0 @@ -# See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules -# exist. -# This is for BUG#1100 (LOAD DATA INFILE was half-logged). -###################################################### -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Test rewritten to remove show binlog events -# and to test the option better + Cleanup -###################################################### --- source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -connection master; -# 'test' database should be ignored by the slave -USE test; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1; -SELECT COUNT(*) FROM test.t1; - -# 'mysqltest' database should NOT be ignored by the slave -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1; -SELECT COUNT(*) FROM mysqltest.t1; - -# Now lets check the slave to see what we have :-) -save_master_pos; -connection slave; -sync_with_master; - -SHOW DATABASES; - -USE test; -SHOW TABLES; - -USE mysqltest; -SHOW TABLES; -SELECT COUNT(*) FROM mysqltest.t1; - -#show binlog events; - -# Cleanup -connection master; -DROP DATABASE mysqltest; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of test diff --git a/mysql-test/t/rpl_loaddata_s-slave.opt b/mysql-test/t/rpl_loaddata_s-slave.opt deleted file mode 100644 index 9d4a8f0b95e..00000000000 --- a/mysql-test/t/rpl_loaddata_s-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_ignore_db=test diff --git a/mysql-test/t/rpl_loaddata_s.test b/mysql-test/t/rpl_loaddata_s.test deleted file mode 100644 index f397d741310..00000000000 --- a/mysql-test/t/rpl_loaddata_s.test +++ /dev/null @@ -1,28 +0,0 @@ -# See if the slave logs (in its own binlog, with --log-slave-updates) a -# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules. -# This is for BUG#1100 (LOAD DATA INFILE was half-logged). - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -connection slave; -# Not sure why we connect to slave and then try to reset master, but I will leave it [JBM] -reset master; - -connection master; -# 'test' is the current database -create table test.t1(a int, b int, unique(b)); -load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; - -# Test logging on slave; - -save_master_pos; -connection slave; -sync_with_master; -select count(*) from test.t1; # check that LOAD was replicated -source include/show_binlog_events.inc; - -# Cleanup -connection master; -drop table test.t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddata_simple.test b/mysql-test/t/rpl_loaddata_simple.test deleted file mode 100644 index 9e908cac677..00000000000 --- a/mysql-test/t/rpl_loaddata_simple.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/master-slave.inc - -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word; -sync_slave_with_master; - -# Check -SELECT * FROM t1 ORDER BY word; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test deleted file mode 100644 index b10603e7195..00000000000 --- a/mysql-test/t/rpl_loaddatalocal.test +++ /dev/null @@ -1,65 +0,0 @@ -# See if "LOAD DATA LOCAL INFILE" is well replicated -# (LOAD DATA LOCAL INFILE is not written to the binlog -# the same way as LOAD DATA INFILE : Append_blocks are smaller). -# In MySQL 4.0 <4.0.12 there were 2 bugs with LOAD DATA LOCAL INFILE : -# - the loaded file was not written entirely to the master's binlog, -# only the first 4KB, 8KB or 16KB usually. -# - the loaded file's first line was not written entirely to the -# master's binlog (1st char was absent) -source include/master-slave.inc; - -create table t1(a int); -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -enable_query_log; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -truncate table t1; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile -save_master_pos; -connection slave; -sync_with_master; -select a,count(*) from t1 group by a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - -# -# Now let us test how well we replicate LOAD DATA LOCAL in situation when -# we met duplicates in tables to which we are adding rows. -# (It supposed that LOAD DATA LOCAL ignores such errors) -# -connection master; -create table t1(a int); -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile -SELECT * FROM t1 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t1 ORDER BY a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_loadfile.test b/mysql-test/t/rpl_loadfile.test deleted file mode 100644 index a671bab15bb..00000000000 --- a/mysql-test/t/rpl_loadfile.test +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -############################################################################# -# TEST: To test the LOAD_FILE() in rbr # -############################################################################# -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# Includes --- source include/master-slave.inc - - -# Begin clean up test section ---disable_warnings -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; ---enable_warnings - -# Section 1 test - -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1,'test'); -UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1; -delimiter |; -create procedure test.p1() -begin - INSERT INTO test.t1 VALUES(2,'test'); - UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2; -end| -delimiter ;| - -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY blob_column; -save_master_pos; -# Need to allow some time when NDB engine is used for -# the injector thread to have time to populate binlog -sleep 10; -sync_slave_with_master; -connection slave; -SELECT * FROM test.t1 ORDER BY blob_column; - -# Cleanup -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_locale.test b/mysql-test/t/rpl_locale.test deleted file mode 100644 index 2f2d637e1b4..00000000000 --- a/mysql-test/t/rpl_locale.test +++ /dev/null @@ -1,24 +0,0 @@ -# Replication of locale variables - -source include/master-slave.inc; - -# -# Bug#22645 LC_TIME_NAMES: Statement not replicated -# -connection master; -create table t1 (s1 char(10)); -set lc_time_names= 'de_DE'; -insert into t1 values (date_format('2001-01-01','%W')); -set lc_time_names= 'en_US'; -insert into t1 values (date_format('2001-01-01','%W')); -select * from t1; -sync_slave_with_master; -connection slave; -select * from t1; -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests - - diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test deleted file mode 100644 index 2c6c1d9868d..00000000000 --- a/mysql-test/t/rpl_log_pos.test +++ /dev/null @@ -1,57 +0,0 @@ -########## -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# -# Testing of setting slave to wrong log position with master_log_pos -# - -# Passes with rbr no problem, removed statement include [jbm] - -source include/master-slave.inc; ---replace_column 3 -show master status; -sync_slave_with_master; - -stop slave; ---source include/wait_for_slave_to_stop.inc - -change master to master_log_pos=75; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical show slave status; - -start slave; -let $slave_param= Slave_SQL_Running; -let $slave_param_value= Yes; ---source include/wait_for_slave_param.inc -let $slave_param= Slave_IO_Running; -let $slave_param_value= No; ---source include/wait_for_slave_param.inc -stop slave; ---source include/wait_for_slave_to_stop.inc - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical show slave status; - -connection master; ---replace_column 3 -show master status; -create table if not exists t1 (n int); -drop table if exists t1; -create table t1 (n int); -insert into t1 values (1),(2),(3); -save_master_pos; -connection slave; -change master to master_log_pos=106; -start slave; -sync_with_master; -select * from t1 ORDER BY n; -connection master; -drop table t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/rpl_many_optimize.test b/mysql-test/t/rpl_many_optimize.test deleted file mode 100644 index 91fab0b27a8..00000000000 --- a/mysql-test/t/rpl_many_optimize.test +++ /dev/null @@ -1,22 +0,0 @@ -# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]" - -source include/master-slave.inc; - -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2); -# Now many OPTIMIZE to test if we crash (BUG#7658) -let $1=300; -disable_query_log; -disable_result_log; -while ($1) -{ - eval OPTIMIZE TABLE t1; - dec $1; -} -enable_result_log; -enable_query_log; -drop table t1; -# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE) -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_master_pos_wait.test b/mysql-test/t/rpl_master_pos_wait.test deleted file mode 100644 index 893c8746efc..00000000000 --- a/mysql-test/t/rpl_master_pos_wait.test +++ /dev/null @@ -1,18 +0,0 @@ -# See if master_pos_wait(,,timeout) -# Terminates with "timeout expired" (-1) -source include/master-slave.inc; -save_master_pos; -connection slave; -sync_with_master; -# Ask for a master log that has certainly not been reached yet -# timeout= 2 seconds -select master_pos_wait('master-bin.999999',0,2); -explain extended select master_pos_wait('master-bin.999999',0,2); -# Testcase for bug 651 (master_pos_wait() hangs if slave idle and STOP SLAVE). -send select master_pos_wait('master-bin.999999',0); -connection slave1; -stop slave sql_thread; -connection slave; -reap; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_misc_functions-slave.sh b/mysql-test/t/rpl_misc_functions-slave.sh deleted file mode 100755 index 8ce79797822..00000000000 --- a/mysql-test/t/rpl_misc_functions-slave.sh +++ /dev/null @@ -1 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test deleted file mode 100644 index db9b557baad..00000000000 --- a/mysql-test/t/rpl_misc_functions.test +++ /dev/null @@ -1,103 +0,0 @@ -# -# Test of replicating some difficult functions -# -source include/master-slave.inc; - -create table t1(id int, i int, r1 int, r2 int, p varchar(100)); -insert into t1 values(1, connection_id(), 0, 0, ""); -# don't put rand and password in the same query, to see if they replicate -# independently -# Pure rand test -insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); -# change the rand suite on the master (we do this because otherwise password() -# benefits from the fact that the above rand() is well replicated : -# it picks the same sequence element, which hides a possible bug in password() replication. -set sql_log_bin=0; -insert into t1 values(6, 0, rand(), rand(), ""); -delete from t1 where id=6; -set sql_log_bin=1; -# Pure password test -insert into t1 values(3, 0, 0, 0, password('does_this_work?')); -# "altogether now" -insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); -select * into outfile 'rpl_misc_functions.outfile' from t1; -sync_slave_with_master; -create table t2 like t1; -# read the values from the master table ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; -# compare them with the replica; the SELECT below should return no row -select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); - -connection master; -drop table t1; - -# End of 4.1 tests - -# -# BUG#25543 test calling rand() multiple times on the master in -# a stored procedure. -# - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (col_a double default NULL); - -DELIMITER |; - -# Use a SP that calls rand() multiple times -CREATE PROCEDURE test_replication_sp1() -BEGIN - INSERT INTO t1 VALUES (rand()), (rand()); - INSERT INTO t1 VALUES (rand()); -END| - -# Use a SP that calls another SP to call rand() multiple times -CREATE PROCEDURE test_replication_sp2() -BEGIN - CALL test_replication_sp1(); - CALL test_replication_sp1(); -END| - -# Use a SF that calls rand() multiple times -CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC -BEGIN - RETURN (rand() + rand()); -END| - -DELIMITER ;| - -# Exercise the functions and procedures then compare the results on -# the master to those on the slave. -CALL test_replication_sp1(); -CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); - -# Record the results of the query on the master ---exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql - ---sync_slave_with_master - -# Record the results of the query on the slave ---exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql - -# Compare the results from the master to the slave. ---exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql - -# Cleanup -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test_replication_sp1; -DROP PROCEDURE IF EXISTS test_replication_sp2; -DROP FUNCTION IF EXISTS test_replication_sf; -DROP TABLE IF EXISTS t1; ---enable_warnings ---sync_slave_with_master - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql diff --git a/mysql-test/t/rpl_mixed_ddl_dml.test b/mysql-test/t/rpl_mixed_ddl_dml.test deleted file mode 100644 index 6a1f81abed3..00000000000 --- a/mysql-test/t/rpl_mixed_ddl_dml.test +++ /dev/null @@ -1,46 +0,0 @@ -# Mixed DDL-DML (CREATE ... SELECT ...) statements can only be -# replicated properly in statement-based replication. -# Currently statement based due to bug 12345 ---source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# Test replication of auto_increment - -create table t1 (n int auto_increment primary key); -set insert_id = 2000; -insert into t1 values (NULL),(NULL),(NULL); -sync_slave_with_master; -select * from t1; -connection master; ---replace_result $SLAVE_MYPORT 9999 -show slave hosts; -drop table t1; -sync_slave_with_master; -stop slave; -connection master; - -# Test replication of timestamp - -create table t2(id int auto_increment primary key, created datetime); -set timestamp=12345; -insert into t2 set created=now(); -select * from t2; - -# Test replication of CREATE .. LIKE (Bug #2557) - -create table t3 like t2; -create temporary table t4 like t2; -create table t5 select * from t4; -save_master_pos; -connection slave; -start slave; -sync_with_master; -select * from t2; -show create table t3; -show create table t5; -connection master; -drop table t2,t3,t5; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_multi_delete-slave.opt b/mysql-test/t/rpl_multi_delete-slave.opt deleted file mode 100644 index c98fe0b0a46..00000000000 --- a/mysql-test/t/rpl_multi_delete-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=test.% diff --git a/mysql-test/t/rpl_multi_delete.test b/mysql-test/t/rpl_multi_delete.test deleted file mode 100644 index a251cbf8833..00000000000 --- a/mysql-test/t/rpl_multi_delete.test +++ /dev/null @@ -1,26 +0,0 @@ -source include/master-slave.inc; -create table t1 (a int primary key); -create table t2 (a int); - -insert into t1 values (1); -insert into t2 values (1); - - -delete t1.* from t1, t2 where t1.a = t2.a; - -save_master_pos; -select * from t1; -select * from t2; - -connection slave; -sync_with_master; -select * from t1; -select * from t2; - -connection master; -drop table t1,t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_multi_delete2-slave.opt b/mysql-test/t/rpl_multi_delete2-slave.opt deleted file mode 100644 index 0febb2891b1..00000000000 --- a/mysql-test/t/rpl_multi_delete2-slave.opt +++ /dev/null @@ -1 +0,0 @@ -"--replicate-rewrite-db=mysqltest_from->mysqltest_to" --replicate-do-table=mysqltest_to.a diff --git a/mysql-test/t/rpl_multi_delete2.test b/mysql-test/t/rpl_multi_delete2.test deleted file mode 100644 index 81379d4056b..00000000000 --- a/mysql-test/t/rpl_multi_delete2.test +++ /dev/null @@ -1,68 +0,0 @@ -#multi delete replication bugs - - -source include/master-slave.inc; - -#BUG#11139 - improper wild-table and table rules -#checking for multi deletes with an alias - -connection master; -set sql_log_bin=0; -create database mysqltest_from; -set sql_log_bin=1; - -connection slave; -create database mysqltest_to; - - -connection master; -use mysqltest_from; ---disable_warnings -drop table if exists a; ---enable_warnings -CREATE TABLE a (i INT); -INSERT INTO a VALUES(1); -DELETE alias FROM a alias WHERE alias.i=1; -SELECT * FROM a; -insert into a values(2),(3); -delete a alias FROM a alias where alias.i=2; -select * from a; -save_master_pos; -connection slave; - -use mysqltest_to; -sync_with_master; -select * from a; - -# BUG#3461 -connection master; -create table t1 (a int primary key); -create table t2 (a int); - -insert into t1 values (1); -insert into t2 values (1); - -delete t1.* from t1, t2 where t1.a = t2.a; - -save_master_pos; -select * from t1; -select * from t2; - -connection slave; -# BUG#3461 would cause sync to fail -sync_with_master; -error 1146; -select * from t1; -error 1146; -select * from t2; - -# cleanup -connection master; -set sql_log_bin=0; -drop database mysqltest_from; -set sql_log_bin=1; -connection slave; -drop database mysqltest_to; - -# End of 4.1 tests - diff --git a/mysql-test/t/rpl_multi_engine-slave.opt b/mysql-test/t/rpl_multi_engine-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_multi_engine-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_multi_engine.test b/mysql-test/t/rpl_multi_engine.test deleted file mode 100644 index 10780c765f7..00000000000 --- a/mysql-test/t/rpl_multi_engine.test +++ /dev/null @@ -1,108 +0,0 @@ -# See if replication between MyISAM, MEMORY and InnoDB works. - -#This test case is not written for NDB, result files do not -#match when NDB is the default engine --- source include/not_ndb_default.inc - --- source include/master-slave.inc - -connection slave; --- source include/have_innodb.inc - -connection master; --- source include/have_innodb.inc ---disable_warnings -create database if not exists mysqltest1; -use mysqltest1; -drop table if exists t1; - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc -VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT -0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); - -sync_slave_with_master; -use mysqltest1; - -# MyISAM to MyISAM then InnoDB then MEMORY - -connection master; -alter table t1 engine=myisam; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# MEMORY to ... - -connection master; -alter table t1 engine=memory; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# InnoDB to ... - -connection master; -alter table t1 engine=innodb; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# cleanup -connection master; -DROP TABLE t1; -# Need to drop mysqltest1 as well so other test will pass. -DROP DATABASE mysqltest1; -sync_slave_with_master; - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_multi_update.test b/mysql-test/t/rpl_multi_update.test deleted file mode 100644 index a6111455d16..00000000000 --- a/mysql-test/t/rpl_multi_update.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/t/rpl_multi_update2-slave.opt b/mysql-test/t/rpl_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/t/rpl_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/t/rpl_multi_update2.test b/mysql-test/t/rpl_multi_update2.test deleted file mode 100644 index 7401786501e..00000000000 --- a/mysql-test/t/rpl_multi_update2.test +++ /dev/null @@ -1,9 +0,0 @@ -####################################################### -# Wrapper for rpl_multi_update2.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### ---source include/not_ndb_default.inc -let $engine_type=MyISAM; ---source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test deleted file mode 100644 index 438a644729c..00000000000 --- a/mysql-test/t/rpl_multi_update3.test +++ /dev/null @@ -1,9 +0,0 @@ -####################################################### -# Wrapper for rpl_multi_update3.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### ---source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/t/rpl_multi_update4-slave.opt b/mysql-test/t/rpl_multi_update4-slave.opt deleted file mode 100644 index fea27db43ee..00000000000 --- a/mysql-test/t/rpl_multi_update4-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=d1.% diff --git a/mysql-test/t/rpl_multi_update4.test b/mysql-test/t/rpl_multi_update4.test deleted file mode 100644 index 4991a385f6f..00000000000 --- a/mysql-test/t/rpl_multi_update4.test +++ /dev/null @@ -1,45 +0,0 @@ -# Let's verify that multi-update is not always skipped by slave if -# some replicate-* rules exist. -# (BUG#15699) - -source include/master-slave.inc; - -### Clean-up - -connection master; ---disable_warnings -drop database if exists d1; -drop database if exists d2; - -connection slave; -drop database if exists d2; ---enable_warnings - -### Do on master - -connection master; -create database d1; # accepted by slave -create table d1.t0 (id int); -create database d2; # ignored by slave -use d2; -create table t1 (id int); -create table t2 (id int); -insert into t1 values (1), (2), (3), (4), (5); -insert into t2 select id + 3 from t1; -# a problematic query which must be filter out by slave -update t1 join t2 using (id) set t1.id = 0; -insert into d1.t0 values (0); # replication works - -### Check on slave - -sync_slave_with_master; -use d1; -select * from t0 where id=0; # must find - -### Clean-up -connection master; -drop database d1; -drop database d2; -sync_slave_with_master; - -# End of test diff --git a/mysql-test/t/rpl_ndb_2innodb-master.opt b/mysql-test/t/rpl_ndb_2innodb-master.opt deleted file mode 100644 index 701dddb075b..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_2innodb-slave.opt b/mysql-test/t/rpl_ndb_2innodb-slave.opt deleted file mode 100644 index d8857e54be2..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/t/rpl_ndb_2innodb.test b/mysql-test/t/rpl_ndb_2innodb.test deleted file mode 100644 index e09d8b6685b..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/master-slave.inc -connection slave; --- source include/have_innodb.inc -connection master; -SET storage_engine=ndb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_2myisam-master.opt b/mysql-test/t/rpl_ndb_2myisam-master.opt deleted file mode 100644 index 701dddb075b..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_2myisam-slave.opt b/mysql-test/t/rpl_ndb_2myisam-slave.opt deleted file mode 100644 index 6035ce27c46..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=myisam diff --git a/mysql-test/t/rpl_ndb_2myisam.test b/mysql-test/t/rpl_ndb_2myisam.test deleted file mode 100644 index abbe419bc02..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam.test +++ /dev/null @@ -1,13 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/master-slave.inc -SET storage_engine=ndb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_UUID.test b/mysql-test/t/rpl_ndb_UUID.test deleted file mode 100644 index c6fc218beed..00000000000 --- a/mysql-test/t/rpl_ndb_UUID.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; ---source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/t/rpl_ndb_auto_inc.test b/mysql-test/t/rpl_ndb_auto_inc.test deleted file mode 100644 index 53bb7e764f1..00000000000 --- a/mysql-test/t/rpl_ndb_auto_inc.test +++ /dev/null @@ -1,118 +0,0 @@ -# -# Test of auto_increment in CRBR -# -##################################### -# By: JBM -# Date: 2006-02-10 -# Change: Augmented test to use with cluster -##################################### ---source include/have_ndb.inc ---source include/master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---echo ***************** Test 1 ************************ ---echo -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -set @@insert_id=600; -# We expect a duplicate key error that we will ignore below ---error 1022 -insert into t1 values(600),(NULL),(NULL); -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -# -# Test that auto-increment works when slave has rows in the table -# - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; - -sync_slave_with_master; -insert into t1 values(2),(12),(22),(32),(42); -connection master; - -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo ---echo ** Slave should have 2, 12, 22, 32, 42 ** ---echo ** Master will have 2 but not 12, 22, 32, 42 ** ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -# End cleanup -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ndb_bank.test b/mysql-test/t/rpl_ndb_bank.test deleted file mode 100644 index c1448573f5b..00000000000 --- a/mysql-test/t/rpl_ndb_bank.test +++ /dev/null @@ -1,181 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_bank -# -# 1. start a "bank" application running on the master cluster -# 2. perform online sync of slave -# 3. periodically check consistency of slave -# 4. stop the bank application -# 5. check that the slave and master BANK databases are the same -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# kill any trailing processes ---system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true - ---disable_warnings -# initialize master ---connection master -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/src/NDBT_Tables.cpp -# ---connection master -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - DEPOSIT_COUNT INT UNSIGNED NOT NULL, - DEPOSIT_SUM INT UNSIGNED NOT NULL, - WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, - WITHDRAWAL_SUM INT UNSIGNED NOT NULL, - PURGED INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, - OWNER INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_ID)) - ENGINE = NDB; - -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, - ACCOUNT INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - OTHER_ACCOUNT INT UNSIGNED NOT NULL, - TRANSACTION_TYPE INT UNSIGNED NOT NULL, - TIME BIGINT UNSIGNED NOT NULL, - AMOUNT INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) - ENGINE = NDB; - -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, - VALUE BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, - DESCRIPTION CHAR(64) NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) - ENGINE = NDB; - -# -# create "BANK" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankCreator >> $NDB_TOOLS_OUTPUT - -# -# start main loop -# repeat backup-restore-check -# - -# set this high if testing to run many syncs in loop ---let $2=1 -while ($2) -{ - -# -# start "BANK" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTimer -w 5 >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankMakeGL >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTransactionMaker >> $NDB_TOOLS_OUTPUT & - -# -# let the "BANK" run for a while -# ---sleep 5 - ---disable_warnings -# initialize slave for sync ---connection slave -STOP SLAVE; -RESET SLAVE; -# to make sure we drop any ndbcluster tables -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -# create database -CREATE DATABASE BANK; ---enable_warnings - -# -# Time to sync the slave: -# start by taking a backup on master ---connection master -RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT - -# there is no neat way to find the backupid, this is a hack to find it... ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -let the_backup_id=`select @the_backup_id`; - -# restore on slave, first check that nothing is there ---connection slave ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - - -# -# Now loop and check consistency every 2 seconds on slave -# ---connection slave ---let $1=10 -while ($1) -{ - --sleep 2 - --replace_result $MASTER_MYPORT MASTER_PORT - --replace_column 1 7 8 9 16 22 23 33 - SHOW SLAVE STATUS; - STOP SLAVE; - --exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT - START SLAVE; - --dec $1 -} - -# -# Stop transactions -# ---exec killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL - -# -# Check that the databases are the same on slave and master -# 1. dump database BANK on both master and slave -# 2. compare, there should be no difference -# ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/master_BANK.sql ---connection master -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); ---sync_slave_with_master ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/slave_BANK.sql ---connection master -drop table t1; - -diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql; - - --dec $2 -} diff --git a/mysql-test/t/rpl_ndb_basic.test b/mysql-test/t/rpl_ndb_basic.test deleted file mode 100644 index e485b1d1bde..00000000000 --- a/mysql-test/t/rpl_ndb_basic.test +++ /dev/null @@ -1,261 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - - - -# -# Bug #11087 -# -# connect to the master and create tabe t1 in gotoslave database ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -# Bug #11087 would have row with nid 2 missing -select * from t1 order by nid; - ---connection master -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); - -begin; -# delete+insert = update -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); - -# update+delete = delete -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; - -# multi-update -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; - -# insert+delete = nothing -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; - -commit; -select * from t1 order by 1; ---sync_slave_with_master ---connection slave -select * from t1 order by 1; ---connection master -DROP table t1; - -# -# Test replication of table with no primary key -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -DROP table t1; - -# -# Bug #27378 update becomes delete on slave -# - ---connection master -CREATE TABLE `t1` ( - `prid` int(10) unsigned NOT NULL, - `id_type` enum('IMSI','SIP') NOT NULL, - `fkimssub` varchar(50) NOT NULL, - `user_id` varchar(20) DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `ptg_nbr` varchar(20) DEFAULT NULL, - `old_tmsi` int(10) unsigned DEFAULT NULL, - `new_tmsi` int(10) unsigned DEFAULT NULL, - `dev_capability` int(10) unsigned DEFAULT NULL, - `dev_oid` bigint(20) unsigned DEFAULT NULL, - `lac_cell_id` bigint(20) unsigned DEFAULT NULL, - `ms_classmark1` int(10) unsigned DEFAULT NULL, - `cipher_key` int(10) unsigned DEFAULT NULL, - `priid_master` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`prid`), - UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); - -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -DROP table t1; - -################################################################## -# -# Check that retries are made on the slave on some temporary errors -# - -# -# 1. Deadlock -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY USING HASH (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); - -# cause a lock on that row on the slave ---sync_slave_with_master ---connection slave ---echo **** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; - -# set number of retries low so we fail the retries -set GLOBAL slave_transaction_retries=1; - -# now do a change to this row on the master -# will deadlock on the slave because of lock above ---connection master ---echo **** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; - -# wait for deadlock to be detected -# sleep longer than dead lock detection timeout in config -# we do this 2 times, once with few retries to verify that we -# get a failure with the set sleep, and once with the _same_ -# sleep, but with more retries to get it to succeed ---sleep 5 - -# replication should have stopped, since max retries where not enough -# verify with show slave status ---connection slave ---echo **** On Slave **** ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 19 20 22 23 33 ---query_vertical SHOW SLAVE STATUS; - -# now set max retries high enough to succeed, and start slave again -set GLOBAL slave_transaction_retries=10; -START SLAVE; -# wait for deadlock to be detected and retried -# should be the same sleep as above for test to be valid ---sleep 5 - -# commit transaction to release lock on row and let replication succeed -select * from t1 order by nid; -COMMIT; - -# verify that the row succeded to be applied on the slave ---connection master ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - -# cleanup ---connection master -DROP TABLE t1; - - -# -# BUG#18094 -# Slave caches invalid table definition after atlters causes select failure -# ---connection master -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; - -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -ALTER TABLE t1 ADD c2 INT; - ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1; - -connection master; -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; - ---sync_slave_with_master -connection slave; -# here we would get error 1412 prior to bug -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---connection master -TRUNCATE t1; -SELECT count(*) FROM t1; -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); ---sync_slave_with_master -connection slave; -SELECT count(*) FROM t1; -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; - -# cleanup ---connection master -DROP TABLE t1; --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_blob.test b/mysql-test/t/rpl_ndb_blob.test deleted file mode 100644 index 94af986b222..00000000000 --- a/mysql-test/t/rpl_ndb_blob.test +++ /dev/null @@ -1,142 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# basic test of blob replication for NDB -# - -# easy test - ---connection master -create table t1 ( - a int not null primary key, - b text not null -) engine=ndb; - -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); - -select 'M', a, sha1(b) from t1 -order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b) from t1 -order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# hard test - ---connection master -create table t1 ( - a int not null primary key, - b text not null, - c int, - d longblob, - e tinyblob -) engine=ndbcluster; - ---disable_query_log -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; ---enable_query_log - -insert into t1 values ( - 0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( - 1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( - 2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( - 3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( - 4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( - 5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( - 6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( - 7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( - 8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( - 9, repeat(@s2,427), NULL, NULL, NULL); - -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# table with varsize key (future cluster/schema) - -# sql/ha_ndbcluster_binlog.cc ---connection master -CREATE TABLE IF NOT EXISTS t1 ( - db VARBINARY(63) NOT NULL, - name VARBINARY(63) NOT NULL, - slock BINARY(32) NOT NULL, - query BLOB NOT NULL, - node_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - id INT UNSIGNED NOT NULL, - version INT UNSIGNED NOT NULL, - type INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; - -insert into t1 values ('test','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', - 'ghi',repeat(@s2,1000),31,32,33,34,35); - -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---connection master -drop table t1; ---sync_slave_with_master - -# -# view the binlog - not deterministic (mats) -# - -#--connection master -#let $VERSION=`select version()`; -#--replace_result $VERSION VERSION -#show binlog events; diff --git a/mysql-test/t/rpl_ndb_blob2.test b/mysql-test/t/rpl_ndb_blob2.test deleted file mode 100644 index 2e8f02eaf75..00000000000 --- a/mysql-test/t/rpl_ndb_blob2.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test # -# Using wrapper to share test # -# code between engine tests # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_ndb_charset.test b/mysql-test/t/rpl_ndb_charset.test deleted file mode 100644 index eb412a0349a..00000000000 --- a/mysql-test/t/rpl_ndb_charset.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/t/rpl_ndb_circular.test b/mysql-test/t/rpl_ndb_circular.test deleted file mode 100644 index 88b5808160b..00000000000 --- a/mysql-test/t/rpl_ndb_circular.test +++ /dev/null @@ -1,57 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# set up circular replication - ---connection slave -RESET MASTER; ---connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT ---eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" -START SLAVE; - -# create the table on the "slave" ---connection slave -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -#CREATE TABLE t2 (a int key, b int) ENGINE=ndb; ---save_master_pos ---connection master ---sync_with_master -# now we should have a table on the master as well -SHOW TABLES; - -# insert some values on the slave and master ---connection master -INSERT INTO t1 VALUES (1,2); ---connection slave -INSERT INTO t1 VALUES (2,3); - -# ensure data has propagated both ways ---connection slave ---save_master_pos ---connection master ---sync_with_master ---sync_slave_with_master - -# connect to slave and ensure data it there. ---connection slave -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical show slave status; -# connect to master and ensure data it there. ---connection master -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical show slave status; - -# stop replication on "master" as not to replicate -# shutdown circularly, eg drop table ---connection master -STOP SLAVE; - -# cleanup ---connection master -DROP TABLE t1; diff --git a/mysql-test/t/rpl_ndb_circular_simplex.test b/mysql-test/t/rpl_ndb_circular_simplex.test deleted file mode 100644 index 2ea60beaba2..00000000000 --- a/mysql-test/t/rpl_ndb_circular_simplex.test +++ /dev/null @@ -1,82 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -connection master; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -sync_slave_with_master; -SHOW TABLES; - -# Lose the events from the slave binary log: there is no -# need to re-create the table on the master. -connection slave; -RESET MASTER; - -# Insert some values on the slave and master -connection master; -INSERT INTO t1 VALUES (1,2); -# Switch to slave once event is applied and insert a row -sync_slave_with_master; -connection slave; -INSERT INTO t1 VALUES (2,3); - -# ... it is now very probable that we have a mixed event in the binary -# log. If we don't, the test should still pass, but will not test the -# mixed event situation. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Replicate back to the master to test this mixed event on the master -STOP SLAVE; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; - -RESET MASTER; -START SLAVE; - -connection slave; -save_master_pos; -connection master; -sync_with_master; - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Check that there is no error in replication ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; - -# Check that we have the data on the master -SELECT * FROM t1 ORDER BY a; - -# We should now have another mixed event, likely with "slave" server -# id last, and with the STMT_END_F flag set. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# now lets see that this data is applied correctly on the slave -STOP SLAVE; -save_master_pos; - -connection slave; -START SLAVE; - -# check that we have the data on the slave -sync_with_master; -SELECT * FROM t1 ORDER BY a; - -# Check that there is no error in replication ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/t/rpl_ndb_commit_afterflush.test b/mysql-test/t/rpl_ndb_commit_afterflush.test deleted file mode 100644 index ce2a4d9506c..00000000000 --- a/mysql-test/t/rpl_ndb_commit_afterflush.test +++ /dev/null @@ -1,9 +0,0 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -# Wrapped to reuse test code on # -# Different engines # -# By JBM 2004-02-15 # -##################################### --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_commit_after_flush.test diff --git a/mysql-test/t/rpl_ndb_dd_advance.test b/mysql-test/t/rpl_ndb_dd_advance.test deleted file mode 100644 index 0a1ab37cdad..00000000000 --- a/mysql-test/t/rpl_ndb_dd_advance.test +++ /dev/null @@ -1,581 +0,0 @@ -############################################### -# Author: JBM # -# Date: 2006-03-07 # -# Purpose: To test advance DD and replication # -############################################### - -#### Include Section #### ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/big_test.inc -#--source include/have_ndb_extra.inc ---source include/master-slave.inc - -#### Test start cleanup section ##### ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -###################################################### -# Requirment: Cluster DD and replication must be able# -# to handle ALTER tables and indexes and must rpl # -# to the slave correctly # -###################################################### - -## Test #1 replication of CDD and Alter Tables ##### ---echo ***** Test 1 RPL of CDD and Alter ***** ---echo ***** Test 1 setup ***** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLE t1 - (c1 INT NOT NULL PRIMARY KEY, - c2 INT NOT NULL, - c3 INT NOT NULL) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - ---echo ***** insert some data ***** - -let $j= 900; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES($j,$j*2,$j+3); - dec $j; -} ---enable_query_log - ---echo ***** Select from Master ***** - -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo ***** Select from Slave ***** ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - -################################### -# Just to some File Schema check # -################################### - ---disable_query_log -SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME - FROM INFORMATION_SCHEMA.FILES - WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; ---enable_query_log - ---echo **** Do First Set of ALTERs in the master table **** -################################################### -# On this first set of alters I expect: -# 1. To be able to create and index on 2 columns -# 2. To be able to create a unique index -# 3. To be able to add two columns and have -# it all replicated correctly to the slave cluster. -################################################### -connection master; -CREATE INDEX t1_i ON t1(c2, c3); -#Bug 18039 -#CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; - ---echo **** Show first set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Second set of alters test 1 **** -############################################ -# With this next set of alters we have had -# Some issues with renames of tables. So this -# test renames our main table, drop and index off -# of it, creates another table with then name -# of the orginal table, inserts a row, drops -# the table and renames the orginal table back. -# I want to make sure that 1) the cluster does -# okay with this and 2) that it is replicated -# correctly. -############################################# -connection master; -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; - ---echo **** Show second set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; - ---echo **** Show second set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Third and last set of alters for test1 **** -######################################################### -# In this last set of alters, we are messing with the -# cluster ability to rebuild indexes, drop a column that make up -# an index with another column and change types several times in -# a row. I have choosen the BLOB as it seems to have had many -# issues in this release. I want to make sure that the cluster -# deals with these radical changes and that the replication to -# the slave cluster is dones correctly. -########################################################### -connection master; -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; - ---echo **** Show last set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo **** Show last set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; -# Bug 18094 -#SELECT * FROM t1 ORDER BY c1 LIMIT 5; -SELECT * FROM t1 where c1 = 1; - -connection master; -DROP TABLE t1; ---sync_slave_with_master -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; - -################### TEST 2 TPCB for disk data ########################### -# Requirement: To have Stored Procedures and Functions that are used to # -# populate and post transactions to the data base using CDD that span # -# 2 tables spaces and also use a memory only cluster tables. In addition# -# The slave is to be stopped, cleaned and restored and synced with the # -# Master cluster # -######################################################################### - ---echo ******** Create additional TABLESPACE test 2 ************** - -connection master; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 12M -ENGINE=NDB; - -###### CLEAN UP SECTION ############## -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; -######## Creat Table Section ######### ---echo *********** Create TPCB Tables ***************** -CREATE TABLE tpcb.account - (id INT, bid INT, balance DECIMAL(10,2), - filler CHAR(255), PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - -CREATE TABLE tpcb.branch - (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), - PRIMARY KEY(bid)) - ENGINE=NDB; - -CREATE TABLE tpcb.teller - (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), - PRIMARY KEY(tid)) - TABLESPACE ts2 STORAGE DISK - ENGINE=NDB; - -CREATE TABLE tpcb.history - (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, - tid INT, bid INT, amount DECIMAL(10,2), - tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, - filler CHAR(80),PRIMARY KEY (id)) - TABLESPACE ts2 STORAGE DISK - ENGINE=NDB; - ---echo ********* Create Procedures and Functions ************ -delimiter |; -CREATE PROCEDURE tpcb.load() -BEGIN - DECLARE acct INT DEFAULT 1000; - DECLARE brch INT DEFAULT 100; - DECLARE tell INT DEFAULT 1000; - DECLARE tmp INT DEFAULT 100; - WHILE brch > 0 DO - SET tmp = 100; - WHILE tmp > 0 DO - INSERT INTO tpcb.account VALUES (acct, brch, 0.0, "FRESH ACCOUNT"); - SET acct = acct - 1; - SET tmp = tmp -1; - END WHILE; - INSERT INTO tpcb.branch VALUES (brch, 0.0, "FRESH BRANCH"); - SET brch = brch - 1; - END WHILE; - WHILE tell > 0 DO - INSERT INTO tpcb.teller VALUES (tell, 0.0, "FRESH TELLER"); - SET tell = tell - 1; - END WHILE; -END| - -CREATE FUNCTION tpcb.account_id () RETURNS INT -BEGIN - DECLARE num INT; - DECLARE ran INT; - SELECT RAND() * 10 INTO ran; - IF (ran < 2) - THEN - SELECT RAND() * 10 INTO num; - ELSEIF (ran < 4) - THEN - SELECT RAND() * 100 INTO num; - ELSE - SELECT RAND() * 1000 INTO num; - END IF; - IF (num < 1) - THEN - RETURN 1; - END IF; - RETURN num; -END| - -CREATE FUNCTION tpcb.teller_id () RETURNS INT -BEGIN - DECLARE num INT; - DECLARE ran INT; - SELECT RAND() * 10 INTO ran; - IF (ran < 2) - THEN - SELECT RAND() * 10 INTO num; - ELSEIF (ran < 5) - THEN - SELECT RAND() * 100 INTO num; - ELSE - SELECT RAND() * 1000 INTO num; - END IF; - IF (num < 1) - THEN - RETURN 1; - END IF; - RETURN num; -END| - -CREATE PROCEDURE tpcb.trans() -BEGIN - DECLARE acct INT DEFAULT 0; - DECLARE brch INT DEFAULT 0; - DECLARE tell INT DEFAULT 0; - DECLARE bal DECIMAL(10,2) DEFAULT 0.0; - DECLARE amount DECIMAL(10,2) DEFAULT 1.00; - DECLARE test INT DEFAULT 0; - DECLARE bbal DECIMAL(10,2) DEFAULT 0.0; - DECLARE tbal DECIMAL(10,2) DEFAULT 0.0; - DECLARE local_uuid VARCHAR(255); - DECLARE local_user VARCHAR(255); - DECLARE local_time TIMESTAMP; - - SELECT RAND() * 10 INTO test; - SELECT tpcb.account_id() INTO acct; - SELECT tpcb.teller_id() INTO tell; - - SELECT account.balance INTO bal FROM tpcb.account WHERE id = acct; - SELECT account.bid INTO brch FROM tpcb.account WHERE id = acct; - SELECT teller.balance INTO tbal FROM tpcb.teller WHERE tid = tell; - SELECT branch.balance INTO bbal FROM tpcb.branch WHERE bid = brch; - - IF (test < 5) - THEN - SET bal = bal + amount; - SET bbal = bbal + amount; - SET tbal = tbal + amount; - UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; - UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; - UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; - ELSE - SET bal = bal - amount; - SET bbal = bbal - amount; - SET tbal = tbal - amount; - UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; - UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; - UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; - END IF; - - SET local_uuid=UUID(); - SET local_user=USER(); - SET local_time= NOW(); - INSERT INTO tpcb.history VALUES(NULL,acct,tell,brch,amount, local_time,local_user, - local_uuid,'completed trans'); -END| -delimiter ;| - ---echo ****** TEST 2 test time ********************************* -USE tpcb; - ---echo *********** Load up the database ****************** -CALL tpcb.load(); - ---echo ********** Check load master and slave ************** -SELECT COUNT(*) FROM account; ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ******** Run in some transactions *************** - -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - ---echo ***** Time to try slave sync *********** ---echo **** Must make sure slave is clean ***** ---connection slave -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---echo ********** Take a backup of the Master ************* -connection master; - -SELECT COUNT(*) FROM history; - -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM history; - -#RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT - ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat - -CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; - -DELETE FROM mysql.backup_info; - -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 - -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; - -let the_backup_id=`select @the_backup_id`; - -DROP TABLE IF EXISTS mysql.backup_info; -#RESET MASTER; - ---echo ************ Restore the slave ************************ -connection slave; -CREATE DATABASE tpcb; ---source include/ndb_restore_slave_eoption.inc - ---echo ***** Check a few slave restore values *************** -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ***** Add some more records to master ********* -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -# -# now setup replication to continue from last epoch -# 1. get apply_status epoch from slave -# 2. get corresponding _next_ binlog postition from master -# 3. change master on slave -# 4. add some transaction for slave to process -# 5. start the replication - ---echo ***** Finsh the slave sync process ******* ---disable_query_log -# 1. 2. 3. ---source include/ndb_setup_slave.inc ---enable_query_log - -# 4. ---echo * 4. * -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -# 5. ---echo * 5. * -connection slave; -START SLAVE; - ---echo **** We should be ready to continue on ************* - -connection master; -let $j= 50; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - ---echo ****** Let's make sure we match ******* ---echo ***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo ****** SLAVE ******** ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo *** DUMP MASTER & SLAVE FOR COMPARE ******** - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql - ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - ---echo *************** TEST 2 CLEANUP SECTION ******************** -connection master; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---sync_slave_with_master - -connection master; - ---echo ****** Do dumps compare ************ - -diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -## Note: Ths files should only get removed, if the above diff succeeds. - ---exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql ---exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_dd_basic.test b/mysql-test/t/rpl_ndb_dd_basic.test deleted file mode 100644 index 7387d39db87..00000000000 --- a/mysql-test/t/rpl_ndb_dd_basic.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of disk tables for NDB -# - -# -# Start by creating a logfile group -# - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; - -# -# Create a tablespace connected to the logfile group -# - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; - -# -# Create a table using this tablespace -# - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; - -# -# insert some data -# - -insert into t1 values (1,2,3); -select * from t1 order by pk1; - -# -# check that the data is also on the slave -# - ---sync_slave_with_master ---connection slave -select * from t1 order by pk1; - -# -# view the binlog -# - ---connection master --- source include/show_binlog_events2.inc - -# -# cleanup -# - -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_dd_partitions.test b/mysql-test/t/rpl_ndb_dd_partitions.test deleted file mode 100644 index 9291f38e8db..00000000000 --- a/mysql-test/t/rpl_ndb_dd_partitions.test +++ /dev/null @@ -1,310 +0,0 @@ -####################################### -# Author: JBM # -# Date: 2006-03-09 # -# Purpose: To test the replication of # -# Cluster Disk Data using partitions # -####################################### - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---echo --- Doing pre test cleanup --- - -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_query_log - - -# Start by creating a logfile group -################################## - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################################# - ---echo --- Start test 2 partition RANGE testing -- ---echo --- Do setup -- - - -################################################# -# Requirment: Create table that is partitioned # -# by range on year i.e. year(t) and replicate # -# basice operations such at insert, update # -# delete between 2 different storage engines # -# Alter table and ensure table is handled # -# Correctly on the slave # -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave -- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- ---enable_query_log - ---source include/rpl_multi_engine3.inc - ---echo --- End test 2 partition RANGE testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 3 partition LIST testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - ---echo --- Test 3 Alter to add partition --- - -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 3 partition LIST testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 4 partition HASH testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- show that tables have been created correctly --- - -SHOW CREATE TABLE t1; -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 4 partition HASH testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 5 partition by key testing --- ---echo --- Create Table Section --- - -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE,PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- Show that tables on master are ndbcluster tables --- - -SHOW CREATE TABLE t1; - ---echo --- Show that tables on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - -# Okay lets see how it holds up to table changes ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still right type --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 5 key partition testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; ---sync_slave_with_master - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_ndb_ddl.test b/mysql-test/t/rpl_ndb_ddl.test deleted file mode 100644 index 66db755de15..00000000000 --- a/mysql-test/t/rpl_ndb_ddl.test +++ /dev/null @@ -1,33 +0,0 @@ -#################### rpl_ndb_ddl.test ######################## -# # -# DDL statements (sometimes with implicit COMMIT) executed # -# by the master and it's propagation into the slave # -# # -############################################################## - -# -# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! -# -# 1. !All! objects to be dropped, renamed, altered ... must be created -# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test -# sequences start. -# -# 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# Except table d1.t1 where ONLY DML is allowed. -# -# If one preceeding test sequence hits a (sometimes not good visible, -# because the sql error code of the statement might be 0) bug -# and these rules are ignored, a following test sequence might earn ugly -# effects like failing 'sync_slave_with_master', crashes of the slave or -# abort of the test case etc.. -# - ---source include/master-slave.inc ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc -let $engine_type= NDB; -let $temp_engine_type= MEMORY; -let $show_binlog = 0; -let $manipulate = 0; --- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/t/rpl_ndb_delete_nowhere.test b/mysql-test/t/rpl_ndb_delete_nowhere.test deleted file mode 100644 index 92ceddf7f5c..00000000000 --- a/mysql-test/t/rpl_ndb_delete_nowhere.test +++ /dev/null @@ -1,8 +0,0 @@ -######################################### -# By JBM 2006-02-14 Test wrapping to # -# Share test code between engine tests # -######################################### ---source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_delete_no_where.test diff --git a/mysql-test/t/rpl_ndb_do_db-slave.opt b/mysql-test/t/rpl_ndb_do_db-slave.opt deleted file mode 100644 index fb5e378b65f..00000000000 --- a/mysql-test/t/rpl_ndb_do_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-db=replica diff --git a/mysql-test/t/rpl_ndb_do_db.test b/mysql-test/t/rpl_ndb_do_db.test deleted file mode 100644 index 9b65d43f244..00000000000 --- a/mysql-test/t/rpl_ndb_do_db.test +++ /dev/null @@ -1,57 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-database=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_do_table-slave.opt b/mysql-test/t/rpl_ndb_do_table-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/t/rpl_ndb_do_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/t/rpl_ndb_do_table.test b/mysql-test/t/rpl_ndb_do_table.test deleted file mode 100644 index 55a40d85172..00000000000 --- a/mysql-test/t/rpl_ndb_do_table.test +++ /dev/null @@ -1,46 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-table=db_name.tbl_name -# using cluster. Only t1 should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); - ---sync_slave_with_master -SHOW TABLES; -SELECT COUNT(*) FROM t1; - -# -# Bug #27044 replicated with unique field ndb table allows dup key inserts -# -connection master; - ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad',1)); - -connection slave; ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad too',1)); - -# cleanup - -connection master; -DROP TABLE IF EXISTS t1, t2; ---sync_slave_with_master diff --git a/mysql-test/t/rpl_ndb_extraCol.test b/mysql-test/t/rpl_ndb_extraCol.test deleted file mode 100644 index cf0501c490a..00000000000 --- a/mysql-test/t/rpl_ndb_extraCol.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using NDB -########################################### --- source include/have_binlog_format_row.inc ---source include/have_ndb.inc --- source include/master-slave.inc -let $engine_type = 'NDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_ndb_func003.test b/mysql-test/t/rpl_ndb_func003.test deleted file mode 100644 index a19de7d3d6b..00000000000 --- a/mysql-test/t/rpl_ndb_func003.test +++ /dev/null @@ -1,12 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -# This test was orginally designed# -# To test InnoDB using RBR, but # -# It can also be used to test NDB # -# So this wrapper is being used to# -# reduce test case code # -################################### --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_func003.test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_idempotent.test b/mysql-test/t/rpl_ndb_idempotent.test deleted file mode 100644 index f2bfe745523..00000000000 --- a/mysql-test/t/rpl_ndb_idempotent.test +++ /dev/null @@ -1,117 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; - -# get the master binlog pos from the epoch -connection master; ---replace_result $the_epoch ---replace_column 1 -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# insert some more values -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# check that we have it on the slave ---sync_slave_with_master ---connection slave -SELECT * FROM t1 ORDER BY c3; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -# stop slave and reset position to before the last changes -STOP SLAVE; ---replace_result $the_pos -eval CHANGE MASTER TO - master_log_file = '$the_file', - master_log_pos = $the_pos ; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -# start the slave again -# -> same events should have been applied again -# e.g. inserting rows that already there -# deleting a row which is not there -# updating a row which is not there -START SLAVE; - ---connection master -SELECT * FROM t1 ORDER BY c3; ---sync_slave_with_master ---connection slave -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; - -# -# cleanup -# ---connection master -DROP TABLE t1; -RESET master; ---connection slave -DROP TABLE t1; -RESET slave; - -START SLAVE; - -# -# Test that we can handle update of a row that does not exist on the slave -# will trigger usage of AO_IgnoreError on slave side so that the INSERT -# still succeeds even if the replication of the UPDATE generates an error. -# ---connection master -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); - ---sync_slave_with_master ---connection slave -DELETE FROM t1; - ---connection master -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; - ---sync_slave_with_master ---connection slave -SELECT * FROM t1; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -connection master; -DROP TABLE IF EXISTS t1; - -# End of 5.1 Test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-master.opt b/mysql-test/t/rpl_ndb_innodb2ndb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt deleted file mode 100644 index 7f9eb96dff1..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_innodb2ndb.test b/mysql-test/t/rpl_ndb_innodb2ndb.test deleted file mode 100644 index 229ee11353b..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_innodb.inc --- source include/master-slave.inc -connection slave; --- source include/have_ndb.inc -connection master; -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_innodb_trans-slave.opt b/mysql-test/t/rpl_ndb_innodb_trans-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_innodb_trans-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_innodb_trans.test b/mysql-test/t/rpl_ndb_innodb_trans.test deleted file mode 100644 index 127c2464570..00000000000 --- a/mysql-test/t/rpl_ndb_innodb_trans.test +++ /dev/null @@ -1,66 +0,0 @@ -# Test of a transaction mixing the two engines - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/master-slave.inc - -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; - - -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -drop table t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ndb_insert_ignore.test b/mysql-test/t/rpl_ndb_insert_ignore.test deleted file mode 100644 index 17acb5983f4..00000000000 --- a/mysql-test/t/rpl_ndb_insert_ignore.test +++ /dev/null @@ -1,8 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/t/rpl_ndb_load.test b/mysql-test/t/rpl_ndb_load.test deleted file mode 100644 index 2ee540afd18..00000000000 --- a/mysql-test/t/rpl_ndb_load.test +++ /dev/null @@ -1,66 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_load -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -# reset master -connection master; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/ndbapi/bench/ -# -connection master; -USE TEST_DB; -CREATE TABLE SUBSCRIBER - ( NUMBER CHAR(12) BINARY NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - GROUP_ID INT UNSIGNED NOT NULL, - LOCATION INT UNSIGNED NOT NULL, - SESSIONS INT UNSIGNED NOT NULL, - CHANGED_BY CHAR(32) BINARY NOT NULL, - CHANGED_TIME CHAR(32) BINARY NOT NULL, - PRIMARY KEY USING HASH (NUMBER)) - ENGINE = NDB; - -CREATE TABLE GROUP_T - ( GROUP_ID INT UNSIGNED NOT NULL, - GROUP_NAME CHAR(32) BINARY NOT NULL, - ALLOW_READ CHAR(1) BINARY NOT NULL, - ALLOW_INSERT INT UNSIGNED NOT NULL, - ALLOW_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (GROUP_ID)) - ENGINE = NDB; - -CREATE TABLE SESSION - ( NUMBER CHAR(12) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - DATA VARBINARY(1998) NOT NULL, - PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) - ENGINE = NDB; - -CREATE TABLE SERVER - ( SUFFIX CHAR(2) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - NO_OF_READ INT UNSIGNED NOT NULL, - NO_OF_INSERT INT UNSIGNED NOT NULL, - NO_OF_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) - ENGINE = NDB; - -# -# start "load" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/t/rpl_ndb_log-master.opt b/mysql-test/t/rpl_ndb_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_ndb_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_ndb_log.test b/mysql-test/t/rpl_ndb_log.test deleted file mode 100644 index e883d24b977..00000000000 --- a/mysql-test/t/rpl_ndb_log.test +++ /dev/null @@ -1,12 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_ndb_multi.test b/mysql-test/t/rpl_ndb_multi.test deleted file mode 100644 index 196d0a5ed6f..00000000000 --- a/mysql-test/t/rpl_ndb_multi.test +++ /dev/null @@ -1,71 +0,0 @@ ---source include/have_ndb.inc ---source include/have_multi_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# note: server2 is another "master" connected to the master cluster - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row, and make sure the other "master" gets it -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -connection server2; -reset master; -SHOW TABLES; -connection master; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -connection server2; -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch and stop the slave -connection master; -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; -stop slave; - -# get the master binlog pos from the epoch, from the _other_ "master", server2 -connection server2; ---replace_result $the_epoch -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# now connect the slave to the _other_ "master" -connection slave; ---replace_result $MASTER_MYPORT1 -eval CHANGE MASTER TO - master_port=$MASTER_MYPORT1, - master_log_file = '$the_file', - master_log_pos = $the_pos ; -start slave; - -# insert some more values on the first master -connection master; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -save_master_pos; - -# insert another row, and check that we have it on the slave -connection server2; -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -#sync_slave_with_master; -connection slave; ---sleep 2 -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; diff --git a/mysql-test/t/rpl_ndb_multi_update2-slave.opt b/mysql-test/t/rpl_ndb_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/t/rpl_ndb_multi_update2.test b/mysql-test/t/rpl_ndb_multi_update2.test deleted file mode 100644 index df4f0eec39d..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update2.test +++ /dev/null @@ -1,12 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update2.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc - -# Run this only for row based replication, as replication of -# auto_increment values are not supported with NDB as storage engine --- source include/have_binlog_format_row.inc - -let $engine_type=NDB; ---source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/t/rpl_ndb_multi_update3.test b/mysql-test/t/rpl_ndb_multi_update3.test deleted file mode 100644 index 008e2143987..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update3.test +++ /dev/null @@ -1,8 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update3.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-master.opt b/mysql-test/t/rpl_ndb_myisam2ndb-master.opt deleted file mode 100644 index 83ed8522e72..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=row diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt deleted file mode 100644 index 7f9eb96dff1..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_myisam2ndb.test b/mysql-test/t/rpl_ndb_myisam2ndb.test deleted file mode 100644 index 0c2df6441cb..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/master-slave.inc -connection slave; ---source include/have_ndb.inc -connection master; -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/t/rpl_ndb_relayrotate-slave.opt deleted file mode 100644 index cf4319f2b40..00000000000 --- a/mysql-test/t/rpl_ndb_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ --O max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/t/rpl_ndb_relayrotate.test b/mysql-test/t/rpl_ndb_relayrotate.test deleted file mode 100644 index c5ec0e1d21b..00000000000 --- a/mysql-test/t/rpl_ndb_relayrotate.test +++ /dev/null @@ -1,8 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_relayrotate.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_ndb_extra.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/t/rpl_ndb_rep_ignore-slave.opt b/mysql-test/t/rpl_ndb_rep_ignore-slave.opt deleted file mode 100644 index 6262cf451a6..00000000000 --- a/mysql-test/t/rpl_ndb_rep_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-db=test --replicate-ignore-table=replica.t1 diff --git a/mysql-test/t/rpl_ndb_rep_ignore.test b/mysql-test/t/rpl_ndb_rep_ignore.test deleted file mode 100644 index 47f5bce5527..00000000000 --- a/mysql-test/t/rpl_ndb_rep_ignore.test +++ /dev/null @@ -1,58 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 15-12-2006 -# Purpose: To test --replicate-ignore-table=db_name.tbl_name -# and --replicate-ignore-db=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -#SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_row_001.test b/mysql-test/t/rpl_ndb_row_001.test deleted file mode 100644 index 1e2a4ec02df..00000000000 --- a/mysql-test/t/rpl_ndb_row_001.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/t/rpl_ndb_sp003.test b/mysql-test/t/rpl_ndb_sp003.test deleted file mode 100644 index 75ad9f0a488..00000000000 --- a/mysql-test/t/rpl_ndb_sp003.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/t/rpl_ndb_sp006.test b/mysql-test/t/rpl_ndb_sp006.test deleted file mode 100644 index 590facc3648..00000000000 --- a/mysql-test/t/rpl_ndb_sp006.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/t/rpl_ndb_stm_innodb-master.opt b/mysql-test/t/rpl_ndb_stm_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_stm_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_stm_innodb.test b/mysql-test/t/rpl_ndb_stm_innodb.test deleted file mode 100644 index b92fbbcfce6..00000000000 --- a/mysql-test/t/rpl_ndb_stm_innodb.test +++ /dev/null @@ -1,62 +0,0 @@ ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc - ---connection master -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - ---sync_slave_with_master ---connection slave -alter table t1 engine ndb; -alter table t2 engine ndb; - -# check binlog position without begin ---connection master -insert into t1 values (1,2); - ---sync_slave_with_master ---connection slave ---replace_column 1 2 -select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; ---let $start_pos = `select @start_pos` ---let $end_pos = `select @end_pos` - ---connection master -# here is actually a bug, since there is no begin statement, the -# query is autocommitted, and end_pos shows end of the insert and not -# end of the commit ---replace_result $start_pos ---replace_column 5 # ---eval show binlog events from $start_pos limit 1 ---replace_result $start_pos $end_pos ---replace_column 2 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---eval show binlog events from $start_pos limit 1,1 - -# check binlog position with begin ---connection master -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - ---sync_slave_with_master ---connection slave ---replace_column 1 2 -select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; ---let $start_pos = `select @start_pos` ---let $end_pos = `select @end_pos` - ---connection master ---replace_result $start_pos ---replace_column 5 # ---eval show binlog events from $start_pos limit 1 ---replace_result $start_pos ---replace_column 2 # 4 # 5 # ---eval show binlog events from $start_pos limit 1,2 ---replace_result $start_pos $end_pos ---replace_column 2 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---eval show binlog events from $start_pos limit 3,1 diff --git a/mysql-test/t/rpl_ndb_sync.test b/mysql-test/t/rpl_ndb_sync.test deleted file mode 100644 index 14e2b36b588..00000000000 --- a/mysql-test/t/rpl_ndb_sync.test +++ /dev/null @@ -1,104 +0,0 @@ ---source include/have_ndb.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# stop the save ---connection slave -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; - -# get some data on the master ---connection master -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# take a backup on master ---source include/ndb_backup.inc - -# update a row -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; - -# restore on slave, first check that nothing is there ---connection slave - -# we should have no tables -SHOW TABLES; - ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# BUG#11960 -# prior to bugfix "DROP DATABASE" would give a warning since -# the events were not created by ndb_restore -# -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# continue test -SHOW TABLES; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - -# -# -# ---connection master ---sync_slave_with_master ---connection slave ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# Cleanup -# - ---connection master -DROP DATABASE ndbsynctest; ---sync_slave_with_master ---connection slave -STOP SLAVE; - -# -# Test some replication commands -# ---connection master -reset master; -# should now contain nothing -select * from mysql.ndb_binlog_index; - ---connection slave -reset slave; -# should now contain nothing -select * from mysql.ndb_apply_status; - -# End 5.1 Test diff --git a/mysql-test/t/rpl_ndb_trig004.test b/mysql-test/t/rpl_ndb_trig004.test deleted file mode 100644 index 7439da563a6..00000000000 --- a/mysql-test/t/rpl_ndb_trig004.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: 2006-02-14 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -# Test is wrapped to save code and share between engines # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc --- source include/master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_trig004.test - diff --git a/mysql-test/t/rpl_ndbapi_multi.test b/mysql-test/t/rpl_ndbapi_multi.test deleted file mode 100644 index 62b83f0557a..00000000000 --- a/mysql-test/t/rpl_ndbapi_multi.test +++ /dev/null @@ -1,11 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc --- source include/master-slave.inc --- source include/have_ndbapi_examples.inc - ---exec echo Running ndbapi_simple_dual ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" $SLAVE_MYSOCK "localhost:$NDBCLUSTER_PORT_SLAVE" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" "localhost:$NDBCLUSTER_PORT_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT - diff --git a/mysql-test/t/rpl_optimize.test b/mysql-test/t/rpl_optimize.test deleted file mode 100644 index 80f0c052fc8..00000000000 --- a/mysql-test/t/rpl_optimize.test +++ /dev/null @@ -1,54 +0,0 @@ -# Test for BUG#1858 "OPTIMIZE TABLE done by a client -# thread stops the slave SQL thread". -# You can replace OPTIMIZE by REPAIR. -##################################### -# Change Author: JBM -# Change Date: 2006-02-09 -# Change: NDB does not and will not support -# OPTIMIZE for memory tables. If and when -# it does support for Disk Data, a new -# version of this test will be need. -# Skipping this test if default engine = ndb -##################################### --- source include/not_ndb_default.inc --- source include/master-slave.inc - -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -save_master_pos; -# a few updates to force OPTIMIZE to do something -update t1 set b=(a/2*rand()); -delete from t1 order by b limit 10000; - -connection slave; -sync_with_master; -optimize table t1; -connection master; -save_master_pos; -connection slave; -# Bug was that when the INSERT terminated on slave, -# the slave SQL thread got killed by OPTIMIZE. -sync_with_master; # won't work if slave SQL thread stopped - -connection master; # cleanup -drop table t1; -connection slave; -sync_with_master; - -# If the machine is so fast that slave syncs before OPTIMIZE -# starts, this test wil demonstrate nothing but will pass. - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_packet-master.opt b/mysql-test/t/rpl_packet-master.opt deleted file mode 100644 index 42d4f94c999..00000000000 --- a/mysql-test/t/rpl_packet-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/t/rpl_packet-slave.opt b/mysql-test/t/rpl_packet-slave.opt deleted file mode 100644 index 42d4f94c999..00000000000 --- a/mysql-test/t/rpl_packet-slave.opt +++ /dev/null @@ -1 +0,0 @@ --O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test deleted file mode 100644 index 26fe36d8c40..00000000000 --- a/mysql-test/t/rpl_packet.test +++ /dev/null @@ -1,80 +0,0 @@ -# -# Check replication protocol packet size handling -# Bug#19402 SQL close to the size of the max_allowed_packet fails on slave -# - -# max-out size db name -source include/master-slave.inc; - -let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; -disable_warnings; -eval drop database if exists $db; -enable_warnings; -eval create database $db; - -connection master; -select @@net_buffer_length, @@max_allowed_packet; -disconnect master; - -# alas, can't use eval here; if db name changed apply the change here -connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________); - -connection master; -create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; - -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); -save_master_pos; - -connection slave; -sync_with_master; -eval select count(*) from `$db`.`t1` /* must be 1 */; - -SHOW STATUS LIKE 'Slave_running'; -select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; -connection master; -eval drop database $db; -save_master_pos; - -connection slave; -sync_with_master; - -# -# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits -# -# Check that a situation when the size of event on the master is greater than -# max_allowed_packet on the slave does not lead to infinite re-transmits. - -connection master; - -# Change the max packet size on master - -SET @@global.max_allowed_packet=4096; -SET @@global.net_buffer_length=4096; - -# Restart slave for new setting to take effect -connection slave; -STOP SLAVE; -START SLAVE; - -# Reconnect to master for new setting to take effect -disconnect master; -connect (master, localhost, root); -connection master; - -CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; - -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); - -# The slave I/O thread must stop after trying to read the above event -connection slave; -sleep 2; -SHOW STATUS LIKE 'Slave_running'; - -# cleanup -#connection master; -#drop table t1; -#connection slave; -#drop table t1; - - -# End of tests diff --git a/mysql-test/t/rpl_ps.test b/mysql-test/t/rpl_ps.test deleted file mode 100644 index b8792722192..00000000000 --- a/mysql-test/t/rpl_ps.test +++ /dev/null @@ -1,51 +0,0 @@ -# -# Test of replicating user variables -# -########################################################### -# 2006-02-08 By JBM added order by for use w/ NDB engine -########################################################### -source include/master-slave.inc; - -#save_master_pos; -#connection slave; -#sync_with_master; -#reset master; -#connection master; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1(n char(30)); - -prepare stmt1 from 'insert into t1 values (?)'; -set @var1= "from-master-1"; -execute stmt1 using @var1; -set @var1= "from-master-2-'',"; -execute stmt1 using @var1; -SELECT * FROM t1 ORDER BY n; - -set @var2= 'insert into t1 values (concat("from-var-", ?))'; -prepare stmt2 from @var2; -set @var1='from-master-3'; -execute stmt2 using @var1; - -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t1 ORDER BY n; - -connection master; - -drop table t1; - -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# End of 4.1 tests - -reset master; -reset slave; -disconnect master; diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test deleted file mode 100644 index 4f72996671d..00000000000 --- a/mysql-test/t/rpl_rbr_to_sbr.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/not_ndb_default.inc --- source include/master-slave.inc - -# Test that the slave temporarily switches to ROW when seeing binrow -# events when it is in STATEMENT or MIXED mode - -SET BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; - ---echo **** On Master **** -CREATE TABLE t1 (a INT, b LONG); -INSERT INTO t1 VALUES (1,1), (2,2); -INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); -let $VERSION=`select version()`; ---replace_result $VERSION VERSION ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; ---echo **** On Slave **** ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS ---replace_result $VERSION VERSION ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql - -connection master; -DROP TABLE IF EXISTS t1; - -# Let's compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching - -diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql; - -# If all is good, we can remove the files - ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql diff --git a/mysql-test/t/rpl_read_only-slave.opt b/mysql-test/t/rpl_read_only-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_read_only-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_read_only.test b/mysql-test/t/rpl_read_only.test deleted file mode 100644 index 62864b62a28..00000000000 --- a/mysql-test/t/rpl_read_only.test +++ /dev/null @@ -1,113 +0,0 @@ -# Test case for BUG #11733 --- source include/master-slave.inc --- source include/have_innodb.inc - -# Create a test and replicate it to slave -connection master; -create user test; -sync_slave_with_master; - -# Setting the master readonly : -# - the variable @@readonly is not replicated on the slave - -connect (master2,127.0.0.1,test,,test,$MASTER_MYPORT,); -connect (slave2,127.0.0.1,test,,test,$SLAVE_MYPORT,); - -connection master1; - -create table t1(a int) engine=InnoDB; -create table t2(a int) engine=MyISAM; -insert into t1 values(1001); -insert into t2 values(2001); - -connection master; -set global read_only=1; - -connection master1; -select @@read_only; -select * from t1; -select * from t2; - -sync_slave_with_master; -select @@read_only; -select * from t1; -select * from t2; - -# - replication of transactions -connection master; -set global read_only=0; - -connection master1; -BEGIN; -insert into t1 values(1002); -insert into t2 values(2002); - -connection master2; -BEGIN; -insert into t1 values(1003); -insert into t2 values(2003); - -connection master; -set global read_only=1; - -connection master1; -## works even with read_only=1, because master1 is root -COMMIT; - -connection master2; ---error ER_OPTION_PREVENTS_STATEMENT -COMMIT; - -connection master; -set global read_only=0; - -connection master1; -insert into t1 values(1004); -insert into t2 values(2004); - -select * from t1; -select * from t2; - -sync_slave_with_master; -select * from t1; -select * from t2; - -# Setting the slave readonly : replication will pass -# -connection slave1; -set global read_only=1; - -connection slave; -select @@read_only; -# Make sure the replicated table is also transactional -show create table t1; -# Make sure the replicated table is not transactional -show create table t2; - -connection master; -insert into t1 values(1005); -insert into t2 values(2005); -select * from t1; -select * from t2; - -sync_slave_with_master; -connection slave; -select * from t1; -select * from t2; - -# Non root user can not write on the slave -connection slave2; ---error ER_OPTION_PREVENTS_STATEMENT -insert into t1 values(1006); ---error ER_OPTION_PREVENTS_STATEMENT -insert into t2 values(2006); - -## Cleanup -connection master; -drop user test; -drop table t1; -drop table t2; -sync_slave_with_master; -set global read_only=0; - - diff --git a/mysql-test/t/rpl_redirect.test b/mysql-test/t/rpl_redirect.test deleted file mode 100644 index 078d1048794..00000000000 --- a/mysql-test/t/rpl_redirect.test +++ /dev/null @@ -1,47 +0,0 @@ -# -# Test of automatic redirection of queries to master/slave. -# - -source include/master-slave.inc; -# We disable this for now as PS doesn't handle redirection ---disable_ps_protocol - -#first, make sure the slave has had enough time to register -save_master_pos; -connection slave; -sync_with_master; - -#discover slaves -connection master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -SHOW SLAVE STATUS; ---replace_result $SLAVE_MYPORT SLAVE_PORT -SHOW SLAVE HOSTS; -rpl_probe; - -#turn on master/slave query direction auto-magic -enable_rpl_parse; -create table t1 ( n int); -insert into t1 values (1),(2),(3),(4); -disable_rpl_parse; -save_master_pos; -connection slave; -sync_with_master; -insert into t1 values(5); -connection master; -enable_rpl_parse; -# The first of the queries will be sent to the slave, the second to the master. -SELECT * FROM t1 ORDER BY n; -SELECT * FROM t1 ORDER BY n; -disable_rpl_parse; -SELECT * FROM t1 ORDER BY n; -connection slave; -SELECT * FROM t1 ORDER BY n; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_relay_space_innodb-master.opt b/mysql-test/t/rpl_relay_space_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_relay_space_innodb-slave.opt b/mysql-test/t/rpl_relay_space_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_relay_space_innodb.test b/mysql-test/t/rpl_relay_space_innodb.test deleted file mode 100644 index 156d53ef856..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb.test +++ /dev/null @@ -1,22 +0,0 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/t/rpl_relay_space_myisam.test b/mysql-test/t/rpl_relay_space_myisam.test deleted file mode 100644 index 1d8563e7fd9..00000000000 --- a/mysql-test/t/rpl_relay_space_myisam.test +++ /dev/null @@ -1,21 +0,0 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/t/rpl_relayrotate-slave.opt b/mysql-test/t/rpl_relayrotate-slave.opt deleted file mode 100644 index cf4319f2b40..00000000000 --- a/mysql-test/t/rpl_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ --O max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test deleted file mode 100644 index 46d54aea1d2..00000000000 --- a/mysql-test/t/rpl_relayrotate.test +++ /dev/null @@ -1,10 +0,0 @@ -####################################################### -# Wrapper for rpl_relayrotate.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/t/rpl_relayspace-slave.opt b/mysql-test/t/rpl_relayspace-slave.opt deleted file mode 100644 index 06d96aa3b9a..00000000000 --- a/mysql-test/t/rpl_relayspace-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---relay_log_space_limit=10 diff --git a/mysql-test/t/rpl_relayspace.test b/mysql-test/t/rpl_relayspace.test deleted file mode 100644 index 70315c14f34..00000000000 --- a/mysql-test/t/rpl_relayspace.test +++ /dev/null @@ -1,34 +0,0 @@ -# The slave is started with relay_log_space_limit=10 bytes, -# to force the deadlock after one event. - -source include/master-slave.inc; -connection slave; -stop slave; -connection master; -# This will generate a master's binlog > 10 bytes -create table t1 (a int); -drop table t1; -create table t1 (a int); -drop table t1; -connection slave; -reset slave; -start slave io_thread; -# Give the I/O thread time to block. -sleep 2; -# A bug caused the I/O thread to refuse stopping. -stop slave io_thread; -reset slave; -start slave; -# The I/O thread stops filling the relay log when -# it's >10b. And the SQL thread cannot purge this relay log -# as purge is done only when the SQL thread switches to another -# relay log, which does not exist here. -# So we should have a deadlock. -# if it is not resolved automatically we'll detect -# it with master_pos_wait that waits for farther than 1Ob; -# it will timeout after 10 seconds; -# also the slave will probably not cooperate to shutdown -# (as 2 threads are locked) -select master_pos_wait('master-bin.001',200,6)=-1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_replicate_do-slave.opt b/mysql-test/t/rpl_replicate_do-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/t/rpl_replicate_do-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test deleted file mode 100644 index 600840a2828..00000000000 --- a/mysql-test/t/rpl_replicate_do.test +++ /dev/null @@ -1,92 +0,0 @@ -# This test assumes we are ignoring updates on table t2, but doing -# updates on t1 -source include/master-slave.inc; ---disable_warnings -drop table if exists t11; -connection slave; -drop table if exists t11; ---enable_warnings - -create table t2 (n int); -insert into t2 values(4); -connection master; -create table t2 (s char(20)); -load data infile '../std_data_ln/words.dat' into table t2; -insert into t2 values('five'); -create table t1 (m int); -insert into t1 values(15),(16),(17); -update t1 set m=20 where m=16; -delete from t1 where m=17; -create table t11 select * from t1; -save_master_pos; -connection slave; -sync_with_master; -select * from t1 ORDER BY m; -select * from t2; ---error 1146 -select * from t11; -connection master; -drop table if exists t1,t2,t11; -save_master_pos; -connection slave; -sync_with_master; -# show slave status, just to see of it prints replicate-do-table ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # -show slave status; - -# -# BUG#12542 -# TEST: "SET ONE_SHOT should always be executed on slave" -# -# We could use any timezone different than server default in this test -# -connection master; -create table t1 (ts timestamp); -set one_shot time_zone='met'; -insert into t1 values('2005-08-12 00:00:00'); -set one_shot time_zone='met'; -select * from t1; -sync_slave_with_master; - -connection slave; -set one_shot time_zone='met'; -select * from t1; - -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests - -# -# Bug#24478 DROP TRIGGER is not caught by replicate-*-table filters -# ---echo *** master *** -connection master; -create table t1 (a int, b int); -create trigger trg1 before insert on t1 for each row set new.b=2; -create table t2 (a int, b int); -create trigger trg2 before insert on t2 for each row set new.b=2; -show tables; -show triggers; -sync_slave_with_master; ---echo *** slave *** -connection slave; -show tables; -show triggers; ---echo *** master *** -connection master; -drop trigger trg1; -drop trigger trg2; -show triggers; -sync_slave_with_master; ---echo *** slave *** -connection slave; -show tables; -show triggers; ---echo *** master *** -connection master; -drop table t1; -drop table t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_replicate_ignore_db-slave.opt b/mysql-test/t/rpl_replicate_ignore_db-slave.opt deleted file mode 100644 index 6e3aed44f78..00000000000 --- a/mysql-test/t/rpl_replicate_ignore_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate_ignore_db=mysqltest1 diff --git a/mysql-test/t/rpl_replicate_ignore_db.test b/mysql-test/t/rpl_replicate_ignore_db.test deleted file mode 100644 index bcfef919fad..00000000000 --- a/mysql-test/t/rpl_replicate_ignore_db.test +++ /dev/null @@ -1,30 +0,0 @@ -# see if --replicate-ignore-db works - ---source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest1; -drop database if exists mysqltest2; ---enable_warnings -create database mysqltest1; -create database mysqltest2; - -use mysqltest1; -create table t1 (a int); -insert into t1 values(1); -sync_slave_with_master; ---error 1146 -select * from mysqltest1.t1; - -connection master; -use mysqltest2; -create table t1 (a int); -insert into t1 values(1); -sync_slave_with_master; -select * from mysqltest2.t1; - -# cleanup -connection master; -drop database mysqltest1; -drop database mysqltest2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_rewrt_db-slave.opt b/mysql-test/t/rpl_rewrt_db-slave.opt deleted file mode 100644 index a462ad19ba0..00000000000 --- a/mysql-test/t/rpl_rewrt_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ -"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" diff --git a/mysql-test/t/rpl_rewrt_db.test b/mysql-test/t/rpl_rewrt_db.test deleted file mode 100644 index 52f04e073dd..00000000000 --- a/mysql-test/t/rpl_rewrt_db.test +++ /dev/null @@ -1,84 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; - -use mysqltest1; -create table t1 (a int); -insert into t1 values(9); -select * from mysqltest1.t1; -sync_slave_with_master; -show databases like 'mysqltest1'; # should be empty -select * from test.t1; -# cleanup -connection master; -drop table t1; -drop database mysqltest1; -sync_slave_with_master; - -# -# BUG#6353: -# Option --replicate-rewrite-db should work together with LOAD DATA INFILE -# - -connection slave; ---disable_warnings -drop database if exists rewrite; ---enable_warnings -create database rewrite; - -connection master; -use test; -create table t1 (a date, b date, c date not null, d date); -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -truncate table t1; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -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 ''''; -sync_slave_with_master; - -connection slave; -select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; - -connection master; -drop table t1; -create table t1 (a int, b char(10)); -load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -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; -sync_slave_with_master; - -connection slave; -# The empty line last comes from the end line field in the file -select * from rewrite.t1; - -drop database rewrite; - -connection master; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_rotate_logs-master.opt b/mysql-test/t/rpl_rotate_logs-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/rpl_rotate_logs-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/rpl_rotate_logs-slave.sh b/mysql-test/t/rpl_rotate_logs-slave.sh deleted file mode 100755 index 81490a54b4b..00000000000 --- a/mysql-test/t/rpl_rotate_logs-slave.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/t/rpl_rotate_logs.slave-mi b/mysql-test/t/rpl_rotate_logs.slave-mi deleted file mode 100644 index 80190bf6d29..00000000000 --- a/mysql-test/t/rpl_rotate_logs.slave-mi +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test deleted file mode 100644 index 155f9f4b6e0..00000000000 --- a/mysql-test/t/rpl_rotate_logs.test +++ /dev/null @@ -1,175 +0,0 @@ -# This test uses chmod, can't be run with root permissions --- source include/not_as_root.inc - --- source include/have_log_bin.inc - -# -# Test is run with max_binlog_size=2048 to force automatic rotation of the -# binary log -# Tests done: -# - Check that slaves reports correct failures if master.info has strange -# modes/information -# - Automatic binary log rotation -# - Ensure that temporary tables works over flush logs and binary log -# changes -# - Test creating a duplicate key error and recover from it - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc - -connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings -connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); -# Create empty file -write_file $MYSQLTEST_VARDIR/slave-data/master.info; -EOF -chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info; -connection slave; ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -# START SLAVE will fail because it can't read the file (mode 000) -# (system error 13) ---replace_result $MYSQL_TEST_DIR TESTDIR ---error 1105,1105,29 -start slave; -chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info; -# It will fail again because the file is empty so the slave cannot get valuable -# info about how to connect to the master from it (failure in -# init_strvar_from_file() in init_master_info()). ---error 1201 -start slave; ---replace_result $MASTER_MYPORT MASTER_PORT - -# CHANGE MASTER will fail because it first parses master.info before changing -# it (so when master.info is bad, people have to use RESET SLAVE first). ---error 1201 -eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; -reset slave; ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; -connection master; -reset master; -connection slave; -start slave; -connection master; - -# -# Test FLUSH LOGS -# -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables"); -create table t1 (s text); -insert into t1 values('Could not break slave'),('Tried hard'); -sync_slave_with_master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -select * from t1; -connection master; -flush logs; -create table t2(m int not null auto_increment primary key); -insert into t2 values (34),(67),(123); -flush logs; -show binary logs; -create table t3 select * from temp_table; - -sync_slave_with_master; - -select * from t3; -connection master; -drop table temp_table, t3; - -# -# Now lets make some duplicate key mess and see if we can recover from it -# - -# First insert a value on the slave -connection slave; -insert into t2 values(1234); - -#same value on the master -connection master; -set insert_id=1234; -insert into t2 values(NULL); -connection slave; ---source include/wait_for_slave_sql_to_stop.inc - -#restart slave skipping one event -set global sql_slave_skip_counter=1; -start slave; - -connection master; - -#let slave catch up -sync_slave_with_master; -connection master; -purge master logs to 'master-bin.000002'; -show master logs; -# we just tests if synonyms are accepted -purge binary logs to 'master-bin.000002'; -show binary logs; - -# Calculate time to use in "purge master logs before" by taking -# last modification time of t2 and adding 1 second -# This is donw in order to handle the case where file system -# time differs from mysqld's time ---disable_result_log -select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) - from information_schema.tables - where TABLE_SCHEMA="test" and TABLE_NAME="t2"; ---enable_result_log - -purge master logs before (@time_for_purge); -show binary logs; -insert into t2 values (65); -sync_slave_with_master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -select * from t2; - -# -# Test forcing the replication log to rotate -# - -connection master; -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables part 2"); -let $1=100; - -create table t3 (n int); -disable_query_log; -while ($1) -{ -#eval means expand $ expressions - eval insert into t3 values($1 + 4); - dec $1; -} -enable_query_log; -select count(*) from t3 where n >= 4; -create table t4 select * from temp_table; -show binary logs; -show master status; -save_master_pos; -connection slave; -sync_with_master; -select * from t4; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -# because of concurrent insert, the table may not be up to date -# if we do not lock -lock tables t3 read; -select count(*) from t3 where n >= 4; -unlock tables; -#clean up -connection master; -drop table if exists t1,t2,t3,t4; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_row_001.test b/mysql-test/t/rpl_row_001.test deleted file mode 100644 index 639c55362a5..00000000000 --- a/mysql-test/t/rpl_row_001.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MYISAM; --- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/t/rpl_row_4_bytes-master.opt b/mysql-test/t/rpl_row_4_bytes-master.opt deleted file mode 100644 index 0e1929507f7..00000000000 --- a/mysql-test/t/rpl_row_4_bytes-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,"old_row_based_repl_4_byte_map_id_master" diff --git a/mysql-test/t/rpl_row_4_bytes.test b/mysql-test/t/rpl_row_4_bytes.test deleted file mode 100644 index 73ef6dd2345..00000000000 --- a/mysql-test/t/rpl_row_4_bytes.test +++ /dev/null @@ -1,33 +0,0 @@ -# This test is to make sure that slaves can read a binlog containining -# table map ids stored in 4 bytes, even though we now store them in 6 -# bytes. This is for backward-compatibility. -# If the slave does not detect that the master stores the table map id -# in 4 bytes, slave will read 6 bytes, and so will read the 2 bytes of -# flags at the place where there actually is data, so the test should -# fail. - --- source include/have_binlog_format_row.inc --- source include/have_debug.inc --- source include/master-slave.inc - -connection master; ---disable_warnings -drop database if exists mysqltest1; -create database mysqltest1; ---enable_warnings -use mysqltest1; -CREATE TABLE t1 (a char(3)); -CREATE TABLE t2 (a char(3)); -insert into t1 values("ANN"); -insert into t1 values("GUI"); -insert into t2 values("LIL"); -insert into t2 values("ABE"); -insert into t2 values("ANG"); -sync_slave_with_master; -use mysqltest1; -select * from t1 order by a; -select * from t2 order by a; - -connection master; -DROP DATABASE mysqltest1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_NOW.test b/mysql-test/t/rpl_row_NOW.test deleted file mode 100644 index c28b714277e..00000000000 --- a/mysql-test/t/rpl_row_NOW.test +++ /dev/null @@ -1,74 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated 08/30/2005 Added dumps and diff # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12480 # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -create database if not exists mysqltest1; -DROP TABLE IF EXISTS mysqltest1.t1; ---enable_warnings - - -# Begin test section 1 -CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, - a TIMESTAMP DEFAULT '2005-05-05 01:01:01', - b TIMESTAMP DEFAULT '2005-05-05 01:01:01', - PRIMARY KEY(n)); -delimiter |; -CREATE FUNCTION mysqltest1.f1() RETURNS TIMESTAMP -BEGIN - DECLARE v1 INT DEFAULT 300; - WHILE v1 > 0 DO - SET v1 = v1 - 1; - END WHILE; - RETURN NOW(); -END| -delimiter ;| - -INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); - -delimiter |; -CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 -FOR EACH ROW BEGIN - SET new.b = mysqltest1.f1(); -END| -delimiter ;| - -INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); - -sync_slave_with_master; - -connection master; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_slave.sql - -# lets cleanup -DROP TABLE IF EXISTS mysqltest1.t1; -DROP FUNCTION mysqltest1.f1; -DROP DATABASE mysqltest1; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) The failed dump -# files will be located in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/NOW_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/NOW_slave.sql - -sync_slave_with_master; -# End of 5.1 test case diff --git a/mysql-test/t/rpl_row_USER.test b/mysql-test/t/rpl_row_USER.test deleted file mode 100644 index 7b13ebc50ee..00000000000 --- a/mysql-test/t/rpl_row_USER.test +++ /dev/null @@ -1,60 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -############################################################################# -# TEST: To test the USER() and CURRENT_USER() in rbr # -############################################################################# -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -DROP DATABASE IF EXISTS mysqltest1; -CREATE DATABASE mysqltest1; ---enable_warnings - -# Section 1 test -CREATE USER tester IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO ''@'localhost%'; -FLUSH PRIVILEGES; -connect (m_1,localhost,tester,,mysqltest1); - -connection m_1; -CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a)); -INSERT INTO mysqltest1.t1 VALUES(1,USER()); -INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER()); -delimiter |; -create procedure mysqltest1.p1() -begin - INSERT INTO mysqltest1.t1 VALUES(3,USER()); - INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); -end| -delimiter ;| - -CALL mysqltest1.p1(); -connection master; -SELECT * FROM mysqltest1.t1 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t1 ORDER BY a; - -connection master; -# Lets cleanup -#show binlog events; - -DROP DATABASE mysqltest1; -REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; -REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; -DROP USER tester@'%'; -DROP USER ''@'localhost%'; - -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_UUID.test b/mysql-test/t/rpl_row_UUID.test deleted file mode 100644 index 6ead7c2ee9b..00000000000 --- a/mysql-test/t/rpl_row_UUID.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; ---source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/t/rpl_row_basic_11bugs-master.opt b/mysql-test/t/rpl_row_basic_11bugs-master.opt deleted file mode 100644 index ed7656c1f99..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs-master.opt +++ /dev/null @@ -1,2 +0,0 @@ ---binlog_ignore_db=test_ignore --loose-innodb - diff --git a/mysql-test/t/rpl_row_basic_11bugs-slave.opt b/mysql-test/t/rpl_row_basic_11bugs-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test deleted file mode 100644 index 0109edf4264..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs.test +++ /dev/null @@ -1,186 +0,0 @@ ---source include/have_binlog_format_row.inc - -let $SERVER_VERSION=`select version()`; - -#This test case is not written for NDB, the result files -#will not match when NDB is the default engine --- source include/not_ndb_default.inc - ---source include/master-slave.inc - -# Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table -# on slave for writes) - -CREATE DATABASE test_ignore; # --binlog_ignore_db=mysqltest_ignore - ---echo **** On Master **** -SHOW DATABASES; -USE test; -CREATE TABLE t1 (a INT, b INT); -SHOW TABLES; -INSERT INTO t1 VALUES (1,1), (2,2); -USE test_ignore; -CREATE TABLE t2 (a INT, b INT); -SHOW TABLES; -INSERT INTO t2 VALUES (3,3), (4,4); -source include/show_binlog_events.inc; -sync_slave_with_master; ---echo **** On Slave **** -SHOW DATABASES; -USE test; -SHOW TABLES; ---error 1049 -USE test_ignore; - -connection master; -DROP DATABASE test_ignore; -sync_slave_with_master; - -# Bug#19995: Extreneous table maps generated for statements that does -# not generate rows ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -connection master; -CREATE TABLE t1 (a INT); -DELETE FROM t1; -INSERT INTO t1 VALUES (1),(2); -DELETE FROM t1 WHERE a = 0; -UPDATE t1 SET a=99 WHERE a = 0; ---replace_result $SERVER_VERSION SERVER_VERSION ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; - -DROP TABLE t1; - -# BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on -# slave ---echo ================ Test for BUG#17620 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - ---echo **** On Slave **** -connection slave; -SET GLOBAL QUERY_CACHE_SIZE=0; - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - ---echo **** On Slave **** -sync_slave_with_master; -SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; - ---echo **** On Master **** -connection master; -INSERT INTO t1 VALUES (4),(5),(6); - ---echo **** On Slave **** -sync_slave_with_master; -SELECT * FROM t1; - ---echo **** On Master **** -connection master; -INSERT INTO t1 VALUES (7),(8),(9); - ---echo **** On Slave **** -sync_slave_with_master; -SELECT * FROM t1; - -SET GLOBAL QUERY_CACHE_SIZE=0; - -# Bug#22550: Replication of BIT columns failing ---echo ================ Test for BUG#22550 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -connection master; -CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; -sync_slave_with_master; - -connection master; -INSERT INTO t1 VALUES(1,2); -SELECT HEX(a),b FROM t1; -sync_slave_with_master; -SELECT HEX(a),b FROM t1; - -connection master; -UPDATE t1 SET a=0 WHERE b=2; -SELECT HEX(a),b FROM t1; -sync_slave_with_master; -SELECT HEX(a),b FROM t1; - -connection master; -DROP TABLE IF EXISTS t1; -sync_slave_with_master; - -# BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT -# field does not work - ---echo ================ Test for BUG#22583 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -# disabling warnings temporarily for ENGINE=INNODB to work without InnoDB ---disable_warnings ---echo **** On Master **** -connection master; -CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; -CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; -CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM; -CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB; ---echo **** On Slave **** -sync_slave_with_master; -ALTER TABLE t1_myisam ENGINE=INNODB; -ALTER TABLE t1_innodb ENGINE=MYISAM; -ALTER TABLE t2_myisam ENGINE=INNODB; -ALTER TABLE t2_innodb ENGINE=MYISAM; ---enable_warnings - ---echo **** On Master **** -connection master; -INSERT INTO t1_myisam VALUES(1, b'0', 257); -INSERT INTO t1_myisam VALUES(2, b'1', 256); -INSERT INTO t1_innodb VALUES(1, b'0', 257); -INSERT INTO t1_innodb VALUES(2, b'1', 256); -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -INSERT INTO t2_myisam VALUES(1, b'0', 9); -INSERT INTO t2_myisam VALUES(2, b'1', 8); -INSERT INTO t2_innodb VALUES(1, b'0', 9); -INSERT INTO t2_innodb VALUES(2, b'1', 8); -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; ---echo **** On Slave **** -sync_slave_with_master; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; - ---echo **** On Master **** -connection master; -UPDATE t1_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -UPDATE t1_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -UPDATE t2_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -UPDATE t2_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; ---echo **** On Slave **** -sync_slave_with_master; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; - ---echo **** On Master **** -connection master; -DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_basic_2myisam.test b/mysql-test/t/rpl_row_basic_2myisam.test deleted file mode 100644 index c2cef800ec8..00000000000 --- a/mysql-test/t/rpl_row_basic_2myisam.test +++ /dev/null @@ -1,3 +0,0 @@ -let $type= 'MYISAM' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test diff --git a/mysql-test/t/rpl_row_basic_3innodb-slave.opt b/mysql-test/t/rpl_row_basic_3innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_basic_3innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_basic_3innodb.test b/mysql-test/t/rpl_row_basic_3innodb.test deleted file mode 100644 index 89effc4b3bb..00000000000 --- a/mysql-test/t/rpl_row_basic_3innodb.test +++ /dev/null @@ -1,6 +0,0 @@ --- source include/have_innodb.inc - -let $type= 'INNODB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test - diff --git a/mysql-test/t/rpl_row_basic_7ndb.test b/mysql-test/t/rpl_row_basic_7ndb.test deleted file mode 100644 index 1ec2fb333ae..00000000000 --- a/mysql-test/t/rpl_row_basic_7ndb.test +++ /dev/null @@ -1,5 +0,0 @@ --- source include/have_ndb.inc -let $type= 'NDB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_row_basic_8partition.test b/mysql-test/t/rpl_row_basic_8partition.test deleted file mode 100644 index 687b3bc785d..00000000000 --- a/mysql-test/t/rpl_row_basic_8partition.test +++ /dev/null @@ -1,210 +0,0 @@ -############################################################ -# Author: MATZ # -# Date: 2006-03-22 # -# Purpose: See if replication of partition tables work # -# Most of this test is copied from the rpl_xxx2yyy tests, # -# but here we just test some simple basic replication of # -# partition tables with same engine (MyISAM) in both ends. # -############################################################ - ---source include/have_binlog_format_row.inc ---source include/have_partition.inc ---source include/not_ndb_default.inc ---source include/master-slave.inc -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; - -let $maybe_ro_var = @@BINLOG_FORMAT; -let $val4var = ROW; ---source include/safe_set_to_maybe_ro_var.inc - ---echo **** Partition RANGE testing **** - -# Create table that is partitioned by range on year i.e. year(t) and -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave -# Note that the storage engine should not be explicit: the default -# storage engine is used on master and slave. - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave -- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo **** Partition LIST testing **** - -# Create table that is partitioned by list on id i.e. (2,4). Pretend -# that we missed one and alter to add. Then replicate basice -# operations such at insert, update delete between 2 different storage -# engines Alter table and ensure table is handled Correctly on the -# slave. - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142), - PARTITION p2 VALUES IN (412)); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo **** Partition HASH testing **** - -# Create table that is partitioned by hash on year i.e. YEAR(t). Then -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - -# This part does not work ---echo **** Partition by KEY **** - -# Create table that is partitioned by key on id with 4 parts. Then -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE,PRIMARY KEY(id)) - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -DROP TABLE IF EXISTS t1; - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_row_blob_innodb-slave.opt b/mysql-test/t/rpl_row_blob_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_blob_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_blob_innodb.test b/mysql-test/t/rpl_row_blob_innodb.test deleted file mode 100644 index 0bce657f9f9..00000000000 --- a/mysql-test/t/rpl_row_blob_innodb.test +++ /dev/null @@ -1,12 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_row_blob_myisam.test b/mysql-test/t/rpl_row_blob_myisam.test deleted file mode 100644 index a470c36f9f8..00000000000 --- a/mysql-test/t/rpl_row_blob_myisam.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_row_charset.test b/mysql-test/t/rpl_row_charset.test deleted file mode 100644 index 9737c52c70f..00000000000 --- a/mysql-test/t/rpl_row_charset.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/t/rpl_row_create_table-slave.opt b/mysql-test/t/rpl_row_create_table-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_create_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test deleted file mode 100644 index be10d48b757..00000000000 --- a/mysql-test/t/rpl_row_create_table.test +++ /dev/null @@ -1,236 +0,0 @@ -# Testing table creations for row-based replication. - ---source include/have_binlog_format_row.inc ---source include/master-slave.inc ---source include/have_innodb.inc -connection slave; ---source include/have_innodb.inc -connection master; - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol - ---disable_query_log ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings ---enable_query_log - -# Set the default storage engine to different values on master and -# slave. We need to stop the slave for the server variable to take -# effect, since the variable is only read on start-up. -sync_slave_with_master; ---disable_query_log -set @storage_engine = @@global.storage_engine; -STOP SLAVE; -SET GLOBAL storage_engine=memory; -START SLAVE; ---enable_query_log - -connection master; -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; -CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; -CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---query_vertical SHOW BINLOG EVENTS FROM 216 ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t1 ---query_vertical SHOW CREATE TABLE t2 ---query_vertical SHOW CREATE TABLE t3 -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t1 ---query_vertical SHOW CREATE TABLE t2 ---query_vertical SHOW CREATE TABLE t3 - -connection master; -CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; - -CREATE TEMPORARY TABLE tt3 (a INT, b INT); -INSERT INTO tt3 VALUES (1,2), (2,4), (3,6), (4,2), (5,10), (6,12); -CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t5 -SELECT * FROM t5 ORDER BY a,b,c; ---query_vertical SHOW CREATE TABLE t6 -SELECT * FROM t6 ORDER BY a,b,c; -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t5 -SELECT * FROM t5 ORDER BY a,b,c; ---query_vertical SHOW CREATE TABLE t6 -SELECT * FROM t6 ORDER BY a,b,c; - -connection master; -# Test for erroneous constructions ---error ER_DUP_ENTRY -CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; -# Shouldn't be written to the binary log ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1098; - -# Test that INSERT-SELECT works the same way as for SBR. -CREATE TABLE t7 (a INT, b INT UNIQUE); ---error ER_DUP_ENTRY -INSERT INTO t7 SELECT a,b FROM tt3; -SELECT * FROM t7 ORDER BY a,b; -# Should be written to the binary log ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1098; -sync_slave_with_master; -SELECT * FROM t7 ORDER BY a,b; - -connection master; -CREATE TEMPORARY TABLE tt4 (a INT, b INT); -INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); -BEGIN; -INSERT INTO t7 SELECT a,b FROM tt4; -ROLLBACK; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1294; -SELECT * FROM t7 ORDER BY a,b; -sync_slave_with_master; -SELECT * FROM t7 ORDER BY a,b; - -connection master; -CREATE TABLE t8 LIKE t4; -CREATE TABLE t9 LIKE tt4; -CREATE TEMPORARY TABLE tt5 LIKE t4; -CREATE TEMPORARY TABLE tt6 LIKE tt4; -CREATE TEMPORARY TABLE tt7 SELECT 1; ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t8 ---query_vertical SHOW CREATE TABLE t9 ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1390; -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t8 ---query_vertical SHOW CREATE TABLE t9 - -connection master; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -sync_slave_with_master; -# Here we reset the value of the default storage engine -STOP SLAVE; -SET GLOBAL storage_engine=@storage_engine; -START SLAVE; ---enable_ps_protocol - -# BUG#22864 (Rollback following CREATE ... SELECT discards 'CREATE -# table' from log): ---echo ================ BUG#22864 ================ -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; -connection master; -SET AUTOCOMMIT=0; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - -CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1; -ROLLBACK; - -CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t3 VALUES (4),(5),(6); -ROLLBACK; - -CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t1 VALUES (4),(5),(6); -ROLLBACK; - -SHOW TABLES; -SELECT TABLE_NAME,ENGINE - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY a; -SELECT * FROM t3 ORDER BY a; -SELECT * FROM t4 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; -SHOW TABLES; -SELECT TABLE_NAME,ENGINE - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY a; -SELECT * FROM t3 ORDER BY a; -SELECT * FROM t4 ORDER BY a; - -connection master; -DROP TABLE IF EXISTS t1,t2,t3,t4; -SET AUTOCOMMIT=1; -sync_slave_with_master; - -# Some tests with temporary tables -connection slave; -STOP SLAVE; -RESET SLAVE; - -connection master; -RESET MASTER; - -connection slave; -START SLAVE; - -connection master; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - -CREATE TABLE t2 (a INT) ENGINE=INNODB; - -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt1 -SELECT a+1 AS a - FROM t1 - WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt1; -COMMIT; - -SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -TRUNCATE TABLE t2; - -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt2 -SELECT a+1 AS a - FROM t1 - WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt2; -ROLLBACK; - -SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 631; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -DROP TABLE t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_delayed_ins.test b/mysql-test/t/rpl_row_delayed_ins.test deleted file mode 100644 index a0e74567349..00000000000 --- a/mysql-test/t/rpl_row_delayed_ins.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/t/rpl_row_drop.test b/mysql-test/t/rpl_row_drop.test deleted file mode 100644 index 20c217a7c3a..00000000000 --- a/mysql-test/t/rpl_row_drop.test +++ /dev/null @@ -1,48 +0,0 @@ --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Bug#12415: DROP of temporary table on master stops slave -connection master; ---echo **** On Master **** -CREATE TABLE t1 (a int); -CREATE TABLE t2 (a int); -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; -connection master; ---echo **** On Master **** -DROP TABLE t2; # Dropping the temporary table -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; # There should be two tables on the slave - -connection master; ---echo **** On Master **** -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; -connection master; ---echo **** On Master **** -# Should drop the non-temporary table t1 and the temporary table t2 -DROP TABLE t1,t2; -let $VERSION=`select version()`; ---replace_result $VERSION VERSION ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; - ---disable_query_log ---disable_warnings -connection master; -DROP TABLE IF EXISTS t2; -sync_slave_with_master; ---enable_warnings ---enable_query_log diff --git a/mysql-test/t/rpl_row_err_daisychain-master.opt b/mysql-test/t/rpl_row_err_daisychain-master.opt deleted file mode 100644 index 83ed8522e72..00000000000 --- a/mysql-test/t/rpl_row_err_daisychain-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=row diff --git a/mysql-test/t/rpl_row_err_daisychain-slave.opt b/mysql-test/t/rpl_row_err_daisychain-slave.opt deleted file mode 100644 index 4cb7a31da81..00000000000 --- a/mysql-test/t/rpl_row_err_daisychain-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=statement --log-slave-updates diff --git a/mysql-test/t/rpl_row_flsh_tbls.test b/mysql-test/t/rpl_row_flsh_tbls.test deleted file mode 100644 index a2f9e31fc5d..00000000000 --- a/mysql-test/t/rpl_row_flsh_tbls.test +++ /dev/null @@ -1,17 +0,0 @@ -# depends on the binlog output --- source include/have_binlog_format_row.inc - -let $rename_event_pos= 619; - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. - -# Merge tables are not supported in NDB --- source include/not_ndb_default.inc - - ---disable_ps_protocol --- source extra/rpl_tests/rpl_flsh_tbls.test ---enable_ps_protocol - diff --git a/mysql-test/t/rpl_row_func001.test b/mysql-test/t/rpl_row_func001.test deleted file mode 100644 index 53fb55118e6..00000000000 --- a/mysql-test/t/rpl_row_func001.test +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/10/2005 # -# Update: 08/29/2005 change name to initails # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1305 -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; - - ---enable_warnings - -# Section 1 test from bug #12487 Uses stored function to insert rows to see what is replicated. - -create table test.t1 (a int, PRIMARY KEY(a)); - -delimiter //; -create function test.f1(i int) returns int -begin -insert into test.t1 values(i); -return 0; -end// -delimiter ;// - -select test.f1(1); -select test.f1(2); -select * from test.t1; - -save_master_pos; -sync_slave_with_master; -connection slave; -#show create table test.t1; -select * from test.t1; - -connection master; - -#Used for debugging -#show binlog events; - -# Cleanup - -DROP FUNCTION test.f1; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_func002.test b/mysql-test/t/rpl_row_func002.test deleted file mode 100644 index 44a704bfbc5..00000000000 --- a/mysql-test/t/rpl_row_func002.test +++ /dev/null @@ -1,104 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/10/2005 # -# Update: 08/29/2005 Turn on diff # -############################################################################# -# Note: Many lines are commented out in this test case. These were used for # -# creating the test case and debugging and are being left for # -# debugging, but they can not be used for the regular testing as the # -# Time changes and is not deteministic, so instead we dump both the # -# master and slave and diff the dumps. If the dumps differ then the # -# test case will fail. To run during diff failuers, comment out the # -# diff. # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1305 -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - ---enable_warnings - -# Section 1 test from Peter G. This test changes uses a stored function to update rows and return the timestamp. We change the value of the time stamp on the master to see what is replicated. - -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); - -delimiter //; -create function test.f1() RETURNS TIMESTAMP -BEGIN -UPDATE test.t1 SET t = CURRENT_TIMESTAMP; -RETURN CURRENT_TIMESTAMP; -END// -delimiter ;// - -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - - -SET TIMESTAMP=2; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - -#sleep 3; -SET TIMESTAMP=1; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - - -SET TIMESTAMP=333300000; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); - -# We need a sync to ensure that the slave has caught up before -# dumping the database. -sync_slave_with_master; - -connection master; -#Used for debugging -#show binlog events; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_slave.sql - -# Cleanup -DROP FUNCTION test.f1; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# the test will show that the diff statement failed and no reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-). The files are located -# in mysql-test/var/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql; - -# End of 5.0 test case - diff --git a/mysql-test/t/rpl_row_func003-slave.opt b/mysql-test/t/rpl_row_func003-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_func003-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_func003.test b/mysql-test/t/rpl_row_func003.test deleted file mode 100644 index abfadfe1a1a..00000000000 --- a/mysql-test/t/rpl_row_func003.test +++ /dev/null @@ -1,11 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_func003.test diff --git a/mysql-test/t/rpl_row_inexist_tbl-slave.opt b/mysql-test/t/rpl_row_inexist_tbl-slave.opt deleted file mode 100644 index abd717f8222..00000000000 --- a/mysql-test/t/rpl_row_inexist_tbl-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t2 diff --git a/mysql-test/t/rpl_row_inexist_tbl.test b/mysql-test/t/rpl_row_inexist_tbl.test deleted file mode 100644 index 803c214b6c5..00000000000 --- a/mysql-test/t/rpl_row_inexist_tbl.test +++ /dev/null @@ -1,35 +0,0 @@ -# Test to see what slave says when master is updating a table it does -# not have ---source include/have_binlog_format_row.inc - -source include/master-slave.inc; - -connection master; -create table t1 (a int not null primary key); -insert into t1 values (1); -create table t2 (a int); -insert into t2 values (1); -update t1, t2 set t1.a = 0 where t1.a = t2.a; - -sync_slave_with_master; -# t2 should not have been replicated -# t1 should have been properly updated -show tables; -select * from t1; -drop table t1; - -connection master; -insert into t1 values (1); - -connection slave; -# slave should have stopped because can't find table t1 ---source include/wait_for_slave_sql_to_stop.inc -# see if we have a good error message: ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 23 # 33 # ---vertical_results -show slave status; - -# cleanup -connection master; -drop table t1, t2; diff --git a/mysql-test/t/rpl_row_insert_delayed.test b/mysql-test/t/rpl_row_insert_delayed.test deleted file mode 100644 index 9aeb57c4fa2..00000000000 --- a/mysql-test/t/rpl_row_insert_delayed.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/have_binlog_format_row.inc ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - -connection master; -set @old_global_binlog_format = @@global.binlog_format; - -let $binlog_format_statement=0; -set @@global.binlog_format = row; ---source extra/rpl_tests/rpl_insert_delayed.test - -connection master; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/t/rpl_row_log-master.opt b/mysql-test/t/rpl_row_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_row_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_row_log-slave.opt b/mysql-test/t/rpl_row_log-slave.opt deleted file mode 100644 index 8b137891791..00000000000 --- a/mysql-test/t/rpl_row_log-slave.opt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mysql-test/t/rpl_row_log.test b/mysql-test/t/rpl_row_log.test deleted file mode 100644 index 3253ae9ecba..00000000000 --- a/mysql-test/t/rpl_row_log.test +++ /dev/null @@ -1,16 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_row_log_innodb-master.opt b/mysql-test/t/rpl_row_log_innodb-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_row_log_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_row_log_innodb-slave.opt b/mysql-test/t/rpl_row_log_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_log_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_log_innodb.test b/mysql-test/t/rpl_row_log_innodb.test deleted file mode 100644 index 5e5182e3519..00000000000 --- a/mysql-test/t/rpl_row_log_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_row_max_relay_size.test b/mysql-test/t/rpl_row_max_relay_size.test deleted file mode 100644 index a0be59e44a7..00000000000 --- a/mysql-test/t/rpl_row_max_relay_size.test +++ /dev/null @@ -1,11 +0,0 @@ -# Test of options max_binlog_size and max_relay_log_size and -# how they act (if max_relay_log_size == 0, use max_binlog_size -# for relay logs too). -# Test of manual relay log rotation with FLUSH LOGS. - -# Requires statement logging --- source include/not_ndb_default.inc -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; --- source extra/rpl_tests/rpl_max_relay_size.test - diff --git a/mysql-test/t/rpl_row_mysqlbinlog-master.opt b/mysql-test/t/rpl_row_mysqlbinlog-master.opt deleted file mode 100644 index 07d12817f5f..00000000000 --- a/mysql-test/t/rpl_row_mysqlbinlog-master.opt +++ /dev/null @@ -1 +0,0 @@ ---max-binlog-size=1040384 diff --git a/mysql-test/t/rpl_row_mysqlbinlog.test b/mysql-test/t/rpl_row_mysqlbinlog.test deleted file mode 100644 index dd46d64f684..00000000000 --- a/mysql-test/t/rpl_row_mysqlbinlog.test +++ /dev/null @@ -1,348 +0,0 @@ -################################################################## -# Author: JBM # -# Date: 2006-02-22 # -# Purpose: To test changes to mysqlbinlog for row based bin logs # -# We are using .opt file since we need small binlog size # -################################################################## -# Include Section -# Make sure that we have row based bin log --- source include/have_binlog_format_row.inc -# Embedded server doesn't support binlogging --- source include/not_embedded.inc --- source include/master-slave.inc -# This test requires the cp932 charset compiled in --- source include/have_cp932.inc - -# Setup Section -# we need this for getting fixed timestamps inside of this test - ---disable_query_log -select "---Setup Section --" as ""; ---enable_query_log - -set timestamp=1000000000; - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings - -connection master; -CREATE TABLE t1(word VARCHAR(20)); -CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); - - -# Test Section -# Lets start by putting some data into the tables. - ---disable_query_log -INSERT INTO t1 VALUES ("abirvalg"); -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; - -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -let $count=500; -while ($count) -{ - INSERT INTO t2 VALUES (NULL); - eval INSERT INTO t3 VALUES ($count,@d1,'20060222000000','Tested in Texas',$count*2.2); - dec $count; -} ---enable_query_log - - ---disable_query_log -select "---Test1 check table load --" as ""; ---enable_query_log - -# Lets Check the tables on the Master -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Okay time to get busy, back to master - -connection master; - -# simple query to show more in second binlog -insert into t1 values ("Alas"); -flush logs; - -# delimiters are for easier debugging in future ---disable_query_log -select "--- Test 1 Dump binlog to file --" as ""; ---enable_query_log - -# -# Prepare local temporary file to recreate what we have currently. - ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql - ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql - -# Now that we have our file, lets get rid of the current database. -# Cleanup the master and the slave and try to recreate. ---disable_query_log -select "--- Test 1 delete tables, clean master and slave --" as ""; ---enable_query_log - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -sync_slave_with_master; -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -# We should be clean at this point, now we will run in the file from above. ---disable_query_log -select "--- Test 1 Load from Dump binlog file --" as ""; ---enable_query_log - ---exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql" - ---disable_query_log -select "--- Test 1 Check Load Results --" as ""; ---enable_query_log - -# Lets Check the tables on the Master -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -connection master; - -# We should be gold by the time, so I will get rid of our file. - ---exec rm $MYSQLTEST_VARDIR/tmp/master.sql - - -# this test for position option -# By setting this position to 413, we should only get the create of t3 ---disable_query_log -select "--- Test 2 position test --" as ""; ---enable_query_log ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLTEST_VARDIR/log/master-bin.000001 - -# These are tests for remote binlog. -# They should return the same as previous test. - ---disable_query_log -select "--- Test 3 First Remote test --" as ""; ---enable_query_log - -# This is broken now ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 - -# This part is disabled due to bug #17654 - ---disable_query_log -select "--- Test 4 Second Remote test --" as ""; ---enable_query_log ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql - -# Now that we have our file, lets get rid of the current database. -# Cleanup the master and the slave and try to recreate. - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -sync_slave_with_master; - -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -# We should be clean at this point, now we will run in the file from above. - ---exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/remote.sql" - -# Lets Check the tables on the Master - -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -connection master; - -# We should be gold by the time, so I will get rid of our file. - ---exec rm $MYSQLTEST_VARDIR/tmp/remote.sql -################### End Bug 17654 ###################### - -# LOAD DATA ---disable_query_log -select "--- Test 5 LOAD DATA --" as ""; ---enable_query_log ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 - -# Bug#7853 (mysqlbinlog does not accept input from stdin) - ---disable_query_log -select "--- Test 6 reading stdin --" as ""; ---enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001 - ---disable_query_log -select "--- Test 7 reading stdin w/position --" as ""; ---enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLTEST_VARDIR/log/master-bin.000001 - -# Bug#16217 (mysql client did not know how not switch its internal charset) ---disable_query_log -select "--- Test 8 switch internal charset --" as ""; ---enable_query_log -sync_slave_with_master; - -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -create table t4 (f text character set utf8); -create table t5 (f text character set cp932); ---exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')" ---exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'ƒ\');" -flush logs; -rename table t4 to t04, t5 to t05; ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL --default-character-set=utf8 -# original and recovered data must be equal -select HEX(f) from t04; -select HEX(f) from t4; -select HEX(f) from t05; -select HEX(f) from t5; - -# slave should have same -sync_slave_with_master; -select HEX(f) from t04; -select HEX(f) from t4; -select HEX(f) from t05; -select HEX(f) from t5; - ---disable_query_log -select "--- Test cleanup --" as ""; ---enable_query_log -# clean up -connection master; -sync_slave_with_master; - -connection master; - -# BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server -# and ensure that the results are the same as if read from a file (the same file). - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b INT); - -INSERT INTO t1 VALUES(1,1); - -SELECT * FROM t1; - -FLUSH LOGS; - ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql - ---diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec rm $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec rm $MYSQLTEST_VARDIR/tmp/local.sql - -DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_row_mystery22.test b/mysql-test/t/rpl_row_mystery22.test deleted file mode 100644 index 9933fec22fc..00000000000 --- a/mysql-test/t/rpl_row_mystery22.test +++ /dev/null @@ -1,45 +0,0 @@ -# Originally taken from rpl_mystery22.test, -# but this row-based-replication test has a totally different spirit: -# slave will not stop because of dup key, -# instead we test if it does overwrite the dup key -# as expected. --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# first, cause a duplicate key problem on the slave -create table t1(n int auto_increment primary key, s char(10)); -sync_slave_with_master; -insert into t1 values (2,'old'); -connection master; -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -save_master_pos; -connection slave; -sync_with_master; -select * from t1 order by n; -delete from t1 where n = 2; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -stop slave; -connection master; -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -# what happens when we delete a row which does not exist on slave? -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -save_master_pos; -connection slave; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -select * from t1 order by n; -#clean up -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_reset_slave.test b/mysql-test/t/rpl_row_reset_slave.test deleted file mode 100644 index a970c161153..00000000000 --- a/mysql-test/t/rpl_row_reset_slave.test +++ /dev/null @@ -1,5 +0,0 @@ -# TBF - difference in row level logging -# Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing --- source include/have_binlog_format_row.inc --- source extra/rpl_tests/rpl_reset_slave.test - diff --git a/mysql-test/t/rpl_row_sp001.test b/mysql-test/t/rpl_row_sp001.test deleted file mode 100644 index c12e73b6861..00000000000 --- a/mysql-test/t/rpl_row_sp001.test +++ /dev/null @@ -1,146 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/09/2005 # -# Updated: Aug/29/2005 -############################################################################# -# Test: Includes two stored procedure tests. First test uses SP to insert # -# values from RAND() and NOW() into a table. # -# The second test uses SP with CASE structure to decide what to text # -# to update a given table with. # -############################################################################ - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - --- disable_query_log --- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - --- enable_query_log --- enable_result_log - -# Begin test section 1 for non deterministic SP -let $message=; ---source include/show_msg.inc - -create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); - -delimiter //; -create procedure test.p1() -begin - INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); -end// -delimiter ;// - -# show binlog events; - --- disable_query_log --- disable_result_log -let $1=10; -while ($1) -{ - call test.p1(); - sleep 1; - dec $1; -} --- enable_result_log --- enable_query_log - -## Used for debugging -#show binlog events; -#select * from test.t1; -#sync_slave_with_master; -#select * from test.t1; -#connection master; - -let $message=; ---source include/show_msg.inc - - -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); - -delimiter //; -CREATE PROCEDURE test.p2(n int) -begin -CASE n -WHEN 1 THEN - UPDATE test.t2 set t ='Tex'; -WHEN 2 THEN - UPDATE test.t2 set t ='SQL'; -ELSE - UPDATE test.t2 set t ='NONE'; -END CASE; -end// -delimiter ;// - -INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); - -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -call test.p2(1); -SELECT * FROM t2 ORDER BY a; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - - -connection master; -call test.p2(2); -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -call test.p2(3); -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -##Used for debugging -#show binlog events; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_slave.sql - -# First lets cleanup - -connection master; -DROP PROCEDURE test.p1; -DROP PROCEDURE test.p2; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed dump files -# will be located in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/sp001_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp002_innodb-master.opt b/mysql-test/t/rpl_row_sp002_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp002_innodb-slave.opt b/mysql-test/t/rpl_row_sp002_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp002_innodb.test b/mysql-test/t/rpl_row_sp002_innodb.test deleted file mode 100644 index e272e34e715..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp002.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp002.test diff --git a/mysql-test/t/rpl_row_sp003-master.opt b/mysql-test/t/rpl_row_sp003-master.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_sp003-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_sp003-slave.opt b/mysql-test/t/rpl_row_sp003-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_sp003-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_sp003.test b/mysql-test/t/rpl_row_sp003.test deleted file mode 100644 index 99b30253c8a..00000000000 --- a/mysql-test/t/rpl_row_sp003.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/t/rpl_row_sp005.test b/mysql-test/t/rpl_row_sp005.test deleted file mode 100644 index 054fa02f514..00000000000 --- a/mysql-test/t/rpl_row_sp005.test +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/15/2005 # -# Updated: Aug/29/2005: Removed sleeps # -############################################################################# -# Test: Tests SPs with cursors, flow logic, and alter sp. In addition the # -# tests SPs with insert and update operations. # -############################################################################# -# 2006-02-08 By JBM added ORDER BY for use with NDB engine -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; ---enable_warnings -# End of cleanup - -# Begin test section 1 -CREATE TABLE IF NOT EXISTS test.t1(id INT, data CHAR(16),PRIMARY KEY(id)); -CREATE TABLE IF NOT EXISTS test.t2(id2 INT,PRIMARY KEY(id2)); -CREATE TABLE IF NOT EXISTS test.t3(id3 INT,PRIMARY KEY(id3), c CHAR(16)); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN -DECLARE done INT DEFAULT 0; - DECLARE spa CHAR(16); - DECLARE spb,spc INT; - DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id; - DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - OPEN cur2; - - REPEAT - FETCH cur1 INTO spb, spa; - FETCH cur2 INTO spc; - IF NOT done THEN - IF spb < spc THEN - INSERT INTO test.t3 VALUES (spb,spa); - ELSE - INSERT INTO test.t3 VALUES (spc,spa); - END IF; - END IF; - UNTIL done END REPEAT; - - CLOSE cur1; - CLOSE cur2; -END| -CREATE PROCEDURE test.p2() -BEGIN - INSERT INTO test.t1 VALUES (4,'MySQL'),(20,'ROCKS'),(11,'Texas'),(10,'kyle'); - INSERT INTO test.t2 VALUES (4),(2),(1),(3); - UPDATE test.t1 SET id=id+4 WHERE id=4; -END| -delimiter ;| - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY id; -SELECT * FROM test.t2 ORDER BY id2; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; -SELECT * FROM test.t2 ORDER BY id2; - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -connection master; -CALL test.p1(); -sleep 6; -SELECT * FROM test.t3 ORDER BY id3; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -connection slave; -SELECT * FROM test.t3 ORDER BY id3; - -connection master; - -ALTER PROCEDURE test.p1 MODIFIES SQL DATA; -#show binlog events; - -# Cleanup - -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt b/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp006_InnoDB.test b/mysql-test/t/rpl_row_sp006_InnoDB.test deleted file mode 100644 index f7e59440027..00000000000 --- a/mysql-test/t/rpl_row_sp006_InnoDB.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/t/rpl_row_sp007_innodb-slave.opt b/mysql-test/t/rpl_row_sp007_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp007_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp007_innodb.test b/mysql-test/t/rpl_row_sp007_innodb.test deleted file mode 100644 index 41af5a5f997..00000000000 --- a/mysql-test/t/rpl_row_sp007_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp007.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp007.test diff --git a/mysql-test/t/rpl_row_sp008.test b/mysql-test/t/rpl_row_sp008.test deleted file mode 100644 index b1295820c99..00000000000 --- a/mysql-test/t/rpl_row_sp008.test +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/15/2005 # -# Update: 08/29/2005 Remove sleep # -############################################################################# -# TEST: Use SQL_CALC_FOUND_ROWS and insert results into a table inside a sp # -############################################################################# - - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings -# End of cleanup - - - -# Begin test section 1 -CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1),(2); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; - INSERT INTO test.t2 VALUES(FOUND_ROWS()); -END| -delimiter ;| - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -CALL test.p1(); -SELECT * FROM test.t2; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2; - -# Cleanup - -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp009.test b/mysql-test/t/rpl_row_sp009.test deleted file mode 100644 index 92d47c6f50f..00000000000 --- a/mysql-test/t/rpl_row_sp009.test +++ /dev/null @@ -1,105 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated: 08/29/2005 removed sleeps and added master pos save and snyc # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12168 # -############################################################################# -# 2006-02-08 By JBM : Added order by for ndb engine use -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -CREATE TABLE test.t1 (a INT, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1),(2),(3),(4); -CREATE TABLE test.t2 (a INT, PRIMARY KEY(a)); - -delimiter |; -CREATE PROCEDURE test.p1 (arg1 CHAR(1)) -BEGIN - DECLARE b, c INT; - IF arg1 = 'a' THEN - BEGIN - DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2; - DECLARE continue handler for not found set b = 1; - SET b = 0; - OPEN cur1; - c1_repeat: REPEAT - FETCH cur1 INTO c; - IF (b = 1) THEN - LEAVE c1_repeat; - END IF; - - INSERT INTO test.t2 VALUES (c); - UNTIL b = 1 - END REPEAT; - CLOSE cur1; - END; - END IF; - IF arg1 = 'b' THEN - BEGIN - DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2; - DECLARE continue handler for not found set b = 1; - SET b = 0; - OPEN cur2; - c2_repeat: REPEAT - FETCH cur2 INTO c; - IF (b = 1) THEN - LEAVE c2_repeat; - END IF; - - INSERT INTO test.t2 VALUES (c); - UNTIL b = 1 - END REPEAT; - CLOSE cur2; - END; - END IF; -END| -delimiter ;| - -CALL test.p1('a'); -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; -connection master; -truncate test.t2; - -# this next call fails, but should not -call test.p1('b'); -select * from test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -connection master; -truncate test.t2; -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE test.p1; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp010.test b/mysql-test/t/rpl_row_sp010.test deleted file mode 100644 index 28b82217517..00000000000 --- a/mysql-test/t/rpl_row_sp010.test +++ /dev/null @@ -1,80 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Update: 08/29/2005 remove sleep added master pos save and sync # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=11126 # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - INSERT INTO test.t1 VALUES(2); -END| -CREATE PROCEDURE test.p2() -BEGIN - DROP TEMPORARY TABLE IF EXISTS test.t1; - CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a)); - INSERT INTO test.t1 VALUES(1); - CALL test.p1(); -END| -delimiter ;| -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY a; - -save_master_pos; -connection slave; -sync_with_master; -show tables; - -connection master; -delimiter |; -CREATE PROCEDURE test.p3() -BEGIN - INSERT INTO test.t2 VALUES(7); -END| -CREATE PROCEDURE test.p4() -BEGIN - DROP TABLE IF EXISTS test.t2; - CREATE TABLE test.t2 (a int, PRIMARY KEY(a)); - INSERT INTO test.t2 VALUES(6); - CALL test.p3(); -END| -delimiter ;| -CALL test.p4(); -SELECT * FROM test.t2 ORDER BY a; - -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp011.test b/mysql-test/t/rpl_row_sp011.test deleted file mode 100644 index 25c2fc9ad26..00000000000 --- a/mysql-test/t/rpl_row_sp011.test +++ /dev/null @@ -1,111 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated: 08/29/2005 turned on diff and commented out debug SQL statements# -############################################################################# -#TEST: SP to test alter table and nested SP calls # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a; - UPDATE test.t1 SET b = 'rbr' WHERE a = 1; - CALL test.p2(); -END| -CREATE PROCEDURE test.p2() -BEGIN - ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b; - UPDATE test.t1 SET f = RAND() WHERE a = 1; - CALL test.p3(); -END| -CREATE PROCEDURE test.p3() -BEGIN - ALTER TABLE test.t1 RENAME test.t2; - CALL test.p4(); -END| -CREATE PROCEDURE test.p4() -BEGIN - ALTER TABLE test.t2 ADD INDEX (f); - ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT; - INSERT INTO test.t2 VALUES (NULL,'TEST',RAND()); - CALL test.p5(); -END| -CREATE PROCEDURE test.p5() -BEGIN - ALTER TABLE test.t2 ORDER BY f; - INSERT INTO test.t2 VALUES (NULL,'STM',RAND()); - CALL test.p6(); -END| -CREATE PROCEDURE test.p6() -BEGIN - ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST; - ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2; - INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND()); - CALL test.p7(); -END| -CREATE PROCEDURE test.p7() -BEGIN - ALTER TABLE test.t2 DROP COLUMN to_drop; - INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND()); -END| -delimiter ;| -CALL test.p1(); - -#SELECT * FROM test.t2; -sync_slave_with_master; -#SELECT * FROM test.t2; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_slave.sql - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed test -# Will leave dump files in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/sp011_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp012.test b/mysql-test/t/rpl_row_sp012.test deleted file mode 100644 index 3a8d295121c..00000000000 --- a/mysql-test/t/rpl_row_sp012.test +++ /dev/null @@ -1,75 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/22/2005 # -# Update: 08/29/2005 Added save pos and sync # -############################################################################# -#TEST: SP to test security and current_user and user # -############################################################################# - - -# Includes --- source include/have_binlog_format_row.inc --- source include/not_embedded.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; - - -# Begin test section 1 -# Create user user1 with no particular access rights -grant usage on *.* to user1@localhost; -flush privileges; - -SELECT CURRENT_USER(); -SELECT USER(); -CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER(); -CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1(); -CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1(); -GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost; - -# Need to wait for the rights to be applied at the slave -sync_slave_with_master; - -let $message=<******** Master user1 p3 & p2 calls *******>; ---source include/show_msg.inc -connect (muser1,localhost,user1,,); -connection muser1; -SELECT CURRENT_USER(); -SELECT USER(); -CALL test.p3(); -CALL test.p2(); - -let $message=<******** Slave user1 p3 & p2 calls *******>; ---source include/show_msg.inc -connect (suser1,127.0.0.1,user1,,test,$SLAVE_MYPORT,); - -connection master; -save_master_pos; -connection suser1; -sync_with_master; - -SELECT CURRENT_USER(); -SELECT USER(); -CALL test.p3(); -CALL test.p2(); - -# Cleanup -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP USER user1@localhost; -sync_slave_with_master; - -# End of 5.0 test case - diff --git a/mysql-test/t/rpl_row_stop_middle.test b/mysql-test/t/rpl_row_stop_middle.test deleted file mode 100644 index da363736100..00000000000 --- a/mysql-test/t/rpl_row_stop_middle.test +++ /dev/null @@ -1,44 +0,0 @@ -# Test for BUG#11729: see if, when STOP SLAVE occurs while the slave -# SQL thread has processed a Table_map_log_event but has not processed -# the last Rows_log_event associated to it, the slave thread does not -# forget to close its tables. - -# Can be run with statement-based but no interest (and long test) ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -connection master; -create table t1 (a int not null auto_increment primary key, b int, key(b)); -sync_slave_with_master; -stop slave; -connection master; -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; - -connection slave; -start slave; - -# hope one second is not enough for slave to reach the last -# Rows_log_event, so that test actually tests something. - -real_sleep 1; -stop slave; - -# see if slave hangs on DROP TABLE - -drop table t1; - -connection master; # cleanup -drop table t1; diff --git a/mysql-test/t/rpl_row_stop_middle_update-master.opt b/mysql-test/t/rpl_row_stop_middle_update-master.opt deleted file mode 100644 index b7db8f97bdd..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-binlog-row-event-max-size=256 diff --git a/mysql-test/t/rpl_row_stop_middle_update-slave.opt b/mysql-test/t/rpl_row_stop_middle_update-slave.opt deleted file mode 100644 index ea49a27adf4..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,STOP_SLAVE_after_first_Rows_event diff --git a/mysql-test/t/rpl_row_stop_middle_update.test b/mysql-test/t/rpl_row_stop_middle_update.test deleted file mode 100644 index 29b3008e822..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update.test +++ /dev/null @@ -1,31 +0,0 @@ --- source include/have_binlog_format_row.inc --- source include/have_debug.inc --- source include/master-slave.inc - -# master is asked to create small Rows events: if only one event is -# created, stopping slave at the end of that one will show no bug, we -# need at least two (and stop after first); in this test we use three. - -connection master; -create table t1 (words varchar(20)) engine=myisam; - -load data infile '../std_data_ln/words.dat' into table t1 (words); -select count(*) from t1; -save_master_pos; - -connection slave; - -# slave will automatically tell itself to stop thanks to the .opt -# file; it will initiate the stop request after the first -# Rows_log_event (out of 3) but should wait until the last one is -# executed before stopping. - -wait_for_slave_to_stop; - -# check that we inserted all rows (waited until the last Rows event) -select count(*) from t1; - -connection master; -drop table t1; -connection slave; # slave SQL thread is stopped -drop table t1; diff --git a/mysql-test/t/rpl_row_tabledefs_2myisam.test b/mysql-test/t/rpl_row_tabledefs_2myisam.test deleted file mode 100644 index ab4914e15fa..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_2myisam.test +++ /dev/null @@ -1,8 +0,0 @@ - --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_row_tabledefs.test - - diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt b/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb.test b/mysql-test/t/rpl_row_tabledefs_3innodb.test deleted file mode 100644 index 7824fbfb663..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_3innodb.test +++ /dev/null @@ -1,9 +0,0 @@ - --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc - -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_row_tabledefs.test - - diff --git a/mysql-test/t/rpl_row_trig001.test b/mysql-test/t/rpl_row_trig001.test deleted file mode 100644 index 7b1fca2d6a1..00000000000 --- a/mysql-test/t/rpl_row_trig001.test +++ /dev/null @@ -1,100 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/09/2005 # -############################################################################# -# TEST: Use after insert and before inset triggers and stored procdures to # -# Update and insert data # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - --- disable_query_log --- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t3_bi_t2; ---error 0,1360 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; - - -# test section 1, lets add a trigger to the mix. Taken from bug #12280 -let $message=; ---source include/show_msg.inc - -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); - -INSERT INTO test.t1 VALUES (1,NOW()); - -delimiter //; -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;// -CREATE PROCEDURE test.p3() -BEGIN - INSERT INTO test.t3 (d) VALUES (NOW()); -END// -CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()// -CREATE PROCEDURE test.p2() -BEGIN - INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW()); -END// -delimiter ;// - --- disable_query_log --- disable_result_log -let $1=10; -while ($1) -{ - CALL test.p2(); - sleep 1; - dec $1; -} --- enable_result_log --- enable_query_log - -#show binlog events; -#select * from test.t2; -#select * from test.t3; -#connection slave; -#select * from test.t2; -#select * from test.t3; - -let $message=; ---source include/show_msg.inc - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_slave.sql - -# Cleanup -connection master; -DROP PROCEDURE test.p2; -DROP PROCEDURE test.p3; -DROP TRIGGER test.t2_ai; -DROP TRIGGER test.t3_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed tests -# will leave dump files in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig002.test b/mysql-test/t/rpl_row_trig002.test deleted file mode 100644 index 7ca8a68f060..00000000000 --- a/mysql-test/t/rpl_row_trig002.test +++ /dev/null @@ -1,80 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/14/2005 # -# Updated: 08/29/2005 added save master pos and sync with master # -############################################################################# -# TEST: Taken and modified from BUG#12048 After Insert updates replication # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -#-- disable_query_log -#-- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t2_ai; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -# test section 1, Taken from bug #12408 - -CREATE TABLE test.t2 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); - -CREATE TABLE test.t3 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); - -CREATE TABLE test.t1 (id INT,domain CHAR(30),PRIMARY KEY(id)); - -delimiter |; -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t3 ms, test.t1 d SET ms.value='No' WHERE ms.domain_id = (SELECT max(id) FROM test.t1 WHERE domain='example.com') AND ms.mailaccount_id IS NULL AND ms.program='spamfilter' AND ms.keey='scan_incoming'| -delimiter ;| - -INSERT INTO test.t1 VALUES (1, 'example.com'),(2, 'mysql.com'),(3, 'earthmotherwear.com'), (4, 'yahoo.com'),(5, 'example.com'); - -SELECT * FROM test.t1 ORDER BY id; -#show binlog events; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; -connection master; - -INSERT INTO test.t3 VALUES ('Yes', 5, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t3 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t2 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); - -select * from test.t2; -select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; -select * from test.t2; -select * from test.t3; -connection master; - -DELETE FROM test.t1 WHERE id = 1; - -SELECT * FROM test.t1 ORDER BY id; -connection master; -SELECT * FROM test.t1 ORDER BY id; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; - -# Cleanup -connection master; -#show binlog events; -DROP TRIGGER test.t2_ai; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig003.test b/mysql-test/t/rpl_row_trig003.test deleted file mode 100644 index 4a1bbc5ca89..00000000000 --- a/mysql-test/t/rpl_row_trig003.test +++ /dev/null @@ -1,152 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/16/2005 # -# Updated: 8/29/2005 Remove sleep calls add dump and diff # -############################################################################# -# TEST: This test includes all trigger types. BEFORE/AFTER INSERT, UPDATE & # -# DELETE. In addition, includes cursor, bit, varchar, flow control, # -# looping, ROUND(), NOW(), YEAR(), TIMESTAMP # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -#-- disable_query_log -#-- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t1_bi; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t1_bu; ---error 0,1360 -DROP TRIGGER test.t2_au; ---error 0,1360 -DROP TRIGGER test.t1_bd; ---error 0,1360 -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -# test section 1 - -CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t3 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); - -# Note Most of these cause the slave to core or do not produce desired results. Currently commenting out the ones not working until they are fixed. - -delimiter |; -CREATE TRIGGER test.t1_bi BEFORE INSERT ON test.t1 FOR EACH ROW UPDATE test.t3 SET b1=1 and y=YEAR(NOW())| -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN - INSERT INTO test.t3 VALUES(NULL,0,'MySQL Replication team rocks!', 'Dark beer in prague is #1',12345.34,12.51,0,1965,NOW()); - UPDATE test.t3 SET f = ROUND(f); -END| -CREATE TRIGGER test.t1_bu BEFORE UPDATE on test.t1 FOR EACH ROW BEGIN - UPDATE test.t3 SET y = '2000'; - INSERT INTO test.t3 VALUES(NULL,1,'Testing MySQL databases before update ', 'Insert should work',621.43, 0105.21,0,1974,NOW()); -END| -CREATE TRIGGER test.t2_au AFTER UPDATE on test.t2 FOR EACH ROW BEGIN - DECLARE done INT DEFAULT 0; - DECLARE a DECIMAL(10,4); - DECLARE b FLOAT; - DECLARE num MEDIUMINT; - DECLARE cur1 CURSOR FOR SELECT t2.id, t2.d, t2.f FROM test.t2; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - - REPEAT - FETCH cur1 INTO num, a, b; - IF NOT done THEN - UPDATE test.t3 SET total =(a*b) WHERE ID = num; - END IF; - UNTIL done END REPEAT; - CLOSE cur1; -END| -CREATE TRIGGER test.t1_bd BEFORE DELETE on test.t1 FOR EACH ROW BEGIN - DECLARE done INT DEFAULT 0; - DECLARE a BIT(8); - DECLARE b VARCHAR(255); - DECLARE c CHAR(255); - DECLARE d DECIMAL(10,4); - DECLARE e FLOAT; - DECLARE f BIGINT UNSIGNED; - DECLARE g YEAR; - DECLARE h TIMESTAMP; - DECLARE cur1 CURSOR FOR SELECT t1.b1, t1.vc, t1.bc, t1.d, t1.f, t1.total, t1.y, t1.t FROM test.t1; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - - REPEAT - FETCH cur1 INTO a, b, c, d, e, f, g, h; - IF NOT done THEN - INSERT INTO test.t3 VALUES(NULL, a, b, c, d, e, f, g, h); - END IF; - UNTIL done END REPEAT; - CLOSE cur1; -END| -CREATE TRIGGER test.t2_ad AFTER DELETE ON test.t2 FOR EACH ROW - DELETE FROM test.t1| -delimiter ;| - -INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,NOW()); -INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL Customers ROCK!',654321.4321,1.24521,0,YEAR(NOW()),NOW()); - -UPDATE test.t1 SET b1 = 0 WHERE b1 = 1; - -INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW()); -UPDATE test.t2 SET b1 = 0 WHERE b1 = 1; - -INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW()); - -# To make sure BUG#14698 is gone, we sleep 2 seconds before calling trigger -# (with the bug in, that caused differences in TIMESTAMP columns). -# We just need to let the machine's clock advance, it's not -# to do synchronization, so real_sleep is good. -real_sleep 2; - -DELETE FROM test.t1 WHERE id = 1; - -DELETE FROM test.t2 WHERE id = 1; - -save_master_pos; -connection slave; -sync_with_master; -connection master; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_slave.sql - -# cleanup ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t1_bi; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t1_bu; ---error 0,1360 -DROP TRIGGER test.t2_au; ---error 0,1360 -DROP TRIGGER test.t1_bd; ---error 0,1360 -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig004.test b/mysql-test/t/rpl_row_trig004.test deleted file mode 100644 index a918c602d56..00000000000 --- a/mysql-test/t/rpl_row_trig004.test +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Oct/18/2005 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -############################################################################# -# Change by JBM 2006-02-14 added to skip when NDB default engine # -# This test has been wrapped to allow multipal engines to use same code # -############################################################################# - -# Includes --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_trig004.test - diff --git a/mysql-test/t/rpl_row_until.test b/mysql-test/t/rpl_row_until.test deleted file mode 100644 index f1d21e65a4c..00000000000 --- a/mysql-test/t/rpl_row_until.test +++ /dev/null @@ -1,87 +0,0 @@ --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Test is dependent on binlog positions - -# prepare version for substitutions -let $VERSION=`select version()`; - -# stop slave before he will start replication also sync with master -# for avoiding undetermenistic behaviour -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -connection master; -# create some events on master -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; - -# try to replicate all queries until drop of t1 -connection slave; -start slave until master_log_file='master-bin.000001', master_log_pos=311; -sleep 2; -wait_for_slave_to_stop; -# here table should be still not deleted -select * from t1; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# this should fail right after start -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -# again this table should be still not deleted -select * from t1; -sleep 2; -wait_for_slave_to_stop; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# try replicate all up to and not including the second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; -sleep 2; -wait_for_slave_to_stop; -select * from t2; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# clean up -start slave; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# this should stop immediately as we are already there -start slave until master_log_file='master-bin.000001', master_log_pos=740; -sleep 2; -wait_for_slave_to_stop; -# here the sql slave thread should be stopped ---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 ---replace_column 1 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -#testing various error conditions ---error 1277 -start slave until master_log_file='master-bin', master_log_pos=561; ---error 1277 -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ---error 1277 -start slave until master_log_file='master-bin.000001'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -# Warning should be given for second command -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=740; diff --git a/mysql-test/t/rpl_row_view01.test b/mysql-test/t/rpl_row_view01.test deleted file mode 100644 index 634e3c30cc6..00000000000 --- a/mysql-test/t/rpl_row_view01.test +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/19/2005 # -# Updated: 08/29/2005 Remove sleeps # -############################################################################# -#TEST: row based replication of views # -############################################################################# -# 2006-02-08 By JBM added order by and sleep for use with ndb engine -############################################################################# -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -create database if not exists mysqltest1; -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; - -# Begin test section 1 -CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t4 (a INT, qty INT, price INT,PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty)); -INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday'); -INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF'); -INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4); - - -CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty; -CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a; -CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1; -CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION; - - -SELECT * FROM mysqltest1.v2; -SELECT * FROM mysqltest1.v1; -# Had to add a sleep for use with NDB -# engine. Injector thread would have not -# populated biblog and data would not be on -# the slave. -sleep 10; -sync_slave_with_master; -SELECT * FROM mysqltest1.v2; -SELECT * FROM mysqltest1.v1; -connection master; - -INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; -INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; - -SELECT * FROM mysqltest1.t5 ORDER BY qty; -SELECT * FROM mysqltest1.t3 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t5 ORDER BY qty; -SELECT * FROM mysqltest1.t3 ORDER BY a; -connection master; - -INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); - -SELECT * FROM mysqltest1.t1 ORDER BY a; -SELECT * FROM mysqltest1.v4 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t1 ORDER BY a; -SELECT * FROM mysqltest1.v4 ORDER BY a; - -connection master; - -# lets cleanup -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; -DROP DATABASE mysqltest1; -sync_slave_with_master; - -# End of 5.1 test case - diff --git a/mysql-test/t/rpl_server_id1.test b/mysql-test/t/rpl_server_id1.test deleted file mode 100644 index 71310750b60..00000000000 --- a/mysql-test/t/rpl_server_id1.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test checks that the slave I/O thread refuses to start if slave -# and master have the same server id (because this is a useless setup, -# and otherwise SHOW SLAVE STATUS shows progress but all queries are -# ignored, which has caught our customers), unless -# --replicate-same-server-id. - -source include/master-slave.inc; -connection slave; -create table t1 (n int); -reset master; -# replicate ourselves -stop slave; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 16 # 18 # -show slave status; -start slave; -insert into t1 values (1); -# can't MASTER_POS_WAIT(), it does not work in this weird setup -# (when slave is its own master without --replicate-same-server-id) -sleep 2; # enough time for the event to be replicated (it should not) -show status like "slave_running"; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_server_id2-slave.opt b/mysql-test/t/rpl_server_id2-slave.opt deleted file mode 100644 index 302889525dd..00000000000 --- a/mysql-test/t/rpl_server_id2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---disable-log-slave-updates --replicate-same-server-id diff --git a/mysql-test/t/rpl_server_id2.test b/mysql-test/t/rpl_server_id2.test deleted file mode 100644 index 0f2eb560d18..00000000000 --- a/mysql-test/t/rpl_server_id2.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test checks that a slave DOES execute queries originating -# from itself, if running with --replicate-same-server-id. - -source include/master-slave.inc; -connection slave; -create table t1 (n int); -reset master; -# replicate ourselves -stop slave; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 18 # -show slave status; -start slave; -insert into t1 values (1); -save_master_pos; -sync_with_master; -select * from t1; # check that indeed 2 were inserted -# We stop the slave before cleaning up otherwise we'll get -# 'drop table t1' executed twice, so an error in the slave.err -# (not critical). -stop slave; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_session_var.test b/mysql-test/t/rpl_session_var.test deleted file mode 100644 index a6f4b496a23..00000000000 --- a/mysql-test/t/rpl_session_var.test +++ /dev/null @@ -1,42 +0,0 @@ -# Replication of session variables. -# FOREIGN_KEY_CHECKS is tested in rpl_insert_id.test - -source include/master-slave.inc; -drop table if exists t1; -create table t1(a varchar(100),b int); -set @@session.sql_mode=pipes_as_concat; -insert into t1 values('My'||'SQL', 1); -set @@session.sql_mode=default; -insert into t1 values('1'||'2', 2); -select * from t1 where b<3 order by a; -save_master_pos; -connection slave; -sync_with_master; -select * from t1 where b<3 order by a; -connection master; -# if the slave does the next sync_with_master fine, then it means it accepts the -# two lines of ANSI syntax below, which is what we want to check. -set @@session.sql_mode=ignore_space; -insert into t1 values(password ('MySQL'), 3); -set @@session.sql_mode=ansi_quotes; -create table "t2" ("a" int); -drop table t1, t2; -set @@session.sql_mode=default; -create table t1(a int auto_increment primary key); -create table t2(b int, a int); -set @@session.sql_auto_is_null=1; -insert into t1 values(null); -insert into t2 select 1,a from t1 where a is null; -set @@session.sql_auto_is_null=0; -insert into t1 values(null); -insert into t2 select 2,a from t1 where a is null; -select * from t2 order by b; -save_master_pos; -connection slave; -sync_with_master; -select * from t2 order by b; -connection master; -drop table t1,t2; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_set_charset.test b/mysql-test/t/rpl_set_charset.test deleted file mode 100644 index c70eb2681f5..00000000000 --- a/mysql-test/t/rpl_set_charset.test +++ /dev/null @@ -1,35 +0,0 @@ -source include/master-slave.inc; ---disable_warnings -drop database if exists mysqltest1; -# 4.1 bases its conversion on the db's charset, -# while 4.0 uses the part of "SET CHARACTER SET" after "_". -# So for 4.1 we add a clause to CREATE DATABASE. -create database mysqltest1 /*!40100 character set latin2 */; -use mysqltest1; -drop table if exists t1; ---enable_warnings -create table t1 (a varchar(255) character set latin2, b varchar(4)); -SET CHARACTER SET cp1250_latin2; -INSERT INTO t1 VALUES ('ŠŒŽ','80'); -INSERT INTO t1 VALUES ('šœžŸ','90'); -INSERT INTO t1 VALUES ('£¥ª¯','A0'); -INSERT INTO t1 VALUES ('³¹º¼¾¿','B0'); -INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0'); -INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß','D0'); -INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); -INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); -select "--- on master ---"; -select hex(a),b from t1 order by b; -save_master_pos; -connection slave; -sync_with_master; -use mysqltest1; -select "--- on slave ---"; -select hex(a),b from t1 order by b; -connection master; -drop database mysqltest1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_sf.test b/mysql-test/t/rpl_sf.test deleted file mode 100644 index ecf91a723fa..00000000000 --- a/mysql-test/t/rpl_sf.test +++ /dev/null @@ -1,70 +0,0 @@ --- source include/have_log_bin.inc - -# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR - -# save status - -let $oblf=`select @@SESSION.BINLOG_FORMAT`; -let $otfc=`select @@log_bin_trust_function_creators`; - -set global log_bin_trust_function_creators=0; - - - -# fail *on definition* - -set binlog_format=STATEMENT; - -delimiter |; ---error ER_BINLOG_UNSAFE_ROUTINE -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# force in definition, so we can see whether we fail on call - -set global log_bin_trust_function_creators=1; - -delimiter |; -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - -set global log_bin_trust_function_creators=0; - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# fail funcall in SBR - -set binlog_format=STATEMENT; - ---error ER_BINLOG_ROW_RBR_TO_SBR -select fn16456(); - - - -# restore status - -drop function fn16456; - ---disable_query_log -eval set binlog_format=$oblf; -eval set global log_bin_trust_function_creators=$otfc; ---enable_query_log diff --git a/mysql-test/t/rpl_skip_error-slave.opt b/mysql-test/t/rpl_skip_error-slave.opt deleted file mode 100644 index 982362d93a5..00000000000 --- a/mysql-test/t/rpl_skip_error-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-skip-error=1053,1582 diff --git a/mysql-test/t/rpl_skip_error.test b/mysql-test/t/rpl_skip_error.test deleted file mode 100644 index ff81e2f010e..00000000000 --- a/mysql-test/t/rpl_skip_error.test +++ /dev/null @@ -1,29 +0,0 @@ -########################################## -# 2006-02-07 By JBM: Added order by -######################################### -# Note that errors are ignored by opt file. -source include/master-slave.inc; - -create table t1 (n int not null primary key); -save_master_pos; -connection slave; -sync_with_master; -insert into t1 values (1); -connection master; -# Here we expect (ignored) error, since 1 is already in slave table -insert into t1 values (1); - -# These should work fine -insert into t1 values (2),(3); - -save_master_pos; -connection slave; -sync_with_master; -select * from t1 ORDER BY n; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test deleted file mode 100644 index 32320a50656..00000000000 --- a/mysql-test/t/rpl_slave_status.test +++ /dev/null @@ -1,58 +0,0 @@ ---source include/master-slave.inc - -############################################################################ -# Test case for BUG#10780 -# -# REQUIREMENT -# A slave without replication privileges should have Slave_IO_Running = No - -# 1. Create new replication user -connection master; -grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; - -connection slave; -stop slave; -change master to master_user='rpl',master_password='rpl'; -start slave; - -# 2. Do replication as new user -connection master; ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (n int); -insert into t1 values (1); -save_master_pos; -connection slave; -sync_with_master; -select * from t1; - -# 3. Delete new replication user -connection master; -delete from mysql.user where user='rpl'; -flush privileges; -connection slave; - -# 4. Restart slave without privileges -# (slave.err will contain access denied error for this START SLAVE command) -stop slave; -start slave; - -# 5. Make sure Slave_IO_Running = No ---replace_result $MASTER_MYPORT MASTER_MYPORT -# Column 1 is replaced, since the output can be either -# "Connecting to master" or "Waiting for master update" ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # ---vertical_results -show slave status; - -# Cleanup (Note that slave IO thread is not running) -connection slave; -drop table t1; -delete from mysql.user where user='rpl'; -connection master; -drop table t1; - -# end of test case for BUG#10780 - -# end of 4.1 tests diff --git a/mysql-test/t/rpl_sp-master.opt b/mysql-test/t/rpl_sp-master.opt deleted file mode 100644 index 709a224fd92..00000000000 --- a/mysql-test/t/rpl_sp-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=0 diff --git a/mysql-test/t/rpl_sp-slave.opt b/mysql-test/t/rpl_sp-slave.opt deleted file mode 100644 index 709a224fd92..00000000000 --- a/mysql-test/t/rpl_sp-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=0 diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test deleted file mode 100644 index f363b64558a..00000000000 --- a/mysql-test/t/rpl_sp.test +++ /dev/null @@ -1,585 +0,0 @@ -# row-based and statement have expected binlog difference in result files - -# Test of replication of stored procedures (WL#2146 for MySQL 5.0) -# Modified by WL#2971. - -# Note that in the .opt files we still use the old variable name -# log-bin-trust-routine-creators so that this test checks that it's -# still accepted (this test also checks that the new name is -# accepted). The old name could be removed in 5.1 or 6.0. - -source include/have_binlog_format_mixed.inc; -source include/master-slave.inc; - -# we need a db != test, where we don't have automatic grants ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; -use mysqltest1; -create table t1 (a varchar(100)); -sync_slave_with_master; -use mysqltest1; - -# ********************** PART 1 : STORED PROCEDURES *************** - -# Does the same proc as on master get inserted into mysql.proc ? -# (same definer, same properties...) - -connection master; - -delimiter |; - -# Stored procedures don't have the limitations that functions have -# regarding binlogging: it's ok to create a procedure as not -# deterministic and updating data, while it's not ok to create such a -# function. We test this. - -create procedure foo() -begin - declare b int; - set b = 8; - insert into t1 values (b); - insert into t1 values (unix_timestamp()); -end| -delimiter ;| - -# we replace columns having times -# (even with fixed timestamp displayed time may changed based on TZ) ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name='foo' and db='mysqltest1'; -sync_slave_with_master; -# You will notice in the result that the definer does not match what -# it is on master, it is a known bug on which Alik is working ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name='foo' and db='mysqltest1'; - -connection master; -# see if timestamp used in SP on slave is same as on master -set timestamp=1000000000; -call foo(); -select * from t1; -sync_slave_with_master; -select * from t1; - -# Now a SP which is not updating tables - -connection master; -delete from t1; -create procedure foo2() - select * from mysqltest1.t1; -call foo2(); - -# check that this is allowed (it's not for functions): -alter procedure foo2 contains sql; - -# SP with definer's right - -drop table t1; -create table t1 (a int); -create table t2 like t1; - -create procedure foo3() - deterministic - insert into t1 values (15); - -# let's create a non-privileged user -grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; -grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; -grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; - -# ToDo: BUG#14931: There is a race between the last grant binlogging, and -# the binlogging in the new connection made below, causing sporadic test -# failures due to switched statement order in binlog. To fix this we do -# SELECT 1 in the first connection before starting the second, ensuring -# that binlogging is done in the expected order. -# Please remove this SELECT 1 when BUG#14931 is fixed. -SELECT 1; - -connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); -connection con1; - -# this routine will fail in the second INSERT because of privileges -delimiter |; -create procedure foo4() - deterministic - begin - insert into t2 values(3); - insert into t1 values (5); - end| - -delimiter ;| - -# I add ,0 so that it does not print the error in the test output, -# because this error is hostname-dependent ---error 1142,0 -call foo4(); # invoker has no INSERT grant on table t1 => failure - -connection master; -call foo3(); # success (definer == root) -show warnings; - ---error 1142,0 -call foo4(); # definer's rights => failure - -# we test replication of ALTER PROCEDURE -alter procedure foo4 sql security invoker; -call foo4(); # invoker's rights => success -show warnings; - -# Note that half-failed procedure calls are ok with binlogging; -# if we compare t2 on master and slave we see they are identical: - -select * from t1; -select * from t2; -sync_slave_with_master; -select * from t1; -select * from t2; - -# Let's check another failing-in-the-middle procedure -connection master; -delete from t2; -alter table t2 add unique (a); - -drop procedure foo4; -delimiter |; -create procedure foo4() - deterministic - begin - insert into t2 values(20),(20); - end| - -delimiter ;| - ---error ER_DUP_ENTRY -call foo4(); -show warnings; - -select * from t2; -sync_slave_with_master; -# check that this failed-in-the-middle replicated right: -select * from t2; - -# Test of DROP PROCEDURE - ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name="foo4" and db='mysqltest1'; -connection master; -drop procedure foo4; -select * from mysql.proc where name="foo4" and db='mysqltest1'; -sync_slave_with_master; -select * from mysql.proc where name="foo4" and db='mysqltest1'; - -# ********************** PART 2 : FUNCTIONS *************** - -connection master; -drop procedure foo; -drop procedure foo2; -drop procedure foo3; - -delimiter |; -# check that needs "deterministic" ---error 1418 -create function fn1(x int) - returns int -begin - insert into t1 values (x); - return x+2; -end| -create function fn1(x int) - returns int - deterministic -begin - insert into t1 values (x); - return x+2; -end| - -delimiter ;| -delete t1,t2 from t1,t2; -select fn1(20); -insert into t2 values(fn1(21)); -select * from t1; -select * from t2; -sync_slave_with_master; -select * from t1; -select * from t2; - -connection master; -delimiter |; - -drop function fn1; - -create function fn1() - returns int - no sql -begin - return unix_timestamp(); -end| - -delimiter ;| -# check that needs "deterministic" ---error 1418 -alter function fn1 contains sql; - -delete from t1; -set timestamp=1000000000; -insert into t1 values(fn1()); - -connection con1; - -delimiter |; ---error 1419 # only full-global-privs user can create a function -create function fn2() - returns int - no sql -begin - return unix_timestamp(); -end| -delimiter ;| -connection master; -# test old variable name: -set global log_bin_trust_routine_creators=1; -# now use new name: -set global log_bin_trust_function_creators=0; -set global log_bin_trust_function_creators=1; -# slave needs it too otherwise will not execute what master allowed: -connection slave; -set global log_bin_trust_function_creators=1; - -connection con1; - -delimiter |; -create function fn2() - returns int - no sql -begin - return unix_timestamp(); -end| -delimiter ;| - -connection master; - -# Now a function which is supposed to not update tables -# as it's "reads sql data", so should not give error even if -# non-deterministic. - -delimiter |; -create function fn3() - returns int - not deterministic - reads sql data -begin - return 0; -end| -delimiter ;| - -select fn3(); ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where db='mysqltest1'; -select * from t1; - -sync_slave_with_master; -use mysqltest1; -select * from t1; ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where db='mysqltest1'; - -# Let's check a failing-in-the-middle function -connection master; -delete from t2; -alter table t2 add unique (a); - -drop function fn1; - -delimiter |; -create function fn1(x int) - returns int -begin - insert into t2 values(x),(x); - return 10; -end| - -delimiter ;| - -do fn1(100); - ---error ER_DUP_ENTRY -select fn1(20); - -select * from t2; -sync_slave_with_master; - -# check that this failed-in-the-middle replicated right: -select * from t2; - -# ********************** PART 3 : TRIGGERS *************** - -connection con1; -# now fails due to missing trigger grant (err 1142 i/o 1227) due to new -# check in sql_trigger.cc (v1.44) by anozdrin on 2006/02/01 --azundris ---error ER_TABLEACCESS_DENIED_ERROR -create trigger trg before insert on t1 for each row set new.a= 10; - -connection master; -delete from t1; -# TODO: when triggers can contain an update, test that this update -# does not go into binlog. -# I'm not setting user vars in the trigger, because replication of user vars -# would take care of propagating the user var's value to slave, so even if -# the trigger was not executed on slave it would not be discovered. -create trigger trg before insert on t1 for each row set new.a= 10; -insert into t1 values (1); -select * from t1; -sync_slave_with_master; -select * from t1; - -connection master; -delete from t1; -drop trigger trg; -insert into t1 values (1); -select * from t1; -sync_slave_with_master; -select * from t1; - - -# ********************** PART 4 : RELATED FIXED BUGS *************** - - -# -# Test for bug #13969 "Routines which are replicated from master can't be -# executed on slave". -# -connection master; -create procedure foo() - not deterministic - reads sql data - select * from t1; -sync_slave_with_master; -# This should not fail -call foo(); -connection master; -drop procedure foo; -sync_slave_with_master; - - -# Clean up -connection master; -drop function fn1; -drop database mysqltest1; -drop user "zedjzlcsjhd"@127.0.0.1; -use test; -sync_slave_with_master; -use test; - -# -# Bug#14077 "Failure to replicate a stored function with a cursor": -# verify that stored routines with cursors work on slave. -# -connection master; ---disable_warnings -drop function if exists f1; ---enable_warnings -delimiter |; -create function f1() returns int reads sql data -begin - declare var integer; - declare c cursor for select a from v1; - open c; - fetch c into var; - close c; - return var; -end| -delimiter ;| -create view v1 as select 1 as a; -create table t1 (a int); -insert into t1 (a) values (f1()); -select * from t1; -drop view v1; -drop function f1; -sync_slave_with_master; -connection slave; -select * from t1; - -# -# Bug#16621 "INSERTs in Stored Procedures causes data corruption in the Binary -# Log for 5.0.18" -# - -# Prepare environment. - -connection master; - ---disable_warnings -DROP PROCEDURE IF EXISTS p1; -DROP TABLE IF EXISTS t1; ---enable_warnings - -# Test case. - -CREATE TABLE t1(col VARCHAR(10)); - -CREATE PROCEDURE p1(arg VARCHAR(10)) - INSERT INTO t1 VALUES(arg); - -CALL p1('test'); - -SELECT * FROM t1; - -sync_slave_with_master; -SELECT * FROM t1; - -# Cleanup -connection master; -DROP PROCEDURE p1; - - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP PROCEDURE IF EXISTS p1; -DROP FUNCTION IF EXISTS f1; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating procedure... - -/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; - -/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; - ---echo ---echo ---> Checking on master... - -SHOW CREATE PROCEDURE p1; -SHOW CREATE FUNCTION f1; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SHOW CREATE PROCEDURE p1; -SHOW CREATE FUNCTION f1; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP PROCEDURE p1; -DROP FUNCTION f1; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - - -# cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# -# Bug22043: MySQL don't add "USE " before "DROP PROCEDURE IF EXISTS" -# - -connection master; ---disable_warnings -drop database if exists mysqltest; -drop database if exists mysqltest2; ---enable_warnings -create database mysqltest; -create database mysqltest2; -use mysqltest2; -create table t ( t integer ); -create procedure mysqltest.test() begin end; -insert into t values ( 1 ); ---error ER_BAD_DB_ERROR -create procedure `\\`.test() begin end; - -# -# BUG#19725: Calls to stored function in other database are not -# replicated correctly in some cases -# - -connection master; -delimiter |; -create function f1 () returns int -begin - insert into t values (1); - return 0; -end| -delimiter ;| -sync_slave_with_master; -# Let us test if we don't forget to binlog the function's database -connection master; -use mysqltest; -set @a:= mysqltest2.f1(); -sync_slave_with_master; -connection master; - - -# Final inspection which verifies how all statements of this test file -# were written to the binary log. ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -show binlog events in 'master-bin.000001' from 106; - - -# Restore log_bin_trust_function_creators to its original value. -# This is a cleanup for all parts above where we tested stored -# functions and triggers. -set global log_bin_trust_function_creators=0; -connection master; -set global log_bin_trust_function_creators=0; - -# Clean up -drop database mysqltest; -drop database mysqltest2; - ---echo End of 5.0 tests ---echo End of 5.1 tests - diff --git a/mysql-test/t/rpl_sp004.test b/mysql-test/t/rpl_sp004.test deleted file mode 100644 index 967e7007c15..00000000000 --- a/mysql-test/t/rpl_sp004.test +++ /dev/null @@ -1,97 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/14/2005 # -############################################################################# -# Test: This test contains two sp that create and drop tables, insert and # -# updated data and uses the NOW() function. # -############################################################################# - - -# Includes --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; ---enable_warnings -# End of cleanup - -# Begin test section 1 - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); - CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); - INSERT INTO test.t1 VALUES (4),(2),(1),(3); - UPDATE test.t1 SET a=a+4 WHERE a=4; - INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; - UPDATE test.t1 SET a=a+4 WHERE a=8; - CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -END| -CREATE PROCEDURE test.p2() -BEGIN - DROP TABLE IF EXISTS test.t1; - DROP TABLE IF EXISTS test.t2; - INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); -END| -delimiter ;| - -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; - -connection master; -CALL test.p2(); -USE test; -SHOW TABLES; -#SELECT * FROM test.t3; -save_master_pos; -connection slave; -sync_with_master; -USE test; -SHOW TABLES; -#SELECT * FROM test.t3; - -connection master; -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -#SELECT * FROM test.t3; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -#SELECT * FROM test.t3; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_slave.sql - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; - -# If the test fails, you will need to diff the dumps to see why. - -diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql; - - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_sp_effects-master.opt b/mysql-test/t/rpl_sp_effects-master.opt deleted file mode 100644 index 61dd7a6ad0e..00000000000 --- a/mysql-test/t/rpl_sp_effects-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=1 diff --git a/mysql-test/t/rpl_sp_effects-slave.opt b/mysql-test/t/rpl_sp_effects-slave.opt deleted file mode 100644 index 61dd7a6ad0e..00000000000 --- a/mysql-test/t/rpl_sp_effects-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=1 diff --git a/mysql-test/t/rpl_sp_effects.test b/mysql-test/t/rpl_sp_effects.test deleted file mode 100644 index 027bfd69f36..00000000000 --- a/mysql-test/t/rpl_sp_effects.test +++ /dev/null @@ -1,211 +0,0 @@ -########################################## -# Change Author: JBM -# Change Date: 2006-05-02 -# Change: Added Order By for NDB testing -########################################## - -# Test of replication of stored procedures (WL#2146 for MySQL 5.0) --- source include/master-slave.inc - -# **************************************************************** -connection master; - -# cleanup ---disable_warnings -drop procedure if exists p1; -drop procedure if exists p2; -drop function if exists f1; -drop table if exists t1,t2; -drop view if exists v1; ---enable_warnings -create table t1 (a int); - -SET GLOBAL log_bin_trust_function_creators = 1; - -# 1. Test simple variables use. -delimiter //; -create procedure p1() -begin - declare spv int default 0; - while spv < 5 do - insert into t1 values(spv+1); - set spv=spv+1; - end while; -end// -delimiter ;// - -call p1(); - -sync_slave_with_master; -connection slave; -SELECT * FROM t1 ORDER BY a; -connection master; -SELECT * FROM t1 ORDER BY a; - -# 2. Test SP variable name -delimiter //; -create procedure p2() -begin - declare a int default 4; - create table t2 as select a; -end// -delimiter ;// - -call p2(); -SELECT * FROM t2 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT * FROM t2 ORDER BY a; - -connection master; -drop procedure p1; -drop procedure p2; -drop table t2; - -# 3. Test FUNCTIONs in various places - -delimiter //; -create function f1(x int) returns int -begin - insert into t1 values(x); - return x+1; -end// - -create procedure p1(a int, b int) -begin - declare v int default f1(5); - if (f1(6)) then - select 'yes'; - end if; - set v = f1(7); - while f1(8) < 1 do - select 'this cant be'; - end while; - -end// -delimiter ;// - -call p1(f1(1), f1(2)); -SELECT * FROM t1 ORDER BY a; - -create table t2(a int); -insert into t2 values (10),(11); -SELECT a,f1(a) FROM t2 ORDER BY a; - -# This shouldn't put separate 'call f1(3)' into binlog: -insert into t2 select f1(3); -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop procedure p1; -delete from t1; -delete from t2; - -# 4. VIEWs -delete from t1; -insert into t2 values(1),(2); -create view v1 as select f1(a) as f from t2; -select * from v1 order by f; -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop view v1; -delete from t1; - -# 5. Prepared statements. -prepare s1 from 'select f1(?)'; -set @xx=123; -execute s1 using @xx; -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -delete from t1; - -# 5. Cursors. -# t2 has (1),(2); -delimiter //; -create procedure p1(spv int) -begin - declare c cursor for select f1(spv) from t2; - while (spv > 2) do - open c; - fetch c into spv; - close c; - set spv= spv - 10; - end while; -end// -delimiter ;// -call p1(15); -SELECT 'master:',a FROM t1 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop procedure p1; -drop function f1; -drop table t1,t2; - -# BUG#12637: User variables + SPs replication -create table t1 (a int); -delimiter //; -create procedure p1() -begin - insert into t1 values(@x); - set @x=@x+1; - insert into t1 values(@x); - if (f2()) then - insert into t1 values(1243); - end if; -end// - -create function f2() returns int -begin - insert into t1 values(@z); - set @z=@z+1; - insert into t1 values(@z); - return 0; -end// - -create function f1() returns int -begin - insert into t1 values(@y); - call p1(); - return 0; -end// - -delimiter ;// - -set @x=10; -set @y=20; -set @z=100; -select f1(); - -set @x=30; -call p1(); - -SELECT 'master', a FROM t1 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT 'slave', a FROM t1 ORDER BY a; - -connection master; -drop table t1; -drop function f1; -drop function f2; -drop procedure p1; -sync_slave_with_master; - -SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/t/rpl_sporadic_master-master.opt b/mysql-test/t/rpl_sporadic_master-master.opt deleted file mode 100644 index 6d5b66bed61..00000000000 --- a/mysql-test/t/rpl_sporadic_master-master.opt +++ /dev/null @@ -1 +0,0 @@ ---sporadic-binlog-dump-fail --max-binlog-dump-events=2 diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test deleted file mode 100644 index 824f7abc9f5..00000000000 --- a/mysql-test/t/rpl_sporadic_master.test +++ /dev/null @@ -1,29 +0,0 @@ -############################################################# -# 2006-02-07 By JBM added order by -############################################################# -# test to see if replication can continue when master sporadically fails on -# COM_BINLOG_DUMP and additionally limits the number of events per dump - -source include/master-slave.inc; - -create table t2(n int); -create table t1(n int not null auto_increment primary key); -insert into t1 values (NULL),(NULL); -truncate table t1; -# We have to use 4 in the following to make this test work with all table types -insert into t1 values (4),(NULL); -sync_slave_with_master; -stop slave; -start slave; -connection master; -insert into t1 values (NULL),(NULL); -flush logs; -truncate table t1; -insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); -sync_slave_with_master; -select * from t1 ORDER BY n; -connection master; -drop table t1,t2; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ssl.test b/mysql-test/t/rpl_ssl.test deleted file mode 100644 index a0317028557..00000000000 --- a/mysql-test/t/rpl_ssl.test +++ /dev/null @@ -1,71 +0,0 @@ -source include/have_ssl.inc; -source include/master-slave.inc; - -# create a user for replication that requires ssl encryption -connection master; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int auto_increment, KEY(t)); - -sync_slave_with_master; - -# Set slave to use SSL for connection to master -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to - master_user='replssl', - master_password='', - master_ssl=1, - master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', - master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', - master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; - -# Switch to master and insert one record, then sync it to slave -connection master; -insert into t1 values(1); -sync_slave_with_master; - -# The record should now be on slave -select * from t1; - -# The slave is synced and waiting/reading from master -# SHOW SLAVE STATUS will show "Waiting for master to send event" ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical show slave status; - -# Stop the slave, as reported in bug#21871 it would hang -STOP SLAVE; - -select * from t1; - -# Do the same thing a number of times -disable_query_log; -let $i= 100; -while ($i) -{ - start slave; - connection master; - insert into t1 values (NULL); - connection slave; - stop slave; - dec $i; -} -start slave; -enable_query_log; -connection master; -# INSERT one more record to make sure -# the sync has something to do -insert into t1 values (NULL); -sync_slave_with_master; ---source include/wait_for_slave_to_start.inc ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical show slave status; - -connection master; -drop user replssl@localhost; -drop table t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/rpl_ssl1.test b/mysql-test/t/rpl_ssl1.test deleted file mode 100644 index 6ca1484bb17..00000000000 --- a/mysql-test/t/rpl_ssl1.test +++ /dev/null @@ -1,97 +0,0 @@ -source include/have_ssl.inc; -source include/master-slave.inc; - -# We don't test all types of ssl auth params here since it's a bit hard -# until problems with OpenSSL 0.9.7 are unresolved - -# creating replication user for whom ssl auth is required -# preparing playground -connection master; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int); -save_master_pos; - -#syncing with master -connection slave; -sync_with_master; - -#trying to use this user without ssl -stop slave; -change master to master_user='replssl',master_password=''; -start slave; - -#showing that replication don't work -connection master; -insert into t1 values (1); -#reasonable timeout for changes to propagate to slave -sleep 3; -connection slave; -select * from t1; - -#showing that replication could work with ssl params -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; - -#avoiding unneeded sleeps -connection master; -save_master_pos; -connection slave; -sync_with_master; - -#checking that replication is ok -select * from t1; - -#checking show slave status ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -#checking if replication works without ssl also performing clean up -stop slave; -change master to master_user='root',master_password='', master_ssl=0; -start slave; -connection master; -drop user replssl@localhost; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -# End of 4.1 tests - -# Start replication with ssl_verify_server_cert turned on -connection slave; -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to - master_host="localhost", - master_ssl=1 , - master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', - master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', - master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', - master_ssl_verify_server_cert=1; -start slave; - -connection master; -create table t1 (t int); -insert into t1 values (1); - -sync_slave_with_master; - -echo on slave; -#checking that replication is ok -select * from t1; - -#checking show slave status ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_start_stop_slave.test b/mysql-test/t/rpl_start_stop_slave.test deleted file mode 100644 index 19988cf902a..00000000000 --- a/mysql-test/t/rpl_start_stop_slave.test +++ /dev/null @@ -1,36 +0,0 @@ -source include/master-slave.inc; - -# -# Bug#6148 () -# -connection slave; -stop slave; - -# Let the master do lots of insertions -connection master; -create table t1(n int); -let $1=5000; -disable_query_log; -while ($1) -{ - eval insert into t1 values($1); - dec $1; -} -enable_query_log; -save_master_pos; - -connection slave; -start slave; -sleep 1; -stop slave io_thread; -start slave io_thread; -sync_with_master; - -connection master; -drop table t1; -save_master_pos; - -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_stm_000001-slave.opt b/mysql-test/t/rpl_stm_000001-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_stm_000001-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_stm_000001.test b/mysql-test/t/rpl_stm_000001.test deleted file mode 100644 index aee067b2d4a..00000000000 --- a/mysql-test/t/rpl_stm_000001.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_000001.test diff --git a/mysql-test/t/rpl_stm_EE_err2.test b/mysql-test/t/rpl_stm_EE_err2.test deleted file mode 100644 index face651b9a1..00000000000 --- a/mysql-test/t/rpl_stm_EE_err2.test +++ /dev/null @@ -1,8 +0,0 @@ -############################# -# Author: JBM -# Date: 2006-01-11 -# Purpose: Engine Wrapper for rpl_stm_EE_err2.test -############################## --- source include/have_binlog_format_mixed_or_statement.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_EE_err2.test diff --git a/mysql-test/t/rpl_stm_charset.test b/mysql-test/t/rpl_stm_charset.test deleted file mode 100644 index b103a47d78c..00000000000 --- a/mysql-test/t/rpl_stm_charset.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_charset.test diff --git a/mysql-test/t/rpl_stm_flsh_tbls.test b/mysql-test/t/rpl_stm_flsh_tbls.test deleted file mode 100644 index a8a33d05e8b..00000000000 --- a/mysql-test/t/rpl_stm_flsh_tbls.test +++ /dev/null @@ -1,8 +0,0 @@ -# depends on the binlog output ---source include/have_binlog_format_mixed_or_statement.inc - -let $rename_event_pos= 656; --- source extra/rpl_tests/rpl_flsh_tbls.test - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/t/rpl_stm_insert_delayed.test b/mysql-test/t/rpl_stm_insert_delayed.test deleted file mode 100644 index d55e3a4da2c..00000000000 --- a/mysql-test/t/rpl_stm_insert_delayed.test +++ /dev/null @@ -1,20 +0,0 @@ -# we run first in statement-based then in mixed binlogging - ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - -connection master; -set @old_global_binlog_format = @@global.binlog_format; - -let $binlog_format_statement=1; -set @@global.binlog_format = statement; ---source extra/rpl_tests/rpl_insert_delayed.test - -let $binlog_format_statement=0; -set @@global.binlog_format = mixed; ---source extra/rpl_tests/rpl_insert_delayed.test - -connection master; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/t/rpl_stm_log-master.opt b/mysql-test/t/rpl_stm_log-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_stm_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_stm_log-slave.opt b/mysql-test/t/rpl_stm_log-slave.opt deleted file mode 100644 index 8b137891791..00000000000 --- a/mysql-test/t/rpl_stm_log-slave.opt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mysql-test/t/rpl_stm_log.test b/mysql-test/t/rpl_stm_log.test deleted file mode 100644 index 5a1e0facc83..00000000000 --- a/mysql-test/t/rpl_stm_log.test +++ /dev/null @@ -1,8 +0,0 @@ -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_log.test - - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012: Delete me diff --git a/mysql-test/t/rpl_stm_max_relay_size.test b/mysql-test/t/rpl_stm_max_relay_size.test deleted file mode 100644 index 950aa8b322a..00000000000 --- a/mysql-test/t/rpl_stm_max_relay_size.test +++ /dev/null @@ -1,11 +0,0 @@ -# Test of options max_binlog_size and max_relay_log_size and -# how they act (if max_relay_log_size == 0, use max_binlog_size -# for relay logs too). -# Test of manual relay log rotation with FLUSH LOGS. - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_max_relay_size.test - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_multi_query.test b/mysql-test/t/rpl_stm_multi_query.test deleted file mode 100644 index c39d1fad015..00000000000 --- a/mysql-test/t/rpl_stm_multi_query.test +++ /dev/null @@ -1,12 +0,0 @@ -# Test for BUG#8436: verify that a multi-query (i.e. one query -# containing several queries (assuming client has -# CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not -# one binlog event containing all queries) - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_multi_query.test - - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_mystery22.test b/mysql-test/t/rpl_stm_mystery22.test deleted file mode 100644 index 017593fdfba..00000000000 --- a/mysql-test/t/rpl_stm_mystery22.test +++ /dev/null @@ -1,66 +0,0 @@ -################################ -# Change Author: JBM -# Change Date: 2006-01-12 -# Change: Added back have stm binlog -# and added requirments comments -################################ -# test case to make slave thread get ahead by 22 bytes -################################ -#REQUIREMENT: If there is a faked slave duplicate key insert -#error and the slave is restarted, the replication should -#proceed in a correct way. -################################ -#REQUIREMENT: If there is a faked slave non-existing record -#delete error and the slave is restarted, then the replication -#should proceed in a correct way. -################################# - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -# first, cause a duplicate key problem on the slave -create table t1(n int auto_increment primary key, s char(10)); -sync_slave_with_master; -insert into t1 values (2,'old'); -connection master; -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -save_master_pos; -connection slave; -# wait until the slave tries to run the query, fails and aborts slave thread -wait_for_slave_to_stop; -select * from t1 order by n; -delete from t1 where n = 2; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -#now the buggy slave would be confused on the offset but it can replicate -#in order to make it break, we need to stop/start the slave one more time -stop slave; -connection master; -# to be able to really confuse the slave, we need some non-auto-increment -# events in the log -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -# what happens when we delete a row which does not exist on slave? -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -save_master_pos; -connection slave; ---disable_warnings -start slave; ---enable_warnings -#now the truth comes out - if the slave is buggy, it will never sync because -#the slave thread is not able to read events -sync_with_master; -select * from t1 order by n; -#clean up -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_stm_no_op.test b/mysql-test/t/rpl_stm_no_op.test deleted file mode 100644 index 66dc89bd712..00000000000 --- a/mysql-test/t/rpl_stm_no_op.test +++ /dev/null @@ -1,93 +0,0 @@ -# It's true only in statement-based replication that a statement which -# updates no rows (UPDATE/DELETE) is binlogged; in row-based -# replication, as we log modified rows, nothing is binlogged in this -# case. So this test is meaningul only in statement-based (and if it was -# enabled in row-based, it would fail as expected). - --- source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# see if DROP DATABASE is binlogged even if no effect -connection slave; -create database mysqltest; -connection master; -drop database if exists mysqltest; -sync_slave_with_master; -# can't read dir ---replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" \\ / ---error 1049 -show tables from mysqltest; - -# see if DROP TABLE is binlogged even if no effect -connection slave; -create table t1 (a int); -connection master; -drop table if exists t1; -sync_slave_with_master; -# table does not exist ---error 1146 -select * from t1; - -# see if single-table DELETE is binlogged even if no effect -connection master; -create table t1 (a int, b int); -sync_slave_with_master; -insert into t1 values(1,1); -connection master; -delete from t1; -sync_slave_with_master; -select * from t1; - -# see if single-table UPDATE is binlogged even if no effect -insert into t1 values(1,1); -connection master; -insert into t1 values(2,1); -update t1 set a=2; -sync_slave_with_master; -select * from t1; - -# End of 4.1 tests - -# see if multi-table UPDATE is binlogged even if no effect (BUG#13348) - -connection master; -create table t2 (a int, b int); -delete from t1; -insert into t1 values(1,1); -insert into t2 values(1,1); - -sync_slave_with_master; -# force a difference to see if master's multi-UPDATE will correct it -update t1 set a=2; - -connection master; -UPDATE t1, t2 SET t1.a = t2.a; - -sync_slave_with_master; -select * from t1; -select * from t2; - -# See if multi-table DELETE is binlogged even if no effect - -connection master; -delete from t1; -delete from t2; - -sync_slave_with_master; -# force a difference to see if master's multi-DELETE will correct it -insert into t1 values(1,1); -insert into t2 values(1,1); - -connection master; -DELETE t1.*, t2.* from t1, t2; - -sync_slave_with_master; -select * from t1; -select * from t2; - - -# cleanup -connection master; -drop table t1, t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_stm_reset_slave.test b/mysql-test/t/rpl_stm_reset_slave.test deleted file mode 100644 index 6a99d4e1613..00000000000 --- a/mysql-test/t/rpl_stm_reset_slave.test +++ /dev/null @@ -1,6 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_reset_slave.test - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_until.test b/mysql-test/t/rpl_stm_until.test deleted file mode 100644 index f42965c0eb0..00000000000 --- a/mysql-test/t/rpl_stm_until.test +++ /dev/null @@ -1,88 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -# Test is dependent on binlog positions - -# prepare version for substitutions -let $VERSION=`select version()`; - -# stop slave before he will start replication also sync with master -# for avoiding undetermenistic behaviour -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -connection master; -# create some events on master -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; - -# try to replicate all queries until drop of t1 -connection slave; -start slave until master_log_file='master-bin.000001', master_log_pos=323; -sleep 2; -wait_for_slave_to_stop; -# here table should be still not deleted -select * from t1; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# this should fail right after start -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -# again this table should be still not deleted -select * from t1; -sleep 2; -wait_for_slave_to_stop; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# try replicate all up to and not including the second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; -sleep 2; -wait_for_slave_to_stop; -select * from t2; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# clean up -start slave; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# this should stop immediately as we are already there -start slave until master_log_file='master-bin.000001', master_log_pos=776; -sleep 2; -wait_for_slave_to_stop; -# here the sql slave thread should be stopped ---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 ---replace_column 1 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -#testing various error conditions ---error 1277 -start slave until master_log_file='master-bin', master_log_pos=561; ---error 1277 -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ---error 1277 -start slave until master_log_file='master-bin.000001'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -# Warning should be given for second command -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=776; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test deleted file mode 100644 index b0012827db8..00000000000 --- a/mysql-test/t/rpl_switch_stm_row_mixed.test +++ /dev/null @@ -1,568 +0,0 @@ -# -# rpl_switch_stm_row_mixed tests covers -# -# - switching explicitly between STATEMENT, ROW, and MIXED binlog format -# showing when it is possible and when not. -# - switching from MIXED to RBR implicitly listing all use cases, -# e.g a query invokes UUID(), thereafter to serve as the definition -# of MIXED binlog format -# - correctness of execution - - --- source include/not_ndb_default.inc --- source include/master-slave.inc - -connection master; ---disable_warnings -drop database if exists mysqltest1; -create database mysqltest1; ---enable_warnings -use mysqltest1; - -# Save binlog format -set @my_binlog_format= @@global.binlog_format; - -# play with switching -set session binlog_format=mixed; -show session variables like "binlog_format%"; -set session binlog_format=statement; -show session variables like "binlog_format%"; -set session binlog_format=row; -show session variables like "binlog_format%"; - -set global binlog_format=DEFAULT; -show global variables like "binlog_format%"; -set global binlog_format=MIXED; -show global variables like "binlog_format%"; -set global binlog_format=STATEMENT; -show global variables like "binlog_format%"; -set global binlog_format=ROW; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; - -CREATE TABLE t1 (a varchar(100)); - -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_1_"; -insert into t1 values("work_2_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_3_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_4_",UUID())); -insert into t1 select "yesterday_5_"; - -# verify that temp tables prevent a switch to SBR -create temporary table tmp(a char(100)); -insert into tmp values("see_6_"); ---error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR -set binlog_format=statement; -insert into t1 select * from tmp; -drop temporary table tmp; - -# Now we go to SBR -set binlog_format=statement; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; -set global binlog_format=statement; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_7_"; -insert into t1 values("work_8_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_9_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values("for_10_"); -insert into t1 select "yesterday_11_"; - -# test statement (is not default after wl#3368) -set binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; -set global binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_12_"; -insert into t1 values("work_13_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_14_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values("for_15_"); -insert into t1 select "yesterday_16_"; - -# and now the mixed mode - -set global binlog_format=mixed; -select @@global.binlog_format, @@session.binlog_format; -set binlog_format=default; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_17_"; -insert into t1 values("work_18_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_19_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_20_",UUID())); -insert into t1 select "yesterday_21_"; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_22_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_23_",UUID())); -insert into t1 select "yesterday_24_"; - -# Test of CREATE TABLE SELECT - -create table t2 select rpad(UUID(),100,' '); -create table t3 select 1 union select UUID(); -create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); -create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); -# what if UUID() is first: -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); - -# inside a stored procedure - -delimiter |; -create procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end| -create procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end| -create function foo3() returns bigint unsigned -begin - set session binlog_format=row; # rejected for stored funcs - insert into t1 values("alarm"); - return 100; -end| -create procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end| -delimiter ;| -call foo(); -call foo2(); -call foo4("hello"); -call foo4(UUID()); -call foo4("world"); - -# test that can't SET in a stored function ---error ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT -select foo3(); -select * from t1 where a="alarm"; - -# Tests of stored functions/triggers/views for BUG#20930 "Mixed -# binlogging mode does not work with stored functions, triggers, -# views" - -# Function which calls procedure -drop function foo3; -delimiter |; -create function foo3() returns bigint unsigned -begin - insert into t1 values("foo3_32_"); - call foo(); - return 100; -end| -delimiter ;| -insert into t2 select foo3(); - -prepare stmt1 from 'insert into t2 select foo3()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# Test if stored function calls stored function which calls procedure -# which requires row-based. - -delimiter |; -create function foo4() returns bigint unsigned -begin - insert into t2 select foo3(); - return 100; -end| -delimiter ;| -select foo4(); - -prepare stmt1 from 'select foo4()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# A simple stored function -delimiter |; -create function foo5() returns bigint unsigned -begin - insert into t2 select UUID(); - return 100; -end| -delimiter ;| -select foo5(); - -prepare stmt1 from 'select foo5()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# A simple stored function where UUID() is in the argument -delimiter |; -create function foo6(x varchar(100)) returns bigint unsigned -begin - insert into t2 select x; - return 100; -end| -delimiter ;| -select foo6("foo6_1_"); -select foo6(concat("foo6_2_",UUID())); - -prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - - -# Test of views using UUID() - -create view v1 as select uuid(); -create table t11 (data varchar(255)); -insert into t11 select * from v1; -# Test of querying INFORMATION_SCHEMA which parses the view's body, -# to verify that it binlogs statement-based (is not polluted by -# the parsing of the view's body). -insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11'); -prepare stmt1 from "insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')"; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# Test of triggers with UUID() -delimiter |; -create trigger t11_bi before insert on t11 for each row -begin - set NEW.data = concat(NEW.data,UUID()); -end| -delimiter ;| -insert into t11 values("try_560_"); - -# Test that INSERT DELAYED works in mixed mode (BUG#20649) -insert delayed into t2 values("delay_1_"); -insert delayed into t2 values(concat("delay_2_",UUID())); -insert delayed into t2 values("delay_6_"); - -# Test for BUG#20633 (INSERT DELAYED RAND()/user_variable does not -# replicate fine in statement-based ; we test that in mixed mode it -# works). -insert delayed into t2 values(rand()); -set @a=2.345; -insert delayed into t2 values(@a); - -sleep 4; # time for the delayed inserts to reach disk - -# If you want to do manual testing of the mixed mode regarding UDFs (not -# testable automatically as quite platform- and compiler-dependent), -# you just need to set the variable below to 1, and to -# "make udf_example.so" in sql/, and to copy sql/udf_example.so to -# MYSQL_TEST_DIR/lib/mysql. -let $you_want_to_test_UDF=0; -if ($you_want_to_test_UDF) -{ - CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; - prepare stmt1 from 'insert into t1 select metaphon(?)'; - set @string="emergency_133_"; - insert into t1 values("work_134_"); - execute stmt1 using @string; - deallocate prepare stmt1; - prepare stmt1 from 'insert into t1 select ?'; - insert into t1 values(metaphon("work_135_")); - execute stmt1 using @string; - deallocate prepare stmt1; - insert into t1 values(metaphon("for_136_")); - insert into t1 select "yesterday_137_"; - create table t6 select metaphon("for_138_"); - create table t7 select 1 union select metaphon("for_139_"); - create table t8 select * from t1 where 3 in (select 1 union select 2 union select metaphon("for_140_") union select 3); - create table t9 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); -} - -create table t20 select * from t1; # save for comparing later -create table t21 select * from t2; -create table t22 select * from t3; -drop table t1,t2,t3; - -# This tests the fix to -# BUG#19630 stored function inserting into two auto_increment breaks statement-based binlog -# We verify that under the mixed binlog mode, a stored function -# modifying at least two tables having an auto_increment column, -# is binlogged row-based. Indeed in statement-based binlogging, -# only the auto_increment value generated for the first table -# is recorded in the binlog, the value generated for the 2nd table -# lacking. - -create table t1 (a int primary key auto_increment, b varchar(100)); -create table t2 (a int primary key auto_increment, b varchar(100)); -create table t3 (b varchar(100)); -delimiter |; -create function f (x varchar(100)) returns int deterministic -begin - insert into t1 values(null,x); - insert into t2 values(null,x); - return 1; -end| -delimiter ;| -select f("try_41_"); -# Two operations which compensate each other except that their net -# effect is that they advance the auto_increment counter of t2 on slave: -sync_slave_with_master; -use mysqltest1; -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; - -connection master; -# this is the call which didn't replicate well -select f("try_42_"); -sync_slave_with_master; - -# now use prepared statement and test again, just to see that the RBB -# mode isn't set at PREPARE but at EXECUTE. - -insert into t2 values(3,null),(4,null); -delete from t2 where a>=3; - -connection master; -prepare stmt1 from 'select f(?)'; -set @string="try_43_"; -insert into t1 values(null,"try_44_"); # should be SBB -execute stmt1 using @string; # should be RBB -deallocate prepare stmt1; -sync_slave_with_master; - -# verify that if only one table has auto_inc, it does not trigger RBB -# (we'll check in binlog further below) - -connection master; -create table t12 select * from t1; # save for comparing later -drop table t1; -create table t1 (a int, b varchar(100), key(a)); -select f("try_45_"); - -# restore table's key -create table t13 select * from t1; -drop table t1; -create table t1 (a int primary key auto_increment, b varchar(100)); - -# now test if it's two functions, each of them inserts in one table - -drop function f; -# we need a unique key to have sorting of rows by mysqldump -create table t14 (unique (a)) select * from t2; -truncate table t2; -delimiter |; -create function f1 (x varchar(100)) returns int deterministic -begin - insert into t1 values(null,x); - return 1; -end| -create function f2 (x varchar(100)) returns int deterministic -begin - insert into t2 values(null,x); - return 1; -end| -delimiter ;| -select f1("try_46_"),f2("try_47_"); - -sync_slave_with_master; -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; - -connection master; -# Test with SELECT and INSERT -select f1("try_48_"),f2("try_49_"); -insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); -sync_slave_with_master; - -# verify that if f2 does only read on an auto_inc table, this does not -# switch to RBB -connection master; -drop function f2; -delimiter |; -create function f2 (x varchar(100)) returns int deterministic -begin - declare y int; - insert into t1 values(null,x); - set y = (select count(*) from t2); - return y; -end| -delimiter ;| -select f1("try_53_"),f2("try_54_"); -sync_slave_with_master; - -# And now, a normal statement with a trigger (no stored functions) - -connection master; -drop function f2; -delimiter |; -create trigger t1_bi before insert on t1 for each row -begin - insert into t2 values(null,"try_55_"); -end| -delimiter ;| -insert into t1 values(null,"try_56_"); -# and now remove one auto_increment and verify SBB -alter table t1 modify a int, drop primary key; -insert into t1 values(null,"try_57_"); -sync_slave_with_master; - -# Test for BUG#20499 "mixed mode with temporary table breaks binlog" -# Slave used to have only 2 rows instead of 3. -connection master; -CREATE TEMPORARY TABLE t15 SELECT UUID(); -create table t16 like t15; -INSERT INTO t16 SELECT * FROM t15; -# we'll verify that this one is done RBB -insert into t16 values("try_65_"); -drop table t15; -# we'll verify that this one is done SBB -insert into t16 values("try_66_"); -sync_slave_with_master; - -# and now compare: - -connection master; - -# first check that data on master is sensible -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; -select count(*) from t11; -select count(*) from t20; -select count(*) from t21; -select count(*) from t22; -select count(*) from t12; -select count(*) from t13; -select count(*) from t14; -select count(*) from t16; -if ($you_want_to_test_UDF) -{ - select count(*) from t6; - select count(*) from t7; - select count(*) from t8; - select count(*) from t9; -} - -sync_slave_with_master; - -# -# Bug#20863 If binlog format is changed between update and unlock of -# tables, wrong binlog -# - -connection master; -DROP TABLE IF EXISTS t11; -SET SESSION BINLOG_FORMAT=STATEMENT; -CREATE TABLE t11 (song VARCHAR(255)); -LOCK TABLES t11 WRITE; -SET SESSION BINLOG_FORMAT=ROW; -INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict'); -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t11 VALUES('Careful With That Axe, Eugene'); -UNLOCK TABLES; - ---query_vertical SELECT * FROM t11 -sync_slave_with_master; -USE mysqltest1; ---query_vertical SELECT * FROM t11 - -connection master; -DROP TABLE IF EXISTS t12; -SET SESSION BINLOG_FORMAT=MIXED; -CREATE TABLE t12 (data LONG); -LOCK TABLES t12 WRITE; -INSERT INTO t12 VALUES(UUID()); -UNLOCK TABLES; - -source include/show_binlog_events.inc; -sync_slave_with_master; - -# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql - -# Let's compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching - -diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; - -connection master; -source include/show_binlog_events.inc; - -# Now test that mysqlbinlog works fine on a binlog generated by the -# mixed mode - -# BUG#11312 "DELIMITER is not written to the binary log that causes -# syntax error" makes that mysqlbinlog will fail if we pass it the -# text of queries; this forces us to use --base64-output here. - -# BUG#20929 "BINLOG command causes invalid free plus assertion -# failure" makes mysqld segfault when receiving --base64-output - -# So I can't enable this piece of test -# SIGH - -if ($enable_when_11312_or_20929_fixed) -{ ---exec $MYSQL_BINLOG --base64-output $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql -drop database mysqltest1; ---exec $MYSQL < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql -# the old mysqldump output on slave is the same as what it was on -# master before restoring on master. -diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; -} - -drop database mysqltest1; -sync_slave_with_master; - -connection master; -# Restore binlog format setting -set global binlog_format =@my_binlog_format; diff --git a/mysql-test/t/rpl_temp_table.test b/mysql-test/t/rpl_temp_table.test deleted file mode 100644 index 9b73961aeea..00000000000 --- a/mysql-test/t/rpl_temp_table.test +++ /dev/null @@ -1,59 +0,0 @@ -# drop table t1 t2 t3 are included int master-slave.inc -# meaningful only in statement-based: - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - - -create table t2 (n int, PRIMARY KEY(n)); -create temporary table t1 (n int); -create temporary table t3 (n int not null); - -insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300); -insert into t2 select * from t1; -alter table t3 add primary key(n); - -flush logs; -insert into t3 values (1010); -insert into t2 select * from t3; - -drop table if exists t3; -insert into t2 values (1012); - -connection master1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1; - -save_master_pos; -disconnect master; - -connection slave; -#add 1 to the saved position, so we will catch drop table on disconnect -#for sure -sync_with_master 1; - -connection master1; -insert into t2 values(61); - -save_master_pos; -disconnect master1; - -connection slave; -#same trick - make sure we catch drop of temporary table on disconnect -sync_with_master 1; - -select * from t2; -select count(*) from t2; -select sum(n) from t2; -show status like 'Slave_open_temp_tables'; - -# -# Clean up -# -connect (master2,localhost,root,,); -connection master2; -drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test deleted file mode 100644 index 09b8b83f25f..00000000000 --- a/mysql-test/t/rpl_temporary.test +++ /dev/null @@ -1,215 +0,0 @@ -# Test need anonymous user when connection are made as "zedjzlcsjhd" -source include/add_anonymous_users.inc; - --- source include/master-slave.inc - -# Clean up old slave's binlogs. -# The slave is started with --log-slave-updates -# and this test does SHOW BINLOG EVENTS on the slave's -# binlog. But previous tests can influence the current test's -# binlog (e.g. a temporary table in the previous test has not -# been explicitly deleted, or it has but the slave hasn't had -# enough time to catch it before STOP SLAVE, -# and at the beginning of the current -# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). -# We wait for the slave to have written all he wants to the binlog -# (otherwise RESET MASTER may come too early). -save_master_pos; -connection slave; -sync_with_master; -reset master; -connection master; - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# We want to connect as an unprivileged user. But if we use user="" then this -# will pick the Unix login, which will cause problems if you're running the test -# as root. -connect (con3,localhost,zedjzlcsjhd,,); - -# We are going to use SET PSEUDO_THREAD_ID in this test; -# check that it requires the SUPER privilege. - -connection con3; -SET @save_select_limit=@@session.sql_select_limit; ---error 1227 -SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; -SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed -# While we are here we also test that SQL_LOG_BIN can't be set ---error 1227 -SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; -SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed -# Now as root, to be sure it works -connection con2; -SET @@session.pseudo_thread_id=100; -SET @@session.pseudo_thread_id=connection_id(); -SET @@session.sql_log_bin=0; -SET @@session.sql_log_bin=1; - -connection con3; -let $VERSION=`select version()`; - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -create table t1(f int); -create table t2(f int); -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -connection con1; -create temporary table t3(f int); -insert into t3 select * from t1 where f<6; -sleep 1; - -connection con2; -create temporary table t3(f int); -sleep 1; - -connection con1; -insert into t2 select count(*) from t3; -sleep 1; - -connection con2; -insert into t3 select * from t1 where f>=4; -sleep 1; - -connection con1; -drop temporary table t3; -sleep 1; - -connection con2; -insert into t2 select count(*) from t3; -drop temporary table t3; - -select * from t2 ORDER BY f; - -# Commented out 8/30/2005 to make compatable with both sbr and rbr -#--replace_result $VERSION VERSION -#--replace_column 2 # 5 # -#show binlog events; - -drop table t1, t2; - -use test; -SET TIMESTAMP=1040323920; -create table t1(f int); -SET TIMESTAMP=1040323931; -create table t2(f int); -SET TIMESTAMP=1040323938; -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -SET TIMESTAMP=1040323945; -SET @@session.pseudo_thread_id=1; -create temporary table t3(f int); -SET TIMESTAMP=1040323952; -SET @@session.pseudo_thread_id=1; -insert into t3 select * from t1 where f<6; -SET TIMESTAMP=1040324145; -SET @@session.pseudo_thread_id=2; -create temporary table t3(f int); -SET TIMESTAMP=1040324186; -SET @@session.pseudo_thread_id=1; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324200; -SET @@session.pseudo_thread_id=2; -insert into t3 select * from t1 where f>=4; -SET TIMESTAMP=1040324211; -SET @@session.pseudo_thread_id=1; -drop temporary table t3; -SET TIMESTAMP=1040324219; -SET @@session.pseudo_thread_id=2; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324224; -SET @@session.pseudo_thread_id=2; -drop temporary table t3; - -select * from t2 ORDER BY f; -drop table t1,t2; - -# Create last a temporary table that is not dropped at end to ensure that we -# don't get any memory leaks for this - -create temporary table t3 (f int); -sync_with_master; - -# The server will now close done - -# -# Bug#17284 erroneous temp table cleanup on slave -# - -connection master; -create temporary table t4 (f int); -create table t5 (f int); -sync_with_master; -# find dumper's $id -select id from information_schema.processlist where command='Binlog Dump' into @id; -kill @id; # to stimulate reconnection by slave w/o timeout -insert into t5 select * from t4; -save_master_pos; - -connection slave; -sync_with_master; -select * from t5 /* must be 1 after reconnection */; - -connection master; -drop temporary table t4; -drop table t5; - -# -# BUG#17263 incorrect generation DROP temp tables -# Temporary tables of connection are dropped in batches -# where a batch correspond to pseudo_thread_id -# value was set up at the moment of temp table creation -# -connection con1; -set @@session.pseudo_thread_id=100; -create temporary table t101 (id int); -create temporary table t102 (id int); -set @@session.pseudo_thread_id=200; -create temporary table t201 (id int); -create temporary table `t``201` (id int); -# emulate internal temp table not to come to binlog -create temporary table `#sql_not_user_table202` (id int); -set @@session.pseudo_thread_id=300; -create temporary table t301 (id int); -create temporary table t302 (id int); -create temporary table `#sql_not_user_table303` (id int); -disconnect con1; - -#now do something to show that slave is ok after DROP temp tables -connection master; -create table t1(f int); -insert into t1 values (1); - -sync_slave_with_master; -#connection slave; -select * from t1 /* must be 1 */; - -connection master; -drop table t1; - -# -#14157: utf8 encoding in binlog without set character_set_client -# ---write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql -create table t1 (a int); -set names latin1; -create temporary table `äöüÄÖÜ` (a int); -insert into `äöüÄÖÜ` values (1); -insert into t1 select * from `äöüÄÖÜ` -EOF ---exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test < $MYSQLTEST_VARDIR/tmp/bug14157.sql - -sync_slave_with_master; -#connection slave; -select * from t1; - -connection master; -drop table t1; - -# Delete the anonymous users -source include/delete_anonymous_users.inc; - -# End of 5.1 tests diff --git a/mysql-test/t/rpl_timezone-master.opt b/mysql-test/t/rpl_timezone-master.opt deleted file mode 100644 index 8e43bfbbb7e..00000000000 --- a/mysql-test/t/rpl_timezone-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-time-zone=Europe/Moscow diff --git a/mysql-test/t/rpl_timezone-slave.opt b/mysql-test/t/rpl_timezone-slave.opt deleted file mode 100644 index 191182c329c..00000000000 --- a/mysql-test/t/rpl_timezone-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-time-zone=Japan diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test deleted file mode 100644 index 4b8c8152c82..00000000000 --- a/mysql-test/t/rpl_timezone.test +++ /dev/null @@ -1,142 +0,0 @@ -####################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: Added order by -####################################### -# Test of replication of time zones. -###################################### -# There is currently some bug possibly in prepared statements (this -# test fails with --ps-protocol): sys_var_thd_time_zone::value_ptr() -# is called only at prepare time, not at execution time. So, -# thd->time_zone_used is not equal to 1 (it is back to 0, because of -# reset_thd_for_next_command called at execution time), so the -# timezone used in CONVERT_TZ is not binlogged. To debug (by Guilhem -# and possibly Konstantin). - ---disable_ps_protocol - -source include/master-slave.inc; - -# Save original timezone -set @my_time_zone= @@global.time_zone; - -# Some preparations -let $VERSION=`select version()`; -set timestamp=100000000; # for fixed output of mysqlbinlog -create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); -create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); - -connection slave; -select @@time_zone; -#set time_zone='UTC'; -#select @@time_zone; -# -# Let us check how well replication works when we are saving datetime -# value in TIMESTAMP field. -# -connection master; -select @@time_zone; -#set time_zone='UTC'; -#select @@time_zone; -insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -#set time_zone='UTC'; -SELECT * FROM t1 ORDER BY n; - -# Let us check also that setting of time_zone back to default also works -# well -connection master; -delete from t1; -set time_zone='Europe/Moscow'; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -set time_zone='Europe/Moscow'; -SELECT * FROM t1 ORDER BY n; -connection master; -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Comment out the exec of the binlog so test works for both SBR and RBR -#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -#--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 - -# Let us check with LOAD DATA INFILE -# (we do it after mysqlbinlog because the temp files names are not constant) -connection master; -delete from t1; -set time_zone='UTC'; -load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -set time_zone='UTC'; -SELECT * FROM t1 ORDER BY n; -set time_zone='Europe/Moscow'; - -# Put back values of before the LOAD -connection master; -set time_zone='Europe/Moscow'; -delete from t1; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); - -# -# Now let us check how well we replicate statments reading TIMESTAMP fields -# (We should see the same data on master and on slave but it should differ -# from originally inserted) -# -set time_zone='MET'; -insert into t2 (select * from t1); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# -# Now let us check how well we replicate various CURRENT_* functions -# -connection master; -delete from t2; -set timestamp=1000072000; -insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# -# At last let us check replication of FROM_UNIXTIME/UNIX_TIMESTAMP functions. -# -connection master; -delete from t2; -insert into t2 values (from_unixtime(1000000000),NULL), - (unix_timestamp('2001-09-09 03:46:40'),NULL); -SELECT * FROM t2 ORDER BY n; -sync_slave_with_master; -# We should get same result on slave as on master -SELECT * FROM t2 ORDER BY n; - -# -# Let us check that we are allowing to set global time_zone with -# replication -# -connection master; -set global time_zone='MET'; - -# -# Let us see if CONVERT_TZ(@@time_zone) replicates -# -delete from t2; -set time_zone='UTC'; -insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL); -insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL); -SELECT * FROM t2 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# Clean up -connection master; -drop table t1, t2; -sync_slave_with_master; - - -# Restore original timezone -connection master; -set global time_zone= @my_time_zone; diff --git a/mysql-test/t/rpl_trigger.test b/mysql-test/t/rpl_trigger.test deleted file mode 100644 index 9f5f6fc9b4c..00000000000 --- a/mysql-test/t/rpl_trigger.test +++ /dev/null @@ -1,477 +0,0 @@ -# -# Test of triggers with replication -# Adding statement include due to Bug 12574 -# TODO: Remove statement include once 12574 is patched ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; - ---enable_warnings - -# -# #12482: Triggers has side effects with auto_increment values -# - -create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); -create table t2 (a int auto_increment, primary key (a), b int); -create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); - -delimiter |; -create trigger t1 before insert on t1 for each row -begin - insert into t3 values (NULL, "t1", new.a, new.b, rand()); -end| - -create trigger t2 after insert on t2 for each row -begin - insert into t3 values (NULL, "t2", new.a, new.b, rand()); -end| -delimiter ;| - -insert into t3 values(100,"log",0,0,0); - -# Ensure we always have same random numbers -SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; - -# Emulate that we have rows 2-9 deleted on the slave -insert into t1 values(1,1,rand()),(NULL,2,rand()); -insert into t2 (b) values(last_insert_id()); -insert into t2 values(3,0),(NULL,0); -insert into t2 values(NULL,0),(500,0); - -select a,b, truncate(rand_value,4) from t1; -select * from t2; -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -save_master_pos; -connection slave; -sync_with_master; ---disable_query_log -select "--- On slave --" as ""; ---enable_query_log -select a,b, truncate(rand_value,4) from t1; -select * from t2; -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -connection master; -drop table t1,t2,t3; - -# -# #12480: NOW() is not constant in a trigger -# #12481: Using NOW() in a stored function breaks statement based replication -# - -# Start by getting a lock on 'bug12480' to be able to use get_lock() as sleep() -connect (con2,localhost,root,,); -connection con2; -select get_lock("bug12480",2); -connection default; - -create table t1 (a datetime,b datetime, c datetime); ---disable_warnings -drop function if exists bug12480; ---enable_warnings - -delimiter |; - -create function bug12480() returns datetime -begin - set @a=get_lock("bug12480",2); - return now(); -end| - -create trigger t1_first before insert on t1 -for each row begin - set @a=get_lock("bug12480",2); - set new.b= now(); - set new.c= bug12480(); -end -| - -delimiter ;| -insert into t1 set a = now(); -select a=b && a=c from t1; -let $time=`select a from t1`; - -# Check that definer attribute is replicated properly: -# - dump definers on the master; -# - wait for the slave to synchronize with the master; -# - dump definers on the slave; - -SELECT routine_name, definer -FROM information_schema.routines; - -SELECT trigger_name, definer -FROM information_schema.triggers; - -save_master_pos; -connection slave; -sync_with_master; ---disable_query_log -select "--- On slave --" as ""; ---enable_query_log - -# XXX: Definers of stored procedures and functions are not replicated. WL#2897 -# (Complete definer support in the stored routines) addresses this issue. So, -# the result file is expected to be changed after implementation of this WL -# item. - -SELECT routine_name, definer -FROM information_schema.routines; - -SELECT trigger_name, definer -FROM information_schema.triggers; - -select a=b && a=c from t1; ---disable_query_log -eval select a='$time' as 'test' from t1; ---enable_query_log - -connection master; -disconnect con2; - -truncate table t1; -drop trigger t1_first; - -insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); -select a=b && a=c from t1; - -drop function bug12480; -drop table t1; - -# -# #14614: Replication of tables with trigger generates error message if databases is changed -# Note. The error message is emitted by _myfree() using fprintf() to the stderr -# and because of that does not fall into the .result file. -# - -create table t1 (i int); -create table t2 (i int); - -delimiter |; -create trigger tr1 before insert on t1 for each row -begin - insert into t2 values (1); -end| -delimiter ;| - -create database other; -use other; -insert into test.t1 values (1); - -save_master_pos; -connection slave; -sync_with_master; - -connection master; -use test; -drop table t1,t2; -drop database other; - - -# -# Test specific triggers including SELECT into var with replication -# BUG#13227: -# slave performs an update to the replicatable table, t1, -# and modifies its local data, t3, by mean of its local trigger that uses -# another local table t2. -# Expected values are commented into queries. -# -# Body of the test executes in a loop since the problem occurred randomly. -# - -let $max_rows=5; -let $rnd=10; - ---echo test case for BUG#13227 -while ($rnd) -{ - --echo ------------------- - echo $rnd; - --echo ------------------- - -### SETUP - ---disable_warnings - connection master; - eval drop table if exists t1$rnd; - connection slave; - eval drop table if exists t2$rnd,t3$rnd; ---enable_warnings - - connection master; - eval create table t1$rnd (f1 int) /* 2 replicate */; - let $i=$max_rows; - while ($i) - { - eval insert into t1$rnd values (-$i); - dec $i; - } - - sync_slave_with_master; -#connection slave; - eval select * from t1$rnd; - delimiter |; - eval create trigger trg1$rnd before update on t1$rnd /* slave local */ - for each row - begin - DECLARE r integer; - SELECT f2 INTO r FROM t2$rnd where f1=NEW.f1; - INSERT INTO t3$rnd values (r); - end| - delimiter ;| - eval create table t2$rnd (f1 int, f2 int) /* slave local */; - eval create table t3$rnd (f3 int) /* slave local */; - let $i=$max_rows; - while ($i) - { - eval insert into t2$rnd values ($i, $i*100); - dec $i; - } - -### Test - -#connection slave; - -# trigger works as specified when updates from slave - eval select * from t2$rnd; - eval UPDATE t1$rnd SET f1=$max_rows where f1=-$max_rows; - eval SELECT * from t1$rnd /* must be f1 $max_rows, 1 - $max_rows 2 - $max_rows ... -1 */; - eval SELECT * from t3$rnd /* must be f3 $max_rows*100 */; - - connection master; - let $i=$max_rows; - while ($i) - { - eval UPDATE t1$rnd SET f1=$i where f1=-$i; - dec $i; - } - - sync_slave_with_master; -#connection slave; - eval SELECT * from t1$rnd /* must be f1 $max_rows ... 1 */; - eval SELECT * from t3$rnd /* must be f3 $max_rows * 100 ... 100 */; - -### CLEANUP -#connection slave; - eval drop trigger trg1$rnd; - eval drop table t2$rnd,t3$rnd; - - connection master; - eval drop table t1$rnd; - - dec $rnd; -} - - -# -# BUG#16266: Definer is not fully qualified error during replication. -# -# The idea of this test is to emulate replication of a trigger from the old -# master (master w/o "DEFINER in triggers" support) to the new slave and check -# that: -# 1. the trigger on the slave will be replicated w/o errors; -# 2. the trigger on the slave will be non-SUID (will have no DEFINER); -# 3. the trigger can be activated later on the slave w/o errors. -# -# In order to emulate this kind of replication, we make the slave playing the binlog, -# recorded by 5.0.16 master. This binlog contains the following statements: -# CREATE TABLE t1(c INT); -# CREATE TABLE t2(s CHAR(200)); -# CREATE TRIGGER trg1 AFTER INSERT ON t1 -# FOR EACH ROW -# INSERT INTO t2 VALUES(CURRENT_USER()); -# INSERT INTO t1 VALUES(1); -# - -# 1. Check that the trigger's replication is succeeded. - -# Stop the slave. - -connection slave; -STOP SLAVE; - -# Replace master's binlog. - -connection master; -FLUSH LOGS; -exec cp $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001; - -# Make the slave to replay the new binlog. - -connection slave; -RESET SLAVE; -START SLAVE; - -SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; - -# Check that the replication succeeded. - -SHOW TABLES LIKE 't_'; -SHOW TRIGGERS; -SELECT * FROM t1; -SELECT * FROM t2; - -# 2. Check that the trigger is non-SUID on the slave; -# 3. Check that the trigger can be activated on the slave. - -INSERT INTO t1 VALUES(2); - -SELECT * FROM t1; -SELECT * FROM t2; - -# That's all, cleanup. - -DROP TRIGGER trg1; -DROP TABLE t1; -DROP TABLE t2; - -STOP SLAVE; -RESET SLAVE; - -# The master should be clean. - -connection master; -SHOW TABLES LIKE 't_'; -SHOW TRIGGERS; - -RESET MASTER; - -# Restart slave. - -connection slave; -START SLAVE; - - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating objects... - -CREATE TABLE t1(c INT); -CREATE TABLE t2(c INT); - -/*!50003 CREATE TRIGGER t1_bi BEFORE INSERT ON t1 - FOR EACH ROW - INSERT INTO t2 VALUES(NEW.c * 10) */; - ---echo ---echo ---> Inserting value... - -INSERT INTO t1 VALUES(1); - ---echo ---echo ---> Checking on master... - -SELECT * FROM t1; -SELECT * FROM t2; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SELECT * FROM t1; -SELECT * FROM t2; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP TABLE t1; -DROP TABLE t2; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - -# -# BUG#23703: DROP TRIGGER needs an IF EXISTS -# - -connection master; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1(a int, b varchar(50)); - --- error ER_TRG_DOES_NOT_EXIST -drop trigger not_a_trigger; - -drop trigger if exists not_a_trigger; - -create trigger t1_bi before insert on t1 -for each row set NEW.b := "In trigger t1_bi"; - -insert into t1 values (1, "a"); -drop trigger if exists t1_bi; -insert into t1 values (2, "b"); -drop trigger if exists t1_bi; -insert into t1 values (3, "c"); - -select * from t1; - -save_master_pos; -connection slave; -sync_with_master; - -select * from t1; - -connection master; - -drop table t1; - -# -# End of tests -# -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_trunc_temp.test b/mysql-test/t/rpl_trunc_temp.test deleted file mode 100644 index 28bcb0c06c3..00000000000 --- a/mysql-test/t/rpl_trunc_temp.test +++ /dev/null @@ -1,35 +0,0 @@ -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# -# Bug#17137 Running "truncate table" on temporary table -# leaves the table open on a slave -# - -create temporary table t1 (n int); -insert into t1 values(1); -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Perform a delete from temp table -connection master; -delete from t1; -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Perform truncate on temp table -connection master; -truncate t1; -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Disconnect the master, temp table on slave should dissapear -disconnect master; ---real_sleep 3 # time for DROP to be read by slave -connection slave; -show status like 'Slave_open_temp_tables'; - - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_truncate_2myisam.test b/mysql-test/t/rpl_truncate_2myisam.test deleted file mode 100644 index a0f0ea04f44..00000000000 --- a/mysql-test/t/rpl_truncate_2myisam.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/not_ndb_default.inc -let $engine=MyISAM; ---source extra/rpl_tests/rpl_truncate.test - diff --git a/mysql-test/t/rpl_truncate_3innodb.test b/mysql-test/t/rpl_truncate_3innodb.test deleted file mode 100644 index a31fd62a29a..00000000000 --- a/mysql-test/t/rpl_truncate_3innodb.test +++ /dev/null @@ -1,6 +0,0 @@ - ---source include/have_innodb.inc ---source include/not_ndb_default.inc - -let $engine=InnoDB; ---source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/t/rpl_truncate_7ndb.test b/mysql-test/t/rpl_truncate_7ndb.test deleted file mode 100644 index 1d69eee5dd0..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb.test +++ /dev/null @@ -1,71 +0,0 @@ - ---source include/have_ndb.inc ---source include/master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---disable_query_log ---disable_warnings -connection slave; -STOP SLAVE; -connection master; -DROP TABLE IF EXISTS t1; -RESET MASTER; -connection slave; -DROP TABLE IF EXISTS t1; -RESET SLAVE; -START SLAVE; ---enable_warnings ---enable_query_log - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -# This is silly, but NDB doesn't add to the binlog fast enough ---real_sleep 10 -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; -let SERVER_VERSION=`select version()`; ---replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ ---replace_result $SERVER_VERSION SERVER_VERSION -SHOW BINLOG EVENTS; - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---replace_regex /table_id: [0-9]+/table_id: #/ ---replace_result $SERVER_VERSION SERVER_VERSION -SHOW BINLOG EVENTS; - --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/t/rpl_truncate_7ndb_2-master.opt deleted file mode 100644 index 01cf3e0520f..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb_2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=mixed diff --git a/mysql-test/t/rpl_truncate_7ndb_2.test b/mysql-test/t/rpl_truncate_7ndb_2.test deleted file mode 100644 index 4ee6c98d463..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb_2.test +++ /dev/null @@ -1,6 +0,0 @@ -# Same test as rpl_truncate_7ndb.test, but with mixed mode -# This is marked with 'big_test' just because the rpl_truncate_7ndb test is -# so slow... - ---source include/big_test.inc ---source t/rpl_truncate_7ndb.test diff --git a/mysql-test/t/rpl_udf-master.opt b/mysql-test/t/rpl_udf-master.opt deleted file mode 100644 index 7d8786c156a..00000000000 --- a/mysql-test/t/rpl_udf-master.opt +++ /dev/null @@ -1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/t/rpl_udf-slave.opt b/mysql-test/t/rpl_udf-slave.opt deleted file mode 100644 index 7d8786c156a..00000000000 --- a/mysql-test/t/rpl_udf-slave.opt +++ /dev/null @@ -1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/t/rpl_udf.test b/mysql-test/t/rpl_udf.test deleted file mode 100644 index 262ad04630c..00000000000 --- a/mysql-test/t/rpl_udf.test +++ /dev/null @@ -1,22 +0,0 @@ -################################################################### -# Author: Chuck Bell # -# Date: 2006-12-21 # -# Purpose: To test that UDFs are replicated in both row based and # -# statement based format. This tests work completed in WL#3629. # -################################################################### - ---source include/not_embedded.inc ---source include/master-slave.inc - -let $engine_type= MyISAM; - -set binlog_format=row; - -# Embedded server doesn't support binlogging ---source include/rpl_udf.inc - -set binlog_format=statement; - -# Embedded server doesn't support binlogging ---source include/rpl_udf.inc - diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test deleted file mode 100644 index 539f9c88e0d..00000000000 --- a/mysql-test/t/rpl_user_variables.test +++ /dev/null @@ -1,362 +0,0 @@ -################################### -# -# Test of replicating user variables -# -################################### - --- source include/master-slave.inc -# Disable PS as the log positions differs ---disable_ps_protocol - - -# Clean up old slave's binlogs. -# The slave is started with --log-slave-updates -# and this test does SHOW BINLOG EVENTS on the slave's -# binlog. But previous tests can influence the current test's -# binlog (e.g. a temporary table in the previous test has not -# been explicitly deleted, or it has but the slave hasn't had -# enough time to catch it before STOP SLAVE, -# and at the beginning of the current -# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). -# We wait for the slave to have written all he wants to the binlog -# (otherwise RESET MASTER may come too early). -save_master_pos; -connection slave; -sync_with_master; -reset master; -connection master; - -create table t1(n char(30)); -set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; -set @s1:='This is a test', @r1:=12.5, @r2:=-12.5; -set @n1:=null; -set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def'; -insert into t1 values (@i1), (@i2), (@i3), (@i4); -insert into t1 values (@r1), (@r2); -insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5); -insert into t1 values (@n1); -insert into t1 values (@n2); # not explicitely set before -insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1); -insert into t1 values (@a+(@b:=@a+1)); -set @q:='abc'; -insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')); -set @a:=5; -insert into t1 values (@a),(@a); -# To flush the pending event, we add the following statement. RBR can -# concatenate the result of several statements, which SBR cannot. -select * from t1 where n = ''; -connection master1; # see if variable is reset in binlog when thread changes -insert into t1 values (@a),(@a),(@a*5); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY n; -connection master; -insert into t1 select * FROM (select @var1 union select @var2) AS t2; -drop table t1; ---echo End of 4.1 tests. - -# BUG#20141 -# The following tests ensure that if user-defined variables are used in SF/Triggers -# that they are replicated correctly. These tests should be run in both SBR and RBR -# modes. - -# This test uses a procedure that inserts data values based on the value of a -# user-defined variable. It also has a trigger that inserts data based on the -# same variable. Successful test runs show that the @var is replicated -# properly and that the procedure and trigger insert the correct data on the -# slave. -# -# The test of stored procedure was included for completeness. Replication of stored -# procedures was not directly affected by BUG#20141. -# -# This test was constructed for BUG#20141 - ---disable_warnings -DROP TABLE IF EXISTS t20; -DROP TABLE IF EXISTS t21; -DROP PROCEDURE IF EXISTS test.insert; ---enable_warnings - -CREATE TABLE t20 (a VARCHAR(20)); -CREATE TABLE t21 (a VARCHAR(20)); -DELIMITER |; - -# Create a procedure that uses the @var for flow control - -CREATE PROCEDURE test.insert() -BEGIN - IF (@VAR) - THEN - INSERT INTO test.t20 VALUES ('SP_TRUE'); - ELSE - INSERT INTO test.t20 VALUES ('SP_FALSE'); - END IF; -END| - -# Create a trigger that uses the @var for flow control - -CREATE TRIGGER test.insert_bi BEFORE INSERT - ON test.t20 FOR EACH ROW - BEGIN - IF (@VAR) - THEN - INSERT INTO test.t21 VALUES ('TRIG_TRUE'); - ELSE - INSERT INTO test.t21 VALUES ('TRIG_FALSE'); - END IF; - END| -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set @var and call the procedure, repeat with different values - -SET @VAR=0; -CALL test.insert(); -SET @VAR=1; -CALL test.insert(); - ---echo On master: Check the tables for correct data - -SELECT * FROM t20; -SELECT * FROM t21; - -sync_slave_with_master; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * FROM t20; -SELECT * FROM t21; -connection master; - -# Cleanup - -DROP TABLE t20; -DROP TABLE t21; -DROP PROCEDURE test.insert; - -# This test uses a stored function that uses user-defined variables to return data -# This test was constructed for BUG#20141 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS test.square; ---enable_warnings - -CREATE TABLE t1 (i INT); - -# Create function that returns a value from @var. In this case, the square function - -CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN -(@var * @var); - -# Set the @var to different values and insert them into a table - -SET @var = 1; -INSERT INTO t1 VALUES (square()); -SET @var = 2; -INSERT INTO t1 VALUES (square()); -SET @var = 3; -INSERT INTO t1 VALUES (square()); -SET @var = 4; -INSERT INTO t1 VALUES (square()); -SET @var = 5; -INSERT INTO t1 VALUES (square()); - ---echo On master: Retrieve the values from the table - -SELECT * FROM t1; - -sync_slave_with_master; - ---echo On slave: Retrieve the values from the table and verify they are the same as on master - -SELECT * FROM t1; - -connection master; - -# Cleanup - -DROP TABLE t1; -DROP FUNCTION test.square; - -# This test uses stored functions that uses user-defined variables to return data -# based on the use of @vars inside a function body. -# This test was constructed for BUG#14914 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; ---enable_warnings - -CREATE TABLE t1(a int); -DELIMITER |; - -# Create a function that simply returns the value of an @var. -# Create a function that uses an @var for flow control, creates and uses another -# @var and sets its value to a value based on another @var. - -CREATE FUNCTION f1() returns int deterministic BEGIN - return @a; -END | - -CREATE FUNCTION f2() returns int deterministic BEGIN - IF (@b > 0) then - SET @c = (@a + @b); - else - SET @c = (@a - 1); - END if; - return @c; -END | -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set an @var to a value and insert data into a table using the first function. -# Set two more @vars to some values and insert data into a table using the second function. - -SET @a=500; -INSERT INTO t1 values(f1()); -SET @b = 125; -SET @c = 1; -INSERT INTO t1 values(f2()); - ---echo On master: Retrieve the values from the table - -sync_slave_with_master; -connection master; - -SELECT * from t1; - -connection slave; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * from t1; - -connection master; - -# Cleanup - -DROP TABLE t1; -DROP FUNCTION f1; -DROP FUNCTION f2; - -# This test uses a function that changes a user-defined variable in its body. This test -# will ensure the @vars are replicated when needed and not interrupt the normal execution -# of the function on the slave. This also applies to procedures and triggers. - -# This test was constructed for BUG#25167 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings -CREATE TABLE t1 (i int); -CREATE TABLE t2 (k int); -DELIMITER |; - -# Create a trigger that inserts data into another table, changes the @var then inserts -# another row with the modified value. - -CREATE trigger t1_bi before INSERT on t1 for each row BEGIN - INSERT INTO t2 values (@a); - SET @a:=42; - INSERT INTO t2 values (@a); -END | -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set the @var to a value then insert data into first table. - -SET @a:=100; -INSERT INTO t1 values (5); - ---echo On master: Check to see that data was inserted correctly in both tables - -SELECT * from t1; -SELECT * from t2; - -sync_slave_with_master; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * from t1; -SELECT * from t2; - -connection master; -drop table t1, t2; - -# -# Bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements -# -connection master; -create table t1(a int, b int); -prepare s1 from 'insert into t1 values (@x:=@x+1, ?)'; -set @x=1; execute s1 using @x; -select * from t1; -sync_slave_with_master; -connection slave; -select * from t1; -connection master; -drop table t1; - ---echo End of 5.0 tests. - -# This test uses a stored function that uses user-defined variables to return data -# The test ensures the value of the user-defined variable is replicated correctly -# and in the correct order of assignment. - -# This test was constructed for BUG#20141 - ---disable_warnings -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; ---enable_warnings - -CREATE TABLE t1 (i INT); - -# Create two functions. One simply returns the user-defined variable. The other -# returns a value based on the user-defined variable. - -CREATE FUNCTION f1() RETURNS INT RETURN @a; DELIMITER |; CREATE -FUNCTION f2() RETURNS INT BEGIN - INSERT INTO t1 VALUES (10 + @a); - RETURN 0; -END| -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set the variable and execute the functions. - -SET @a:=123; -SELECT f1(), f2(); - ---echo On master: Check to see that data was inserted correctly - -INSERT INTO t1 VALUES(f1()); -SELECT * FROM t1; - -sync_slave_with_master; - ---echo On slave: Check the table for correct data and it matches master - -SELECT * FROM t1; - -connection master; - -# Cleanup - -DROP FUNCTION f1; -DROP FUNCTION f2; -DROP TABLE t1; - -sync_slave_with_master; -stop slave; diff --git a/mysql-test/t/rpl_variables-master.opt b/mysql-test/t/rpl_variables-master.opt deleted file mode 100644 index a668c6bfbe8..00000000000 --- a/mysql-test/t/rpl_variables-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-skip-errors=3,100,137,643,1752 diff --git a/mysql-test/t/rpl_variables.test b/mysql-test/t/rpl_variables.test deleted file mode 100644 index 84dc3acfe6e..00000000000 --- a/mysql-test/t/rpl_variables.test +++ /dev/null @@ -1,20 +0,0 @@ -source include/master-slave.inc; - -# Init for rstore of variable values -set @my_slave_net_timeout =@@global.slave_net_timeout; - -set global slave_net_timeout=100; -set global sql_slave_skip_counter=100; - -# End of 4.1 tests - -# BUG #7800: Add various-slave related variables to SHOW VARIABLES -show variables like 'slave_compressed_protocol'; ---replace_column 2 SLAVE_LOAD_TMPDIR -show variables like 'slave_load_tmpdir'; -# We just set some arbitrary values in variables-master.opt so we can test -# that a list of values works correctly -show variables like 'slave_skip_errors'; - -# Cleanup -set global slave_net_timeout=default; diff --git a/mysql-test/t/rpl_view-slave.opt b/mysql-test/t/rpl_view-slave.opt deleted file mode 100644 index 79b3bf6174b..00000000000 --- a/mysql-test/t/rpl_view-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.foo diff --git a/mysql-test/t/rpl_view.test b/mysql-test/t/rpl_view.test deleted file mode 100644 index 51ad319b212..00000000000 --- a/mysql-test/t/rpl_view.test +++ /dev/null @@ -1,167 +0,0 @@ -# NYI - row-based cannot use CREATE ... SELECT - -source include/master-slave.inc; ---disable_warnings -drop table if exists t1,v1; -drop view if exists t1,v1; -sync_slave_with_master; -reset master; ---enable_warnings - -# -# Check that creation drop of view is replicated, also check replication of -# updating of view -# -connection master; -create table t1 (a int); -insert into t1 values (1); -create view v1 as select a from t1; -insert into v1 values (2); -select * from v1 order by a; -sync_slave_with_master; -# view already have to be on slave -select * from v1 order by a; -connection master; -update v1 set a=3 where a=1; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -delete from v1 where a=2; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -# 'alter view' internally maped to creation, but still check that it works -alter view v1 as select a as b from t1; -sync_slave_with_master; -select * from v1 order by 1; -connection master; -drop view v1; -sync_slave_with_master; -#error, because view have to be removed from slave --- error 1146 -select * from v1 order by a; -connection master; -drop table t1; -sync_slave_with_master; -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Commented out binlog events to work with SBR and RBR -#--replace_column 2 # 5 # -# show binlog events limit 1,100; - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating objects... - -CREATE TABLE t1(c INT); - -/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; - ---echo ---echo ---> Inserting value... - -INSERT INTO t1 VALUES(1); - ---echo ---echo ---> Checking on master... - -SELECT * FROM t1; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SELECT * FROM t1; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP VIEW v1; -DROP TABLE t1; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - -# -# BUG#19419: "VIEW: View that the column name is different -# by master and slave is made". -# -connection master; -create table t1(a int, b int); -insert into t1 values (1, 1), (1, 2), (1, 3); -create view v1(a, b) as select a, sum(b) from t1 group by a; - -sync_slave_with_master; -explain v1; -show create table v1; -select * from v1; - -connection master; -drop table t1; -drop view v1; - -sync_slave_with_master; - -# -# BUG#28244 CREATE VIEW breaks replication when view exists -# -connection master; -CREATE TABLE t1(a INT); -CREATE VIEW v1 AS SELECT * FROM t1; ---error ER_TABLE_EXISTS_ERROR -CREATE VIEW v1 AS SELECT * FROM t1; -DROP VIEW v1; -DROP TABLE t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/strict_autoinc_5ndb.test b/mysql-test/t/strict_autoinc_5ndb.test deleted file mode 100644 index 9e2090fddef..00000000000 --- a/mysql-test/t/strict_autoinc_5ndb.test +++ /dev/null @@ -1,10 +0,0 @@ --- source include/have_ndb.inc - -# -# Bug#20573 Strict mode auto-increment -# - -let $type= 'NDB' ; ---source include/strict_autoinc.inc - -# end of test -- cgit v1.2.1