Navigation Menu

Skip to content

Commit

Permalink
Add handler::get_memory_buffer_size() availability check
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 10, 2018
1 parent 0c203a8 commit afe9cde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ha_mroonga.cpp
Expand Up @@ -13157,6 +13157,7 @@ bool ha_mroonga::get_foreign_dup_key(char *child_table_name,
DBUG_RETURN(success);
}

#ifdef MRN_HANDLER_HAVE_GET_MEMORY_BUFFER_SIZE
longlong ha_mroonga::wrapper_get_memory_buffer_size() const
{
MRN_DBUG_ENTER_METHOD();
Expand Down Expand Up @@ -13186,6 +13187,7 @@ longlong ha_mroonga::get_memory_buffer_size() const
}
DBUG_RETURN(size);
}
#endif

#ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
uint8 ha_mroonga::wrapper_table_cache_type()
Expand Down
8 changes: 8 additions & 0 deletions ha_mroonga.hpp
Expand Up @@ -376,6 +376,10 @@ typedef uint mrn_alter_table_flags;
# define MRN_HANDLER_HAVE_IS_INDEX_ALGORITHM_SUPPORTED
#endif

#if MYSQL_VERSION_ID >= 50631 && !defined(MRN_MARIADB_P)
# define MRN_HANDLER_HAVE_GET_MEMORY_BUFFER_SIZE
#endif

#if defined(HAVE_PSI_INTERFACE) && \
(MYSQL_VERSION_ID < 80002 || defined(MRN_MARIADB_P))
# define MRN_HAVE_PSI_SERVER
Expand Down Expand Up @@ -655,7 +659,9 @@ class ha_mroonga: public handler
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;
#ifdef MRN_HANDLER_HAVE_GET_MEMORY_BUFFER_SIZE
longlong get_memory_buffer_size() const mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
uint8 table_cache_type();
#endif
Expand Down Expand Up @@ -1326,8 +1332,10 @@ class ha_mroonga: public handler
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);
#ifdef MRN_HANDLER_HAVE_GET_MEMORY_BUFFER_SIZE
longlong wrapper_get_memory_buffer_size() const;
longlong storage_get_memory_buffer_size() const;
#endif
#ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE
uint8 wrapper_table_cache_type();
uint8 storage_table_cache_type();
Expand Down

0 comments on commit afe9cde

Please sign in to comment.