summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-10-02 13:59:42 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-10-02 13:59:42 +0800
commitebca60c1ff07ecb57cd2852052534640322ca576 (patch)
tree3daa6750467ce113f607820f425cf3304b89461e /sql/handler.h
parent737910fb11e0fe8d2628bf8091c3a7b0de194db2 (diff)
downloadmariadb-git-ebca60c1ff07ecb57cd2852052534640322ca576.tar.gz
Backport BUG#41013 main.bootstrap coredumps in 6.0-rpl
When a storage engine failed to initialize before allocated slot number, the slot number would be 0, and when later finalizing this plugin, it would accidentally unplug the storage engine currently uses slot 0. This patch fixed this problem by add a new macro value HA_SLOT_UNDEF to distinguish undefined slot number from slot 0.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index a281aaa0ad7..ea0b134e53d 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -217,6 +217,13 @@
#define MAX_HA 15
/*
+ Use this instead of 0 as the initial value for the slot number of
+ handlerton, so that we can distinguish uninitialized slot number
+ from slot 0.
+*/
+#define HA_SLOT_UNDEF ((uint)-1)
+
+/*
Parameters for open() (in register form->filestat)
HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED
*/