mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Fix a race between TRUNCATE and FOREIGN KEY check
This is a port of an Oracle fix. No test case was provided by Oracle. It seems that to exploit this bug, one would have to SET foreign_key_checks=0 before TRUNCATE, and to concurrently run some DML statement that causes a foreign key constraint to be checked. commit 1f24c5aa2843fa548aa5c4b29c00f955e03e9f5b Author: Aditya A <aditya.a@oracle.com> Date: Fri May 18 12:32:37 2018 +0530 Bug #27208858 CONCURRENT DDL/DML ON FOREIGN KEYS CRASH IN PAGE_CUR_SEARCH_WITH_MATCH_BYTES
This commit is contained in:
parent
de469a2f29
commit
62ee2cd461
1 changed files with 2 additions and 1 deletions
|
@ -1629,7 +1629,8 @@ row_ins_check_foreign_constraint(
|
|||
|
||||
if (check_table == NULL
|
||||
|| !check_table->is_readable()
|
||||
|| check_index == NULL) {
|
||||
|| check_index == NULL
|
||||
|| fil_space_get(check_table->space)->is_being_truncated) {
|
||||
|
||||
if (!srv_read_only_mode && check_ref) {
|
||||
FILE* ef = dict_foreign_err_file;
|
||||
|
|
Loading…
Add table
Reference in a new issue