diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-03-16 12:15:51 +0400 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-03-16 12:15:51 +0400 |
commit | a51b7686000d01d488617b59f543b0cff5e223bb (patch) | |
tree | e73d5f2892a4f07c1cff856f7f8bd812f9f9ff33 /sql/sql_acl.cc | |
parent | c6ab94bdf17340a57ec1f4575c644f27117b11cf (diff) | |
download | mariadb-git-a51b7686000d01d488617b59f543b0cff5e223bb.tar.gz |
Bug#26285 selecting information_schema crahes server
The crash happens when 'skip-grant-tables' is enabled.
We skip the filling of I_S privilege tables
if acl_cache is not initialized.
mysql-test/r/skip_grants.result:
test result
mysql-test/t/skip_grants.test:
test case
sql/sql_acl.cc:
skip filling of I_S privilege tables
if acl_cache is not initialized
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 298fb61d5f0..ee15f95f305 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -5882,6 +5882,8 @@ int fill_schema_user_privileges(THD *thd, TABLE_LIST *tables, COND *cond) char *curr_host= thd->security_ctx->priv_host_name(); DBUG_ENTER("fill_schema_user_privileges"); + if (!initialized) + DBUG_RETURN(0); pthread_mutex_lock(&acl_cache->lock); for (counter=0 ; counter < acl_users.elements ; counter++) @@ -5941,6 +5943,8 @@ int fill_schema_schema_privileges(THD *thd, TABLE_LIST *tables, COND *cond) char *curr_host= thd->security_ctx->priv_host_name(); DBUG_ENTER("fill_schema_schema_privileges"); + if (!initialized) + DBUG_RETURN(0); pthread_mutex_lock(&acl_cache->lock); for (counter=0 ; counter < acl_dbs.elements ; counter++) |