summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2018-10-13 19:31:42 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2018-10-13 19:31:42 +0200
commitbc2903e744de3dae7871212d1a436cbf6f472cb1 (patch)
tree40c00a991b12a7e4ff47b7979e2479d710f02eeb /mysql-test/suite
parent3c3c4ae22545d3242a8b7c4f2bec3bf2d245890a (diff)
parent2f4a0c5be2c5d5153c4253a49ba8820ab333a9a0 (diff)
downloadmariadb-git-bc2903e744de3dae7871212d1a436cbf6f472cb1.tar.gz
Merge branch 'gtid_table_garbage_rows' into 10.1
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic.result6
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test17
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
index 3cd4f8231bf..99bd8562ffe 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
@@ -571,4 +571,10 @@ SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
DROP TABLE t1, t2, t3;
+include/save_master_gtid.inc
+include/sync_with_master_gtid.inc
+Check that no more than the expected last two GTIDs are in mysql.gtid_slave_pos
+select count(*) from mysql.gtid_slave_pos order by domain_id, sub_id;
+count(*)
+2
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index 9f6669279db..3867a3fdf3a 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -549,5 +549,22 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--connection server_1
DROP TABLE t1, t2, t3;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+# Check for left-over rows in table mysql.gtid_slave_pos (MDEV-12147).
+#
+# There was a bug when a transaction got a conflict and was rolled back. It
+# might have also handled deletion of some old rows, and these deletions would
+# then also be rolled back. And since the deletes were never re-tried, old no
+# longer needed rows would accumulate in the table without limit.
+#
+# The earlier part of this test file have plenty of transactions being rolled
+# back. But the last DROP TABLE statement runs on its own and should never
+# conflict, thus at this point the mysql.gtid_slave_pos table should be clean.
+--echo Check that no more than the expected last two GTIDs are in mysql.gtid_slave_pos
+select count(*) from mysql.gtid_slave_pos order by domain_id, sub_id;
+--connection server_1
--source include/rpl_end.inc