summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-11-05 16:15:20 +0100
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-07 08:52:30 +0100
commit3ad37ed0eb343cd173b103974aded5783958a88e (patch)
treef4ff854553d26a9e7d57791e7d671d4349a58d2d /storage/heap
parent46f2f24ec43e9c1fa2d994afd615f58736c00d65 (diff)
parent0339cbe2f628f8a122ba7ea3a75fc99fa1dc4c96 (diff)
downloadmariadb-git-3ad37ed0eb343cd173b103974aded5783958a88e.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/ha_heap.cc4
-rw-r--r--storage/heap/hp_close.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index b03c9dfd002..e0e25442d71 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -429,6 +429,10 @@ int ha_heap::reset_auto_increment(ulonglong value)
int ha_heap::external_lock(THD *thd, int lock_type)
{
+#ifndef DBUG_OFF
+ if (lock_type == F_UNLCK && file->s->changed && heap_check_heap(file, 0))
+ return HA_ERR_CRASHED;
+#endif
return 0; // No external locking
}
diff --git a/storage/heap/hp_close.c b/storage/heap/hp_close.c
index 092048a7c1c..82d6186340a 100644
--- a/storage/heap/hp_close.c
+++ b/storage/heap/hp_close.c
@@ -35,12 +35,6 @@ int hp_close(register HP_INFO *info)
{
int error=0;
DBUG_ENTER("hp_close");
-#ifndef DBUG_OFF
- if (info->s->changed && heap_check_heap(info,0))
- {
- error=my_errno=HA_ERR_CRASHED;
- }
-#endif
info->s->changed=0;
if (info->open_list.data)
heap_open_list=list_delete(heap_open_list,&info->open_list);