summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-02-10 13:03:02 +0100
committerSergei Golubchik <serg@mariadb.org>2022-02-10 15:48:06 +0100
commit1b8bb44106f528f742faa19d23bd6e822be04f39 (patch)
tree1f356c599a6f16d34dbd2c8cdcd5745212385f31 /sql
parent0168d1eda30dad4b517659422e347175eb89e923 (diff)
downloadmariadb-git-1b8bb44106f528f742faa19d23bd6e822be04f39.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/records.cc2
1 files changed, 1 insertions, 1 deletions
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();