| 1 |
## Test verfies if session that executed sleep, is `killed` when connection breaks. |
| 2 |
|
| 3 |
--source include/xplugin_preamble.inc |
| 4 |
--source include/xplugin_create_user.inc |
| 5 |
|
| 6 |
## Test starts here |
| 7 |
--write_file $MYSQL_TMP_DIR/sleep.xpl |
| 8 |
echo; |
| 9 |
echo #; |
| 10 |
echo # I.1; |
| 11 |
-->stmtsql SELECT SLEEP(60 * 60 /* 60 minutes */); |
| 12 |
|
| 13 |
echo; |
| 14 |
echo #; |
| 15 |
echo # I.2; |
| 16 |
-->closesession abort |
| 17 |
|
| 18 |
EOF |
| 19 |
|
| 20 |
--echo |
| 21 |
--echo |
| 22 |
--echo ## I. Verify that call to sleep SQL is terminated after disconnection |
| 23 |
--echo # |
| 24 |
--echo # 1. Send 1 hour sleep command to server through X Protocol |
| 25 |
--echo # 2. Disconnect without waiting for response |
| 26 |
--echo # 3. Verify that sleep was terminated (almost right away) |
| 27 |
--echo |
| 28 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/sleep.xpl 2>&1 |
| 29 |
|
| 30 |
|
| 31 |
--echo |
| 32 |
--echo # |
| 33 |
--echo # I.3 Wait maximum of 30 seconds for closure of X Connection |
| 34 |
let $count_sessions= 1; |
| 35 |
let $wait_timeout= 300; |
| 36 |
--source include/wait_until_count_sessions.inc |
| 37 |
--echo Success, there is only one session left |
| 38 |
|
| 39 |
## Cleanup |
| 40 |
--source ../include/xplugin_cleanup.inc |