1060
1072
static bool mysql_truncate_by_delete(THD *thd, TABLE_LIST *table_list)
1063
1075
DBUG_ENTER("mysql_truncate_by_delete");
1064
1076
table_list->lock_type= TL_WRITE;
1065
1077
mysql_init_select(thd->lex);
1067
1078
error= mysql_delete(thd, table_list, NULL, NULL, HA_POS_ERROR, LL(0), TRUE);
1068
1079
ha_autocommit_or_rollback(thd, error);
1069
1080
end_trans(thd, error ? ROLLBACK : COMMIT);