Commit 6051842c authored by Marko Mäkelä's avatar Marko Mäkelä

Minor clean-up

parent a3a4ea93
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2018, MariaDB Corporation. Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -1643,16 +1643,14 @@ row_ins_check_foreign_constraint( ...@@ -1643,16 +1643,14 @@ row_ins_check_foreign_constraint(
} }
if (check_ref) { if (check_ref) {
#ifdef WITH_WSREP
enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
#endif WITH_WSREP
err = DB_SUCCESS; err = DB_SUCCESS;
#ifdef WITH_WSREP #ifdef WITH_WSREP
enum wsrep_key_type key_type;
if (upd_node != NULL) { if (upd_node != NULL) {
key_type = WSREP_KEY_SHARED; key_type = WSREP_KEY_SHARED;
} else { } else {
switch (wsrep_certification_rules) { switch (wsrep_certification_rules) {
default:
case WSREP_CERTIFICATION_RULES_STRICT: case WSREP_CERTIFICATION_RULES_STRICT:
key_type = WSREP_KEY_EXCLUSIVE; key_type = WSREP_KEY_EXCLUSIVE;
break; break;
...@@ -1669,8 +1667,7 @@ row_ins_check_foreign_constraint( ...@@ -1669,8 +1667,7 @@ row_ins_check_foreign_constraint(
check_index, check_index,
check_ref, check_ref,
key_type); key_type);
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
goto end_scan; goto end_scan;
} else if (foreign->type != 0) { } else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE /* There is an ON UPDATE or ON DELETE
......
...@@ -1655,16 +1655,14 @@ row_ins_check_foreign_constraint( ...@@ -1655,16 +1655,14 @@ row_ins_check_foreign_constraint(
} }
if (check_ref) { if (check_ref) {
#ifdef WITH_WSREP
enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
#endif /* WITH_WSREP */
err = DB_SUCCESS; err = DB_SUCCESS;
#ifdef WITH_WSREP #ifdef WITH_WSREP
enum wsrep_key_type key_type;
if (upd_node != NULL) { if (upd_node != NULL) {
key_type = WSREP_KEY_SHARED; key_type = WSREP_KEY_SHARED;
} else { } else {
switch (wsrep_certification_rules) { switch (wsrep_certification_rules) {
default:
case WSREP_CERTIFICATION_RULES_STRICT: case WSREP_CERTIFICATION_RULES_STRICT:
key_type = WSREP_KEY_EXCLUSIVE; key_type = WSREP_KEY_EXCLUSIVE;
break; break;
...@@ -1681,8 +1679,7 @@ row_ins_check_foreign_constraint( ...@@ -1681,8 +1679,7 @@ row_ins_check_foreign_constraint(
check_index, check_index,
check_ref, check_ref,
key_type); key_type);
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
goto end_scan; goto end_scan;
} else if (foreign->type != 0) { } else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE /* There is an ON UPDATE or ON DELETE
......
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