1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Manual merge of patch for bug#11756013 from mysql-5.1 tree.

This commit is contained in:
Dmitry Shulga
2011-06-24 00:02:58 +07:00
4 changed files with 92 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Tests of syncronization of stored procedure execution.
Tests of synchronization of stored procedure execution.
SET DEBUG_SYNC= 'RESET';
#
# Bug #30977 Concurrent statement using stored function and
@ -92,4 +92,16 @@ COUNT(f1(a))
DROP PROCEDURE p1;
DROP FUNCTION f1;
DROP TABLES t0, t1;
SET DEBUG_SYNC= 'RESET';
#
# test for bug#11756013
#
DROP SCHEMA IF EXISTS s1;
CREATE SCHEMA s1;
CREATE PROCEDURE s1.p1() BEGIN END;
SET DEBUG_SYNC='before_db_dir_check SIGNAL check_db WAIT_FOR dropped_schema';
CALL s1.p1;
SET DEBUG_SYNC='now WAIT_FOR check_db';
DROP SCHEMA s1;
SET DEBUG_SYNC='now SIGNAL dropped_schema';
ERROR 42000: Unknown database 's1'
SET DEBUG_SYNC = 'RESET';

View File

@ -1,7 +1,7 @@
# This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc
--echo Tests of syncronization of stored procedure execution.
--echo Tests of synchronization of stored procedure execution.
--source include/have_debug_sync.inc
@ -149,9 +149,34 @@ disconnect con2;
DROP PROCEDURE p1;
DROP FUNCTION f1;
DROP TABLES t0, t1;
SET DEBUG_SYNC= 'RESET';
--echo #
--echo # test for bug#11756013
--echo #
--disable_warnings
DROP SCHEMA IF EXISTS s1;
--enable_warnings
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';
--send 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 ER_BAD_DB_ERROR
--reap
connection default;
disconnect con3;
SET DEBUG_SYNC = 'RESET';
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc