diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-06-04 15:00:34 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-06-04 15:02:48 +0200 |
commit | b1b4d67bcda32472f5b9c46465bff9db86904a00 (patch) | |
tree | 34fb0274eda78105aa186e3c8b07e2c4e6b55593 /storage | |
parent | 2d38c5e64edbfdc8368954775880c2d677fbd195 (diff) | |
download | mariadb-git-b1b4d67bcda32472f5b9c46465bff9db86904a00.tar.gz |
MDEV-21373 DBUG compilation - bad synchronization in ha_heap::external_lock()
ha_heap::external_lock contains some consistency checks for the table,#
in a debug compilation.
This code suffers from lack of synchronization, in a rare case
where mysql_lock_tables() fail, and unlock is forced, even if lock was
not previously taken.
To workaround, require EXTRA_DEBUG compile definition in order to activate
the consistency checks.The code still might be useful in some cases - but
the audience are developers looking for errors in single-threaded scenarios,
rather than multiuser stress-tests.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/heap/ha_heap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 5af68f098a4..8a8e1f74e47 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -423,7 +423,7 @@ int ha_heap::reset_auto_increment(ulonglong value) int ha_heap::external_lock(THD *thd, int lock_type) { -#ifndef DBUG_OFF +#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) if (lock_type == F_UNLCK && file->s->changed && heap_check_heap(file, 0)) return HA_ERR_CRASHED; #endif |