mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / sp_sync.result
blob17292f4c1a8e32fdbef3b68f11d078a6d7152d88
1 Tests of synchronization of stored procedure execution.
3 # Bug#48157: crash in Item_field::used_tables
5 CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
6 CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
7 CREATE PROCEDURE p1()
8 BEGIN
9 UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1;
10 END|
11 LOCK TABLES t1 WRITE, t2 WRITE;
12 SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go';
13 CALL p1();
14 DROP TABLE t1, t2;
15 SET DEBUG_SYNC = 'now WAIT_FOR parked';
16 CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
17 CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
18 SET DEBUG_SYNC = 'now SIGNAL go';
19 # Without the DEBUG_SYNC supplied in the same patch as this test in the 
20 # code, this test statement will hang.
21 DROP TABLE t1, t2;
22 DROP PROCEDURE p1;
24 # test for bug#11756013
26 DROP SCHEMA IF EXISTS s1;
27 CREATE SCHEMA s1;
28 CREATE PROCEDURE s1.p1() BEGIN END;
29 SET DEBUG_SYNC='before_db_dir_check SIGNAL check_db WAIT_FOR dropped_schema';
30 CALL s1.p1;
31 SET DEBUG_SYNC='now WAIT_FOR check_db';
32 DROP SCHEMA s1;
33 SET DEBUG_SYNC='now SIGNAL dropped_schema';
34 ERROR 42000: Unknown database 's1'
35 SET DEBUG_SYNC = 'RESET';