Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.4
-
None
Description
Though the thread_id type is 8 bytes long, it can't actually have a value larger than 4 bytes (MDEV-15089). However, the global variable pseudo_thread_id is 8 bytes long, can be set dynamically, and when so, only the first 4 bytes are written to the thread_id field of a binary log's Query_log_event and Gtid_log_event (Gtid_log_event debuting in 11.5 with MDEV-7850). So if a user sets the pseudo_thread_id to be larger than 4 bytes, it is truncated. The value should be restricted to be within the 4-byte range.
Attachments
Issue Links
- is caused by
-
MDEV-35706 Shrink my_thread_id to uint32_t
-
- Open
-
- split from
-
MDEV-33943 Query_log_event thread_id only writes first 4 bytes
-
- Closed
-
In mysqld.cc, static recalculate_thread_id_range() places a grand limit of (0, UINT_MAX32) on my_thread_id next_thread_id(void) and aborts the program when there’re “2^32 connections”.
Then why is my_thread_id a typedef of uint64, pseudo- or not?