1#
2# Bug#13688248 CRASH IN DIAGNOSTICS_AREA::SET_OK_STATUS WHEN USING DEBUG_SYNC
3#
4SET SESSION DEBUG_SYNC= 'RESET';
5CREATE TABLE t1 (pk INT, PRIMARY KEY(pk));
6SET SESSION sql_mode=TRADITIONAL;
7SET SESSION autocommit=1;
8INSERT INTO t1 VALUES(1);
9SET SESSION debug_sync='write_row_replace SIGNAL go_ahead1 WAIT_FOR comes_never ';
10REPLACE INTO t1 ( pk ) VALUES ( 1 );
11Warnings:
12Warning	1639	debug sync point wait timed out
13DROP TABLE t1;
14#
15# Bug#19670163 : ASSERT AFTER MISSING ERROR CHECK IN SUBQUERY
16#
17CREATE TABLE t1(a INT);
18CREATE TABLE t2(a INT);
19INSERT INTO t1 VALUES (0);
20INSERT INTO t2 VALUES (0);
21START TRANSACTION;
22DELETE FROM t1;
23connection default;
24SET DEBUG_SYNC=
25'lock_wait_suspend_thread_enter SIGNAL blocked WAIT_FOR delete';
26# Sending:
27SET @b= (SELECT(SELECT a FROM t1 FOR UPDATE) FROM t2 FOR UPDATE);
28connection con1;
29SET DEBUG_SYNC= 'now WAIT_FOR blocked';
30SET DEBUG_SYNC= 'lock_wait_suspend_thread_enter SIGNAL delete';
31DELETE FROM t2;
32COMMIT;
33connection default;
34#Reaping "SET @b ..."
35ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
36connection con1;
37disconnect con1;
38connection default;
39DROP TABLE t1,t2;
40SET DEBUG_SYNC= 'RESET';
41