Commit d415f600 authored by Kristian Nielsen's avatar Kristian Nielsen

MDEV-32844: THD::rli_fake/rgi_fake not cleared on new connection

Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
parent 7aca66a3
'### MDEV-32844: THD::rli_fake/rgi_fake not cleared on new connection'
connect con1,localhost,root,,;
BINLOG '
6ENbZQ8BAAAA/AAAAAABAAAAAAQAMTAuMTEuNi1NYXJpYURCLWRlYnVnLWxvZwAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAADoQ1tlEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAEEwQADQgICAoKCgGbvv33
';
disconnect con1;
connect con1,localhost,root,,;
SET SESSION pseudo_slave_mode= 1;
disconnect con1;
connection default;
--source include/not_embedded.inc
--source include/load_sysvars.inc
--echo '### MDEV-32844: THD::rli_fake/rgi_fake not cleared on new connection'
--connect(con1,localhost,root,,)
BINLOG '
6ENbZQ8BAAAA/AAAAAABAAAAAAQAMTAuMTEuNi1NYXJpYURCLWRlYnVnLWxvZwAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAADoQ1tlEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAEEwQADQgICAoKCgGbvv33
';
--disconnect con1
--connect(con1,localhost,root,,)
# The bug was that the THD::rli_fake was not cleared when the THD is re-used
# for the new connection, and we would get a warning from the following
# statement.
SET SESSION pseudo_slave_mode= 1;
--disconnect con1
--connection default
......@@ -1593,6 +1593,10 @@ void THD::free_connection()
vio_delete(net.vio);
net.vio= nullptr;
net_end(&net);
delete(rgi_fake);
rgi_fake= NULL;
delete(rli_fake);
rli_fake= NULL;
#endif
if (!cleanup_done)
cleanup();
......@@ -1695,17 +1699,6 @@ THD::~THD()
dbug_sentry= THD_SENTRY_GONE;
#endif
#ifndef EMBEDDED_LIBRARY
if (rgi_fake)
{
delete rgi_fake;
rgi_fake= NULL;
}
if (rli_fake)
{
delete rli_fake;
rli_fake= NULL;
}
if (rgi_slave)
rgi_slave->cleanup_after_session();
my_free(semisync_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment