summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/table_sizes.cc13
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
62AC_PROG_CXX 62AC_PROG_CXX
63AC_PROG_CPP 63AC_PROG_CPP
64 64
65#we can add the following flags for better error catching: -Werror -Wimplicit 65#we can add the following flags for better error catching: -Werror
66CPPFLAGS="$CPPFLAGS -Werror -Wimplicit" 66CPPFLAGS="$CPPFLAGS -Werror"
67# From MySQL: Disable exceptions as they seams to create problems with gcc and threads. 67# From MySQL: Disable exceptions as they seams to create problems with gcc and threads.
68CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti" 68CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti"
69 69
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
26 bool wild_db_value, wild_table_value; 26 bool wild_db_value, wild_table_value;
27} LOOKUP_FIELD_VALUES; 27} LOOKUP_FIELD_VALUES;
28 28
29bool calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table, 29bool calc_lookup_values_from_cond(THD *thd, Item *cond, TABLE_LIST *table,
30 LOOKUP_FIELD_VALUES *lookup_field_vals); 30 LOOKUP_FIELD_VALUES *lookup_field_vals);
31 31
32/*----------------------------------------------------------------------------*/ 32/*----------------------------------------------------------------------------*/
@@ -99,7 +99,7 @@ find_tables(THD *thd, List<TABLE_DATA> *tables,
99 TABLE_DATA *table_data = NULL; 99 TABLE_DATA *table_data = NULL;
100 DBUG_ENTER("find_files"); 100 DBUG_ENTER("find_files");
101 101
102 bzero((char *)&table_list, sizeof(table_list)); 102 memset(&table_list, 0, sizeof(table_list));
103 103
104 if (!(dirp = my_dir(path, MYF(MY_WANT_STAT)))) 104 if (!(dirp = my_dir(path, MYF(MY_WANT_STAT))))
105 { 105 {
@@ -220,7 +220,7 @@ static ST_FIELD_INFO fields_info[] =
220 {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE} 220 {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
221}; 221};
222 222
223static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) 223static int fill_table(THD *thd, TABLE_LIST *tables, Item *cond)
224{ 224{
225 LEX *lex = thd->lex; 225 LEX *lex = thd->lex;
226 TABLE *table = tables->table; 226 TABLE *table = tables->table;
@@ -234,7 +234,7 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
234 234
235 DBUG_ENTER("fill_table"); 235 DBUG_ENTER("fill_table");
236 236
237 bzero((char *)&lookup_field_vals, sizeof(LOOKUP_FIELD_VALUES)); 237 memset(&lookup_field_vals, 0, sizeof(LOOKUP_FIELD_VALUES));
238 if (calc_lookup_values_from_cond(thd, cond, tables, &lookup_field_vals)) 238 if (calc_lookup_values_from_cond(thd, cond, tables, &lookup_field_vals))
239 { 239 {
240 error = 0; 240 error = 0;
@@ -298,7 +298,8 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
298 if ((check_access(thd, SELECT_ACL, db_name->str, &thd->col_access, NULL, 0, 1) 298 if ((check_access(thd, SELECT_ACL, db_name->str, &thd->col_access, NULL, 0, 1)
299 || (!thd->col_access && check_grant_db(thd, db_name->str))) 299 || (!thd->col_access && check_grant_db(thd, db_name->str)))
300 && !sctx->master_access & (DB_ACLS | SHOW_DB_ACL) 300 && !sctx->master_access & (DB_ACLS | SHOW_DB_ACL)
301 && !acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0)) 301 && !acl_get(sctx->get_host()->ptr(), sctx->get_ip()->ptr(),
302 sctx->priv_user, db_name->str, 0))
302 continue; 303 continue;
303#endif 304#endif
304 305
@@ -361,7 +362,7 @@ mysql_declare_plugin(table_sizes)
361 PLUGIN_LICENSE_GPL, /* license type */ 362 PLUGIN_LICENSE_GPL, /* license type */
362 init, /* init function */ 363 init, /* init function */
363 NULL, 364 NULL,
364 0x0010, /* version = 0.1 */ 365 0x0506, /* version = 5.6 */
365 NULL, /* no status variables */ 366 NULL, /* no status variables */
366 NULL, /* no system variables */ 367 NULL, /* no system variables */
367 NULL, /* no reserved information */ 368 NULL, /* no reserved information */