mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
This commit is contained in:
@ -759,12 +759,15 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
|
||||
if (!ha_supports_generate(table_type) || thd->lex->sphead)
|
||||
{
|
||||
/* Probably InnoDB table */
|
||||
ulong save_options= thd->options;
|
||||
table_list->lock_type= TL_WRITE;
|
||||
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
|
||||
ha_enable_transaction(thd, FALSE);
|
||||
mysql_init_select(thd->lex);
|
||||
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
|
||||
HA_POS_ERROR, 0);
|
||||
ha_enable_transaction(thd, TRUE);
|
||||
thd->options= save_options;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
if (lock_and_wait_for_table_name(thd, table_list))
|
||||
|
Reference in New Issue
Block a user