mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
merge with 4.1
This commit is contained in:
@@ -429,6 +429,8 @@ multi_delete::initialize_tables(JOIN *join)
|
||||
walk= walk->next_local;
|
||||
/* Don't use KEYREAD optimization on this table */
|
||||
tbl->no_keyread=1;
|
||||
/* Don't use record cache */
|
||||
tbl->no_cache= 1;
|
||||
tbl->used_keys.clear_all();
|
||||
if (tbl->file->has_transactions())
|
||||
log_delayed= transactional_tables= 1;
|
||||
@@ -744,8 +746,11 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
|
||||
{
|
||||
/* Probably InnoDB table */
|
||||
table_list->lock_type= TL_WRITE;
|
||||
DBUG_RETURN(mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
|
||||
HA_POS_ERROR, 0));
|
||||
ha_enable_transaction(thd, FALSE);
|
||||
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
|
||||
HA_POS_ERROR, 0);
|
||||
ha_enable_transaction(thd, TRUE);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
if (lock_and_wait_for_table_name(thd, table_list))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
Reference in New Issue
Block a user