Details
Description
THD::reset_for_reuse() is missing clear of rli_fake and rgi_fake. Then the THD can be re-used for a new connection where these incorrectly remains set to left-overs from a previous connection.
Test case:
--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
|
This has occasionally been observed as random failure of test case sys_vars.character_set_results_basic, depending on what tests ran before it.