summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnnamalai Gurusami <annamalai.gurusami@oracle.com>2012-03-01 11:05:51 +0530
committerAnnamalai Gurusami <annamalai.gurusami@oracle.com>2012-03-01 11:05:51 +0530
commit27ecea534c6921c9cedd0d378caafda3e632c250 (patch)
treeb4c0a4d26199289477ce74e7b5884a6c1df13be9 /include
parenteca61722b0674be62a7265eb55e10d5c98515efd (diff)
downloadmariadb-git-27ecea534c6921c9cedd0d378caafda3e632c250.tar.gz
Bug#13635833: MULTIPLE CRASHES IN FOREIGN KEY CODE WITH CONCURRENT DDL/DML
There are two threads. In one thread, dml operation is going on involving cascaded update operation. In another thread, alter table add foreign key constraint is happening. Under these circumstances, it is possible for the dml thread to access a dict_foreign_t object that has been freed by the ddl thread. The debug sync test case provides the sequence of operations. Without fix, the test case will crash the server (because of newly added assert). With fix, the alter table stmt will return an error message. Backporting the fix from MySQL 5.5 to 5.1 rb:961 rb:947
Diffstat (limited to 'include')
-rw-r--r--include/my_base.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 80ba4bcd004..ffd68046029 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -445,7 +445,12 @@ enum ha_base_keytype {
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
-#define HA_ERR_LAST 177 /* Copy of last error nr */
+
+/* The error codes from 178 to 180 is not used, because we need to
+maintain forward compatibility with higher versions. */
+
+#define HA_ERR_TABLE_IN_FK_CHECK 181 /* Table being used in foreign key check */
+#define HA_ERR_LAST 181 /* Copy of last error nr */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)