Commit c22b1cd7 authored by unknown's avatar unknown

In non-debug builds, the log handler failed to read any log

record (for example in ma_test_loghandler-t). Reason was
wrongly matched () in DBUG.


storage/maria/ma_loghandler.c:
  Wrongly matched parenthesis:
  DBUG_PRINT(keyword, argslist) expands to roughly
  _db_doprnt arglist;
  So DBUG_PRINT("enter",(a);
  b;
  c);
  expands to roughly
  _db_doprnt(a);b;c;
  which is valid code. Except that in non-debug builds, DBUG_PRINT(
  expands to nothing so the wrongly "included" code is thrown away,
  leading to some members of "scanner" to not be initialized.
parent 0cda94a3
......@@ -5170,7 +5170,7 @@ my_bool translog_init_scanner(LSN lsn,
{
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_init_scanner");
DBUG_PRINT("enter", ("LSN: (0x%lu,0x%lx)", LSN_IN_PARTS(lsn));
DBUG_PRINT("enter", ("LSN: (0x%lu,0x%lx)", LSN_IN_PARTS(lsn)));
DBUG_ASSERT(LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE != 0);
DBUG_ASSERT(translog_inited == 1);
......@@ -5186,7 +5186,7 @@ my_bool translog_init_scanner(LSN lsn,
LSN_IN_PARTS(scanner->horizon)));
/* lsn < horizon */
DBUG_ASSERT(lsn < scanner->horizon));
DBUG_ASSERT(lsn < scanner->horizon);
scanner->page_addr= lsn;
scanner->page_addr-= scanner->page_offset; /*decrease offset */
......
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