diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-15 15:24:56 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-15 15:24:56 +0300 |
commit | 1a9bf29e9956ccd113d87f8ffe82781d6515ff61 (patch) | |
tree | ab4e03c4854b65e0c557a84b43f16c9f5928a876 /sql/sql_acl.cc | |
parent | c97fb8f37a48340af4d69e170682f4e2f843d771 (diff) | |
download | mariadb-git-1a9bf29e9956ccd113d87f8ffe82781d6515ff61.tar.gz |
Fixed bug in --safe-create-user
Docs/manual.texi:
Changelog
isam/_dbug.c:
Cleanup
sql/mysqld.cc:
Cleanup
sql/net_serv.cc:
Cleanup
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 798cd78cab1..835b873aee6 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1613,6 +1613,7 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list, List_iterator <LEX_USER> str_list (user_list); LEX_USER *Str; TABLE_LIST tables[3]; + bool create_new_users=0; DBUG_ENTER("mysql_table_grant"); if (!initialized) @@ -1680,6 +1681,8 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list, DBUG_RETURN(-1); /* purecov: deadcode */ } + if (!revoke_grant) + create_new_users= test_if_create_new_users(thd); int result=0; pthread_mutex_lock(&LOCK_grant); MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC); @@ -1705,8 +1708,7 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list, *Str, 0, revoke_grant ? 'N' : 'Y', - (revoke_grant ? 0 : - test_if_create_new_users(thd)))) + create_new_users)) { result= -1; // Remember error continue; // Add next user |