summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-05-08 00:12:46 +0300
committerunknown <monty@mashka.mysql.fi>2003-05-08 00:12:46 +0300
commit97eef79b023c6210e3aea69a750383b2db748c68 (patch)
tree60b20adcf362b4f6c7b1eca99610284503335375 /sql/sql_acl.cc
parent4d91444b15a9d156875b4ba7df2efc301e10845b (diff)
parenta57e7732897ee7973d82dccea0425c436845066a (diff)
downloadmariadb-git-97eef79b023c6210e3aea69a750383b2db748c68.tar.gz
Merge to get security patch
BitKeeper/etc/logging_ok: auto-union sql/sql_acl.cc: Auto merged tests/grant.pl: Auto merged tests/grant.res: Auto merged BitKeeper/triggers/post-commit: use local file client/mysqldump.c: Merge to get crash fix
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 3332e596146..f01248bb682 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2520,8 +2520,8 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
}
-bool check_grant_column (THD *thd,TABLE *table, const char *name,
- uint length, uint show_tables)
+bool check_grant_column(THD *thd,TABLE *table, const char *name,
+ uint length, uint show_tables)
{
GRANT_TABLE *grant_table;
GRANT_COLUMN *grant_column;
@@ -2529,6 +2529,8 @@ bool check_grant_column (THD *thd,TABLE *table, const char *name,
ulong want_access=table->grant.want_privilege;
if (!want_access)
return 0; // Already checked
+ if (!grant_option)
+ goto err2;
pthread_mutex_lock(&LOCK_grant);
@@ -2560,8 +2562,9 @@ bool check_grant_column (THD *thd,TABLE *table, const char *name,
#endif
/* We must use my_printf_error() here! */
- err:
+err:
pthread_mutex_unlock(&LOCK_grant);
+err2:
if (!show_tables)
{
char command[128];