summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2022-04-21 22:45:31 +0300
committerSergei Petrunia <sergey@mariadb.com>2022-04-22 18:05:30 +0300
commit807945f2eb5fa22e6f233cc17b85a2e141efe2c8 (patch)
tree2b9c96f3c3c3d08e49d475ed5eff584bc5d94703 /storage
parent32041e7058db02dd312833a0bfc50437a64546ea (diff)
downloadmariadb-git-807945f2eb5fa22e6f233cc17b85a2e141efe2c8.tar.gz
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see if it should call item->cleanup() or leave the item as-is. The failure happens when a constant item has a non-constant one inside it, like: (tbl.col=0 AND impossible_cond) item->walk(cleanup_excluding_immutables_processor) works in a bottom-up way so it 1. will call Item_func_eq(tbl.col=0)->cleanup() 2. will not call Item_cond_and->cleanup (as the AND is constant) This creates an item tree where a fixed Item has an un-fixed Item inside it which eventually causes an assertion failure. Fixed by introducing this rule: instead of just calling item->set_extraction_flag(IMMUTABLE_FL); we call Item::walk() to set the flag for all sub-items of the item.
Diffstat (limited to 'storage')
0 files changed, 0 insertions, 0 deletions