Commit 36f03084 authored by heikki's avatar heikki

Remove redundant check_trx_exists() and ut_a() from r701,

as suggested by Marko
parent 4528e783
...@@ -5023,18 +5023,12 @@ ha_innobase::delete_all_rows(void) ...@@ -5023,18 +5023,12 @@ ha_innobase::delete_all_rows(void)
} }
/* Get the transaction associated with the current thd, or create one /* Get the transaction associated with the current thd, or create one
if not yet created */ if not yet created, and update prebuilt->trx */
trx = check_trx_exists(thd);
/* Update prebuilt->trx */
update_thd(current_thd); update_thd(current_thd);
/* Truncate the table in InnoDB */ /* Truncate the table in InnoDB */
ut_a(prebuilt->trx ==
(trx_t*) current_thd->ha_data[innobase_hton.slot]);
error = row_truncate_table_for_mysql(prebuilt->table, trx); error = row_truncate_table_for_mysql(prebuilt->table, trx);
if (error == DB_ERROR) { if (error == DB_ERROR) {
/* Cannot truncate; resort to ha_innobase::delete_row() */ /* Cannot truncate; resort to ha_innobase::delete_row() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment