Commit 3c3e3648 authored by unknown's avatar unknown

fater way to detect last page address for the last log file.

gprof build for amd64.


storage/maria/ma_loghandler.c:
  fater way to detect last page address for the last log file.
BUILD/compile-amd64-gprof-no-ndb:
  New BitKeeper file ``BUILD/compile-amd64-gprof-no-ndb''
parent e71e5893
#! /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 ...@@ -5185,6 +5185,14 @@ static my_bool translog_scanner_set_last_page(TRANSLOG_SCANNER_DATA
*scanner) *scanner)
{ {
my_bool page_ok; 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; scanner->last_file_page= scanner->page_addr;
return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok)); return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok));
} }
......
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