Navigation Menu

Skip to content

Commit

Permalink
mariadb10.3: follow init_alloc_root() API change
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 27, 2018
1 parent c171f92 commit ebc368c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ha_mroonga.cpp
Expand Up @@ -3280,7 +3280,7 @@ int ha_mroonga::create_share_for_create() const
}
}
}
mrn_init_alloc_root(&mem_root_for_create, 1024, 0, MYF(0));
mrn_init_alloc_root(&mem_root_for_create, "mroonga::create", 1024, 0, MYF(0));
analyzed_for_create = true;
if (table_list) {
share_for_create.table_name = mrn_my_strndup(table_list->table_name,
Expand Down Expand Up @@ -4558,7 +4558,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options)
}
}

mrn_init_alloc_root(&mem_root, 1024, 0, MYF(0));
mrn_init_alloc_root(&mem_root, "mroonga::wrapper", 1024, 0, MYF(0));
wrap_key_info = mrn_create_key_info_for_table(share, table, &error);
if (error)
DBUG_RETURN(error);
Expand Down
11 changes: 7 additions & 4 deletions mrn_mysql_compat.h
Expand Up @@ -164,14 +164,17 @@
typedef MYSQL_LEX_STRING mrn_thd_lex_string;
#endif

#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000
# define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100306
# define mrn_init_alloc_root(PTR, NAME, SZ1, SZ2, FLAG) \
init_alloc_root(PTR, NAME, SZ1, SZ2, FLAG)
#elif defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000
# define mrn_init_alloc_root(PTR, NAME, SZ1, SZ2, FLAG) \
init_alloc_root(PTR, SZ1, SZ2, FLAG)
#elif MYSQL_VERSION_ID >= 50706
# define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
# define mrn_init_alloc_root(PTR, NAME, SZ1, SZ2, FLAG) \
init_alloc_root(mrn_memory_key, PTR, SZ1, SZ2)
#else
# define mrn_init_alloc_root(PTR, SZ1, SZ2, FLAG) \
# define mrn_init_alloc_root(PTR, NAME, SZ1, SZ2, FLAG) \
init_alloc_root(PTR, SZ1, SZ2)
#endif

Expand Down

0 comments on commit ebc368c

Please sign in to comment.