Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6(EOL), 10.11, 11.4, 11.8, 12.3
-
None
-
Unexpected results
Description
qc_info plugin (information_schema.query_cache_info) prints query cache entries.
The format of a query cache key is [query text][\0][db name length][db name][flags] and this, obviously cannot be unambiguously parsed if the query text can contain \0 bytes.
The plugin assumes that it doesn't and parses under this assumption. With a \0 in a query the plugin can read a very large number for the db name length and show up to 192 following utf8 characters in the statement_schema column.
This cannot be fixed without changing how query cache key format, which we won't be doing for this plugin. Let's just limit the db name length to never read beyond the db name end.
Reported by Yuelin Wang![]()