Commit f2c3ed8e authored by anozdrin@mysql.com's avatar anozdrin@mysql.com

Test case for BUG#16621: INSERTs in Stored Procedures causes data corruption

in the Binary Log.
parent 145fd62b
......@@ -401,5 +401,18 @@ drop function f1;
select * from t1;
a
1
DROP PROCEDURE IF EXISTS p1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(col VARCHAR(10));
CREATE PROCEDURE p1(arg VARCHAR(10))
INSERT INTO t1 VALUES(arg);
CALL p1('test');
SELECT * FROM t1;
col
test
SELECT * FROM t1;
col
test
DROP PROCEDURE p1;
drop table t1;
reset master;
......@@ -401,6 +401,42 @@ sync_slave_with_master;
connection slave;
select * from t1;
#
# Bug#16621 "INSERTs in Stored Procedures causes data corruption in the Binary
# Log for 5.0.18"
#
# Prepare environment.
connection master;
--disable_warnings
DROP PROCEDURE IF EXISTS p1;
DROP TABLE IF EXISTS t1;
--enable_warnings
# Test case.
CREATE TABLE t1(col VARCHAR(10));
CREATE PROCEDURE p1(arg VARCHAR(10))
INSERT INTO t1 VALUES(arg);
CALL p1('test');
SELECT * FROM t1;
sync_slave_with_master;
connection slave;
SELECT * FROM t1;
# Cleanup.
connection master;
DROP PROCEDURE p1;
# cleanup
connection master;
drop table t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment