[MDEV-304] Insufficient buffer allocation for Query_log_event Created: 2012-06-01  Updated: 2012-06-01  Resolved: 2012-06-01

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.3.7
Fix Version/s: 5.3.8

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


 Description   

The query cache needs some extra space in the query string to store some
stuff.

But when the Query_log_event constructor allocates this space, it allocates
QUERY_CACHE_DB_LENGTH_SIZE bytes too few (2 bytes).

I am not sure if this is actually reproducible - it requires that a query is
binlogged with invoker (typically for CREATE VIEW and the like) and that it
hits the query cache (typically a SELECT). Otherwise two extra dummy bytes
becomes available due to zero terminators for invoker not being used.

But I will still fix the code to be at least more clear (and in case there is
some obscure way to hit this).


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