57 lines
1.9 KiB
Plaintext
57 lines
1.9 KiB
Plaintext
--source include/restart_mysqld.inc
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
##Pipelining the message after closing the pipe leads to undefined behaviour hence is not suppoerted on Windows OS
|
|
--source include/not_windows.inc
|
|
|
|
call mtr.add_suppression('Message of size 4294967040 received, exceeding the limit of 1048576');
|
|
# wait a little to give time for internal temporary session to die out
|
|
select sleep(1);
|
|
--replace_regex /localhost[:0-9]*/localhost/ /Execute/Query/
|
|
SELECT `user`,`host`,`db`,`command`,`state`,`info` FROM INFORMATION_SCHEMA.PROCESSLIST WHERE `state` != 'cleaning up' ORDER BY `user`;
|
|
|
|
## Test starts here
|
|
## Due to Windows OS TCP stack characteristics, the client should not queue anything after the message that is closing the session.
|
|
## This leads to undefined behavior (like errors from the server for the messages preceding session close) if the server runs on that OS.
|
|
## That is why this test is disabled for Windows.
|
|
--write_file $MYSQL_TMP_DIR/client_close_abort.tmp
|
|
|
|
-->title -Close in a pipeline and try to do something after close
|
|
-->newsession sess x_root
|
|
Mysqlx.Sql.StmtExecute {
|
|
stmt: "select 4.1"
|
|
}
|
|
Mysqlx.Sql.StmtExecute {
|
|
stmt: "select 4.2"
|
|
}
|
|
Mysqlx.Session.Close {
|
|
}
|
|
Mysqlx.Sql.StmtExecute {
|
|
stmt: "select 'fail'"
|
|
}
|
|
|
|
-->recvresult
|
|
-->recvresult
|
|
-->recvok
|
|
-->recverror ER_X_BAD_MESSAGE
|
|
|
|
-->closesession abort
|
|
|
|
|
|
EOF
|
|
|
|
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/client_close_abort.tmp 2>&1
|
|
|
|
# sleep for a while to ensure clean up finished
|
|
select sleep(1);
|
|
|
|
show global status like 'mysqlx_sessions';
|
|
show global status like 'mysqlx_connections_%';
|
|
--replace_regex /localhost[:0-9]*/localhost/ /Execute/Query/
|
|
SELECT `user`,`host`,`db`,`command`,`state`,`info` FROM INFORMATION_SCHEMA.PROCESSLIST WHERE `state` != 'cleaning up' ORDER BY `user`;
|
|
|
|
## Cleanup
|
|
--remove_file $MYSQL_TMP_DIR/client_close_abort.tmp
|
|
--source include/xplugin_drop_user.inc
|