summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-05-18 14:30:54 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2002-05-18 14:30:54 +0300
commitd30409959ea71aed0e04b04c18573ba1e1c163a6 (patch)
treea3d79483f9645d2353acbec767e54f1119a34740 /sql
parent23283a5b93a9d851451df33d22463107401bc461 (diff)
downloadmariadb-git-d30409959ea71aed0e04b04c18573ba1e1c163a6.tar.gz
Fixing that database privileges are also taken into account.
Before this change LOCK TABLES worked only with global and table level privileges.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index af68c1bb9f3..3ffc5edc69f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2223,7 +2223,8 @@ mysql_execute_command(void)
}
if (check_db_used(thd,tables) || end_active_trans(thd))
goto error;
- if (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables))
+ if (check_table_access(thd, SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL , tables)
+ || (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables)))
goto error;
thd->in_lock_tables=1;
thd->options|= OPTION_TABLE_LOCK;