Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 18.221.248.199
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
mysql /
mysql-test /
suite /
binlog /
r /
[ HOME SHELL ]
Name
Size
Permission
Action
binlog_anonymous_ownership.res...
15.33
KB
-rw-r--r--
binlog_bug23533.result
486
B
-rw-r--r--
binlog_bug36391.result
143
B
-rw-r--r--
binlog_cache_write_failure.res...
2.4
KB
-rw-r--r--
binlog_check_flush_log_asserti...
595
B
-rw-r--r--
binlog_checksum.result
697
B
-rw-r--r--
binlog_crash_safe_master_check...
1.15
KB
-rw-r--r--
binlog_database.result
9.67
KB
-rw-r--r--
binlog_delete_and_flush_index....
1.73
KB
-rw-r--r--
binlog_dmls_on_tmp_tables_read...
1.88
KB
-rw-r--r--
binlog_drop_if_exists.result
5.35
KB
-rw-r--r--
binlog_drop_temp_table_on_disc...
1.09
KB
-rw-r--r--
binlog_drop_temp_table_on_disc...
1.76
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
210.68
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
230.58
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
2.26
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
2.69
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
248.24
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
227.62
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
231.98
KB
-rw-r--r--
binlog_enforce_gtid_consistenc...
155.86
KB
-rw-r--r--
binlog_error_action.result
7.88
KB
-rw-r--r--
binlog_flush_logs_error.result
477
B
-rw-r--r--
binlog_foreign_key_parent_tabl...
566
B
-rw-r--r--
binlog_format_switch_in_tmp_ta...
2.65
KB
-rw-r--r--
binlog_grant.result
1.51
KB
-rw-r--r--
binlog_grant_alter_user.result
76.65
KB
-rw-r--r--
binlog_group_commit_flush_cras...
912
B
-rw-r--r--
binlog_group_commit_gtid_order...
1.3
KB
-rw-r--r--
binlog_group_commit_indefinite...
499
B
-rw-r--r--
binlog_group_commit_sync_delay...
599
B
-rw-r--r--
binlog_group_commit_sync_delay...
285
B
-rw-r--r--
binlog_group_commit_sync_no_de...
2.16
KB
-rw-r--r--
binlog_gtid_automatic_using_ro...
496
B
-rw-r--r--
binlog_gtid_cache.result
5
B
-rw-r--r--
binlog_gtid_errors.result
9.86
KB
-rw-r--r--
binlog_gtid_exhausted.result
1.26
KB
-rw-r--r--
binlog_gtid_implicit_commit.re...
12.4
KB
-rw-r--r--
binlog_gtid_innodb.result
6.31
KB
-rw-r--r--
binlog_gtid_mix_ok_packet_all_...
1.7
KB
-rw-r--r--
binlog_gtid_mix_response_packe...
3.69
KB
-rw-r--r--
binlog_gtid_mode_set_gtid_next...
10.7
KB
-rw-r--r--
binlog_gtid_mysqlbinlog_row.re...
208.56
KB
-rw-r--r--
binlog_gtid_mysqlbinlog_row_in...
244.07
KB
-rw-r--r--
binlog_gtid_mysqlbinlog_row_my...
245.21
KB
-rw-r--r--
binlog_gtid_mysqlbinlog_start_...
45.14
KB
-rw-r--r--
binlog_gtid_mysqldump.result
657
B
-rw-r--r--
binlog_gtid_next_begin_caused_...
1.4
KB
-rw-r--r--
binlog_gtid_next_partially_fai...
1.31
KB
-rw-r--r--
binlog_gtid_next_partially_fai...
6.7
KB
-rw-r--r--
binlog_gtid_next_single_stmt_t...
9.6
KB
-rw-r--r--
binlog_gtid_next_temporary_tab...
1.1
KB
-rw-r--r--
binlog_gtid_next_xa.result
36.07
KB
-rw-r--r--
binlog_gtid_ps_reprepare.resul...
3.06
KB
-rw-r--r--
binlog_gtid_purge_binlog_at_st...
597
B
-rw-r--r--
binlog_gtid_rbr_only_flag.resu...
1.63
KB
-rw-r--r--
binlog_gtid_reset_consistency_...
586
B
-rw-r--r--
binlog_gtid_row_ctype_ucs.resu...
1.43
KB
-rw-r--r--
binlog_gtid_simple_recovery.re...
1.82
KB
-rw-r--r--
binlog_gtid_state_update_deadl...
625
B
-rw-r--r--
binlog_gtid_stm_ctype_ucs.resu...
1.53
KB
-rw-r--r--
binlog_gtid_unknown_xid.result
1.21
KB
-rw-r--r--
binlog_gtid_utils.result
13.28
KB
-rw-r--r--
binlog_gtids_table_gcov.result
1.72
KB
-rw-r--r--
binlog_implicit_commit.result
12.4
KB
-rw-r--r--
binlog_incident.result
497
B
-rw-r--r--
binlog_incident_ignore.result
497
B
-rw-r--r--
binlog_index.result
11.61
KB
-rw-r--r--
binlog_innodb.result
6.31
KB
-rw-r--r--
binlog_innodb_row.result
3.12
KB
-rw-r--r--
binlog_killed.result
3.74
KB
-rw-r--r--
binlog_killed_simulate.result
1.19
KB
-rw-r--r--
binlog_max_extension.result
424
B
-rw-r--r--
binlog_max_flush_queue_time_wa...
189
B
-rw-r--r--
binlog_mixed_cache_stat.result
3.2
KB
-rw-r--r--
binlog_mixed_load_data.result
420
B
-rw-r--r--
binlog_mts_logical_clock.resul...
2.92
KB
-rw-r--r--
binlog_mts_logical_clock_gtid....
1.72
KB
-rw-r--r--
binlog_mysqlbinlog-cp932.resul...
358
B
-rw-r--r--
binlog_mysqlbinlog_base64.resu...
1.71
KB
-rw-r--r--
binlog_mysqlbinlog_concat.resu...
488
B
-rw-r--r--
binlog_mysqlbinlog_filter.resu...
1.48
KB
-rw-r--r--
binlog_mysqlbinlog_intvar.resu...
752
B
-rw-r--r--
binlog_mysqlbinlog_raw.result
832
B
-rw-r--r--
binlog_mysqlbinlog_rewrite_db....
1.8
KB
-rw-r--r--
binlog_mysqlbinlog_row.result
211.92
KB
-rw-r--r--
binlog_mysqlbinlog_row_innodb....
244.36
KB
-rw-r--r--
binlog_mysqlbinlog_row_myisam....
245.49
KB
-rw-r--r--
binlog_mysqlbinlog_row_trans.r...
17.45
KB
-rw-r--r--
binlog_mysqlbinlog_start_stop....
45.18
KB
-rw-r--r--
binlog_mysqlbinlog_start_stop_...
4.07
KB
-rw-r--r--
binlog_nogtid_mix_response_pac...
1.14
KB
-rw-r--r--
binlog_noop_dml_with_readonly....
1.35
KB
-rw-r--r--
binlog_old_versions.result
1.03
KB
-rw-r--r--
binlog_purge_binary_logs_stall...
236
B
-rw-r--r--
binlog_purge_binary_logs_to.re...
309
B
-rw-r--r--
binlog_query_filter_rules.resu...
187
B
-rw-r--r--
binlog_rbr_only_savepoint.resu...
202
B
-rw-r--r--
binlog_reset_connection_not_re...
611
B
-rw-r--r--
binlog_reset_master.result
14
B
-rw-r--r--
binlog_rewrite.result
10.15
KB
-rw-r--r--
binlog_rewrite_db_noleak.resul...
932
B
-rw-r--r--
binlog_rewrite_order.result
4.35
KB
-rw-r--r--
binlog_rewrite_suppress_use.re...
828
B
-rw-r--r--
binlog_rotate_bgc_sync.result
1.54
KB
-rw-r--r--
binlog_rotate_deadlock.result
852
B
-rw-r--r--
binlog_row_binlog.result
39.5
KB
-rw-r--r--
binlog_row_cache_stat.result
3.2
KB
-rw-r--r--
binlog_row_create_select_crash...
446
B
-rw-r--r--
binlog_row_ctype_cp932.result
87.58
KB
-rw-r--r--
binlog_row_ctype_ucs.result
1.43
KB
-rw-r--r--
binlog_row_delete_all_rows.res...
869
B
-rw-r--r--
binlog_row_drop_tbl.result
567
B
-rw-r--r--
binlog_row_drop_tmp_tbl.result
4.86
KB
-rw-r--r--
binlog_row_insert_select.resul...
809
B
-rw-r--r--
binlog_row_kill_create_select....
1.21
KB
-rw-r--r--
binlog_row_mix_innodb_myisam.r...
30.51
KB
-rw-r--r--
binlog_row_mysqlbinlog_db_filt...
1.5
KB
-rw-r--r--
binlog_row_mysqlbinlog_verbose...
2.84
KB
-rw-r--r--
binlog_row_query_log_events.re...
442
B
-rw-r--r--
binlog_server_id.result
459
B
-rw-r--r--
binlog_server_start_options.re...
49
B
-rw-r--r--
binlog_set_gtid_mode_ongoing_t...
8.01
KB
-rw-r--r--
binlog_set_trans_dependency_de...
1.29
KB
-rw-r--r--
binlog_sf.result
1.67
KB
-rw-r--r--
binlog_shutdown_hang.result
406
B
-rw-r--r--
binlog_simulate_crash_and_erro...
2.44
KB
-rw-r--r--
binlog_spurious_ddl_errors.res...
2.97
KB
-rw-r--r--
binlog_sql_mode.result
3.69
KB
-rw-r--r--
binlog_start_comment.result
371
B
-rw-r--r--
binlog_start_slave_heartbeat.r...
259
B
-rw-r--r--
binlog_stm_binlog.result
37.96
KB
-rw-r--r--
binlog_stm_blackhole.result
7.78
KB
-rw-r--r--
binlog_stm_cache_stat.result
3.2
KB
-rw-r--r--
binlog_stm_ctype_cp932.result
87.58
KB
-rw-r--r--
binlog_stm_ctype_ucs.result
1.53
KB
-rw-r--r--
binlog_stm_delete_all_rows.res...
873
B
-rw-r--r--
binlog_stm_do_db.result
2.82
KB
-rw-r--r--
binlog_stm_drop_tbl.result
513
B
-rw-r--r--
binlog_stm_drop_tmp_tbl.result
7.11
KB
-rw-r--r--
binlog_stm_insert_select.resul...
762
B
-rw-r--r--
binlog_stm_mix_innodb_myisam.r...
36.05
KB
-rw-r--r--
binlog_stm_ps.result
1.16
KB
-rw-r--r--
binlog_stm_row.result
3.07
KB
-rw-r--r--
binlog_stm_unsafe_warning.resu...
4.8
KB
-rw-r--r--
binlog_stm_user_variables.resu...
5.38
KB
-rw-r--r--
binlog_switch_inside_trans.res...
7.97
KB
-rw-r--r--
binlog_temporary_tables_user_v...
124
B
-rw-r--r--
binlog_tmp_table.result
905
B
-rw-r--r--
binlog_transaction_dependency_...
3.2
KB
-rw-r--r--
binlog_transaction_dependency_...
1.56
KB
-rw-r--r--
binlog_transaction_write_set_s...
1.08
KB
-rw-r--r--
binlog_transaction_write_set_s...
448
B
-rw-r--r--
binlog_transaction_write_set_s...
351
B
-rw-r--r--
binlog_transaction_write_set_s...
1.51
KB
-rw-r--r--
binlog_truncate_kill.result
1.23
KB
-rw-r--r--
binlog_truncate_myisam.result
2.97
KB
-rw-r--r--
binlog_trx_empty_assertions.re...
884
B
-rw-r--r--
binlog_unsafe.result
190.13
KB
-rw-r--r--
binlog_unsafe_stmt_capable_eng...
215.37
KB
-rw-r--r--
binlog_use_gtid_skip.result
311
B
-rw-r--r--
binlog_user_if_exists.result
14.76
KB
-rw-r--r--
binlog_variables_log_bin.resul...
319
B
-rw-r--r--
binlog_variables_log_bin_index...
313
B
-rw-r--r--
binlog_variables_log_statement...
1.03
KB
-rw-r--r--
binlog_wait_for_executed_gtid_...
245
B
-rw-r--r--
binlog_wait_for_executed_gtid_...
2.2
KB
-rw-r--r--
binlog_wait_for_executed_gtid_...
237
B
-rw-r--r--
binlog_wait_for_executed_gtid_...
590
B
-rw-r--r--
binlog_write_error.result
2.8
KB
-rw-r--r--
binlog_writeset_history_protec...
671
B
-rw-r--r--
binlog_wrong_last_committed.re...
574
B
-rw-r--r--
binlog_xa_handling.result
1.49
KB
-rw-r--r--
binlog_xa_modify_gtid_executed...
2.35
KB
-rw-r--r--
binlog_xa_prepare_failure.resu...
1.05
KB
-rw-r--r--
binlog_xa_prepared_disconnect....
26.74
KB
-rw-r--r--
binlog_xa_rollback_failure.res...
588
B
-rw-r--r--
binlog_xa_select_gtid_executed...
863
B
-rw-r--r--
binlog_xa_trx_gtid_response_pa...
666
B
-rw-r--r--
binlog_xa_trx_split_across_bin...
1016
B
-rw-r--r--
log_builtin_as_identified_by_p...
7.11
KB
-rw-r--r--
show_binlog_events_no_lock.res...
324
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : binlog_stm_mix_innodb_myisam.result
CALL mtr.add_suppression("Statement may not be safe to log in statement format."); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); drop table if exists t1, t2; create table t1 (a int) engine=innodb; create table t2 (a int) engine=myisam; reset master; begin; insert into t1 values(1); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(1) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; begin; insert into t1 values(2); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(2) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; begin; insert into t1 values(3); savepoint my_savepoint; insert into t1 values(4); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. rollback to savepoint my_savepoint; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(3) master-bin.000001 # Query # # SAVEPOINT `my_savepoint` master-bin.000001 # Query # # use `test`; insert into t1 values(4) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # ROLLBACK TO `my_savepoint` master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; begin; insert into t1 values(5); savepoint my_savepoint; insert into t1 values(6); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. rollback to savepoint my_savepoint; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back insert into t1 values(7); commit; select a from t1 order by a; a 5 7 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(5) master-bin.000001 # Query # # SAVEPOINT `my_savepoint` master-bin.000001 # Query # # use `test`; insert into t1 values(6) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # ROLLBACK TO `my_savepoint` master-bin.000001 # Query # # use `test`; insert into t1 values(7) master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; select get_lock("a",10); get_lock("a",10) 1 begin; insert into t1 values(8); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. select get_lock("a",10); get_lock("a",10) 1 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(8) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # ROLLBACK delete from t1; delete from t2; reset master; insert into t1 values(9); insert into t2 select * from t1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(9) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # COMMIT delete from t1; delete from t2; reset master; insert into t1 values(10); begin; insert into t2 select * from t1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(10) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # COMMIT insert into t1 values(11); commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(10) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(11) master-bin.000001 # Xid # # COMMIT /* XID */ alter table t2 engine=INNODB; delete from t1; delete from t2; reset master; begin; insert into t1 values(12); insert into t2 select * from t1; commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(12) master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; begin; insert into t1 values(13); insert into t2 select * from t1; rollback; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info delete from t1; delete from t2; reset master; begin; insert into t1 values(14); savepoint my_savepoint; insert into t1 values(15); insert into t2 select * from t1; rollback to savepoint my_savepoint; commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(14) master-bin.000001 # Query # # SAVEPOINT `my_savepoint` master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; begin; insert into t1 values(16); savepoint my_savepoint; insert into t1 values(17); insert into t2 select * from t1; rollback to savepoint my_savepoint; insert into t1 values(18); commit; select a from t1 order by a; a 16 18 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(16) master-bin.000001 # Query # # SAVEPOINT `my_savepoint` master-bin.000001 # Query # # use `test`; insert into t1 values(18) master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; alter table t2 engine=MyISAM; insert into t1 values (1); begin; select * from t1 for update; a 1 select (@before:=unix_timestamp())*0; (@before:=unix_timestamp())*0 0 begin; select * from t1 for update; insert into t2 values (20); ERROR HY000: Lock wait timeout exceeded; try restarting transaction select (@after:=unix_timestamp())*0; (@after:=unix_timestamp())*0 0 select (@after-@before) >= 2; (@after-@before) >= 2 1 commit; drop table t1,t2; commit; begin; create temporary table ti (a int) engine=innodb; rollback; Warnings: Warning # The creation of some temporary tables could not be rolled back. insert into ti values(1); set autocommit=0; create temporary table t1 (a int) engine=myisam; commit; insert t1 values (1); rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back create table t0 (n int); insert t0 select * from t1; set autocommit=1; insert into t0 select GET_LOCK("lock1",null); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. set autocommit=0; create table t2 (n int) engine=innodb; insert into t2 values (3); include/save_binlog_position.inc include/assert_binlog_events.inc [(Anonymous_)?Gtid # !Q(DROP.*TEMPORARY.*) # (Anonymous_)?Gtid # !Q(DROP.*TEMPORARY.*)] select get_lock("lock1",60); get_lock("lock1",60) 1 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(16) master-bin.000001 # Query # # SAVEPOINT `my_savepoint` master-bin.000001 # Query # # use `test`; insert into t1 values(18) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete from t1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete from t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values (1) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 values (20) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by server */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb master-bin.000001 # Query # # ROLLBACK master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values(1) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert t1 values (1) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t0 (n int) master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert t0 select * from t1 master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ti` master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1` do release_lock("lock1"); drop table t0,t2; set autocommit=0; CREATE TABLE t1 (a int, b int) engine=myisam; reset master; INSERT INTO t1 values (1,1),(1,2); CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' DROP TABLE if exists t2; Warnings: Note 1051 Unknown table 'test.t2' INSERT INTO t1 values (3,3); CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back DROP TABLE IF EXISTS t2; Warnings: Note 1051 Unknown table 'test.t2' CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb; INSERT INTO t1 VALUES (4,4); CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; Warnings: Note 1050 Table 't2' already exists SELECT * from t2; a b TRUNCATE table t2; INSERT INTO t1 VALUES (5,5); INSERT INTO t2 select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' SELECT * FROM t2; a b DROP TABLE t2; INSERT INTO t1 values (6,6); CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ; INSERT INTO t1 values (7,7); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction. ROLLBACK; Warnings: Warning # Some non-transactional changed tables couldn't be rolled back Warning # The creation of some temporary tables could not be rolled back. INSERT INTO t1 values (8,8); CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; Warnings: Note 1050 Table 't2' already exists COMMIT; INSERT INTO t1 values (9,9); CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; Warnings: Note 1050 Table 't2' already exists ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SELECT * from t2; a b TRUNCATE table t2; INSERT INTO t1 values (10,10); INSERT INTO t2 select * from t1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' SELECT * from t1; a b 1 1 1 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 INSERT INTO t2 values (100,100); CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; Warnings: Note 1050 Table 't2' already exists COMMIT; INSERT INTO t2 values (101,101); CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; Warnings: Note 1050 Table 't2' already exists ROLLBACK; SELECT * from t2; a b 100 100 DROP TABLE t1,t2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (1,1),(1,2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7) master-bin.000001 # Query # # ROLLBACK master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ reset master; create table t1 (a int) engine=innodb; create table t2 (a int) engine=myisam; select get_lock("a",10); get_lock("a",10) 1 begin; insert into t1 values(8); insert into t2 select * from t1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. select get_lock("a",10); get_lock("a",10) 1 include/assert.inc [Last event of binlog should be ROLLBACK.] flush logs; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) is not null AS Loaded; Loaded 1 select @a like "%#%error_code=0%ROLLBACK\n/*!*/;%" OR @a like "%#%error_code=0%ROLLBACK\r\n/*!*/;%", @a not like "%#%error_code=%error_code=%"; @a like "%#%error_code=0%ROLLBACK\n/*!*/;%" OR @a like "%#%error_code=0%ROLLBACK\r\n/*!*/;%" @a not like "%#%error_code=%error_code=%" 1 1 drop table t1, t2; create temporary table tt (a int unique); create table ti (a int) engine=innodb; reset master; begin; insert into ti values (1); insert into ti values (2) ; insert into tt select * from ti; rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back select count(*) from tt /* 2 */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) master-bin.000001 # Query # # use `test`; insert into tt select * from ti master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 insert into ti select * from tt; select * from ti /* that is what slave would miss - a bug */; a 1 2 delete from ti; delete from tt where a=1; reset master; begin; insert into ti values (1); insert into ti values (2) /* to make the dup error in the following */; insert into tt select * from ti /* one affected and error */; ERROR 23000: Duplicate entry '2' for key 'a' rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */ master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */ master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 insert into ti select * from tt; select * from tt /* that is what otherwise slave missed - the bug */; a 1 2 drop table ti, tt; drop function if exists bug27417; drop table if exists t1,t2; CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a)); create function bug27417(n int) RETURNS int(11) begin insert into t1 values (null); return n; end| reset master; insert into t2 values (bug27417(1)); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. insert into t2 select bug27417(2); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. reset master; insert into t2 values (bug27417(2)); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=3 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2)) master-bin.000001 # Query # # COMMIT /* only (!) with fixes for #23333 will show there is the query */; select count(*) from t1 /* must be 3 */; count(*) 3 reset master; select count(*) from t2; count(*) 2 delete from t2 where a=bug27417(3); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. select count(*) from t2 /* nothing got deleted */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=4 master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3) master-bin.000001 # Query # # COMMIT /* the query must be in regardless of #23333 */; select count(*) from t1 /* must be 5 */; count(*) 5 delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */; affected rows: 0 Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. select count(*) from t1 /* must be 7 */; count(*) 7 drop table t1,t2; CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; CREATE TABLE t3 (a int, PRIMARY KEY (a), b int unique) ENGINE=MyISAM; CREATE TABLE t4 (a int, PRIMARY KEY (a), b int unique) ENGINE=Innodb; CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; insert into t2 values (1); reset master; insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) 1 delete from t1; delete from t2; insert into t2 values (2); reset master; insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) 2 delete from t1; insert into t3 values (1,1),(2,3),(3,4); reset master; update t3 set b=b+bug27417(1); ERROR 23000: Duplicate entry '4' for key 'b' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=4 master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1) master-bin.000001 # Query # # COMMIT /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) 2 delete from t3; delete from t4; insert into t3 values (1,1); insert into t4 values (1,1),(2,2); reset master; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) 4 delete from t1; delete from t3; delete from t4; insert into t3 values (1,1),(2,2); insert into t4 values (1,1),(2,2); reset master; UPDATE t3,t4 SET t3.a=t4.a + bug27417(1); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' select count(*) from t1 /* must be 1 */; count(*) 1 drop table t4; delete from t1; delete from t2; delete from t3; insert into t2 values (1); insert into t3 values (1,1); create trigger trg_del before delete on t2 for each row insert into t3 values (bug27417(1), 2); reset master; delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; delete from t2 master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) 1 drop trigger trg_del; delete from t1; delete from t2; delete from t5; create trigger trg_del_t2 after delete on t2 for each row insert into t1 values (1); insert into t2 values (2),(3); insert into t5 values (1),(2); reset master; delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 1 */; count(*) 1 delete from t1; create table t4 (a int default 0, b int primary key) engine=innodb; insert into t4 values (0, 17); reset master; load data infile '../../std_data/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2); ERROR 23000: Duplicate entry '17' for key 'PRIMARY' select * from t4; a b 0 17 select count(*) from t1 /* must be 2 */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= @b + bug27417(2) ;file_id=# master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; drop function bug27417; end of tests set @@session.binlog_format=statement; create temporary table tt (a int unique); create table ti (a int) engine=innodb; reset master; begin; insert into ti values (1); insert into ti values (2) ; insert into tt select * from ti; rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back select count(*) from tt /* 2 */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) master-bin.000001 # Query # # use `test`; insert into tt select * from ti master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 insert into ti select * from tt; select * from ti /* that is what slave would miss - bug#28960 */; a 1 2 delete from ti; delete from tt where a=1; reset master; begin; insert into ti values (1); insert into ti values (2) /* to make the dup error in the following */; insert into tt select * from ti /* one affected and error */; ERROR 23000: Duplicate entry '2' for key 'a' rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into ti values (1) master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */ master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */ master-bin.000001 # Query # # ROLLBACK select count(*) from ti /* zero */; count(*) 0 insert into ti select * from tt; select * from tt /* that is what otherwise slave missed - the bug */; a 1 2 drop table ti; drop function if exists bug27417; drop table if exists t1,t2; CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a)); create function bug27417(n int) RETURNS int(11) begin insert into t1 values (null); return n; end| reset master; insert into t2 values (bug27417(1)); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. insert into t2 select bug27417(2); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. reset master; insert into t2 values (bug27417(2)); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=3 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(2)) master-bin.000001 # Query # # COMMIT select count(*) from t1 /* must be 3 */; count(*) 3 reset master; select count(*) from t2; count(*) 2 delete from t2 where a=bug27417(3); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. select count(*) from t2 /* nothing got deleted */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=4 master-bin.000001 # Query # # use `test`; delete from t2 where a=bug27417(3) master-bin.000001 # Query # # COMMIT select count(*) from t1 /* must be 5 */; count(*) 5 delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */; affected rows: 0 Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. select count(*) from t1 /* must be 7 */; count(*) 7 drop table t1,t2; CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; CREATE TABLE t3 (a int, PRIMARY KEY (a), b int unique) ENGINE=MyISAM; CREATE TABLE t4 (a int, PRIMARY KEY (a), b int unique) ENGINE=Innodb; CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; insert into t2 values (1); reset master; insert into t2 values (bug27417(1)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1)) master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 delete from t1; delete from t2; insert into t2 values (2); reset master; insert into t2 select bug27417(1) union select bug27417(2); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2) master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 2 */; count(*) 2 delete from t1; insert into t3 values (1,1),(2,3),(3,4); reset master; update t3 set b=b+bug27417(1); ERROR 23000: Duplicate entry '4' for key 'b' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=4 master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1) master-bin.000001 # Query # # COMMIT select count(*) from t1 /* must be 2 */; count(*) 2 delete from t3; delete from t4; insert into t3 values (1,1); insert into t4 values (1,1),(2,2); reset master; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 4 */; count(*) 4 delete from t1; delete from t3; delete from t4; insert into t3 values (1,1),(2,2); insert into t4 values (1,1),(2,2); reset master; UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' select count(*) from t1 /* must be 1 */; count(*) 1 drop table t4; delete from t1; delete from t2; delete from t3; insert into t2 values (1); insert into t3 values (1,1); create trigger trg_del before delete on t2 for each row insert into t3 values (bug27417(1), 2); reset master; delete from t2; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; delete from t2 master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 drop trigger trg_del; delete from t1; delete from t2; delete from t5; create trigger trg_del_t2 after delete on t2 for each row insert into t1 values (1); insert into t2 values (2),(3); insert into t5 values (1),(2); reset master; delete t2.* from t2,t5 where t2.a=t5.a + 1; ERROR 23000: Duplicate entry '1' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1 master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 1 */; count(*) 1 delete from t1; create table t4 (a int default 0, b int primary key) engine=innodb; insert into t4 values (0, 17); reset master; load data infile '../../std_data/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2); ERROR 23000: Duplicate entry '17' for key 'PRIMARY' select * from t4; a b 0 17 select count(*) from t1 /* must be 2 */; count(*) 2 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= @b + bug27417(2) ;file_id=# master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; drop function bug27417; set @@session.binlog_format=@@global.binlog_format; end of tests
Close