[Groonga-mysql-commit] mroonga/mroonga at 55889d5 [master] Wrap handler::get_memory_buffer_size()

Back to archive index

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


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

  New Revision: 55889d5e86f5a34e391546187d5035d3aea87615
  https://github.com/mroonga/mroonga/commit/55889d5e86f5a34e391546187d5035d3aea87615

  Message:
    Wrap handler::get_memory_buffer_size()

  Modified files:
    ha_mroonga.cpp
    ha_mroonga.hpp

  Modified: ha_mroonga.cpp (+30 -0)
===================================================================
--- ha_mroonga.cpp    2018-08-10 16:22:46 +0900 (6fb1ce9c)
+++ ha_mroonga.cpp    2018-08-10 16:26:21 +0900 (8652dd82)
@@ -13157,6 +13157,36 @@ bool ha_mroonga::get_foreign_dup_key(char *child_table_name,
   DBUG_RETURN(success);
 }
 
+longlong ha_mroonga::wrapper_get_memory_buffer_size() const
+{
+  MRN_DBUG_ENTER_METHOD();
+  MRN_SET_WRAP_SHARE_KEY(share, table->s);
+  MRN_SET_WRAP_TABLE_KEY(this, table);
+  longlong size = wrap_handler->get_memory_buffer_size();
+  MRN_SET_BASE_SHARE_KEY(share, table->s);
+  MRN_SET_BASE_TABLE_KEY(this, table);
+  DBUG_RETURN(size);
+}
+
+longlong ha_mroonga::storage_get_memory_buffer_size() const
+{
+  MRN_DBUG_ENTER_METHOD();
+  longlong size = handler::get_memory_buffer_size();
+  DBUG_RETURN(size);
+}
+
+longlong ha_mroonga::get_memory_buffer_size() const
+{
+  MRN_DBUG_ENTER_METHOD();
+  longlong size;
+  if (share && share->wrapper_mode) {
+    size = wrapper_get_memory_buffer_size();
+  } else {
+    size = storage_get_memory_buffer_size();
+  }
+  DBUG_RETURN(size);
+}
+
 #ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
 uint8 ha_mroonga::wrapper_table_cache_type()
 {

  Modified: ha_mroonga.hpp (+3 -0)
===================================================================
--- ha_mroonga.hpp    2018-08-10 16:22:46 +0900 (b0aef53c)
+++ ha_mroonga.hpp    2018-08-10 16:26:21 +0900 (6e12d9de)
@@ -655,6 +655,7 @@ public:
   void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share_arg) mrn_override;
   double scan_time() mrn_override;
   double read_time(uint index, uint ranges, ha_rows rows) mrn_override;
+  longlong get_memory_buffer_size() const mrn_override;
 #ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
   uint8 table_cache_type();
 #endif
@@ -1325,6 +1326,8 @@ private:
   double storage_scan_time();
   double wrapper_read_time(uint index, uint ranges, ha_rows rows);
   double storage_read_time(uint index, uint ranges, ha_rows rows);
+  longlong wrapper_get_memory_buffer_size() const;
+  longlong storage_get_memory_buffer_size() const;
 #ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
   uint8 wrapper_table_cache_type();
   uint8 storage_table_cache_type();
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180810/0239fd2d/attachment-0001.htm 



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