| 1 |
# Test that tests the crash of server in a particular combination of |
| 2 |
# temporary tables and user defined variable |
| 3 |
# |
| 4 |
# Here we tests the crash of server when temporary tables are dropped |
| 5 |
# immediately after a query which has an user defined variable. |
| 6 |
# |
| 7 |
# |
| 8 |
# |
| 9 |
# Test guide: |
| 10 |
# 1) Create a normal table and a temporary table. |
| 11 |
# 2) Create a user defined variable. |
| 12 |
# 3) Execute a transaction in normal table involving the user defined |
| 13 |
# variable. |
| 14 |
# 4) Disconnect this connection, this will end up calling the cleanup |
| 15 |
# method which drops all the temporary tables created in that connection |
| 16 |
# 5) Cleanup |
| 17 |
# |
| 18 |
--source include/have_binlog_format_statement.inc |
| 19 |
connect (con1,localhost,root,,test); |
| 20 |
connection con1; |
| 21 |
--let $connection_id= `SELECT connection_id()` |
| 22 |
CREATE TABLE t1 (id INT); |
| 23 |
CREATE TEMPORARY TABLE t2(id INT); |
| 24 |
SET @id := 1; |
| 25 |
DELETE FROM t1 WHERE id LIKE @id; |
| 26 |
|
| 27 |
disconnect con1; |
| 28 |
--source include/wait_until_disconnected.inc |
| 29 |
connection default; |
| 30 |
|
| 31 |
# Wait till the session con1 is disconnected |
| 32 |
--let $wait_condition = SELECT COUNT(*) = 0 FROM information_schema.processlist WHERE id = '$connection_id' |
| 33 |
--source include/wait_condition.inc |
| 34 |
DROP TABLE t1; |