diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2020-01-24 00:44:48 +0400 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-03-24 20:47:41 +0200 |
commit | da82e75901644b0f9ea25b526e13b4db1c9c8e63 (patch) | |
tree | e5a03f17f61b65de06b21f6e1de3b9f7851f9195 /storage/mroonga | |
parent | bff79492c5f6c9669b9dc9bf2cf0483b3b001da7 (diff) | |
download | mariadb-git-da82e75901644b0f9ea25b526e13b4db1c9c8e63.tar.gz |
handler::rebind()
- rename PFS specific rebind_psi() to generic rebind()
- call rebind independently of PFS compilation status
- allow rebind() return an error
Diffstat (limited to 'storage/mroonga')
-rw-r--r-- | storage/mroonga/ha_mroonga.cpp | 23 | ||||
-rw-r--r-- | storage/mroonga/ha_mroonga.hpp | 6 |
2 files changed, 17 insertions, 12 deletions
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 5cdf062922b..d2a83dffaaf 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -17023,34 +17023,39 @@ void ha_mroonga::unbind_psi() DBUG_VOID_RETURN; } -void ha_mroonga::wrapper_rebind_psi() +int ha_mroonga::wrapper_rebind() { MRN_DBUG_ENTER_METHOD(); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); - wrap_handler->rebind_psi(); + int error= wrap_handler->rebind(); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_VOID_RETURN; + DBUG_RETURN(error); } -void ha_mroonga::storage_rebind_psi() +void ha_mroonga::storage_rebind() { MRN_DBUG_ENTER_METHOD(); DBUG_VOID_RETURN; } -void ha_mroonga::rebind_psi() +int ha_mroonga::rebind() { MRN_DBUG_ENTER_METHOD(); - handler::rebind_psi(); + if (int error= handler::rebind()) + DBUG_RETURN(error); if (share->wrapper_mode) { - wrapper_rebind_psi(); + if (int error= wrapper_rebind()) + { + handler::unbind_psi(); + DBUG_RETURN(error); + } } else { - storage_rebind_psi(); + storage_rebind(); } - DBUG_VOID_RETURN; + DBUG_RETURN(0); } #endif diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 4e3f4bec17c..632e45dab12 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -631,7 +631,7 @@ protected: void free_foreign_key_create_info(char* str) mrn_override; #ifdef MRN_HAVE_HA_REBIND_PSI void unbind_psi() mrn_override; - void rebind_psi() mrn_override; + int rebind() mrn_override; #endif my_bool register_query_cache_table(THD *thd, const char *table_key, @@ -1290,8 +1290,8 @@ private: #ifdef MRN_HAVE_HA_REBIND_PSI void wrapper_unbind_psi(); void storage_unbind_psi(); - void wrapper_rebind_psi(); - void storage_rebind_psi(); + int wrapper_rebind(); + void storage_rebind(); #endif my_bool wrapper_register_query_cache_table(THD *thd, const char *table_key, |