[Groonga-mysql-commit] mroonga/mroonga at 5d62460 [master] mysql8 wrapper: resolve TODO

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Aug 10 16:50:50 JST 2018


Kouhei Sutou	2018-08-10 16:50:50 +0900 (Fri, 10 Aug 2018)

  New Revision: 5d62460ed62bdfc74e4497c418d3c45f1ce47b1c
  https://github.com/mroonga/mroonga/commit/5d62460ed62bdfc74e4497c418d3c45f1ce47b1c

  Message:
    mysql8 wrapper: resolve TODO

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+5 -16)
===================================================================
--- ha_mroonga.cpp    2018-08-10 16:34:37 +0900 (76c6b823)
+++ ha_mroonga.cpp    2018-08-10 16:50:50 +0900 (726aaaf1)
@@ -14089,13 +14089,9 @@ ha_rows ha_mroonga::estimate_rows_upper_bound()
 #ifdef MRN_HANDLER_HAVE_GET_DEFAULT_INDEX_ALGORITHM
 enum ha_key_alg ha_mroonga::wrapper_get_default_index_algorithm() const
 {
-  enum ha_key_alg algorithm;
   MRN_DBUG_ENTER_METHOD();
-  MRN_SET_WRAP_SHARE_KEY(share, table->s);
-  MRN_SET_WRAP_TABLE_KEY(this, table);
-  algorithm = wrap_handler->get_default_index_algorithm();
-  MRN_SET_BASE_SHARE_KEY(share, table->s);
-  MRN_SET_BASE_TABLE_KEY(this, table);
+  enum ha_key_alg algorithm =
+    wrap_handler_for_create->get_default_index_algorithm();
   DBUG_RETURN(algorithm);
 }
 
@@ -14110,8 +14106,7 @@ enum ha_key_alg ha_mroonga::get_default_index_algorithm() const
 {
   MRN_DBUG_ENTER_METHOD();
   enum ha_key_alg algorithm;
-  // TODO: share isn't initialized yet.
-  if (share && share->wrapper_mode) {
+  if (wrap_handler_for_create) {
     algorithm = wrapper_get_default_index_algorithm();
   } else {
     algorithm = storage_get_default_index_algorithm();
@@ -14123,13 +14118,8 @@ enum ha_key_alg ha_mroonga::get_default_index_algorithm() const
 #ifdef MRN_HANDLER_HAVE_IS_INDEX_ALGORITHM_SUPPORTED
 bool ha_mroonga::wrapper_is_index_algorithm_supported(enum ha_key_alg algorithm) const
 {
-  bool supported;
   MRN_DBUG_ENTER_METHOD();
-  MRN_SET_WRAP_SHARE_KEY(share, table->s);
-  MRN_SET_WRAP_TABLE_KEY(this, table);
-  supported = wrap_handler->is_index_algorithm_supported(algorithm);
-  MRN_SET_BASE_SHARE_KEY(share, table->s);
-  MRN_SET_BASE_TABLE_KEY(this, table);
+  bool supported = wrap_handler_for_create->is_index_algorithm_supported(algorithm);
   DBUG_RETURN(supported);
 }
 
@@ -14144,8 +14134,7 @@ bool ha_mroonga::is_index_algorithm_supported(enum ha_key_alg algorithm) const
 {
   MRN_DBUG_ENTER_METHOD();
   bool supported;
-  // TODO: share isn't initialized yet.
-  if (share && share->wrapper_mode) {
+  if (wrap_handler_for_create) {
     supported = wrapper_is_index_algorithm_supported(algorithm);
   } else {
     supported = storage_is_index_algorithm_supported(algorithm);
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180810/b1a5ada5/attachment-0001.htm 



More information about the Groonga-mysql-commit mailing list
Back to archive index