Commit 4bf08798 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix the WSREP build

parent 3894fdd4
...@@ -197,6 +197,4 @@ f1 f2 ...@@ -197,6 +197,4 @@ f1 f2
1 2 1 2
SELECT * FROM c; SELECT * FROM c;
f1 p1_id p2_id f2 f1 p1_id p2_id f2
DROP TABLE c; DROP TABLE c,p1,p2;
DROP TABLE p1;
DROP TABLE p2;
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug_sync.inc
--source suite/galera/include/galera_have_debug_sync.inc --source suite/galera/include/galera_have_debug_sync.inc
# #
...@@ -19,7 +18,6 @@ ...@@ -19,7 +18,6 @@
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE);
INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0); INSERT INTO p VALUES (2, 0);
...@@ -179,6 +177,4 @@ SELECT * FROM p1; ...@@ -179,6 +177,4 @@ SELECT * FROM p1;
SELECT * FROM p2; SELECT * FROM p2;
SELECT * FROM c; SELECT * FROM c;
DROP TABLE c; DROP TABLE c,p1,p2;
DROP TABLE p1;
DROP TABLE p2;
\ No newline at end of file
...@@ -2433,17 +2433,15 @@ row_upd_sec_index_entry( ...@@ -2433,17 +2433,15 @@ row_upd_sec_index_entry(
row_ins_sec_index_entry() below */ row_ins_sec_index_entry() below */
if (!rec_get_deleted_flag( if (!rec_get_deleted_flag(
rec, dict_table_is_comp(index->table))) { rec, dict_table_is_comp(index->table))) {
err = btr_cur_del_mark_set_sec_rec( err = btr_cur_del_mark_set_sec_rec(
flags, btr_cur, TRUE, thr, &mtr); flags, btr_cur, TRUE, thr, &mtr);
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
break; break;
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (!referenced && foreign if (!referenced && foreign
wsrep_must_process_fk(node, trx) && && wsrep_must_process_fk(node, trx)
!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { && !wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
ulint* offsets = rec_get_offsets( ulint* offsets = rec_get_offsets(
rec, index, NULL, ULINT_UNDEFINED, rec, index, NULL, ULINT_UNDEFINED,
...@@ -2750,13 +2748,10 @@ row_upd_clust_rec_by_insert( ...@@ -2750,13 +2748,10 @@ row_upd_clust_rec_by_insert(
goto err_exit; goto err_exit;
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
} else if (foreign && } else if (foreign && wsrep_must_process_fk(node, trx)) {
wsrep_must_process_fk(node, trx)) {
err = wsrep_row_upd_check_foreign_constraints( err = wsrep_row_upd_check_foreign_constraints(
node, pcur, table, index, offsets, thr, mtr); node, pcur, table, index, offsets, thr, mtr);
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_NO_REFERENCED_ROW: case DB_NO_REFERENCED_ROW:
...@@ -2768,16 +2763,11 @@ row_upd_clust_rec_by_insert( ...@@ -2768,16 +2763,11 @@ row_upd_clust_rec_by_insert(
<< " index " << index->name << " index " << index->name
<< " table " << index->table->name; << " table " << index->table->name;
} }
break; goto err_exit;
default: default:
ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err)
<< " index " << index->name << " index " << index->name
<< " table " << index->table->name; << " table " << index->table->name;
break;
}
if (err != DB_SUCCESS) {
goto err_exit; goto err_exit;
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
...@@ -2994,9 +2984,7 @@ row_upd_del_mark_clust_rec( ...@@ -2994,9 +2984,7 @@ row_upd_del_mark_clust_rec(
err = row_upd_check_references_constraints( err = row_upd_check_references_constraints(
node, pcur, index->table, index, offsets, thr, mtr); node, pcur, index->table, index, offsets, thr, mtr);
#ifdef WITH_WSREP #ifdef WITH_WSREP
} else if (trx && } else if (foreign && wsrep_must_process_fk(node, trx)) {
wsrep_must_process_fk(node, trx)) {
err = wsrep_row_upd_check_foreign_constraints( err = wsrep_row_upd_check_foreign_constraints(
node, pcur, index->table, index, offsets, thr, mtr); node, pcur, index->table, index, offsets, thr, mtr);
......
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