mariadb/mysql-test/t/sp_sync.test
Konstantin Osipov a72f90bc43 Merge next-mr -> next-4284.
mysql-test/t/disabled.def:
  Restore disabled ssl tests: SSL certificates were updated.
  Disable sp_sync.test, the test case can't work in next-4284.
mysql-test/t/partition_innodb.test:
  Disable parsing of the test case for Bug#47343, 
  the test can not work in next-4284.
mysql-test/t/ps_ddl.test:
  Update results (CREATE TABLE IF NOT EXISTS takes
  into account existence of the temporary table).
2010-02-06 13:28:06 +03:00

58 lines
1.3 KiB
Text

# This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc
--echo Tests of syncronization of stored procedure execution.
--source include/have_debug_sync.inc
--echo #
--echo # Bug#48157: crash in Item_field::used_tables
--echo #
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
DELIMITER |;
CREATE PROCEDURE p1()
BEGIN
UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1;
END|
DELIMITER ;|
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
LOCK TABLES t1 WRITE, t2 WRITE;
connection con2;
LET $ID= `select connection_id()`;
SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go';
--send CALL p1()
connection con1;
let $wait_condition= SELECT 1 FROM information_schema.processlist WHERE ID = $ID AND
state = "Waiting for table";
--source include/wait_condition.inc
DROP TABLE t1, t2;
SET DEBUG_SYNC = 'now WAIT_FOR parked';
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
SET DEBUG_SYNC = 'now SIGNAL go';
connection con2;
--reap
disconnect con1;
disconnect con2;
connection default;
--echo # Without the DEBUG_SYNC supplied in the same patch as this test in the
--echo # code, this test statement will hang.
DROP TABLE t1, t2;
DROP PROCEDURE p1;
SET DEBUG_SYNC = 'RESET';