diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-02-01 09:13:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-02-01 09:13:18 +0200 |
commit | 6051842cd0b2bdf584e630f89d4fdec42c56908f (patch) | |
tree | bc5b2961088da815e96be9084f879360e57b00a1 /storage | |
parent | a3a4ea935541bbe4b44a51d7f808119702e35841 (diff) | |
download | mariadb-git-6051842cd0b2bdf584e630f89d4fdec42c56908f.tar.gz |
Minor clean-up
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0ins.cc | 11 | ||||
-rw-r--r-- | storage/xtradb/row/row0ins.cc | 9 |
2 files changed, 7 insertions, 13 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index c031c38163e..22588d33418 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1,7 +1,7 @@ /***************************************************************************** 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 @@ run_again: } 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 @@ run_again: 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 diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc index f146d1f68b1..b14d43e4f42 100644 --- a/storage/xtradb/row/row0ins.cc +++ b/storage/xtradb/row/row0ins.cc @@ -1655,16 +1655,14 @@ run_again: } 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 @@ run_again: 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 |