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) 2017, 2018, MariaDB Corporation.
Copyright (c) 2017, 2019, MariaDB Corporation.
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
......@@ -1643,16 +1643,14 @@ row_ins_check_foreign_constraint(
}
if (check_ref) {
#ifdef WITH_WSREP
enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
#endif WITH_WSREP
err = DB_SUCCESS;
#ifdef WITH_WSREP
enum wsrep_key_type key_type;
if (upd_node != NULL) {
key_type = WSREP_KEY_SHARED;
} else {
switch (wsrep_certification_rules) {
default:
case WSREP_CERTIFICATION_RULES_STRICT:
key_type = WSREP_KEY_EXCLUSIVE;
break;
......@@ -1669,8 +1667,7 @@ row_ins_check_foreign_constraint(
check_index,
check_ref,
key_type);
#endif /* WITH_WSREP */
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE
......
......@@ -1655,16 +1655,14 @@ row_ins_check_foreign_constraint(
}
if (check_ref) {
#ifdef WITH_WSREP
enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
#endif /* WITH_WSREP */
err = DB_SUCCESS;
#ifdef WITH_WSREP
enum wsrep_key_type key_type;
if (upd_node != NULL) {
key_type = WSREP_KEY_SHARED;
} else {
switch (wsrep_certification_rules) {
default:
case WSREP_CERTIFICATION_RULES_STRICT:
key_type = WSREP_KEY_EXCLUSIVE;
break;
......@@ -1681,8 +1679,7 @@ row_ins_check_foreign_constraint(
check_index,
check_ref,
key_type);
#endif /* WITH_WSREP */
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {
/* 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