From 1b8bb44106f528f742faa19d23bd6e822be04f39 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 10 Feb 2022 13:03:02 +0100 Subject: 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. --- sql/records.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/records.cc') diff --git a/sql/records.cc b/sql/records.cc index 8a152cda4c2..406512b6d7e 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -325,7 +325,7 @@ void end_read_record(READ_RECORD *info) free_cache(info); if (info->table) { - if (info->table->is_created()) + if (info->table->db_stat) // if opened (void) info->table->file->extra(HA_EXTRA_NO_CACHE); if (info->read_record != rr_quick) // otherwise quick_range does it (void) info->table->file->ha_index_or_rnd_end(); -- cgit v1.2.1