summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/commit.inc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mysql-test/include/commit.inc20
1 files changed, 14 insertions, 6 deletions
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index c696613d..132fdcff 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -613,13 +613,17 @@ call p_verify_status_increment(2, 0, 2, 0);
drop table t2;
set sql_mode=no_engine_substitution;
create temporary table t2 (a int);
-call p_verify_status_increment(1, 0, 0, 0);
+# One commit for the create temporary table, and two for committing the
+# read of the stored procedure from Aria table (creating temporary table
+# clears the sp cache).
+call p_verify_status_increment(3, 0, 2, 0);
set sql_mode=default;
--echo # 19. A function changes temp-trans-table.
--echo #
select f1();
---echo # Two commits because a binary log record is written
-call p_verify_status_increment(2, 0, 1, 0);
+--echo # Two commits because a binary log record is written, and another two
+--echo # as the function f1() is reloaded after creating temporary table.
+call p_verify_status_increment(4, 0, 3, 0);
commit;
call p_verify_status_increment(2, 0, 1, 0);
@@ -672,9 +676,11 @@ call p_verify_status_increment(2, 0, 1, 0);
--echo # 25. DDL: DROP TEMPORARY TABLE, does not start a transaction
--echo #
drop temporary table t2;
-call p_verify_status_increment(1, 0, 1, 0);
+# Dropping temporary table clears SP caches, so get another two commit
+# increments from loading the p_verify_status_increment procedure.
+call p_verify_status_increment(3, 0, 2, 0);
commit;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(1, 0, 0, 0);
--echo # 26. Verify that SET AUTOCOMMIT issues an implicit commit
--echo #
@@ -721,7 +727,9 @@ call p_verify_status_increment(1, 0, 1, 0);
create table t2 (a int);
call p_verify_status_increment(0, 0, 0, 0);
do (select f1() from t1 where a=2);
-call p_verify_status_increment(2, 2, 2, 2);
+# Again extra 2 commit increments from re-loading function f1 after
+# dropping temporary table.
+call p_verify_status_increment(4, 2, 4, 2);
commit;
call p_verify_status_increment(2, 2, 2, 2);