Commit 5cd55487 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-maria

into  janus.mylan:/usr/home/serg/Abk/mysql-maria1

parents ceadd596 dcd4b6f5
......@@ -104,7 +104,7 @@ struct st_buffer_cursor
struct st_translog_buffer *buffer;
/* current page fill */
uint16 current_page_fill;
/* how many times we finish this page to write it */
/* how many times we finish this page to write it (for sector protection) */
uint16 write_counter;
/* previous write offset */
uint16 previous_offset;
......@@ -6066,10 +6066,10 @@ translog_size_t translog_read_record(LSN lsn,
/*
Force skipping to the next buffer
@brief Force skipping to the next buffer
SYNOPSIS
translog_force_current_buffer_to_finish()
@todo Do not copy old page content if all page protections are switched off
(because we do not need calculate something or change old parts of the page)
*/
static void translog_force_current_buffer_to_finish()
......@@ -6142,6 +6142,7 @@ static void translog_force_current_buffer_to_finish()
write_counter= log_descriptor.bc.write_counter;
previous_offset= log_descriptor.bc.previous_offset;
translog_start_buffer(new_buffer, &log_descriptor.bc, new_buffer_no);
/* Fix buffer offset (which was incorrectly set to horizon) */
log_descriptor.bc.buffer->offset= new_buff_beginning;
log_descriptor.bc.write_counter= write_counter;
log_descriptor.bc.previous_offset= previous_offset;
......
......@@ -184,7 +184,6 @@ static const char *page_cache_page_type_str[]=
static const char *page_cache_page_write_mode_str[]=
{
"DELAY",
"NOW",
"DONE"
};
......@@ -2929,7 +2928,14 @@ uchar *pagecache_valid_read(PAGECACHE *pagecache,
status= block->status;
if (!buff)
{
buff= block->buffer;
/* if we lock for write we must link the block to changed blocks */
if ((lock == PAGECACHE_LOCK_WRITE ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED) &&
!(block->status & PCBLOCK_CHANGED))
link_to_changed_list(pagecache, block);
}
else
{
if (!(status & PCBLOCK_ERROR))
......
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