summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp_sync.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sp_sync.result')
-rw-r--r--mysql-test/r/sp_sync.result36
1 files changed, 24 insertions, 12 deletions
diff --git a/mysql-test/r/sp_sync.result b/mysql-test/r/sp_sync.result
index ba90b009ce4..d6c170712a7 100644
--- a/mysql-test/r/sp_sync.result
+++ b/mysql-test/r/sp_sync.result
@@ -8,7 +8,8 @@ SET DEBUG_SYNC= 'RESET';
# but before a MDL lock is taken. This must be noticed and the
# sp cache flushed so the correct version can be loaded.
#
-# Connection default
+connect con2, localhost, root;
+connection default;
CREATE FUNCTION f1() RETURNS INT RETURN 1;
# Get f1 cached
SELECT f1();
@@ -18,17 +19,18 @@ f1()
SET DEBUG_SYNC= 'before_execute_sql_command SIGNAL before WAIT_FOR changed';
# Sending:
SELECT f1();
-# Connection 2
+connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR before';
# ... but before f1 is locked, change it.
DROP FUNCTION f1;
CREATE FUNCTION f1() RETURNS INT RETURN 2;
SET DEBUG_SYNC= 'now SIGNAL changed';
-# Connection default
# We should now get '2' and not '1'.
+connection default;
# Reaping: SELECT f1()
f1()
2
+disconnect con2;
DROP FUNCTION f1;
SET DEBUG_SYNC= 'RESET';
#
@@ -38,24 +40,28 @@ SET DEBUG_SYNC= 'RESET';
# to freed memory.
#
DROP FUNCTION IF EXISTS f1;
-# Connection default
+connect con2, localhost, root;
+connect con3, localhost, root;
+connection default;
CREATE FUNCTION f1() RETURNS INT RETURN 0;
-# Connection con2
+connection con2;
SET DEBUG_SYNC= 'after_wait_locked_pname SIGNAL locked WAIT_FOR issued';
# con2 will now have an x-lock on f1
# Sending:
ALTER FUNCTION f1 COMMENT 'comment';
-# Connection default
+connection default;
SET DEBUG_SYNC= 'now WAIT_FOR locked';
# This query will block due to the x-lock on f1 and back-off
SHOW OPEN TABLES WHERE f1()=0;
-# Connection con3
+connection con3;
# Check that the IS query is blocked before releasing the x-lock
SET DEBUG_SYNC= 'now SIGNAL issued';
-# Connection default
+connection default;
# Reaping: ALTER FUNCTION f1 COMMENT 'comment'
DROP FUNCTION f1;
SET DEBUG_SYNC= 'RESET';
+disconnect con2;
+disconnect con3;
#
# Bug #48246 assert in close_thread_table
#
@@ -65,7 +71,7 @@ CREATE FUNCTION f1(b INTEGER) RETURNS INTEGER RETURN 1;
CREATE PROCEDURE p1() SELECT COUNT(f1(a)) FROM t1, t0;
INSERT INTO t0 VALUES(1);
INSERT INTO t1 VALUES(1), (2);
-# Connection 2
+connect con2, localhost, root;
CALL p1();
COUNT(f1(a))
2
@@ -76,7 +82,7 @@ SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL locked_t1 WAIT_FOR go_for_t0
# reset properly causing an eventual assert.
# Sending:
CALL p1();
-# Connection default
+connection default;
SET DEBUG_SYNC= 'now WAIT_FOR locked_t1';
# Issue LOCK TABLES statement which will enter in MDL deadlock
# with CALL statement and as result will cause it to perform
@@ -84,11 +90,12 @@ SET DEBUG_SYNC= 'now WAIT_FOR locked_t1';
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL go_for_t0';
LOCK TABLES t0 WRITE, t1 WRITE;
UNLOCK TABLES;
-# Connection 2
+connection con2;
# Reaping: CALL p1()
COUNT(f1(a))
2
-# Connection default
+connection default;
+disconnect con2;
DROP PROCEDURE p1;
DROP FUNCTION f1;
DROP TABLES t0, t1;
@@ -98,10 +105,15 @@ DROP TABLES t0, t1;
DROP SCHEMA IF EXISTS s1;
CREATE SCHEMA s1;
CREATE PROCEDURE s1.p1() BEGIN END;
+connect con3, localhost, root;
SET DEBUG_SYNC='before_db_dir_check SIGNAL check_db WAIT_FOR dropped_schema';
CALL s1.p1;
+connection default;
SET DEBUG_SYNC='now WAIT_FOR check_db';
DROP SCHEMA s1;
SET DEBUG_SYNC='now SIGNAL dropped_schema';
+connection con3;
ERROR 42000: Unknown database 's1'
+connection default;
+disconnect con3;
SET DEBUG_SYNC = 'RESET';