mirror of
https://github.com/MariaDB/server.git
synced 2025-02-23 05:43:08 +01:00

Merge following change from 10.2 revision-id: d52cff9f10aeea208a1058f7b5527e602125584c (mariadb-10.2.14-25-gd52cff9) parent(s):bc2501453c
author: Sachin Setiya committer: Sachin Setiya timestamp: 2018-04-04 12:26:06 +0530 message: MDEV-15611 Due to the failure of foreign key detection, Galera... slave node killed himself. Problem:- If we try to delete table with foreign key and table whom it is referring with wsrep_slave_threads>1 then galera tries to execute both Delete_rows_log-event in parallel, which should not happen. Solution:- This is happening because we do not have foreign key info in write set. Upto version 10.2.7 it used to work fine. Actually it happening because of issue in commit2f342c4
. wsrep_must_process_fk should be used with negation.
30 lines
592 B
Text
30 lines
592 B
Text
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--connection node_1
|
|
CREATE TABLE t1 (
|
|
id int primary key
|
|
);
|
|
|
|
CREATE TABLE t2 (
|
|
id int primary key ,
|
|
f_id int DEFAULT NULL, FOREIGN KEY(f_id) REFERENCES t1 (id)
|
|
);
|
|
|
|
insert into t1 select 1;
|
|
|
|
--disable_query_log
|
|
--let $count=200
|
|
--echo #Running 200 insert in t2 table
|
|
while($count)
|
|
{
|
|
#Repeatedly execute the following SQL until you generate thousands of data
|
|
--eval insert into t2 values ($count, 1);
|
|
--dec $count
|
|
}
|
|
--enable_query_log
|
|
|
|
select count(*) from t2;
|
|
delete from t2;
|
|
delete from t1;
|
|
drop table t2,t1;
|