diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mysql_inc.h | 3 | ||||
| -rw-r--r-- | src/table_sizes.cc | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/mysql_inc.h b/src/mysql_inc.h index ca055ca..4912682 100644 --- a/src/mysql_inc.h +++ b/src/mysql_inc.h | |||
| @@ -5,7 +5,10 @@ | |||
| 5 | #define HAVE_CONFIG_H | 5 | #define HAVE_CONFIG_H |
| 6 | #endif | 6 | #endif |
| 7 | 7 | ||
| 8 | #ifndef MYSQL_DYNAMIC_PLUGIN | ||
| 8 | #define MYSQL_DYNAMIC_PLUGIN | 9 | #define MYSQL_DYNAMIC_PLUGIN |
| 10 | #endif | ||
| 11 | |||
| 9 | #define MYSQL_SERVER 1 | 12 | #define MYSQL_SERVER 1 |
| 10 | 13 | ||
| 11 | #include <mysql_version.h> | 14 | #include <mysql_version.h> |
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); |
