Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9a139ddc
Commit
9a139ddc
authored
Mar 25, 2005
by
gbichot@quadita2.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into quadita2.mysql.com:/nfstmp1/guilhem/mysql-5.0-4ita
parents
97b5cbba
ead47f47
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
271 additions
and
185 deletions
+271
-185
mysql-test/r/mix_innodb_myisam_binlog.result
mysql-test/r/mix_innodb_myisam_binlog.result
+39
-39
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+2
-2
mysql-test/r/rpl_deadlock.result
mysql-test/r/rpl_deadlock.result
+5
-5
mysql-test/r/rpl_error_ignored_table.result
mysql-test/r/rpl_error_ignored_table.result
+1
-1
mysql-test/r/rpl_flush_log_loop.result
mysql-test/r/rpl_flush_log_loop.result
+1
-1
mysql-test/r/rpl_loaddata.result
mysql-test/r/rpl_loaddata.result
+20
-7
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+41
-41
mysql-test/r/rpl_max_relay_size.result
mysql-test/r/rpl_max_relay_size.result
+5
-5
mysql-test/r/rpl_relayrotate.result
mysql-test/r/rpl_relayrotate.result
+1
-1
mysql-test/r/rpl_replicate_do.result
mysql-test/r/rpl_replicate_do.result
+1
-1
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+4
-4
mysql-test/r/rpl_until.result
mysql-test/r/rpl_until.result
+15
-15
mysql-test/t/mysqlbinlog.test
mysql-test/t/mysqlbinlog.test
+2
-2
mysql-test/t/mysqlbinlog2.test
mysql-test/t/mysqlbinlog2.test
+6
-6
mysql-test/t/rpl_deadlock.test
mysql-test/t/rpl_deadlock.test
+2
-2
mysql-test/t/rpl_loaddata.test
mysql-test/t/rpl_loaddata.test
+21
-4
mysql-test/t/rpl_until.test
mysql-test/t/rpl_until.test
+4
-4
sql/log_event.cc
sql/log_event.cc
+57
-31
sql/log_event.h
sql/log_event.h
+14
-2
sql/sql_load.cc
sql/sql_load.cc
+30
-12
No files found.
mysql-test/r/mix_innodb_myisam_binlog.result
View file @
9a139ddc
...
@@ -9,9 +9,9 @@ commit;
...
@@ -9,9 +9,9 @@ commit;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 25
5
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 25
3
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
50
Xid 1 # COMMIT /* xid=7 */
master-bin.000001 3
47
Xid 1 # COMMIT /* xid=7 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
...
@@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(2)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(2)
master-bin.000001 25
5
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 25
3
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
50
Query 1 # use `test`; ROLLBACK
master-bin.000001 3
47
Query 1 # use `test`; ROLLBACK
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -42,12 +42,12 @@ commit;
...
@@ -42,12 +42,12 @@ commit;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(3)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(3)
master-bin.000001 25
5
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 25
3
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
41
Query 1 # use `test`; insert into t1 values(4)
master-bin.000001 3
38
Query 1 # use `test`; insert into t1 values(4)
master-bin.000001 42
9
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 42
5
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 5
24
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 5
19
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 6
22
Xid 1 # COMMIT /* xid=24 */
master-bin.000001 6
16
Xid 1 # COMMIT /* xid=24 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -68,13 +68,13 @@ a
...
@@ -68,13 +68,13 @@ a
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(5)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(5)
master-bin.000001 25
5
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 25
3
Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 3
41
Query 1 # use `test`; insert into t1 values(6)
master-bin.000001 3
38
Query 1 # use `test`; insert into t1 values(6)
master-bin.000001 42
9
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 42
5
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 5
24
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 5
19
Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 6
22
Query 1 # use `test`; insert into t1 values(7)
master-bin.000001 6
16
Query 1 # use `test`; insert into t1 values(7)
master-bin.000001 7
10
Xid 1 # COMMIT /* xid=36 */
master-bin.000001 7
03
Xid 1 # COMMIT /* xid=36 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -90,9 +90,9 @@ get_lock("a",10)
...
@@ -90,9 +90,9 @@ get_lock("a",10)
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(8)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(8)
master-bin.000001 25
5
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 25
3
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
50
Query 1 # use `test`; ROLLBACK
master-bin.000001 3
47
Query 1 # use `test`; ROLLBACK
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -101,8 +101,8 @@ insert into t2 select * from t1;
...
@@ -101,8 +101,8 @@ insert into t2 select * from t1;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
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 98 Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 18
6
Xid 1 # COMMIT /* xid=59 */
master-bin.000001 18
5
Xid 1 # COMMIT /* xid=59 */
master-bin.000001 21
3
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 21
2
Query 1 # use `test`; insert into t2 select * from t1
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -112,18 +112,18 @@ insert into t2 select * from t1;
...
@@ -112,18 +112,18 @@ insert into t2 select * from t1;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
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 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 18
7
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 18
6
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 21
4
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 21
3
Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
insert into t1 values(11);
commit;
commit;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
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 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 18
7
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 18
6
Xid 1 # COMMIT /* xid=65 */
master-bin.000001 21
4
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 21
3
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 30
9
Query 1 # use `test`; BEGIN
master-bin.000001 30
7
Query 1 # use `test`; BEGIN
master-bin.000001 37
8
Query 1 # use `test`; insert into t1 values(11)
master-bin.000001 37
5
Query 1 # use `test`; insert into t1 values(11)
master-bin.000001 46
7
Xid 1 # COMMIT /* xid=67 */
master-bin.000001 46
3
Xid 1 # COMMIT /* xid=67 */
alter table t2 engine=INNODB;
alter table t2 engine=INNODB;
delete from t1;
delete from t1;
delete from t2;
delete from t2;
...
@@ -135,9 +135,9 @@ commit;
...
@@ -135,9 +135,9 @@ commit;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 25
6
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 25
4
Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 3
51
Xid 1 # COMMIT /* xid=77 */
master-bin.000001 3
48
Xid 1 # COMMIT /* xid=77 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -160,8 +160,8 @@ commit;
...
@@ -160,8 +160,8 @@ commit;
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 25
6
Xid 1 # COMMIT /* xid=93 */
master-bin.000001 25
4
Xid 1 # COMMIT /* xid=93 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
reset master;
reset master;
...
@@ -180,9 +180,9 @@ a
...
@@ -180,9 +180,9 @@ a
show binlog events from 98;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 16
7
Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 16
6
Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 25
6
Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 25
4
Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 34
5
Xid 1 # COMMIT /* xid=104 */
master-bin.000001 34
2
Xid 1 # COMMIT /* xid=104 */
delete from t1;
delete from t1;
delete from t2;
delete from t2;
alter table t2 type=MyISAM;
alter table t2 type=MyISAM;
...
...
mysql-test/r/rpl_change_master.result
View file @
9a139ddc
...
@@ -13,11 +13,11 @@ insert into t1 values(2);
...
@@ -13,11 +13,11 @@ insert into t1 values(2);
stop slave;
stop slave;
show slave status;
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
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 3
60 # # master-bin.000001 No No 0 0 184
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 3
57 # # master-bin.000001 No No 0 0 183
# None 0 No #
change master to master_user='root';
change master to master_user='root';
show slave status;
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
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 18
4 # # master-bin.000001 No No 0 0 184
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18
3 # # master-bin.000001 No No 0 0 183
# None 0 No #
start slave;
start slave;
select * from t1;
select * from t1;
n
n
...
...
mysql-test/r/rpl_deadlock.result
View file @
9a139ddc
...
@@ -45,9 +45,9 @@ a
...
@@ -45,9 +45,9 @@ a
22
22
show slave status;
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
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 1
9118 # # master-bin.000001 Yes Yes 0 0 19118
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 1
8911 # # master-bin.000001 Yes Yes 0 0 18911
# None 0 No #
stop slave;
stop slave;
change master to master_log_pos=53
6
;
change master to master_log_pos=53
2
;
begin;
begin;
select * from t2 for update;
select * from t2 for update;
a
a
...
@@ -63,10 +63,10 @@ a
...
@@ -63,10 +63,10 @@ a
22
22
show slave status;
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
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 1
9118 # # master-bin.000001 Yes Yes 0 0 19118
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 1
8911 # # master-bin.000001 Yes Yes 0 0 18911
# None 0 No #
set global max_relay_log_size=0;
set global max_relay_log_size=0;
stop slave;
stop slave;
change master to master_log_pos=53
6
;
change master to master_log_pos=53
2
;
begin;
begin;
select * from t2 for update;
select * from t2 for update;
a
a
...
@@ -83,5 +83,5 @@ a
...
@@ -83,5 +83,5 @@ a
22
22
show slave status;
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
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 1
9118 # # master-bin.000001 Yes Yes 0 0 19118
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 1
8911 # # master-bin.000001 Yes Yes 0 0 18911
# None 0 No #
drop table t1,t2;
drop table t1,t2;
mysql-test/r/rpl_error_ignored_table.result
View file @
9a139ddc
...
@@ -9,7 +9,7 @@ insert into t1 values (1),(1);
...
@@ -9,7 +9,7 @@ insert into t1 values (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 1
show slave status;
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
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 2
90 # # 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 2
88 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288
# None 0 No #
show tables like 't1';
show tables like 't1';
Tables_in_test (t1)
Tables_in_test (t1)
drop table t1;
drop table t1;
...
...
mysql-test/r/rpl_flush_log_loop.result
View file @
9a139ddc
...
@@ -14,4 +14,4 @@ start slave;
...
@@ -14,4 +14,4 @@ start slave;
flush logs;
flush logs;
show slave status;
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
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 20
9 # # slave-bin.000001 Yes Yes 0 0 209
# None 0 No #
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 20
8 # # slave-bin.000001 Yes Yes 0 0 208
# None 0 No #
mysql-test/r/rpl_loaddata.result
View file @
9a139ddc
...
@@ -22,7 +22,7 @@ day id category name
...
@@ -22,7 +22,7 @@ day id category name
2003-03-22 2416 a bbbbb
2003-03-22 2416 a bbbbb
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
slave-bin.000001 12
92
slave-bin.000001 12
86
drop table t1;
drop table t1;
drop table t2;
drop table t2;
drop table t3;
drop table t3;
...
@@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1;
...
@@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1;
start slave;
start slave;
show slave status;
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
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 1
800 # # master-bin.000001 Yes Yes 0 0 1800
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1
789 # # master-bin.000001 Yes Yes 0 0 1789
# None 0 No #
set sql_log_bin=0;
set sql_log_bin=0;
delete from t1;
delete from t1;
set sql_log_bin=1;
set sql_log_bin=1;
...
@@ -43,7 +43,7 @@ change master to master_user='test';
...
@@ -43,7 +43,7 @@ change master to master_user='test';
change master to master_user='root';
change master to master_user='root';
show slave status;
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
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 18
35 # # master-bin.000001 No No 0 0 1835
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 18
24 # # master-bin.000001 No No 0 0 1824
# None 0 No #
set global sql_slave_skip_counter=1;
set global sql_slave_skip_counter=1;
start slave;
start slave;
set sql_log_bin=0;
set sql_log_bin=0;
...
@@ -57,12 +57,25 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
...
@@ -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 #
# 127.0.0.1 root MASTER_PORT 1 4 # # No No 0 0 0 # None 0 No #
reset master;
reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
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
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 1
ERROR 23000: Duplicate entry '2003-03-22' for key 1
show master status;
select * from t2;
File Position Binlog_Do_DB Binlog_Ignore_DB
day id category name
master-bin.000001 441
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;
drop table t2;
mysql-test/r/rpl_log.result
View file @
9a139ddc
...
@@ -20,24 +20,24 @@ drop table t1;
...
@@ -20,24 +20,24 @@ drop table t1;
show binlog events;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 2
20 Intvar 1 248
INSERT_ID=1
master-bin.000001 2
19 Intvar 1 247
INSERT_ID=1
master-bin.000001 24
8 Query 1 340
use `test`; insert into t1 values (NULL)
master-bin.000001 24
7 Query 1 338
use `test`; insert into t1 values (NULL)
master-bin.000001 3
40 Query 1 417
use `test`; drop table t1
master-bin.000001 3
38 Query 1 414
use `test`; drop table t1
master-bin.000001 41
7 Query 1 521
use `test`; create table t1 (word char(20) not null)
master-bin.000001 41
4 Query 1 517
use `test`; create table t1 (word char(20) not null)
master-bin.000001 5
21 Begin_load_query 1 1125
;file_id=1;block_len=581
master-bin.000001 5
17 Begin_load_query 1 1121
;file_id=1;block_len=581
master-bin.000001 112
5 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 112
1 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 12
74 Query 1 1351
use `test`; drop table t1
master-bin.000001 12
69 Query 1 1345
use `test`; drop table t1
show binlog events from 98 limit 1;
show binlog events from 98 limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
show binlog events from 98 limit 2;
show binlog events from 98 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 2
20 Intvar 1 248
INSERT_ID=1
master-bin.000001 2
19 Intvar 1 247
INSERT_ID=1
show binlog events from 98 limit 2,1;
show binlog events from 98 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 24
8 Query 1 340
use `test`; insert into t1 values (NULL)
master-bin.000001 24
7 Query 1 338
use `test`; insert into t1 values (NULL)
flush logs;
flush logs;
create table t5 (a int);
create table t5 (a int);
drop table t5;
drop table t5;
...
@@ -50,23 +50,23 @@ drop table t1;
...
@@ -50,23 +50,23 @@ drop table t1;
show binlog events;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 2
20 Intvar 1 248
INSERT_ID=1
master-bin.000001 2
19 Intvar 1 247
INSERT_ID=1
master-bin.000001 24
8 Query 1 340
use `test`; insert into t1 values (NULL)
master-bin.000001 24
7 Query 1 338
use `test`; insert into t1 values (NULL)
master-bin.000001 3
40 Query 1 417
use `test`; drop table t1
master-bin.000001 3
38 Query 1 414
use `test`; drop table t1
master-bin.000001 41
7 Query 1 521
use `test`; create table t1 (word char(20) not null)
master-bin.000001 41
4 Query 1 517
use `test`; create table t1 (word char(20) not null)
master-bin.000001 5
21 Begin_load_query 1 1125
;file_id=1;block_len=581
master-bin.000001 5
17 Begin_load_query 1 1121
;file_id=1;block_len=581
master-bin.000001 112
5 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 112
1 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 12
74 Query 1 1351
use `test`; drop table t1
master-bin.000001 12
69 Query 1 1345
use `test`; drop table t1
master-bin.000001 13
51 Rotate 1 1395
master-bin.000002;pos=4
master-bin.000001 13
45 Rotate 1 1389
master-bin.000002;pos=4
show binlog events in 'master-bin.000002';
show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000002 98 Query 1 18
5
use `test`; create table t5 (a int)
master-bin.000002 98 Query 1 18
4
use `test`; create table t5 (a int)
master-bin.000002 18
5 Query 1 262
use `test`; drop table t5
master-bin.000002 18
4 Query 1 260
use `test`; drop table t5
master-bin.000002 26
2 Query 1 349
use `test`; create table t1 (n int)
master-bin.000002 26
0 Query 1 346
use `test`; create table t1 (n int)
master-bin.000002 34
9 Query 1 438
use `test`; insert into t1 values (1)
master-bin.000002 34
6 Query 1 434
use `test`; insert into t1 values (1)
master-bin.000002 43
8 Query 1 515
use `test`; drop table t1
master-bin.000002 43
4 Query 1 510
use `test`; drop table t1
show binary logs;
show binary logs;
Log_name
Log_name
master-bin.000001
master-bin.000001
...
@@ -79,25 +79,25 @@ slave-bin.000002
...
@@ -79,25 +79,25 @@ slave-bin.000002
show binlog events in 'slave-bin.000001' from 4;
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
slave-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.000001 2
20 Intvar 1 248
INSERT_ID=1
slave-bin.000001 2
19 Intvar 1 247
INSERT_ID=1
slave-bin.000001 24
8 Query 1 340
use `test`; insert into t1 values (NULL)
slave-bin.000001 24
7 Query 1 338
use `test`; insert into t1 values (NULL)
slave-bin.000001 3
40 Query 1 417
use `test`; drop table t1
slave-bin.000001 3
38 Query 1 414
use `test`; drop table t1
slave-bin.000001 41
7 Query 1 521
use `test`; create table t1 (word char(20) not null)
slave-bin.000001 41
4 Query 1 517
use `test`; create table t1 (word char(20) not null)
slave-bin.000001 5
21 Begin_load_query 1 1125
;file_id=1;block_len=581
slave-bin.000001 5
17 Begin_load_query 1 1121
;file_id=1;block_len=581
slave-bin.000001 112
5 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 112
1 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 12
83 Query 1 1360
use `test`; drop table t1
slave-bin.000001 12
78 Query 1 1354
use `test`; drop table t1
slave-bin.000001 13
60 Query 1 1447
use `test`; create table t5 (a int)
slave-bin.000001 13
54 Query 1 1440
use `test`; create table t5 (a int)
slave-bin.000001 144
7 Query 1 1524
use `test`; drop table t5
slave-bin.000001 144
0 Query 1 1516
use `test`; drop table t5
slave-bin.000001 15
24 Rotate 2 1567
slave-bin.000002;pos=4
slave-bin.000001 15
16 Rotate 2 1559
slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
slave-bin.000002 98 Query 1 18
5
use `test`; create table t1 (n int)
slave-bin.000002 98 Query 1 18
4
use `test`; create table t1 (n int)
slave-bin.000002 18
5 Query 1 274
use `test`; insert into t1 values (1)
slave-bin.000002 18
4 Query 1 272
use `test`; insert into t1 values (1)
slave-bin.000002 27
4 Query 1 351
use `test`; drop table t1
slave-bin.000002 27
2 Query 1 348
use `test`; drop table t1
show slave status;
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
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 51
5 # # master-bin.000002 Yes Yes 0 0 515
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 51
0 # # master-bin.000002 Yes Yes 0 0 510
# None 0 No #
show binlog events in 'slave-bin.000005' from 4;
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
mysql-test/r/rpl_max_relay_size.result
View file @
9a139ddc
...
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
...
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
start slave;
start slave;
show slave status;
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
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 7
3754 # # master-bin.000001 Yes Yes 0 0 73754
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 7
2952 # # master-bin.000001 Yes Yes 0 0 72952
# None 0 No #
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=(5*4096);
set global max_relay_log_size=(5*4096);
...
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
...
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
start slave;
start slave;
show slave status;
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
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 7
3754 # # master-bin.000001 Yes Yes 0 0 73754
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 7
2952 # # master-bin.000001 Yes Yes 0 0 72952
# None 0 No #
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=0;
set global max_relay_log_size=0;
...
@@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
...
@@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
start slave;
start slave;
show slave status;
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
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 7
3754 # # master-bin.000001 Yes Yes 0 0 73754
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 7
2952 # # master-bin.000001 Yes Yes 0 0 72952
# None 0 No #
stop slave;
stop slave;
reset slave;
reset slave;
flush logs;
flush logs;
...
@@ -49,12 +49,12 @@ flush logs;
...
@@ -49,12 +49,12 @@ flush logs;
create table t1 (a int);
create table t1 (a int);
show slave status;
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
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 73
841 # # master-bin.000001 Yes Yes 0 0 73841
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73
038 # # master-bin.000001 Yes Yes 0 0 73038
# None 0 No #
flush logs;
flush logs;
drop table t1;
drop table t1;
show slave status;
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
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 73
918 # # master-bin.000001 Yes Yes 0 0 73918
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73
114 # # master-bin.000001 Yes Yes 0 0 73114
# None 0 No #
flush logs;
flush logs;
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
...
...
mysql-test/r/rpl_relayrotate.result
View file @
9a139ddc
...
@@ -18,5 +18,5 @@ max(a)
...
@@ -18,5 +18,5 @@ max(a)
8000
8000
show slave status;
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
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 7
43188 # # master-bin.000001 Yes Yes 0 0 743188
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
35186 # # master-bin.000001 Yes Yes 0 0 735186
# None 0 No #
drop table t1;
drop table t1;
mysql-test/r/rpl_replicate_do.result
View file @
9a139ddc
...
@@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
...
@@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
drop table if exists t1,t2,t11;
show slave status;
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
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 16
68 # # master-bin.000001 Yes Yes test.t1 0 0 166
8 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 16
58 # # master-bin.000001 Yes Yes test.t1 0 0 165
8 # None 0 No #
mysql-test/r/rpl_rotate_logs.result
View file @
9a139ddc
...
@@ -16,7 +16,7 @@ create table t1 (s text);
...
@@ -16,7 +16,7 @@ create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
insert into t1 values('Could not break slave'),('Tried hard');
show slave status;
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
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 5
52 # # master-bin.000001 Yes Yes 0 0 552
# None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 5
48 # # master-bin.000001 Yes Yes 0 0 548
# None 0 No #
select * from t1;
select * from t1;
s
s
Could not break slave
Could not break slave
...
@@ -57,7 +57,7 @@ master-bin.000003
...
@@ -57,7 +57,7 @@ master-bin.000003
insert into t2 values (65);
insert into t2 values (65);
show slave status;
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
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;
select * from t2;
m
m
34
34
...
@@ -79,13 +79,13 @@ master-bin.000004
...
@@ -79,13 +79,13 @@ master-bin.000004
master-bin.000005
master-bin.000005
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000005 2
146
master-bin.000005 2
032
select * from t4;
select * from t4;
a
a
testing temporary tables part 2
testing temporary tables part 2
show slave status;
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
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 2
146 # # master-bin.000005 Yes Yes 0 0 2146
# None 0 No #
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2
032 # # master-bin.000005 Yes Yes 0 0 2032
# None 0 No #
lock tables t3 read;
lock tables t3 read;
select count(*) from t3 where n >= 4;
select count(*) from t3 where n >= 4;
count(*)
count(*)
...
...
mysql-test/r/rpl_until.result
View file @
9a139ddc
...
@@ -15,14 +15,14 @@ drop table t2;
...
@@ -15,14 +15,14 @@ drop table t2;
show binlog events;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
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 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000001 98 Query 1 2
20
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 98 Query 1 2
19
use `test`; create table t1(n int not null auto_increment primary key)
master-bin.000001 2
20 Query 1 321
use `test`; insert into t1 values (1),(2),(3),(4)
master-bin.000001 2
19 Query 1 319
use `test`; insert into t1 values (1),(2),(3),(4)
master-bin.000001 3
21 Query 1 398
use `test`; drop table t1
master-bin.000001 3
19 Query 1 395
use `test`; drop table t1
master-bin.000001 39
8 Query 1 520
use `test`; create table t2(n int not null auto_increment primary key)
master-bin.000001 39
5 Query 1 516
use `test`; create table t2(n int not null auto_increment primary key)
master-bin.000001 5
20 Query 1 613
use `test`; insert into t2 values (1),(2)
master-bin.000001 5
16 Query 1 608
use `test`; insert into t2 values (1),(2)
master-bin.000001 6
13 Query 1 706
use `test`; insert into t2 values (3),(4)
master-bin.000001 6
08 Query 1 700
use `test`; insert into t2 values (3),(4)
master-bin.000001 70
6 Query 1 783
use `test`; drop table t2
master-bin.000001 70
0 Query 1 776
use `test`; drop table t2
start slave until master_log_file='master-bin.000001', master_log_pos=3
21
;
start slave until master_log_file='master-bin.000001', master_log_pos=3
19
;
select * from t1;
select * from t1;
n
n
1
1
...
@@ -31,7 +31,7 @@ n
...
@@ -31,7 +31,7 @@ n
4
4
show slave status;
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
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 7
83 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 7
76 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;
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
select * from t1;
n
n
...
@@ -41,21 +41,21 @@ n
...
@@ -41,21 +41,21 @@ n
4
4
show slave status;
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
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 7
83 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 321
# Master master-no-such-bin.000001 291 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 7
76 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=7
51
;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=7
46
;
select * from t2;
select * from t2;
n
n
1
1
2
2
show slave status;
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
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 7
83 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 7
76 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 608 # Relay slave-relay-bin.000004 746
No #
start slave;
start slave;
stop slave;
stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=7
83
;
start slave until master_log_file='master-bin.000001', master_log_pos=7
76
;
show slave status;
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
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 7
83 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 7
76 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;
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
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;
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
...
@@ -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;
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
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread;
start slave sql_thread;
start slave until master_log_file='master-bin.000001', master_log_pos=7
83
;
start slave until master_log_file='master-bin.000001', master_log_pos=7
76
;
Warnings:
Warnings:
Note 1254 Slave is already running
Note 1254 Slave is already running
mysql-test/t/mysqlbinlog.test
View file @
9a139ddc
...
@@ -60,7 +60,7 @@ select "--- --database --" as "";
...
@@ -60,7 +60,7 @@ select "--- --database --" as "";
select
"--- --position --"
as
""
;
select
"--- --position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
position
=
23
2
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
position
=
23
1
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000002
# These are tests for remote binlog.
# These are tests for remote binlog.
# They should return the same as previous test.
# They should return the same as previous test.
...
@@ -92,7 +92,7 @@ select "--- --database --" as "";
...
@@ -92,7 +92,7 @@ select "--- --database --" as "";
select
"--- --position --"
as
""
;
select
"--- --position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
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
=
23
2
--
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
=
23
1
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000002
# Bug#7853 (mysqlbinlog does not accept input from stdin)
# Bug#7853 (mysqlbinlog does not accept input from stdin)
--
disable_query_log
--
disable_query_log
...
...
mysql-test/t/mysqlbinlog2.test
View file @
9a139ddc
...
@@ -46,11 +46,11 @@ select "--- offset --" as "";
...
@@ -46,11 +46,11 @@ select "--- offset --" as "";
--
disable_query_log
--
disable_query_log
select
"--- start-position --"
as
""
;
select
"--- start-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
4
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
0
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
--
disable_query_log
--
disable_query_log
select
"--- stop-position --"
as
""
;
select
"--- stop-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
60
4
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
60
0
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
--
disable_query_log
--
disable_query_log
select
"--- start-datetime --"
as
""
;
select
"--- start-datetime --"
as
""
;
--
enable_query_log
--
enable_query_log
...
@@ -75,7 +75,7 @@ select "--- offset --" as "";
...
@@ -75,7 +75,7 @@ select "--- offset --" as "";
--
disable_query_log
--
disable_query_log
select
"--- start-position --"
as
""
;
select
"--- start-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
4
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
0
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000001
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
000002
--
disable_query_log
--
disable_query_log
select
"--- stop-position --"
as
""
;
select
"--- stop-position --"
as
""
;
--
enable_query_log
--
enable_query_log
...
@@ -102,11 +102,11 @@ select "--- offset --" as "";
...
@@ -102,11 +102,11 @@ select "--- offset --" as "";
--
disable_query_log
--
disable_query_log
select
"--- start-position --"
as
""
;
select
"--- start-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
4
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
0
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
disable_query_log
--
disable_query_log
select
"--- stop-position --"
as
""
;
select
"--- stop-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
60
4
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
60
0
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
disable_query_log
--
disable_query_log
select
"--- start-datetime --"
as
""
;
select
"--- start-datetime --"
as
""
;
--
enable_query_log
--
enable_query_log
...
@@ -129,7 +129,7 @@ select "--- offset --" as "";
...
@@ -129,7 +129,7 @@ select "--- offset --" as "";
--
disable_query_log
--
disable_query_log
select
"--- start-position --"
as
""
;
select
"--- start-position --"
as
""
;
--
enable_query_log
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
60
4
--
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
=
60
0
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
master
-
bin
.
000002
--
disable_query_log
--
disable_query_log
select
"--- stop-position --"
as
""
;
select
"--- stop-position --"
as
""
;
--
enable_query_log
--
enable_query_log
...
...
mysql-test/t/rpl_deadlock.test
View file @
9a139ddc
...
@@ -72,7 +72,7 @@ show slave status;
...
@@ -72,7 +72,7 @@ show slave status;
# 2) Test lock wait timeout
# 2) Test lock wait timeout
stop
slave
;
stop
slave
;
change
master
to
master_log_pos
=
53
6
;
# the BEGIN log event
change
master
to
master_log_pos
=
53
2
;
# the BEGIN log event
begin
;
begin
;
select
*
from
t2
for
update
;
# hold lock
select
*
from
t2
for
update
;
# hold lock
start
slave
;
start
slave
;
...
@@ -93,7 +93,7 @@ set global max_relay_log_size=0;
...
@@ -93,7 +93,7 @@ set global max_relay_log_size=0;
# This is really copy-paste of 2) of above
# This is really copy-paste of 2) of above
stop
slave
;
stop
slave
;
change
master
to
master_log_pos
=
53
6
;
change
master
to
master_log_pos
=
53
2
;
begin
;
begin
;
select
*
from
t2
for
update
;
select
*
from
t2
for
update
;
start
slave
;
start
slave
;
...
...
mysql-test/t/rpl_loaddata.test
View file @
9a139ddc
...
@@ -123,12 +123,29 @@ show slave status;
...
@@ -123,12 +123,29 @@ show slave status;
connection
master
;
connection
master
;
reset
master
;
reset
master
;
create
table
t2
(
day
date
,
id
int
(
9
),
category
enum
(
'a'
,
'b'
,
'c'
),
name
varchar
(
60
),
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
;
--
error
1062
;
load
data
infile
'../../std_data/rpl_loaddata2.dat'
into
table
t2
fields
load
data
infile
'../../std_data/rpl_loaddata2.dat'
into
table
t2
fields
terminated
by
','
optionally
enclosed
by
'%'
escaped
by
'@'
lines
terminated
by
terminated
by
','
optionally
enclosed
by
'%'
escaped
by
'@'
lines
terminated
by
'\n##\n'
starting
by
'>'
ignore
1
lines
;
'\n##\n'
starting
by
'>'
ignore
1
lines
;
# To test that there is Create_file & Delete_file, we test if the binlog is as
select
*
from
t2
;
# long as expected (can't do SHOW BINLOG EVENTS because of varying file_id).
save_master_pos
;
show
master
status
;
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
;
drop
table
t2
;
mysql-test/t/rpl_until.test
View file @
9a139ddc
...
@@ -24,7 +24,7 @@ show binlog events;
...
@@ -24,7 +24,7 @@ show binlog events;
# try to replicate all queries until drop of t1
# try to replicate all queries until drop of t1
connection
slave
;
connection
slave
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
3
21
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
3
19
;
sleep
2
;
sleep
2
;
# here table should be still not deleted
# here table should be still not deleted
select
*
from
t1
;
select
*
from
t1
;
...
@@ -42,7 +42,7 @@ sleep 2;
...
@@ -42,7 +42,7 @@ sleep 2;
show
slave
status
;
show
slave
status
;
# try replicate all until second insert to t2;
# try replicate all until second insert to t2;
start
slave
until
relay_log_file
=
'slave-relay-bin.000004'
,
relay_log_pos
=
7
51
;
start
slave
until
relay_log_file
=
'slave-relay-bin.000004'
,
relay_log_pos
=
7
46
;
sleep
4
;
sleep
4
;
select
*
from
t2
;
select
*
from
t2
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
...
@@ -58,7 +58,7 @@ sync_with_master;
...
@@ -58,7 +58,7 @@ sync_with_master;
stop
slave
;
stop
slave
;
# this should stop immediately as we are already there
# this should stop immediately as we are already there
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
7
83
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
7
76
;
# 2 is not enough when running with valgrind
# 2 is not enough when running with valgrind
real_sleep
4
real_sleep
4
# here the sql slave thread should be stopped
# here the sql slave thread should be stopped
...
@@ -79,4 +79,4 @@ start slave until relay_log_file='slave-relay-bin.000002';
...
@@ -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
;
start
slave
until
relay_log_file
=
'slave-relay-bin.000002'
,
master_log_pos
=
561
;
# Warning should be given for second command
# Warning should be given for second command
start
slave
sql_thread
;
start
slave
sql_thread
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
7
83
;
start
slave
until
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
7
76
;
sql/log_event.cc
View file @
9a139ddc
...
@@ -1041,25 +1041,28 @@ bool Query_log_event::write(IO_CACHE* file)
...
@@ -1041,25 +1041,28 @@ bool Query_log_event::write(IO_CACHE* file)
}
}
if
(
catalog_len
)
// i.e. "catalog inited" (false for 4.0 events)
if
(
catalog_len
)
// i.e. "catalog inited" (false for 4.0 events)
{
{
*
start
++=
Q_CATALOG_CODE
;
*
start
++=
Q_CATALOG_
NZ_
CODE
;
*
start
++=
(
uchar
)
catalog_len
;
*
start
++=
(
uchar
)
catalog_len
;
bmove
(
start
,
catalog
,
catalog_len
);
bmove
(
start
,
catalog
,
catalog_len
);
start
+=
catalog_len
;
start
+=
catalog_len
;
/*
/*
We write a \0 at the end. As we also have written the length, it's
In 5.0.x where x<4 masters we used to store the end zero here. This was
apparently useless; but in fact it enables us to just do
a waste of one byte so we don't do it in x>=4 masters. We change code to
catalog= a_pointer_to_the_buffer_of_the_read_event
Q_CATALOG_NZ_CODE, because re-using the old code would make x<4 slaves
later in the slave SQL thread.
of this x>=4 master segfault (expecting a zero when there is
If we didn't have the \0, we would need to memdup to build the catalog in
none). Remaining compatibility problems are: the older slave will not
the slave SQL thread.
find the catalog; but it is will not crash, and it's not an issue
And still the interest of having the length too is that in the slave SQL
that it does not find the catalog as catalogs were not used in these older
thread we immediately know at which position the catalog ends (no need to
MySQL versions (we store it in binlog and read it from relay log but do
search for '\0'. In other words: length saves search, \0 saves mem alloc,
nothing useful with it). What is an issue is that the older slave will
at the cost of 1 redundant byte on the disk.
stop processing the Q_* blocks (and jumps to the db/query) as soon as it
Note that this is only a fix until we change 'catalog' to LEX_STRING
sees unknown Q_CATALOG_NZ_CODE; so it will not be able to read
(then we won't need the \0).
Q_AUTO_INCREMENT*, Q_CHARSET and so replication will fail silently in
*/
various ways. Documented that you should not mix alpha/beta versions if
*
(
start
++
)
=
'\0'
;
they are not exactly the same version, with example of 5.0.2<->5.0.3 and
5.0.3<->5.0.4. If replication is from older to new, the new won't find
the catalog and will have the same problems.
*/
}
}
if
(
auto_increment_increment
!=
1
)
if
(
auto_increment_increment
!=
1
)
{
{
...
@@ -1259,10 +1262,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
...
@@ -1259,10 +1262,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
pos
+=
8
;
pos
+=
8
;
break
;
break
;
}
}
case
Q_CATALOG_CODE
:
case
Q_CATALOG_
NZ_
CODE
:
if
((
catalog_len
=
*
pos
))
if
((
catalog_len
=
*
pos
))
catalog
=
(
char
*
)
pos
+
1
;
// Will be copied later
catalog
=
(
char
*
)
pos
+
1
;
// Will be copied later
pos
+=
catalog_len
+
2
;
pos
+=
catalog_len
+
1
;
break
;
break
;
case
Q_AUTO_INCREMENT
:
case
Q_AUTO_INCREMENT
:
auto_increment_increment
=
uint2korr
(
pos
);
auto_increment_increment
=
uint2korr
(
pos
);
...
@@ -1297,9 +1300,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
...
@@ -1297,9 +1300,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
if
(
catalog_len
)
// If catalog is given
if
(
catalog_len
)
// If catalog is given
{
{
memcpy
(
start
,
catalog
,
catalog_len
+
1
);
// Copy name and end \0
memcpy
(
start
,
catalog
,
catalog_len
);
catalog
=
start
;
catalog
=
start
;
start
+=
catalog_len
+
1
;
start
+=
catalog_len
;
*
start
++=
0
;
}
}
if
(
time_zone_len
)
if
(
time_zone_len
)
{
{
...
@@ -4006,8 +4010,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -4006,8 +4010,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
strmov
(
p
,
".info"
);
// strmov takes less code than memcpy
strmov
(
p
,
".info"
);
// strmov takes less code than memcpy
strnmov
(
proc_info
,
"Making temp file "
,
17
);
// no end 0
strnmov
(
proc_info
,
"Making temp file "
,
17
);
// no end 0
thd
->
proc_info
=
proc_info
;
thd
->
proc_info
=
proc_info
;
if
((
fd
=
my_open
(
fname_buf
,
O_WRONLY
|
O_CREAT
|
O_BINARY
|
O_TRUNC
,
my_delete
(
fname_buf
,
MYF
(
0
));
// old copy may exist already
MYF
(
MY_WME
)))
<
0
||
if
((
fd
=
my_create
(
fname_buf
,
CREATE_MODE
,
O_WRONLY
|
O_BINARY
|
O_EXCL
|
O_NOFOLLOW
,
MYF
(
MY_WME
)))
<
0
||
init_io_cache
(
&
file
,
fd
,
IO_SIZE
,
WRITE_CACHE
,
(
my_off_t
)
0
,
0
,
init_io_cache
(
&
file
,
fd
,
IO_SIZE
,
WRITE_CACHE
,
(
my_off_t
)
0
,
0
,
MYF
(
MY_WME
|
MY_NABP
)))
MYF
(
MY_WME
|
MY_NABP
)))
{
{
...
@@ -4031,8 +4037,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -4031,8 +4037,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
my_close
(
fd
,
MYF
(
0
));
my_close
(
fd
,
MYF
(
0
));
// fname_buf now already has .data, not .info, because we did our trick
// fname_buf now already has .data, not .info, because we did our trick
if
((
fd
=
my_open
(
fname_buf
,
O_WRONLY
|
O_CREAT
|
O_BINARY
|
O_TRUNC
,
my_delete
(
fname_buf
,
MYF
(
0
));
// old copy may exist already
MYF
(
MY_WME
)))
<
0
)
if
((
fd
=
my_create
(
fname_buf
,
CREATE_MODE
,
O_WRONLY
|
O_BINARY
|
O_EXCL
|
O_NOFOLLOW
,
MYF
(
MY_WME
)))
<
0
)
{
{
slave_print_error
(
rli
,
my_errno
,
"Error in Create_file event: could not open file '%s'"
,
fname_buf
);
slave_print_error
(
rli
,
my_errno
,
"Error in Create_file event: could not open file '%s'"
,
fname_buf
);
goto
err
;
goto
err
;
...
@@ -4148,12 +4156,12 @@ void Append_block_log_event::pack_info(Protocol *protocol)
...
@@ -4148,12 +4156,12 @@ void Append_block_log_event::pack_info(Protocol *protocol)
/*
/*
Append_block_log_event::get_
open_mode
()
Append_block_log_event::get_
create_or_append
()
*/
*/
int
Append_block_log_event
::
get_
open_mode
()
const
int
Append_block_log_event
::
get_
create_or_append
()
const
{
{
return
O_WRONLY
|
O_APPEND
|
O_BINARY
;
return
0
;
/* append to the file, fail if not exists */
}
}
/*
/*
...
@@ -4171,7 +4179,20 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -4171,7 +4179,20 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli)
memcpy
(
p
,
".data"
,
6
);
memcpy
(
p
,
".data"
,
6
);
strnmov
(
proc_info
,
"Making temp file "
,
17
);
// no end 0
strnmov
(
proc_info
,
"Making temp file "
,
17
);
// no end 0
thd
->
proc_info
=
proc_info
;
thd
->
proc_info
=
proc_info
;
if
((
fd
=
my_open
(
fname
,
get_open_mode
(),
MYF
(
MY_WME
)))
<
0
)
if
(
get_create_or_append
())
{
my_delete
(
fname
,
MYF
(
0
));
// old copy may exist already
if
((
fd
=
my_create
(
fname
,
CREATE_MODE
,
O_WRONLY
|
O_BINARY
|
O_EXCL
|
O_NOFOLLOW
,
MYF
(
MY_WME
)))
<
0
)
{
slave_print_error
(
rli
,
my_errno
,
"Error in %s event: could not create file '%s'"
,
get_type_str
(),
fname
);
goto
err
;
}
}
else
if
((
fd
=
my_open
(
fname
,
O_WRONLY
|
O_APPEND
|
O_BINARY
|
O_NOFOLLOW
,
MYF
(
MY_WME
)))
<
0
)
{
{
slave_print_error
(
rli
,
my_errno
,
slave_print_error
(
rli
,
my_errno
,
"Error in %s event: could not open file '%s'"
,
"Error in %s event: could not open file '%s'"
,
...
@@ -4384,7 +4405,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -4384,7 +4405,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
Load_log_event
*
lev
=
0
;
Load_log_event
*
lev
=
0
;
memcpy
(
p
,
".info"
,
6
);
memcpy
(
p
,
".info"
,
6
);
if
((
fd
=
my_open
(
fname
,
O_RDONLY
|
O_BINARY
,
MYF
(
MY_WME
)))
<
0
||
if
((
fd
=
my_open
(
fname
,
O_RDONLY
|
O_BINARY
|
O_NOFOLLOW
,
MYF
(
MY_WME
)))
<
0
||
init_io_cache
(
&
file
,
fd
,
IO_SIZE
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
init_io_cache
(
&
file
,
fd
,
IO_SIZE
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
MYF
(
MY_WME
|
MY_NABP
)))
MYF
(
MY_WME
|
MY_NABP
)))
{
{
...
@@ -4483,9 +4504,9 @@ Begin_load_query_log_event(const char* buf, uint len,
...
@@ -4483,9 +4504,9 @@ Begin_load_query_log_event(const char* buf, uint len,
#if defined( HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
#if defined( HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
int
Begin_load_query_log_event
::
get_
open_mode
()
const
int
Begin_load_query_log_event
::
get_
create_or_append
()
const
{
{
return
O_CREAT
|
O_WRONLY
|
O_BINARY
|
O_TRUNC
;
return
1
;
/* create the file */
}
}
#endif
/* defined( HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
#endif
/* defined( HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */
...
@@ -4662,7 +4683,12 @@ Execute_load_query_log_event::exec_event(struct st_relay_log_info* rli)
...
@@ -4662,7 +4683,12 @@ Execute_load_query_log_event::exec_event(struct st_relay_log_info* rli)
/* Forging file name for deletion in same buffer */
/* Forging file name for deletion in same buffer */
*
fname_end
=
0
;
*
fname_end
=
0
;
(
void
)
my_delete
(
fname
,
MYF
(
MY_WME
));
/*
If there was an error the slave is going to stop, leave the
file so that we can re-execute this event at START SLAVE.
*/
if
(
!
error
)
(
void
)
my_delete
(
fname
,
MYF
(
MY_WME
));
my_free
(
buf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
buf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
return
error
;
return
error
;
...
...
sql/log_event.h
View file @
9a139ddc
...
@@ -234,10 +234,22 @@ struct sql_ex_info
...
@@ -234,10 +234,22 @@ struct sql_ex_info
/* these are codes, not offsets; not more than 256 values (1 byte). */
/* these are codes, not offsets; not more than 256 values (1 byte). */
#define Q_FLAGS2_CODE 0
#define Q_FLAGS2_CODE 0
#define Q_SQL_MODE_CODE 1
#define Q_SQL_MODE_CODE 1
/*
Q_CATALOG_CODE is catalog with end zero stored; it is used only by MySQL
5.0.x where 0<=x<=3.
*/
#define Q_CATALOG_CODE 2
#define Q_CATALOG_CODE 2
#define Q_AUTO_INCREMENT 3
#define Q_AUTO_INCREMENT 3
#define Q_CHARSET_CODE 4
#define Q_CHARSET_CODE 4
#define Q_TIME_ZONE_CODE 5
#define Q_TIME_ZONE_CODE 5
/*
Q_CATALOG_NZ_CODE is catalog withOUT end zero stored; it is used by MySQL
5.0.x where x>=4. Saves one byte in every Query_log_event in binlog,
compared to Q_CATALOG_CODE. The reason we didn't simply re-use
Q_CATALOG_CODE is that then a 5.0.3 slave of this 5.0.x (x>=4) master would
crash (segfault etc) because it would expect a 0 when there is none.
*/
#define Q_CATALOG_NZ_CODE 6
/* Intvar event post-header */
/* Intvar event post-header */
...
@@ -1367,7 +1379,7 @@ public:
...
@@ -1367,7 +1379,7 @@ public:
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
int
exec_event
(
struct
st_relay_log_info
*
rli
);
int
exec_event
(
struct
st_relay_log_info
*
rli
);
void
pack_info
(
Protocol
*
protocol
);
void
pack_info
(
Protocol
*
protocol
);
virtual
int
get_
open_mode
()
const
;
virtual
int
get_
create_or_append
()
const
;
#endif
/* HAVE_REPLICATION */
#endif
/* HAVE_REPLICATION */
#else
#else
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
LAST_EVENT_INFO
*
last_event_info
=
0
);
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
LAST_EVENT_INFO
*
last_event_info
=
0
);
...
@@ -1475,7 +1487,7 @@ public:
...
@@ -1475,7 +1487,7 @@ public:
bool
using_trans
);
bool
using_trans
);
#ifdef HAVE_REPLICATION
#ifdef HAVE_REPLICATION
Begin_load_query_log_event
(
THD
*
thd
);
Begin_load_query_log_event
(
THD
*
thd
);
int
get_
open_mode
()
const
;
int
get_
create_or_append
()
const
;
#endif
/* HAVE_REPLICATION */
#endif
/* HAVE_REPLICATION */
#endif
#endif
Begin_load_query_log_event
(
const
char
*
buf
,
uint
event_len
,
Begin_load_query_log_event
(
const
char
*
buf
,
uint
event_len
,
...
...
sql/sql_load.cc
View file @
9a139ddc
...
@@ -81,6 +81,9 @@ static int read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
...
@@ -81,6 +81,9 @@ static int read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
List
<
Item
>
&
set_values
,
READ_INFO
&
read_info
,
List
<
Item
>
&
set_values
,
READ_INFO
&
read_info
,
String
&
enclosed
,
ulong
skip_lines
,
String
&
enclosed
,
ulong
skip_lines
,
bool
ignore_check_option_errors
);
bool
ignore_check_option_errors
);
static
bool
write_execute_load_query_log_event
(
THD
*
thd
,
bool
duplicates
,
bool
ignore
,
bool
transactional_table
);
/*
/*
...
@@ -413,8 +416,14 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -413,8 +416,14 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
/* If the file was not empty, wrote_create_file is true */
/* If the file was not empty, wrote_create_file is true */
if
(
lf_info
.
wrote_create_file
)
if
(
lf_info
.
wrote_create_file
)
{
{
Delete_file_log_event
d
(
thd
,
db
,
transactional_table
);
if
((
info
.
copied
||
info
.
deleted
)
&&
!
transactional_table
)
mysql_bin_log
.
write
(
&
d
);
write_execute_load_query_log_event
(
thd
,
handle_duplicates
,
ignore
,
transactional_table
);
else
{
Delete_file_log_event
d
(
thd
,
db
,
transactional_table
);
mysql_bin_log
.
write
(
&
d
);
}
}
}
}
}
#endif
/*!EMBEDDED_LIBRARY*/
#endif
/*!EMBEDDED_LIBRARY*/
...
@@ -437,16 +446,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -437,16 +446,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
*/
*/
read_info
.
end_io_cache
();
read_info
.
end_io_cache
();
if
(
lf_info
.
wrote_create_file
)
if
(
lf_info
.
wrote_create_file
)
{
write_execute_load_query_log_event
(
thd
,
handle_duplicates
,
Execute_load_query_log_event
e
(
thd
,
thd
->
query
,
thd
->
query_length
,
ignore
,
transactional_table
);
(
char
*
)
thd
->
lex
->
fname_start
-
(
char
*
)
thd
->
query
,
(
char
*
)
thd
->
lex
->
fname_end
-
(
char
*
)
thd
->
query
,
(
handle_duplicates
==
DUP_REPLACE
)
?
LOAD_DUP_REPLACE
:
(
ignore
?
LOAD_DUP_IGNORE
:
LOAD_DUP_ERROR
),
transactional_table
,
FALSE
);
mysql_bin_log
.
write
(
&
e
);
}
}
}
#endif
/*!EMBEDDED_LIBRARY*/
#endif
/*!EMBEDDED_LIBRARY*/
if
(
transactional_table
)
if
(
transactional_table
)
...
@@ -462,6 +463,23 @@ err:
...
@@ -462,6 +463,23 @@ err:
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
/* Not a very useful function; just to avoid duplication of code */
static
bool
write_execute_load_query_log_event
(
THD
*
thd
,
bool
duplicates
,
bool
ignore
,
bool
transactional_table
)
{
Execute_load_query_log_event
e
(
thd
,
thd
->
query
,
thd
->
query_length
,
(
char
*
)
thd
->
lex
->
fname_start
-
(
char
*
)
thd
->
query
,
(
char
*
)
thd
->
lex
->
fname_end
-
(
char
*
)
thd
->
query
,
(
duplicates
==
DUP_REPLACE
)
?
LOAD_DUP_REPLACE
:
(
ignore
?
LOAD_DUP_IGNORE
:
LOAD_DUP_ERROR
),
transactional_table
,
FALSE
);
return
mysql_bin_log
.
write
(
&
e
);
}
/****************************************************************************
/****************************************************************************
** Read of rows of fixed size + optional garage + optonal newline
** Read of rows of fixed size + optional garage + optonal newline
****************************************************************************/
****************************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment