diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/rpl/include/rpl_row_sp007.test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/include/rpl_row_sp007.test')
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_row_sp007.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/include/rpl_row_sp007.test b/mysql-test/suite/rpl/include/rpl_row_sp007.test new file mode 100644 index 00000000..4a68dddf --- /dev/null +++ b/mysql-test/suite/rpl/include/rpl_row_sp007.test @@ -0,0 +1,46 @@ +############################################################################# +# TEST: SP that creates table, starts tranaction inserts. Save point, insert# +# rollback to save point and then commits. # +############################################################################# +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Begin test section 1 +delimiter |; +eval CREATE PROCEDURE test.p1(IN i INT) +BEGIN + DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; + DROP TABLE IF EXISTS test.t1; + CREATE TABLE test.t1 (num INT,PRIMARY KEY(num))ENGINE=$engine_type; + START TRANSACTION; + INSERT INTO test.t1 VALUES(i); + savepoint t1_save; + INSERT INTO test.t1 VALUES (14); + ROLLBACK to savepoint t1_save; + COMMIT; +END| +delimiter ;| + +CALL test.p1(12); +SELECT * FROM test.t1; + +sync_slave_with_master; +SELECT * FROM test.t1; + +connection master; +CALL test.p1(13); +SELECT * FROM test.t1; + +sync_slave_with_master; +SELECT * FROM test.t1; + +connection master; +#show binlog events; + + +DROP PROCEDURE test.p1; +DROP TABLE test.t1; + +# End of 5.0 test case +--source include/rpl_end.inc |