1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.  
      
rb:947
approved by Jimmy Yang
This commit is contained in:
Annamalai Gurusami
2012-02-27 17:23:56 +05:30
parent 419236ed00
commit 152bb4c17d
12 changed files with 186 additions and 25 deletions

View File

@ -1,7 +1,7 @@
#ifndef MYSYS_MY_HANDLER_ERRORS_INCLUDED
#define MYSYS_MY_HANDLER_ERRORS_INCLUDED
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -13,8 +13,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
/*
Errors a handler can give you
@ -83,7 +83,8 @@ static const char *handler_error_messages[]=
"Too many active concurrent transactions",
"Index column length exceeds limit",
"Index corrupted",
"Undo record too big"
"Undo record too big",
"Table is being used in foreign key check"
};
extern void my_handler_error_register(void);