ha_innodb.cc:

  Add diagnostic code to analyze an assertion failure in ha_innodb.cc on line 2020 reported by a user (Bug #2903)
parent 624dd4db
...@@ -2016,8 +2016,27 @@ ha_innobase::write_row( ...@@ -2016,8 +2016,27 @@ ha_innobase::write_row(
DBUG_ENTER("ha_innobase::write_row"); DBUG_ENTER("ha_innobase::write_row");
ut_a(prebuilt->trx == if (prebuilt->trx !=
(trx_t*) current_thd->transaction.all.innobase_tid); (trx_t*) current_thd->transaction.all.innobase_tid) {
char err_buf[2000];
fprintf(stderr,
"InnoDB: Error: the transaction object for the table handle is at\n"
"InnoDB: %lx, but for the current thread it is at %lx\n",
(ulong)prebuilt->trx,
(ulong)current_thd->transaction.all.innobase_tid);
ut_sprintf_buf(err_buf, ((byte*)prebuilt) - 100, 200);
fprintf(stderr,
"InnoDB: Dump of 200 bytes around prebuilt: %.1000s\n", err_buf);
ut_sprintf_buf(err_buf,
((byte*)(&(current_thd->transaction.all))) - 100, 200);
fprintf(stderr,
"InnoDB: Dump of 200 bytes around transaction.all: %.1000s\n", err_buf);
ut_a(0);
}
statistic_increment(ha_write_count, &LOCK_status); statistic_increment(ha_write_count, &LOCK_status);
......
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