summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-06-12 17:38:15 +0200
committerunknown <serg@serg.mylan>2003-06-12 17:38:15 +0200
commit9f44a7baa3fa87c1981ecf662df79b976f3cf56c (patch)
treebbdec2cef31df31daa1f9fff98b8b17b0b83c7fa /sql/sql_parse.cc
parent99a0f20c6fdd233de489d1b5c9b7dced71937263 (diff)
downloadmariadb-git-9f44a7baa3fa87c1981ecf662df79b976f3cf56c.tar.gz
HANDLER priv check fixed
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 7447ba44e76..9524c832856 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2476,8 +2476,10 @@ mysql_execute_command(void)
res = mysql_ha_close(thd, tables);
break;
case SQLCOM_HA_READ:
- if (check_db_used(thd,tables) ||
- check_table_access(thd,SELECT_ACL, tables))
+ /* there is no need to check for table permissions here, because
+ if a user has no permissions to read a table, he won't be
+ able to open it (with SQLCOM_HA_OPEN) in the first place. */
+ if (check_db_used(thd,tables))
goto error;
res = mysql_ha_read(thd, tables, lex->ha_read_mode, lex->backup_dir,
lex->insert_list, lex->ha_rkey_mode, select_lex->where,