mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-32844: THD::rli_fake/rgi_fake not cleared on new connection
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
'### 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;
|
@ -0,0 +1,20 @@
|
||||
--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);
|
||||
|
Reference in New Issue
Block a user