| 1 |
############################################################################# |
| 2 |
# TEST: SP that creates table, starts tranaction inserts. Save point, insert# |
| 3 |
# rollback to save point and then commits. # |
| 4 |
############################################################################# |
| 5 |
# Includes |
| 6 |
-- source include/have_binlog_format_row.inc |
| 7 |
-- source include/master-slave.inc |
| 8 |
|
| 9 |
# Begin test section 1 |
| 10 |
delimiter |; |
| 11 |
eval CREATE PROCEDURE test.p1(IN i INT) |
| 12 |
BEGIN |
| 13 |
DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; |
| 14 |
DROP TABLE IF EXISTS test.t1; |
| 15 |
CREATE TABLE test.t1 (num INT,PRIMARY KEY(num))ENGINE=$engine_type; |
| 16 |
START TRANSACTION; |
| 17 |
INSERT INTO test.t1 VALUES(i); |
| 18 |
savepoint t1_save; |
| 19 |
INSERT INTO test.t1 VALUES (14); |
| 20 |
ROLLBACK to savepoint t1_save; |
| 21 |
COMMIT; |
| 22 |
END| |
| 23 |
delimiter ;| |
| 24 |
|
| 25 |
CALL test.p1(12); |
| 26 |
SELECT * FROM test.t1; |
| 27 |
|
| 28 |
sync_slave_with_master; |
| 29 |
SELECT * FROM test.t1; |
| 30 |
|
| 31 |
connection master; |
| 32 |
CALL test.p1(13); |
| 33 |
SELECT * FROM test.t1; |
| 34 |
|
| 35 |
sync_slave_with_master; |
| 36 |
SELECT * FROM test.t1; |
| 37 |
|
| 38 |
connection master; |
| 39 |
#show binlog events; |
| 40 |
|
| 41 |
|
| 42 |
DROP PROCEDURE test.p1; |
| 43 |
DROP TABLE test.t1; |
| 44 |
|
| 45 |
# End of 5.0 test case |
| 46 |
--source include/rpl_end.inc |