mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SQL: truncate syntax and privilege [closes #229]
This commit is contained in:
@ -495,9 +495,12 @@ bool Sql_cmd_truncate_table::execute(THD *thd)
|
||||
TABLE_LIST *table= thd->lex->select_lex.table_list.first;
|
||||
DBUG_ENTER("Sql_cmd_truncate_table::execute");
|
||||
|
||||
DBUG_ASSERT(table);
|
||||
if (table->vers_conditions)
|
||||
{
|
||||
if (check_one_table_access(thd, DELETE_VERSIONING_ROWS_ACL, table))
|
||||
DBUG_RETURN(res);
|
||||
DBUG_RETURN(mysql_delete(thd, table, NULL, NULL, -1, 0, NULL));
|
||||
}
|
||||
|
||||
if (check_one_table_access(thd, DROP_ACL, table))
|
||||
DBUG_RETURN(res);
|
||||
|
Reference in New Issue
Block a user