Commit b0d9c363 authored by marko's avatar marko

ha_innobase::delete_all_rows(): Correct an error introduced in r705:

Replace the local variable "trx" with "prebuilt->trx".

Also, replace the second invocation of the macro current_thd with
the local variable thd.
parent 122ca353
......@@ -5008,7 +5008,6 @@ ha_innobase::delete_all_rows(void)
{
row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt;
int error;
trx_t* trx;
THD* thd = current_thd;
DBUG_ENTER("ha_innobase::delete_all_rows");
......@@ -5023,11 +5022,11 @@ ha_innobase::delete_all_rows(void)
/* Get the transaction associated with the current thd, or create one
if not yet created, and update prebuilt->trx */
update_thd(current_thd);
update_thd(thd);
/* Truncate the table in InnoDB */
error = row_truncate_table_for_mysql(prebuilt->table, trx);
error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx);
if (error == DB_ERROR) {
/* Cannot truncate; resort to ha_innobase::delete_row() */
goto fallback;
......
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