From 7a6be06066e4377e39eca5fb8b6ba66240fca707 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 17 Apr 2014 16:17:49 +0200 Subject: fixes for mysql 5.6 --- configure.ac | 4 ++-- src/table_sizes.cc | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 86fda3a..5e655dc 100644 --- a/configure.ac +++ b/configure.ac @@ -62,8 +62,8 @@ AC_PROG_LIBTOOL AC_PROG_CXX AC_PROG_CPP -#we can add the following flags for better error catching: -Werror -Wimplicit -CPPFLAGS="$CPPFLAGS -Werror -Wimplicit" +#we can add the following flags for better error catching: -Werror +CPPFLAGS="$CPPFLAGS -Werror" # From MySQL: Disable exceptions as they seams to create problems with gcc and threads. CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti" diff --git a/src/table_sizes.cc b/src/table_sizes.cc index bfa0106..0dcee37 100644 --- a/src/table_sizes.cc +++ b/src/table_sizes.cc @@ -26,7 +26,7 @@ typedef struct st_lookup_field_values bool wild_db_value, wild_table_value; } LOOKUP_FIELD_VALUES; -bool calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table, +bool calc_lookup_values_from_cond(THD *thd, Item *cond, TABLE_LIST *table, LOOKUP_FIELD_VALUES *lookup_field_vals); /*----------------------------------------------------------------------------*/ @@ -99,7 +99,7 @@ find_tables(THD *thd, List *tables, TABLE_DATA *table_data = NULL; DBUG_ENTER("find_files"); - bzero((char *)&table_list, sizeof(table_list)); + memset(&table_list, 0, sizeof(table_list)); if (!(dirp = my_dir(path, MYF(MY_WANT_STAT)))) { @@ -220,7 +220,7 @@ static ST_FIELD_INFO fields_info[] = {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE} }; -static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) +static int fill_table(THD *thd, TABLE_LIST *tables, Item *cond) { LEX *lex = thd->lex; TABLE *table = tables->table; @@ -234,7 +234,7 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_ENTER("fill_table"); - bzero((char *)&lookup_field_vals, sizeof(LOOKUP_FIELD_VALUES)); + memset(&lookup_field_vals, 0, sizeof(LOOKUP_FIELD_VALUES)); if (calc_lookup_values_from_cond(thd, cond, tables, &lookup_field_vals)) { error = 0; @@ -298,7 +298,8 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) if ((check_access(thd, SELECT_ACL, db_name->str, &thd->col_access, NULL, 0, 1) || (!thd->col_access && check_grant_db(thd, db_name->str))) && !sctx->master_access & (DB_ACLS | SHOW_DB_ACL) - && !acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0)) + && !acl_get(sctx->get_host()->ptr(), sctx->get_ip()->ptr(), + sctx->priv_user, db_name->str, 0)) continue; #endif @@ -361,7 +362,7 @@ mysql_declare_plugin(table_sizes) PLUGIN_LICENSE_GPL, /* license type */ init, /* init function */ NULL, - 0x0010, /* version = 0.1 */ + 0x0506, /* version = 5.6 */ NULL, /* no status variables */ NULL, /* no system variables */ NULL, /* no reserved information */ -- cgit v1.2.3