Commit adaf162b authored by unknown's avatar unknown

WL#3464: Add replication event to denote gap in replication

Adding an event that can be used to denote that an incident occured
on the master. The event can be used to denote a gap in the replication
stream, but can also be used to denote other incidents.

In addition, the injector interface is extended with functions to
generate an incident event. The function will also rotate the binary
log after generating an incident event to get a fresh binary log.


client/Makefile.am:
  Adding file rpl_constants.h with constants for replication.
mysql-test/extra/binlog_tests/binlog.test:
  Binlog position change
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  Binlog position change
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
  Binlog position change
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
  Binlog position change
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_deadlock.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_log.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_multi_query.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_row_charset.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_row_sp002.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_row_sp003.test:
  Binlog position change
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Binlog position change
mysql-test/include/show_binlog_events.inc:
  Binlog position change
mysql-test/r/binlog_row_binlog.result:
  Result change
mysql-test/r/binlog_row_ctype_ucs.result:
  Result change
mysql-test/r/binlog_row_insert_select.result:
  Result change
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change
mysql-test/r/binlog_stm_binlog.result:
  Result change
mysql-test/r/binlog_stm_ctype_ucs.result:
  Result change
mysql-test/r/binlog_stm_insert_select.result:
  Result change
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Result change
mysql-test/r/ctype_cp932_binlog_row.result:
  Result change
mysql-test/r/ctype_cp932_binlog_stm.result:
  Result change
mysql-test/r/flush_block_commit_notembedded.result:
  Result change
mysql-test/r/rpl_000015.result:
  Result change
mysql-test/r/rpl_change_master.result:
  Result change
mysql-test/r/rpl_deadlock_innodb.result:
  Result change
mysql-test/r/rpl_flushlog_loop.result:
  Result change
mysql-test/r/rpl_loaddata.result:
  Result change
mysql-test/r/rpl_loaddata_s.result:
  Result change
mysql-test/r/rpl_log_pos.result:
  Result change
mysql-test/r/rpl_ndb_charset.result:
  Result change
mysql-test/r/rpl_ndb_log.result:
  Result change
mysql-test/r/rpl_ndb_multi.result:
  Result change
mysql-test/r/rpl_rbr_to_sbr.result:
  Result change
mysql-test/r/rpl_rotate_logs.result:
  Result change
mysql-test/r/rpl_row_basic_11bugs.result:
  Result change
mysql-test/r/rpl_row_charset.result:
  Result change
mysql-test/r/rpl_row_create_table.result:
  Result change
mysql-test/r/rpl_row_delayed_ins.result:
  Result change
mysql-test/r/rpl_row_drop.result:
  Result change
mysql-test/r/rpl_row_flsh_tbls.result:
  Result change
mysql-test/r/rpl_row_inexist_tbl.result:
  Result change
mysql-test/r/rpl_row_log.result:
  Result change
mysql-test/r/rpl_row_log_innodb.result:
  Result change
mysql-test/r/rpl_row_max_relay_size.result:
  Result change
mysql-test/r/rpl_row_reset_slave.result:
  Result change
mysql-test/r/rpl_row_until.result:
  Result change
mysql-test/r/rpl_server_id1.result:
  Result change
mysql-test/r/rpl_server_id2.result:
  Result change
mysql-test/r/rpl_sp.result:
  Result change
mysql-test/r/rpl_stm_charset.result:
  Result change
mysql-test/r/rpl_stm_flsh_tbls.result:
  Result change
mysql-test/r/rpl_stm_log.result:
  Result change
mysql-test/r/rpl_stm_max_relay_size.result:
  Result change
mysql-test/r/rpl_stm_multi_query.result:
  Result change
mysql-test/r/rpl_stm_reset_slave.result:
  Result change
mysql-test/r/rpl_stm_until.result:
  Result change
mysql-test/r/rpl_switch_stm_row_mixed.result:
  Result change
mysql-test/r/rpl_truncate_2myisam.result:
  Result change
mysql-test/r/rpl_truncate_3innodb.result:
  Result change
mysql-test/r/rpl_truncate_7ndb.result:
  Result change
mysql-test/r/user_var-binlog.result:
  Result change
mysql-test/t/binlog_row_mix_innodb_myisam.test:
  Binlog position change
mysql-test/t/binlog_stm_mix_innodb_myisam.test:
  Binlog position change
mysql-test/t/ctype_cp932_binlog_stm.test:
  Binlog position change
mysql-test/t/mysqlbinlog.test:
  Binlog position change
mysql-test/t/mysqlbinlog2.test:
  Binlog position change
mysql-test/t/rpl_loaddata_s.test:
  Binlog position change
mysql-test/t/rpl_log_pos.test:
  Binlog position change
mysql-test/t/rpl_row_basic_11bugs.test:
  Binlog position change
mysql-test/t/rpl_row_create_table.test:
  Binlog position change
mysql-test/t/rpl_row_flsh_tbls.test:
  Binlog position change
mysql-test/t/rpl_row_mysqlbinlog.test:
  Binlog position change
mysql-test/t/rpl_sp.test:
  Binlog position change
mysql-test/t/rpl_stm_flsh_tbls.test:
  Binlog position change
mysql-test/t/rpl_switch_stm_row_mixed.test:
  Binlog position change
mysql-test/t/user_var-binlog.test:
  Binlog position change
sql/Makefile.am:
  Adding file rpl_constants.h with constants for replication.
sql/log_event.cc:
  Changing prototype for read_str() to be const-correct and changing code to match that.
  Adding incident log event.
sql/log_event.h:
  Adding incident log event.
sql/rpl_injector.cc:
  Adding support for generating incidents into the binary log.
sql/rpl_injector.h:
  Adding support for generating incidents into the binary log.
sql/share/errmsg.txt:
  Adding new error message to indicate an incident.
sql/sql_parse.cc:
  Adding code to generate an incident log event just before executing a REPLACE
  if the variable "incident_database_resync_on_replace" is set.
mysql-test/r/rpl_incident.result:
  New BitKeeper file ``mysql-test/r/rpl_incident.result''
mysql-test/t/rpl_incident.test:
  New BitKeeper file ``mysql-test/t/rpl_incident.test''
sql/rpl_constants.h:
  New BitKeeper file ``sql/rpl_constants.h''
parent 2d9e8747
......@@ -94,7 +94,8 @@ DEFS = -DUNDEF_THREADS_HACK \
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-DDATADIR="\"$(localstatedir)\""
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
sql_src=log_event.h mysql_priv.h rpl_constants.h \
log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
link_sources:
......
......@@ -22,7 +22,7 @@ commit;
# first COMMIT must be Query_log_event, second - Xid_log_event
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
drop table t1,t2;
#
......@@ -44,10 +44,10 @@ commit;
drop table t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 103;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events in 'master-bin.000002' from 102;
show binlog events in 'master-bin.000002' from 103;
# Test of a too big SET INSERT_ID: see if the truncated value goes
# into binlog (right), or the too big value (wrong); we look at the
......@@ -69,7 +69,7 @@ create table if not exists t3 like tt1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
drop table t1,t2,t3,tt1;
-- source extra/binlog_tests/binlog_insert_delayed.test
......@@ -25,7 +25,7 @@ inc $count;
# the way
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 103;
insert delayed into t1 values (null),(null),(null),(null);
inc $count; inc $count; inc $count; inc $count;
......
......@@ -28,7 +28,7 @@ SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 102;
SHOW BINLOG EVENTS FROM 103;
SELECT HEX(f1) FROM t1;
DROP table t1;
# end test for bug#11338
......
......@@ -10,7 +10,7 @@ set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 103;
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# escaped).
......
......@@ -31,7 +31,7 @@ commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -45,7 +45,7 @@ rollback;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -61,7 +61,7 @@ commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -79,7 +79,7 @@ select a from t1 order by a; # check that savepoints work :)
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# and when ROLLBACK is not explicit?
delete from t1;
......@@ -101,7 +101,7 @@ connection con2;
select get_lock("a",10);
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# and when not in a transact1on?
delete from t1;
......@@ -113,7 +113,7 @@ insert into t2 select * from t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
......@@ -126,13 +126,13 @@ begin;
insert into t2 select * from t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
insert into t1 values(11);
commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# Check that things work like before this BEGIN/ROLLBACK code was added,
......@@ -151,7 +151,7 @@ commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -164,7 +164,7 @@ rollback;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -180,7 +180,7 @@ commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
delete from t1;
delete from t2;
......@@ -198,7 +198,7 @@ select a from t1 order by a; # check that savepoints work :)
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
......@@ -259,7 +259,7 @@ connection con3;
select get_lock("lock1",60);
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
do release_lock("lock1");
drop table t0,t2;
......@@ -326,7 +326,7 @@ SELECT * from t2;
DROP TABLE t1,t2;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
show binlog events from 103;
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
# binlog). Has to be here and not earlier, as the SELECTs influence
......
......@@ -82,7 +82,7 @@ show slave status;
stop slave;
delete from t3;
change master to master_log_pos=544; # the BEGIN log event
change master to master_log_pos=545; # the BEGIN log event
begin;
select * from t2 for update; # hold lock
start slave;
......@@ -107,7 +107,7 @@ set global max_relay_log_size=0;
# This is really copy-paste of 2) of above
stop slave;
delete from t3;
change master to master_log_pos=544;
change master to master_log_pos=545;
begin;
select * from t2 for update;
start slave;
......
......@@ -42,13 +42,13 @@ select count(*) from t1;
show binlog events;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events from 102 limit 1;
show binlog events from 103 limit 1;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events from 102 limit 2;
show binlog events from 103 limit 2;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events from 102 limit 2,1;
show binlog events from 103 limit 2,1;
flush logs;
# We need an extra update before doing save_master_pos.
......
......@@ -25,6 +25,6 @@ select * from mysqltest.t1;
connection master;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 103;
drop database mysqltest;
sync_slave_with_master;
......@@ -115,7 +115,7 @@ drop database mysqltest2;
drop database mysqltest3;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 103;
sync_slave_with_master;
# Check that we can change global.collation_server (since 5.0.3)
......
......@@ -222,7 +222,7 @@ sync_with_master;
select * from test.t3;
connection master;
#show binlog events from 1626;
#show binlog events from 1627;
# First lets cleanup
......
......@@ -65,7 +65,7 @@ sync_slave_with_master;
connection slave;
SELECT * FROM test.t1;
connection master;
#show binlog events from 719;
#show binlog events from 720;
DROP PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
......
......@@ -111,7 +111,7 @@ drop database mysqltest2;
drop database mysqltest3;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
show binlog events from 103;
sync_slave_with_master;
# Check that we can change global.collation_server (since 5.0.3)
......
--let $binlog_start=102
--let $binlog_start=103
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
......
......@@ -8,7 +8,7 @@ commit;
begin;
insert t2 values (5);
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
......@@ -26,7 +26,7 @@ create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
......@@ -232,7 +232,7 @@ 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 # Rotate 1 # master-bin.000002;pos=4
show binlog events in 'master-bin.000002' from 102;
show binlog events in 'master-bin.000002' from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
reset master;
......@@ -249,7 +249,7 @@ create table t1 (a int);
create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -268,7 +268,7 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......
......@@ -3,10 +3,10 @@ create table t2 (c char(30)) charset=ucs2;
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 Table_map 1 141 table_id: # (test.t2)
master-bin.000001 141 Write_rows 1 231 table_id: # flags: STMT_END_F
master-bin.000001 103 Table_map 1 142 table_id: # (test.t2)
master-bin.000001 142 Write_rows 1 232 table_id: # flags: STMT_END_F
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
......
......@@ -8,9 +8,9 @@ insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 102 Table_map 1 141 table_id: # (test.t1)
master-bin.000001 141 Write_rows 1 175 table_id: # flags: STMT_END_F
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
master-bin.000001 103 Table_map 1 142 table_id: # (test.t1)
master-bin.000001 142 Write_rows 1 176 table_id: # flags: STMT_END_F
select * from t1;
a
1
......@@ -23,5 +23,5 @@ create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
drop table t1;
......@@ -6,7 +6,7 @@ begin;
insert into t1 values(1);
insert into t2 select * from t1;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -23,7 +23,7 @@ insert into t2 select * from t1;
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -43,7 +43,7 @@ rollback to savepoint my_savepoint;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -72,7 +72,7 @@ select a from t1 order by a;
a
5
7
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -98,7 +98,7 @@ insert into t2 select * from t1;
select get_lock("a",10);
get_lock("a",10)
1
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -111,7 +111,7 @@ delete from t2;
reset master;
insert into t1 values(9);
insert into t2 select * from t1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
......@@ -124,7 +124,7 @@ reset master;
insert into t1 values(10);
begin;
insert into t2 select * from t1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
......@@ -133,7 +133,7 @@ master-bin.000001 # Table_map 1 # table_id: # (test.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
insert into t1 values(11);
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
......@@ -152,7 +152,7 @@ begin;
insert into t1 values(12);
insert into t2 select * from t1;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -167,7 +167,7 @@ begin;
insert into t1 values(13);
insert into t2 select * from t1;
rollback;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
delete from t1;
delete from t2;
......@@ -179,7 +179,7 @@ insert into t1 values(15);
insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -200,7 +200,7 @@ select a from t1 order by a;
a
16
18
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -252,7 +252,7 @@ insert into t2 values (3);
select get_lock("lock1",60);
get_lock("lock1",60)
1
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......@@ -355,7 +355,7 @@ SELECT * from t2;
a b
100 100
DROP TABLE t1,t2;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
......
......@@ -4,11 +4,11 @@ insert into t1 values (1,2);
commit;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
master-bin.000001 102 Query 1 209 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 209 Query 1 277 use `test`; BEGIN
master-bin.000001 277 Query 1 90 use `test`; insert into t1 values (1,2)
master-bin.000001 367 Xid 1 394 COMMIT /* XID */
master-bin.000001 4 Format_desc 1 103 Server ver: #, Binlog ver: #
master-bin.000001 103 Query 1 210 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 210 Query 1 278 use `test`; BEGIN
master-bin.000001 278 Query 1 90 use `test`; insert into t1 values (1,2)
master-bin.000001 368 Xid 1 395 COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
......@@ -20,7 +20,7 @@ commit;
begin;
insert t2 values (5);
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
......@@ -36,7 +36,7 @@ create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
......@@ -142,7 +142,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4)
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
show binlog events in 'master-bin.000002' from 102;
show binlog events in 'master-bin.000002' from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
reset master;
......@@ -159,7 +159,7 @@ create table t1 (a int);
create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Intvar 1 # INSERT_ID=127
......@@ -175,7 +175,7 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Intvar 1 # INSERT_ID=127
......
......@@ -3,10 +3,10 @@ create table t2 (c char(30)) charset=ucs2;
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 User var 1 142 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001 142 Query 1 231 use `test`; insert into t2 values (@v)
master-bin.000001 103 User var 1 143 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001 143 Query 1 232 use `test`; insert into t2 values (@v)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
......
......@@ -8,8 +8,8 @@ insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 196 use `test`; insert into t1 select * from t2
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 197 use `test`; insert into t1 select * from t2
select * from t1;
a
1
......@@ -22,5 +22,5 @@ create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
drop table t1;
......@@ -6,7 +6,7 @@ begin;
insert into t1 values(1);
insert into t2 select * from t1;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
......@@ -21,7 +21,7 @@ insert into t2 select * from t1;
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(2)
......@@ -39,7 +39,7 @@ rollback to savepoint my_savepoint;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(3)
......@@ -65,7 +65,7 @@ select a from t1 order by a;
a
5
7
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(5)
......@@ -87,7 +87,7 @@ insert into t2 select * from t1;
select get_lock("a",10);
get_lock("a",10)
1
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(8)
......@@ -98,7 +98,7 @@ delete from t2;
reset master;
insert into t1 values(9);
insert into t2 select * from t1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
......@@ -109,14 +109,14 @@ reset master;
insert into t1 values(10);
begin;
insert into t2 select * from t1;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
......@@ -132,7 +132,7 @@ begin;
insert into t1 values(12);
insert into t2 select * from t1;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(12)
......@@ -145,7 +145,7 @@ begin;
insert into t1 values(13);
insert into t2 select * from t1;
rollback;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
delete from t1;
delete from t2;
......@@ -157,7 +157,7 @@ insert into t1 values(15);
insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(14)
......@@ -177,7 +177,7 @@ select a from t1 order by a;
a
16
18
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(16)
......@@ -227,7 +227,7 @@ insert into t2 values (3);
select get_lock("lock1",60);
get_lock("lock1",60)
1
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(16)
......@@ -331,7 +331,7 @@ SELECT * from t2;
a b
100 100
DROP TABLE t1,t2;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 values (1,1),(1,2)
master-bin.000001 # Query 1 # use `test`; DROP TABLE if exists t2
......
......@@ -6,7 +6,7 @@ CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
SHOW BINLOG EVENTS FROM 102;
SHOW BINLOG EVENTS FROM 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
......
......@@ -6,7 +6,7 @@ CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
SHOW BINLOG EVENTS FROM 102;
SHOW BINLOG EVENTS FROM 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # User var 1 # @`var1`=_binary 0x8300 COLLATE binary
......@@ -30,17 +30,17 @@ HEX(s1) HEX(s2) d
466F6F2773206120426172 ED40ED41ED42 47.93
DROP PROCEDURE bug18293|
DROP TABLE t4|
SHOW BINLOG EVENTS FROM 397|
SHOW BINLOG EVENTS FROM 398|
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 397 Query 1 560 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
master-bin.000001 398 Query 1 561 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
s2 CHAR(50) CHARACTER SET cp932,
d DECIMAL(10,2))
master-bin.000001 560 Query 1 805 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE bug18293 (IN ins1 CHAR(50),
master-bin.000001 561 Query 1 806 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE bug18293 (IN ins1 CHAR(50),
IN ins2 CHAR(50) CHARACTER SET cp932,
IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
master-bin.000001 805 Query 1 1021 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
master-bin.000001 1021 Query 1 1107 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1107 Query 1 1183 use `test`; DROP TABLE t4
master-bin.000001 806 Query 1 1022 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
master-bin.000001 1022 Query 1 1108 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1108 Query 1 1184 use `test`; DROP TABLE t4
......@@ -5,11 +5,11 @@ insert t1 values (1);
flush tables with read lock;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102
master-bin.000001 103
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102
master-bin.000001 103
unlock tables;
drop table t1;
set autocommit=1;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102
master-bin.000001 103
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
......@@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
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
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 103 # # master-bin.000001 Yes Yes 0 0 103 # None 0 No #
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
......
......@@ -13,11 +13,11 @@ 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
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 188 # None 0 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
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 188 # None 0 No #
start slave;
select * from t1;
n
......
......@@ -80,7 +80,7 @@ Master_SSL_Key
Seconds_Behind_Master #
stop slave;
delete from t3;
change master to master_log_pos=544;
change master to master_log_pos=545;
begin;
select * from t2 for update;
a
......@@ -136,7 +136,7 @@ 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=544;
change master to master_log_pos=545;
begin;
select * from t2 for update;
a
......
......@@ -24,7 +24,7 @@ Master_User root
Master_Port SLAVE_PORT
Connect_Retry 60
Master_Log_File slave-bin.000001
Read_Master_Log_Pos 212
Read_Master_Log_Pos 213
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File slave-bin.000001
......@@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 212
Exec_Master_Log_Pos 213
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
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
SET @saved = @@debug;
SET SESSION debug="d,incident_database_resync_on_replace";
REPLACE INTO t1 VALUES (4);
SET SESSION debug=@saved;
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 master-bin.000002
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 1583
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 #
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 master-bin.000002
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 #
DROP TABLE t1;
DROP TABLE t1;
......@@ -28,7 +28,7 @@ day id category name
2003-03-22 2416 a bbbbb
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
slave-bin.000001 1276
slave-bin.000001 1277
drop table t1;
drop table t2;
drop table t3;
......@@ -39,7 +39,7 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1794 # # master-bin.000001 Yes Yes # 0 0 1794 # None 0 No #
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
......@@ -49,7 +49,7 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1829 # # master-bin.000001 No No # 0 0 1829 # None 0 No #
set global sql_slave_skip_counter=1;
start slave;
set sql_log_bin=0;
......
......@@ -10,6 +10,6 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1;
select count(*) from test.t1;
count(*)
2
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
drop table test.t1;
......@@ -6,37 +6,37 @@ 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 102 <Binlog_Ignore_DB>
master-bin.000001 103 <Binlog_Ignore_DB>
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 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 Yes Yes 0 0 103 # None 0 No #
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=75;
start slave;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=75;
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 74 # # master-bin.000001 No No 0 0 74 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No No 0 0 75 # None 0 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No Yes 0 0 74 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No Yes 0 0 75 # None 0 No #
stop slave;
change master to master_log_pos=177;
change master to master_log_pos=178;
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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 178 # # master-bin.000001 No Yes 0 0 178 # None 0 No #
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102 <Binlog_Ignore_DB>
master-bin.000001 103 <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);
stop slave;
change master to master_log_pos=102;
change master to master_log_pos=103;
start slave;
select * from t1 ORDER BY n;
n
......
......@@ -109,7 +109,7 @@ a b
1 cp850_general_ci
drop database mysqltest2;
drop database mysqltest3;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest3
......
......@@ -34,14 +34,14 @@ master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # COMMIT
show binlog events from 102 limit 1;
show binlog events from 103 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=NDB
show binlog events from 102 limit 2;
show binlog events from 103 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=NDB
master-bin.000001 # Query 1 # BEGIN
show binlog events from 102 limit 2,1;
show binlog events from 103 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
flush logs;
......@@ -87,13 +87,13 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
show binary logs;
Log_name File_size
master-bin.000001 1702
master-bin.000002 593
master-bin.000001 1703
master-bin.000002 594
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1797
slave-bin.000002 198
slave-bin.000001 1798
slave-bin.000002 199
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
......@@ -126,7 +126,7 @@ slave-bin.000002 # Write_rows 2 # table_id: # flags: STMT_END_F
slave-bin.000002 # Query 2 # COMMIT
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.000002 593 # # master-bin.000002 Yes Yes # 0 0 593 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 594 # # master-bin.000002 Yes Yes # 0 0 594 # None 0 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;
......
......@@ -26,11 +26,11 @@ stop slave;
SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1)
102 master-bin1.000001
103 master-bin1.000001
CHANGE MASTER TO
master_port=<MASTER_PORT1>,
master_log_file = 'master-bin1.000001',
master_log_pos = 102 ;
master_log_pos = 103 ;
start slave;
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
DELETE FROM t1 WHERE c3 = 1;
......
......@@ -28,7 +28,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 450
Read_Master_Log_Pos 451
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -43,7 +43,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 450
Exec_Master_Log_Pos 451
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -16,7 +16,7 @@ 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
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes # 0 0 552 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 553 # # master-bin.000001 Yes Yes # 0 0 553 # None 0 No #
select * from t1;
s
Could not break slave
......@@ -27,9 +27,9 @@ insert into t2 values (34),(67),(123);
flush logs;
show binary logs;
Log_name File_size
master-bin.000001 596
master-bin.000002 367
master-bin.000003 102
master-bin.000001 597
master-bin.000002 368
master-bin.000003 103
create table t3 select * from temp_table;
select * from t3;
a
......@@ -43,21 +43,21 @@ start slave;
purge master logs to 'master-bin.000002';
show master logs;
Log_name File_size
master-bin.000002 367
master-bin.000003 411
master-bin.000002 368
master-bin.000003 412
purge binary logs to 'master-bin.000002';
show binary logs;
Log_name File_size
master-bin.000002 367
master-bin.000003 411
master-bin.000002 368
master-bin.000003 412
purge master logs before now();
show binary logs;
Log_name File_size
master-bin.000003 411
master-bin.000003 412
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
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes # 0 0 500 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 501 # # master-bin.000003 Yes Yes # 0 0 501 # None 0 No #
select * from t2;
m
34
......@@ -74,18 +74,18 @@ count(*)
create table t4 select * from temp_table;
show binary logs;
Log_name File_size
master-bin.000003 4189
master-bin.000004 4194
master-bin.000005 2036
master-bin.000003 4190
master-bin.000004 4195
master-bin.000005 2037
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000005 2036
master-bin.000005 2037
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
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2036 # # master-bin.000005 Yes Yes # 0 0 2036 # None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2037 # # master-bin.000005 Yes Yes # 0 0 2037 # None 0 No #
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
......
......@@ -24,11 +24,11 @@ SHOW TABLES;
Tables_in_test_ignore
t2
INSERT INTO t2 VALUES (3,3), (4,4);
SHOW BINLOG EVENTS FROM 102;
SHOW BINLOG EVENTS FROM 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 Query 1 195 use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 195 Table_map 1 235 table_id: # (test.t1)
master-bin.000001 235 Write_rows 1 282 table_id: # flags: STMT_END_F
master-bin.000001 103 Query 1 196 use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 196 Table_map 1 236 table_id: # (test.t1)
master-bin.000001 236 Write_rows 1 283 table_id: # flags: STMT_END_F
**** On Slave ****
SHOW DATABASES;
Database
......@@ -54,10 +54,10 @@ 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 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
master-bin.000001 227 Write_rows 1 266 table_id: # flags: STMT_END_F
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 189 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 189 Table_map 1 228 table_id: # (test.t1)
master-bin.000001 228 Write_rows 1 267 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;
......
......@@ -109,7 +109,7 @@ a b
1 cp850_general_ci
drop database mysqltest2;
drop database mysqltest3;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest3
......
......@@ -8,27 +8,27 @@ 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 212;
SHOW BINLOG EVENTS FROM 213;
Log_name #
Pos 212
Pos 213
Event_type Query
Server_id #
End_log_pos #
Info use `test`; CREATE TABLE t1 (a INT, b INT)
Log_name #
Pos 305
Pos 306
Event_type Query
Server_id #
End_log_pos #
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
Log_name #
Pos 411
Pos 412
Event_type Query
Server_id #
End_log_pos #
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
Log_name #
Pos 517
Pos 518
Event_type Query
Server_id #
End_log_pos #
......@@ -127,7 +127,7 @@ 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 1118;
SHOW BINLOG EVENTS FROM 1119;
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;
......@@ -137,11 +137,11 @@ a b
1 2
2 4
3 6
SHOW BINLOG EVENTS FROM 1118;
SHOW BINLOG EVENTS FROM 1119;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1118 Query 1 1218 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1218 Table_map 1 1258 table_id: # (test.t7)
master-bin.000001 1258 Write_rows 1 1314 table_id: # flags: STMT_END_F
master-bin.000001 1119 Query 1 1219 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1219 Table_map 1 1259 table_id: # (test.t7)
master-bin.000001 1259 Write_rows 1 1315 table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
......@@ -154,10 +154,10 @@ 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 1314;
SHOW BINLOG EVENTS FROM 1315;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1314 Table_map 1 1354 table_id: # (test.t7)
master-bin.000001 1354 Write_rows 1 1410 table_id: # flags: STMT_END_F
master-bin.000001 1315 Table_map 1 1355 table_id: # (test.t7)
master-bin.000001 1355 Write_rows 1 1411 table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
......@@ -192,10 +192,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW BINLOG EVENTS FROM 1410;
SHOW BINLOG EVENTS FROM 1411;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1410 Query 1 1496 use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 1496 Query 1 1635 use `test`; CREATE TABLE `t9` (
master-bin.000001 1411 Query 1 1497 use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 1497 Query 1 1636 use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
)
......@@ -274,33 +274,33 @@ a
3
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
master-bin.000001 271 Query 1 339 use `test`; BEGIN
master-bin.000001 339 Query 1 125 use `test`; CREATE TABLE `t2` (
master-bin.000001 4 Format_desc 1 103 Server ver: #, Binlog ver: #
master-bin.000001 103 Query 1 189 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 189 Table_map 1 228 table_id: # (test.t1)
master-bin.000001 228 Write_rows 1 272 table_id: # flags: STMT_END_F
master-bin.000001 272 Query 1 340 use `test`; BEGIN
master-bin.000001 340 Query 1 125 use `test`; CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
master-bin.000001 464 Table_map 1 164 table_id: # (test.t2)
master-bin.000001 503 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 547 Xid 1 574 COMMIT /* XID */
master-bin.000001 574 Query 1 642 use `test`; BEGIN
master-bin.000001 642 Query 1 125 use `test`; CREATE TABLE `t3` (
master-bin.000001 465 Table_map 1 164 table_id: # (test.t2)
master-bin.000001 504 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 548 Xid 1 575 COMMIT /* XID */
master-bin.000001 575 Query 1 643 use `test`; BEGIN
master-bin.000001 643 Query 1 125 use `test`; CREATE TABLE `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
master-bin.000001 767 Table_map 1 164 table_id: # (test.t3)
master-bin.000001 806 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 850 Xid 1 877 COMMIT /* XID */
master-bin.000001 877 Query 1 945 use `test`; BEGIN
master-bin.000001 945 Query 1 125 use `test`; CREATE TABLE `t4` (
master-bin.000001 768 Table_map 1 164 table_id: # (test.t3)
master-bin.000001 807 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 851 Xid 1 878 COMMIT /* XID */
master-bin.000001 878 Query 1 946 use `test`; BEGIN
master-bin.000001 946 Query 1 125 use `test`; CREATE TABLE `t4` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
master-bin.000001 1070 Table_map 1 164 table_id: # (test.t4)
master-bin.000001 1109 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 1153 Xid 1 1180 COMMIT /* XID */
master-bin.000001 1180 Table_map 1 1219 table_id: # (test.t1)
master-bin.000001 1219 Write_rows 1 1263 table_id: # flags: STMT_END_F
master-bin.000001 1071 Table_map 1 164 table_id: # (test.t4)
master-bin.000001 1110 Write_rows 1 208 table_id: # flags: STMT_END_F
master-bin.000001 1154 Xid 1 1181 COMMIT /* XID */
master-bin.000001 1181 Table_map 1 1220 table_id: # (test.t1)
master-bin.000001 1220 Write_rows 1 1264 table_id: # flags: STMT_END_F
SHOW TABLES;
Tables_in_test
t1
......@@ -365,17 +365,17 @@ a
9
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
master-bin.000001 271 Query 1 371 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
master-bin.000001 371 Query 1 439 use `test`; BEGIN
master-bin.000001 439 Table_map 1 39 table_id: # (test.t2)
master-bin.000001 478 Write_rows 1 83 table_id: # flags: STMT_END_F
master-bin.000001 522 Table_map 1 122 table_id: # (test.t2)
master-bin.000001 561 Write_rows 1 161 table_id: # flags: STMT_END_F
master-bin.000001 600 Xid 1 627 COMMIT /* XID */
master-bin.000001 4 Format_desc 1 103 Server ver: #, Binlog ver: #
master-bin.000001 103 Query 1 189 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 189 Table_map 1 228 table_id: # (test.t1)
master-bin.000001 228 Write_rows 1 272 table_id: # flags: STMT_END_F
master-bin.000001 272 Query 1 372 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
master-bin.000001 372 Query 1 440 use `test`; BEGIN
master-bin.000001 440 Table_map 1 39 table_id: # (test.t2)
master-bin.000001 479 Write_rows 1 83 table_id: # flags: STMT_END_F
master-bin.000001 523 Table_map 1 122 table_id: # (test.t2)
master-bin.000001 562 Write_rows 1 161 table_id: # flags: STMT_END_F
master-bin.000001 601 Xid 1 628 COMMIT /* XID */
SELECT * FROM t2 ORDER BY a;
a
1
......@@ -394,10 +394,10 @@ INSERT INTO t2 SELECT a+2 FROM tt2;
ROLLBACK;
SELECT * FROM t2 ORDER BY a;
a
SHOW BINLOG EVENTS FROM 627;
SHOW BINLOG EVENTS FROM 628;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 627 Query 1 80 use `test`; TRUNCATE TABLE t2
master-bin.000001 707 Xid 1 734 COMMIT /* XID */
master-bin.000001 628 Query 1 80 use `test`; TRUNCATE TABLE t2
master-bin.000001 708 Xid 1 735 COMMIT /* XID */
SELECT * FROM t2 ORDER BY a;
a
DROP TABLE t1,t2;
......@@ -16,15 +16,15 @@ a
3
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 222 use `test`; create table t1(a int not null primary key) engine=myisam
master-bin.000001 222 Table_map 1 261 table_id: # (test.t1)
master-bin.000001 261 Write_rows 1 295 table_id: # flags: STMT_END_F
master-bin.000001 295 Table_map 1 334 table_id: # (test.t1)
master-bin.000001 334 Write_rows 1 368 table_id: # flags: STMT_END_F
master-bin.000001 368 Table_map 1 407 table_id: # (test.t1)
master-bin.000001 407 Write_rows 1 441 table_id: # flags: STMT_END_F
master-bin.000001 441 Query 1 516 use `test`; flush tables
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 223 use `test`; create table t1(a int not null primary key) engine=myisam
master-bin.000001 223 Table_map 1 262 table_id: # (test.t1)
master-bin.000001 262 Write_rows 1 296 table_id: # flags: STMT_END_F
master-bin.000001 296 Table_map 1 335 table_id: # (test.t1)
master-bin.000001 335 Write_rows 1 369 table_id: # flags: STMT_END_F
master-bin.000001 369 Table_map 1 408 table_id: # (test.t1)
master-bin.000001 408 Write_rows 1 442 table_id: # flags: STMT_END_F
master-bin.000001 442 Query 1 517 use `test`; flush tables
SELECT * FROM t1 ORDER BY a;
a
1
......
......@@ -43,10 +43,10 @@ t2
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 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a int)
master-bin.000001 188 Query 1 274 use `test`; CREATE TABLE t2 (a int)
master-bin.000001 274 Query 1 378 use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 4 Format_desc 1 103 Server ver: VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 189 use `test`; CREATE TABLE t1 (a int)
master-bin.000001 189 Query 1 275 use `test`; CREATE TABLE t2 (a int)
master-bin.000001 275 Query 1 379 use `test`; DROP TABLE `t1` /* generated by server */
SHOW TABLES;
Tables_in_test
t2
......
......@@ -12,13 +12,13 @@ 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 615 ;
SHOW BINLOG EVENTS FROM 616 ;
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 615 ;
SHOW BINLOG EVENTS FROM 616 ;
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
......
......@@ -39,7 +39,7 @@ 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 519
Exec_Master_Log_Pos 520
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -26,14 +26,14 @@ 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 102 limit 1;
show binlog events from 103 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 102 limit 2;
show binlog events from 103 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 102 limit 2,1;
show binlog events from 103 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;
......@@ -67,13 +67,13 @@ 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 1256
master-bin.000002 373
master-bin.000001 1257
master-bin.000002 374
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1354
slave-bin.000002 274
slave-bin.000001 1355
slave-bin.000002 275
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
......@@ -94,7 +94,7 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 373 # # master-bin.000002 Yes Yes # 0 0 373 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 374 # # master-bin.000002 Yes Yes # 0 0 374 # None 0 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;
......
......@@ -28,14 +28,14 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not nul
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 102 limit 1;
show binlog events from 103 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 102 limit 2;
show binlog events from 103 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 102 limit 2,1;
show binlog events from 103 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;
......@@ -72,13 +72,13 @@ 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 1310
master-bin.000002 400
master-bin.000001 1311
master-bin.000002 401
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1408
slave-bin.000002 301
slave-bin.000001 1409
slave-bin.000002 302
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
......@@ -102,7 +102,7 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 400 # # master-bin.000002 Yes Yes # 0 0 400 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 401 # # master-bin.000002 Yes Yes # 0 0 401 # None 0 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;
......
......@@ -30,7 +30,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 58664
Read_Master_Log_Pos 58665
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 58664
Exec_Master_Log_Pos 58665
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -73,7 +73,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 58664
Read_Master_Log_Pos 58665
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -88,7 +88,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 58664
Exec_Master_Log_Pos 58665
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -116,7 +116,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 58664
Read_Master_Log_Pos 58665
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 58664
Exec_Master_Log_Pos 58665
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -197,7 +197,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 58750
Read_Master_Log_Pos 58751
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -212,7 +212,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 58750
Exec_Master_Log_Pos 58751
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -236,7 +236,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 58826
Read_Master_Log_Pos 58827
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -251,7 +251,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 58826
Exec_Master_Log_Pos 58827
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -266,7 +266,7 @@ Seconds_Behind_Master #
flush logs;
show master status;
File master-bin.000002
Position 102
Position 103
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
set global max_binlog_size= @my_max_binlog_size;
......
......@@ -6,12 +6,12 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 Yes Yes # 0 0 103 # None 0 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
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 No No # 0 0 103 # None 0 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
......@@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 Yes Yes # 0 0 103 # None 0 No #
stop slave;
reset slave;
start slave;
......
......@@ -21,7 +21,7 @@ n
4
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_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-bin.000001 311 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 741 slave-relay-bin.000004 # master-bin.000001 # No 0 0 312 # Master master-bin.000001 311 No #
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
......@@ -31,7 +31,7 @@ n
4
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_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-no-such-bin.000001 291 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 741 slave-relay-bin.000004 # master-bin.000001 # No 0 0 312 # Master master-no-such-bin.000001 291 No #
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
select * from t2;
n
......@@ -39,13 +39,13 @@ n
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
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 586 # Relay slave-relay-bin.000004 728 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 741 slave-relay-bin.000004 # master-bin.000001 # No 0 0 587 # Relay slave-relay-bin.000004 728 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 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_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 740 # Master master-bin.000001 740 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 741 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 741 # Master master-bin.000001 740 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;
......
......@@ -10,7 +10,7 @@ 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
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 102 None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 103 None 0 No NULL
start slave;
insert into t1 values (1);
show status like "slave_running";
......
......@@ -10,7 +10,7 @@ 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
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 102 None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 103 None 0 No NULL
start slave;
insert into t1 values (1);
select * from t1;
......
......@@ -381,7 +381,7 @@ return 0;
end|
use mysqltest;
set @a:= mysqltest2.f1();
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 103;
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
......
......@@ -103,7 +103,7 @@ a b
1 cp850_general_ci
drop database mysqltest2;
drop database mysqltest3;
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest3
......
......@@ -12,13 +12,13 @@ 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 652 ;
SHOW BINLOG EVENTS FROM 653 ;
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 652 ;
SHOW BINLOG EVENTS FROM 653 ;
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
......
......@@ -26,14 +26,14 @@ 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 102 limit 1;
show binlog events from 103 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 102 limit 2;
show binlog events from 103 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 102 limit 2,1;
show binlog events from 103 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;
......@@ -66,13 +66,13 @@ 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 1343
master-bin.000002 388
master-bin.000001 1344
master-bin.000002 389
start slave;
show binary logs;
Log_name File_size
slave-bin.000001 1443
slave-bin.000002 289
slave-bin.000001 1444
slave-bin.000002 290
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
......@@ -92,7 +92,7 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 389 # # master-bin.000002 Yes Yes # 0 0 389 # None 0 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;
......
......@@ -28,7 +28,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72956
Read_Master_Log_Pos 72957
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -43,7 +43,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72956
Exec_Master_Log_Pos 72957
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -71,7 +71,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72956
Read_Master_Log_Pos 72957
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -86,7 +86,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72956
Exec_Master_Log_Pos 72957
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -114,7 +114,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72956
Read_Master_Log_Pos 72957
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -129,7 +129,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72956
Exec_Master_Log_Pos 72957
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -195,7 +195,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 73042
Read_Master_Log_Pos 73043
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -210,7 +210,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 73042
Exec_Master_Log_Pos 73043
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -234,7 +234,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 73118
Read_Master_Log_Pos 73119
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -249,7 +249,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 73118
Exec_Master_Log_Pos 73119
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -264,7 +264,7 @@ Seconds_Behind_Master #
flush logs;
show master status;
File master-bin.000002
Position 102
Position 103
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
set global max_binlog_size= @my_max_binlog_size;
......
......@@ -19,7 +19,7 @@ n
3
4
5
show binlog events from 102;
show binlog events from 103;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest
master-bin.000001 # Query 1 # create database mysqltest
......
......@@ -6,12 +6,12 @@ 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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 Yes Yes # 0 0 103 # None 0 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
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 No No # 0 0 103 # None 0 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
......@@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
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
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 103 # # master-bin.000001 Yes Yes # 0 0 103 # None 0 No #
stop slave;
reset slave;
start slave;
......
......@@ -26,7 +26,7 @@ Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 780
Read_Master_Log_Pos 781
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -41,7 +41,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 323
Exec_Master_Log_Pos 324
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
......@@ -67,7 +67,7 @@ Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 780
Read_Master_Log_Pos 781
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -82,7 +82,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 323
Exec_Master_Log_Pos 324
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-no-such-bin.000001
......@@ -106,7 +106,7 @@ Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 780
Read_Master_Log_Pos 781
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -121,7 +121,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 612
Exec_Master_Log_Pos 613
Relay_Log_Space #
Until_Condition Relay
Until_Log_File slave-relay-bin.000004
......@@ -143,7 +143,7 @@ Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 780
Read_Master_Log_Pos 781
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -158,7 +158,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 780
Exec_Master_Log_Pos 781
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
......
......@@ -404,84 +404,84 @@ CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
show binlog events from 102;
show binlog events from <binlog_start>;
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 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_8_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_9_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_10_")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_11_"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_13_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_14_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_15_")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_16_"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_18_")
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_21_"
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_24_"
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t2` (
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 # User var # # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_")
master-bin.000001 # User var # # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_")
master-bin.000001 # User var # # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t3` (
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 1 # table_id: # (mysqltest1.t3)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t4` (
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 1 # table_id: # (mysqltest1.t4)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # 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 1 # table_id: # (mysqltest1.t5)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2()
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_");
......@@ -490,308 +490,308 @@ 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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100))
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello')))
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world')))
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
master-bin.000001 # Query 1 # use `mysqltest1`; drop function foo3
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned
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 1 # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_')
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid()
master-bin.000001 # Query 1 # use `mysqltest1`; create table t11 (data varchar(255))
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # 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 1 # 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 1 # 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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row
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 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; create table t20 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t21 select * from t2
master-bin.000001 # Query 1 # use `mysqltest1`; create table t22 select * from t3
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1,t2,t3
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; create table t3 (b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_44_")
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
master-bin.000001 # Intvar 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_')
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f
master-bin.000001 # Query 1 # use `mysqltest1`; create table t14 (unique (a)) select * from t2
master-bin.000001 # Query 1 # use `mysqltest1`; truncate table t2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
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 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_')
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_')
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; alter table t1 modify a int, drop primary key
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_57_")
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t16` (
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 1 # table_id: # (mysqltest1.t16)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
show binlog events from 102;
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 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 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_8_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_9_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_10_")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_11_"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_13_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_14_")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_15_")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_16_"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_18_")
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_21_"
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_24_"
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t2` (
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 # User var # # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_")
master-bin.000001 # User var # # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_")
master-bin.000001 # User var # # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 # User var # # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select @'string'
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t3` (
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 1 # table_id: # (mysqltest1.t3)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t4` (
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 1 # table_id: # (mysqltest1.t4)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # 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 1 # table_id: # (mysqltest1.t5)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2()
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_");
......@@ -800,228 +800,228 @@ 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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100))
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello')))
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world')))
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
master-bin.000001 # Query 1 # use `mysqltest1`; drop function foo3
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned
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 1 # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_')
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid()
master-bin.000001 # Query 1 # use `mysqltest1`; create table t11 (data varchar(255))
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # 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 1 # 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 1 # 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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row
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 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; create table t20 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t21 select * from t2
master-bin.000001 # Query 1 # use `mysqltest1`; create table t22 select * from t3
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1,t2,t3
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; create table t3 (b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic
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 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_44_")
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
master-bin.000001 # Intvar 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_')
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f
master-bin.000001 # Query 1 # use `mysqltest1`; create table t14 (unique (a)) select * from t2
master-bin.000001 # Query 1 # use `mysqltest1`; truncate table t2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic
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 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
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 1 # INSERT_ID=4
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_')
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_')
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
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 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; alter table t1 modify a int, drop primary key
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_57_")
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t16` (
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 1 # table_id: # (mysqltest1.t16)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows 1 # 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 # 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;
......@@ -31,11 +31,11 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Query 1 307 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Query 1 387 use `test`; TRUNCATE TABLE t1
master-bin.000001 387 Query 1 463 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Query 1 308 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Query 1 388 use `test`; TRUNCATE TABLE t1
master-bin.000001 388 Query 1 464 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
......@@ -63,11 +63,11 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Query 1 307 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Query 1 387 use `test`; TRUNCATE TABLE t1
master-bin.000001 387 Query 1 463 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Query 1 308 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Query 1 388 use `test`; TRUNCATE TABLE t1
master-bin.000001 388 Query 1 464 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
......@@ -95,12 +95,12 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Table_map 1 250 table_id: # (test.t1)
master-bin.000001 250 Write_rows 1 297 table_id: # flags: STMT_END_F
master-bin.000001 297 Query 1 377 use `test`; TRUNCATE TABLE t1
master-bin.000001 377 Query 1 453 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Table_map 1 251 table_id: # (test.t1)
master-bin.000001 251 Write_rows 1 298 table_id: # flags: STMT_END_F
master-bin.000001 298 Query 1 378 use `test`; TRUNCATE TABLE t1
master-bin.000001 378 Query 1 454 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
......@@ -128,11 +128,11 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Query 1 307 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Query 1 384 use `test`; DELETE FROM t1
master-bin.000001 384 Query 1 460 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Query 1 308 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Query 1 385 use `test`; DELETE FROM t1
master-bin.000001 385 Query 1 461 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
......@@ -160,11 +160,11 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Query 1 307 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Query 1 384 use `test`; DELETE FROM t1
master-bin.000001 384 Query 1 460 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Query 1 308 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Query 1 385 use `test`; DELETE FROM t1
master-bin.000001 385 Query 1 461 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
......@@ -193,10 +193,10 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 210 Table_map 1 250 table_id: # (test.t1)
master-bin.000001 250 Write_rows 1 297 table_id: # flags: STMT_END_F
master-bin.000001 297 Table_map 1 337 table_id: # (test.t1)
master-bin.000001 337 Delete_rows 1 384 table_id: # flags: STMT_END_F
master-bin.000001 384 Query 1 460 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 211 Table_map 1 251 table_id: # (test.t1)
master-bin.000001 251 Write_rows 1 298 table_id: # flags: STMT_END_F
master-bin.000001 298 Table_map 1 338 table_id: # (test.t1)
master-bin.000001 338 Delete_rows 1 385 table_id: # flags: STMT_END_F
master-bin.000001 385 Query 1 461 use `test`; DROP TABLE t1
......@@ -31,13 +31,13 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Xid 1 334 COMMIT /* xid= */
master-bin.000001 334 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 414 Xid 1 441 COMMIT /* xid= */
master-bin.000001 441 Query 1 517 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Xid 1 335 COMMIT /* xid= */
master-bin.000001 335 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 415 Xid 1 442 COMMIT /* xid= */
master-bin.000001 442 Query 1 518 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
......@@ -65,13 +65,13 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Xid 1 334 COMMIT /* xid= */
master-bin.000001 334 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 414 Xid 1 441 COMMIT /* xid= */
master-bin.000001 441 Query 1 517 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Xid 1 335 COMMIT /* xid= */
master-bin.000001 335 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 415 Xid 1 442 COMMIT /* xid= */
master-bin.000001 442 Query 1 518 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
......@@ -99,14 +99,14 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 250 Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 297 Xid 1 324 COMMIT /* xid= */
master-bin.000001 324 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 404 Xid 1 431 COMMIT /* xid= */
master-bin.000001 431 Query 1 507 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 251 Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 298 Xid 1 325 COMMIT /* xid= */
master-bin.000001 325 Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 405 Xid 1 432 COMMIT /* xid= */
master-bin.000001 432 Query 1 508 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
......@@ -134,13 +134,13 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Xid 1 334 COMMIT /* xid= */
master-bin.000001 334 Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 411 Xid 1 438 COMMIT /* xid= */
master-bin.000001 438 Query 1 514 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Xid 1 335 COMMIT /* xid= */
master-bin.000001 335 Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 412 Xid 1 439 COMMIT /* xid= */
master-bin.000001 439 Query 1 515 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
......@@ -168,13 +168,13 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 307 Xid 1 334 COMMIT /* xid= */
master-bin.000001 334 Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 411 Xid 1 438 COMMIT /* xid= */
master-bin.000001 438 Query 1 514 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 308 Xid 1 335 COMMIT /* xid= */
master-bin.000001 335 Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 412 Xid 1 439 COMMIT /* xid= */
master-bin.000001 439 Query 1 515 use `test`; DROP TABLE t1
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
......@@ -203,12 +203,12 @@ a b
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 210 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 210 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 250 Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 297 Xid 1 324 COMMIT /* xid= */
master-bin.000001 324 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 364 Delete_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 411 Xid 1 438 COMMIT /* xid= */
master-bin.000001 438 Query 1 514 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 211 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 211 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 251 Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 298 Xid 1 325 COMMIT /* xid= */
master-bin.000001 325 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 365 Delete_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 412 Xid 1 439 COMMIT /* xid= */
master-bin.000001 439 Query 1 515 use `test`; DROP TABLE t1
......@@ -29,16 +29,16 @@ a b
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 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 378 Write_rows 1 137 table_id: #
master-bin.000001 420 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 467 Query 1 532 COMMIT
master-bin.000001 532 Query 1 612 use `test`; TRUNCATE TABLE t1
master-bin.000001 612 Query 1 688 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 220 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 220 Query 1 284 BEGIN
master-bin.000001 284 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 324 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 379 Write_rows 1 137 table_id: #
master-bin.000001 421 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 468 Query 1 533 COMMIT
master-bin.000001 533 Query 1 613 use `test`; TRUNCATE TABLE t1
master-bin.000001 613 Query 1 689 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);
......@@ -65,27 +65,27 @@ a b
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 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 378 Write_rows 1 137 table_id: #
master-bin.000001 420 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 467 Query 1 532 COMMIT
master-bin.000001 532 Query 1 612 use `test`; TRUNCATE TABLE t1
master-bin.000001 612 Query 1 688 use `test`; DROP TABLE t1
master-bin.000001 688 Query 1 805 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 805 Query 1 869 BEGIN
master-bin.000001 869 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 909 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 964 Write_rows 1 137 table_id: #
master-bin.000001 1006 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 1053 Query 1 1118 COMMIT
master-bin.000001 1118 Query 1 1182 BEGIN
master-bin.000001 1182 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 1222 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 1277 Write_rows 1 137 table_id: #
master-bin.000001 1319 Delete_rows 1 176 table_id: # flags: STMT_END_F
master-bin.000001 1358 Query 1 1423 COMMIT
master-bin.000001 1423 Query 1 1499 use `test`; DROP TABLE t1
master-bin.000001 4 Format_desc 1 103 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 103 Query 1 220 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 220 Query 1 284 BEGIN
master-bin.000001 284 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 324 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 379 Write_rows 1 137 table_id: #
master-bin.000001 421 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 468 Query 1 533 COMMIT
master-bin.000001 533 Query 1 613 use `test`; TRUNCATE TABLE t1
master-bin.000001 613 Query 1 689 use `test`; DROP TABLE t1
master-bin.000001 689 Query 1 806 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 806 Query 1 870 BEGIN
master-bin.000001 870 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 910 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 965 Write_rows 1 137 table_id: #
master-bin.000001 1007 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 1054 Query 1 1119 COMMIT
master-bin.000001 1119 Query 1 1183 BEGIN
master-bin.000001 1183 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 1223 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 1278 Write_rows 1 137 table_id: #
master-bin.000001 1320 Delete_rows 1 176 table_id: # flags: STMT_END_F
master-bin.000001 1359 Query 1 1424 COMMIT
master-bin.000001 1424 Query 1 1500 use `test`; DROP TABLE t1
......@@ -6,13 +6,13 @@ INSERT INTO t1 VALUES(@`a b`);
set @var1= "';aaa";
SET @var2=char(ascii('a'));
insert into t1 values (@var1),(@var2);
show binlog events from 102;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # User var 1 # @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 # User var 1 # @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 # User var 1 # @`var2`=_binary 0x61 COLLATE binary
master-bin.000001 # Query 1 # use `test`; insert into t1 values (@var1),(@var2)
master-bin.000001 # User var # # @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 # User var # # @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 # User var # # @`var2`=_binary 0x61 COLLATE binary
master-bin.000001 # Query # # use `test`; insert into t1 values (@var1),(@var2)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
......
......@@ -20,7 +20,7 @@
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
# and does not make slave to stop)
flush logs;
--exec $MYSQL_BINLOG --start-position=516 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--exec $MYSQL_BINLOG --start-position=517 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
......
......@@ -12,7 +12,7 @@
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
# and does not make slave to stop)
flush logs;
--exec $MYSQL_BINLOG --start-position=551 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--exec $MYSQL_BINLOG --start-position=552 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
......
......@@ -22,7 +22,7 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
SELECT HEX(s1),HEX(s2),d FROM t4|
DROP PROCEDURE bug18293|
DROP TABLE t4|
SHOW BINLOG EVENTS FROM 397|
SHOW BINLOG EVENTS FROM 398|
delimiter ;|
# End of 5.0 tests
......
......@@ -65,7 +65,7 @@ select "--- --database --" as "";
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=235 $MYSQLTEST_VARDIR/log/master-bin.000002
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=236 $MYSQLTEST_VARDIR/log/master-bin.000002
# These are tests for remote binlog.
# They should return the same as previous test.
......@@ -97,7 +97,7 @@ select "--- --database --" as "";
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=235 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=236 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
# Bug#7853 (mysqlbinlog does not accept input from stdin)
--disable_query_log
......
......@@ -52,11 +52,11 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQLTEST_VARDIR/log/master-bin.000001
--exec $MYSQL_BINLOG --short-form --start-position=605 $MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --stop-position=604 $MYSQLTEST_VARDIR/log/master-bin.000001
--exec $MYSQL_BINLOG --short-form --stop-position=605 $MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
......@@ -82,11 +82,11 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--exec $MYSQL_BINLOG --short-form --start-position=605 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --stop-position=130 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--exec $MYSQL_BINLOG --short-form --stop-position=131 $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
......@@ -109,11 +109,11 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --start-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--exec $MYSQL_BINLOG --short-form --start-position=605 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --stop-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--exec $MYSQL_BINLOG --short-form --stop-position=605 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
......@@ -136,11 +136,11 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --start-position=604 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--exec $MYSQL_BINLOG --short-form --start-position=605 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
--exec $MYSQL_BINLOG --short-form --stop-position=130 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--exec $MYSQL_BINLOG --short-form --stop-position=131 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
......
--source include/master-slave.inc
--source include/have_debug.inc
--echo **** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1;
SET @saved = @@debug;
SET SESSION debug="d,incident_database_resync_on_replace";
# This will generate an incident log event and store it in the binary
# log before the replace statement.
REPLACE INTO t1 VALUES (4);
SET SESSION debug=@saved;
--save_master_pos
SELECT * FROM t1;
connection slave;
--wait_for_slave_to_stop
# The 4 should not be inserted into the table, since the incident log
# event should have stop the slave.
--echo **** On Slave ****
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
--sync_with_master
# Now, we should have inserted the row into the table and the slave
# should be running. We should also have rotated to a new binary log.
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
DROP TABLE t1;
connection master;
DROP TABLE t1;
......@@ -20,9 +20,8 @@ save_master_pos;
connection slave;
sync_with_master;
select count(*) from test.t1; # check that LOAD was replicated
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102; # should be nothing
# Should be nothing
source include/show_binlog_events.inc;
# Cleanup
connection master;
......
......@@ -18,12 +18,12 @@ sync_slave_with_master;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=75;
start slave;
sleep 5;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=75;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
......@@ -33,7 +33,7 @@ sleep 5;
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave;
change master to master_log_pos=177;
change master to master_log_pos=178;
start slave;
sleep 2;
--replace_result $MASTER_MYPORT MASTER_PORT
......@@ -49,7 +49,7 @@ insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
stop slave;
change master to master_log_pos=102;
change master to master_log_pos=103;
start slave;
sync_with_master;
select * from t1 ORDER BY n;
......
......@@ -25,7 +25,7 @@ CREATE TABLE t2 (a INT, b INT);
SHOW TABLES;
INSERT INTO t2 VALUES (3,3), (4,4);
--replace_regex /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 102;
SHOW BINLOG EVENTS FROM 103;
sync_slave_with_master;
--echo **** On Slave ****
SHOW DATABASES;
......
......@@ -36,7 +36,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
--replace_column 1 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
--query_vertical SHOW BINLOG EVENTS FROM 212
--query_vertical SHOW BINLOG EVENTS FROM 213
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
--query_vertical SHOW CREATE TABLE t2
......@@ -71,7 +71,7 @@ connection master;
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1118;
SHOW BINLOG EVENTS FROM 1119;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
......@@ -80,7 +80,7 @@ INSERT INTO t7 SELECT a,b FROM tt3;
SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1118;
SHOW BINLOG EVENTS FROM 1119;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
......@@ -91,7 +91,7 @@ BEGIN;
INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1314;
SHOW BINLOG EVENTS FROM 1315;
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
......@@ -106,7 +106,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
--query_vertical SHOW CREATE TABLE t8
--query_vertical SHOW CREATE TABLE t9
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1410;
SHOW BINLOG EVENTS FROM 1411;
sync_slave_with_master;
--echo **** On Slave ****
--query_vertical SHOW CREATE TABLE t8
......@@ -220,7 +220,7 @@ ROLLBACK;
SELECT * FROM t2 ORDER BY a;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 627;
SHOW BINLOG EVENTS FROM 628;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
......
# depends on the binlog output
-- source include/have_binlog_format_row.inc
let $rename_event_pos= 615;
let $rename_event_pos= 616;
# Bug#18326: Do not lock table for writing during prepare of statement
# The use of the ps protocol causes extra table maps in the binlog, so
......
......@@ -162,12 +162,12 @@ connection master;
# this test for position option
# By setting this position to 412, we should only get the create of t3
# By setting this position to 413, we should only get the create of t3
--disable_query_log
select "--- Test 2 position test --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=412 $MYSQLTEST_VARDIR/log/master-bin.000001
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=413 $MYSQLTEST_VARDIR/log/master-bin.000001
# These are tests for remote binlog.
# They should return the same as previous test.
......@@ -263,7 +263,7 @@ select "--- Test 6 reading stdin --" as "";
select "--- Test 7 reading stdin w/position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --position=412 - < $MYSQLTEST_VARDIR/log/master-bin.000001
--exec $MYSQL_BINLOG --short-form --position=413 - < $MYSQLTEST_VARDIR/log/master-bin.000001
# Bug#16217 (mysql client did not know how not switch its internal charset)
--disable_query_log
......
......@@ -566,7 +566,7 @@ connection master;
# were written to the binary log.
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events in 'master-bin.000001' from 102;
show binlog events in 'master-bin.000001' from 103;
# Restore log_bin_trust_function_creators to its original value.
......
# depends on the binlog output
--source include/have_binlog_format_mixed_or_statement.inc
let $rename_event_pos= 652;
let $rename_event_pos= 653;
-- source extra/rpl_tests/rpl_flsh_tbls.test
# End of 4.1 tests
......
......@@ -517,9 +517,7 @@ LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
source include/show_binlog_events.inc;
sync_slave_with_master;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
......@@ -534,9 +532,7 @@ sync_slave_with_master;
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
connection master;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
source include/show_binlog_events.inc;
# Now test that mysqlbinlog works fine on a binlog generated by the
# mixed mode
......
......@@ -13,9 +13,8 @@ INSERT INTO t1 VALUES(@`a b`);
set @var1= "';aaa";
SET @var2=char(ascii('a'));
insert into t1 values (@var1),(@var2);
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
source include/show_binlog_events.inc;
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# escaped).
......
......@@ -51,7 +51,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
sql_error.h field.h handler.h mysqld_suffix.h \
ha_partition.h \
ha_ndbcluster.h ha_ndbcluster_binlog.h \
ha_ndbcluster_tables.h \
ha_ndbcluster_tables.h rpl_constants.h \
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
log.h sql_show.h rpl_rli.h rpl_mi.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h \
......
......@@ -321,7 +321,7 @@ static bool write_str(IO_CACHE *file, char *str, uint length)
read_str()
*/
static inline int read_str(char **buf, char *buf_end, char **str,
static inline int read_str(const char **buf, const char *buf_end, const char **str,
uint8 *len)
{
if (*buf + ((uint) (uchar) **buf) >= buf_end)
......@@ -434,6 +434,7 @@ const char* Log_event::get_type_str()
case DELETE_ROWS_EVENT: return "Delete_rows";
case BEGIN_LOAD_QUERY_EVENT: return "Begin_load_query";
case EXECUTE_LOAD_QUERY_EVENT: return "Execute_load_query";
case INCIDENT_EVENT: return "Incident";
default: return "Unknown"; /* impossible */
}
}
......@@ -1011,7 +1012,10 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
ev = new Begin_load_query_log_event(buf, event_len, description_event);
break;
case EXECUTE_LOAD_QUERY_EVENT:
ev = new Execute_load_query_log_event(buf, event_len, description_event);
ev= new Execute_load_query_log_event(buf, event_len, description_event);
break;
case INCIDENT_EVENT:
ev = new Incident_log_event(buf, event_len, description_event);
break;
default:
DBUG_PRINT("error",("Unknown evernt code: %d",(int) buf[EVENT_TYPE_OFFSET]));
......@@ -2420,6 +2424,7 @@ Format_description_log_event(uint8 binlog_ver, const char* server_ver)
post_header_len[DELETE_ROWS_EVENT-1]= 6;);
post_header_len[BEGIN_LOAD_QUERY_EVENT-1]= post_header_len[APPEND_BLOCK_EVENT-1];
post_header_len[EXECUTE_LOAD_QUERY_EVENT-1]= EXECUTE_LOAD_QUERY_HEADER_LEN;
post_header_len[INCIDENT_EVENT-1]= INCIDENT_HEADER_LEN;
}
break;
......@@ -5291,7 +5296,7 @@ bool sql_ex_info::write_data(IO_CACHE* file)
sql_ex_info::init()
*/
char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format)
char *sql_ex_info::init(char *buf, char *buf_end, bool use_new_format)
{
cached_new_format = use_new_format;
if (use_new_format)
......@@ -5304,11 +5309,12 @@ char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format)
the case when we have old format because we will be reusing net buffer
to read the actual file before we write out the Create_file event.
*/
if (read_str(&buf, buf_end, &field_term, &field_term_len) ||
read_str(&buf, buf_end, &enclosed, &enclosed_len) ||
read_str(&buf, buf_end, &line_term, &line_term_len) ||
read_str(&buf, buf_end, &line_start, &line_start_len) ||
read_str(&buf, buf_end, &escaped, &escaped_len))
const char *ptr= buf;
if (read_str(&ptr, buf_end, (const char **) &field_term, &field_term_len) ||
read_str(&ptr, buf_end, (const char **) &enclosed, &enclosed_len) ||
read_str(&ptr, buf_end, (const char **) &line_term, &line_term_len) ||
read_str(&ptr, buf_end, (const char **) &line_start, &line_start_len) ||
read_str(&ptr, buf_end, (const char **) &escaped, &escaped_len))
return 0;
opt_flags = *buf++;
}
......@@ -7337,3 +7343,113 @@ void Update_rows_log_event::print(FILE *file,
}
#endif
Incident_log_event::Incident_log_event(const char *buf, uint event_len,
const Format_description_log_event *descr_event)
: Log_event(buf, descr_event)
{
DBUG_ENTER("Incident_log_event::Incident_log_event");
uint8 const common_header_len=
descr_event->common_header_len;
uint8 const post_header_len=
descr_event->post_header_len[INCIDENT_EVENT-1];
DBUG_PRINT("info",("event_len: %u; common_header_len: %d; post_header_len: %d",
event_len, common_header_len, post_header_len));
m_incident= static_cast<Incident>(uint2korr(buf + common_header_len));
char const *ptr= buf + common_header_len + post_header_len;
char const *const str_end= buf + event_len;
uint8 len;
const char *str;
read_str(&ptr, str_end, &str, &len);
m_message.str= const_cast<char*>(str);
m_message.length= len;
DBUG_PRINT("info", ("m_incident: %d", m_incident));
DBUG_VOID_RETURN;
}
Incident_log_event::~Incident_log_event()
{
}
const char *
Incident_log_event::description() const
{
static const char *const description[]= {
"NOTHING", // Not used
"LOST_EVENTS"
};
DBUG_PRINT("info", ("m_incident: %d", m_incident));
DBUG_ASSERT(0 <= m_incident);
DBUG_ASSERT((my_size_t) m_incident <= sizeof(description)/sizeof(*description));
return description[m_incident];
}
#ifndef MYSQL_CLIENT
void Incident_log_event::pack_info(Protocol *protocol)
{
char buf[256];
my_size_t bytes;
if (m_message.length > 0)
bytes= my_snprintf(buf, sizeof(buf), "#%d (%s)",
m_incident, description());
else
bytes= my_snprintf(buf, sizeof(buf), "#%d (%s): %s",
m_incident, description(), m_message.str);
protocol->store(buf, bytes, &my_charset_bin);
}
#endif
#ifdef MYSQL_CLIENT
void
Incident_log_event::print(FILE *file,
PRINT_EVENT_INFO *print_event_info)
{
if (print_event_info->short_form)
return;
Write_on_release_cache cache(&print_event_info->head_cache, file);
print_header(&cache, print_event_info, FALSE);
my_b_printf(&cache, "\n# Incident: %s", description());
}
#endif
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
int
Incident_log_event::exec_event(st_relay_log_info *rli)
{
DBUG_ENTER("Incident_log_event::exec_event");
slave_print_msg(ERROR_LEVEL, rli, ER_SLAVE_INCIDENT,
ER(ER_SLAVE_INCIDENT),
description(),
m_message.length > 0 ? m_message.str : "<none>");
DBUG_RETURN(1);
}
#endif
bool
Incident_log_event::write_data_header(IO_CACHE *file)
{
DBUG_ENTER("Incident_log_event::write_data_header");
DBUG_PRINT("enter", ("m_incident: %d", m_incident));
byte buf[sizeof(int16)];
int2store(buf, (int16) m_incident);
DBUG_RETURN(my_b_safe_write(file, buf, sizeof(buf)));
}
bool
Incident_log_event::write_data_body(IO_CACHE *file)
{
DBUG_ENTER("Incident_log_event::write_data_body");
DBUG_RETURN(write_str(file, m_message.str, m_message.length));
}
......@@ -22,6 +22,7 @@
#endif
#include <my_bitmap.h>
#include "rpl_constants.h"
#define LOG_READ_EOF -1
#define LOG_READ_BOGUS -2
......@@ -198,7 +199,7 @@ struct sql_ex_info
#define TABLE_MAP_HEADER_LEN 8
#define EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN (4 + 4 + 4 + 1)
#define EXECUTE_LOAD_QUERY_HEADER_LEN (QUERY_HEADER_LEN + EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN)
#define INCIDENT_HEADER_LEN 2
/*
Max number of possible extra bytes in a replication event compared to a
packet (i.e. a query) sent from client to master;
......@@ -472,6 +473,11 @@ enum Log_event_type
UPDATE_ROWS_EVENT = 21,
DELETE_ROWS_EVENT = 22,
/*
Something out of the ordinary happened on the master
*/
INCIDENT_EVENT= 23,
/*
Add new events here - right above this comment!
Existing events (except ENUM_END_EVENT) should never change their numbers
......@@ -2207,4 +2213,94 @@ private:
#endif
};
/**
Class representing an incident, an occurance out of the ordinary,
that happened on the master.
The event is used to inform the slave that something out of the
ordinary happened on the master that might cause the database to be
in an inconsistent state.
<table id="IncidentFormat">
<caption>Incident event format</caption>
<tr>
<th>Symbol</th>
<th>Size<br/>(bytes)</th>
<th>Description</th>
</tr>
<tr>
<td>INCIDENT</td>
<td align="right">2</td>
<td>Incident number as an unsigned integer</td>
</tr>
<tr>
<td>MSGLEN</td>
<td align="right">1</td>
<td>Message length as an unsigned integer</td>
</tr>
<tr>
<td>MESSAGE</td>
<td align="right">MSGLEN</td>
<td>The message, if present. Not null terminated.</td>
</tr>
</table>
*/
class Incident_log_event : public Log_event {
public:
#ifndef MYSQL_CLIENT
Incident_log_event(THD *thd_arg, Incident incident)
: Log_event(thd_arg, 0, FALSE), m_incident(incident)
{
DBUG_ENTER("Incident_log_event::Incident_log_event");
DBUG_PRINT("enter", ("m_incident: %d", m_incident));
m_message.str= NULL; /* Just as a precaution */
m_message.length= 0;
DBUG_VOID_RETURN;
}
Incident_log_event(THD *thd_arg, Incident incident, LEX_STRING const msg)
: Log_event(thd_arg, 0, FALSE), m_incident(incident)
{
DBUG_ENTER("Incident_log_event::Incident_log_event");
DBUG_PRINT("enter", ("m_incident: %d", m_incident));
m_message= msg;
DBUG_VOID_RETURN;
}
#endif
#ifndef MYSQL_CLIENT
void pack_info(Protocol*);
#endif
Incident_log_event(const char *buf, uint event_len,
const Format_description_log_event *descr_event);
virtual ~Incident_log_event();
#ifdef MYSQL_CLIENT
virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
#endif
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
virtual int exec_event(struct st_relay_log_info *rli);
#endif
virtual bool write_data_header(IO_CACHE *file);
virtual bool write_data_body(IO_CACHE *file);
virtual Log_event_type get_type_code() { return INCIDENT_EVENT; }
virtual bool is_valid() const { return 1; }
virtual int get_data_size() {
return INCIDENT_HEADER_LEN + 1 + m_message.length;
}
private:
const char *description() const;
Incident m_incident;
LEX_STRING m_message;
};
#endif /* _log_event_h */
#ifndef RPL_CONSTANTS_H
#define RPL_CONSTANTS_H
/**
Enumeration of the incidents that can occur for the server.
*/
enum Incident {
/** No incident */
INCIDENT_NONE,
/** There are possibly lost events in the replication stream */
INCIDENT_LOST_EVENTS,
/** Shall be last event of the enumeration */
INCIDENT_COUNT
};
#endif /* RPL_CONSTANTS_H */
......@@ -188,3 +188,21 @@ void injector::new_trans(THD *thd, injector::transaction *ptr)
DBUG_VOID_RETURN;
}
int injector::record_incident(THD *thd, Incident incident)
{
Incident_log_event ev(thd, incident);
if (int error= mysql_bin_log.write(&ev))
return error;
mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
return 0;
}
int injector::record_incident(THD *thd, Incident incident, LEX_STRING message)
{
Incident_log_event ev(thd, incident, message);
if (int error= mysql_bin_log.write(&ev))
return error;
mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
return 0;
}
......@@ -18,9 +18,10 @@
/* Pull in 'byte', 'my_off_t', and 'uint32' */
#include <my_global.h>
#include <my_bitmap.h>
#include "rpl_constants.h"
/* Forward declarations */
class handler;
class MYSQL_BIN_LOG;
......@@ -320,6 +321,9 @@ public:
transaction new_trans(THD *);
void new_trans(THD *, transaction *);
int record_incident(THD*, Incident incident);
int record_incident(THD*, Incident incident, LEX_STRING message);
private:
explicit injector();
~injector() { } /* Nothing needs to be done */
......
......@@ -6021,3 +6021,5 @@ ER_NATIVE_FCT_NAME_COLLISION
eng "This function '%-.64s' has the same name as a native function."
ER_BINLOG_PURGE_EMFILE
eng "Too many files opened, please execute the command again"
ER_SLAVE_INCIDENT
eng "The incident %s occured on the master. Message: %-.64s"
......@@ -3439,6 +3439,36 @@ end_with_restore_list:
break;
}
case SQLCOM_REPLACE:
#ifndef DBUG_OFF
if (mysql_bin_log.is_open())
{
/*
Generate an incident log event before writing the real event
to the binary log. We put this event is before the statement
since that makes it simpler to check that the statement was
not executed on the slave (since incidents usually stop the
slave).
Observe that any row events that are generated will be
generated before.
This is only for testing purposes and will not be present in a
release build.
*/
Incident incident= INCIDENT_NONE;
DBUG_PRINT("debug", ("Just before generate_incident()"));
DBUG_EXECUTE_IF("incident_database_resync_on_replace",
incident= INCIDENT_LOST_EVENTS;);
if (incident)
{
Incident_log_event ev(thd, incident);
mysql_bin_log.write(&ev);
mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
}
DBUG_PRINT("debug", ("Just after generate_incident()"));
}
#endif
case SQLCOM_INSERT:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
......@@ -6102,6 +6132,7 @@ void mysql_init_multi_delete(LEX *lex)
lex->query_tables_last= &lex->query_tables;
}
/*
When you modify mysql_parse(), you may need to mofify
mysql_test_parse_for_slave() in this same file.
......@@ -6114,6 +6145,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
mysql_init_query(thd, (uchar*) inBuf, length);
if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
{
LEX *lex= thd->lex;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment