diff options
author | Annamalai Gurusami <annamalai.gurusami@oracle.com> | 2012-03-01 11:05:51 +0530 |
---|---|---|
committer | Annamalai Gurusami <annamalai.gurusami@oracle.com> | 2012-03-01 11:05:51 +0530 |
commit | 7e36c4bdb0364158b63b4939838204b4f140b63e (patch) | |
tree | b4c0a4d26199289477ce74e7b5884a6c1df13be9 /sql/handler.cc | |
parent | 0f64bd26bbdc86d317d13f79aff5871b354ca9c0 (diff) | |
download | mariadb-git-7e36c4bdb0364158b63b4939838204b4f140b63e.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 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 895e7cc4df0..d2eaab19ad8 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -345,6 +345,7 @@ int ha_init_errors(void) SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED)); SETMSG(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE)); SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER(ER_TOO_MANY_CONCURRENT_TRXS)); + SETMSG(HA_ERR_TABLE_IN_FK_CHECK, "Table being used in foreign key check"); /* Register the error messages for use with my_error(). */ return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST); @@ -2820,6 +2821,7 @@ void handler::print_error(int error, myf errflag) case HA_ERR_TOO_MANY_CONCURRENT_TRXS: textno= ER_TOO_MANY_CONCURRENT_TRXS; break; + case HA_ERR_TABLE_IN_FK_CHECK: default: { /* The error was "unknown" to this function. |