MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra

use the correct check. before invoking handler methods we
need to know that the table was opened, not only created.
This commit is contained in:
Sergei Golubchik 2022-02-10 13:03:02 +01:00
parent 0168d1eda3
commit 1b8bb44106
3 changed files with 5272 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -325,7 +325,7 @@ void end_read_record(READ_RECORD *info)
free_cache(info); free_cache(info);
if (info->table) if (info->table)
{ {
if (info->table->is_created()) if (info->table->db_stat) // if opened
(void) info->table->file->extra(HA_EXTRA_NO_CACHE); (void) info->table->file->extra(HA_EXTRA_NO_CACHE);
if (info->read_record != rr_quick) // otherwise quick_range does it if (info->read_record != rr_quick) // otherwise quick_range does it
(void) info->table->file->ha_index_or_rnd_end(); (void) info->table->file->ha_index_or_rnd_end();