Navigation Menu

Skip to content

Commit

Permalink
mysql57: follow calculate_key_len() API change
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 16, 2015
1 parent 5f7fa8b commit ff1b082
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ha_mroonga.cpp
Expand Up @@ -197,6 +197,14 @@ static mysql_mutex_t *mrn_LOCK_open;
# define MRN_KEYTYPE_FOREIGN Key::FOREIGN_KEY
#endif

#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)
# define mrn_calculate_key_len(table, key_index, buffer, keypart_map) \
calculate_key_len(table, key_index, keypart_map)
#else
# define mrn_calculate_key_len(table, key_index, buffer, keypart_map) \
calculate_key_len(table, key_index, buffer, keypart_map)
#endif

Rpl_filter *mrn_binlog_filter;
Time_zone *mrn_my_tz_UTC;
#ifdef MRN_HAVE_TABLE_DEF_CACHE
Expand Down Expand Up @@ -6928,7 +6936,8 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key,
bool is_multiple_column_index = KEY_N_KEY_PARTS(&key_info) > 1;
if (is_multiple_column_index) {
mrn_change_encoding(ctx, NULL);
uint key_length = calculate_key_len(table, active_index, key, keypart_map);
uint key_length =
mrn_calculate_key_len(table, active_index, key, keypart_map);
DBUG_PRINT("info",
("mroonga: multiple column index: "
"search key length=<%u>, "
Expand Down Expand Up @@ -7132,7 +7141,8 @@ int ha_mroonga::storage_index_read_last_map(uchar *buf, const uchar *key,
if (is_multiple_column_index) {
mrn_change_encoding(ctx, NULL);
flags |= GRN_CURSOR_PREFIX;
uint key_length = calculate_key_len(table, active_index, key, keypart_map);
uint key_length =
mrn_calculate_key_len(table, active_index, key, keypart_map);
key_min = key_min_entity;
storage_encode_multiple_column_key(&key_info,
key, key_length,
Expand Down

0 comments on commit ff1b082

Please sign in to comment.