| 1 |
## Script xplugin_wait_for_connection_closure.inc |
| 2 |
# This scripts waits for all x connections to be closed. |
| 3 |
# |
| 4 |
## Usage |
| 5 |
# |
| 6 |
# --source ../include/xplugin_wait_for_connection_closure.inc |
| 7 |
# |
| 8 |
|
| 9 |
let $wait_quiet=1; |
| 10 |
let $wait_for_status_variable ='Mysqlx_sessions'; |
| 11 |
let $wait_for_status_value =0; |
| 12 |
--source ../include/wait_for_status_variables.inc |
| 13 |
|
| 14 |
let $wait_condition= |
| 15 |
SELECT closed=accepted FROM |
| 16 |
(SELECT VARIABLE_VALUE as closed |
| 17 |
FROM performance_schema.global_status |
| 18 |
WHERE VARIABLE_NAME = "Mysqlx_connections_closed") as t1, |
| 19 |
(SELECT VARIABLE_VALUE as accepted |
| 20 |
FROM performance_schema.global_status |
| 21 |
WHERE VARIABLE_NAME = "Mysqlx_connections_accepted") as t2; |
| 22 |
--source include/wait_condition.inc |
| 23 |
|
| 24 |
if (!$success) |
| 25 |
{ |
| 26 |
if ($show_xpl_debug_info) |
| 27 |
{ |
| 28 |
--source show_xpl_debug_info.inc |
| 29 |
} |
| 30 |
die; |
| 31 |
} |