#--- Basic preparations needed for all tests START DROP TABLE IF EXISTS t0, t1, t2, t10, t99_actions; DROP VIEW IF EXISTS v0; DROP PROCEDURE IF EXISTS test_proc1; DROP PROCEDURE IF EXISTS test_proc10; DROP FUNCTION IF EXISTS test_func1; DROP FUNCTION IF EXISTS test_func10; DROP DATABASE IF EXISTS mysqltest_db1; CREATE TABLE t0 (f1 BIGINT, f2 BIGINT); INSERT INTO t0 VALUES(1, 1); INSERT INTO t0 SELECT f1 + 1, f1 + 1 FROM t0; INSERT INTO t0 SELECT f1 + 2, f1 + 2 FROM t0; INSERT INTO t0 SELECT f1 + 4, f1 + 4 FROM t0; INSERT INTO t0 SELECT f1 + 8, f1 + 8 FROM t0; INSERT INTO t0 SELECT f1 + 16, f1 + 16 FROM t0; CREATE TABLE t1 LIKE t0; INSERT INTO t1 SELECT * FROM t0; CREATE TABLE t2 LIKE t0; INSERT INTO t2 SELECT * FROM t0; CREATE TABLE t99_actions ( test_number BIGINT UNSIGNED, command_number MEDIUMINT UNSIGNED, command VARCHAR(200), PRIMARY KEY (test_number,command_number) ); connection default; INSERT INTO t99_actions VALUES( 1, 1, 'SELECT 1 AS my_value FROM t0 WHERE f1 = 1'); INSERT INTO t99_actions VALUES( 2, 1, 'SELECT MAX(f1) INTO @t0_max FROM t0'); INSERT INTO t99_actions VALUES( 2, 2, 'UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max'); INSERT INTO t99_actions VALUES( 3, 1, 'SELECT MAX(f1) INTO @t0_max FROM t0'); INSERT INTO t99_actions VALUES( 3, 2, 'DELETE FROM t0 WHERE f1 = @t0_max'); INSERT INTO t99_actions VALUES( 4, 1, 'SELECT MAX(f1) INTO @t0_max FROM t0'); INSERT INTO t99_actions VALUES( 4, 2, 'INSERT INTO t0 SET f1 = @t0_max + 1'); INSERT INTO t99_actions VALUES( 5, 1, 'CREATE TABLE t10 (f1 BIGINT)'); INSERT INTO t99_actions VALUES( 5, 2, 'DROP TABLE t10'); INSERT INTO t99_actions VALUES( 6, 1, 'CREATE PROCEDURE test_proc10() SELECT 238'); INSERT INTO t99_actions VALUES( 6, 2, 'DROP PROCEDURE test_proc10'); INSERT INTO t99_actions VALUES( 7, 1, 'CREATE FUNCTION test_func10() RETURNS INT RETURN 5'); INSERT INTO t99_actions VALUES( 7, 2, 'DROP FUNCTION test_func10'); INSERT INTO t99_actions VALUES( 8, 1, 'CREATE VIEW v0 AS SELECT * FROM t0'); INSERT INTO t99_actions VALUES( 8, 2, 'DROP VIEW v0'); INSERT INTO t99_actions VALUES( 9, 1, 'CREATE DATABASE mysqltest_db1'); INSERT INTO t99_actions VALUES( 9, 2, 'DROP DATABASE mysqltest_db1'); INSERT INTO t99_actions VALUES( 10, 1, 'ALTER TABLE t0 ADD f3 BIGINT'); INSERT INTO t99_actions VALUES( 10, 2, 'ALTER TABLE t0 DROP f3'); #--- Basic preparations needed for all tests STOP ##### Variations on nearly original testcase for Bug#12093 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE PROCEDURE test_proc1 (f1 INT ) BEGIN SELECT * FROM t2 LIMIT 1; END // CREATE FUNCTION test_func1() RETURNS INT BEGIN RETURN (SELECT MAX(f1) FROM t1); END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 ##### Variations on simplified testcase 1 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE PROCEDURE test_proc1 ( f1 INT ) BEGIN SELECT 'here is test_proc1' AS my_content; END // CREATE FUNCTION test_func1() RETURNS INT BEGIN RETURN (SELECT MAX(f1) FROM t1); END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 ##### Variations on simplified testcase 2 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE PROCEDURE test_proc1 ( f1 INT ) BEGIN SELECT * FROM t2 LIMIT 1; END // CREATE FUNCTION test_func1() RETURNS INT BEGIN RETURN (SELECT 'here is test_func1' AS my_content); END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 ##### Variations on simplified testcase 3 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE PROCEDURE test_proc1 ( f1 INT ) BEGIN SELECT 'here is test_proc1' AS my_content; END // CREATE FUNCTION test_func1() RETURNS INT BEGIN RETURN (SELECT 'here is test_func1' AS my_content); END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; my_content here is test_proc1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (test_func1())'; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; my_content here is test_proc1 ##### Variations on simplified testcase 4 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE PROCEDURE test_proc1 (f1 INT ) BEGIN SELECT * FROM t2 LIMIT 1; END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT 1 AS my_value FROM t2 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; UPDATE t2 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; DELETE FROM t2 WHERE f1 = @t0_max; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; SELECT MAX(f1) INTO @t0_max FROM t2; INSERT INTO t2 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; CREATE VIEW v0 AS SELECT * FROM t2; DROP VIEW v0; connection con1; EXECUTE s1; f1 f2 1 1 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'CALL test_proc1 (888)'; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 connection con2; ALTER TABLE t2 ADD f3 BIGINT; ALTER TABLE t2 DROP f3; connection con1; EXECUTE s1; f1 f2 1 1 ##### Variations on simplified testcase 5 connection default; DROP PROCEDURE IF EXISTS test_proc1; DROP FUNCTION IF EXISTS test_func1; CREATE FUNCTION test_func1() RETURNS INT BEGIN RETURN (SELECT MAX(f1) FROM t1); END // #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; test_func1() 32 connection con2; SELECT 1 AS my_value FROM t0 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; UPDATE t0 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; DELETE FROM t0 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t0; INSERT INTO t0 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE TABLE t10 (f1 BIGINT); DROP TABLE t10; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE PROCEDURE test_proc10() SELECT 238; DROP PROCEDURE test_proc10; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE FUNCTION test_func10() RETURNS INT RETURN 5; DROP FUNCTION test_func10; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE VIEW v0 AS SELECT * FROM t0; DROP VIEW v0; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE DATABASE mysqltest_db1; DROP DATABASE mysqltest_db1; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; test_func1() 32 connection con2; ALTER TABLE t0 ADD f3 BIGINT; ALTER TABLE t0 DROP f3; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; test_func1() 32 connection con2; SELECT 1 AS my_value FROM t1 WHERE f1 = 1; my_value 1 connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 33 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; UPDATE t1 SET f1 = @t0_max + 1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 34 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 34 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 31 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; DELETE FROM t1 WHERE f1 = @t0_max; connection con1; EXECUTE s1; test_func1() 30 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 30 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; test_func1() 31 connection con2; SELECT MAX(f1) INTO @t0_max FROM t1; INSERT INTO t1 SET f1 = @t0_max + 1; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; test_func1() 32 connection con2; CREATE VIEW v0 AS SELECT * FROM t1; DROP VIEW v0; connection con1; EXECUTE s1; test_func1() 32 #--------------------------------------------------------------------------# connection con1; PREPARE s1 FROM 'SELECT test_func1() FROM t1 LIMIT 1'; EXECUTE s1; test_func1() 32 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; test_func1() 32 connection con2; ALTER TABLE t1 ADD f3 BIGINT; ALTER TABLE t1 DROP f3; connection con1; EXECUTE s1; test_func1() 32 #--- Final Cleanup START DROP TABLE IF EXISTS t0, t1, t2, t10, t99_actions; DROP VIEW IF EXISTS v0; DROP PROCEDURE IF EXISTS test_proc1; DROP PROCEDURE IF EXISTS test_proc10; DROP FUNCTION IF EXISTS test_func1; DROP FUNCTION IF EXISTS test_func10; DROP DATABASE IF EXISTS mysqltest_db1; #--- Final Cleanup STOP