[MDEV-32862] MYSQL struct in C/C and server differs Created: 2023-11-22  Updated: 2023-11-25  Resolved: 2023-11-25

Status: Closed
Project: MariaDB Server
Component/s: Embedded Server, libmariadb, Protocol, Server
Affects Version/s: 10.5, 10.6, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Blocker
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

The MYSQL structure in the server is not the same as in C/C — they diverged when MEM_ROOT got PSI_memory_key member and thus became larger than MA_MEM_ROOT. This means that all offsets in MYSQL after the memroot are different in the server. And if a server plugin (which uses server's MYSQL) needs to load a client plugin (which is part of C/C and uses its MYSQL definition), the plugin might corrupt caller's MYSQL.



 Comments   
Comment by Sergei Golubchik [ 2023-11-23 ]

commits

2fb1202266b MDEV-32862 MYSQL struct in C/C and server differs
e206ca87ff1 move MEM_ROOT::read_only into flags
29ae8980415 Backport MEM_ROOT::flags from 10.7

Comment by Oleksandr Byelkin [ 2023-11-23 ]

OK to commit but in 10.4 (to avoid a similar problem there)

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