From af214790e552310a254ee212df29e8d83f0427a1 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 7 Mar 2013 15:12:57 +0100 Subject: fix a couple of compilation errors and warnings * fix compilation via cmake * fix minor compiler warnings * add --enable-fast-mutexes to compile with fast mutexes support. the plugin will crash if server and plugin do not match! --- src/table_sizes.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/table_sizes.cc') diff --git a/src/table_sizes.cc b/src/table_sizes.cc index b1fd8b0..bfa0106 100644 --- a/src/table_sizes.cc +++ b/src/table_sizes.cc @@ -13,10 +13,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "mysql_inc.h" -#include -#include -#include -#include +#include +#include +#include +#include #define STR_OR_NIL(S) ((S) ? (S) : "") @@ -292,13 +292,15 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) goto err; LEX_STRING *db_name; - while (db_name = it++) + while ((db_name = it++)) { +#ifndef NO_EMBEDDED_ACCESS_CHECKS 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)) continue; +#endif List tables; int res = make_table_list(thd, &tables, lex, db_name); @@ -312,7 +314,7 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond) TABLE_DATA *table_data; List_iterator_fast it_tables(tables); - while (table_data = it_tables++) + while ((table_data = it_tables++)) { table->field[0]->store(db_name->str, db_name->length, system_charset_info); -- cgit v1.2.3