summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2022-04-26 23:29:29 +0300
committerSergei Petrunia <sergey@mariadb.com>2022-04-29 11:00:37 +0300
commit8db9aa496c59e48238ed5718d683fb6bf2ae2445 (patch)
tree66a006f61fa64dc5e1cb509d655fa90c11031a59 /sql/sql_select.cc
parent3f68c2169e16814e8e268d0f9a9f29aee522453e (diff)
downloadmariadb-git-8db9aa496c59e48238ed5718d683fb6bf2ae2445.tar.gz
MDEV-28268: Server crashes in Expression_cache_tracker::fetch_current_stats
(cherry-pick into preview-10.9-MDEV-27021-explain tree) Expression_cache_tmptable object uses an Expression_cache_tracker object to report the statistics. In the common scenario, Expression_cache_tmptable destructor sets tracker->cache=NULL. The tracker object survives after the expression cache is deleted and one may call cache_tracker->fetch_current_stats() for it with no harm. However a degenerate cache with no parameters does not set tracker->cache=NULL in Expression_cache_tmptable destructor which results in an attempt to use freed data in the cache_tracker->fetch_current_stats() call. Fixed by setting tracker->cache to NULL and wrapping the assignment into a function.
Diffstat (limited to 'sql/sql_select.cc')
0 files changed, 0 insertions, 0 deletions