| 1 |
# |
| 2 |
# This file disconnects two connections. One actively and one through |
| 3 |
# kill. It is included by binlog_xa_prepared_do_and_restart. |
| 4 |
# |
| 5 |
# param $type type of transaction |
| 6 |
# param $terminate_with how to conclude actively disconnecte: |
| 7 |
# XA COMMIT or XA ROLLBACK |
| 8 |
# param $conn3_id connection id of the being killed. |
| 9 |
# param $num_trx_prepared number of transactions prepared so far |
| 10 |
# |
| 11 |
--connection default |
| 12 |
|
| 13 |
--echo *** $num_trx_prepared prepared transactions must be in the list *** |
| 14 |
--replace_column 2 LEN1 3 LEN2 4 TRX_N |
| 15 |
XA RECOVER; |
| 16 |
|
| 17 |
--connection conn1$type |
| 18 |
--let $conn1_id=`SELECT connection_id()` |
| 19 |
--disconnect conn1$type |
| 20 |
|
| 21 |
--connection default |
| 22 |
--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn1_id |
| 23 |
--source include/wait_condition.inc |
| 24 |
|
| 25 |
# It will conclude now |
| 26 |
--error 0,1402 |
| 27 |
--eval $terminate_with 'trx1$type' |
| 28 |
|
| 29 |
--replace_result $conn3_id CONN_ID |
| 30 |
--eval KILL connection $conn3_id |
| 31 |
|
| 32 |
--let $wait_condition= SELECT count(*) = 0 FROM v_processlist WHERE PROCESSLIST_ID = $conn3_id |
| 33 |
--source include/wait_condition.inc |
| 34 |
|
| 35 |
# It will conclude now |
| 36 |
--error 0,1402 |
| 37 |
--eval $terminate_with 'trx3$type' |