summaryrefslogtreecommitdiffstats
path: root/src/table_sizes.cc
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-03-07 15:12:57 +0100
committermanuel <manuel@mausz.at>2013-03-07 15:12:57 +0100
commitaf214790e552310a254ee212df29e8d83f0427a1 (patch)
treecd8849c81838426163f71d3ebf85efb0513cc68e /src/table_sizes.cc
parent0446f4e8d07db72649fbff720367945950c017b7 (diff)
downloadmysql-table_sizes-af214790e552310a254ee212df29e8d83f0427a1.tar.gz
mysql-table_sizes-af214790e552310a254ee212df29e8d83f0427a1.tar.bz2
mysql-table_sizes-af214790e552310a254ee212df29e8d83f0427a1.zip
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!
Diffstat (limited to 'src/table_sizes.cc')
-rw-r--r--src/table_sizes.cc14
1 files changed, 8 insertions, 6 deletions
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 @@
13 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 13 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14*/ 14*/
15#include "mysql_inc.h" 15#include "mysql_inc.h"
16#include <sql/sql_show.h> 16#include <sql_show.h>
17#include <sql/sql_table.h> 17#include <sql_table.h>
18#include <sql/sql_parse.h> 18#include <sql_parse.h>
19#include <sql/sql_db.h> 19#include <sql_db.h>
20 20
21#define STR_OR_NIL(S) ((S) ? (S) : "<nil>") 21#define STR_OR_NIL(S) ((S) ? (S) : "<nil>")
22 22
@@ -292,13 +292,15 @@ static int fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
292 goto err; 292 goto err;
293 293
294 LEX_STRING *db_name; 294 LEX_STRING *db_name;
295 while (db_name = it++) 295 while ((db_name = it++))
296 { 296 {
297#ifndef NO_EMBEDDED_ACCESS_CHECKS
297 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)
298 || (!thd->col_access && check_grant_db(thd, db_name->str))) 299 || (!thd->col_access && check_grant_db(thd, db_name->str)))
299 && !sctx->master_access & (DB_ACLS | SHOW_DB_ACL) 300 && !sctx->master_access & (DB_ACLS | SHOW_DB_ACL)
300 && !acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0)) 301 && !acl_get(sctx->host, sctx->ip, sctx->priv_user, db_name->str, 0))
301 continue; 302 continue;
303#endif
302 304
303 List<TABLE_DATA> tables; 305 List<TABLE_DATA> tables;
304 int res = make_table_list(thd, &tables, lex, db_name); 306 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)
312 314
313 TABLE_DATA *table_data; 315 TABLE_DATA *table_data;
314 List_iterator_fast<TABLE_DATA> it_tables(tables); 316 List_iterator_fast<TABLE_DATA> it_tables(tables);
315 while (table_data = it_tables++) 317 while ((table_data = it_tables++))
316 { 318 {
317 table->field[0]->store(db_name->str, db_name->length, 319 table->field[0]->store(db_name->str, db_name->length,
318 system_charset_info); 320 system_charset_info);