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
e1a360ad
Commit
e1a360ad
authored
Feb 21, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merging with mysql-5.1-new-rpl
mysql-test/r/rpl_row_delayed_ins.result: Manual merge.
parents
af71cac0
e4146a9f
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
540 additions
and
266 deletions
+540
-266
mysql-test/extra/rpl_tests/rpl_deadlock.test
mysql-test/extra/rpl_tests/rpl_deadlock.test
+2
-2
mysql-test/extra/rpl_tests/rpl_log.test
mysql-test/extra/rpl_tests/rpl_log.test
+3
-3
mysql-test/extra/rpl_tests/rpl_row_charset.test
mysql-test/extra/rpl_tests/rpl_row_charset.test
+1
-1
mysql-test/r/rpl_000015.result
mysql-test/r/rpl_000015.result
+2
-2
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+2
-2
mysql-test/r/rpl_deadlock_innodb.result
mysql-test/r/rpl_deadlock_innodb.result
+2
-2
mysql-test/r/rpl_flushlog_loop.result
mysql-test/r/rpl_flushlog_loop.result
+2
-2
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+4
-4
mysql-test/r/rpl_row_basic_11bugs.result
mysql-test/r/rpl_row_basic_11bugs.result
+107
-8
mysql-test/r/rpl_row_charset.result
mysql-test/r/rpl_row_charset.result
+1
-1
mysql-test/r/rpl_row_create_table.result
mysql-test/r/rpl_row_create_table.result
+16
-16
mysql-test/r/rpl_row_delayed_ins.result
mysql-test/r/rpl_row_delayed_ins.result
+8
-12
mysql-test/r/rpl_row_drop.result
mysql-test/r/rpl_row_drop.result
+4
-4
mysql-test/r/rpl_row_flsh_tbls.result
mysql-test/r/rpl_row_flsh_tbls.result
+2
-2
mysql-test/r/rpl_row_inexist_tbl.result
mysql-test/r/rpl_row_inexist_tbl.result
+1
-1
mysql-test/r/rpl_row_log.result
mysql-test/r/rpl_row_log.result
+8
-8
mysql-test/r/rpl_row_log_innodb.result
mysql-test/r/rpl_row_log_innodb.result
+8
-8
mysql-test/r/rpl_row_max_relay_size.result
mysql-test/r/rpl_row_max_relay_size.result
+11
-11
mysql-test/r/rpl_row_reset_slave.result
mysql-test/r/rpl_row_reset_slave.result
+3
-3
mysql-test/r/rpl_row_until.result
mysql-test/r/rpl_row_until.result
+4
-4
mysql-test/r/rpl_server_id1.result
mysql-test/r/rpl_server_id1.result
+1
-1
mysql-test/r/rpl_server_id2.result
mysql-test/r/rpl_server_id2.result
+1
-1
mysql-test/r/rpl_switch_stm_row_mixed.result
mysql-test/r/rpl_switch_stm_row_mixed.result
+2
-2
mysql-test/r/rpl_truncate_2myisam.result
mysql-test/r/rpl_truncate_2myisam.result
+33
-33
mysql-test/r/rpl_truncate_3innodb.result
mysql-test/r/rpl_truncate_3innodb.result
+45
-45
mysql-test/t/rpl_loaddata_s.test
mysql-test/t/rpl_loaddata_s.test
+1
-1
mysql-test/t/rpl_log_pos.test
mysql-test/t/rpl_log_pos.test
+1
-1
mysql-test/t/rpl_row_basic_11bugs-master.opt
mysql-test/t/rpl_row_basic_11bugs-master.opt
+2
-1
mysql-test/t/rpl_row_basic_11bugs-slave.opt
mysql-test/t/rpl_row_basic_11bugs-slave.opt
+1
-0
mysql-test/t/rpl_row_basic_11bugs.test
mysql-test/t/rpl_row_basic_11bugs.test
+69
-1
mysql-test/t/rpl_row_create_table.test
mysql-test/t/rpl_row_create_table.test
+5
-5
mysql-test/t/rpl_row_flsh_tbls.test
mysql-test/t/rpl_row_flsh_tbls.test
+1
-1
mysql-test/t/rpl_row_mysqlbinlog.test
mysql-test/t/rpl_row_mysqlbinlog.test
+2
-2
mysql-test/t/rpl_switch_stm_row_mixed.test
mysql-test/t/rpl_switch_stm_row_mixed.test
+2
-2
mysql-test/t/user_var-binlog.test
mysql-test/t/user_var-binlog.test
+1
-1
sql/log_event.cc
sql/log_event.cc
+68
-55
sql/log_event.h
sql/log_event.h
+16
-3
sql/sql_class.cc
sql/sql_class.cc
+98
-15
No files found.
mysql-test/extra/rpl_tests/rpl_deadlock.test
View file @
e1a360ad
...
@@ -82,7 +82,7 @@ show slave status;
...
@@ -82,7 +82,7 @@ show slave status;
stop
slave
;
stop
slave
;
delete
from
t3
;
delete
from
t3
;
change
master
to
master_log_pos
=
54
4
;
# the BEGIN log event
change
master
to
master_log_pos
=
54
7
;
# the BEGIN log event
begin
;
begin
;
select
*
from
t2
for
update
;
# hold lock
select
*
from
t2
for
update
;
# hold lock
start
slave
;
start
slave
;
...
@@ -107,7 +107,7 @@ set global max_relay_log_size=0;
...
@@ -107,7 +107,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
;
delete
from
t3
;
delete
from
t3
;
change
master
to
master_log_pos
=
54
4
;
change
master
to
master_log_pos
=
54
7
;
begin
;
begin
;
select
*
from
t2
for
update
;
select
*
from
t2
for
update
;
start
slave
;
start
slave
;
...
...
mysql-test/extra/rpl_tests/rpl_log.test
View file @
e1a360ad
...
@@ -42,13 +42,13 @@ select count(*) from t1;
...
@@ -42,13 +42,13 @@ select count(*) from t1;
show
binlog
events
;
show
binlog
events
;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
show
binlog
events
from
10
2
limit
1
;
show
binlog
events
from
10
5
limit
1
;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
show
binlog
events
from
10
2
limit
2
;
show
binlog
events
from
10
5
limit
2
;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
show
binlog
events
from
10
2
limit
2
,
1
;
show
binlog
events
from
10
5
limit
2
,
1
;
flush
logs
;
flush
logs
;
# We need an extra update before doing save_master_pos.
# We need an extra update before doing save_master_pos.
...
...
mysql-test/extra/rpl_tests/rpl_row_charset.test
View file @
e1a360ad
...
@@ -115,7 +115,7 @@ drop database mysqltest2;
...
@@ -115,7 +115,7 @@ drop database mysqltest2;
drop
database
mysqltest3
;
drop
database
mysqltest3
;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
show
binlog
events
from
10
2
;
show
binlog
events
from
10
5
;
sync_slave_with_master
;
sync_slave_with_master
;
# Check that we can change global.collation_server (since 5.0.3)
# Check that we can change global.collation_server (since 5.0.3)
...
...
mysql-test/r/rpl_000015.result
View file @
e1a360ad
reset master;
reset master;
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 10
2
master-bin.000001 10
5
reset slave;
reset 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
...
@@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
...
@@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
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 7 master-bin.000001 10
2 # # master-bin.000001 Yes Yes 0 0 102
# None 0 No #
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 10
5 # # master-bin.000001 Yes Yes 0 0 105
# None 0 No #
drop table if exists t1;
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
insert into t1 values (10),(45),(90);
...
...
mysql-test/r/rpl_change_master.result
View file @
e1a360ad
...
@@ -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 # # # master-bin.000001 No No 0 0 1
87
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 1
90
# 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 # # # master-bin.000001 No No 0 0 1
87
# None 0 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 1
90
# None 0 No #
start slave;
start slave;
select * from t1;
select * from t1;
n
n
...
...
mysql-test/r/rpl_deadlock_innodb.result
View file @
e1a360ad
...
@@ -80,7 +80,7 @@ Master_SSL_Key
...
@@ -80,7 +80,7 @@ Master_SSL_Key
Seconds_Behind_Master #
Seconds_Behind_Master #
stop slave;
stop slave;
delete from t3;
delete from t3;
change master to master_log_pos=54
4
;
change master to master_log_pos=54
7
;
begin;
begin;
select * from t2 for update;
select * from t2 for update;
a
a
...
@@ -136,7 +136,7 @@ set @my_max_relay_log_size= @@global.max_relay_log_size;
...
@@ -136,7 +136,7 @@ set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0;
set global max_relay_log_size=0;
stop slave;
stop slave;
delete from t3;
delete from t3;
change master to master_log_pos=54
4
;
change master to master_log_pos=54
7
;
begin;
begin;
select * from t2 for update;
select * from t2 for update;
a
a
...
...
mysql-test/r/rpl_flushlog_loop.result
View file @
e1a360ad
...
@@ -24,7 +24,7 @@ Master_User root
...
@@ -24,7 +24,7 @@ Master_User root
Master_Port SLAVE_PORT
Master_Port SLAVE_PORT
Connect_Retry 60
Connect_Retry 60
Master_Log_File slave-bin.000001
Master_Log_File slave-bin.000001
Read_Master_Log_Pos 21
2
Read_Master_Log_Pos 21
5
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File slave-bin.000001
Relay_Master_Log_File slave-bin.000001
...
@@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
...
@@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 21
2
Exec_Master_Log_Pos 21
5
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
...
mysql-test/r/rpl_log_pos.result
View file @
e1a360ad
...
@@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
...
@@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 10
2
<Binlog_Ignore_DB>
master-bin.000001 10
5
<Binlog_Ignore_DB>
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 10
2 # # master-bin.000001 Yes Yes 0 0 102
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 10
5 # # master-bin.000001 Yes Yes 0 0 105
# None 0 No #
stop slave;
stop slave;
change master to master_log_pos=74;
change master to master_log_pos=74;
start slave;
start slave;
...
@@ -30,13 +30,13 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
...
@@ -30,13 +30,13 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No #
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 10
2
<Binlog_Ignore_DB>
master-bin.000001 10
5
<Binlog_Ignore_DB>
create table if not exists t1 (n int);
create table if not exists t1 (n int);
drop table if exists t1;
drop table if exists t1;
create table t1 (n int);
create table t1 (n int);
insert into t1 values (1),(2),(3);
insert into t1 values (1),(2),(3);
stop slave;
stop slave;
change master to master_log_pos=10
2
;
change master to master_log_pos=10
5
;
start slave;
start slave;
select * from t1 ORDER BY n;
select * from t1 ORDER BY n;
n
n
...
...
mysql-test/r/rpl_row_basic_11bugs.result
View file @
e1a360ad
...
@@ -24,11 +24,11 @@ SHOW TABLES;
...
@@ -24,11 +24,11 @@ SHOW TABLES;
Tables_in_test_ignore
Tables_in_test_ignore
t2
t2
INSERT INTO t2 VALUES (3,3), (4,4);
INSERT INTO t2 VALUES (3,3), (4,4);
SHOW BINLOG EVENTS FROM 10
2
;
SHOW BINLOG EVENTS FROM 10
5
;
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 10
2 Query 1 195
use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 10
5 Query 1 198
use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 19
5 Table_map 1 235
table_id: # (test.t1)
master-bin.000001 19
8 Table_map 1 238
table_id: # (test.t1)
master-bin.000001 23
5 Write_rows 1 282
table_id: # flags: STMT_END_F
master-bin.000001 23
8 Write_rows 1 285
table_id: # flags: STMT_END_F
**** On Slave ****
**** On Slave ****
SHOW DATABASES;
SHOW DATABASES;
Database
Database
...
@@ -54,10 +54,10 @@ DELETE FROM t1 WHERE a = 0;
...
@@ -54,10 +54,10 @@ DELETE FROM t1 WHERE a = 0;
UPDATE t1 SET a=99 WHERE a = 0;
UPDATE t1 SET a=99 WHERE a = 0;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 188
use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 10
5 Query 1 191
use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 1
88 Table_map 1 227
table_id: # (test.t1)
master-bin.000001 1
91 Table_map 1 230
table_id: # (test.t1)
master-bin.000001 2
27 Write_rows 1 266
table_id: # flags: STMT_END_F
master-bin.000001 2
30 Write_rows 1 269
table_id: # flags: STMT_END_F
DROP TABLE t1;
DROP TABLE t1;
================ Test for BUG#17620 ================
================ Test for BUG#17620 ================
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
...
@@ -118,3 +118,102 @@ HEX(a) b
...
@@ -118,3 +118,102 @@ HEX(a) b
SELECT HEX(a),b FROM t1;
SELECT HEX(a),b FROM t1;
HEX(a) b
HEX(a) b
0 2
0 2
DROP TABLE IF EXISTS t1;
================ Test for BUG#22583 ================
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** On Master ****
CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM;
CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB;
CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM;
CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB;
**** On Slave ****
ALTER TABLE t1_myisam ENGINE=INNODB;
ALTER TABLE t1_innodb ENGINE=MYISAM;
ALTER TABLE t2_myisam ENGINE=INNODB;
ALTER TABLE t2_innodb ENGINE=MYISAM;
**** On Master ****
INSERT INTO t1_myisam VALUES(1, b'0', 257);
INSERT INTO t1_myisam VALUES(2, b'1', 256);
INSERT INTO t1_innodb VALUES(1, b'0', 257);
INSERT INTO t1_innodb VALUES(2, b'1', 256);
SELECT k, HEX(a),HEX(b) FROM t1_myisam;
k HEX(a) HEX(b)
1 0 101
2 1 100
SELECT k, HEX(a),HEX(b) FROM t1_innodb;
k HEX(a) HEX(b)
1 0 101
2 1 100
INSERT INTO t2_myisam VALUES(1, b'0', 9);
INSERT INTO t2_myisam VALUES(2, b'1', 8);
INSERT INTO t2_innodb VALUES(1, b'0', 9);
INSERT INTO t2_innodb VALUES(2, b'1', 8);
SELECT k, HEX(a),HEX(b) FROM t2_myisam;
k HEX(a) HEX(b)
1 0 9
2 1 8
SELECT k, HEX(a),HEX(b) FROM t2_innodb;
k HEX(a) HEX(b)
1 0 9
2 1 8
**** On Slave ****
SELECT k, HEX(a),HEX(b) FROM t1_myisam;
k HEX(a) HEX(b)
1 0 101
2 1 100
SELECT k, HEX(a),HEX(b) FROM t1_innodb;
k HEX(a) HEX(b)
1 0 101
2 1 100
SELECT k, HEX(a),HEX(b) FROM t2_myisam;
k HEX(a) HEX(b)
1 0 9
2 1 8
SELECT k, HEX(a),HEX(b) FROM t2_innodb;
k HEX(a) HEX(b)
1 0 9
2 1 8
**** On Master ****
UPDATE t1_myisam SET a=0 WHERE k=2;
SELECT k, HEX(a),HEX(b) FROM t1_myisam;
k HEX(a) HEX(b)
1 0 101
2 0 100
UPDATE t1_innodb SET a=0 WHERE k=2;
SELECT k, HEX(a),HEX(b) FROM t1_innodb;
k HEX(a) HEX(b)
1 0 101
2 0 100
UPDATE t2_myisam SET a=0 WHERE k=2;
SELECT k, HEX(a),HEX(b) FROM t2_myisam;
k HEX(a) HEX(b)
1 0 9
2 0 8
UPDATE t2_innodb SET a=0 WHERE k=2;
SELECT k, HEX(a),HEX(b) FROM t2_innodb;
k HEX(a) HEX(b)
1 0 9
2 0 8
**** On Slave ****
SELECT k, HEX(a),HEX(b) FROM t1_myisam;
k HEX(a) HEX(b)
1 0 101
2 0 100
SELECT k, HEX(a),HEX(b) FROM t1_innodb;
k HEX(a) HEX(b)
1 0 101
2 0 100
SELECT k, HEX(a),HEX(b) FROM t2_myisam;
k HEX(a) HEX(b)
1 0 9
2 0 8
SELECT k, HEX(a),HEX(b) FROM t2_innodb;
k HEX(a) HEX(b)
1 0 9
2 0 8
**** On Master ****
DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb;
mysql-test/r/rpl_row_charset.result
View file @
e1a360ad
...
@@ -109,7 +109,7 @@ a b
...
@@ -109,7 +109,7 @@ a b
1 cp850_general_ci
1 cp850_general_ci
drop database mysqltest2;
drop database mysqltest2;
drop database mysqltest3;
drop database mysqltest3;
show binlog events from 10
2
;
show binlog events from 10
5
;
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 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest2
master-bin.000001 # Query 1 # drop database if exists mysqltest3
master-bin.000001 # Query 1 # drop database if exists mysqltest3
...
...
mysql-test/r/rpl_row_create_table.result
View file @
e1a360ad
...
@@ -8,27 +8,27 @@ CREATE TABLE t1 (a INT, b INT);
...
@@ -8,27 +8,27 @@ CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
SHOW BINLOG EVENTS FROM 21
2
;
SHOW BINLOG EVENTS FROM 21
5
;
Log_name #
Log_name #
Pos 21
2
Pos 21
5
Event_type Query
Event_type Query
Server_id #
Server_id #
End_log_pos #
End_log_pos #
Info use `test`; CREATE TABLE t1 (a INT, b INT)
Info use `test`; CREATE TABLE t1 (a INT, b INT)
Log_name #
Log_name #
Pos 30
5
Pos 30
8
Event_type Query
Event_type Query
Server_id #
Server_id #
End_log_pos #
End_log_pos #
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
Log_name #
Log_name #
Pos 41
1
Pos 41
4
Event_type Query
Event_type Query
Server_id #
Server_id #
End_log_pos #
End_log_pos #
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
Log_name #
Log_name #
Pos 5
17
Pos 5
20
Event_type Query
Event_type Query
Server_id #
Server_id #
End_log_pos #
End_log_pos #
...
@@ -127,7 +127,7 @@ NULL 5 10
...
@@ -127,7 +127,7 @@ NULL 5 10
NULL 6 12
NULL 6 12
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
ERROR 23000: Duplicate entry '2' for key 'b'
SHOW BINLOG EVENTS FROM
1118
;
SHOW BINLOG EVENTS FROM
959
;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
INSERT INTO t7 SELECT a,b FROM tt3;
...
@@ -137,11 +137,11 @@ a b
...
@@ -137,11 +137,11 @@ a b
1 2
1 2
2 4
2 4
3 6
3 6
SHOW BINLOG EVENTS FROM 1
118
;
SHOW BINLOG EVENTS FROM 1
097
;
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 1
118 Query 1 1218
use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1
097 Query 1 1197
use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1
218 Table_map 1 1258
table_id: # (test.t7)
master-bin.000001 1
197 Table_map 1 1237
table_id: # (test.t7)
master-bin.000001 12
58 Write_rows 1 1314
table_id: # flags: STMT_END_F
master-bin.000001 12
37 Write_rows 1 1293
table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
SELECT * FROM t7 ORDER BY a,b;
a b
a b
1 2
1 2
...
@@ -154,10 +154,10 @@ INSERT INTO t7 SELECT a,b FROM tt4;
...
@@ -154,10 +154,10 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
ROLLBACK;
Warnings:
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SHOW BINLOG EVENTS FROM 1
314
;
SHOW BINLOG EVENTS FROM 1
293
;
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 1
314 Table_map 1 1354
table_id: # (test.t7)
master-bin.000001 1
293 Table_map 1 1333
table_id: # (test.t7)
master-bin.000001 13
54 Write_rows 1 1410
table_id: # flags: STMT_END_F
master-bin.000001 13
33 Write_rows 1 1389
table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
SELECT * FROM t7 ORDER BY a,b;
a b
a b
1 2
1 2
...
@@ -192,10 +192,10 @@ Create Table CREATE TABLE `t9` (
...
@@ -192,10 +192,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW BINLOG EVENTS FROM 1
410
;
SHOW BINLOG EVENTS FROM 1
389
;
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 1
410 Query 1 1496
use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 1
389 Query 1 1475
use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 14
96 Query 1 1635
use `test`; CREATE TABLE `t9` (
master-bin.000001 14
75 Query 1 1614
use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
`b` int(11) DEFAULT NULL
)
)
...
...
mysql-test/r/rpl_row_delayed_ins.result
View file @
e1a360ad
...
@@ -5,9 +5,7 @@ reset slave;
...
@@ -5,9 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
create table t1(a int not null primary key) engine=myisam;
create table t1(a int not null primary key) engine=myisam;
insert delayed into t1 values (1);
insert delayed into t1 values (1),(2),(3);
insert delayed into t1 values (2);
insert delayed into t1 values (3);
flush tables;
flush tables;
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t1 ORDER BY a;
a
a
...
@@ -16,15 +14,13 @@ a
...
@@ -16,15 +14,13 @@ a
3
3
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 102 Server ver: VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 222 use `test`; create table t1(a int not null primary key) engine=myisam
master-bin.000001 105 Query 1 225 use `test`; create table t1(a int not null primary key) engine=myisam
master-bin.000001 222 Table_map 1 261 table_id: # (test.t1)
master-bin.000001 225 Table_map 1 264 table_id: # (test.t1)
master-bin.000001 261 Write_rows 1 295 table_id: # flags: STMT_END_F
master-bin.000001 264 Write_rows 1 298 table_id: # flags: STMT_END_F
master-bin.000001 295 Table_map 1 334 table_id: # (test.t1)
master-bin.000001 298 Table_map 1 337 table_id: # (test.t1)
master-bin.000001 334 Write_rows 1 368 table_id: # flags: STMT_END_F
master-bin.000001 337 Write_rows 1 376 table_id: # flags: STMT_END_F
master-bin.000001 368 Table_map 1 407 table_id: # (test.t1)
master-bin.000001 376 Query 1 451 use `test`; flush tables
master-bin.000001 407 Write_rows 1 441 table_id: # flags: STMT_END_F
master-bin.000001 441 Query 1 516 use `test`; flush tables
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t1 ORDER BY a;
a
a
1
1
...
...
mysql-test/r/rpl_row_drop.result
View file @
e1a360ad
...
@@ -43,10 +43,10 @@ t2
...
@@ -43,10 +43,10 @@ t2
DROP TABLE t1,t2;
DROP TABLE t1,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 10
2
Server ver: VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 188
use `test`; CREATE TABLE t1 (a int)
master-bin.000001 10
5 Query 1 191
use `test`; CREATE TABLE t1 (a int)
master-bin.000001 1
88 Query 1 274
use `test`; CREATE TABLE t2 (a int)
master-bin.000001 1
91 Query 1 277
use `test`; CREATE TABLE t2 (a int)
master-bin.000001 27
4 Query 1 378
use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 27
7 Query 1 381
use `test`; DROP TABLE `t1` /* generated by server */
SHOW TABLES;
SHOW TABLES;
Tables_in_test
Tables_in_test
t2
t2
...
...
mysql-test/r/rpl_row_flsh_tbls.result
View file @
e1a360ad
...
@@ -12,13 +12,13 @@ create table t4 (a int);
...
@@ -12,13 +12,13 @@ create table t4 (a int);
insert into t4 select * from t3;
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
flush no_write_to_binlog tables;
SHOW BINLOG EVENTS FROM 61
5
;
SHOW BINLOG EVENTS FROM 61
8
;
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 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
select * from t3;
select * from t3;
a
a
flush tables;
flush tables;
SHOW BINLOG EVENTS FROM 61
5
;
SHOW BINLOG EVENTS FROM 61
8
;
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 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 # Query 1 # use `test`; flush tables
master-bin.000001 # Query 1 # use `test`; flush tables
...
...
mysql-test/r/rpl_row_inexist_tbl.result
View file @
e1a360ad
...
@@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
...
@@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 1146
Last_Errno 1146
Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5
19
Exec_Master_Log_Pos 5
22
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
...
mysql-test/r/rpl_row_log.result
View file @
e1a360ad
...
@@ -26,14 +26,14 @@ master-bin.000001 # Query 1 # use `test`; drop table t1
...
@@ -26,14 +26,14 @@ master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
show binlog events from 10
2
limit 1;
show binlog events from 10
5
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 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
show binlog events from 10
2
limit 2;
show binlog events from 10
5
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 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
show binlog events from 10
2
limit 2,1;
show binlog events from 10
5
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 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
flush logs;
flush logs;
...
@@ -67,13 +67,13 @@ master-bin.000002 # Table_map 1 # table_id: # (test.t2)
...
@@ -67,13 +67,13 @@ master-bin.000002 # Table_map 1 # table_id: # (test.t2)
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000001 125
6
master-bin.000001 125
9
master-bin.000002 37
3
master-bin.000002 37
6
start slave;
start slave;
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
slave-bin.000001 135
4
slave-bin.000001 135
7
slave-bin.000002 27
4
slave-bin.000002 27
7
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 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
...
@@ -94,7 +94,7 @@ slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
...
@@ -94,7 +94,7 @@ slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
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 37
3 # # master-bin.000002 Yes Yes # 0 0 373
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 37
6 # # master-bin.000002 Yes Yes # 0 0 376
# 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
DROP TABLE t1;
DROP TABLE t1;
...
...
mysql-test/r/rpl_row_log_innodb.result
View file @
e1a360ad
...
@@ -28,14 +28,14 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not nul
...
@@ -28,14 +28,14 @@ master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not nul
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # COMMIT /* XID */
master-bin.000001 # Xid 1 # COMMIT /* XID */
show binlog events from 10
2
limit 1;
show binlog events from 10
5
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 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
show binlog events from 10
2
limit 2;
show binlog events from 10
5
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 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
show binlog events from 10
2
limit 2,1;
show binlog events from 10
5
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 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
flush logs;
flush logs;
...
@@ -72,13 +72,13 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
...
@@ -72,13 +72,13 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Xid 1 # COMMIT /* XID */
master-bin.000002 # Xid 1 # COMMIT /* XID */
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
master-bin.000001 131
0
master-bin.000001 131
3
master-bin.000002 40
0
master-bin.000002 40
3
start slave;
start slave;
show binary logs;
show binary logs;
Log_name File_size
Log_name File_size
slave-bin.000001 14
08
slave-bin.000001 14
11
slave-bin.000002 30
1
slave-bin.000002 30
4
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 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
...
@@ -102,7 +102,7 @@ slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
...
@@ -102,7 +102,7 @@ slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Xid 1 # COMMIT /* XID */
slave-bin.000002 # Xid 1 # COMMIT /* XID */
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 40
0 # # master-bin.000002 Yes Yes # 0 0 400
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 40
3 # # master-bin.000002 Yes Yes # 0 0 403
# 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
DROP TABLE t1;
DROP TABLE t1;
...
...
mysql-test/r/rpl_row_max_relay_size.result
View file @
e1a360ad
...
@@ -30,7 +30,7 @@ Master_User root
...
@@ -30,7 +30,7 @@ Master_User root
Master_Port MASTER_PORT
Master_Port MASTER_PORT
Connect_Retry 1
Connect_Retry 1
Master_Log_File master-bin.000001
Master_Log_File master-bin.000001
Read_Master_Log_Pos 5866
4
Read_Master_Log_Pos 5866
7
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Relay_Master_Log_File master-bin.000001
...
@@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table
...
@@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5866
4
Exec_Master_Log_Pos 5866
7
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
@@ -73,7 +73,7 @@ Master_User root
...
@@ -73,7 +73,7 @@ Master_User root
Master_Port MASTER_PORT
Master_Port MASTER_PORT
Connect_Retry 1
Connect_Retry 1
Master_Log_File master-bin.000001
Master_Log_File master-bin.000001
Read_Master_Log_Pos 5866
4
Read_Master_Log_Pos 5866
7
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Relay_Master_Log_File master-bin.000001
...
@@ -88,7 +88,7 @@ Replicate_Wild_Ignore_Table
...
@@ -88,7 +88,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5866
4
Exec_Master_Log_Pos 5866
7
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
@@ -116,7 +116,7 @@ Master_User root
...
@@ -116,7 +116,7 @@ Master_User root
Master_Port MASTER_PORT
Master_Port MASTER_PORT
Connect_Retry 1
Connect_Retry 1
Master_Log_File master-bin.000001
Master_Log_File master-bin.000001
Read_Master_Log_Pos 5866
4
Read_Master_Log_Pos 5866
7
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Relay_Master_Log_File master-bin.000001
...
@@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table
...
@@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5866
4
Exec_Master_Log_Pos 5866
7
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
@@ -197,7 +197,7 @@ Master_User root
...
@@ -197,7 +197,7 @@ Master_User root
Master_Port MASTER_PORT
Master_Port MASTER_PORT
Connect_Retry 1
Connect_Retry 1
Master_Log_File master-bin.000001
Master_Log_File master-bin.000001
Read_Master_Log_Pos 5875
0
Read_Master_Log_Pos 5875
3
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Relay_Master_Log_File master-bin.000001
...
@@ -212,7 +212,7 @@ Replicate_Wild_Ignore_Table
...
@@ -212,7 +212,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5875
0
Exec_Master_Log_Pos 5875
3
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
@@ -236,7 +236,7 @@ Master_User root
...
@@ -236,7 +236,7 @@ Master_User root
Master_Port MASTER_PORT
Master_Port MASTER_PORT
Connect_Retry 1
Connect_Retry 1
Master_Log_File master-bin.000001
Master_Log_File master-bin.000001
Read_Master_Log_Pos 5882
6
Read_Master_Log_Pos 5882
9
Relay_Log_File #
Relay_Log_File #
Relay_Log_Pos #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Relay_Master_Log_File master-bin.000001
...
@@ -251,7 +251,7 @@ Replicate_Wild_Ignore_Table
...
@@ -251,7 +251,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Errno 0
Last_Error
Last_Error
Skip_Counter 0
Skip_Counter 0
Exec_Master_Log_Pos 5882
6
Exec_Master_Log_Pos 5882
9
Relay_Log_Space #
Relay_Log_Space #
Until_Condition None
Until_Condition None
Until_Log_File
Until_Log_File
...
@@ -266,7 +266,7 @@ Seconds_Behind_Master #
...
@@ -266,7 +266,7 @@ Seconds_Behind_Master #
flush logs;
flush logs;
show master status;
show master status;
File master-bin.000002
File master-bin.000002
Position 10
2
Position 10
5
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
Binlog_Ignore_DB
set global max_binlog_size= @my_max_binlog_size;
set global max_binlog_size= @my_max_binlog_size;
...
...
mysql-test/r/rpl_row_reset_slave.result
View file @
e1a360ad
...
@@ -6,12 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
...
@@ -6,12 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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 10
2 # # master-bin.000001 Yes Yes # 0 0 102
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 10
5 # # master-bin.000001 Yes Yes # 0 0 105
# None 0 No #
stop slave;
stop slave;
change master to master_user='test';
change master to master_user='test';
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 test MASTER_PORT 1 master-bin.000001 10
2 # # master-bin.000001 No No # 0 0 102
# None 0 No #
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 10
5 # # master-bin.000001 No No # 0 0 105
# None 0 No #
reset slave;
reset 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
...
@@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
...
@@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
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 10
2 # # master-bin.000001 Yes Yes # 0 0 102
# None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 10
5 # # master-bin.000001 Yes Yes # 0 0 105
# None 0 No #
stop slave;
stop slave;
reset slave;
reset slave;
start slave;
start slave;
...
...
mysql-test/r/rpl_row_until.result
View file @
e1a360ad
...
@@ -21,7 +21,7 @@ n
...
@@ -21,7 +21,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 74
0 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311
# Master master-bin.000001 311 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 74
3 slave-relay-bin.000004 # master-bin.000001 # No 0 0 314
# Master master-bin.000001 311 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
...
@@ -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 74
0 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311
# Master master-no-such-bin.000001 291 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 74
3 slave-relay-bin.000004 # master-bin.000001 # No 0 0 314
# Master master-no-such-bin.000001 291 No #
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
select * from t2;
select * from t2;
n
n
...
@@ -39,13 +39,13 @@ n
...
@@ -39,13 +39,13 @@ n
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 74
0 slave-relay-bin.000004 # master-bin.000001 # No 0 0 586
# Relay slave-relay-bin.000004 728 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 74
3 slave-relay-bin.000004 # master-bin.000001 # No 0 0 589
# Relay slave-relay-bin.000004 728 No #
start slave;
start slave;
stop slave;
stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740;
start slave until master_log_file='master-bin.000001', master_log_pos=740;
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 74
0 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 740
# Master master-bin.000001 740 No #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 74
3 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 743
# Master master-bin.000001 740 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;
...
...
mysql-test/r/rpl_server_id1.result
View file @
e1a360ad
...
@@ -10,7 +10,7 @@ stop slave;
...
@@ -10,7 +10,7 @@ stop slave;
change master to master_port=SLAVE_PORT;
change master to master_port=SLAVE_PORT;
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 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 10
2
None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 10
5
None 0 No NULL
start slave;
start slave;
insert into t1 values (1);
insert into t1 values (1);
show status like "slave_running";
show status like "slave_running";
...
...
mysql-test/r/rpl_server_id2.result
View file @
e1a360ad
...
@@ -10,7 +10,7 @@ stop slave;
...
@@ -10,7 +10,7 @@ stop slave;
change master to master_port=SLAVE_PORT;
change master to master_port=SLAVE_PORT;
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 1 4 slave-relay-bin.000001 4 No No # 0 0 0 10
2
None 0 No NULL
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 10
5
None 0 No NULL
start slave;
start slave;
insert into t1 values (1);
insert into t1 values (1);
select * from t1;
select * from t1;
...
...
mysql-test/r/rpl_switch_stm_row_mixed.result
View file @
e1a360ad
...
@@ -404,7 +404,7 @@ CREATE TABLE t12 (data LONG);
...
@@ -404,7 +404,7 @@ CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
UNLOCK TABLES;
show binlog events from 10
2
;
show binlog events from 10
5
;
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 # Query 1 # drop database if exists mysqltest1
master-bin.000001 # Query 1 # drop database if exists mysqltest1
master-bin.000001 # Query 1 # create database mysqltest1
master-bin.000001 # Query 1 # create database mysqltest1
...
@@ -714,7 +714,7 @@ master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
...
@@ -714,7 +714,7 @@ master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
show binlog events from 10
2
;
show binlog events from 10
5
;
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 # Query 1 # drop database if exists mysqltest1
master-bin.000001 # Query 1 # drop database if exists mysqltest1
master-bin.000001 # Query 1 # create database mysqltest1
master-bin.000001 # Query 1 # create database mysqltest1
...
...
mysql-test/r/rpl_truncate_2myisam.result
View file @
e1a360ad
...
@@ -31,11 +31,11 @@ a b
...
@@ -31,11 +31,11 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Query 1 307
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3 Query 1 310
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Query 1 387
use `test`; TRUNCATE TABLE t1
master-bin.000001 3
10 Query 1 390
use `test`; TRUNCATE TABLE t1
master-bin.000001 3
87 Query 1 463
use `test`; DROP TABLE t1
master-bin.000001 3
90 Query 1 466
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
...
@@ -63,11 +63,11 @@ a b
...
@@ -63,11 +63,11 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Query 1 307
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3 Query 1 310
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Query 1 387
use `test`; TRUNCATE TABLE t1
master-bin.000001 3
10 Query 1 390
use `test`; TRUNCATE TABLE t1
master-bin.000001 3
87 Query 1 463
use `test`; DROP TABLE t1
master-bin.000001 3
90 Query 1 466
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
...
@@ -95,12 +95,12 @@ a b
...
@@ -95,12 +95,12 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Table_map 1 250
table_id: # (test.t1)
master-bin.000001 21
3 Table_map 1 253
table_id: # (test.t1)
master-bin.000001 25
0 Write_rows 1 297
table_id: # flags: STMT_END_F
master-bin.000001 25
3 Write_rows 1 300
table_id: # flags: STMT_END_F
master-bin.000001
297 Query 1 377
use `test`; TRUNCATE TABLE t1
master-bin.000001
300 Query 1 380
use `test`; TRUNCATE TABLE t1
master-bin.000001 3
77 Query 1 453
use `test`; DROP TABLE t1
master-bin.000001 3
80 Query 1 456
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
...
@@ -128,11 +128,11 @@ a b
...
@@ -128,11 +128,11 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Query 1 307
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3 Query 1 310
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Query 1 384
use `test`; DELETE FROM t1
master-bin.000001 3
10 Query 1 387
use `test`; DELETE FROM t1
master-bin.000001 38
4 Query 1 460
use `test`; DROP TABLE t1
master-bin.000001 38
7 Query 1 463
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
...
@@ -160,11 +160,11 @@ a b
...
@@ -160,11 +160,11 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Query 1 307
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3 Query 1 310
use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Query 1 384
use `test`; DELETE FROM t1
master-bin.000001 3
10 Query 1 387
use `test`; DELETE FROM t1
master-bin.000001 38
4 Query 1 460
use `test`; DROP TABLE t1
master-bin.000001 38
7 Query 1 463
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
...
@@ -193,10 +193,10 @@ a b
...
@@ -193,10 +193,10 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
master-bin.000001 21
0 Table_map 1 250
table_id: # (test.t1)
master-bin.000001 21
3 Table_map 1 253
table_id: # (test.t1)
master-bin.000001 25
0 Write_rows 1 297
table_id: # flags: STMT_END_F
master-bin.000001 25
3 Write_rows 1 300
table_id: # flags: STMT_END_F
master-bin.000001
297 Table_map 1 337
table_id: # (test.t1)
master-bin.000001
300 Table_map 1 340
table_id: # (test.t1)
master-bin.000001 3
37 Delete_rows 1 384
table_id: # flags: STMT_END_F
master-bin.000001 3
40 Delete_rows 1 387
table_id: # flags: STMT_END_F
master-bin.000001 38
4 Query 1 460
use `test`; DROP TABLE t1
master-bin.000001 38
7 Query 1 463
use `test`; DROP TABLE t1
mysql-test/r/rpl_truncate_3innodb.result
View file @
e1a360ad
...
@@ -31,13 +31,13 @@ a b
...
@@ -31,13 +31,13 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Xid 1 334
COMMIT /* xid= */
master-bin.000001 3
10 Xid 1 337
COMMIT /* xid= */
master-bin.000001 33
4
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 33
7
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 41
4 Xid 1 441
COMMIT /* xid= */
master-bin.000001 41
7 Xid 1 444
COMMIT /* xid= */
master-bin.000001 44
1 Query 1 517
use `test`; DROP TABLE t1
master-bin.000001 44
4 Query 1 520
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
...
@@ -65,13 +65,13 @@ a b
...
@@ -65,13 +65,13 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Xid 1 334
COMMIT /* xid= */
master-bin.000001 3
10 Xid 1 337
COMMIT /* xid= */
master-bin.000001 33
4
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 33
7
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 41
4 Xid 1 441
COMMIT /* xid= */
master-bin.000001 41
7 Xid 1 444
COMMIT /* xid= */
master-bin.000001 44
1 Query 1 517
use `test`; DROP TABLE t1
master-bin.000001 44
4 Query 1 520
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
...
@@ -99,14 +99,14 @@ a b
...
@@ -99,14 +99,14 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 21
3
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 25
0
Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 25
3
Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001
297 Xid 1 324
COMMIT /* xid= */
master-bin.000001
300 Xid 1 327
COMMIT /* xid= */
master-bin.000001 32
4
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 32
7
Query 1 80 use `test`; TRUNCATE TABLE t1
master-bin.000001 40
4 Xid 1 431
COMMIT /* xid= */
master-bin.000001 40
7 Xid 1 434
COMMIT /* xid= */
master-bin.000001 43
1 Query 1 507
use `test`; DROP TABLE t1
master-bin.000001 43
4 Query 1 510
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=STATEMENT;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
SET GLOBAL BINLOG_FORMAT=STATEMENT;
...
@@ -134,13 +134,13 @@ a b
...
@@ -134,13 +134,13 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Xid 1 334
COMMIT /* xid= */
master-bin.000001 3
10 Xid 1 337
COMMIT /* xid= */
master-bin.000001 33
4
Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 33
7
Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 41
1 Xid 1 438
COMMIT /* xid= */
master-bin.000001 41
4 Xid 1 441
COMMIT /* xid= */
master-bin.000001 4
38 Query 1 514
use `test`; DROP TABLE t1
master-bin.000001 4
41 Query 1 517
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=MIXED;
SET SESSION BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
SET GLOBAL BINLOG_FORMAT=MIXED;
...
@@ -168,13 +168,13 @@ a b
...
@@ -168,13 +168,13 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 21
3
Query 1 97 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 3
07 Xid 1 334
COMMIT /* xid= */
master-bin.000001 3
10 Xid 1 337
COMMIT /* xid= */
master-bin.000001 33
4
Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 33
7
Query 1 77 use `test`; DELETE FROM t1
master-bin.000001 41
1 Xid 1 438
COMMIT /* xid= */
master-bin.000001 41
4 Xid 1 441
COMMIT /* xid= */
master-bin.000001 4
38 Query 1 514
use `test`; DROP TABLE t1
master-bin.000001 4
41 Query 1 517
use `test`; DROP TABLE t1
**** On Master ****
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
...
@@ -203,12 +203,12 @@ a b
...
@@ -203,12 +203,12 @@ a b
DROP TABLE t1;
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 10
2
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 10
5
Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 10
2 Query 1 210
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 10
5 Query 1 213
use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
master-bin.000001 21
0
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 21
3
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 25
0
Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 25
3
Write_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001
297 Xid 1 324
COMMIT /* xid= */
master-bin.000001
300 Xid 1 327
COMMIT /* xid= */
master-bin.000001 32
4
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 32
7
Table_map 1 40 table_id: # (test.t1)
master-bin.000001 36
4
Delete_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 36
7
Delete_rows 1 87 table_id: # flags: STMT_END_F
master-bin.000001 41
1 Xid 1 438
COMMIT /* xid= */
master-bin.000001 41
4 Xid 1 441
COMMIT /* xid= */
master-bin.000001 4
38 Query 1 514
use `test`; DROP TABLE t1
master-bin.000001 4
41 Query 1 517
use `test`; DROP TABLE t1
mysql-test/t/rpl_loaddata_s.test
View file @
e1a360ad
...
@@ -22,7 +22,7 @@ sync_with_master;
...
@@ -22,7 +22,7 @@ sync_with_master;
select
count
(
*
)
from
test
.
t1
;
# check that LOAD was replicated
select
count
(
*
)
from
test
.
t1
;
# check that LOAD was replicated
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
show
binlog
events
from
10
2
;
# should be nothing
show
binlog
events
from
10
5
;
# should be nothing
# Cleanup
# Cleanup
connection
master
;
connection
master
;
...
...
mysql-test/t/rpl_log_pos.test
View file @
e1a360ad
...
@@ -49,7 +49,7 @@ insert into t1 values (1),(2),(3);
...
@@ -49,7 +49,7 @@ insert into t1 values (1),(2),(3);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
stop
slave
;
stop
slave
;
change
master
to
master_log_pos
=
10
2
;
change
master
to
master_log_pos
=
10
5
;
start
slave
;
start
slave
;
sync_with_master
;
sync_with_master
;
select
*
from
t1
ORDER
BY
n
;
select
*
from
t1
ORDER
BY
n
;
...
...
mysql-test/t/rpl_row_basic_11bugs-master.opt
View file @
e1a360ad
--binlog_ignore_db=test_ignore
--binlog_ignore_db=test_ignore --innodb
mysql-test/t/rpl_row_basic_11bugs-slave.opt
0 → 100644
View file @
e1a360ad
--innodb
mysql-test/t/rpl_row_basic_11bugs.test
View file @
e1a360ad
...
@@ -25,7 +25,7 @@ CREATE TABLE t2 (a INT, b INT);
...
@@ -25,7 +25,7 @@ CREATE TABLE t2 (a INT, b INT);
SHOW
TABLES
;
SHOW
TABLES
;
INSERT
INTO
t2
VALUES
(
3
,
3
),
(
4
,
4
);
INSERT
INTO
t2
VALUES
(
3
,
3
),
(
4
,
4
);
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
SHOW
BINLOG
EVENTS
FROM
10
2
;
SHOW
BINLOG
EVENTS
FROM
10
5
;
sync_slave_with_master
;
sync_slave_with_master
;
--
echo
****
On
Slave
****
--
echo
****
On
Slave
****
SHOW
DATABASES
;
SHOW
DATABASES
;
...
@@ -113,3 +113,71 @@ UPDATE t1 SET a=0 WHERE b=2;
...
@@ -113,3 +113,71 @@ UPDATE t1 SET a=0 WHERE b=2;
SELECT
HEX
(
a
),
b
FROM
t1
;
SELECT
HEX
(
a
),
b
FROM
t1
;
sync_slave_with_master
;
sync_slave_with_master
;
SELECT
HEX
(
a
),
b
FROM
t1
;
SELECT
HEX
(
a
),
b
FROM
t1
;
connection
master
;
DROP
TABLE
IF
EXISTS
t1
;
sync_slave_with_master
;
# BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT
# field does not work
--
echo
================
Test
for
BUG
#22583 ================
--
disable_query_log
--
source
include
/
master
-
slave
-
reset
.
inc
--
enable_query_log
--
echo
****
On
Master
****
connection
master
;
CREATE
TABLE
t1_myisam
(
k
INT
,
a
BIT
(
1
),
b
BIT
(
9
))
ENGINE
=
MYISAM
;
CREATE
TABLE
t1_innodb
(
k
INT
,
a
BIT
(
1
),
b
BIT
(
9
))
ENGINE
=
INNODB
;
CREATE
TABLE
t2_myisam
(
k
INT
,
a
BIT
(
1
)
NOT
NULL
,
b
BIT
(
4
)
NOT
NULL
)
ENGINE
=
MYISAM
;
CREATE
TABLE
t2_innodb
(
k
INT
,
a
BIT
(
1
)
NOT
NULL
,
b
BIT
(
4
)
NOT
NULL
)
ENGINE
=
INNODB
;
--
echo
****
On
Slave
****
sync_slave_with_master
;
ALTER
TABLE
t1_myisam
ENGINE
=
INNODB
;
ALTER
TABLE
t1_innodb
ENGINE
=
MYISAM
;
ALTER
TABLE
t2_myisam
ENGINE
=
INNODB
;
ALTER
TABLE
t2_innodb
ENGINE
=
MYISAM
;
--
echo
****
On
Master
****
connection
master
;
INSERT
INTO
t1_myisam
VALUES
(
1
,
b
'0'
,
257
);
INSERT
INTO
t1_myisam
VALUES
(
2
,
b
'1'
,
256
);
INSERT
INTO
t1_innodb
VALUES
(
1
,
b
'0'
,
257
);
INSERT
INTO
t1_innodb
VALUES
(
2
,
b
'1'
,
256
);
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_innodb
;
INSERT
INTO
t2_myisam
VALUES
(
1
,
b
'0'
,
9
);
INSERT
INTO
t2_myisam
VALUES
(
2
,
b
'1'
,
8
);
INSERT
INTO
t2_innodb
VALUES
(
1
,
b
'0'
,
9
);
INSERT
INTO
t2_innodb
VALUES
(
2
,
b
'1'
,
8
);
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_innodb
;
--
echo
****
On
Slave
****
sync_slave_with_master
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_innodb
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_innodb
;
--
echo
****
On
Master
****
connection
master
;
UPDATE
t1_myisam
SET
a
=
0
WHERE
k
=
2
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_myisam
;
UPDATE
t1_innodb
SET
a
=
0
WHERE
k
=
2
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_innodb
;
UPDATE
t2_myisam
SET
a
=
0
WHERE
k
=
2
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_myisam
;
UPDATE
t2_innodb
SET
a
=
0
WHERE
k
=
2
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_innodb
;
--
echo
****
On
Slave
****
sync_slave_with_master
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t1_innodb
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_myisam
;
SELECT
k
,
HEX
(
a
),
HEX
(
b
)
FROM
t2_innodb
;
--
echo
****
On
Master
****
connection
master
;
DROP
TABLE
IF
EXISTS
t1_myisam
,
t1_innodb
,
t2_myisam
,
t2_innodb
;
sync_slave_with_master
;
mysql-test/t/rpl_row_create_table.test
View file @
e1a360ad
...
@@ -36,7 +36,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
...
@@ -36,7 +36,7 @@ CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE
TABLE
t4
(
a
INT
,
b
INT
)
ENGINE
=
Merge
CHARSET
=
utf8
;
CREATE
TABLE
t4
(
a
INT
,
b
INT
)
ENGINE
=
Merge
CHARSET
=
utf8
;
--
replace_column
1
# 4 # 5 #
--
replace_column
1
# 4 # 5 #
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
query_vertical
SHOW
BINLOG
EVENTS
FROM
21
2
--
query_vertical
SHOW
BINLOG
EVENTS
FROM
21
5
--
echo
****
On
Master
****
--
echo
****
On
Master
****
--
query_vertical
SHOW
CREATE
TABLE
t1
--
query_vertical
SHOW
CREATE
TABLE
t1
--
query_vertical
SHOW
CREATE
TABLE
t2
--
query_vertical
SHOW
CREATE
TABLE
t2
...
@@ -71,7 +71,7 @@ connection master;
...
@@ -71,7 +71,7 @@ connection master;
CREATE
TABLE
t7
(
UNIQUE
(
b
))
SELECT
a
,
b
FROM
tt3
;
CREATE
TABLE
t7
(
UNIQUE
(
b
))
SELECT
a
,
b
FROM
tt3
;
# Shouldn't be written to the binary log
# Shouldn't be written to the binary log
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW
BINLOG
EVENTS
FROM
1118
;
SHOW
BINLOG
EVENTS
FROM
959
;
# Test that INSERT-SELECT works the same way as for SBR.
# Test that INSERT-SELECT works the same way as for SBR.
CREATE
TABLE
t7
(
a
INT
,
b
INT
UNIQUE
);
CREATE
TABLE
t7
(
a
INT
,
b
INT
UNIQUE
);
...
@@ -80,7 +80,7 @@ INSERT INTO t7 SELECT a,b FROM tt3;
...
@@ -80,7 +80,7 @@ INSERT INTO t7 SELECT a,b FROM tt3;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
# Should be written to the binary log
# Should be written to the binary log
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW
BINLOG
EVENTS
FROM
1
118
;
SHOW
BINLOG
EVENTS
FROM
1
097
;
sync_slave_with_master
;
sync_slave_with_master
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
...
@@ -91,7 +91,7 @@ BEGIN;
...
@@ -91,7 +91,7 @@ BEGIN;
INSERT
INTO
t7
SELECT
a
,
b
FROM
tt4
;
INSERT
INTO
t7
SELECT
a
,
b
FROM
tt4
;
ROLLBACK
;
ROLLBACK
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW
BINLOG
EVENTS
FROM
1
314
;
SHOW
BINLOG
EVENTS
FROM
1
293
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
sync_slave_with_master
;
sync_slave_with_master
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
SELECT
*
FROM
t7
ORDER
BY
a
,
b
;
...
@@ -106,7 +106,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
...
@@ -106,7 +106,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
--
query_vertical
SHOW
CREATE
TABLE
t8
--
query_vertical
SHOW
CREATE
TABLE
t8
--
query_vertical
SHOW
CREATE
TABLE
t9
--
query_vertical
SHOW
CREATE
TABLE
t9
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW
BINLOG
EVENTS
FROM
1
410
;
SHOW
BINLOG
EVENTS
FROM
1
389
;
sync_slave_with_master
;
sync_slave_with_master
;
--
echo
****
On
Slave
****
--
echo
****
On
Slave
****
--
query_vertical
SHOW
CREATE
TABLE
t8
--
query_vertical
SHOW
CREATE
TABLE
t8
...
...
mysql-test/t/rpl_row_flsh_tbls.test
View file @
e1a360ad
# depends on the binlog output
# depends on the binlog output
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_binlog_format_row
.
inc
let
$rename_event_pos
=
61
5
;
let
$rename_event_pos
=
61
8
;
# Bug#18326: Do not lock table for writing during prepare of statement
# Bug#18326: Do not lock table for writing during prepare of statement
# The use of the ps protocol causes extra table maps in the binlog, so
# The use of the ps protocol causes extra table maps in the binlog, so
...
...
mysql-test/t/rpl_row_mysqlbinlog.test
View file @
e1a360ad
...
@@ -167,7 +167,7 @@ connection master;
...
@@ -167,7 +167,7 @@ connection master;
select
"--- Test 2 position test --"
as
""
;
select
"--- Test 2 position test --"
as
""
;
--
enable_query_log
--
enable_query_log
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
position
=
41
2
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
position
=
41
5
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
# 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.
...
@@ -263,7 +263,7 @@ select "--- Test 6 reading stdin --" as "";
...
@@ -263,7 +263,7 @@ select "--- Test 6 reading stdin --" as "";
select
"--- Test 7 reading stdin w/position --"
as
""
;
select
"--- Test 7 reading stdin w/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
--
position
=
41
2
-
<
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
position
=
41
5
-
<
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
# Bug#16217 (mysql client did not know how not switch its internal charset)
# Bug#16217 (mysql client did not know how not switch its internal charset)
--
disable_query_log
--
disable_query_log
...
...
mysql-test/t/rpl_switch_stm_row_mixed.test
View file @
e1a360ad
...
@@ -519,7 +519,7 @@ UNLOCK TABLES;
...
@@ -519,7 +519,7 @@ UNLOCK TABLES;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
show
binlog
events
from
10
2
;
show
binlog
events
from
10
5
;
sync_slave_with_master
;
sync_slave_with_master
;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
...
@@ -536,7 +536,7 @@ sync_slave_with_master;
...
@@ -536,7 +536,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
show
binlog
events
from
10
2
;
show
binlog
events
from
10
5
;
# Now test that mysqlbinlog works fine on a binlog generated by the
# Now test that mysqlbinlog works fine on a binlog generated by the
# mixed mode
# mixed mode
...
...
mysql-test/t/user_var-binlog.test
View file @
e1a360ad
...
@@ -15,7 +15,7 @@ SET @var2=char(ascii('a'));
...
@@ -15,7 +15,7 @@ SET @var2=char(ascii('a'));
insert
into
t1
values
(
@
var1
),(
@
var2
);
insert
into
t1
values
(
@
var1
),(
@
var2
);
--
replace_column
2
# 5 #
--
replace_column
2
# 5 #
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
show
binlog
events
from
10
2
;
show
binlog
events
from
10
5
;
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# absolutely need variables names to be quoted and strings to be
# escaped).
# escaped).
...
...
sql/log_event.cc
View file @
e1a360ad
...
@@ -1014,7 +1014,8 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
...
@@ -1014,7 +1014,8 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
ev
=
new
Execute_load_query_log_event
(
buf
,
event_len
,
description_event
);
ev
=
new
Execute_load_query_log_event
(
buf
,
event_len
,
description_event
);
break
;
break
;
default:
default:
DBUG_PRINT
(
"error"
,(
"Unknown evernt code: %d"
,(
int
)
buf
[
EVENT_TYPE_OFFSET
]));
DBUG_PRINT
(
"error"
,(
"Unknown event code: %d"
,
(
int
)
buf
[
EVENT_TYPE_OFFSET
]));
ev
=
NULL
;
ev
=
NULL
;
break
;
break
;
}
}
...
@@ -5595,68 +5596,77 @@ int Rows_log_event::do_add_row_data(byte *const row_data,
...
@@ -5595,68 +5596,77 @@ int Rows_log_event::do_add_row_data(byte *const row_data,
static
int
static
int
unpack_row
(
RELAY_LOG_INFO
*
rli
,
unpack_row
(
RELAY_LOG_INFO
*
rli
,
TABLE
*
table
,
uint
const
colcnt
,
TABLE
*
table
,
uint
const
colcnt
,
char
const
*
row
,
MY_BITMAP
const
*
cols
,
char
const
*
const
row_data
,
MY_BITMAP
const
*
cols
,
char
const
**
row_end
,
ulong
*
master_reclength
,
char
const
**
const
row_end
,
ulong
*
const
master_reclength
,
MY_BITMAP
*
const
rw_set
,
Log_event_type
const
event_type
)
MY_BITMAP
*
const
rw_set
,
Log_event_type
const
event_type
)
{
{
byte
*
const
record
=
table
->
record
[
0
];
DBUG_ENTER
(
"unpack_row"
);
DBUG_ENTER
(
"unpack_row"
);
DBUG_ASSERT
(
record
&&
row
);
DBUG_ASSERT
(
record
&&
row_data
);
DBUG_PRINT
(
"enter"
,
(
"row: 0x%lx table->record[0]: 0x%lx"
,
(
long
)
row
,
(
long
)
record
));
my_ptrdiff_t
const
offset
=
record
-
(
byte
*
)
table
->
record
[
0
];
my_size_t
master_null_bytes
=
table
->
s
->
null_bytes
;
my_size_t
const
master_null_byte_count
=
(
bitmap_bits_set
(
cols
)
+
7
)
/
8
;
int
error
=
0
;
if
(
colcnt
!=
table
->
s
->
fields
)
{
Field
**
fptr
=
&
table
->
field
[
colcnt
-
1
];
do
master_null_bytes
=
(
*
fptr
)
->
last_null_byte
();
while
(
master_null_bytes
==
Field
::
LAST_NULL_BYTE_UNDEF
&&
fptr
--
>
table
->
field
);
/*
If master_null_bytes is LAST_NULL_BYTE_UNDEF (0) at this time,
there were no nullable fields nor BIT fields at all in the
columns that are common to the master and the slave. In that
case, there is only one null byte holding the X bit.
OBSERVE! There might still be nullable columns following the
char
const
*
null_ptr
=
row_data
;
common columns, so table->s->null_bytes might be greater than 1.
char
const
*
pack_ptr
=
row_data
+
master_null_byte_count
;
*/
if
(
master_null_bytes
==
Field
::
LAST_NULL_BYTE_UNDEF
)
master_null_bytes
=
1
;
}
DBUG_ASSERT
(
master_null_bytes
<=
table
->
s
->
null_bytes
);
bitmap_clear_all
(
rw_set
);
memcpy
(
record
,
row
,
master_null_bytes
);
// [1]
int
error
=
0
;
bitmap_set_all
(
rw_set
);
memcpy
(
record
,
table
->
s
->
default_values
,
table
->
s
->
null_bytes
);
Field
**
const
begin_ptr
=
table
->
field
;
Field
**
const
begin_ptr
=
table
->
field
;
Field
**
field_ptr
;
Field
**
field_ptr
;
char
const
*
ptr
=
row
+
master_null_bytes
;
Field
**
const
end_ptr
=
begin_ptr
+
colcnt
;
Field
**
const
end_ptr
=
begin_ptr
+
colcnt
;
DBUG_ASSERT
(
null_ptr
<
row_data
+
master_null_byte_count
);
// Mask to mask out the correct bit among the null bits
unsigned
int
null_mask
=
1U
;
// The "current" null bits
unsigned
int
null_bits
=
*
null_ptr
++
;
for
(
field_ptr
=
begin_ptr
;
field_ptr
<
end_ptr
;
++
field_ptr
)
for
(
field_ptr
=
begin_ptr
;
field_ptr
<
end_ptr
;
++
field_ptr
)
{
{
Field
*
const
f
=
*
field_ptr
;
Field
*
const
f
=
*
field_ptr
;
if
(
bitmap_is_set
(
cols
,
field_ptr
-
begin_ptr
))
if
(
bitmap_is_set
(
cols
,
field_ptr
-
begin_ptr
))
{
{
DBUG_ASSERT
((
const
char
*
)
table
->
record
[
0
]
<=
f
->
ptr
);
if
((
null_mask
&
0xFF
)
==
0
)
DBUG_ASSERT
(
f
->
ptr
<
((
const
char
*
)
table
->
record
[
0
]
+
table
->
s
->
reclength
+
{
(
f
->
pack_length_in_rec
()
==
0
)));
DBUG_ASSERT
(
null_ptr
<
row_data
+
master_null_byte_count
);
null_mask
=
1U
;
null_bits
=
*
null_ptr
++
;
}
DBUG_ASSERT
(
null_mask
&
0xFF
);
// One of the 8 LSB should be set
DBUG_PRINT
(
"info"
,
(
"unpacking column '%s' to 0x%lx"
,
f
->
field_name
,
(
long
)
f
->
ptr
));
ptr
=
f
->
unpack
(
f
->
ptr
,
ptr
);
/* Field...::unpack() cannot return 0 */
/* Field...::unpack() cannot return 0 */
DBUG_ASSERT
(
ptr
!=
NULL
);
DBUG_ASSERT
(
pack_ptr
!=
NULL
);
}
if
((
null_bits
&
null_mask
)
&&
f
->
maybe_null
())
f
->
set_null
(
offset
);
else
else
bitmap_clear_bit
(
rw_set
,
field_ptr
-
begin_ptr
);
{
f
->
set_notnull
(
offset
);
/*
We only unpack the field if it was non-null
*/
f
->
move_field_offset
(
offset
);
pack_ptr
=
f
->
unpack
(
f
->
ptr
,
pack_ptr
);
f
->
move_field_offset
(
-
offset
);
}
bitmap_set_bit
(
rw_set
,
field_ptr
-
begin_ptr
);
null_mask
<<=
1
;
}
}
}
*
row_end
=
ptr
;
/*
We should now have read all the null bytes, otherwise something is
really wrong.
*/
DBUG_ASSERT
(
null_ptr
==
row_data
+
master_null_byte_count
);
*
row_end
=
pack_ptr
;
if
(
master_reclength
)
if
(
master_reclength
)
{
{
if
(
*
field_ptr
)
if
(
*
field_ptr
)
...
@@ -5681,9 +5691,8 @@ unpack_row(RELAY_LOG_INFO *rli,
...
@@ -5681,9 +5691,8 @@ unpack_row(RELAY_LOG_INFO *rli,
uint32
const
mask
=
NOT_NULL_FLAG
|
NO_DEFAULT_VALUE_FLAG
;
uint32
const
mask
=
NOT_NULL_FLAG
|
NO_DEFAULT_VALUE_FLAG
;
Field
*
const
f
=
*
field_ptr
;
Field
*
const
f
=
*
field_ptr
;
DBUG_PRINT
(
"info"
,
(
"processing column '%s' @ 0x%lx"
,
f
->
field_name
,
if
(
event_type
==
WRITE_ROWS_EVENT
&&
(
long
)
f
->
ptr
));
((
*
field_ptr
)
->
flags
&
mask
)
==
mask
)
if
(
event_type
==
WRITE_ROWS_EVENT
&&
(
f
->
flags
&
mask
)
==
mask
)
{
{
slave_print_msg
(
ERROR_LEVEL
,
rli
,
ER_NO_DEFAULT_FOR_FIELD
,
slave_print_msg
(
ERROR_LEVEL
,
rli
,
ER_NO_DEFAULT_FOR_FIELD
,
"Field `%s` of table `%s`.`%s` "
"Field `%s` of table `%s`.`%s` "
...
@@ -6883,6 +6892,8 @@ static int find_and_fetch_row(TABLE *table, byte *key)
...
@@ -6883,6 +6892,8 @@ static int find_and_fetch_row(TABLE *table, byte *key)
DBUG_ASSERT
(
table
->
in_use
!=
NULL
);
DBUG_ASSERT
(
table
->
in_use
!=
NULL
);
DBUG_DUMP
(
"record[0]"
,
table
->
record
[
0
],
table
->
s
->
reclength
);
if
((
table
->
file
->
ha_table_flags
()
&
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
)
&&
if
((
table
->
file
->
ha_table_flags
()
&
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
)
&&
table
->
s
->
primary_key
<
MAX_KEY
)
table
->
s
->
primary_key
<
MAX_KEY
)
{
{
...
@@ -7017,16 +7028,18 @@ static int find_and_fetch_row(TABLE *table, byte *key)
...
@@ -7017,16 +7028,18 @@ static int find_and_fetch_row(TABLE *table, byte *key)
/* Continue until we find the right record or have made a full loop */
/* Continue until we find the right record or have made a full loop */
do
do
{
{
error
=
table
->
file
->
rnd_next
(
table
->
record
[
1
]);
/*
/*
We need to set the null bytes to ensure that the filler bit
Patching the returned record since some storage engines do
are all set when returning. There are storage engines that
not set the filler bits correctly.
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
*/
my_ptrdiff_t
const
pos
=
my_ptrdiff_t
const
pos
=
table
->
s
->
null_bytes
>
0
?
table
->
s
->
null_bytes
-
1
:
0
;
table
->
s
->
null_bytes
>
0
?
table
->
s
->
null_bytes
-
1
:
0
;
table
->
record
[
1
][
pos
]
=
0xFF
;
table
->
record
[
1
][
pos
]
|=
256U
-
(
1U
<<
table
->
s
->
last_null_bit_pos
);
error
=
table
->
file
->
rnd_next
(
table
->
record
[
1
]);
DBUG_DUMP
(
"record[0]"
,
table
->
record
[
0
],
table
->
s
->
reclength
);
DBUG_DUMP
(
"record[1]"
,
table
->
record
[
1
],
table
->
s
->
reclength
);
switch
(
error
)
switch
(
error
)
{
{
...
...
sql/log_event.h
View file @
e1a360ad
...
@@ -467,10 +467,23 @@ enum Log_event_type
...
@@ -467,10 +467,23 @@ enum Log_event_type
XID_EVENT
=
16
,
XID_EVENT
=
16
,
BEGIN_LOAD_QUERY_EVENT
=
17
,
BEGIN_LOAD_QUERY_EVENT
=
17
,
EXECUTE_LOAD_QUERY_EVENT
=
18
,
EXECUTE_LOAD_QUERY_EVENT
=
18
,
TABLE_MAP_EVENT
=
19
,
TABLE_MAP_EVENT
=
19
,
WRITE_ROWS_EVENT
=
20
,
UPDATE_ROWS_EVENT
=
21
,
/*
DELETE_ROWS_EVENT
=
22
,
These event numbers were used for 5.1.0 to 5.1.15 and are
therefore obsolete.
*/
PRE_GA_WRITE_ROWS_EVENT
=
20
,
PRE_GA_UPDATE_ROWS_EVENT
=
21
,
PRE_GA_DELETE_ROWS_EVENT
=
22
,
/*
These event numbers are used from 5.1.16 and forward
*/
WRITE_ROWS_EVENT
=
23
,
UPDATE_ROWS_EVENT
=
24
,
DELETE_ROWS_EVENT
=
25
,
/*
/*
Add new events here - right above this comment!
Add new events here - right above this comment!
...
...
sql/sql_class.cc
View file @
e1a360ad
...
@@ -2493,30 +2493,113 @@ my_size_t THD::max_row_length_blob(TABLE *table, const byte *data) const
...
@@ -2493,30 +2493,113 @@ my_size_t THD::max_row_length_blob(TABLE *table, const byte *data) const
}
}
my_size_t
THD
::
pack_row
(
TABLE
*
table
,
MY_BITMAP
const
*
cols
,
byte
*
row_data
,
/*
const
byte
*
record
)
const
Pack a record of data for a table into a format suitable for
transfer via the binary log.
SYNOPSIS
THD::pack_row()
table Table describing the format of the record
cols Bitmap with a set bit for each column that should be
stored in the row
row_data Pointer to memory where row will be written
record Pointer to record that should be packed. It is assumed
that the pointer refers to either record[0] or
record[1], but no such check is made since the code does
not rely on that.
DESCRIPTION
The format for a row in transfer with N fields is the following:
ceil(N/8) null bytes:
One null bit for every column *regardless of whether it can be
null or not*. This simplifies the decoding. Observe that the
number of null bits is equal to the number of set bits in the
'cols' bitmap. The number of null bytes is the smallest number
of bytes necessary to store the null bits.
Padding bits are 1.
N packets:
Each field is stored in packed format.
RETURN VALUE
The number of bytes written at 'row_data'.
*/
my_size_t
THD
::
pack_row
(
TABLE
*
table
,
MY_BITMAP
const
*
cols
,
byte
*
const
row_data
,
const
byte
*
record
)
const
{
{
Field
**
p_field
=
table
->
field
,
*
field
;
Field
**
p_field
=
table
->
field
,
*
field
;
int
n_null_bytes
=
table
->
s
->
null_bytes
;
int
const
null_byte_count
=
(
bitmap_bits_set
(
cols
)
+
7
)
/
8
;
byte
*
p
tr
;
byte
*
p
ack_ptr
=
row_data
+
null_byte_count
;
uint
i
;
byte
*
null_ptr
=
row_data
;
my_ptrdiff_t
const
rec_offset
=
record
-
table
->
record
[
0
];
my_ptrdiff_t
const
rec_offset
=
record
-
table
->
record
[
0
];
my_ptrdiff_t
const
def_offset
=
table
->
s
->
default_values
-
table
->
record
[
0
];
my_ptrdiff_t
const
def_offset
=
table
->
s
->
default_values
-
table
->
record
[
0
];
memcpy
(
row_data
,
record
,
n_null_bytes
);
ptr
=
row_data
+
n_null_bytes
;
for
(
i
=
0
;
(
field
=
*
p_field
)
;
i
++
,
p_field
++
)
/*
We write the null bits and the packed records using one pass
through all the fields. The null bytes are written little-endian,
i.e., the first fields are in the first byte.
*/
unsigned
int
null_bits
=
(
1U
<<
8
)
-
1
;
// Mask to mask out the correct but among the null bits
unsigned
int
null_mask
=
1U
;
for
(
;
(
field
=
*
p_field
)
;
p_field
++
)
{
DBUG_PRINT
(
"debug"
,
(
"null_mask=%d; null_ptr=%p; row_data=%p; null_byte_count=%d"
,
null_mask
,
null_ptr
,
row_data
,
null_byte_count
));
if
(
bitmap_is_set
(
cols
,
p_field
-
table
->
field
))
{
my_ptrdiff_t
offset
;
if
(
field
->
is_null
(
rec_offset
))
{
{
if
(
bitmap_is_set
(
cols
,
i
))
offset
=
def_offset
;
null_bits
|=
null_mask
;
}
else
{
{
my_ptrdiff_t
const
offset
=
offset
=
rec_offset
;
field
->
is_null
(
rec_offset
)
?
def_offset
:
rec_offset
;
null_bits
&=
~
null_mask
;
/*
We only store the data of the field if it is non-null
*/
field
->
move_field_offset
(
offset
);
field
->
move_field_offset
(
offset
);
ptr
=
(
byte
*
)
field
->
pack
((
char
*
)
ptr
,
field
->
ptr
);
pack_ptr
=
(
byte
*
)
field
->
pack
((
char
*
)
pack_
ptr
,
field
->
ptr
);
field
->
move_field_offset
(
-
offset
);
field
->
move_field_offset
(
-
offset
);
}
}
null_mask
<<=
1
;
if
((
null_mask
&
0xFF
)
==
0
)
{
DBUG_ASSERT
(
null_ptr
<
row_data
+
null_byte_count
);
null_mask
=
1U
;
*
null_ptr
++
=
null_bits
;
null_bits
=
(
1U
<<
8
)
-
1
;
}
}
}
}
return
(
static_cast
<
my_size_t
>
(
ptr
-
row_data
));
/*
Write the last (partial) byte, if there is one
*/
if
((
null_mask
&
0xFF
)
>
1
)
{
DBUG_ASSERT
(
null_ptr
<
row_data
+
null_byte_count
);
*
null_ptr
++
=
null_bits
;
}
/*
The null pointer should now point to the first byte of the
packed data. If it doesn't, something is very wrong.
*/
DBUG_ASSERT
(
null_ptr
==
row_data
+
null_byte_count
);
return
static_cast
<
my_size_t
>
(
pack_ptr
-
row_data
);
}
}
...
...
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