Commit 36aae14f authored by serg@serg.mylan's avatar serg@serg.mylan

HANDLER priv check fixed

parent 4302bfdb
...@@ -2476,8 +2476,10 @@ mysql_execute_command(void) ...@@ -2476,8 +2476,10 @@ mysql_execute_command(void)
res = mysql_ha_close(thd, tables); res = mysql_ha_close(thd, tables);
break; break;
case SQLCOM_HA_READ: case SQLCOM_HA_READ:
if (check_db_used(thd,tables) || /* there is no need to check for table permissions here, because
check_table_access(thd,SELECT_ACL, tables)) 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; goto error;
res = mysql_ha_read(thd, tables, lex->ha_read_mode, lex->backup_dir, res = mysql_ha_read(thd, tables, lex->ha_read_mode, lex->backup_dir,
lex->insert_list, lex->ha_rkey_mode, select_lex->where, lex->insert_list, lex->ha_rkey_mode, select_lex->where,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment