[MDEV-32844] THD::rli_fake/rgi_fake not cleared on new connection Created: 2023-11-20  Updated: 2023-11-27  Resolved: 2023-11-27

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2

Type: Bug Priority: Major
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None


 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.


Generated at Thu Feb 08 10:34:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.