summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gbichot@quadita2.mysql.com>2005-03-25 14:51:17 +0100
committerunknown <gbichot@quadita2.mysql.com>2005-03-25 14:51:17 +0100
commitf07e4850d025ccf0094d10328b291887f651544c (patch)
tree491287043eee4a43ead2c59964c69508b2df64ed /mysql-test
parentfa4a075b6cb7ba7e71c842e6649bf7e7c516bef2 (diff)
downloadmariadb-git-f07e4850d025ccf0094d10328b291887f651544c.tar.gz
WWe now store the catalog in Query_log_event in binlog WITHOUT its end zero.
This saves one byte per Query_log_event on disk compared to 5.0.[0..3]. Compatibility problems with 5.0.x where x<4 are explained in the comments in log_event.cc. Putting back s/my_open(O_TRUNC)/(my_delete+my_create) change which had been wiped away by somebody doing a wrong 4.1->5.0 merge (which happened just before 5.0.3 :( ). Applying it to new events for LOAD DATA INFILE. If slave fails in Execute_load_query_log_event::exec_event(), don't delete the file (so that it's re-usable at next START SLAVE). And (youpi!) fix for BUG#3247 "a partially completed LOAD DATA INFILE is not executed at all on the slave" (storing an Execute_load_query_log_event to binlog, with its error code, instead of Delete_file_log_event). mysql-test/r/mix_innodb_myisam_binlog.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_change_master.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_deadlock.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_error_ignored_table.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_flush_log_loop.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_loaddata.result: we now use one less byte when storing the catalog in binlog so positions change. Plus testing replication of LOAD DATA INFILE if duplicate key and non-transactional table. mysql-test/r/rpl_log.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_max_relay_size.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_relayrotate.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_replicate_do.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_rotate_logs.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/r/rpl_until.result: we now use one less byte when storing the catalog in binlog so positions change mysql-test/t/mysqlbinlog.test: we now use one less byte when storing the catalog in binlog so positions change mysql-test/t/mysqlbinlog2.test: we now use one less byte when storing the catalog in binlog so positions change mysql-test/t/rpl_deadlock.test: we now use one less byte when storing the catalog in binlog so positions change mysql-test/t/rpl_loaddata.test: we now use one less byte when storing the catalog in binlog so positions change. Plus testing replication of LOAD DATA INFILE if duplicate key and non-transactional table. mysql-test/t/rpl_until.test: we now use one less byte when storing the catalog in binlog so positions change sql/log_event.cc: a) We now store the catalog in Query_log_event in binlog WITHOUT its end zero. This saves one byte per Query_log_event on disk. Compatibility problems with 5.0.x where x<4 are explained in the comments in this file. b) putting back s/my_open(O_TRUNC)/(my_delete+my_create) change which had been wiped away by somebody doing a wrong 4.1->5.0 merge (which happened just before 5.0.3 :( ). Applying it to new events for LOAD DATA INFILE. c) if slave fails in Execute_load_query_log_event::exec_event(), don't delete the file (so that it's re-usable at next START SLAVE). sql/log_event.h: We now store the catalog in Query_log_event in binlog WITHOUT its end zero. This saves one byte per Query_log_event on disk. This new storage for the catalog is denoted by Q_CATALOG_NZ_CODE (couldn't re-use Q_CATALOG_CODE as 5.0.3 slaves of this 5.0.4 master would segfault because it would expect a 0 when there is none. Renaming get_open_mode() to get_create_or_append() (see log_event.cc) sql/sql_load.cc: Fix for BUG#3247: if LOAD DATA INFILE fails but has permanently updated a table (i.e. has deleted/added/modified some rows in a non-transactional table), we must write an Execute_load_query_log_event to binlog (with the error code, as this class beautifully inherits from Query_log_event, it can store the error code - thanks Dmitri) and not a Delete_file_log_event (we use to write a Delete_file_log_event: no update happened on slave, bug).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/mix_innodb_myisam_binlog.result78
-rw-r--r--mysql-test/r/rpl_change_master.result4
-rw-r--r--mysql-test/r/rpl_deadlock.result10
-rw-r--r--mysql-test/r/rpl_error_ignored_table.result2
-rw-r--r--mysql-test/r/rpl_flush_log_loop.result2
-rw-r--r--mysql-test/r/rpl_loaddata.result27
-rw-r--r--mysql-test/r/rpl_log.result82
-rw-r--r--mysql-test/r/rpl_max_relay_size.result10
-rw-r--r--mysql-test/r/rpl_relayrotate.result2
-rw-r--r--mysql-test/r/rpl_replicate_do.result2
-rw-r--r--mysql-test/r/rpl_rotate_logs.result8
-rw-r--r--mysql-test/r/rpl_until.result30
-rw-r--r--mysql-test/t/mysqlbinlog.test4
-rw-r--r--mysql-test/t/mysqlbinlog2.test12
-rw-r--r--mysql-test/t/rpl_deadlock.test4
-rw-r--r--mysql-test/t/rpl_loaddata.test25
-rw-r--r--mysql-test/t/rpl_until.test8
17 files changed, 170 insertions, 140 deletions
diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result
index a5f4915384d..7821c074202 100644
--- a/mysql-test/r/mix_innodb_myisam_binlog.result
+++ b/mysql-test/r/mix_innodb_myisam_binlog.result
@@ -9,9 +9,9 @@ commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(1)
-master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 350 Xid 1 # COMMIT /* xid=7 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1)
+master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 347 Xid 1 # COMMIT /* xid=7 */
delete from t1;
delete from t2;
reset master;
@@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(2)
-master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 350 Query 1 # use `test`; ROLLBACK
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(2)
+master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 347 Query 1 # use `test`; ROLLBACK
delete from t1;
delete from t2;
reset master;
@@ -42,12 +42,12 @@ commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(3)
-master-bin.000001 255 Query 1 # use `test`; savepoint my_savepoint
-master-bin.000001 341 Query 1 # use `test`; insert into t1 values(4)
-master-bin.000001 429 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 524 Query 1 # use `test`; rollback to savepoint my_savepoint
-master-bin.000001 622 Xid 1 # COMMIT /* xid=24 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(3)
+master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
+master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4)
+master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
+master-bin.000001 616 Xid 1 # COMMIT /* xid=24 */
delete from t1;
delete from t2;
reset master;
@@ -68,13 +68,13 @@ a
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(5)
-master-bin.000001 255 Query 1 # use `test`; savepoint my_savepoint
-master-bin.000001 341 Query 1 # use `test`; insert into t1 values(6)
-master-bin.000001 429 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 524 Query 1 # use `test`; rollback to savepoint my_savepoint
-master-bin.000001 622 Query 1 # use `test`; insert into t1 values(7)
-master-bin.000001 710 Xid 1 # COMMIT /* xid=36 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(5)
+master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
+master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6)
+master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
+master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7)
+master-bin.000001 703 Xid 1 # COMMIT /* xid=36 */
delete from t1;
delete from t2;
reset master;
@@ -90,9 +90,9 @@ get_lock("a",10)
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(8)
-master-bin.000001 255 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 350 Query 1 # use `test`; ROLLBACK
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(8)
+master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 347 Query 1 # use `test`; ROLLBACK
delete from t1;
delete from t2;
reset master;
@@ -101,8 +101,8 @@ insert into t2 select * from t1;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9)
-master-bin.000001 186 Xid 1 # COMMIT /* xid=59 */
-master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 185 Xid 1 # COMMIT /* xid=59 */
+master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1
delete from t1;
delete from t2;
reset master;
@@ -112,18 +112,18 @@ insert into t2 select * from t1;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
-master-bin.000001 187 Xid 1 # COMMIT /* xid=65 */
-master-bin.000001 214 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 186 Xid 1 # COMMIT /* xid=65 */
+master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
-master-bin.000001 187 Xid 1 # COMMIT /* xid=65 */
-master-bin.000001 214 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 309 Query 1 # use `test`; BEGIN
-master-bin.000001 378 Query 1 # use `test`; insert into t1 values(11)
-master-bin.000001 467 Xid 1 # COMMIT /* xid=67 */
+master-bin.000001 186 Xid 1 # COMMIT /* xid=65 */
+master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 307 Query 1 # use `test`; BEGIN
+master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11)
+master-bin.000001 463 Xid 1 # COMMIT /* xid=67 */
alter table t2 engine=INNODB;
delete from t1;
delete from t2;
@@ -135,9 +135,9 @@ commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(12)
-master-bin.000001 256 Query 1 # use `test`; insert into t2 select * from t1
-master-bin.000001 351 Xid 1 # COMMIT /* xid=77 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12)
+master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1
+master-bin.000001 348 Xid 1 # COMMIT /* xid=77 */
delete from t1;
delete from t2;
reset master;
@@ -160,8 +160,8 @@ commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(14)
-master-bin.000001 256 Xid 1 # COMMIT /* xid=93 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14)
+master-bin.000001 254 Xid 1 # COMMIT /* xid=93 */
delete from t1;
delete from t2;
reset master;
@@ -180,9 +180,9 @@ a
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
-master-bin.000001 167 Query 1 # use `test`; insert into t1 values(16)
-master-bin.000001 256 Query 1 # use `test`; insert into t1 values(18)
-master-bin.000001 345 Xid 1 # COMMIT /* xid=104 */
+master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16)
+master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
+master-bin.000001 342 Xid 1 # COMMIT /* xid=104 */
delete from t1;
delete from t2;
alter table t2 type=MyISAM;
diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result
index 6366a2d0f8f..7f2ba568fb3 100644
--- a/mysql-test/r/rpl_change_master.result
+++ b/mysql-test/r/rpl_change_master.result
@@ -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 360 # # master-bin.000001 No No 0 0 184 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 357 # # master-bin.000001 No No 0 0 183 # 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 184 # # master-bin.000001 No No 0 0 184 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 183 # # master-bin.000001 No No 0 0 183 # None 0 No #
start slave;
select * from t1;
n
diff --git a/mysql-test/r/rpl_deadlock.result b/mysql-test/r/rpl_deadlock.result
index 74f24b8b180..866edb45cbb 100644
--- a/mysql-test/r/rpl_deadlock.result
+++ b/mysql-test/r/rpl_deadlock.result
@@ -45,9 +45,9 @@ a
22
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 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No #
stop slave;
-change master to master_log_pos=536;
+change master to master_log_pos=532;
begin;
select * from t2 for update;
a
@@ -63,10 +63,10 @@ a
22
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 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No #
set global max_relay_log_size=0;
stop slave;
-change master to master_log_pos=536;
+change master to master_log_pos=532;
begin;
select * from t2 for update;
a
@@ -83,5 +83,5 @@ a
22
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 19118 # # master-bin.000001 Yes Yes 0 0 19118 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No #
drop table t1,t2;
diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result
index a5e025078b9..a0a808ce9a8 100644
--- a/mysql-test/r/rpl_error_ignored_table.result
+++ b/mysql-test/r/rpl_error_ignored_table.result
@@ -9,7 +9,7 @@ insert into t1 values (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 290 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 290 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No #
show tables like 't1';
Tables_in_test (t1)
drop table t1;
diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result
index 083db5f440d..b4e840ba271 100644
--- a/mysql-test/r/rpl_flush_log_loop.result
+++ b/mysql-test/r/rpl_flush_log_loop.result
@@ -14,4 +14,4 @@ start slave;
flush logs;
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 60 slave-bin.000001 209 # # slave-bin.000001 Yes Yes 0 0 209 # None 0 No #
+# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 208 # # slave-bin.000001 Yes Yes 0 0 208 # None 0 No #
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 4060910c079..dc11d10fab8 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -22,7 +22,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 1292
+slave-bin.000001 1286
drop table t1;
drop table t2;
drop table t3;
@@ -33,7 +33,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 1800 # # master-bin.000001 Yes Yes 0 0 1800 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1789 # # master-bin.000001 Yes Yes 0 0 1789 # None 0 No #
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
@@ -43,7 +43,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 1835 # # master-bin.000001 No No 0 0 1835 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1824 # # master-bin.000001 No No 0 0 1824 # None 0 No #
set global sql_slave_skip_counter=1;
start slave;
set sql_log_bin=0;
@@ -57,12 +57,25 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
# 127.0.0.1 root MASTER_PORT 1 4 # # No No 0 0 0 # None 0 No #
reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
-unique(day));
+unique(day)) engine=MyISAM;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 1
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 441
+select * from t2;
+day id category name
+2003-02-22 2461 b a a a @ %  ' " a
+2003-03-22 2161 c asdf
+start slave;
+select * from t2;
+day id category name
+2003-02-22 2461 b a a a @ %  ' " a
+2003-03-22 2161 c asdf
+alter table t2 drop key day;
+delete from t2;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
+terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
+'\n##\n' starting by '>' ignore 1 lines;
+ERROR 23000: Duplicate entry '2003-03-22' for key 1
+drop table t2;
drop table t2;
diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result
index 85b27dcad34..5d61746b984 100644
--- a/mysql-test/r/rpl_log.result
+++ b/mysql-test/r/rpl_log.result
@@ -20,24 +20,24 @@ drop table t1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 220 Intvar 1 248 INSERT_ID=1
-master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL)
-master-bin.000001 340 Query 1 417 use `test`; drop table t1
-master-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null)
-master-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581
-master-bin.000001 1125 Execute_load_query 1 1274 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
-master-bin.000001 1274 Query 1 1351 use `test`; drop table t1
+master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
+master-bin.000001 219 Intvar 1 247 INSERT_ID=1
+master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
+master-bin.000001 338 Query 1 414 use `test`; drop table t1
+master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
+master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
+master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
+master-bin.000001 1269 Query 1 1345 use `test`; drop table t1
show binlog events from 98 limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
+master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
show binlog events from 98 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 220 Intvar 1 248 INSERT_ID=1
+master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
+master-bin.000001 219 Intvar 1 247 INSERT_ID=1
show binlog events from 98 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL)
+master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
flush logs;
create table t5 (a int);
drop table t5;
@@ -50,23 +50,23 @@ drop table t1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 220 Intvar 1 248 INSERT_ID=1
-master-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL)
-master-bin.000001 340 Query 1 417 use `test`; drop table t1
-master-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null)
-master-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581
-master-bin.000001 1125 Execute_load_query 1 1274 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
-master-bin.000001 1274 Query 1 1351 use `test`; drop table t1
-master-bin.000001 1351 Rotate 1 1395 master-bin.000002;pos=4
+master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
+master-bin.000001 219 Intvar 1 247 INSERT_ID=1
+master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
+master-bin.000001 338 Query 1 414 use `test`; drop table t1
+master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
+master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
+master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
+master-bin.000001 1269 Query 1 1345 use `test`; drop table t1
+master-bin.000001 1345 Rotate 1 1389 master-bin.000002;pos=4
show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000002 98 Query 1 185 use `test`; create table t5 (a int)
-master-bin.000002 185 Query 1 262 use `test`; drop table t5
-master-bin.000002 262 Query 1 349 use `test`; create table t1 (n int)
-master-bin.000002 349 Query 1 438 use `test`; insert into t1 values (1)
-master-bin.000002 438 Query 1 515 use `test`; drop table t1
+master-bin.000002 98 Query 1 184 use `test`; create table t5 (a int)
+master-bin.000002 184 Query 1 260 use `test`; drop table t5
+master-bin.000002 260 Query 1 346 use `test`; create table t1 (n int)
+master-bin.000002 346 Query 1 434 use `test`; insert into t1 values (1)
+master-bin.000002 434 Query 1 510 use `test`; drop table t1
show binary logs;
Log_name
master-bin.000001
@@ -79,25 +79,25 @@ slave-bin.000002
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
-slave-bin.000001 220 Intvar 1 248 INSERT_ID=1
-slave-bin.000001 248 Query 1 340 use `test`; insert into t1 values (NULL)
-slave-bin.000001 340 Query 1 417 use `test`; drop table t1
-slave-bin.000001 417 Query 1 521 use `test`; create table t1 (word char(20) not null)
-slave-bin.000001 521 Begin_load_query 1 1125 ;file_id=1;block_len=581
-slave-bin.000001 1125 Execute_load_query 1 1283 use `test`; load data INFILE '../../var/tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
-slave-bin.000001 1283 Query 1 1360 use `test`; drop table t1
-slave-bin.000001 1360 Query 1 1447 use `test`; create table t5 (a int)
-slave-bin.000001 1447 Query 1 1524 use `test`; drop table t5
-slave-bin.000001 1524 Rotate 2 1567 slave-bin.000002;pos=4
+slave-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
+slave-bin.000001 219 Intvar 1 247 INSERT_ID=1
+slave-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
+slave-bin.000001 338 Query 1 414 use `test`; drop table t1
+slave-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
+slave-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
+slave-bin.000001 1121 Execute_load_query 1 1278 use `test`; load data INFILE '../../var/tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
+slave-bin.000001 1278 Query 1 1354 use `test`; drop table t1
+slave-bin.000001 1354 Query 1 1440 use `test`; create table t5 (a int)
+slave-bin.000001 1440 Query 1 1516 use `test`; drop table t5
+slave-bin.000001 1516 Rotate 2 1559 slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 98 Query 1 185 use `test`; create table t1 (n int)
-slave-bin.000002 185 Query 1 274 use `test`; insert into t1 values (1)
-slave-bin.000002 274 Query 1 351 use `test`; drop table t1
+slave-bin.000002 98 Query 1 184 use `test`; create table t1 (n int)
+slave-bin.000002 184 Query 1 272 use `test`; insert into t1 values (1)
+slave-bin.000002 272 Query 1 348 use `test`; drop table t1
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 515 # # master-bin.000002 Yes Yes 0 0 515 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 510 # # master-bin.000002 Yes Yes 0 0 510 # 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
diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result
index 56cbe4d5ac8..fbe3b89828a 100644
--- a/mysql-test/r/rpl_max_relay_size.result
+++ b/mysql-test/r/rpl_max_relay_size.result
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
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 73754 # # master-bin.000001 Yes Yes 0 0 73754 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No #
stop slave;
reset slave;
set global max_relay_log_size=(5*4096);
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
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 73754 # # master-bin.000001 Yes Yes 0 0 73754 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No #
stop slave;
reset slave;
set global max_relay_log_size=0;
@@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
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 73754 # # master-bin.000001 Yes Yes 0 0 73754 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No #
stop slave;
reset slave;
flush logs;
@@ -49,12 +49,12 @@ flush logs;
create table t1 (a int);
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 73841 # # master-bin.000001 Yes Yes 0 0 73841 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73038 # # master-bin.000001 Yes Yes 0 0 73038 # None 0 No #
flush logs;
drop table t1;
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 73918 # # master-bin.000001 Yes Yes 0 0 73918 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73114 # # master-bin.000001 Yes Yes 0 0 73114 # None 0 No #
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result
index 0135e90dce9..c79187e12d0 100644
--- a/mysql-test/r/rpl_relayrotate.result
+++ b/mysql-test/r/rpl_relayrotate.result
@@ -18,5 +18,5 @@ max(a)
8000
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 743188 # # master-bin.000001 Yes Yes 0 0 743188 # None 0 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 735186 # # master-bin.000001 Yes Yes 0 0 735186 # None 0 No #
drop table t1;
diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result
index 469504d06b4..8bcae3d25ad 100644
--- a/mysql-test/r/rpl_replicate_do.result
+++ b/mysql-test/r/rpl_replicate_do.result
@@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1668 # # master-bin.000001 Yes Yes test.t1 0 0 1668 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1658 # # master-bin.000001 Yes Yes test.t1 0 0 1658 # None 0 No #
diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result
index bd2e6dd685f..de177d12196 100644
--- a/mysql-test/r/rpl_rotate_logs.result
+++ b/mysql-test/r/rpl_rotate_logs.result
@@ -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 548 # # master-bin.000001 Yes Yes 0 0 548 # None 0 No #
select * from t1;
s
Could not break slave
@@ -57,7 +57,7 @@ master-bin.000003
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 496 # # master-bin.000003 Yes Yes 0 0 496 # None 0 No #
select * from t2;
m
34
@@ -79,13 +79,13 @@ master-bin.000004
master-bin.000005
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000005 2146
+master-bin.000005 2032
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 2146 # # master-bin.000005 Yes Yes 0 0 2146 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2032 # # master-bin.000005 Yes Yes 0 0 2032 # None 0 No #
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result
index c9f9aa7b029..64efeab0145 100644
--- a/mysql-test/r/rpl_until.result
+++ b/mysql-test/r/rpl_until.result
@@ -15,14 +15,14 @@ drop table t2;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 220 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 220 Query 1 321 use `test`; insert into t1 values (1),(2),(3),(4)
-master-bin.000001 321 Query 1 398 use `test`; drop table t1
-master-bin.000001 398 Query 1 520 use `test`; create table t2(n int not null auto_increment primary key)
-master-bin.000001 520 Query 1 613 use `test`; insert into t2 values (1),(2)
-master-bin.000001 613 Query 1 706 use `test`; insert into t2 values (3),(4)
-master-bin.000001 706 Query 1 783 use `test`; drop table t2
-start slave until master_log_file='master-bin.000001', master_log_pos=321;
+master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
+master-bin.000001 219 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4)
+master-bin.000001 319 Query 1 395 use `test`; drop table t1
+master-bin.000001 395 Query 1 516 use `test`; create table t2(n int not null auto_increment primary key)
+master-bin.000001 516 Query 1 608 use `test`; insert into t2 values (1),(2)
+master-bin.000001 608 Query 1 700 use `test`; insert into t2 values (3),(4)
+master-bin.000001 700 Query 1 776 use `test`; drop table t2
+start slave until master_log_file='master-bin.000001', master_log_pos=319;
select * from t1;
n
1
@@ -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 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 321 # Master master-bin.000001 321 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-bin.000001 319 No #
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
@@ -41,21 +41,21 @@ 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 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 321 # Master master-no-such-bin.000001 291 No #
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=751;
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-no-such-bin.000001 291 No #
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
select * from t2;
n
1
2
show slave status;
Slave_IO_State Master_Host 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 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 613 # Relay slave-relay-bin.000004 751 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 608 # Relay slave-relay-bin.000004 746 No #
start slave;
stop slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=783;
+start slave until master_log_file='master-bin.000001', master_log_pos=776;
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 783 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 783 # Master master-bin.000001 783 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 776 # Master master-bin.000001 776 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;
@@ -67,6 +67,6 @@ ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UN
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=783;
+start slave until master_log_file='master-bin.000001', master_log_pos=776;
Warnings:
Note 1254 Slave is already running
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index df3b0acaa11..0988416942c 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -60,7 +60,7 @@ select "--- --database --" as "";
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=232 $MYSQL_TEST_DIR/var/log/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --position=231 $MYSQL_TEST_DIR/var/log/master-bin.000002
# These are tests for remote binlog.
# They should return the same as previous test.
@@ -92,7 +92,7 @@ select "--- --database --" as "";
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=232 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=231 --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
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index 74ddf4e2be4..cbde6c93210 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -46,11 +46,11 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --stop-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
@@ -75,7 +75,7 @@ select "--- offset --" as "";
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=604 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --start-position=600 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
@@ -102,11 +102,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=600 --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=600 --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
@@ -129,7 +129,7 @@ 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=600 --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
diff --git a/mysql-test/t/rpl_deadlock.test b/mysql-test/t/rpl_deadlock.test
index 800ff319ba0..3bcbb1d4567 100644
--- a/mysql-test/t/rpl_deadlock.test
+++ b/mysql-test/t/rpl_deadlock.test
@@ -72,7 +72,7 @@ show slave status;
# 2) Test lock wait timeout
stop slave;
-change master to master_log_pos=536; # the BEGIN log event
+change master to master_log_pos=532; # the BEGIN log event
begin;
select * from t2 for update; # hold lock
start slave;
@@ -93,7 +93,7 @@ set global max_relay_log_size=0;
# This is really copy-paste of 2) of above
stop slave;
-change master to master_log_pos=536;
+change master to master_log_pos=532;
begin;
select * from t2 for update;
start slave;
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test
index d1404dea211..3d54897adda 100644
--- a/mysql-test/t/rpl_loaddata.test
+++ b/mysql-test/t/rpl_loaddata.test
@@ -123,12 +123,29 @@ show slave status;
connection master;
reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
-unique(day));
+unique(day)) engine=MyISAM; # no transactions
--error 1062;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
-# To test that there is Create_file & Delete_file, we test if the binlog is as
-# long as expected (can't do SHOW BINLOG EVENTS because of varying file_id).
-show master status;
+select * from t2;
+save_master_pos;
+connection slave;
+start slave;
+sync_with_master;
+select * from t2;
+
+# verify that if no error on slave, this is an error
+
+alter table t2 drop key day;
+connection master;
+delete from t2;
+--error 1062;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
+terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
+'\n##\n' starting by '>' ignore 1 lines;
+connection slave;
+wait_for_slave_to_stop;
+drop table t2;
+connection master;
drop table t2;
diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test
index 9ee1dca9c11..714719f5441 100644
--- a/mysql-test/t/rpl_until.test
+++ b/mysql-test/t/rpl_until.test
@@ -24,7 +24,7 @@ show binlog events;
# try to replicate all queries until drop of t1
connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=321;
+start slave until master_log_file='master-bin.000001', master_log_pos=319;
sleep 2;
# here table should be still not deleted
select * from t1;
@@ -42,7 +42,7 @@ sleep 2;
show slave status;
# try replicate all until second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=751;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
sleep 4;
select * from t2;
--replace_result $MASTER_MYPORT MASTER_MYPORT
@@ -58,7 +58,7 @@ sync_with_master;
stop slave;
# this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=783;
+start slave until master_log_file='master-bin.000001', master_log_pos=776;
# 2 is not enough when running with valgrind
real_sleep 4
# here the sql slave thread should be stopped
@@ -79,4 +79,4 @@ start slave until relay_log_file='slave-relay-bin.000002';
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
# Warning should be given for second command
start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=783;
+start slave until master_log_file='master-bin.000001', master_log_pos=776;