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
3269db6e
Commit
3269db6e
authored
Jun 01, 2007
by
mats@romeo.kindahl.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#3339 (Issue warnings when statement-based replication may fail):
Adding missing test files. Result change in test rpl_udf.
parent
5368479a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
0 deletions
+215
-0
mysql-test/r/rpl_slave_skip.result
mysql-test/r/rpl_slave_skip.result
+136
-0
mysql-test/r/rpl_udf.result
mysql-test/r/rpl_udf.result
+8
-0
mysql-test/t/rpl_slave_skip.test
mysql-test/t/rpl_slave_skip.test
+71
-0
No files found.
mysql-test/r/rpl_slave_skip.result
0 → 100644
View file @
3269db6e
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** On Slave ****
STOP SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (c INT, d INT);
INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
SELECT * FROM t1;
a b
1 1
2 8
3 27
SELECT * FROM t2;
c d
1 2
2 16
3 54
**** On Slave ****
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 714
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 484
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
Until_Log_Pos 484
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
a b
1 1
2 4
3 9
SELECT * FROM t2;
c d
1 1
2 8
3 27
STOP SLAVE;
RESET SLAVE;
RESET MASTER;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET @foo = 12;
INSERT INTO t1 VALUES(@foo, 2*@foo);
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # User var # # @`foo`=12
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo)
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 248
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 248
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
**** On Master ****
DROP TABLE t1, t2;
mysql-test/r/rpl_udf.result
View file @
3269db6e
...
...
@@ -181,12 +181,20 @@ affected rows: 2
CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
affected rows: 0
INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
Warnings:
Warning 1588 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
Warnings:
Warning 1588 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
Warnings:
Warning 1588 Statement is not safe to log in statement format.
affected rows: 1
INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
Warnings:
Warning 1588 Statement is not safe to log in statement format.
affected rows: 1
SELECT * FROM t1 ORDER BY sum;
sum price
...
...
mysql-test/t/rpl_slave_skip.test
0 → 100644
View file @
3269db6e
source
include
/
master
-
slave
.
inc
;
--
echo
****
On
Slave
****
connection
slave
;
STOP
SLAVE
;
--
echo
****
On
Master
****
connection
master
;
SET
SESSION
BINLOG_FORMAT
=
ROW
;
CREATE
TABLE
t1
(
a
INT
,
b
INT
);
CREATE
TABLE
t2
(
c
INT
,
d
INT
);
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
4
),(
3
,
9
);
INSERT
INTO
t2
VALUES
(
1
,
1
),(
2
,
8
),(
3
,
27
);
UPDATE
t1
,
t2
SET
b
=
d
,
d
=
b
*
2
WHERE
a
=
c
;
source
include
/
show_binlog_events
.
inc
;
# These tables should be changed
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
save_master_pos
;
--
echo
****
On
Slave
****
connection
slave
;
# Stop when reaching the the first table map event.
START
SLAVE
UNTIL
MASTER_LOG_FILE
=
'master-bin.000001'
,
MASTER_LOG_POS
=
484
;
wait_for_slave_to_stop
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 8 # 9 # 23 # 33 #
query_vertical
SHOW
SLAVE
STATUS
;
# Now we skip *one* table map event. If the execution starts right
# after that table map event, *one* of the involved tables will be
# changed.
SET
GLOBAL
SQL_SLAVE_SKIP_COUNTER
=
1
;
START
SLAVE
;
sync_with_master
;
# These values should be what was inserted, not what was
# updated. Since we are skipping the first table map of the group
# representing the UPDATE statement above, we should skip the entire
# group and not start executing at the first table map.
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
STOP
SLAVE
;
RESET
SLAVE
;
connection
master
;
RESET
MASTER
;
SET
SESSION
BINLOG_FORMAT
=
STATEMENT
;
SET
@
foo
=
12
;
INSERT
INTO
t1
VALUES
(
@
foo
,
2
*@
foo
);
save_master_pos
;
source
include
/
show_binlog_events
.
inc
;
connection
slave
;
START
SLAVE
UNTIL
MASTER_LOG_FILE
=
'master-bin.000001'
,
MASTER_LOG_POS
=
106
;
wait_for_slave_to_stop
;
SET
GLOBAL
SQL_SLAVE_SKIP_COUNTER
=
1
;
START
SLAVE
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 8 # 9 # 23 # 33 #
query_vertical
SHOW
SLAVE
STATUS
;
--
echo
****
On
Master
****
connection
master
;
DROP
TABLE
t1
,
t2
;
sync_slave_with_master
;
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