Commit da6db764 authored by unknown's avatar unknown

Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria

into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-recovery
parents 426158e2 108307b8
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$amd64_cflags -pg -g"
extra_configs="$amd64_configs $max_no_ndb_configs --disable-shared $static_link"
. "$path/FINISH.sh"
......@@ -5185,6 +5185,14 @@ static my_bool translog_scanner_set_last_page(TRANSLOG_SCANNER_DATA
*scanner)
{
my_bool page_ok;
if (LSN_FILE_NO(scanner->page_addr) == LSN_FILE_NO(scanner->horizon))
{
/* It is last file => we can easy find last page address by horizon */
uint pagegrest= LSN_OFFSET(scanner->horizon) % TRANSLOG_PAGE_SIZE;
scanner->last_file_page= (scanner->horizon -
(pagegrest ? pagegrest : TRANSLOG_PAGE_SIZE));
return (0);
}
scanner->last_file_page= scanner->page_addr;
return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok));
}
......@@ -5241,7 +5249,8 @@ 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", ("Scanner: 0x%lx LSN: (0x%lu,0x%lx)",
(ulong) scanner, LSN_IN_PARTS(lsn)));
DBUG_ASSERT(LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE != 0);
DBUG_ASSERT(translog_inited == 1);
......@@ -5281,7 +5290,10 @@ my_bool translog_init_scanner(LSN lsn,
void translog_destroy_scanner(TRANSLOG_SCANNER_DATA *scanner)
{
DBUG_ENTER("translog_destroy_scanner");
DBUG_PRINT("enter", ("Scanner: 0x%lx", (ulong)scanner));
translog_free_link(scanner->direct_link);
DBUG_VOID_RETURN;
}
......@@ -5579,7 +5591,10 @@ translog_variable_length_header(uchar *page, translog_size_t page_offset,
DBUG_PRINT("info", ("use internal scanner"));
scanner= &internal_scanner;
}
else
{
translog_destroy_scanner(scanner);
}
base_lsn= buff->groups[0].addr;
translog_init_scanner(base_lsn, 1, scanner, scanner == &internal_scanner);
/* first group chunk is always chunk type 2 */
......
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