384
382
bool mysql_truncate(Session& session, TableList *table_list)
389
386
uint64_t save_options= session.options;
390
387
table_list->lock_type= TL_WRITE;
391
388
session.options&= ~(OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
392
390
mysql_init_select(session.lex);
393
391
error= mysql_delete(&session, table_list, (COND*) 0, (SQL_LIST*) 0,
396
395
Safety, in case the engine ignored ha_enable_transaction(false)
397
396
above. Also clears session->transaction.*.
400
400
session.options= save_options;