Commit 62ee2cd4 authored by Marko Mäkelä's avatar Marko Mäkelä

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
parent de469a2f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment