diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 75876dbf7e5..fdc260fa03e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -123,7 +123,6 @@ static void sql_kill(THD *thd, ulong id, killed_state state); static void sql_kill_user(THD *thd, LEX_USER *user, killed_state state); static bool execute_show_status(THD *, TABLE_LIST *); static bool execute_rename_table(THD *, TABLE_LIST *, TABLE_LIST *); -static bool lock_tables_precheck(THD *thd, TABLE_LIST *tables); const char *any_db="*any*"; // Special symbol for check_access @@ -7819,35 +7818,6 @@ err: } -/** - Check privileges for LOCK TABLES statement. - - @param thd Thread context. - @param tables List of tables to be locked. - - @retval FALSE - Success. - @retval TRUE - Failure. -*/ - -static bool lock_tables_precheck(THD *thd, TABLE_LIST *tables) -{ - TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); - - for (TABLE_LIST *table= tables; table != first_not_own_table && table; - table= table->next_global) - { - if (is_temporary_table(table)) - continue; - - if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, table, - FALSE, 1, FALSE)) - return TRUE; - } - - return FALSE; -} - - /** negate given expression.