1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Cherry-pick of 'mariadb-test: wait on disconnect' from 12.1

Cherry-picks mysqltest.cc and rpl_semi_sync_shutdown_await_ack changes
from 12.1 to fix a race condition on disconnect.
This commit is contained in:
Dave Gosselin
2025-09-09 11:34:32 -04:00
committed by Dave Gosselin
parent c96a4fd419
commit 47df0ba17c
2 changed files with 6 additions and 2 deletions

View File

@@ -5767,8 +5767,12 @@ void do_close_connection(struct st_command *command)
DBUG_PRINT("info", ("Closing connection %s", con->name));
#ifndef EMBEDDED_LIBRARY
if (command->type == Q_DIRTY_CLOSE)
{
mariadb_cancel(con->mysql);
else
{
simple_command(con->mysql,COM_QUIT,0,0,0);
if (con->util_mysql)
simple_command(con->util_mysql,COM_QUIT,0,0,0);
}
#endif /*!EMBEDDED_LIBRARY*/
if (con->stmt)

View File

@@ -219,7 +219,7 @@ SET GLOBAL debug_dbug="+d,simulate_delay_semisync_slave_reply";
--connection server_2
set debug_sync= "now wait_for io_thd_at_slave_reply";
--disconnect con1
--dirty_close con1
--connection default
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect