diff options
author | unknown <msvensson@pilot.(none)> | 2007-06-27 14:28:02 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.(none)> | 2007-06-27 14:28:02 +0200 |
commit | a40e44efed0794ed91e7d454743fdaa7d6099f45 (patch) | |
tree | 7685fdafab101eb337d2a982d91411513f0eb399 /mysql-test/suite/rpl/r | |
parent | 75689af808d935de69a39138e35cde575c982251 (diff) | |
download | mariadb-git-a40e44efed0794ed91e7d454743fdaa7d6099f45.tar.gz |
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 <suite>.<testname>
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''
Diffstat (limited to 'mysql-test/suite/rpl/r')
181 files changed, 21338 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl000001.a.result b/mysql-test/suite/rpl/r/rpl000001.a.result new file mode 100644 index 00000000000..c52b83d729a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000001.a.result @@ -0,0 +1,3 @@ +n +1 +2 diff --git a/mysql-test/suite/rpl/r/rpl000001.b.result b/mysql-test/suite/rpl/r/rpl000001.b.result new file mode 100644 index 00000000000..5108cfdaf26 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000001.b.result @@ -0,0 +1,2 @@ +sum(length(word)) +71 diff --git a/mysql-test/suite/rpl/r/rpl000010.result b/mysql-test/suite/rpl/r/rpl000010.result new file mode 100644 index 00000000000..65191ea411f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000010.result @@ -0,0 +1,14 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int not null auto_increment primary key); +insert into t1 values(NULL); +insert into t1 values(2); +select n from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000011.result b/mysql-test/suite/rpl/r/rpl000011.result new file mode 100644 index 00000000000..dd0fa2fbe74 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000011.result @@ -0,0 +1,16 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int); +insert into t1 values(1); +stop slave; +start slave; +insert into t1 values(2); +select * from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000013.result b/mysql-test/suite/rpl/r/rpl000013.result new file mode 100644 index 00000000000..37838bb88e0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000013.result @@ -0,0 +1,28 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t2(n int); +create temporary table t1 (n int); +insert into t1 values(1),(2),(3); +insert into t2 select * from t1; +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1 as t10; +insert into t2 values(6); +select * from t2; +n +1 +2 +3 +4 +5 +6 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 't1' diff --git a/mysql-test/suite/rpl/r/rpl000017.result b/mysql-test/suite/rpl/r/rpl000017.result new file mode 100644 index 00000000000..1c611357e64 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000017.result @@ -0,0 +1,18 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; +grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; +start slave; +drop table if exists t1; +create table t1(n int); +insert into t1 values(24); +select * from t1; +n +24 +drop table t1; +delete from mysql.user where user="replicate"; diff --git a/mysql-test/suite/rpl/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result new file mode 100644 index 00000000000..8d23136420f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000015.result @@ -0,0 +1,34 @@ +reset master; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +change master to master_host='127.0.0.1'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=MASTER_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No +drop table if exists t1; +create table t1 (n int, PRIMARY KEY(n)); +insert into t1 values (10),(45),(90); +SELECT * FROM t1 ORDER BY n; +n +10 +45 +90 +SELECT * FROM t1 ORDER BY n; +n +10 +45 +90 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result new file mode 100644 index 00000000000..16fa931e303 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -0,0 +1,11 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int) engine=myisam; +flush tables; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result new file mode 100644 index 00000000000..70013f95d85 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result @@ -0,0 +1,117 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); +LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; +DELETE FROM test.t1 WHERE a = 'abashed'; +DELETE FROM test.t1; +LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; +SELECT * FROM test.t1 ORDER BY a DESC; +a +aberration +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase +SELECT * FROM test.t1 ORDER BY a DESC; +a +aberration +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_alter.result b/mysql-test/suite/rpl/r/rpl_alter.result new file mode 100644 index 00000000000..6ef5ce3462a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_alter.result @@ -0,0 +1,21 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +alter table mysqltest.t1 add m int; +insert into mysqltest.t1 values (1,2); +create table mysqltest.t2 (n int); +insert into mysqltest.t2 values (45); +rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2; +select * from mysqltest.t2; +n m +1 2 +select * from mysqltest.t3; +n +45 +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result new file mode 100644 index 00000000000..6edbe5d427f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_alter_db.result @@ -0,0 +1,8 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +use mysql; +alter database collate latin1_bin; diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result new file mode 100644 index 00000000000..083f3a4e901 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -0,0 +1,229 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +select * from t1; +a b +12 1 +22 2 +32 3 +select * from t1; +a b +12 1 +22 2 +32 3 +drop table t1; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam; +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); +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +drop table t1; +set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; +show variables like "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=innodb; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +set @@insert_id=600; +insert into t1 values(600),(NULL),(NULL); +ERROR 23000: Duplicate entry '600' for key 'PRIMARY' +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +drop table t1; +set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values(2),(12),(22),(32),(42); +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +select * from t1; +a +1 +3 +11 +21 +31 +select * from t1; +a +1 +2 +3 +11 +12 +21 +22 +31 +32 +42 +drop table t1; +create table t1 (a tinyint not null auto_increment primary key) engine=myisam; +insert into t1 values(103); +set auto_increment_increment=11; +set auto_increment_offset=4; +insert into t1 values(null); +insert into t1 values(null); +insert into t1 values(null); +ERROR 23000: Duplicate entry '125' for key 'PRIMARY' +select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a; +a mod(a-@@auto_increment_offset,@@auto_increment_increment) +103 0 +114 0 +125 0 +create table t2 (a tinyint unsigned not null auto_increment primary key) engine=myisam; +set auto_increment_increment=10; +set auto_increment_offset=1; +set insert_id=1000; +insert into t2 values(null); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a; +a mod(a-@@auto_increment_offset,@@auto_increment_increment) +251 0 +create table t3 like t1; +set auto_increment_increment=1000; +set auto_increment_offset=700; +insert into t3 values(null); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +select * from t3 order by a; +a +127 +select * from t1 order by a; +a +103 +114 +125 +select * from t2 order by a; +a +251 +select * from t3 order by a; +a +127 +drop table t1,t2,t3; diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result new file mode 100644 index 00000000000..25eda6ee454 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result @@ -0,0 +1,47 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists test1; +create database test1; +use test1; +CREATE TABLE `t1` ( +`id` int(10) unsigned NOT NULL auto_increment, +`fname` varchar(100) default NULL, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +INSERT INTO `t1` VALUES (1, 'blablabla'); +CREATE TABLE `t2` ( +`id` int(10) NOT NULL auto_increment, +`comment` varchar(255) NOT NULL default '', +PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 ; +INSERT INTO `t2` VALUES (1, 'testtest 1'); +INSERT INTO `t2` VALUES (2, 'test 2'); +CREATE PROCEDURE simpleproc3 () +NOT DETERMINISTIC +BEGIN +INSERT INTO t1 (fname) (SELECT t2.comment FROM t2 WHERE t2.id = '1'); +INSERT INTO t1 (fname) VALUES('test'); +END +$ +CALL simpleproc3(); +select * from t2; +id comment +1 testtest 1 +2 test 2 +TRUNCATE TABLE `t1`; +CALL simpleproc3(); +select * from t1; +id fname +1 testtest 1 +2 test +use test1; +select * from t1; +id fname +1 testtest 1 +2 test +drop database test1; +drop database test1; diff --git a/mysql-test/suite/rpl/r/rpl_bit.result b/mysql-test/suite/rpl/r/rpl_bit.result new file mode 100644 index 00000000000..924de8a65f8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_bit.result @@ -0,0 +1,138 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 ( +dummyKey INTEGER NOT NULL, +f01 TINYINT, +f10 TINYINT, +f12 TINYINT, +f15 TINYINT, +f16 TINYINT, +f7 TINYINT, +f9 TINYINT, +f29 TINYINT, +f0 TINYINT, +fA1 TINYINT, +C32 TINYINT, +A42 TINYINT, +CA3 TINYINT, +A044 TINYINT, +f001 TINYINT, +A3002 TINYINT, +fC003 TINYINT, +CA300 TINYINT, +A305 TINYINT, +CA321 TINYINT, +r001 TINYINT, +bit1 BIT(6), +bit2 BIT(6), +bit3 BIT(6), +State1 TINYINT, +State2 TINYINT, +State3 TINYINT, +State4 TINYINT, +SubState TINYINT, +gState TINYINT, +oSupp TINYINT, +tSupp TINYINT, +sSuppD TINYINT, +mSuppf TINYINT, +GSuppDf TINYINT, +VNotSupp TINYINT, +x034 TINYINT, +PRIMARY KEY USING HASH (dummyKey) ); +LOCK TABLES test.t1 WRITE; +INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.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'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +UNLOCK TABLES; +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +SELECT hex(bit1) FROM test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +SELECT hex(bit1) FROM test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_bit_npk.result b/mysql-test/suite/rpl/r/rpl_bit_npk.result new file mode 100644 index 00000000000..9599660f18f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_bit_npk.result @@ -0,0 +1,169 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 ( +dummyKey INTEGER NOT NULL, +f01 TINYINT, +f10 TINYINT, +f12 TINYINT, +f15 TINYINT, +f16 TINYINT, +f7 TINYINT, +f9 TINYINT, +f29 TINYINT, +f0 TINYINT, +fA1 TINYINT, +C32 TINYINT, +A42 TINYINT, +CA3 TINYINT, +A044 TINYINT, +f001 TINYINT, +A3002 TINYINT, +fC003 TINYINT, +CA300 TINYINT, +A305 TINYINT, +CA321 TINYINT, +r001 TINYINT, +bit1 BIT(6), +bit2 BIT(6), +bit3 BIT(6), +State1 TINYINT, +State2 TINYINT, +State3 TINYINT, +State4 TINYINT, +SubState TINYINT, +gState TINYINT, +oSupp TINYINT, +tSupp TINYINT, +sSuppD TINYINT, +mSuppf TINYINT, +GSuppDf TINYINT, +VNotSupp TINYINT, +x034 TINYINT); +LOCK TABLES test.t1 WRITE; +INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,NULL,1); +INSERT INTO test.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'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'0',1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +UNLOCK TABLES; +UPDATE test.t1 set x034 = 50 where bit3 = b'000000'; +UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0'; +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 +FROM test.t1 +ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 NULL 1 +5 5 3 2 1 +5 5 3 2 50 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +SELECT hex(bit1) from test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 +FROM test.t1 +ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 NULL 1 +5 5 3 2 1 +5 5 3 2 50 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +SELECT hex(bit1) from test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +CREATE TABLE test.t2 (a INT, b BIT(1)); +INSERT INTO test.t2 VALUES (1, b'0'); +INSERT INTO test.t2 VALUES (1, b'1'); +UPDATE test.t2 SET a = 2 WHERE b = b'1'; +CREATE TABLE test.t3 (a INT, b INT); +INSERT INTO test.t3 VALUES (1, NULL); +INSERT INTO test.t3 VALUES (1, 0); +UPDATE test.t3 SET a = 2 WHERE b = 0; +SELECT a, hex(b) FROM test.t2 ORDER BY a,b; +a hex(b) +1 0 +2 1 +SELECT * FROM test.t3 ORDER BY a,b; +a b +1 NULL +2 0 +SELECT a, hex(b) FROM test.t2 ORDER BY a,b; +a hex(b) +1 0 +2 1 +SELECT * FROM test.t3 ORDER BY a,b; +a b +1 NULL +2 0 +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result new file mode 100644 index 00000000000..680328bcea5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -0,0 +1,26 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(n int); +select * from t1; +n +stop slave sql_thread; +insert into t1 values(1); +insert into t1 values(2); +stop slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No +change master to master_user='root'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No +start slave; +select * from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_charset_sjis.result b/mysql-test/suite/rpl/r/rpl_charset_sjis.result new file mode 100644 index 00000000000..770ad0588d1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_charset_sjis.result @@ -0,0 +1,26 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1; +drop procedure if exists p1; +create table t1 (a varchar(255) character set sjis); +create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a); +SET NAMES binary; +CALL p1 ('–\\'); +select "--- on master ---"; +--- on master --- +--- on master --- +select hex(a) from t1 ; +hex(a) +965C +select "--- on slave ---"; +--- on slave --- +--- on slave --- +select hex(a) from t1; +hex(a) +965C +drop table t1; +drop procedure p1; diff --git a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result new file mode 100644 index 00000000000..eaddda63b6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result @@ -0,0 +1,13 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a INT) ENGINE=innodb; +begin; +insert into t1 values(1); +flush tables with read lock; +commit; +unlock tables; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result new file mode 100644 index 00000000000..0cfd44bc58c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -0,0 +1,70 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP DATABASE IF EXISTS mysqltest_prometheus; +DROP DATABASE IF EXISTS mysqltest_sisyfos; +DROP DATABASE IF EXISTS mysqltest_bob; +DROP DATABASE IF EXISTS mysqltest_bob; +CREATE DATABASE mysqltest_prometheus; +CREATE DATABASE mysqltest_sisyfos; +CREATE DATABASE mysqltest_bob; +USE mysqltest_sisyfos; +CREATE TABLE t1 (b int); +INSERT INTO t1 VALUES(1); +USE mysqltest_bob; +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES(2); +ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1; +USE mysqltest_sisyfos; +ALTER DATABASE mysqltest_bob CHARACTER SET latin1; +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_bob +mysqltest_prometheus +mysqltest_sisyfos +test +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_prometheus +mysqltest_sisyfos +test +DROP DATABASE IF EXISTS mysqltest_sisyfos; +USE mysqltest_prometheus; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +CREATE DATABASE mysqltest_sisyfos; +USE mysqltest_sisyfos; +CREATE TABLE t2 (a INT); +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_bob +mysqltest_prometheus +mysqltest_sisyfos +test +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_prometheus +mysqltest_sisyfos +test +USE mysqltest_prometheus; +SHOW TABLES; +Tables_in_mysqltest_prometheus +t1 +USE mysqltest_sisyfos; +SHOW TABLES; +Tables_in_mysqltest_sisyfos +t2 +DROP DATABASE IF EXISTS mysqltest_prometheus; +DROP DATABASE IF EXISTS mysqltest_sisyfos; +DROP DATABASE IF EXISTS mysqltest_bob; diff --git a/mysql-test/suite/rpl/r/rpl_critical_errors.result b/mysql-test/suite/rpl/r/rpl_critical_errors.result new file mode 100644 index 00000000000..bcc53565084 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_critical_errors.result @@ -0,0 +1 @@ +Turn on parsing to run this test diff --git a/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt b/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt new file mode 100644 index 00000000000..0df2e1ef369 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt @@ -0,0 +1,56 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; +CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; +INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t2 SELECT * FROM t1; +KILL QUERY 2; +SELECT COUNT(*) FROM t2; +COUNT(*) +0 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1317 +Last_Error # +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result new file mode 100644 index 00000000000..d41462de621 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ddl.result @@ -0,0 +1,1616 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +-------- switch to master ------- +SET AUTOCOMMIT = 1; +DROP DATABASE IF EXISTS mysqltest1; +DROP DATABASE IF EXISTS mysqltest2; +DROP DATABASE IF EXISTS mysqltest3; +CREATE DATABASE mysqltest1; +CREATE DATABASE mysqltest2; +CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=InnoDB; +INSERT INTO mysqltest1.t1 SET f1= 0; +CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=InnoDB; +CREATE INDEX my_idx6 ON mysqltest1.t6(f1); +CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=InnoDB; +INSERT INTO mysqltest1.t7 SET f1= 0; +CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=InnoDB; +CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; +SET AUTOCOMMIT = 0; +use mysqltest1; + +-------- switch to slave -------- +SET AUTOCOMMIT = 1; +use mysqltest1; + +-------- switch to master ------- + +######## SELECT 1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT 1; +1 +1 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SELECT COUNT(*) FROM t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## COMMIT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +COMMIT; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## ROLLBACK ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SET AUTOCOMMIT=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +SET AUTOCOMMIT=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SET AUTOCOMMIT=0; + +######## START TRANSACTION ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 2 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +START TRANSACTION; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## BEGIN ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 3 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +BEGIN; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP TABLE mysqltest1.t2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 4 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +DROP TABLE mysqltest1.t2; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to slave -------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to master ------- + +######## DROP TEMPORARY TABLE mysqltest1.t23 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +DROP TEMPORARY TABLE mysqltest1.t23; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to slave -------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to master ------- + +######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +RENAME TABLE mysqltest1.t3 to mysqltest1.t20; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to slave -------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to master ------- + +######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 6 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to slave -------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to master ------- + +######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 7 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## TRUNCATE TABLE mysqltest1.t7 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +TRUNCATE TABLE mysqltest1.t7; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to slave -------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to master ------- + +######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 9 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +UNLOCK TABLES; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 11 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +DROP INDEX my_idx6 ON mysqltest1.t6; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to master ------- + +######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 12 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +CREATE INDEX my_idx5 ON mysqltest1.t5(f1); +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE + +-------- switch to master ------- + +######## DROP DATABASE mysqltest2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 13 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +DROP DATABASE mysqltest2; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to master ------- + +######## CREATE DATABASE mysqltest3 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 14 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +CREATE DATABASE mysqltest3; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to master ------- + +######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 15 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to master ------- + +######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 16 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ALTER PROCEDURE p1 COMMENT "I have been altered"; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to master ------- + +######## DROP PROCEDURE p1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 17 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +DROP PROCEDURE p1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to master ------- + +######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 18 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +CREATE OR REPLACE VIEW v1 as select * from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## ALTER VIEW v1 AS select f1 from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 19 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ALTER VIEW v1 AS select f1 from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## DROP VIEW IF EXISTS v1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 20 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +DROP VIEW IF EXISTS v1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to master ------- + +######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 21 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to master ------- + +######## DROP TRIGGER trg1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 22 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +DROP TRIGGER trg1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to master ------- + +######## CREATE USER user1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 23 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +CREATE USER user1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to master ------- + +######## RENAME USER user1@localhost TO rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 24 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +RENAME USER user1@localhost TO rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to master ------- + +######## DROP USER rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 25 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +DROP USER rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +use test; + +-------- switch to master ------- +DROP DATABASE mysqltest1; +DROP DATABASE mysqltest3; diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result new file mode 100644 index 00000000000..914e1497094 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -0,0 +1,199 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; +CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=innodb; +CREATE TABLE t3 (a INT UNIQUE) ENGINE=innodb; +CREATE TABLE t4 (a INT) ENGINE=innodb; +show variables like 'slave_transaction_retries'; +Variable_name Value +slave_transaction_retries 10 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show variables like 'slave_transaction_retries'; +Variable_name Value +slave_transaction_retries 2 +stop slave; +begin; +insert into t2 values (0); +insert into t1 values(1); +commit; +begin; +select * from t1 for update; +a +start slave; +select * from t2 for update /* dl */; +a +commit; +select * from t1; +a +1 +select * from t2 /* must be 1 */; +a +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +delete from t3; +change master to master_log_pos=548; +begin; +select * from t2 for update; +a +0 +start slave; +select count(*) from t3 /* must be zero */; +count(*) +0 +commit; +select * from t1; +a +1 +1 +select * from t2; +a +0 +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +set @my_max_relay_log_size= @@global.max_relay_log_size; +set global max_relay_log_size=0; +stop slave; +delete from t3; +change master to master_log_pos=548; +begin; +select * from t2 for update; +a +0 +0 +start slave; +select count(*) from t3 /* must be zero */; +count(*) +0 +commit; +select * from t1; +a +1 +1 +1 +select * from t2; +a +0 +0 +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop table t1,t2,t3,t4; +set global max_relay_log_size= @my_max_relay_log_size; +End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_delete_no_where.result b/mysql-test/suite/rpl/r/rpl_delete_no_where.result new file mode 100644 index 00000000000..78edf4bf3fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_delete_no_where.result @@ -0,0 +1,15 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int, b int) engine=myisam; +insert into t1 values(1,1); +select * from t1; +a b +1 1 +delete from t1; +select * from t1; +a b +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result new file mode 100644 index 00000000000..f7f1ce66656 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -0,0 +1,91 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +grant select on *.* to rpl_do_grant@localhost; +grant drop on test.* to rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' +GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' +set password for rpl_do_grant@localhost=password("does it work?"); +select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; +password<>_binary'' +1 +update mysql.user set password='' where user='rpl_do_grant'; +flush privileges; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +0 +set sql_mode='ANSI_QUOTES'; +set password for rpl_do_grant@localhost=password('does it work?'); +set sql_mode=''; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +1 +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +show grants for rpl_do_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' +show grants for rpl_do_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' +create user rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +revoke all privileges, grant option from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +drop user rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result new file mode 100644 index 00000000000..b83594c9bb1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop.result @@ -0,0 +1,10 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1, t2; +create table t1 (a int); +drop table t1, t2; +ERROR 42S02: Unknown table 't2' diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result new file mode 100644 index 00000000000..c0efdf5290d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -0,0 +1,38 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +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); +drop database mysqltest1; +ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) +use mysqltest1; +show tables; +Tables_in_mysqltest1 +drop database mysqltest1; +ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) +use mysqltest1; +show tables; +Tables_in_mysqltest1 +use test; +create table t1 (n int); +insert into t1 values (1234); +use mysqltest1; +show tables; +Tables_in_mysqltest1 +use test; +select * from t1; +n +1234 +stop slave; +drop database mysqltest1; +drop database mysqltest1; +use test; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result new file mode 100644 index 00000000000..40d578dd13e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result @@ -0,0 +1,13 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create database if not exists mysqltest; +create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; +create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result new file mode 100644 index 00000000000..257baa81b74 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result @@ -0,0 +1,22 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +reset master; +change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; +start slave; +create table t1 (n int); +create table t4 (n int); +create table t5 (n int); +create table t6 (n int); +show tables; +Tables_in_test +t1 +t4 +t5 +t6 +stop slave; +reset slave; +drop table t1,t4,t5,t6; diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result new file mode 100644 index 00000000000..d57600d7396 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result @@ -0,0 +1,12 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +load table t1 from master; +ERROR 08S01: Error connecting to master: Master is not configured +load table t1 from master; +ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist' diff --git a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result new file mode 100644 index 00000000000..f211d5d9a2f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result @@ -0,0 +1,42 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int primary key); +create table t4 (a int primary key); +insert into t1 values (1),(1); +Got one of the listed errors +insert into t4 values (1),(2); +show tables like 't1'; +Tables_in_test (t1) +show tables like 't4'; +Tables_in_test (t4) +t4 +SELECT * FROM test.t4 ORDER BY a; +a +1 +2 +drop table t1; +select get_lock('crash_lock%20C', 10); +get_lock('crash_lock%20C', 10) +1 +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); +update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); +select (@id := id) - id from t3; +(@id := id) - id +0 +kill @id; +drop table t2,t3; +insert into t4 values (3),(4); +SELECT * FROM test.t4 ORDER BY a; +a +1 +2 +3 +4 +DROP TABLE test.t4; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result new file mode 100644 index 00000000000..0d7e7bb28a7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -0,0 +1,165 @@ +set global event_scheduler=1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set binlog_format=row; +DROP EVENT IF EXISTS test.justonce; +drop table if exists t1,t2; +CREATE TABLE `t1` ( +`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +`c` VARCHAR(50) NOT NULL, +`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t1 (c) VALUES ('manually'); +CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 +(c) VALUES ('from justonce'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +test justonce ENABLED 1 +"in the master" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +"in the slave" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +DROP EVENT IF EXISTS test.slave_once; +CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO +INSERT INTO t1(c) VALUES ('from slave_once'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; +db name status originator +test slave_once ENABLED 2 +DROP EVENT IF EXISTS test.slave_once; +DROP EVENT IF EXISTS test.justonce; +CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO +INSERT INTO t1(c) VALUES ('from er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the master" +ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the master" +DROP EVENT test.er; +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +"in the slave" +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate ENABLED 2 +DROP EVENT test.slave_terminate; +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate SLAVESIDE_DISABLED 2 +DROP EVENT test.slave_terminate; +"in the master" +DROP TABLE t1; +set binlog_format=statement; +DROP EVENT IF EXISTS test.justonce; +drop table if exists t1,t2; +CREATE TABLE `t1` ( +`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +`c` VARCHAR(50) NOT NULL, +`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t1 (c) VALUES ('manually'); +CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 +(c) VALUES ('from justonce'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +test justonce ENABLED 1 +"in the master" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +"in the slave" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +DROP EVENT IF EXISTS test.slave_once; +CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO +INSERT INTO t1(c) VALUES ('from slave_once'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; +db name status originator +test slave_once ENABLED 2 +DROP EVENT IF EXISTS test.slave_once; +DROP EVENT IF EXISTS test.justonce; +CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO +INSERT INTO t1(c) VALUES ('from er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the master" +ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the master" +DROP EVENT test.er; +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +"in the slave" +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate ENABLED 2 +DROP EVENT test.slave_terminate; +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate SLAVESIDE_DISABLED 2 +DROP EVENT test.slave_terminate; +"in the master" +DROP TABLE t1; +CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR +DO BEGIN +select * from t1; +END;| +ALTER EVENT event1 RENAME TO event2; +DROP EVENT event2; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result new file mode 100644 index 00000000000..a237edc8063 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -0,0 +1,749 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='InnoDB'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='InnoDB'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='InnoDB'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='InnoDB'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='InnoDB'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1060 +Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5))ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +** DROP table t17 *** +DROP TABLE t17; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result new file mode 100644 index 00000000000..95f99ba1014 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -0,0 +1,749 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='MyISAM'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='MyISAM'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='MyISAM'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='MyISAM'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='MyISAM'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1060 +Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5))ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +** DROP table t17 *** +DROP TABLE t17; diff --git a/mysql-test/suite/rpl/r/rpl_failed_optimize.result b/mysql-test/suite/rpl/r/rpl_failed_optimize.result new file mode 100644 index 00000000000..7e397550331 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result @@ -0,0 +1,24 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 ( a int ) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES (1); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize error Lock wait timeout exceeded; try restarting transaction +test.t1 optimize status Operation failed +Warnings: +Error 1205 Lock wait timeout exceeded; try restarting transaction +OPTIMIZE TABLE non_existing; +Table Op Msg_type Msg_text +test.non_existing optimize Error Table 'test.non_existing' doesn't exist +test.non_existing optimize error Corrupt +select * from t1; +a +1 +commit; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result new file mode 100644 index 00000000000..1e90796b2ea --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -0,0 +1,54 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=MASTER_PORT; +start slave; +stop slave; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=SLAVE_PORT; +start slave; + +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; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port SLAVE_PORT +Connect_Retry 60 +Master_Log_File slave-bin.000001 +Read_Master_Log_Pos 216 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File slave-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 216 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result new file mode 100644 index 00000000000..2239c32eea3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -0,0 +1,42 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; +CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL); +INSERT INTO t2 VALUES (5,0); +INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); +SET FOREIGN_KEY_CHECKS=1; +SELECT * FROM t1 ORDER BY a; +a +10 +11 +12 +13 +SELECT * FROM t2 ORDER BY b; +b c +5 0 +6 11 +SELECT * FROM t1 ORDER BY a; +a +10 +11 +12 +13 +SELECT * FROM t2 ORDER BY b; +b c +5 0 +6 11 +SET TIMESTAMP=1000000000; +CREATE TABLE t3 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t3 VALUES (1),(1); +Got one of the listed errors +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS t1,t2,t3; +SET FOREIGN_KEY_CHECKS=1; diff --git a/mysql-test/suite/rpl/r/rpl_free_items.result b/mysql-test/suite/rpl/r/rpl_free_items.result new file mode 100644 index 00000000000..91c1e2aa6e5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_free_items.result @@ -0,0 +1,10 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int); +create table t2 (a int); +drop table t1; +drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result new file mode 100644 index 00000000000..235640acad0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_get_lock.result @@ -0,0 +1,35 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(n int); +insert into t1 values(get_lock("lock",2)); +select get_lock("lock",2); +get_lock("lock",2) +1 +select release_lock("lock"); +release_lock("lock") +1 +select get_lock("lock",3); +get_lock("lock",3) +1 +select * from t1; +n +1 +select is_free_lock("lock"), is_used_lock("lock") = connection_id(); +is_free_lock("lock") is_used_lock("lock") = connection_id() +0 1 +explain extended select is_free_lock("lock"), is_used_lock("lock"); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select is_free_lock(_latin1'lock') AS `is_free_lock("lock")`,is_used_lock(_latin1'lock') AS `is_used_lock("lock")` +select is_free_lock("lock2"); +is_free_lock("lock2") +1 +select is_free_lock(NULL); +is_free_lock(NULL) +NULL +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result new file mode 100644 index 00000000000..5169cc8e888 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -0,0 +1,37 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +grant select on *.* to rpl_ignore_grant@localhost; +grant drop on test.* to rpl_ignore_grant@localhost; +show grants for rpl_ignore_grant@localhost; +Grants for rpl_ignore_grant@localhost +GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' +GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' +show grants for rpl_ignore_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' +select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; +count(*) +0 +select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; +count(*) +0 +grant select on *.* to rpl_ignore_grant@localhost; +set password for rpl_ignore_grant@localhost=password("does it work?"); +select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; +password<>_binary'' +0 +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result new file mode 100644 index 00000000000..b1ccd2f0442 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start 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' /* master:must be N */; +select_priv +N +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 */; +select_priv +N +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; +select_priv +Y +revoke select on *.* from 'user_foo'; +select select_priv from mysql.user where user='user_foo' /* master:must be N */; +select_priv +N +select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; +select_priv +Y +revoke select on *.* FROM 'user_foo'; +delete from mysql.user where user="user_foo"; +delete from mysql.user where user="user_foo"; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result new file mode 100644 index 00000000000..e7200b31212 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -0,0 +1,140 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** Test case for BUG#16487 **** +**** Master **** +CREATE TABLE test.t4 (a int); +CREATE TABLE test.t1 (a int); +UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; +**** Slave **** +SELECT * FROM t4; +a +DROP TABLE t1; +DROP TABLE t4; +**** Test case for BUG#25482 **** +**** Adding GRANTS on master **** +create table test.t1(a int); +create table test.t4(a int); +GRANT SELECT ON test.t1 TO mysqltest1@localhost; +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 +to mysqltest2@localhost; +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 database mysqltest2; +create table mysqltest2.t2 (id int); +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +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; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +flush privileges; +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +**** Checking grants on slave **** +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +**** Revoking grants on 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; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +**** Checking grants on slave **** +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +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%"; +delete from mysql.columns_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +DROP TABLE IF EXISTS t5; +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; +HEX(word) +54455354E28099 +SELECT HEX(word) FROM t5; +HEX(word) +54455354E28099 +SELECT * FROM tmptbl504451f4258$1; +ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist +DROP TABLE t5; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result new file mode 100644 index 00000000000..a88a3c690ed --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result @@ -0,0 +1,23 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +use test; +drop table if exists mysqltest_foo; +drop table if exists mysqltest_bar; +create table mysqltest_foo (n int); +insert into mysqltest_foo values(4); +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); +select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; +n m k +4 15 55 +drop table mysqltest_foo,mysqltest_bar,t1; +drop table mysqltest_foo,mysqltest_bar,t1; diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result new file mode 100644 index 00000000000..1a0da45f3e1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -0,0 +1,106 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On Master **** +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT * FROM t1; +a +1 +2 +3 +REPLACE INTO t1 VALUES (4); +SELECT * FROM t1; +a +1 +2 +3 +4 +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1586 +Last_Error The incident LOST_EVENTS occured on the master. Message: <none> +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +SELECT * FROM t1; +a +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000002 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result new file mode 100644 index 00000000000..740c918976c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -0,0 +1,27 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +show variables like 'init_slave'; +Variable_name Value +init_slave set global max_connections=500 +show variables like 'max_connections'; +Variable_name Value +max_connections 500 +reset master; +show variables like 'init_slave'; +Variable_name Value +init_slave +show variables like 'max_connections'; +Variable_name Value +max_connections 151 +set @my_global_init_connect= @@global.init_connect; +set global init_connect="set @c=1"; +show variables like 'init_connect'; +Variable_name Value +init_connect set @c=1 +stop slave; +set global init_connect= @my_global_init_connect; +set global max_connections= default; diff --git a/mysql-test/suite/rpl/r/rpl_innodb.result b/mysql-test/suite/rpl/r/rpl_innodb.result new file mode 100644 index 00000000000..765de8af458 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_innodb.result @@ -0,0 +1,37 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +LOAD DATA +INFILE '../std_data_ln/loaddata_pair.dat' +REPLACE INTO TABLE t4 +(name,number); +SELECT * FROM t4; +id name number +1 XXX 12345 +2 XXY 12345 +SELECT * FROM t4; +id name number +1 XXX 12345 +2 XXY 12345 +LOAD DATA +INFILE '../std_data_ln/loaddata_pair.dat' +REPLACE INTO TABLE t4 +(name,number); +SELECT * FROM t4; +id name number +3 XXX 12345 +4 XXY 12345 +SELECT * FROM t4; +id name number +3 XXX 12345 +4 XXY 12345 diff --git a/mysql-test/suite/rpl/r/rpl_insert.result b/mysql-test/suite/rpl/r/rpl_insert.result new file mode 100644 index 00000000000..b6a97926f73 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert.result @@ -0,0 +1,23 @@ +# +# Bug#20821: INSERT DELAYED fails to write some rows to binlog +# +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +CREATE TABLE t1 (id INT, name VARCHAR(64)); +SELECT COUNT(*) FROM mysqlslap.t1; +COUNT(*) +5000 +SELECT COUNT(*) FROM mysqlslap.t1; +COUNT(*) +5000 +# +# Cleanup +# +USE test; +DROP SCHEMA mysqlslap; diff --git a/mysql-test/suite/rpl/r/rpl_insert_id.result b/mysql-test/suite/rpl/r/rpl_insert_id.result new file mode 100644 index 00000000000..b0c1b6cfd73 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_id.result @@ -0,0 +1,538 @@ +# +# Setup +# +use test; +drop table if exists t1, t2, t3; +# +# See if queries that use both auto_increment and LAST_INSERT_ID() +# are replicated well +# +# We also check how the foreign_key_check variable is replicated +# +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (1),(2),(3); +insert into t1 values (null); +insert into t2 values (null,last_insert_id()); +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +select * from t2 ORDER BY b; +b c +1 4 +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)) engine=innodb; +create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; +SET FOREIGN_KEY_CHECKS=0; +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 values (null,last_insert_id()); +SET FOREIGN_KEY_CHECKS=1; +select * from t1; +a +10 +11 +12 +13 +select * from t2; +b c +5 0 +6 11 +# +# check if INSERT SELECT in auto_increment is well replicated (bug #490) +# +drop table t2; +drop table t1; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 (c) select * from t1 ORDER BY a; +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +select * from t1 ORDER BY a; +a +10 +11 +12 +13 +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +drop table t1; +drop table t2; +# +# Bug#8412: Error codes reported in binary log for CHARACTER SET, +# FOREIGN_KEY_CHECKS +# +SET TIMESTAMP=1000000000; +CREATE TABLE t1 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (1),(1); +Got one of the listed errors +drop table t1; +# +# Bug#14553: NULL in WHERE resets LAST_INSERT_ID +# +create table t1(a int auto_increment, key(a)); +create table t2(a int); +insert into t1 (a) values (null); +insert into t2 (a) select a from t1 where a is null; +insert into t2 (a) select a from t1 where a is null; +select * from t2; +a +1 +select * from t2; +a +1 +drop table t1; +drop table t2; +# +# End of 4.1 tests +# +# +# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0 +# +# The solution is not to reset last_insert_id on enter to sub-statement. +# +drop function if exists bug15728; +drop function if exists bug15728_insert; +drop table if exists t1, t2; +create table t1 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +create function bug15728() returns int(11) +return last_insert_id(); +insert into t1 (last_id) values (0); +insert into t1 (last_id) values (last_insert_id()); +insert into t1 (last_id) values (bug15728()); +create table t2 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +create function bug15728_insert() returns int(11) modifies sql data +begin +insert into t2 (last_id) values (bug15728()); +return bug15728(); +end| +create trigger t1_bi before insert on t1 for each row +begin +declare res int; +select bug15728_insert() into res; +set NEW.last_id = res; +end| +insert into t1 (last_id) values (0); +drop trigger t1_bi; +select last_insert_id(); +last_insert_id() +4 +select bug15728_insert(); +bug15728_insert() +2 +select last_insert_id(); +last_insert_id() +4 +insert into t1 (last_id) values (bug15728()); +select last_insert_id(); +last_insert_id() +5 +drop procedure if exists foo; +create procedure foo() +begin +declare res int; +insert into t2 (last_id) values (bug15728()); +insert into t1 (last_id) values (bug15728()); +end| +call foo(); +select * from t1; +id last_id +1 0 +2 1 +3 2 +4 1 +5 4 +6 3 +select * from t2; +id last_id +1 3 +2 4 +3 5 +select * from t1; +id last_id +1 0 +2 1 +3 2 +4 1 +5 4 +6 3 +select * from t2; +id last_id +1 3 +2 4 +3 5 +drop function bug15728; +drop function bug15728_insert; +drop table t1,t2; +drop procedure foo; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +set sql_log_bin=0; +insert into t1 values(null,100); +replace into t1 values(null,50),(null,100),(null,150); +select * from t1 order by n; +n b +2 50 +3 100 +4 150 +truncate table t1; +set sql_log_bin=1; +insert into t1 values(null,100); +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,200),(null,300); +delete from t1 where b <> 100; +select * from t1 order by n; +n b +1 100 +replace into t1 values(null,100),(null,350); +select * from t1 order by n; +n b +2 100 +3 350 +select * from t1 order by n; +n b +2 100 +3 350 +insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000; +select * from t1 order by n; +n b +2 100 +4 400 +1000 350 +1001 600 +select * from t1 order by n; +n b +2 100 +4 400 +1000 350 +1001 600 +drop table t1; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +insert into t1 values(null,100); +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,200),(null,300); +delete from t1 where b <> 100; +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,100),(null,350) on duplicate key update n=2; +select * from t1 order by n; +n b +2 100 +3 350 +select * from t1 order by n; +n b +2 100 +3 350 +drop table t1; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, +UNIQUE(b)); +INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; +SELECT * FROM t1; +a b +1 10 +2 2 +SELECT * FROM t1; +a b +1 10 +2 2 +drop table t1; +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'); +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; +INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); +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; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +SELECT * FROM t1; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +drop table t1, t2; +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1, t2; +SELECT LAST_INSERT_ID(0); +LAST_INSERT_ID(0) +0 +CREATE TABLE t1 ( +id INT NOT NULL DEFAULT 0, +last_id INT, +PRIMARY KEY (id) +); +CREATE TABLE t2 ( +id INT NOT NULL AUTO_INCREMENT, +last_id INT, +PRIMARY KEY (id) +); +CREATE PROCEDURE p1() +BEGIN +INSERT INTO t2 (last_id) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (last_id) VALUES (LAST_INSERT_ID()); +END| +CALL p1(); +SELECT * FROM t1; +id last_id +0 1 +SELECT * FROM t2; +id last_id +1 0 +SELECT * FROM t1; +id last_id +0 1 +SELECT * FROM t2; +id last_id +1 0 +DROP PROCEDURE p1; +DROP TABLE t1, t2; +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP FUNCTION IF EXISTS f3; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( +i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +j INT DEFAULT 0 +); +CREATE TABLE t2 (i INT); +CREATE PROCEDURE p1() +BEGIN +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (i) VALUES (NULL), (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +END | +CREATE FUNCTION f1() RETURNS INT MODIFIES SQL DATA +BEGIN +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (i) VALUES (NULL), (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +RETURN 0; +END | +CREATE FUNCTION f2() RETURNS INT NOT DETERMINISTIC +RETURN LAST_INSERT_ID() | +CREATE FUNCTION f3() RETURNS INT MODIFIES SQL DATA +BEGIN +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +RETURN 0; +END | +INSERT INTO t1 VALUES (NULL, -1); +CALL p1(); +SELECT f1(); +f1() +0 +INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()), +(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2()); +INSERT INTO t1 VALUES (NULL, f2()); +INSERT INTO t1 VALUES (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID(5)), +(NULL, @@LAST_INSERT_ID); +INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID()); +UPDATE t1 SET j= -1 WHERE i IS NULL; +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t1 (i) VALUES (NULL); +SELECT f3(); +f3() +0 +SELECT * FROM t1; +i j +1 -1 +2 0 +3 0 +4 0 +5 0 +6 0 +7 0 +8 3 +9 3 +10 3 +11 3 +12 3 +13 8 +14 13 +15 5 +16 13 +17 -1 +18 14 +19 0 +20 0 +SELECT * FROM t2; +i +2 +3 +5 +6 +19 +SELECT * FROM t1; +i j +1 -1 +2 0 +3 0 +4 0 +5 0 +6 0 +7 0 +8 3 +9 3 +10 3 +11 3 +12 3 +13 8 +14 13 +15 5 +16 13 +17 -1 +18 14 +19 0 +20 0 +SELECT * FROM t2; +i +2 +3 +5 +6 +19 +DROP PROCEDURE p1; +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP FUNCTION f3; +DROP TABLE t1, t2; +# +# End of 5.0 tests +# +create table t2 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +truncate table t2; +create table t1 (id tinyint primary key); +create function insid() returns int +begin +insert into t2 (last_id) values (0); +return 0; +end| +set sql_log_bin=0; +insert into t2 (id) values(1),(2),(3); +delete from t2; +set sql_log_bin=1; +select insid(); +insid() +0 +set sql_log_bin=0; +insert into t2 (id) values(5),(6),(7); +delete from t2 where id>=5; +set sql_log_bin=1; +insert into t1 select insid(); +select * from t1; +id +0 +select * from t2; +id last_id +4 0 +8 0 +select * from t1; +id +0 +select * from t2; +id last_id +4 0 +8 0 +drop table t1; +drop function insid; +truncate table t2; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +create procedure foo() +begin +insert into t1 values(null,10); +insert ignore into t1 values(null,10); +insert ignore into t1 values(null,10); +insert into t2 values(null,3); +end| +call foo(); +select * from t1; +n b +1 10 +select * from t2; +id last_id +1 3 +select * from t1; +n b +1 10 +select * from t2; +id last_id +1 3 +drop table t1, t2; +drop procedure foo; diff --git a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result new file mode 100644 index 00000000000..79815355332 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result @@ -0,0 +1,76 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(a int auto_increment, primary key(a)); +create table t2(b int auto_increment, c int, primary key(b)); +insert into t1 values (1),(2),(3); +insert into t1 values (null); +insert into t2 values (null,last_insert_id()); +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +select * from t2 ORDER BY b; +b c +1 4 +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)) engine=innodb; +create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; +SET FOREIGN_KEY_CHECKS=0; +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 values (null,last_insert_id()); +SET FOREIGN_KEY_CHECKS=1; +select * from t1; +a +10 +11 +12 +13 +select * from t2; +b c +5 0 +6 11 +drop table t2; +drop table t1; +create table t1(a int auto_increment, primary key(a)); +create table t2(b int auto_increment, c int, primary key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 (c) select * from t1 ORDER BY a; +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +select * from t1 ORDER BY a; +a +10 +11 +12 +13 +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +drop table t1; +drop table t2; +SET TIMESTAMP=1000000000; +CREATE TABLE t1 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (1),(1); +Got one of the listed errors +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result new file mode 100644 index 00000000000..da24c86627c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -0,0 +1,70 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=innodb; +CREATE TABLE t2 ( +a int unsigned, # to force INSERT SELECT to have a certain order +b int unsigned +) ENGINE=innodb; +INSERT INTO t1 VALUES (NULL, 1); +INSERT INTO t1 VALUES (NULL, 2); +INSERT INTO t1 VALUES (NULL, 3); +INSERT INTO t1 VALUES (NULL, 4); +INSERT INTO t2 VALUES (1, 1); +INSERT INTO t2 VALUES (2, 2); +INSERT INTO t2 VALUES (3, 5); +INSERT INTO t2 VALUES (4, 3); +INSERT INTO t2 VALUES (5, 4); +INSERT INTO t2 VALUES (6, 6); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=myisam; +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (2, 2); +INSERT INTO t1 VALUES (3, 3); +INSERT INTO t1 VALUES (4, 4); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_insert_select.result b/mysql-test/suite/rpl/r/rpl_insert_select.result new file mode 100644 index 00000000000..1aff39e0026 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_select.result @@ -0,0 +1,17 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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); +select * from t1; +n +1 +2 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result new file mode 100644 index 00000000000..318bc3d63e7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -0,0 +1,135 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, +UNIQUE(b)); +INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; +SELECT * FROM t1; +a b +1 10 +2 2 +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10' +Skip_Counter 0 +Exec_Master_Log_Pos 246 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1; +a b +stop slave; +reset slave; +reset master; +drop table t1; +start slave; +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'); +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; +INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); +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; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: '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' +Skip_Counter 0 +Exec_Master_Log_Pos 1278 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1; +id field_1 field_2 field_3 +drop table t1, t2; +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_load_from_master.result b/mysql-test/suite/rpl/r/rpl_load_from_master.result new file mode 100644 index 00000000000..08b45ec1db0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_load_from_master.result @@ -0,0 +1,139 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2; +create database mysqltest; +create database mysqltest2; +create table mysqltest2.foo (n int)ENGINE=MyISAM; +insert into mysqltest2.foo values(4); +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); +select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; +n m +4 15 +drop database mysqltest; +drop database if exists mysqltest2; +drop database mysqltest; +ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist +drop database mysqltest2; +set sql_log_bin = 0; +create database mysqltest2; +create database mysqltest; +show databases; +Database +information_schema +mysql +mysqltest +mysqltest2 +test +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; +show databases; +Database +information_schema +mysql +test +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 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; +show databases; +Database +information_schema +mysql +mysqltest +mysqltest2 +mysqltest3 +test +use mysqltest2; +show tables; +Tables_in_mysqltest2 +t1 +t3 +select * from t1; +n s +1 original foo.t1 +use mysqltest3; +show tables; +Tables_in_mysqltest3 +t1 +select * from t1; +n s +1 original foo2.t1 +use mysqltest; +show tables; +Tables_in_mysqltest +t1 +t2 +t3 +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +select * from mysqltest.t2; +n s +11 eleven test +12 twelve test +13 thirteen test +select * from mysqltest.t3; +n s +1 original bar.t3 +insert into mysqltest.t1 values (4, 'four test'); +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +4 four test +stop slave; +reset slave; +load data from master; +start slave; +insert into mysqltest.t1 values (5, 'five bar'); +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +4 four test +5 five bar +load table mysqltest.t1 from master; +ERROR 42S01: Table 't1' already exists +drop table mysqltest.t1; +load table mysqltest.t1 from master; +load table bar.t1 from master; +ERROR HY000: Error from master: 'Table 'bar.t1' doesn't exist' +drop database mysqltest; +drop database mysqltest2; +drop database mysqltest2; +drop database mysqltest3; diff --git a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result new file mode 100644 index 00000000000..c24f857d829 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result @@ -0,0 +1,51 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +"******************** Test Requirment 1 *************" +SET SQL_LOG_BIN=0,timestamp=200006; +CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; +INSERT INTO t1 ( a) VALUE ('F'); +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +load table t1 from master; +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +set SQL_LOG_BIN=1,timestamp=default; +drop table t1; +set SQL_LOG_BIN=0; +"******************** Test Requirment 2 *************" +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; +INSERT INTO t1 VALUES (1); +load table t1 from master; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +drop table t1; +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; +load table t1 from master; +load table t2 from master; +load table t3 from master; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select count(*) from t2; +count(*) +70 +select count(*) from t3; +count(*) +0 +set SQL_LOG_BIN=1; +drop table if exists t1,t2,t3; +create table t1(n int); +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result new file mode 100644 index 00000000000..680796a4be6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -0,0 +1,92 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +reset master; +select last_insert_id(); +last_insert_id() +0 +create table t1(a int not null auto_increment, b int, primary key(a) ); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +select last_insert_id(); +last_insert_id() +1 +create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; +create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); +insert into t3 select * from t2; +select * from t1; +a b +1 10 +2 15 +select * from t3; +day id category name +2003-02-22 2461 b a a a @ % ' " a +2003-03-22 2161 c asdf +2003-03-22 2416 a bbbbb +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +slave-bin.000001 1280 +drop table t1; +drop table t2; +drop table t3; +create table t1(a int, b int, unique(b)); +insert into t1 values(1,10); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +set global sql_slave_skip_counter=1; +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +stop slave; +change master to master_user='test'; +change master to master_user='root'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No +set global sql_slave_skip_counter=1; +start slave; +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +stop slave; +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +reset master; +create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), +unique(day)) engine=MyISAM; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +select * from t2; +day id category name +2003-02-22 2461 b a a a @ % ' " a +2003-03-22 2161 c asdf +start slave; +select * from t2; +day id category name +2003-02-22 2461 b a a a @ % ' " a +2003-03-22 2161 c asdf +alter table t2 drop key day; +delete from t2; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +drop table t2; +drop table t2; +drop table t1; +CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; +LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; +ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result new file mode 100644 index 00000000000..929d06e74cf --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result @@ -0,0 +1,37 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +hex(a) +C3BF +D0AA +C3BF +C3BF +C3BF +D0AA +D0AA +select hex(a) from t1; +hex(a) +C3BF +D0AA +C3BF +C3BF +C3BF +D0AA +D0AA +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result new file mode 100644 index 00000000000..9dbae6d38c4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -0,0 +1,38 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +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; +COUNT(*) +2 +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; +COUNT(*) +2 +SHOW DATABASES; +Database +information_schema +mysql +mysqltest +test +USE test; +SHOW TABLES; +Tables_in_test +USE mysqltest; +SHOW TABLES; +Tables_in_mysqltest +t1 +SELECT COUNT(*) FROM mysqltest.t1; +COUNT(*) +2 +DROP DATABASE mysqltest; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result new file mode 100644 index 00000000000..4fc33eee20d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result @@ -0,0 +1,15 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +reset master; +create table test.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; +count(*) +2 +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +drop table test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result new file mode 100644 index 00000000000..196093211b6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result @@ -0,0 +1,153 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +word +Aarhus +Aarhus +Aaron +Aaron +Ababa +Ababa +aback +aback +abaft +abaft +abandon +abandon +abandoned +abandoned +abandoning +abandoning +abandonment +abandonment +abandons +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +SELECT * FROM t1 ORDER BY word; +word +Aarhus +Aarhus +Aaron +Aaron +Ababa +Ababa +aback +aback +abaft +abaft +abandon +abandon +abandoned +abandoned +abandoning +abandoning +abandonment +abandonment +abandons +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result new file mode 100644 index 00000000000..bb1b0610aa8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result @@ -0,0 +1,31 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(a int); +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +truncate table t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +select a,count(*) from t1 group by a; +a count(*) +1 10000 +drop table t1; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result new file mode 100644 index 00000000000..7487693a9f7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -0,0 +1,227 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +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; +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| +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY blob_column; +a blob_column +1 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +2 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +SELECT * FROM test.t1 ORDER BY blob_column; +a blob_column +1 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +2 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_locale.result b/mysql-test/suite/rpl/r/rpl_locale.result new file mode 100644 index 00000000000..b7396084663 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_locale.result @@ -0,0 +1,20 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +s1 +Montag +Monday +select * from t1; +s1 +Montag +Monday +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result new file mode 100644 index 00000000000..7543814578a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -0,0 +1,99 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 <Binlog_Ignore_DB> +stop slave; +change master to master_log_pos=75; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 75 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 75 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 75 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 75 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 <Binlog_Ignore_DB> +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); +change master to master_log_pos=106; +start slave; +select * from t1 ORDER BY n; +n +1 +2 +3 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_many_optimize.result b/mysql-test/suite/rpl/r/rpl_many_optimize.result new file mode 100644 index 00000000000..b2148892591 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_many_optimize.result @@ -0,0 +1,9 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result new file mode 100644 index 00000000000..951e944fddc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -0,0 +1,18 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +select master_pos_wait('master-bin.999999',0,2); +master_pos_wait('master-bin.999999',0,2) +-1 +explain extended select master_pos_wait('master-bin.999999',0,2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)` +select master_pos_wait('master-bin.999999',0); +stop slave sql_thread; +master_pos_wait('master-bin.999999',0) +NULL diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result new file mode 100644 index 00000000000..526414cec9c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -0,0 +1,46 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(id int, i int, r1 int, r2 int, p varchar(100)); +insert into t1 values(1, connection_id(), 0, 0, ""); +insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); +set sql_log_bin=0; +insert into t1 values(6, 0, rand(), rand(), ""); +delete from t1 where id=6; +set sql_log_bin=1; +insert into t1 values(3, 0, 0, 0, password('does_this_work?')); +insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); +select * into outfile 'rpl_misc_functions.outfile' from t1; +create table t2 like t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; +select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); +id i r1 r2 p id i r1 r2 p +drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (col_a double default NULL); +CREATE PROCEDURE test_replication_sp1() +BEGIN +INSERT INTO t1 VALUES (rand()), (rand()); +INSERT INTO t1 VALUES (rand()); +END| +CREATE PROCEDURE test_replication_sp2() +BEGIN +CALL test_replication_sp1(); +CALL test_replication_sp1(); +END| +CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC +BEGIN +RETURN (rand() + rand()); +END| +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()); +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; diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result new file mode 100644 index 00000000000..38972a4f571 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -0,0 +1,46 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int auto_increment primary key); +set insert_id = 2000; +insert into t1 values (NULL),(NULL),(NULL); +select * from t1; +n +2000 +2001 +2002 +show slave hosts; +Server_id Host Port Rpl_recovery_rank Master_id +2 127.0.0.1 9999 2 1 +drop table t1; +stop slave; +create table t2(id int auto_increment primary key, created datetime); +set timestamp=12345; +insert into t2 set created=now(); +select * from t2; +id created +1 1970-01-01 06:25:45 +create table t3 like t2; +create temporary table t4 like t2; +create table t5 select * from t4; +start slave; +select * from t2; +id created +1 1970-01-01 06:25:45 +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `id` int(11) NOT NULL DEFAULT '0', + `created` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2,t3,t5; diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete.result b/mysql-test/suite/rpl/r/rpl_multi_delete.result new file mode 100644 index 00000000000..4831502eb88 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_delete.result @@ -0,0 +1,22 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +select * from t1; +a +select * from t2; +a +1 +select * from t1; +a +select * from t2; +a +1 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete2.result b/mysql-test/suite/rpl/r/rpl_multi_delete2.result new file mode 100644 index 00000000000..87abe60b268 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_delete2.result @@ -0,0 +1,44 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set sql_log_bin=0; +create database mysqltest_from; +set sql_log_bin=1; +create database mysqltest_to; +use mysqltest_from; +drop table if exists a; +CREATE TABLE a (i INT); +INSERT INTO a VALUES(1); +DELETE alias FROM a alias WHERE alias.i=1; +SELECT * FROM a; +i +insert into a values(2),(3); +delete a alias FROM a alias where alias.i=2; +select * from a; +i +3 +use mysqltest_to; +select * from a; +i +3 +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; +select * from t1; +a +select * from t2; +a +1 +select * from t1; +ERROR 42S02: Table 'mysqltest_to.t1' doesn't exist +select * from t2; +ERROR 42S02: Table 'mysqltest_to.t2' doesn't exist +set sql_log_bin=0; +drop database mysqltest_from; +set sql_log_bin=1; +drop database mysqltest_to; diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result new file mode 100644 index 00000000000..7cb7d873415 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result @@ -0,0 +1,366 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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)); +use mysqltest1; +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +DROP TABLE t1; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update.result b/mysql-test/suite/rpl/r/rpl_multi_update.result new file mode 100644 index 00000000000..524278be042 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update.result @@ -0,0 +1,27 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update2.result b/mysql-test/suite/rpl/r/rpl_multi_update2.result new file mode 100644 index 00000000000..5bb262764fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update2.result @@ -0,0 +1,55 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1,t2; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +drop table t1,t2; +reset master; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (0); +UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; +select * from t1; +a +3 +select * from t1; +a +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result new file mode 100644 index 00000000000..dba7f770ba2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result @@ -0,0 +1,197 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +-------- Test for BUG#9361 -------- +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +drop table t1,t2; + +-------- Test 1 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 ( +a1 char(30), +a2 int, +a3 int, +a4 char(30), +a5 char(30) +); +CREATE TABLE t2 ( +b1 int, +b2 char(30) +); +INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); +INSERT INTO t2 VALUES (1, 'baz'); +UPDATE t1 a, t2 +SET a.a1 = 'No' +WHERE a.a2 = +(SELECT b1 +FROM t2 +WHERE b2 = 'baz') +AND a.a3 IS NULL +AND a.a4 = 'foo' +AND a.a5 = 'bar'; +SELECT * FROM t1; +a1 a2 a3 a4 a5 +No 1 NULL foo bar +SELECT * FROM t2; +b1 b2 +1 baz +DROP TABLE t1, t2; + +-------- Test 2 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +CREATE TABLE t1 ( +i INT, +j INT, +x INT, +y INT, +z INT +); +CREATE TABLE t2 ( +i INT, +k INT, +x INT, +y INT, +z INT +); +CREATE TABLE t3 ( +j INT, +k INT, +x INT, +y INT, +z INT +); +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; +i j x y z +1 2 23 24 71 +DROP TABLE t1, t2, t3; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +DROP TABLE IF EXISTS t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE t1 ( +idp int(11) NOT NULL default '0', +idpro int(11) default NULL, +price decimal(19,4) default NULL, +PRIMARY KEY (idp) +); +CREATE TABLE t2 ( +idpro int(11) NOT NULL default '0', +price decimal(19,4) default NULL, +nbprice int(11) default NULL, +PRIMARY KEY (idpro) +); +INSERT INTO t1 VALUES +(1,1,'3.0000'), +(2,2,'1.0000'), +(3,1,'1.0000'), +(4,1,'4.0000'), +(5,3,'2.0000'), +(6,2,'4.0000'); +INSERT INTO t2 VALUES +(1,'0.0000',0), +(2,'0.0000',0), +(3,'0.0000',0); +update +t2 +join +( select idpro, min(price) as min_price, count(*) as nbr_price +from t1 +where idpro>0 and price>0 +group by idpro +) as table_price +on t2.idpro = table_price.idpro +set t2.price = table_price.min_price, +t2.nbprice = table_price.nbr_price; +select "-- MASTER AFTER JOIN --" as ""; + +-- MASTER AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +select "-- SLAVE AFTER JOIN --" as ""; + +-- SLAVE AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update4.result b/mysql-test/suite/rpl/r/rpl_multi_update4.result new file mode 100644 index 00000000000..f6dde65a35d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update4.result @@ -0,0 +1,25 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists d1; +drop database if exists d2; +drop database if exists d2; +create database d1; +create table d1.t0 (id int); +create database d2; +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; +update t1 join t2 using (id) set t1.id = 0; +insert into d1.t0 values (0); +use d1; +select * from t0 where id=0; +id +0 +drop database d1; +drop database d2; diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result new file mode 100644 index 00000000000..79891169fbc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -0,0 +1,27 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +update t1 set b=(a/2*rand()); +delete from t1 order by b limit 10000; +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result new file mode 100644 index 00000000000..981c234d380 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -0,0 +1,32 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +select @@net_buffer_length, @@max_allowed_packet; +@@net_buffer_length @@max_allowed_packet +1024 1024 +create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); +select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */; +count(*) +1 +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; +VARIABLE_NAME VARIABLE_VALUE +SLAVE_RUNNING ON +drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +SET @@global.max_allowed_packet=4096; +SET @@global.net_buffer_length=4096; +STOP SLAVE; +START SLAVE; +CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running OFF diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result new file mode 100644 index 00000000000..73c36af4862 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ps.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1; +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; +n +from-master-1 +from-master-2-'', +set @var2= 'insert into t1 values (concat("from-var-", ?))'; +prepare stmt2 from @var2; +set @var1='from-master-3'; +execute stmt2 using @var1; +SELECT * FROM t1 ORDER BY n; +n +from-master-1 +from-master-2-'', +from-var-from-master-3 +drop table t1; +stop slave; +reset master; +reset slave; diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result new file mode 100644 index 00000000000..47adb70bcf5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -0,0 +1,67 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SET BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; +@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT +MIXED MIXED +**** 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()); +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +**** On Slave **** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 454 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 454 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 +slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) +slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result new file mode 100644 index 00000000000..6b1404b4f68 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_read_only.result @@ -0,0 +1,116 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create user test; +create table t1(a int) engine=InnoDB; +create table t2(a int) engine=MyISAM; +insert into t1 values(1001); +insert into t2 values(2001); +set global read_only=1; +select @@read_only; +@@read_only +1 +select * from t1; +a +1001 +select * from t2; +a +2001 +select @@read_only; +@@read_only +0 +select * from t1; +a +1001 +select * from t2; +a +2001 +set global read_only=0; +BEGIN; +insert into t1 values(1002); +insert into t2 values(2002); +BEGIN; +insert into t1 values(1003); +insert into t2 values(2003); +set global read_only=1; +COMMIT; +COMMIT; +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +set global read_only=0; +insert into t1 values(1004); +insert into t2 values(2004); +select * from t1; +a +1001 +1002 +1004 +select * from t2; +a +2001 +2002 +2003 +2004 +select * from t1; +a +1001 +1002 +1004 +select * from t2; +a +2001 +2002 +2003 +2004 +set global read_only=1; +select @@read_only; +@@read_only +1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values(1005); +insert into t2 values(2005); +select * from t1; +a +1001 +1002 +1004 +1005 +select * from t2; +a +2001 +2002 +2003 +2004 +2005 +select * from t1; +a +1001 +1002 +1004 +1005 +select * from t2; +a +2001 +2002 +2003 +2004 +2005 +insert into t1 values(1006); +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +insert into t2 values(2006); +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +drop user test; +drop table t1; +drop table t2; +set global read_only=0; diff --git a/mysql-test/suite/rpl/r/rpl_redirect.result b/mysql-test/suite/rpl/r/rpl_redirect.result new file mode 100644 index 00000000000..64866df1c15 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_redirect.result @@ -0,0 +1,41 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +SHOW SLAVE HOSTS; +Server_id Host Port Rpl_recovery_rank Master_id +2 127.0.0.1 SLAVE_PORT 2 1 +create table t1 ( n int); +insert into t1 values (1),(2),(3),(4); +insert into t1 values(5); +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +5 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +5 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result new file mode 100644 index 00000000000..54aac2eca35 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result @@ -0,0 +1,25 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB; +INSERT INTO t1 SET name='Andy', age=31; +INSERT INTO t1 SET name='Jacob', age=2; +INSERT INTO t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result new file mode 100644 index 00000000000..e8d2d63e46e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result @@ -0,0 +1,25 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; +INSERT INTO t1 SET name='Andy', age=31; +INSERT INTO t1 SET name='Jacob', age=2; +INSERT INTO t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_relayrotate.result b/mysql-test/suite/rpl/r/rpl_relayrotate.result new file mode 100644 index 00000000000..20f19973d83 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relayrotate.result @@ -0,0 +1,16 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +create table t1 (a int) engine=innodb; +reset slave; +start slave; +stop slave; +start slave; +select max(a) from t1; +max(a) +8000 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_relayspace.result b/mysql-test/suite/rpl/r/rpl_relayspace.result new file mode 100644 index 00000000000..1f2a739d3e3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result @@ -0,0 +1,19 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +create table t1 (a int); +drop table t1; +create table t1 (a int); +drop table t1; +reset slave; +start slave io_thread; +stop slave io_thread; +reset slave; +start slave; +select master_pos_wait('master-bin.001',200,6)=-1; +master_pos_wait('master-bin.001',200,6)=-1 +0 diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result new file mode 100644 index 00000000000..fa4f7e224d1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -0,0 +1,77 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t11; +drop table if exists t11; +create table t2 (n int); +insert into t2 values(4); +create table t2 (s char(20)); +load data infile '../std_data_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; +select * from t1 ORDER BY m; +m +15 +20 +select * from t2; +n +4 +select * from t11; +ERROR 42S02: Table 'test.t11' doesn't exist +drop table if exists t1,t2,t11; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No +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; +ts +2005-08-12 00:00:00 +set one_shot time_zone='met'; +select * from t1; +ts +2005-08-12 00:00:00 +drop table t1; +*** 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; +Tables_in_test +t1 +t2 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost +trg2 INSERT t2 set new.b=2 BEFORE NULL root@localhost +*** slave *** +show tables; +Tables_in_test +t1 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost +*** master *** +drop trigger trg1; +drop trigger trg2; +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +*** slave *** +show tables; +Tables_in_test +t1 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +*** master *** +drop table t1; +drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result new file mode 100644 index 00000000000..0135804c02d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result @@ -0,0 +1,23 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +drop database if exists mysqltest2; +create database mysqltest1; +create database mysqltest2; +use mysqltest1; +create table t1 (a int); +insert into t1 values(1); +select * from mysqltest1.t1; +ERROR 42S02: Table 'mysqltest1.t1' doesn't exist +use mysqltest2; +create table t1 (a int); +insert into t1 values(1); +select * from mysqltest2.t1; +a +1 +drop database mysqltest1; +drop database mysqltest2; diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result new file mode 100644 index 00000000000..1b843bffdca --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -0,0 +1,94 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +create table t1 (a int); +insert into t1 values(9); +select * from mysqltest1.t1; +a +9 +show databases like 'mysqltest1'; +Database (mysqltest1) +mysqltest1 +select * from test.t1; +a +9 +drop table t1; +drop database mysqltest1; +drop database if exists rewrite; +create database rewrite; +use test; +create table t1 (a date, b date, c date not null, d date); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +select * from rewrite.t1; +a b c d +0000-00-00 NULL 0000-00-00 0000-00-00 +0000-00-00 0000-00-00 0000-00-00 0000-00-00 +2003-03-03 2003-03-03 2003-03-03 NULL +2003-03-03 2003-03-03 2003-03-03 NULL +truncate table t1; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 +select * from rewrite.t1; +a b c d +NULL NULL 0000-00-00 0000-00-00 +NULL 0000-00-00 0000-00-00 0000-00-00 +NULL 2003-03-03 2003-03-03 NULL +drop table t1; +create table t1 (a text, b text); +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; +Warnings: +Warning 1261 Row 3 doesn't contain data for all columns +select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; +concat('|',a,'|') concat('|',b,'|') +|Field A| |Field B| +|Field 1| |Field 2' +Field 3,'Field 4| +|Field 5' ,'Field 6| NULL +|Field 6| | 'Field 7'| +drop table t1; +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; +Warnings: +Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 +Warning 1262 Row 3 was truncated; it contained more data than there were input columns +Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5 +Warning 1262 Row 5 was truncated; it contained more data than there were input columns +select * from rewrite.t1; +a b +1 row 1 +2 row 2 +0 1234567890 +3 row 3 +0 1234567890 +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; +Warnings: +Warning 1366 Incorrect integer value: ' +' for column 'a' at row 4 +Warning 1261 Row 4 doesn't contain data for all columns +select * from rewrite.t1; +a b +1 row 1 +2 row 2 +3 row 3 +0 +drop database rewrite; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result new file mode 100644 index 00000000000..f82a1a69060 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -0,0 +1,97 @@ +drop table if exists t1, t2, t3, t4; +drop table if exists t1, t2, t3, t4; +start slave; +Got one of the listed errors +start slave; +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log +reset slave; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; +reset master; +start slave; +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'); +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # No +select * from t1; +s +Could not break slave +Tried hard +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; +Log_name File_size +master-bin.000001 600 +master-bin.000002 371 +master-bin.000003 106 +create table t3 select * from temp_table; +select * from t3; +a +testing temporary tables +drop table temp_table, t3; +insert into t2 values(1234); +set insert_id=1234; +insert into t2 values(NULL); +set global sql_slave_skip_counter=1; +start slave; +purge master logs to 'master-bin.000002'; +show master logs; +Log_name File_size +master-bin.000002 371 +master-bin.000003 415 +purge binary logs to 'master-bin.000002'; +show binary logs; +Log_name File_size +master-bin.000002 371 +master-bin.000003 415 +select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) +from information_schema.tables +where TABLE_SCHEMA="test" and TABLE_NAME="t2"; +purge master logs before (@time_for_purge); +show binary logs; +Log_name File_size +master-bin.000003 415 +insert into t2 values (65); +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # No +select * from t2; +m +34 +65 +67 +123 +1234 +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables part 2"); +create table t3 (n int); +select count(*) from t3 where n >= 4; +count(*) +100 +create table t4 select * from temp_table; +show binary logs; +Log_name File_size +master-bin.000003 4193 +master-bin.000004 4198 +master-bin.000005 2040 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000005 2040 +select * from t4; +a +testing temporary tables part 2 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # No +lock tables t3 read; +select count(*) from t3 where n >= 4; +count(*) +100 +unlock tables; +drop table if exists t1,t2,t3,t4; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result new file mode 100644 index 00000000000..fad60af664f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -0,0 +1,55 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (word CHAR(20) NOT NULL); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY word LIMIT 10; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aaron +Aaron +Aaron +Aaron +Ababa +Ababa +STOP SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); +START SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD(''); +CREATE TABLE t3(n INT); +INSERT INTO t3 VALUES(1),(2); +SELECT * FROM t3 ORDER BY n; +n +1 +2 +SELECT SUM(LENGTH(word)) FROM t1; +SUM(LENGTH(word)) +1022 +DROP TABLE t1,t3; +CREATE TABLE t1 (n INT) ENGINE=MYISAM; +RESET MASTER; +STOP SLAVE; +RESET SLAVE; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +LOCK TABLES t1 READ; +START SLAVE; +UNLOCK TABLES; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +DROP TABLE t1; +CREATE TABLE t1 (n INT); +INSERT INTO t1 VALUES(3456); +SELECT n FROM t1; +n +3456 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result new file mode 100644 index 00000000000..e2431364ed3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result @@ -0,0 +1,27 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +create database mysqltest1; +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"); +use mysqltest1; +select * from t1 order by a; +a +ANN +GUI +select * from t2 order by a; +a +ABE +ANG +LIL +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_row_NOW.result b/mysql-test/suite/rpl/r/rpl_row_NOW.result new file mode 100644 index 00000000000..23f95878608 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_NOW.result @@ -0,0 +1,29 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create database if not exists mysqltest1; +DROP TABLE IF EXISTS mysqltest1.t1; +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)); +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| +INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); +CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 +FOR EACH ROW BEGIN +SET new.b = mysqltest1.f1(); +END| +INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); +DROP TABLE IF EXISTS mysqltest1.t1; +DROP FUNCTION mysqltest1.f1; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_row_USER.result b/mysql-test/suite/rpl/r/rpl_row_USER.result new file mode 100644 index 00000000000..98755fb4653 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_USER.result @@ -0,0 +1,38 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP DATABASE IF EXISTS mysqltest1; +CREATE DATABASE mysqltest1; +CREATE USER tester IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO ''@'localhost%'; +FLUSH PRIVILEGES; +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()); +create procedure mysqltest1.p1() +begin +INSERT INTO mysqltest1.t1 VALUES(3,USER()); +INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); +end| +CALL mysqltest1.p1(); +SELECT * FROM mysqltest1.t1 ORDER BY a; +a users +1 tester@localhost +2 @localhost% +3 tester@localhost +4 @localhost% +SELECT * FROM mysqltest1.t1 ORDER BY a; +a users +1 tester@localhost +2 @localhost% +3 tester@localhost +4 @localhost% +DROP DATABASE mysqltest1; +REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; +REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; +DROP USER tester@'%'; +DROP USER ''@'localhost%'; diff --git a/mysql-test/suite/rpl/r/rpl_row_UUID.result b/mysql-test/suite/rpl/r/rpl_row_UUID.result new file mode 100644 index 00000000000..f56dc145901 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_UUID.result @@ -0,0 +1,40 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; +INSERT INTO test.t1 VALUES(1,UUID(),UUID()); +create procedure test.p1() +begin +INSERT INTO test.t1 VALUES(2,UUID(),UUID()); +INSERT INTO test.t1 VALUES(3,UUID(),UUID()); +end| +CALL test.p1(); +create function test.fn1(x int) +returns int +begin +insert into t1 values (4+x,UUID(),UUID()); +insert into t1 values (5+x,UUID(),UUID()); +return 0; +end| +select fn1(0); +fn1(0) +0 +create table t2 (a int); +insert into t2 values(fn1(2)); +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '0', + `blob_column` longblob, + `vchar_column` varchar(100) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP PROCEDURE test.p1; +DROP FUNCTION test.fn1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result new file mode 100644 index 00000000000..1025b965589 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -0,0 +1,220 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE DATABASE test_ignore; +**** On Master **** +SHOW DATABASES; +Database +information_schema +mysql +test +test_ignore +USE test; +CREATE TABLE t1 (a INT, b INT); +SHOW TABLES; +Tables_in_test +t1 +INSERT INTO t1 VALUES (1,1), (2,2); +USE test_ignore; +CREATE TABLE t2 (a INT, b INT); +SHOW TABLES; +Tables_in_test_ignore +t2 +INSERT INTO t2 VALUES (3,3), (4,4); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +**** On Slave **** +SHOW DATABASES; +Database +information_schema +mysql +test +USE test; +SHOW TABLES; +Tables_in_test +t1 +USE test_ignore; +ERROR 42000: Unknown database 'test_ignore' +DROP DATABASE test_ignore; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT) +master-bin.000001 192 Table_map 1 231 table_id: # (test.t1) +master-bin.000001 231 Write_rows 1 270 table_id: # flags: STMT_END_F +DROP TABLE t1; +================ Test for BUG#17620 ================ +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On Slave **** +SET GLOBAL QUERY_CACHE_SIZE=0; +**** On Master **** +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +**** On Slave **** +SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; +**** On Master **** +INSERT INTO t1 VALUES (4),(5),(6); +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +6 +**** On Master **** +INSERT INTO t1 VALUES (7),(8),(9); +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +6 +7 +8 +9 +SET GLOBAL QUERY_CACHE_SIZE=0; +================ Test for BUG#22550 ================ +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; +INSERT INTO t1 VALUES(1,2); +SELECT HEX(a),b FROM t1; +HEX(a) b +1 2 +SELECT HEX(a),b FROM t1; +HEX(a) b +1 2 +UPDATE t1 SET a=0 WHERE b=2; +SELECT HEX(a),b FROM t1; +HEX(a) b +0 2 +SELECT HEX(a),b FROM t1; +HEX(a) b +0 2 +DROP TABLE IF EXISTS t1; +================ Test for BUG#22583 ================ +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On 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; +**** On Slave **** +ALTER TABLE t1_myisam ENGINE=INNODB; +ALTER TABLE t1_innodb ENGINE=MYISAM; +ALTER TABLE t2_myisam ENGINE=INNODB; +ALTER TABLE t2_innodb ENGINE=MYISAM; +**** On 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; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +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; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +**** On Slave **** +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +**** On Master **** +UPDATE t1_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +UPDATE t1_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +UPDATE t2_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +UPDATE t2_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +**** On Slave **** +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +**** On Master **** +DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result new file mode 100644 index 00000000000..a6877b27b95 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -0,0 +1,418 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; +SELECT * FROM t1; +C1 C2 +SELECT * FROM t1; +C1 C2 +INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); +INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +DELETE FROM t1 WHERE C1 = C2; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'MYISAM' ; +INSERT INTO t2 +VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), +(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +DELETE FROM t2 WHERE c1 % 4 = 0; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +UPDATE t2 SET c12='X'; +CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'MYISAM' ; +INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); +INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +DELETE FROM t3 WHERE C1 = C2; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'MYISAM' ; +INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +DELETE FROM t6 WHERE C1 = C2; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'MYISAM' ; +INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'MYISAM' ; +INSERT INTO t4 SET C1 = 1; +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'MYISAM' ; +--- on slave: original values --- +INSERT INTO t7 VALUES (1,3), (2,6), (3,9); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 3 +2 6 +3 9 +--- on master: new values inserted --- +INSERT INTO t7 VALUES (1,2), (2,4), (3,6); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on slave: old values should be overwritten by replicated values --- +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on master --- +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 6 +3 6 9 +99 99 99 +--- on master --- +INSERT INTO t8 VALUES (2,4,8); +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 8 +3 6 9 +99 99 99 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result new file mode 100644 index 00000000000..4c6ec627db5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -0,0 +1,418 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; +SELECT * FROM t1; +C1 C2 +SELECT * FROM t1; +C1 C2 +INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); +INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +DELETE FROM t1 WHERE C1 = C2; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'INNODB' ; +INSERT INTO t2 +VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), +(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +DELETE FROM t2 WHERE c1 % 4 = 0; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +UPDATE t2 SET c12='X'; +CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'INNODB' ; +INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); +INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +DELETE FROM t3 WHERE C1 = C2; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'INNODB' ; +INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +DELETE FROM t6 WHERE C1 = C2; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'INNODB' ; +INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'INNODB' ; +INSERT INTO t4 SET C1 = 1; +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ; +--- on slave: original values --- +INSERT INTO t7 VALUES (1,3), (2,6), (3,9); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 3 +2 6 +3 9 +--- on master: new values inserted --- +INSERT INTO t7 VALUES (1,2), (2,4), (3,6); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on slave: old values should be overwritten by replicated values --- +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on master --- +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 6 +3 6 9 +99 99 99 +--- on master --- +INSERT INTO t8 VALUES (2,4,8); +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 8 +3 6 9 +99 99 99 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result new file mode 100644 index 00000000000..dedd5d044e0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result @@ -0,0 +1,655 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t1; +SET @@BINLOG_FORMAT = ROW; +SELECT @@BINLOG_FORMAT; +@@BINLOG_FORMAT +ROW +**** Partition RANGE testing **** +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); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- On slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition LIST testing **** +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)); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition HASH testing **** +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; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition by KEY **** +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; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result new file mode 100644 index 00000000000..055efffbd6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result @@ -0,0 +1,156 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +***** Table Create Section **** + +CREATE TABLE test.t1 (c1 int not null auto_increment, +data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; + +**** Data Insert Section test.t1 ***** + +INSERT INTO test.t1 VALUES (NULL, NULL); +INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); +INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); + +**** Data Insert Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Insert Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Update Section test.t1 **** + +UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; +UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; + +**** Data Update Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** Data Update Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** End Test Section test.t1 **** + +**** Create Table test.t2 **** + +CREATE TABLE test.t2 ( +c1 INT NOT NULL PRIMARY KEY, +c2 TEXT, +c3 INT, +c4 LONGBLOB, +KEY(c3))ENGINE=#; + +*** Setup Values For test.t2 *** +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); +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); +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); +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); + +**** Data Insert Section test.t2 ***** + +INSERT INTO test.t2 VALUES(1,@b1,111,@d1); +INSERT INTO test.t2 VALUES(2,@b2,222,@d2); + +**** Data Insert Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Insert Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Update Section test.t2 **** + +UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; +UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; + +**** Data Update Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +**** Data Update Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result new file mode 100644 index 00000000000..055efffbd6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result @@ -0,0 +1,156 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +***** Table Create Section **** + +CREATE TABLE test.t1 (c1 int not null auto_increment, +data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; + +**** Data Insert Section test.t1 ***** + +INSERT INTO test.t1 VALUES (NULL, NULL); +INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); +INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); + +**** Data Insert Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Insert Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Update Section test.t1 **** + +UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; +UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; + +**** Data Update Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** Data Update Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** End Test Section test.t1 **** + +**** Create Table test.t2 **** + +CREATE TABLE test.t2 ( +c1 INT NOT NULL PRIMARY KEY, +c2 TEXT, +c3 INT, +c4 LONGBLOB, +KEY(c3))ENGINE=#; + +*** Setup Values For test.t2 *** +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); +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); +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); +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); + +**** Data Insert Section test.t2 ***** + +INSERT INTO test.t2 VALUES(1,@b1,111,@d1); +INSERT INTO test.t2 VALUES(2,@b2,222,@d2); + +**** Data Insert Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Insert Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Update Section test.t2 **** + +UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; +UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; + +**** Data Update Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +**** Data Update Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_charset.result b/mysql-test/suite/rpl/r/rpl_row_charset.result new file mode 100644 index 00000000000..e51f3e57d1f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_charset.result @@ -0,0 +1,201 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set timestamp=1000000000; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; +set @@character_set_server=latin5; +create database mysqltest3; + +--- --master-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ + +--- --slave-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ +set @@collation_server=armscii8_bin; +drop database mysqltest3; +create database mysqltest3; + +--- --master-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ + +--- --slave-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; +create table t1 (a int auto_increment primary key, b varchar(100)); +set character_set_client=cp850, collation_connection=latin2_croatian_ci; +insert into t1 (b) values(@@character_set_server); +insert into t1 (b) values(@@collation_server); +insert into t1 (b) values(@@character_set_client); +insert into t1 (b) values(@@character_set_connection); +insert into t1 (b) values(@@collation_connection); + +--- --master-- +select * from t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci +select "--- --muller--" as ""; + +--- --muller-- +set character_set_client=latin1, collation_connection=latin1_german1_ci; +truncate table t1; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); +set collation_connection=latin1_german2_ci; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); + +--- --master-- +select * from t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller +select "--- --INSERT--" as ""; + +--- --INSERT-- +set @a= _cp850 'Müller' collate cp850_general_ci; +truncate table t1; +insert into t1 (b) values(collation(@a)); + +--- --master-- +select * from t1 order by a; +a b +1 cp850_general_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 cp850_general_ci +drop database mysqltest2; +drop database mysqltest3; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # drop database if exists mysqltest3 +master-bin.000001 # Query # # create database mysqltest2 character set latin2 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # drop database mysqltest3 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # drop database mysqltest2 +master-bin.000001 # Query # # drop database mysqltest3 +select "--- --global--" as ""; + +--- --global-- +set global character_set_server=latin2; +set global character_set_server=latin1; +set global character_set_server=latin2; +set global character_set_server=latin1; +select "--- --oneshot--" as ""; + +--- --oneshot-- +set one_shot @@character_set_server=latin5; +set @@max_join_size=1000; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin1 +set @@character_set_server=latin5; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin5 +set one_shot max_join_size=10; +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server +set character_set_client=9999999; +ERROR 42000: Unknown character set: '9999999' +set collation_server=9999998; +ERROR HY000: Unknown collation: '9999998' +select "--- --3943--" as ""; + +--- --3943-- +use test; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET CHARACTER_SET_CLIENT=koi8r, +CHARACTER_SET_CONNECTION=cp1251, +CHARACTER_SET_RESULTS=koi8r; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +drop table t1; +select "--- --6676--" as ""; + +--- --6676-- +create table `t1` ( +`pk` varchar(10) not null default '', +primary key (`pk`) +) engine=myisam default charset=latin1; +set @p=_latin1 'test'; +update t1 set pk='test' where pk=@p; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result new file mode 100644 index 00000000000..e76ce5b962d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -0,0 +1,403 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +SHOW BINLOG EVENTS FROM 216; +Log_name # +Pos 216 +Event_type Query +Server_id # +End_log_pos 309 +Info use `test`; CREATE TABLE t1 (a INT, b INT) +Log_name # +Pos 309 +Event_type Query +Server_id # +End_log_pos 415 +Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge +Log_name # +Pos 415 +Event_type Query +Server_id # +End_log_pos 521 +Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 +Log_name # +Pos 521 +Event_type Query +Server_id # +End_log_pos 640 +Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 +**** On Master **** +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +SHOW CREATE TABLE t3; +Table t3 +Create Table CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +**** On Slave **** +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +SHOW CREATE TABLE t3; +Table t3 +Create Table CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +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; +**** On Master **** +SHOW CREATE TABLE t5; +Table t5 +Create Table CREATE TABLE `t5` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5 ORDER BY a,b,c; +c a b +SHOW CREATE TABLE t6; +Table t6 +Create Table CREATE TABLE `t6` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6 ORDER BY a,b,c; +c a b +NULL 1 2 +NULL 2 4 +NULL 3 6 +NULL 4 2 +NULL 5 10 +NULL 6 12 +**** On Slave **** +SHOW CREATE TABLE t5; +Table t5 +Create Table CREATE TABLE `t5` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SELECT * FROM t5 ORDER BY a,b,c; +c a b +SHOW CREATE TABLE t6; +Table t6 +Create Table CREATE TABLE `t6` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SELECT * FROM t6 ORDER BY a,b,c; +c a b +NULL 1 2 +NULL 2 4 +NULL 3 6 +NULL 4 2 +NULL 5 10 +NULL 6 12 +CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; +ERROR 23000: Duplicate entry '2' for key 'b' +SHOW BINLOG EVENTS FROM 1098; +Log_name Pos Event_type Server_id End_log_pos Info +CREATE TABLE t7 (a INT, b INT UNIQUE); +INSERT INTO t7 SELECT a,b FROM tt3; +ERROR 23000: Duplicate entry '2' for key 'b' +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +SHOW BINLOG EVENTS FROM 1098; +Log_name Pos Event_type Server_id End_log_pos Info +# 1098 Query # 1198 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) +# 1198 Table_map # 1238 table_id: # (test.t7) +# 1238 Write_rows # 1294 table_id: # flags: STMT_END_F +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +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; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SHOW BINLOG EVENTS FROM 1294; +Log_name Pos Event_type Server_id End_log_pos Info +# 1294 Table_map # 1334 table_id: # (test.t7) +# 1334 Write_rows # 1390 table_id: # flags: STMT_END_F +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +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; +**** On Master **** +SHOW CREATE TABLE t8; +Table t8 +Create Table CREATE TABLE `t8` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +SHOW CREATE TABLE t9; +Table t9 +Create Table CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW BINLOG EVENTS FROM 1390; +Log_name Pos Event_type Server_id End_log_pos Info +# 1390 Query # 1476 use `test`; CREATE TABLE t8 LIKE t4 +# 1476 Query # 1615 use `test`; CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +**** On Slave **** +SHOW CREATE TABLE t8; +Table t8 +Create Table CREATE TABLE `t8` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +SHOW CREATE TABLE t9; +Table t9 +Create Table CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +STOP SLAVE; +SET GLOBAL storage_engine=@storage_engine; +START SLAVE; +================ BUG#22864 ================ +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +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; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SHOW TABLES; +Tables_in_test +t1 +t2 +t3 +t4 +SELECT TABLE_NAME,ENGINE +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +TABLE_NAME ENGINE +t1 MyISAM +t2 InnoDB +t3 InnoDB +t4 InnoDB +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t3 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t4 ORDER BY a; +a +1 +2 +3 +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +# 4 Format_desc # 106 Server ver: #, Binlog ver: # +# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) +# 192 Table_map # 231 table_id: # (test.t1) +# 231 Write_rows # 275 table_id: # flags: STMT_END_F +# 275 Query # 343 use `test`; BEGIN +# 343 Query # 125 use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 468 Table_map # 164 table_id: # (test.t2) +# 507 Write_rows # 208 table_id: # flags: STMT_END_F +# 551 Xid # 578 COMMIT /* XID */ +# 578 Query # 646 use `test`; BEGIN +# 646 Query # 125 use `test`; CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 771 Table_map # 164 table_id: # (test.t3) +# 810 Write_rows # 208 table_id: # flags: STMT_END_F +# 854 Xid # 881 COMMIT /* XID */ +# 881 Query # 949 use `test`; BEGIN +# 949 Query # 125 use `test`; CREATE TABLE `t4` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 1074 Table_map # 164 table_id: # (test.t4) +# 1113 Write_rows # 208 table_id: # flags: STMT_END_F +# 1157 Xid # 1184 COMMIT /* XID */ +# 1184 Table_map # 1223 table_id: # (test.t1) +# 1223 Write_rows # 1267 table_id: # flags: STMT_END_F +SHOW TABLES; +Tables_in_test +t1 +t2 +t3 +t4 +SELECT TABLE_NAME,ENGINE +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +TABLE_NAME ENGINE +t1 MyISAM +t2 InnoDB +t3 InnoDB +t4 InnoDB +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t3 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t4 ORDER BY a; +a +1 +2 +3 +DROP TABLE IF EXISTS t1,t2,t3,t4; +SET AUTOCOMMIT=1; +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +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; +a +1 +4 +4 +6 +9 +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +# 4 Format_desc # 106 Server ver: #, Binlog ver: # +# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) +# 192 Table_map # 231 table_id: # (test.t1) +# 231 Write_rows # 275 table_id: # flags: STMT_END_F +# 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB +# 375 Query # 443 use `test`; BEGIN +# 443 Table_map # 39 table_id: # (test.t2) +# 482 Write_rows # 83 table_id: # flags: STMT_END_F +# 526 Table_map # 122 table_id: # (test.t2) +# 565 Write_rows # 161 table_id: # flags: STMT_END_F +# 604 Xid # 631 COMMIT /* XID */ +SELECT * FROM t2 ORDER BY a; +a +1 +4 +4 +6 +9 +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; +a +SHOW BINLOG EVENTS FROM 631; +Log_name Pos Event_type Server_id End_log_pos Info +# 631 Query # 80 use `test`; TRUNCATE TABLE t2 +# 711 Xid # 738 COMMIT /* XID */ +SELECT * FROM t2 ORDER BY a; +a +DROP TABLE t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result new file mode 100644 index 00000000000..800a39bd567 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -0,0 +1,32 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(a int not null primary key) engine=myisam; +insert delayed into t1 values (1); +insert delayed into t1 values (2); +insert delayed into t1 values (3); +flush tables; +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(a int not null primary key) engine=myisam +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; flush tables +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result new file mode 100644 index 00000000000..89654ebf165 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -0,0 +1,56 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On Master **** +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +DROP TABLE t2; +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +DROP TABLE t1,t2; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int) +master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int) +master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */ +SHOW TABLES; +Tables_in_test +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t2 diff --git a/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result new file mode 100644 index 00000000000..b696baa57db --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result @@ -0,0 +1,44 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int primary key); +insert into t1 values (1),(1); +ERROR 23000: Duplicate entry '1' for key 1 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 269 # # master-bin.000001 Yes Yes 0 0 269 # None 0 No # +show tables like 't1'; +Tables_in_test (t1) +t1 +drop table t1; +select get_lock('crash_lock%20C', 10); +get_lock('crash_lock%20C', 10) +1 +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); + update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); +select (@id := id) - id from t3; +(@id := id) - id +0 +kill @id; +drop table t2,t3; +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Update_rows 1 # # +master-bin.000001 # Query 1 # # diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result new file mode 100644 index 00000000000..942a6b83bf6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -0,0 +1,33 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int); +insert into t1 values (10); +create table t2 (a int); +create table t3 (a int) engine=merge union(t1); +create table t4 (a int); +insert into t4 select * from t3; +rename table t1 to t5, t2 to t1; +flush no_write_to_binlog tables; +SHOW BINLOG EVENTS FROM 619 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +select * from t3; +a +flush tables; +SHOW BINLOG EVENTS FROM 619 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables +select * from t3; +a +stop slave; +drop table t1; +flush tables with read lock; +start slave; +stop slave; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +drop table t3, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_row_func001.result b/mysql-test/suite/rpl/r/rpl_row_func001.result new file mode 100644 index 00000000000..b20f3f724d0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func001.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; +create table test.t1 (a int, PRIMARY KEY(a)); +create function test.f1(i int) returns int +begin +insert into test.t1 values(i); +return 0; +end// +select test.f1(1); +test.f1(1) +0 +select test.f1(2); +test.f1(2) +0 +select * from test.t1; +a +1 +2 +select * from test.t1; +a +1 +2 +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result new file mode 100644 index 00000000000..03f5b3115c3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func002.result @@ -0,0 +1,26 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +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)); +create function test.f1() RETURNS TIMESTAMP +BEGIN +UPDATE test.t1 SET t = CURRENT_TIMESTAMP; +RETURN CURRENT_TIMESTAMP; +END// +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=2; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=1; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=333300000; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +DROP FUNCTION test.f1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result new file mode 100644 index 00000000000..a5fd46a2ce3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -0,0 +1,29 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP FUNCTION IF EXISTS test.f1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB; +create function test.f1() RETURNS CHAR(16) +BEGIN +DECLARE tmp CHAR(16); +DECLARE var_name FLOAT; +SET var_name = RAND(); +IF var_name > .6 +THEN SET tmp = 'Texas'; +ELSE SET tmp = 'MySQL'; +END IF; +RETURN tmp; +END| +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +SET AUTOCOMMIT=0; +START TRANSACTION; +INSERT INTO test.t1 VALUES (null,test.f1()); +ROLLBACK; +SET AUTOCOMMIT=1; +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result new file mode 100644 index 00000000000..4412a1fa75c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -0,0 +1,55 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +show tables; +Tables_in_test +t1 +select * from t1; +a +0 +drop table t1; +insert into t1 values (1); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table test.t2 +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1146 +Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` +Skip_Counter 0 +Exec_Master_Log_Pos 524 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result new file mode 100644 index 00000000000..2044672f49d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result @@ -0,0 +1,48 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set @old_global_binlog_format = @@global.binlog_format; +set @@global.binlog_format = row; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +ROW +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 James Bond +select * from t1; +id name +10 my name +20 James Bond +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result new file mode 100644 index 00000000000..149efddaf8d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result @@ -0,0 +1,20 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +stop 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 t1; +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result new file mode 100644 index 00000000000..9de0d3d0ebb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -0,0 +1,116 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +flush logs; +create table t3 (a int)ENGINE=MyISAM; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=MyISAM; +insert into t2 values (1); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +master-bin.000002 # Table_map 1 # table_id: # (test.t2) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +show binary logs; +Log_name File_size +master-bin.000001 1260 +master-bin.000002 377 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1358 +slave-bin.000002 278 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +slave-bin.000002 # Table_map 1 # table_id: # (test.t2) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result new file mode 100644 index 00000000000..4d8175142b2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -0,0 +1,124 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=InnoDB; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Xid 1 # COMMIT /* XID */ +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +flush logs; +create table t3 (a int)ENGINE=InnoDB; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=InnoDB; +insert into t2 values (1); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB +master-bin.000002 # Table_map 1 # table_id: # (test.t2) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000002 # Xid 1 # COMMIT /* XID */ +show binary logs; +Log_name File_size +master-bin.000001 1314 +master-bin.000002 404 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1412 +slave-bin.000002 305 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB +slave-bin.000002 # Table_map 1 # table_id: # (test.t2) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000002 # Xid 1 # COMMIT /* XID */ +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result new file mode 100644 index 00000000000..cb1692568fc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -0,0 +1,281 @@ +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +# +# Generate a big enough master's binlog to cause relay log rotations +# +create table t1 (a int); +drop table t1; +reset slave; +# +# Test 1 +# +set @my_max_binlog_size= @@global.max_binlog_size; +set global max_binlog_size=8192; +set global max_relay_log_size=8192-1; +select @@global.max_relay_log_size; +@@global.max_relay_log_size +4096 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 2 +# +stop slave; +reset slave; +set global max_relay_log_size=(5*4096); +select @@global.max_relay_log_size; +@@global.max_relay_log_size 20480 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 3: max_relay_log_size = 0 +# +stop slave; +reset slave; +set global max_relay_log_size=0; +select @@global.max_relay_log_size; +@@global.max_relay_log_size 0 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions +# +stop slave; +reset slave; +flush logs; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File +Read_Master_Log_Pos 4 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 0 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 5 +# +reset slave; +start slave; +flush logs; +create table t1 (a int); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58754 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58754 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated +# +flush logs; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58830 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58830 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +flush logs; +show master status; +File master-bin.000002 +Position 106 +Binlog_Do_DB <Binlog_Ignore_DB> +Binlog_Ignore_DB +set global max_binlog_size= @my_max_binlog_size; +# +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/r/rpl_row_multi_query.result b/mysql-test/suite/rpl/r/rpl_row_multi_query.result new file mode 100644 index 00000000000..8cb1aec522b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_multi_query.result @@ -0,0 +1,37 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +insert into mysqltest.t1 values(1)/ +insert into mysqltest.t1 values(2); +insert into mysqltest.t1 values(3); +insert into mysqltest.t1 values(4); +insert into mysqltest.t1 values(5)/ +select * from mysqltest.t1; +n +1 +2 +3 +4 +5 +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result new file mode 100644 index 00000000000..e2df1459ac0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -0,0 +1,352 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +---Setup Section -- +set timestamp=1000000000; +DROP TABLE IF EXISTS t1,t2,t3; +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); + +---Test1 check table load -- +SELECT COUNT(*) from t1; +COUNT(*) +351 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +351 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +insert into t1 values ("Alas"); +flush logs; + +--- Test 1 Dump binlog to file -- + +--- Test 1 delete tables, clean master and slave -- +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +stop slave; +reset master; +reset slave; +start slave; + +--- Test 1 Load from Dump binlog file -- + +--- Test 1 Check Load Results -- +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 + +--- Test 2 position test -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 3 First Remote test -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +DROP TABLE IF EXISTS t1,t2,t3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t1(word VARCHAR(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 4 Second Remote test -- +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +stop slave; +reset master; +reset slave; +start slave; +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 + +--- Test 5 LOAD DATA -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 6 reading stdin -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +DROP TABLE IF EXISTS t1,t2,t3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t1(word VARCHAR(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 7 reading stdin w/position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 8 switch internal charset -- +stop slave; +reset master; +reset slave; +start slave; +create table t4 (f text character set utf8); +create table t5 (f text character set cp932); +flush logs; +rename table t4 to t04, t5 to t05; +select HEX(f) from t04; +HEX(f) +E382BD +select HEX(f) from t4; +HEX(f) +E382BD +select HEX(f) from t05; +HEX(f) +835C +select HEX(f) from t5; +HEX(f) +835C +select HEX(f) from t04; +HEX(f) +E382BD +select HEX(f) from t4; +HEX(f) +E382BD +select HEX(f) from t05; +HEX(f) +835C +select HEX(f) from t5; +HEX(f) +835C + +--- Test cleanup -- +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT NOT NULL KEY, b INT); +INSERT INTO t1 VALUES(1,1); +SELECT * FROM t1; +a b +1 1 +FLUSH LOGS; +DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_row_mystery22.result b/mysql-test/suite/rpl/r/rpl_row_mystery22.result new file mode 100644 index 00000000000..bcf65e4ede3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_mystery22.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(n int auto_increment primary key, s char(10)); +insert into t1 values (2,'old'); +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +select * from t1 order by n; +n s +1 new +2 new +delete from t1 where n = 2; +start slave; +stop slave; +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +start slave; +select * from t1 order by n; +n s +1 new +3 new +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result new file mode 100644 index 00000000000..c9ae5ced7bc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -0,0 +1,32 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +change master to master_user='test'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +reset slave; +start slave; +create temporary table t1 (a int); +stop slave; +reset slave; +start slave; +show status like 'slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 diff --git a/mysql-test/suite/rpl/r/rpl_row_sp001.result b/mysql-test/suite/rpl/r/rpl_row_sp001.result new file mode 100644 index 00000000000..8c26c061376 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp001.result @@ -0,0 +1,85 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +<Begin test section 1 (non deterministic SP)> +--------------------------------------------- +create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +create procedure test.p1() +begin +INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); +end// + +<End test section 1 (non deterministic SP)> +------------------------------------------- +CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); +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// +INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); +SELECT * FROM t2 ORDER BY a; +a t +1 NEW +2 NEW +3 NEW +4 NEW +SELECT * FROM t2 ORDER BY a; +a t +1 NEW +2 NEW +3 NEW +4 NEW +call test.p2(1); +SELECT * FROM t2 ORDER BY a; +a t +1 Tex +2 Tex +3 Tex +4 Tex +SELECT * FROM t2 ORDER BY a; +a t +1 Tex +2 Tex +3 Tex +4 Tex +call test.p2(2); +SELECT * FROM t2 ORDER BY a; +a t +1 SQL +2 SQL +3 SQL +4 SQL +SELECT * FROM t2 ORDER BY a; +a t +1 SQL +2 SQL +3 SQL +4 SQL +call test.p2(3); +SELECT * FROM t2 ORDER BY a; +a t +1 NONE +2 NONE +3 NONE +4 NONE +SELECT * FROM t2 ORDER BY a; +a t +1 NONE +2 NONE +3 NONE +4 NONE +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result new file mode 100644 index 00000000000..a42c9af988c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result @@ -0,0 +1,239 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP TABLE IF EXISTS test.t3; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; +CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; +create procedure test.p1(IN i CHAR(6)) +begin +INSERT INTO test.t1 (t) VALUES (i); +INSERT INTO test.t2 VALUES (NULL,LAST_INSERT_ID()); +end| +create procedure test.p2(IN i INT) +begin +DELETE FROM test.t1 where a < i; +end| + +< -- test 1 call p1 -- > +------------------------ +SET FOREIGN_KEY_CHECKS=1; +call test.p1('texas'); +call test.p1('Live'); +call test.p1('next'); +call test.p1('to'); +call test.p1('OK'); +call test.p1('MySQL'); + +< -- test 1 select master after p1 -- > +--------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 + +< -- test 1 select slave after p1 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 + +< -- test 1 call p2 & select master -- > +---------------------------------------- +call test.p2(4); +SELECT * FROM test.t1; +a t +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +4 4 +5 5 +6 6 + +< -- test 1 select slave after p2 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +4 4 +5 5 +6 6 + +< -- End test 1 Begin test 2 -- > +--------------------------------- +SET FOREIGN_KEY_CHECKS=0; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT, t CHAR(6), PRIMARY KEY(a)) ENGINE=INNODB; +CREATE TABLE test.t2 (a INT, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON UPDATE CASCADE, PRIMARY KEY(a)) ENGINE=INNODB; +CREATE PROCEDURE test.p1(IN nm INT, IN ch CHAR(6)) +BEGIN +INSERT INTO test.t1 (a,t) VALUES (nm, ch); +INSERT INTO test.t2 VALUES (nm, LAST_INSERT_ID()); +END| +CREATE PROCEDURE test.p2(IN i INT) +BEGIN +UPDATE test.t1 SET a = i*10 WHERE a = i; +END| +SET FOREIGN_KEY_CHECKS=1; +CALL test.p1(1,'texas'); +CALL test.p1(2,'Live'); +CALL test.p1(3,'next'); +CALL test.p1(4,'to'); +CALL test.p1(5,'OK'); +CALL test.p1(6,'MySQL'); + +< -- test 2 select Master after p1 -- > +--------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 6 +2 6 +3 6 +4 6 +5 6 +6 6 + +< -- test 2 select Slave after p1 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 6 +2 6 +3 6 +4 6 +5 6 +6 6 + +< -- test 2 call p2 & select Master -- > +---------------------------------------- +CALL test.p2(2); +CALL test.p2(4); +CALL test.p2(6); +SELECT * FROM test.t1; +a t +1 texas +3 next +5 OK +20 Live +40 to +60 MySQL +SELECT * FROM test.t2; +a f +1 6 +3 6 +5 6 +20 6 +40 6 +60 6 + +< -- test 1 select Slave after p2 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +3 next +5 OK +20 Live +40 to +60 MySQL +SELECT * FROM test.t2; +a f +1 6 +3 6 +5 6 +20 6 +40 6 +60 6 + +< -- End test 2 Begin test 3 -- > +--------------------------------- +CREATE TABLE test.t3 (a INT AUTO_INCREMENT KEY, t CHAR(6))ENGINE=INNODB; +CREATE PROCEDURE test.p3(IN n INT) +begin +CASE n +WHEN 2 THEN +DELETE from test.t3; +ELSE +INSERT INTO test.t3 VALUES (NULL,'NONE'); +END CASE; +end| +SET AUTOCOMMIT=0; +START TRANSACTION; +ROLLBACK; +select * from test.t3; +a t +select * from test.t3; +a t +START TRANSACTION; +COMMIT; +select * from test.t3; +a t +98 NONE +select * from test.t3; +a t +98 NONE +SET AUTOCOMMIT=1; +SET FOREIGN_KEY_CHECKS=0; +DROP PROCEDURE IF EXISTS test.p3; +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp003.result b/mysql-test/suite/rpl/r/rpl_row_sp003.result new file mode 100644 index 00000000000..df3e2a7ceed --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp003.result @@ -0,0 +1,49 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; +CREATE PROCEDURE test.p1() +BEGIN +INSERT INTO test.t1 VALUES (4); +SELECT get_lock("test", 100); +UPDATE test.t1 set a=a+4 WHERE a=4; +END| +CREATE PROCEDURE test.p2() +BEGIN +UPDATE test.t1 SET a=a+1; +END| +SELECT get_lock("test", 200); +get_lock("test", 200) +1 +CALL test.p1(); +CALL test.p2(); +SELECT release_lock("test"); +release_lock("test") +1 +SELECT * FROM test.t1; +a +5 +SELECT * FROM test.t1; +a +5 +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; +CALL test.p2(); +CALL test.p1(); +get_lock("test", 100) +0 +SELECT * FROM test.t1; +a +8 +SELECT * FROM test.t1; +a +8 +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result new file mode 100644 index 00000000000..01e1970e0df --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result @@ -0,0 +1,100 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +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)); +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| + +< ---- Master selects-- > +------------------------- +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY id; +id data +8 MySQL +10 kyle +11 Texas +20 ROCKS +SELECT * FROM test.t2 ORDER BY id2; +id2 +1 +2 +3 +4 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1 ORDER BY id; +id data +8 MySQL +10 kyle +11 Texas +20 ROCKS +SELECT * FROM test.t2 ORDER BY id2; +id2 +1 +2 +3 +4 + +< ---- Master selects-- > +------------------------- +CALL test.p1(); +SELECT * FROM test.t3 ORDER BY id3; +id3 c +1 MySQL +2 kyle +3 Texas +4 ROCKS + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t3 ORDER BY id3; +id3 c +1 MySQL +2 kyle +3 Texas +4 ROCKS +ALTER PROCEDURE test.p1 MODIFIES SQL DATA; +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result new file mode 100644 index 00000000000..8339e77d3a0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -0,0 +1,46 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create database if not exists mysqltest1; +DROP PROCEDURE IF EXISTS mysqltest1.p1; +DROP PROCEDURE IF EXISTS mysqltest1.p2; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t1; +CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE PROCEDURE mysqltest1.p1() +BEGIN +DECLARE done INT DEFAULT 0; +DECLARE spa CHAR(16); +DECLARE spb INT; +DECLARE cur1 CURSOR FOR SELECT name, +(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5)<RIGHT(birth,5)) +FROM mysqltest1.t1; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +OPEN cur1; +SET AUTOCOMMIT=0; +REPEAT +FETCH cur1 INTO spa, spb; +IF NOT done THEN +START TRANSACTION; +INSERT INTO mysqltest1.t2 VALUES (spa,spb); +COMMIT; +END IF; +UNTIL done END REPEAT; +SET AUTOCOMMIT=1; +CLOSE cur1; +END| +CREATE PROCEDURE mysqltest1.p2() +BEGIN +INSERT INTO mysqltest1.t1 VALUES ('MySQL','1993-02-04'),('ROCKS', '1990-08-27'),('Texas', '1999-03-30'),('kyle','2005-1-1'); +END| +CALL mysqltest1.p2(); +CALL mysqltest1.p1(); +DROP PROCEDURE IF EXISTS mysqltest1.p1; +DROP PROCEDURE IF EXISTS mysqltest1.p2; +DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result new file mode 100644 index 00000000000..9a2822835f8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -0,0 +1,50 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +CREATE PROCEDURE test.p1(IN i INT) +BEGIN +DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (num INT,PRIMARY KEY(num))ENGINE=INNODB; +START TRANSACTION; +INSERT INTO test.t1 VALUES(i); +savepoint t1_save; +INSERT INTO test.t1 VALUES (14); +ROLLBACK to savepoint t1_save; +COMMIT; +END| + +< ---- Master selects-- > +------------------------- +CALL test.p1(12); +Warnings: +Note 1051 Unknown table 't1' +SELECT * FROM test.t1; +num +12 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1; +num +12 + +< ---- Master selects-- > +------------------------- +CALL test.p1(13); +SELECT * FROM test.t1; +num +13 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1; +num +13 +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp008.result b/mysql-test/suite/rpl/r/rpl_row_sp008.result new file mode 100644 index 00000000000..23197964a24 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp008.result @@ -0,0 +1,34 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t2; +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); +CREATE PROCEDURE test.p1() +BEGIN +SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; +INSERT INTO test.t2 VALUES(FOUND_ROWS()); +END| + +< ---- Master selects-- > +------------------------- +CALL test.p1(); +a +1 +SELECT * FROM test.t2; +a +2 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t2; +a +2 +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp009.result b/mysql-test/suite/rpl/r/rpl_row_sp009.result new file mode 100644 index 00000000000..35ce0d7b420 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp009.result @@ -0,0 +1,77 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +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)); +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| +CALL test.p1('a'); +SELECT * FROM test.t2 ORDER BY a; +a +1 +3 +SELECT * FROM test.t2 ORDER BY a; +a +1 +3 +truncate test.t2; +call test.p1('b'); +select * from test.t2 ORDER BY a; +a +2 +4 +SELECT * FROM test.t2 ORDER BY a; +a +2 +4 +truncate test.t2; +SELECT * FROM test.t2 ORDER BY a; +a +SELECT * FROM test.t2 ORDER BY a; +a +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp010.result b/mysql-test/suite/rpl/r/rpl_row_sp010.result new file mode 100644 index 00000000000..02567465428 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp010.result @@ -0,0 +1,56 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +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| +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +show tables; +Tables_in_test +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| +CALL test.p4(); +SELECT * FROM test.t2 ORDER BY a; +a +6 +7 +SELECT * FROM test.t2 ORDER BY a; +a +6 +7 +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp011.result b/mysql-test/suite/rpl/r/rpl_row_sp011.result new file mode 100644 index 00000000000..e35c9f21adb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp011.result @@ -0,0 +1,69 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (1); +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| +CALL test.p1(); +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp012.result b/mysql-test/suite/rpl/r/rpl_row_sp012.result new file mode 100644 index 00000000000..b9c818bad9a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp012.result @@ -0,0 +1,59 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +grant usage on *.* to user1@localhost; +flush privileges; +SELECT CURRENT_USER(); +CURRENT_USER() +root@localhost +SELECT USER(); +USER() +root@localhost +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; + +<******** Master user1 p3 & p2 calls *******> +---------------------------------------------- +SELECT CURRENT_USER(); +CURRENT_USER() +user1@localhost +SELECT USER(); +USER() +user1@localhost +CALL test.p3(); +CURRENT_USER() USER() +user1@localhost user1@localhost +CALL test.p2(); +CURRENT_USER() USER() +root@localhost user1@localhost + +<******** Slave user1 p3 & p2 calls *******> +--------------------------------------------- +SELECT CURRENT_USER(); +CURRENT_USER() +user1@localhost +SELECT USER(); +USER() +user1@localhost +CALL test.p3(); +CURRENT_USER() USER() +user1@localhost user1@localhost +CALL test.p2(); +CURRENT_USER() USER() +root@localhost user1@localhost +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle.result new file mode 100644 index 00000000000..46ca5748174 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle.result @@ -0,0 +1,26 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +stop slave; +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; +start slave; +stop slave; +drop table t1; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result new file mode 100644 index 00000000000..0fd4ff86893 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result @@ -0,0 +1,16 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (words varchar(20)) engine=myisam; +load data infile '../std_data_ln/words.dat' into table t1 (words); +select count(*) from t1; +count(*) +70 +select count(*) from t1; +count(*) +70 +drop table t1; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result new file mode 100644 index 00000000000..4eca19ff098 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -0,0 +1,389 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t4 (a INT) ENGINE='MyISAM'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM'; +CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM'; +CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM'; +CREATE TABLE t9 (a INT) ENGINE='MyISAM'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, +ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; +ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, +ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, +ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, +ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 5 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 5 Foo is a bar +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 10 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 10 Foo is a bar +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +INSERT INTO t7 VALUES (1),(2),(3); +INSERT INTO t8 VALUES (1),(2),(3); +SELECT * FROM t7 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t8 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t7 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 NULL NULL NULL NULL NULL NULL NULL NULL +2 NULL NULL NULL NULL NULL NULL NULL NULL +3 NULL NULL NULL NULL NULL NULL NULL NULL +SELECT * FROM t8 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 +**** On Master **** +TRUNCATE t1_nodef; +SET SQL_LOG_BIN=0; +INSERT INTO t1_nodef VALUES (1,2); +INSERT INTO t1_nodef VALUES (2,4); +SET SQL_LOG_BIN=1; +**** On Slave **** +INSERT INTO t1_nodef VALUES (1,2,3); +INSERT INTO t1_nodef VALUES (2,4,6); +**** On Master **** +UPDATE t1_nodef SET b=2*b WHERE a=1; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +2 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +2 4 6 +**** On Master **** +DELETE FROM t1_nodef WHERE a=2; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +**** Cleanup **** +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result new file mode 100644 index 00000000000..687108e17e5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -0,0 +1,389 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t4 (a INT) ENGINE='InnoDB'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='InnoDB'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='InnoDB'; +CREATE TABLE t7 (a INT NOT NULL) ENGINE='InnoDB'; +CREATE TABLE t8 (a INT NOT NULL) ENGINE='InnoDB'; +CREATE TABLE t9 (a INT) ENGINE='InnoDB'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, +ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; +ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, +ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, +ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, +ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 5 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 5 Foo is a bar +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 10 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 10 Foo is a bar +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +INSERT INTO t7 VALUES (1),(2),(3); +INSERT INTO t8 VALUES (1),(2),(3); +SELECT * FROM t7 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t8 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t7 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 NULL NULL NULL NULL NULL NULL NULL NULL +2 NULL NULL NULL NULL NULL NULL NULL NULL +3 NULL NULL NULL NULL NULL NULL NULL NULL +SELECT * FROM t8 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 +**** On Master **** +TRUNCATE t1_nodef; +SET SQL_LOG_BIN=0; +INSERT INTO t1_nodef VALUES (1,2); +INSERT INTO t1_nodef VALUES (2,4); +SET SQL_LOG_BIN=1; +**** On Slave **** +INSERT INTO t1_nodef VALUES (1,2,3); +INSERT INTO t1_nodef VALUES (2,4,6); +**** On Master **** +UPDATE t1_nodef SET b=2*b WHERE a=1; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +2 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +2 4 6 +**** On Master **** +DELETE FROM t1_nodef WHERE a=2; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +**** Cleanup **** +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result new file mode 100644 index 00000000000..5876a0e1b65 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result @@ -0,0 +1,288 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t4 (a INT) ENGINE='NDB'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB'; +CREATE TABLE t9 (a INT) ENGINE='NDB'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int; +a b +1 2 +2 5 +SELECT * FROM t1_bit; +a b +1 2 +2 5 +SELECT * FROM t1_char; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int; +a b x +1 2 42 +2 5 42 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 3 15 2 +SELECT a,b,x FROM t1_char; +a b x +1 2 Just a test +2 5 Just a test +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int; +a b +1 2 +2 10 +SELECT * FROM t1_bit; +a b +1 2 +2 10 +SELECT * FROM t1_char; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int; +a b x +1 2 42 +2 10 42 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 3 15 2 +SELECT a,b,x FROM t1_char; +a b x +1 2 Just a test +2 10 Just a test +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1364 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig001.result b/mysql-test/suite/rpl/r/rpl_row_trig001.result new file mode 100644 index 00000000000..6665dc6d555 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig001.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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()); +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// + +<End test section 2 (Tiggers & SP)> +----------------------------------- +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; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig002.result b/mysql-test/suite/rpl/r/rpl_row_trig002.result new file mode 100644 index 00000000000..794104db750 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig002.result @@ -0,0 +1,69 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TRIGGER test.t2_ai; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +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)); +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'| +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; +id domain +1 example.com +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +1 example.com +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +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; +value domain_id mailaccount_id program keey +Yes 1 NULL spamfilter scan_incoming +select * from test.t3; +value domain_id mailaccount_id program keey +No 5 NULL spamfilter scan_incoming +Yes 1 NULL spamfilter scan_incoming +select * from test.t2; +value domain_id mailaccount_id program keey +Yes 1 NULL spamfilter scan_incoming +select * from test.t3; +value domain_id mailaccount_id program keey +No 5 NULL spamfilter scan_incoming +Yes 1 NULL spamfilter scan_incoming +DELETE FROM test.t1 WHERE id = 1; +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +DROP TRIGGER test.t2_ai; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig003.result b/mysql-test/suite/rpl/r/rpl_row_trig003.result new file mode 100644 index 00000000000..43c2ecde2b4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig003.result @@ -0,0 +1,83 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TRIGGER test.t1_bi; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t1_bu; +DROP TRIGGER test.t2_au; +DROP TRIGGER test.t1_bd; +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +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)); +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| +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()); +DELETE FROM test.t1 WHERE id = 1; +DELETE FROM test.t2 WHERE id = 1; +DROP TRIGGER test.t1_bi; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t1_bu; +DROP TRIGGER test.t2_au; +DROP TRIGGER test.t1_bd; +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig004.result b/mysql-test/suite/rpl/r/rpl_row_trig004.result new file mode 100644 index 00000000000..d0d0657f875 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig004.result @@ -0,0 +1,30 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TRIGGER test.t1_bi_t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=INNODB; +CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNODB; +CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// +INSERT INTO test.t2 VALUES (1, 0.0); +INSERT INTO test.t2 VALUES (1, 0.0); +Got one of the listed errors +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +DROP TRIGGER test.t1_bi_t2; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result new file mode 100644 index 00000000000..d71cc479f7a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -0,0 +1,190 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +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; +start slave until master_log_file='master-bin.000001', master_log_pos=311; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 315 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 311 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 315 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-no-such-bin.000001 +Until_Log_Pos 291 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; +select * from t2; +n +1 +2 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 590 +Relay_Log_Space # +Until_Condition Relay +Until_Log_File slave-relay-bin.000004 +Until_Log_Pos 728 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +start slave until master_log_file='master-bin.000001', master_log_pos=740; +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 744 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 740 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-bin', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=740; +Warnings: +Note 1254 Slave is already running diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result new file mode 100644 index 00000000000..a4b8d0a05e3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -0,0 +1,101 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +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; +qty price value +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.v1; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +SELECT * FROM mysqltest1.v2; +qty price value +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.v1; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; +INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; +SELECT * FROM mysqltest1.t5 ORDER BY qty; +qty price total +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.t3 ORDER BY a; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +SELECT * FROM mysqltest1.t5 ORDER BY qty; +qty price total +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.t3 ORDER BY a; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); +SELECT * FROM mysqltest1.t1 ORDER BY a; +a c +1 Thank +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.v4 ORDER BY a; +a c +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.t1 ORDER BY a; +a c +1 Thank +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.v4 ORDER BY a; +a c +2 it +3 Friday +4 TEST +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; diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result new file mode 100644 index 00000000000..8f82ca8ea12 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -0,0 +1,19 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int); +reset master; +stop slave; +change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No +start slave; +insert into t1 values (1); +show status like "slave_running"; +Variable_name Value +Slave_running OFF +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result new file mode 100644 index 00000000000..a5c7fc07714 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_server_id2.result @@ -0,0 +1,21 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int); +reset master; +stop slave; +change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No +start slave; +insert into t1 values (1); +select * from t1; +n +1 +1 +stop slave; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result new file mode 100644 index 00000000000..b5b4b815ade --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_session_var.result @@ -0,0 +1,43 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1; +Warnings: +Note 1051 Unknown table '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; +a b +1 2 +MySQL 1 +select * from t1 where b<3 order by a; +a b +1 2 +MySQL 1 +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; +b a +1 1 +select * from t2 order by b; +b a +1 1 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_set_charset.result b/mysql-test/suite/rpl/r/rpl_set_charset.result new file mode 100644 index 00000000000..480d926fbba --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_set_charset.result @@ -0,0 +1,48 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +create database mysqltest1 /*!40100 character set latin2 */; +use mysqltest1; +drop table if exists t1; +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 ---"; +--- on master --- +--- on master --- +select hex(a),b from t1 order by b; +hex(a) b +A9A6ABAEAC 80 +B9B6BBBEBC 90 +A3A1AAAF A0 +B3B1BAA5B5BF B0 +C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 +D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 +E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 +use mysqltest1; +select "--- on slave ---"; +--- on slave --- +--- on slave --- +select hex(a),b from t1 order by b; +hex(a) b +A9A6ABAEAC 80 +B9B6BBBEBC 90 +A3A1AAAF A0 +B3B1BAA5B5BF B0 +C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 +D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 +E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 +drop database mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_sf.result b/mysql-test/suite/rpl/r/rpl_sf.result new file mode 100644 index 00000000000..46defc6908a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sf.result @@ -0,0 +1,23 @@ +set global log_bin_trust_function_creators=0; +set binlog_format=STATEMENT; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +set global log_bin_trust_function_creators=1; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +set global log_bin_trust_function_creators=0; +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events +drop function fn16456; diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result new file mode 100644 index 00000000000..248ce5b52c3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -0,0 +1,16 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (n int not null primary key); +insert into t1 values (1); +insert into t1 values (1); +insert into t1 values (2),(3); +select * from t1 ORDER BY n; +n +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result new file mode 100644 index 00000000000..29ec7b77b45 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -0,0 +1,58 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +stop slave; +change master to master_user='rpl',master_password='rpl'; +start slave; +drop table if exists t1; +create table t1 (n int); +insert into t1 values (1); +select * from t1; +n +1 +delete from mysql.user where user='rpl'; +flush privileges; +stop slave; +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User rpl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master NULL +Master_SSL_Verify_Server_Cert No +drop table t1; +delete from mysql.user where user='rpl'; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result new file mode 100644 index 00000000000..208c46c5fab --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -0,0 +1,536 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +create table t1 (a varchar(100)); +use mysqltest1; +create procedure foo() +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end| +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end root@localhost # # +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end root@localhost # # +set timestamp=1000000000; +call foo(); +select * from t1; +a +8 +1000000000 +select * from t1; +a +8 +1000000000 +delete from t1; +create procedure foo2() +select * from mysqltest1.t1; +call foo2(); +a +alter procedure foo2 contains sql; +drop table t1; +create table t1 (a int); +create table t2 like t1; +create procedure foo3() +deterministic +insert into t1 values (15); +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; +SELECT 1; +1 +1 +create procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end| +call foo4(); +Got one of the listed errors +call foo3(); +show warnings; +Level Code Message +call foo4(); +Got one of the listed errors +alter procedure foo4 sql security invoker; +call foo4(); +show warnings; +Level Code Message +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +delete from t2; +alter table t2 add unique (a); +drop procedure foo4; +create procedure foo4() +deterministic +begin +insert into t2 values(20),(20); +end| +call foo4(); +ERROR 23000: Duplicate entry '20' for key 'a' +show warnings; +Level Code Message +Error 1062 Duplicate entry '20' for key 'a' +select * from t2; +a +20 +select * from t2; +a +20 +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES DEFINER begin +insert into t2 values(20),(20); +end root@localhost # # +drop procedure foo4; +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +drop procedure foo; +drop procedure foo2; +drop procedure foo3; +create function fn1(x int) +returns int +begin +insert into t1 values (x); +return x+2; +end| +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +create function fn1(x int) +returns int +deterministic +begin +insert into t1 values (x); +return x+2; +end| +delete t1,t2 from t1,t2; +select fn1(20); +fn1(20) +22 +insert into t2 values(fn1(21)); +select * from t1; +a +21 +20 +select * from t2; +a +23 +select * from t1; +a +21 +20 +select * from t2; +a +23 +drop function fn1; +create function fn1() +returns int +no sql +begin +return unix_timestamp(); +end| +alter function fn1 contains sql; +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +delete from t1; +set timestamp=1000000000; +insert into t1 values(fn1()); +create function fn2() +returns int +no sql +begin +return unix_timestamp(); +end| +ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +set global log_bin_trust_routine_creators=1; +Warnings: +Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead +set global log_bin_trust_function_creators=0; +set global log_bin_trust_function_creators=1; +set global log_bin_trust_function_creators=1; +create function fn2() +returns int +no sql +begin +return unix_timestamp(); +end| +create function fn3() +returns int +not deterministic +reads sql data +begin +return 0; +end| +select fn3(); +fn3() +0 +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end root@localhost # # +mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end zedjzlcsjhd@localhost # # +mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin +return 0; +end root@localhost # # +select * from t1; +a +1000000000 +use mysqltest1; +select * from t1; +a +1000000000 +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end root@localhost # # +mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end zedjzlcsjhd@localhost # # +mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin +return 0; +end root@localhost # # +delete from t2; +alter table t2 add unique (a); +drop function fn1; +create function fn1(x int) +returns int +begin +insert into t2 values(x),(x); +return 10; +end| +do fn1(100); +Warnings: +Error 1062 Duplicate entry '100' for key 'a' +select fn1(20); +ERROR 23000: Duplicate entry '20' for key 'a' +select * from t2; +a +20 +100 +select * from t2; +a +20 +100 +create trigger trg before insert on t1 for each row set new.a= 10; +ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' +delete from t1; +create trigger trg before insert on t1 for each row set new.a= 10; +insert into t1 values (1); +select * from t1; +a +10 +select * from t1; +a +10 +delete from t1; +drop trigger trg; +insert into t1 values (1); +select * from t1; +a +1 +select * from t1; +a +1 +create procedure foo() +not deterministic +reads sql data +select * from t1; +call foo(); +a +1 +drop procedure foo; +drop function fn1; +drop database mysqltest1; +drop user "zedjzlcsjhd"@127.0.0.1; +use test; +use test; +drop function if exists f1; +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| +create view v1 as select 1 as a; +create table t1 (a int); +insert into t1 (a) values (f1()); +select * from t1; +a +1 +drop view v1; +drop function f1; +select * from t1; +a +1 +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(col VARCHAR(10)); +CREATE PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg); +CALL p1('test'); +SELECT * FROM t1; +col +test +SELECT * FROM t1; +col +test +DROP PROCEDURE p1; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating procedure... +/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; +/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; + +---> Checking on master... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> connection: master + +---> Cleaning up... +DROP PROCEDURE p1; +DROP FUNCTION f1; +drop table t1; +drop database if exists mysqltest; +drop database if exists mysqltest2; +create database mysqltest; +create database mysqltest2; +use mysqltest2; +create table t ( t integer ); +create procedure mysqltest.test() begin end; +insert into t values ( 1 ); +create procedure `\\`.test() begin end; +ERROR 42000: Unknown database '\\' +create function f1 () returns int +begin +insert into t values (1); +return 0; +end| +use mysqltest; +set @a:= mysqltest2.f1(); +show binlog events in 'master-bin.000001' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # drop database if exists mysqltest1 +master-bin.000001 # Query 1 # create database mysqltest1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a varchar(100)) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp()) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() +select * from mysqltest1.t1 +master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo2 contains sql +master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int) +master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo3() +deterministic +insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo4 sql security invoker +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (5) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 +master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4() +deterministic +begin +insert into t2 values(20),(20); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(20),(20) +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo2 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo3 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) +returns int +deterministic +begin +insert into t1 values (x); +return x+2; +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2 +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21)) +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1() +returns int +no sql +begin +return unix_timestamp(); +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(fn1()) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` function fn2() +returns int +no sql +begin +return unix_timestamp(); +end +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn3() +returns int +not deterministic +reads sql data +begin +return 0; +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 +master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) +returns int +begin +insert into t2 values(x),(x); +return 10; +end +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100) +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +not deterministic +reads sql data +select * from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # drop database mysqltest1 +master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` 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 +master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1()) +master-bin.000001 # Query 1 # use `test`; drop view v1 +master-bin.000001 # Query 1 # use `test`; drop function f1 +master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10)) +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg) +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test')) +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0 +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1 +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # drop database if exists mysqltest +master-bin.000001 # Query 1 # drop database if exists mysqltest2 +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Query 1 # create database mysqltest2 +master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int +begin +insert into t values (1); +return 0; +end +master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() +set global log_bin_trust_function_creators=0; +set global log_bin_trust_function_creators=0; +drop database mysqltest; +drop database mysqltest2; +End of 5.0 tests +End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_sp004.result b/mysql-test/suite/rpl/r/rpl_sp004.result new file mode 100644 index 00000000000..1c0ed3cc50a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp004.result @@ -0,0 +1,93 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +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| +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +CALL test.p2(); +USE test; +SHOW TABLES; +Tables_in_test +t3 +USE test; +SHOW TABLES; +Tables_in_test +t3 +CALL test.p1(); +Warnings: +Note 1050 Table 't3' already exists +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +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; diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result new file mode 100644 index 00000000000..c2c44b06972 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -0,0 +1,238 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +create table t1 (a int); +SET GLOBAL log_bin_trust_function_creators = 1; +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// +call p1(); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +create procedure p2() +begin +declare a int default 4; +create table t2 as select a; +end// +call p2(); +SELECT * FROM t2 ORDER BY a; +a +4 +SELECT * FROM t2 ORDER BY a; +a +4 +drop procedure p1; +drop procedure p2; +drop table t2; +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// +call p1(f1(1), f1(2)); +yes +yes +SELECT * FROM t1 ORDER BY a; +a +1 +1 +2 +2 +3 +4 +5 +5 +6 +7 +8 +create table t2(a int); +insert into t2 values (10),(11); +SELECT a,f1(a) FROM t2 ORDER BY a; +a f1(a) +10 11 +11 12 +insert into t2 select f1(3); +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 1 +master: 1 +master: 2 +master: 2 +master: 3 +master: 3 +master: 4 +master: 5 +master: 5 +master: 6 +master: 7 +master: 8 +master: 10 +master: 11 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 1 +slave: 1 +slave: 2 +slave: 2 +slave: 3 +slave: 3 +slave: 4 +slave: 5 +slave: 5 +slave: 6 +slave: 7 +slave: 8 +slave: 10 +slave: 11 +drop procedure p1; +delete from t1; +delete from t2; +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; +f +2 +3 +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 1 +master: 2 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 1 +slave: 2 +drop view v1; +delete from t1; +prepare s1 from 'select f1(?)'; +set @xx=123; +execute s1 using @xx; +f1(?) +124 +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 123 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 123 +delete from t1; +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// +call p1(15); +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 6 +master: 6 +master: 15 +master: 15 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 6 +slave: 6 +slave: 15 +slave: 15 +drop procedure p1; +drop function f1; +drop table t1,t2; +create table t1 (a int); +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// +set @x=10; +set @y=20; +set @z=100; +select f1(); +f1() +0 +set @x=30; +call p1(); +SELECT 'master', a FROM t1 ORDER BY a; +master a +master 10 +master 11 +master 20 +master 30 +master 31 +master 100 +master 101 +master 101 +master 102 +SELECT 'slave', a FROM t1 ORDER BY a; +slave a +slave 10 +slave 11 +slave 20 +slave 30 +slave 31 +slave 100 +slave 101 +slave 101 +slave 102 +drop table t1; +drop function f1; +drop function f2; +drop procedure p1; +SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/suite/rpl/r/rpl_sporadic_master.result b/mysql-test/suite/rpl/r/rpl_sporadic_master.result new file mode 100644 index 00000000000..14fb673a081 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sporadic_master.result @@ -0,0 +1,26 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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; +insert into t1 values (4),(NULL); +stop slave; +start slave; +insert into t1 values (NULL),(NULL); +flush logs; +truncate table t1; +insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); +select * from t1 ORDER BY n; +n +10 +11 +12 +13 +14 +15 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result new file mode 100644 index 00000000000..64d52d63f78 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -0,0 +1,99 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int auto_increment, KEY(t)); +stop slave; +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; +insert into t1 values(1); +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +STOP SLAVE; +select * from t1; +t +1 +insert into t1 values (NULL); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop user replssl@localhost; +drop table t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result new file mode 100644 index 00000000000..6bc4b53849f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -0,0 +1,146 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int); +stop slave; +change master to master_user='replssl',master_password=''; +start slave; +insert into t1 values (1); +select * from t1; +t +stop slave; +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; +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to master_user='root',master_password='', master_ssl=0; +start slave; +drop user replssl@localhost; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +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; +create table t1 (t int); +insert into t1 values (1); +on slave +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host localhost +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert Yes +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result new file mode 100644 index 00000000000..1fcb586d1fb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result @@ -0,0 +1,12 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +create table t1(n int); +start slave; +stop slave io_thread; +start slave io_thread; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result new file mode 100644 index 00000000000..3b4cd05f640 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -0,0 +1,82 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (word char(20) not null); +load data infile '../std_data_ln/words.dat' into table t1; +load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1; +select * from t1 limit 10; +word +Aarhus +Aaron +Ababa +aback +abaft +abandon +abandoned +abandoning +abandonment +abandons +stop slave; +set password for root@"localhost" = password('foo'); +start slave; +set password for root@"localhost" = password(''); +create table t3(n int); +insert into t3 values(1),(2); +select * from t3; +n +1 +2 +select sum(length(word)) from t1; +sum(length(word)) +1022 +drop table t1,t3; +create table t1 (n int) engine=myisam; +reset master; +stop slave; +reset slave; +lock tables t1 read; +start slave; +unlock tables; +create table t2(id int); +insert into t2 values(connection_id()); +create temporary table t3(n int); +insert into t3 select get_lock('crash_lock%20C', 1) from t2; +update t1 set n = n + get_lock('crash_lock%20C', 2); +select (@id := id) - id from t2; +(@id := id) - id +0 +kill @id; +drop table t2; +Got one of the listed errors +set global sql_slave_skip_counter=1; +start slave; +select count(*) from t1; +count(*) +5000 +drop table t1; +create table t1 (n int); +insert into t1 values(3456); +insert into mysql.user (Host, User, Password) +VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +N blafasel2 +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +Y blafasel2 +select n from t1; +n +3456 +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +Y blafasel2 +drop table t1; +delete from mysql.user where user="blafasel2"; diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result new file mode 100644 index 00000000000..13aa45d8ced --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -0,0 +1,13 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int, unique(a)) engine=myisam; +set sql_log_bin=0; +insert into t1 values(2); +set sql_log_bin=1; +insert into t1 values(1),(2); +ERROR 23000: Duplicate entry '2' for key 'a' +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_charset.result b/mysql-test/suite/rpl/r/rpl_stm_charset.result new file mode 100644 index 00000000000..fd9c40843d5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_charset.result @@ -0,0 +1,270 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set timestamp=1000000000; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; +set @@character_set_server=latin5; +create database mysqltest3; + +--- --master-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ + +--- --slave-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ +set @@collation_server=armscii8_bin; +drop database mysqltest3; +create database mysqltest3; + +--- --master-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ + +--- --slave-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; +create table t1 (a int auto_increment primary key, b varchar(100)); +set character_set_client=cp850, collation_connection=latin2_croatian_ci; +insert into t1 (b) values(@@character_set_server); +insert into t1 (b) values(@@collation_server); +insert into t1 (b) values(@@character_set_client); +insert into t1 (b) values(@@character_set_connection); +insert into t1 (b) values(@@collation_connection); + +--- --master-- +select * from t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci +set character_set_client=latin1, collation_connection=latin1_german1_ci; +truncate table t1; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); +set collation_connection=latin1_german2_ci; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); + +--- --master-- +select * from t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller +set @a= _cp850 'Müller' collate cp850_general_ci; +truncate table t1; +insert into t1 (b) values(collation(@a)); + +--- --master-- +select * from t1 order by a; +a b +1 cp850_general_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 cp850_general_ci +drop database mysqltest2; +drop database mysqltest3; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # drop database if exists mysqltest3 +master-bin.000001 # Query # # create database mysqltest2 character set latin2 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # drop database mysqltest3 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) +master-bin.000001 # Intvar # # INSERT_ID=2 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_server) +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar # # INSERT_ID=2 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # User var # # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(collation(@a)) +master-bin.000001 # Query # # drop database mysqltest2 +master-bin.000001 # Query # # drop database mysqltest3 +set global character_set_server=latin2; +set global character_set_server=latin1; +set global character_set_server=latin2; +set global character_set_server=latin1; +set one_shot @@character_set_server=latin5; +set @@max_join_size=1000; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin1 +set @@character_set_server=latin5; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin5 +set one_shot max_join_size=10; +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server +set character_set_client=9999999; +ERROR 42000: Unknown character set: '9999999' +set collation_server=9999998; +ERROR HY000: Unknown collation: '9999998' +use test; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET CHARACTER_SET_CLIENT=koi8r, +CHARACTER_SET_CONNECTION=cp1251, +CHARACTER_SET_RESULTS=koi8r; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +flush logs; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +drop database if exists mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database if exists mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest2 character set latin2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +create database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/; +drop database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest3/*!*/; +use mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t1 (a int auto_increment primary key, b varchar(100))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C cp850 *//*!*/; +SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@character_set_server)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_server)/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_client)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_connection)/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(collation(@a))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest3/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C koi8r *//*!*/; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +drop table t1; +create table `t1` ( +`pk` varchar(10) not null default '', +primary key (`pk`) +) engine=myisam default charset=latin1; +set @p=_latin1 'test'; +update t1 set pk='test' where pk=@p; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result new file mode 100644 index 00000000000..1c6b5615b6e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -0,0 +1,33 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int); +insert into t1 values (10); +create table t2 (a int); +create table t3 (a int) engine=merge union(t1); +create table t4 (a int); +insert into t4 select * from t3; +rename table t1 to t5, t2 to t1; +flush no_write_to_binlog tables; +SHOW BINLOG EVENTS FROM 656 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +select * from t3; +a +flush tables; +SHOW BINLOG EVENTS FROM 656 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables +select * from t3; +a +stop slave; +drop table t1; +flush tables with read lock; +start slave; +stop slave; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +drop table t3, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result new file mode 100644 index 00000000000..1c003856eb9 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -0,0 +1,88 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set @old_global_binlog_format = @@global.binlog_format; +set @@global.binlog_format = statement; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +STATEMENT +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +ERROR 23000: Duplicate entry '10' for key 'PRIMARY' +flush table t1; +select * from t1; +id name +10 my name +select * from t1; +id name +10 my name +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +ERROR 23000: Duplicate entry '10' for key 'PRIMARY' +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = mixed; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +MIXED +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 James Bond +select * from t1; +id name +10 my name +20 James Bond +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result new file mode 100644 index 00000000000..3ee2d990159 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -0,0 +1,115 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar 1 # INSERT_ID=1 +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +flush logs; +create table t3 (a int)ENGINE=MyISAM; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=MyISAM; +insert into t2 values (1); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; insert into t2 values (1) +show binary logs; +Log_name File_size +master-bin.000001 1347 +master-bin.000002 392 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1447 +slave-bin.000002 293 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +slave-bin.000001 # Intvar 1 # INSERT_ID=1 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 +slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Intvar # # LAST_INSERT_ID=1 +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result new file mode 100644 index 00000000000..c2e57be6ad4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -0,0 +1,279 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +# +# Generate a big enough master's binlog to cause relay log rotations +# +create table t1 (a int); +drop table t1; +reset slave; +# +# Test 1 +# +set @my_max_binlog_size= @@global.max_binlog_size; +set global max_binlog_size=8192; +set global max_relay_log_size=8192-1; +select @@global.max_relay_log_size; +@@global.max_relay_log_size +4096 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 2 +# +stop slave; +reset slave; +set global max_relay_log_size=(5*4096); +select @@global.max_relay_log_size; +@@global.max_relay_log_size 20480 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 3: max_relay_log_size = 0 +# +stop slave; +reset slave; +set global max_relay_log_size=0; +select @@global.max_relay_log_size; +@@global.max_relay_log_size 0 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions +# +stop slave; +reset slave; +flush logs; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File +Read_Master_Log_Pos 4 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 0 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 5 +# +reset slave; +start slave; +flush logs; +create table t1 (a int); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 73046 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 73046 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated +# +flush logs; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 73122 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 73122 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +flush logs; +show master status; +File master-bin.000002 +Position 106 +Binlog_Do_DB <Binlog_Ignore_DB> +Binlog_Ignore_DB +set global max_binlog_size= @my_max_binlog_size; +# +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result new file mode 100644 index 00000000000..625c686f383 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result @@ -0,0 +1,32 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +insert into mysqltest.t1 values(1)/ +insert into mysqltest.t1 values(2); +insert into mysqltest.t1 values(3); +insert into mysqltest.t1 values(4); +insert into mysqltest.t1 values(5)/ +select * from mysqltest.t1; +n +1 +2 +3 +4 +5 +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest +master-bin.000001 # Query # # create database mysqltest +master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(2) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_stm_mystery22.result b/mysql-test/suite/rpl/r/rpl_stm_mystery22.result new file mode 100644 index 00000000000..ea34b308ec2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_mystery22.result @@ -0,0 +1,31 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1(n int auto_increment primary key, s char(10)); +insert into t1 values (2,'old'); +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +select * from t1 order by n; +n s +1 new +2 old +delete from t1 where n = 2; +start slave; +stop slave; +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +start slave; +select * from t1 order by n; +n s +1 new +2 new +3 new +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result new file mode 100644 index 00000000000..5a253d61fcb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result @@ -0,0 +1,52 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create database mysqltest; +drop database if exists mysqltest; +Warnings: +Note 1008 Can't drop database 'mysqltest'; database doesn't exist +show tables from mysqltest; +ERROR 42000: Unknown database 'mysqltest' +create table t1 (a int); +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +create table t1 (a int, b int); +insert into t1 values(1,1); +delete from t1; +select * from t1; +a b +insert into t1 values(1,1); +insert into t1 values(2,1); +update t1 set a=2; +select * from t1; +a b +2 1 +2 1 +create table t2 (a int, b int); +delete from t1; +insert into t1 values(1,1); +insert into t2 values(1,1); +update t1 set a=2; +UPDATE t1, t2 SET t1.a = t2.a; +select * from t1; +a b +1 1 +select * from t2; +a b +1 1 +delete from t1; +delete from t2; +insert into t1 values(1,1); +insert into t2 values(1,1); +DELETE t1.*, t2.* from t1, t2; +select * from t1; +a b +select * from t2; +a b +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result new file mode 100644 index 00000000000..e134629d597 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -0,0 +1,32 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +change master to master_user='test'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +reset slave; +start slave; +create temporary table t1 (a int); +stop slave; +reset slave; +start slave; +show status like 'slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result new file mode 100644 index 00000000000..ffe6216a42b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -0,0 +1,190 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +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; +start slave until master_log_file='master-bin.000001', master_log_pos=323; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 327 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 323 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 327 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-no-such-bin.000001 +Until_Log_Pos 291 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; +select * from t2; +n +1 +2 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 616 +Relay_Log_Space # +Until_Condition Relay +Until_Log_File slave-relay-bin.000004 +Until_Log_Pos 746 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +start slave until master_log_file='master-bin.000001', master_log_pos=776; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 784 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 776 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-bin', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=776; +Warnings: +Note 1254 Slave is already running diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result new file mode 100644 index 00000000000..7c796bd5449 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -0,0 +1,1017 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +set @my_binlog_format= @@global.binlog_format; +set session binlog_format=mixed; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set session binlog_format=statement; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +set session binlog_format=row; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +set global binlog_format=DEFAULT; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set global binlog_format=MIXED; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set global binlog_format=STATEMENT; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +set global binlog_format=ROW; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +show session variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +ROW ROW +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_"; +create temporary table tmp(a char(100)); +insert into tmp values("see_6_"); +set binlog_format=statement; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +insert into t1 select * from tmp; +drop temporary table tmp; +set binlog_format=statement; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +ROW STATEMENT +set global binlog_format=statement; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +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_"; +set binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +set global binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +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_"; +set global binlog_format=mixed; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +MIXED STATEMENT +set binlog_format=default; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +MIXED MIXED +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_"; +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); +insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +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| +call foo(); +call foo2(); +call foo4("hello"); +call foo4(UUID()); +call foo4("world"); +select foo3(); +ERROR HY000: Cannot change the binary logging format inside a stored function or trigger +select * from t1 where a="alarm"; +a +drop function foo3; +create function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end| +insert into t2 select foo3(); +prepare stmt1 from 'insert into t2 select foo3()'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; +create function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end| +select foo4(); +foo4() +100 +prepare stmt1 from 'select foo4()'; +execute stmt1; +foo4() +100 +execute stmt1; +foo4() +100 +deallocate prepare stmt1; +create function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end| +select foo5(); +foo5() +100 +prepare stmt1 from 'select foo5()'; +execute stmt1; +foo5() +100 +execute stmt1; +foo5() +100 +deallocate prepare stmt1; +create function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end| +select foo6("foo6_1_"); +foo6("foo6_1_") +100 +select foo6(concat("foo6_2_",UUID())); +foo6(concat("foo6_2_",UUID())) +100 +prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; +execute stmt1; +foo6(concat("foo6_3_",UUID())) +100 +execute stmt1; +foo6(concat("foo6_3_",UUID())) +100 +deallocate prepare stmt1; +create view v1 as select uuid(); +create table t11 (data varchar(255)); +insert into t11 select * from v1; +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; +create trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end| +insert into t11 values("try_560_"); +insert delayed into t2 values("delay_1_"); +insert delayed into t2 values(concat("delay_2_",UUID())); +insert delayed into t2 values("delay_6_"); +insert delayed into t2 values(rand()); +set @a=2.345; +insert delayed into t2 values(@a); +create table t20 select * from t1; +create table t21 select * from t2; +create table t22 select * from t3; +drop table t1,t2,t3; +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)); +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| +select f("try_41_"); +f("try_41_") +1 +use mysqltest1; +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; +select f("try_42_"); +f("try_42_") +1 +insert into t2 values(3,null),(4,null); +delete from t2 where a>=3; +prepare stmt1 from 'select f(?)'; +set @string="try_43_"; +insert into t1 values(null,"try_44_"); +execute stmt1 using @string; +f(?) +1 +deallocate prepare stmt1; +create table t12 select * from t1; +drop table t1; +create table t1 (a int, b varchar(100), key(a)); +select f("try_45_"); +f("try_45_") +1 +create table t13 select * from t1; +drop table t1; +create table t1 (a int primary key auto_increment, b varchar(100)); +drop function f; +create table t14 (unique (a)) select * from t2; +truncate table t2; +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| +select f1("try_46_"),f2("try_47_"); +f1("try_46_") f2("try_47_") +1 1 +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; +select f1("try_48_"),f2("try_49_"); +f1("try_48_") f2("try_49_") +1 1 +insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); +drop function f2; +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| +select f1("try_53_"),f2("try_54_"); +f1("try_53_") f2("try_54_") +1 3 +drop function f2; +create trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end| +insert into t1 values(null,"try_56_"); +alter table t1 modify a int, drop primary key; +insert into t1 values(null,"try_57_"); +CREATE TEMPORARY TABLE t15 SELECT UUID(); +create table t16 like t15; +INSERT INTO t16 SELECT * FROM t15; +insert into t16 values("try_65_"); +drop table t15; +insert into t16 values("try_66_"); +select count(*) from t1; +count(*) +7 +select count(*) from t2; +count(*) +5 +select count(*) from t3; +count(*) +1 +select count(*) from t4; +count(*) +29 +select count(*) from t5; +count(*) +58 +select count(*) from t11; +count(*) +8 +select count(*) from t20; +count(*) +66 +select count(*) from t21; +count(*) +19 +select count(*) from t22; +count(*) +2 +select count(*) from t12; +count(*) +4 +select count(*) from t13; +count(*) +1 +select count(*) from t14; +count(*) +4 +select count(*) from t16; +count(*) +3 +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; +SELECT * FROM t11; +song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict +song Careful With That Axe, Eugene +USE mysqltest1; +SELECT * FROM t11; +song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict +song Careful With That Axe, Eugene +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; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest1 +master-bin.000001 # Query # # create database mysqltest1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( + `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( + `1` varbinary(36) NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( + `a` varchar(100) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` 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 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +set session binlog_format=row; # rejected for stored funcs +insert into t1 values("alarm"); +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() +master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') +master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; drop function f +master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +return 1; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` 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 +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( + `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest1 +master-bin.000001 # Query # # create database mysqltest1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( + `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( + `1` varbinary(36) NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( + `a` varchar(100) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` 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 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +set session binlog_format=row; # rejected for stored funcs +insert into t1 values("alarm"); +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() +master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') +master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; drop function f +master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +return 1; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` 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 +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( + `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +drop database mysqltest1; +set global binlog_format =@my_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result new file mode 100644 index 00000000000..e4ca31d8908 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_temp_table.result @@ -0,0 +1,48 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +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); +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1; +insert into t2 values(61); +select * from t2; +n +1 +2 +3 +4 +5 +25 +26 +61 +100 +200 +300 +1010 +1012 +select count(*) from t2; +count(*) +13 +select sum(n) from t2; +sum(n) +2749 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 't1' diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result new file mode 100644 index 00000000000..7e7d0cebe1d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -0,0 +1,106 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +reset master; +SET @save_select_limit=@@session.sql_select_limit; +SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +SELECT @@session.sql_select_limit = @save_select_limit; +@@session.sql_select_limit = @save_select_limit +1 +SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +SELECT @@session.sql_select_limit = @save_select_limit; +@@session.sql_select_limit = @save_select_limit +1 +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; +drop table if exists t1,t2; +create table t1(f int); +create table t2(f int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +create temporary table t3(f int); +insert into t3 select * from t1 where f<6; +create temporary table t3(f int); +insert into t2 select count(*) from t3; +insert into t3 select * from t1 where f>=4; +drop temporary table t3; +insert into t2 select count(*) from t3; +drop temporary table t3; +select * from t2 ORDER BY f; +f +5 +7 +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; +f +5 +7 +drop table t1,t2; +create temporary table t3 (f int); +create temporary table t4 (f int); +create table t5 (f int); +select id from information_schema.processlist where command='Binlog Dump' into @id; +kill @id; +insert into t5 select * from t4; +select * from t5 /* must be 1 after reconnection */; +f +drop temporary table t4; +drop table t5; +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); +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); +create table t1(f int); +insert into t1 values (1); +select * from t1 /* must be 1 */; +f +1 +drop table t1; +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result new file mode 100644 index 00000000000..47ef16b9d49 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -0,0 +1,107 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set @my_time_zone= @@global.time_zone; +set timestamp=100000000; +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)); +select @@time_zone; +@@time_zone +Japan +select @@time_zone; +@@time_zone +Europe/Moscow +insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +t n +2005-01-01 00:00:00 1 +2005-06-11 09:39:02 2 +2004-01-01 00:00:00 3 +2004-06-11 09:39:02 4 +SELECT * FROM t1 ORDER BY n; +t n +2005-01-01 06:00:00 1 +2005-06-11 14:39:02 2 +2004-01-01 06:00:00 3 +2004-06-11 14:39:02 4 +delete from t1; +set time_zone='Europe/Moscow'; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +t n +2004-01-01 00:00:00 5 +2004-06-11 09:39:02 6 +set time_zone='Europe/Moscow'; +SELECT * FROM t1 ORDER BY n; +t n +2004-01-01 00:00:00 5 +2004-06-11 09:39:02 6 +delete from t1; +set time_zone='UTC'; +load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; +Warnings: +Warning 1265 Data truncated for column 't' at row 1 +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1265 Data truncated for column 't' at row 2 +Warning 1261 Row 2 doesn't contain data for all columns +SELECT * FROM t1 ORDER BY n; +t n +0000-00-00 00:00:00 7 +0000-00-00 00:00:00 8 +set time_zone='UTC'; +SELECT * FROM t1 ORDER BY n; +t n +0000-00-00 00:00:00 7 +0000-00-00 00:00:00 8 +set time_zone='Europe/Moscow'; +set time_zone='Europe/Moscow'; +delete from t1; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +set time_zone='MET'; +insert into t2 (select * from t1); +SELECT * FROM t1 ORDER BY n; +t n +2003-12-31 22:00:00 9 +2004-06-11 07:39:02 10 +SELECT * FROM t2 ORDER BY n; +t n +2003-12-31 22:00:00 9 +2004-06-11 07:39:02 10 +delete from t2; +set timestamp=1000072000; +insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); +SELECT * FROM t2 ORDER BY n; +t n +2001-09-09 23:46:40 11 +2001-09-09 12 +23:46:40 13 +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; +t n +2001-09-09 03:46:40 14 +1000000000 15 +SELECT * FROM t2 ORDER BY n; +t n +2001-09-09 03:46:40 14 +1000000000 15 +set global time_zone='MET'; +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; +t n +2003-12-31 23:00:00 16 +2005-01-01 08:00:00 17 +SELECT * FROM t2 ORDER BY n; +t n +2003-12-31 23:00:00 16 +2005-01-01 08:00:00 17 +drop table t1, t2; +set global time_zone= @my_time_zone; diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result new file mode 100644 index 00000000000..815a87eede5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -0,0 +1,973 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +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); +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| +insert into t3 values(100,"log",0,0,0); +SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; +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; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 + +--- On slave -- +select a,b, truncate(rand_value,4) from t1; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 +drop table t1,t2,t3; +select get_lock("bug12480",2); +get_lock("bug12480",2) +1 +create table t1 (a datetime,b datetime, c datetime); +drop function if exists bug12480; +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 +| +insert into t1 set a = now(); +select a=b && a=c from t1; +a=b && a=c +1 +SELECT routine_name, definer +FROM information_schema.routines; +routine_name definer +bug12480 root@localhost +SELECT trigger_name, definer +FROM information_schema.triggers; +trigger_name definer +t1_first root@localhost + +--- On slave -- +SELECT routine_name, definer +FROM information_schema.routines; +routine_name definer +bug12480 root@localhost +SELECT trigger_name, definer +FROM information_schema.triggers; +trigger_name definer +t1_first root@localhost +select a=b && a=c from t1; +a=b && a=c +1 +test +1 +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; +a=b && a=c +1 +1 +1 +drop function bug12480; +drop table t1; +create table t1 (i int); +create table t2 (i int); +create trigger tr1 before insert on t1 for each row +begin +insert into t2 values (1); +end| +create database other; +use other; +insert into test.t1 values (1); +use test; +drop table t1,t2; +drop database other; +test case for BUG#13227 +------------------- +10 +------------------- +drop table if exists t110; +drop table if exists t210,t310; +create table t110 (f1 int) /* 2 replicate */; +insert into t110 values (-5); +insert into t110 values (-4); +insert into t110 values (-3); +insert into t110 values (-2); +insert into t110 values (-1); +select * from t110; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg110 before update on t110 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t210 where f1=NEW.f1; +INSERT INTO t310 values (r); +end| +create table t210 (f1 int, f2 int) /* slave local */; +create table t310 (f3 int) /* slave local */; +insert into t210 values (5, 5*100); +insert into t210 values (4, 4*100); +insert into t210 values (3, 3*100); +insert into t210 values (2, 2*100); +insert into t210 values (1, 1*100); +select * from t210; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t110 SET f1=5 where f1=-5; +SELECT * from t110 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t310 /* must be f3 5*100 */; +f3 +500 +UPDATE t110 SET f1=5 where f1=-5; +UPDATE t110 SET f1=4 where f1=-4; +UPDATE t110 SET f1=3 where f1=-3; +UPDATE t110 SET f1=2 where f1=-2; +UPDATE t110 SET f1=1 where f1=-1; +SELECT * from t110 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t310 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg110; +drop table t210,t310; +drop table t110; +------------------- +9 +------------------- +drop table if exists t19; +drop table if exists t29,t39; +create table t19 (f1 int) /* 2 replicate */; +insert into t19 values (-5); +insert into t19 values (-4); +insert into t19 values (-3); +insert into t19 values (-2); +insert into t19 values (-1); +select * from t19; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg19 before update on t19 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t29 where f1=NEW.f1; +INSERT INTO t39 values (r); +end| +create table t29 (f1 int, f2 int) /* slave local */; +create table t39 (f3 int) /* slave local */; +insert into t29 values (5, 5*100); +insert into t29 values (4, 4*100); +insert into t29 values (3, 3*100); +insert into t29 values (2, 2*100); +insert into t29 values (1, 1*100); +select * from t29; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t19 SET f1=5 where f1=-5; +SELECT * from t19 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t39 /* must be f3 5*100 */; +f3 +500 +UPDATE t19 SET f1=5 where f1=-5; +UPDATE t19 SET f1=4 where f1=-4; +UPDATE t19 SET f1=3 where f1=-3; +UPDATE t19 SET f1=2 where f1=-2; +UPDATE t19 SET f1=1 where f1=-1; +SELECT * from t19 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t39 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg19; +drop table t29,t39; +drop table t19; +------------------- +8 +------------------- +drop table if exists t18; +drop table if exists t28,t38; +create table t18 (f1 int) /* 2 replicate */; +insert into t18 values (-5); +insert into t18 values (-4); +insert into t18 values (-3); +insert into t18 values (-2); +insert into t18 values (-1); +select * from t18; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg18 before update on t18 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t28 where f1=NEW.f1; +INSERT INTO t38 values (r); +end| +create table t28 (f1 int, f2 int) /* slave local */; +create table t38 (f3 int) /* slave local */; +insert into t28 values (5, 5*100); +insert into t28 values (4, 4*100); +insert into t28 values (3, 3*100); +insert into t28 values (2, 2*100); +insert into t28 values (1, 1*100); +select * from t28; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t18 SET f1=5 where f1=-5; +SELECT * from t18 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t38 /* must be f3 5*100 */; +f3 +500 +UPDATE t18 SET f1=5 where f1=-5; +UPDATE t18 SET f1=4 where f1=-4; +UPDATE t18 SET f1=3 where f1=-3; +UPDATE t18 SET f1=2 where f1=-2; +UPDATE t18 SET f1=1 where f1=-1; +SELECT * from t18 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t38 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg18; +drop table t28,t38; +drop table t18; +------------------- +7 +------------------- +drop table if exists t17; +drop table if exists t27,t37; +create table t17 (f1 int) /* 2 replicate */; +insert into t17 values (-5); +insert into t17 values (-4); +insert into t17 values (-3); +insert into t17 values (-2); +insert into t17 values (-1); +select * from t17; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg17 before update on t17 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t27 where f1=NEW.f1; +INSERT INTO t37 values (r); +end| +create table t27 (f1 int, f2 int) /* slave local */; +create table t37 (f3 int) /* slave local */; +insert into t27 values (5, 5*100); +insert into t27 values (4, 4*100); +insert into t27 values (3, 3*100); +insert into t27 values (2, 2*100); +insert into t27 values (1, 1*100); +select * from t27; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t17 SET f1=5 where f1=-5; +SELECT * from t17 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t37 /* must be f3 5*100 */; +f3 +500 +UPDATE t17 SET f1=5 where f1=-5; +UPDATE t17 SET f1=4 where f1=-4; +UPDATE t17 SET f1=3 where f1=-3; +UPDATE t17 SET f1=2 where f1=-2; +UPDATE t17 SET f1=1 where f1=-1; +SELECT * from t17 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t37 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg17; +drop table t27,t37; +drop table t17; +------------------- +6 +------------------- +drop table if exists t16; +drop table if exists t26,t36; +create table t16 (f1 int) /* 2 replicate */; +insert into t16 values (-5); +insert into t16 values (-4); +insert into t16 values (-3); +insert into t16 values (-2); +insert into t16 values (-1); +select * from t16; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg16 before update on t16 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t26 where f1=NEW.f1; +INSERT INTO t36 values (r); +end| +create table t26 (f1 int, f2 int) /* slave local */; +create table t36 (f3 int) /* slave local */; +insert into t26 values (5, 5*100); +insert into t26 values (4, 4*100); +insert into t26 values (3, 3*100); +insert into t26 values (2, 2*100); +insert into t26 values (1, 1*100); +select * from t26; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t16 SET f1=5 where f1=-5; +SELECT * from t16 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t36 /* must be f3 5*100 */; +f3 +500 +UPDATE t16 SET f1=5 where f1=-5; +UPDATE t16 SET f1=4 where f1=-4; +UPDATE t16 SET f1=3 where f1=-3; +UPDATE t16 SET f1=2 where f1=-2; +UPDATE t16 SET f1=1 where f1=-1; +SELECT * from t16 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t36 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg16; +drop table t26,t36; +drop table t16; +------------------- +5 +------------------- +drop table if exists t15; +drop table if exists t25,t35; +create table t15 (f1 int) /* 2 replicate */; +insert into t15 values (-5); +insert into t15 values (-4); +insert into t15 values (-3); +insert into t15 values (-2); +insert into t15 values (-1); +select * from t15; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg15 before update on t15 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t25 where f1=NEW.f1; +INSERT INTO t35 values (r); +end| +create table t25 (f1 int, f2 int) /* slave local */; +create table t35 (f3 int) /* slave local */; +insert into t25 values (5, 5*100); +insert into t25 values (4, 4*100); +insert into t25 values (3, 3*100); +insert into t25 values (2, 2*100); +insert into t25 values (1, 1*100); +select * from t25; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t15 SET f1=5 where f1=-5; +SELECT * from t15 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t35 /* must be f3 5*100 */; +f3 +500 +UPDATE t15 SET f1=5 where f1=-5; +UPDATE t15 SET f1=4 where f1=-4; +UPDATE t15 SET f1=3 where f1=-3; +UPDATE t15 SET f1=2 where f1=-2; +UPDATE t15 SET f1=1 where f1=-1; +SELECT * from t15 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t35 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg15; +drop table t25,t35; +drop table t15; +------------------- +4 +------------------- +drop table if exists t14; +drop table if exists t24,t34; +create table t14 (f1 int) /* 2 replicate */; +insert into t14 values (-5); +insert into t14 values (-4); +insert into t14 values (-3); +insert into t14 values (-2); +insert into t14 values (-1); +select * from t14; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg14 before update on t14 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t24 where f1=NEW.f1; +INSERT INTO t34 values (r); +end| +create table t24 (f1 int, f2 int) /* slave local */; +create table t34 (f3 int) /* slave local */; +insert into t24 values (5, 5*100); +insert into t24 values (4, 4*100); +insert into t24 values (3, 3*100); +insert into t24 values (2, 2*100); +insert into t24 values (1, 1*100); +select * from t24; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t14 SET f1=5 where f1=-5; +SELECT * from t14 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t34 /* must be f3 5*100 */; +f3 +500 +UPDATE t14 SET f1=5 where f1=-5; +UPDATE t14 SET f1=4 where f1=-4; +UPDATE t14 SET f1=3 where f1=-3; +UPDATE t14 SET f1=2 where f1=-2; +UPDATE t14 SET f1=1 where f1=-1; +SELECT * from t14 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t34 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg14; +drop table t24,t34; +drop table t14; +------------------- +3 +------------------- +drop table if exists t13; +drop table if exists t23,t33; +create table t13 (f1 int) /* 2 replicate */; +insert into t13 values (-5); +insert into t13 values (-4); +insert into t13 values (-3); +insert into t13 values (-2); +insert into t13 values (-1); +select * from t13; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg13 before update on t13 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t23 where f1=NEW.f1; +INSERT INTO t33 values (r); +end| +create table t23 (f1 int, f2 int) /* slave local */; +create table t33 (f3 int) /* slave local */; +insert into t23 values (5, 5*100); +insert into t23 values (4, 4*100); +insert into t23 values (3, 3*100); +insert into t23 values (2, 2*100); +insert into t23 values (1, 1*100); +select * from t23; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t13 SET f1=5 where f1=-5; +SELECT * from t13 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t33 /* must be f3 5*100 */; +f3 +500 +UPDATE t13 SET f1=5 where f1=-5; +UPDATE t13 SET f1=4 where f1=-4; +UPDATE t13 SET f1=3 where f1=-3; +UPDATE t13 SET f1=2 where f1=-2; +UPDATE t13 SET f1=1 where f1=-1; +SELECT * from t13 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t33 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg13; +drop table t23,t33; +drop table t13; +------------------- +2 +------------------- +drop table if exists t12; +drop table if exists t22,t32; +create table t12 (f1 int) /* 2 replicate */; +insert into t12 values (-5); +insert into t12 values (-4); +insert into t12 values (-3); +insert into t12 values (-2); +insert into t12 values (-1); +select * from t12; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg12 before update on t12 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t22 where f1=NEW.f1; +INSERT INTO t32 values (r); +end| +create table t22 (f1 int, f2 int) /* slave local */; +create table t32 (f3 int) /* slave local */; +insert into t22 values (5, 5*100); +insert into t22 values (4, 4*100); +insert into t22 values (3, 3*100); +insert into t22 values (2, 2*100); +insert into t22 values (1, 1*100); +select * from t22; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t12 SET f1=5 where f1=-5; +SELECT * from t12 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t32 /* must be f3 5*100 */; +f3 +500 +UPDATE t12 SET f1=5 where f1=-5; +UPDATE t12 SET f1=4 where f1=-4; +UPDATE t12 SET f1=3 where f1=-3; +UPDATE t12 SET f1=2 where f1=-2; +UPDATE t12 SET f1=1 where f1=-1; +SELECT * from t12 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t32 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg12; +drop table t22,t32; +drop table t12; +------------------- +1 +------------------- +drop table if exists t11; +drop table if exists t21,t31; +create table t11 (f1 int) /* 2 replicate */; +insert into t11 values (-5); +insert into t11 values (-4); +insert into t11 values (-3); +insert into t11 values (-2); +insert into t11 values (-1); +select * from t11; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg11 before update on t11 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t21 where f1=NEW.f1; +INSERT INTO t31 values (r); +end| +create table t21 (f1 int, f2 int) /* slave local */; +create table t31 (f3 int) /* slave local */; +insert into t21 values (5, 5*100); +insert into t21 values (4, 4*100); +insert into t21 values (3, 3*100); +insert into t21 values (2, 2*100); +insert into t21 values (1, 1*100); +select * from t21; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t11 SET f1=5 where f1=-5; +SELECT * from t11 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t31 /* must be f3 5*100 */; +f3 +500 +UPDATE t11 SET f1=5 where f1=-5; +UPDATE t11 SET f1=4 where f1=-4; +UPDATE t11 SET f1=3 where f1=-3; +UPDATE t11 SET f1=2 where f1=-2; +UPDATE t11 SET f1=1 where f1=-1; +SELECT * from t11 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t31 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg11; +drop table t21,t31; +drop table t11; +STOP SLAVE; +FLUSH LOGS; +RESET SLAVE; +START SLAVE; +SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; +MASTER_POS_WAIT('master-bin.000001', 513) >= 0 +1 +SHOW TABLES LIKE 't_'; +Tables_in_test (t_) +t1 +t2 +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 INSERT INTO t2 VALUES(CURRENT_USER()) AFTER NULL +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +s +@ +INSERT INTO t1 VALUES(2); +SELECT * FROM t1; +c +1 +2 +SELECT * FROM t2; +s +@ +root@localhost +DROP TRIGGER trg1; +Warnings: +Warning 1454 No definer attribute for trigger 'test'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. +DROP TABLE t1; +DROP TABLE t2; +STOP SLAVE; +RESET SLAVE; +SHOW TABLES LIKE 't_'; +Tables_in_test (t_) +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +RESET MASTER; +START SLAVE; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; + +---> Synchronizing slave with master... + +---> connection: master + +---> 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) */; + +---> Inserting value... +INSERT INTO t1 VALUES(1); + +---> Checking on master... +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +c +10 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +c +10 + +---> connection: master + +---> Cleaning up... +DROP TABLE t1; +DROP TABLE t2; +drop table if exists t1; +create table t1(a int, b varchar(50)); +drop trigger not_a_trigger; +ERROR HY000: Trigger does not exist +drop trigger if exists not_a_trigger; +Warnings: +Note 1360 Trigger does not exist +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; +Warnings: +Note 1360 Trigger does not exist +insert into t1 values (3, "c"); +select * from t1; +a b +1 In trigger t1_bi +2 b +3 c +select * from t1; +a b +1 In trigger t1_bi +2 b +3 c +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_trunc_temp.result new file mode 100644 index 00000000000..44624a38875 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_trunc_temp.result @@ -0,0 +1,22 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create temporary table t1 (n int); +insert into t1 values(1); +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +delete from t1; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +truncate t1; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result new file mode 100644 index 00000000000..c7ef28ba56b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -0,0 +1,196 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +3 3 +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result new file mode 100644 index 00000000000..7ce48c2e983 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -0,0 +1,208 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +3 3 +**** On Master **** +DROP TABLE t1; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result b/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result new file mode 100644 index 00000000000..ca323e193fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result @@ -0,0 +1,91 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** On 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; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 219 Query 1 283 BEGIN +master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 376 Write_rows 1 135 table_id: # +master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 465 Query 1 530 COMMIT +master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 +master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 +**** On 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; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +3 3 +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 219 Query 1 283 BEGIN +master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 376 Write_rows 1 135 table_id: # +master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 465 Query 1 530 COMMIT +master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 +master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 +master-bin.000001 686 Query 1 803 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 803 Query 1 867 BEGIN +master-bin.000001 867 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 907 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 960 Write_rows 1 135 table_id: # +master-bin.000001 1002 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 1049 Query 1 1114 COMMIT +master-bin.000001 1114 Query 1 1178 BEGIN +master-bin.000001 1178 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 1218 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 1271 Write_rows 1 135 table_id: # +master-bin.000001 1313 Delete_rows 1 174 table_id: # flags: STMT_END_F +master-bin.000001 1352 Query 1 1417 COMMIT +master-bin.000001 1417 Query 1 1493 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result new file mode 100644 index 00000000000..6587632bca0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_udf.result @@ -0,0 +1,310 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set binlog_format=row; +drop table if exists t1; +"*** Test 1) Test UDFs via loadable libraries *** +"Running on the master" +CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +ERROR HY000: Can't find symbol 'myfunc_nonexist' in library +SELECT * FROM mysql.func; +name ret dl type +myfunc_double 1 UDF_LIB function +myfunc_int 2 UDF_LIB function +affected rows: 2 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +myfunc_double 1 UDF_LIB function +myfunc_int 2 UDF_LIB function +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +SELECT myfunc_int(25); +myfunc_int(25) +25 +affected rows: 1 +SELECT myfunc_double(75.00); +myfunc_double(75.00) +50.00 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfunc_double; +affected rows: 0 +DROP FUNCTION myfunc_int; +affected rows: 0 +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +"*** Test 2) Test UDFs with SQL body *** +"Running on the master" +CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; +affected rows: 0 +CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the master" +ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; +affected rows: 0 +ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +SELECT myfuncsql_int(25); +myfuncsql_int(25) +25 +affected rows: 1 +SELECT myfuncsql_double(75.00); +myfuncsql_double(75.00) +150 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfuncsql_double; +affected rows: 0 +DROP FUNCTION myfuncsql_int; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +set binlog_format=statement; +drop table if exists t1; +"*** Test 1) Test UDFs via loadable libraries *** +"Running on the master" +CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +ERROR HY000: Can't find symbol 'myfunc_nonexist' in library +SELECT * FROM mysql.func; +name ret dl type +myfunc_int 2 UDF_LIB function +myfunc_double 1 UDF_LIB function +affected rows: 2 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +myfunc_int 2 UDF_LIB function +myfunc_double 1 UDF_LIB function +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +SELECT myfunc_int(25); +myfunc_int(25) +25 +affected rows: 1 +SELECT myfunc_double(75.00); +myfunc_double(75.00) +50.00 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfunc_double; +affected rows: 0 +DROP FUNCTION myfunc_int; +affected rows: 0 +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +"*** Test 2) Test UDFs with SQL body *** +"Running on the master" +CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; +affected rows: 0 +CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the master" +ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; +affected rows: 0 +ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +SELECT myfuncsql_int(25); +myfuncsql_int(25) +25 +affected rows: 1 +SELECT myfuncsql_double(75.00); +myfuncsql_double(75.00) +150 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfuncsql_double; +affected rows: 0 +DROP FUNCTION myfuncsql_int; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 diff --git a/mysql-test/suite/rpl/r/rpl_user_variables.result b/mysql-test/suite/rpl/r/rpl_user_variables.result new file mode 100644 index 00000000000..d3363df3b58 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_user_variables.result @@ -0,0 +1,266 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +reset 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); +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); +select * from t1 where n = '<nonexistant>'; +n +insert into t1 values (@a),(@a),(@a*5); +SELECT * FROM t1 ORDER BY n; +n +NULL +NULL +NULL +NULL +NULL + +-1 +-12.5 +-12345678901234 +0 +0 +1 +12.5 +12345678901234 +2 +5 +5 +5 +abc +abc'def +abc'def +abcn1 +abcn1n2 +abc\def +This is a test +SELECT * FROM t1 ORDER BY n; +n +NULL +NULL +NULL +NULL +NULL + +-1 +-12.5 +-12345678901234 +0 +0 +1 +12.5 +12345678901234 +2 +5 +5 +5 +abc +abc'def +abc'def +abcn1 +abcn1n2 +abc\def +This is a test +insert into t1 select * FROM (select @var1 union select @var2) AS t2; +drop table t1; +End of 4.1 tests. +DROP TABLE IF EXISTS t20; +DROP TABLE IF EXISTS t21; +DROP PROCEDURE IF EXISTS test.insert; +CREATE TABLE t20 (a VARCHAR(20)); +CREATE TABLE t21 (a VARCHAR(20)); +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 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| +SET @VAR=0; +CALL test.insert(); +SET @VAR=1; +CALL test.insert(); +On master: Check the tables for correct data +SELECT * FROM t20; +a +SP_FALSE +SP_TRUE +SELECT * FROM t21; +a +TRIG_FALSE +TRIG_TRUE +On slave: Check the tables for correct data and it matches master +SELECT * FROM t20; +a +SP_FALSE +SP_TRUE +SELECT * FROM t21; +a +TRIG_FALSE +TRIG_TRUE +DROP TABLE t20; +DROP TABLE t21; +DROP PROCEDURE test.insert; +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS test.square; +CREATE TABLE t1 (i INT); +CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN +(@var * @var); +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()); +On master: Retrieve the values from the table +SELECT * FROM t1; +i +1 +4 +9 +16 +25 +On slave: Retrieve the values from the table and verify they are the same as on master +SELECT * FROM t1; +i +1 +4 +9 +16 +25 +DROP TABLE t1; +DROP FUNCTION test.square; +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +CREATE TABLE t1(a int); +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 | +SET @a=500; +INSERT INTO t1 values(f1()); +SET @b = 125; +SET @c = 1; +INSERT INTO t1 values(f2()); +On master: Retrieve the values from the table +SELECT * from t1; +a +500 +625 +On slave: Check the tables for correct data and it matches master +SELECT * from t1; +a +500 +625 +DROP TABLE t1; +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 (i int); +CREATE TABLE t2 (k int); +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 | +SET @a:=100; +INSERT INTO t1 values (5); +On master: Check to see that data was inserted correctly in both tables +SELECT * from t1; +i +5 +SELECT * from t2; +k +100 +42 +On slave: Check the tables for correct data and it matches master +SELECT * from t1; +i +5 +SELECT * from t2; +k +100 +42 +drop table t1, t2; +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; +a b +2 1 +select * from t1; +a b +2 1 +drop table t1; +End of 5.0 tests. +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +CREATE TABLE t1 (i INT); +CREATE FUNCTION f1() RETURNS INT RETURN @a; +CREATE +FUNCTION f2() RETURNS INT BEGIN +INSERT INTO t1 VALUES (10 + @a); +RETURN 0; +END| +SET @a:=123; +SELECT f1(), f2(); +f1() f2() +123 0 +On master: Check to see that data was inserted correctly +INSERT INTO t1 VALUES(f1()); +SELECT * FROM t1; +i +133 +123 +On slave: Check the table for correct data and it matches master +SELECT * FROM t1; +i +133 +123 +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE t1; +stop slave; diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result new file mode 100644 index 00000000000..605a48859a0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -0,0 +1,19 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +set @my_slave_net_timeout =@@global.slave_net_timeout; +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; +show variables like 'slave_compressed_protocol'; +Variable_name Value +slave_compressed_protocol OFF +show variables like 'slave_load_tmpdir'; +Variable_name Value +slave_load_tmpdir SLAVE_LOAD_TMPDIR +show variables like 'slave_skip_errors'; +Variable_name Value +slave_skip_errors 3,100,137,643,1752 +set global slave_net_timeout=default; diff --git a/mysql-test/suite/rpl/r/rpl_view.result b/mysql-test/suite/rpl/r/rpl_view.result new file mode 100644 index 00000000000..0d862a2a912 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_view.result @@ -0,0 +1,104 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1,v1; +drop view if exists t1,v1; +reset 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; +a +1 +2 +select * from v1 order by a; +a +1 +2 +update v1 set a=3 where a=1; +select * from v1 order by a; +a +2 +3 +select * from v1 order by a; +a +2 +3 +delete from v1 where a=2; +select * from v1 order by a; +a +3 +select * from v1 order by a; +a +3 +alter view v1 as select a as b from t1; +select * from v1 order by 1; +b +3 +drop view v1; +select * from v1 order by a; +ERROR 42S02: Table 'test.v1' doesn't exist +drop table t1; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating objects... +CREATE TABLE t1(c INT); +/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; + +---> Inserting value... +INSERT INTO t1 VALUES(1); + +---> Checking on master... +SELECT * FROM t1; +c +1 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SELECT * FROM t1; +c +1 + +---> connection: master + +---> Cleaning up... +DROP VIEW v1; +DROP TABLE t1; +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; +explain v1; +Field Type Null Key Default Extra +a int(11) YES NULL +b decimal(32,0) YES NULL +show create table v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a` +select * from v1; +a b +1 6 +drop table t1; +drop view v1; +CREATE TABLE t1(a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v1 AS SELECT * FROM t1; +ERROR 42S01: Table 'v1' already exists +DROP VIEW v1; +DROP TABLE t1; +End of 5.0 tests |