mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
MDEV-5037: Server crash on a JOIN on a derived table with join_cache_level > 2
- The crash was caused because the optimizer called handler->multi_range_read_info() on a derived temporary table. That table has been created, but not opened yet. Because of that, handler::table was NULL, which caused crash. Fixed by changing DS-MRR methods to use handler::table_share instead. handler::table_share is set in handler ctor, so this should be safe.
This commit is contained in:
parent
33f807fd91
commit
422c55a240
6 changed files with 65 additions and 12 deletions
|
|
@ -192,7 +192,7 @@ public:
|
|||
(PREV_BITS(key_part_map, max_loose_keypart+1) & // (3)
|
||||
(found_part | loose_scan_keyparts)) == // (3)
|
||||
PREV_BITS(key_part_map, max_loose_keypart+1) && // (3)
|
||||
!key_uses_partial_cols(s->table, key))
|
||||
!key_uses_partial_cols(s->table->s, key))
|
||||
{
|
||||
/* Ok, can use the strategy */
|
||||
part1_conds_met= TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue