Loading innobase/buf/buf0buf.c +9 −0 Original line number Diff line number Diff line Loading @@ -1776,6 +1776,15 @@ buf_page_create( buf_flush_free_margin(); frame = block->frame; /* Reset to zero the file flush lsn field in the page; if the first page of an ibdata file is 'created' in this function into the buffer pool then we lose the original contents of the file flush lsn stamp. Then InnoDB could in a crash recovery print a big, false, corruption warning if the stamp contains an lsn bigger than the ib_logfile lsn. */ memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); #ifdef UNIV_DEBUG buf_dbg_counter++; Loading innobase/include/read0read.h +3 −5 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ void read_view_print( /*============*/ read_view_t* view); /* in: read view */ /************************************************************************* Create a consistent cursor view for mysql to be used in cursors. In this consistent read view modifications done by the creating transaction or future Loading @@ -78,10 +77,9 @@ cursor_view_t* read_cursor_view_create_for_mysql( /*==============================*/ trx_t* cr_trx);/* in: trx where cursor view is created */ /************************************************************************* Close a given consistent cursor view for and restore global read view back to a transaction. */ Close a given consistent cursor view for mysql and restore global read view back to a transaction read view. */ void read_cursor_view_close_for_mysql( Loading @@ -90,7 +88,7 @@ read_cursor_view_close_for_mysql( cursor_view_t* curview); /* in: cursor view to be closed */ /************************************************************************* This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not null. Otherwice, function read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view. */ void Loading innobase/include/trx0trx.h +5 −6 Original line number Diff line number Diff line Loading @@ -606,14 +606,13 @@ struct trx_struct{ /* memory heap for the global read view */ read_view_t* global_read_view; /* consistent read view used in the transaction is stored here if transaction is using a consistent read view associated to a cursor */ /* consistent read view associated to a transaction or NULL */ read_view_t* read_view; /* consistent read view used in the transaction or NULL, this read view can be normal read view associated to a transaction or read view if defined can be normal read view associated to a transaction (i.e. same as global_read_view) or read view associated to a cursor */ /*------------------------------*/ UT_LIST_BASE_NODE_T(trx_named_savept_t) Loading innobase/read/read0read.c +3 −3 Original line number Diff line number Diff line Loading @@ -347,8 +347,8 @@ read_cursor_view_create_for_mysql( } /************************************************************************* Close a given consistent cursor view for and restore global read view back to a transaction. */ Close a given consistent cursor view for mysql and restore global read view back to a transaction read view. */ void read_cursor_view_close_for_mysql( Loading @@ -372,7 +372,7 @@ read_cursor_view_close_for_mysql( /************************************************************************* This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not null. Otherwice, function read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view. */ void Loading innobase/row/row0sel.c +10 −2 Original line number Diff line number Diff line Loading @@ -3100,6 +3100,13 @@ row_search_for_mysql( "http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html\n" "InnoDB: how you can resolve the problem.\n", prebuilt->table->name); /* Restore a global read view back to a transaction. This forces MySQL always to set a cursor view before fetch from a cursor. */ trx->read_view = trx->global_read_view; return(DB_ERROR); } Loading Loading @@ -4091,8 +4098,9 @@ row_search_for_mysql( } func_exit: /* Restore a global read view back to transaction. This forces MySQL always to set cursor view before fetch if it is used. */ /* Restore a global read view back to a transaction. This forces MySQL always to set a cursor view before fetch from a cursor. */ trx->read_view = trx->global_read_view; Loading Loading
innobase/buf/buf0buf.c +9 −0 Original line number Diff line number Diff line Loading @@ -1776,6 +1776,15 @@ buf_page_create( buf_flush_free_margin(); frame = block->frame; /* Reset to zero the file flush lsn field in the page; if the first page of an ibdata file is 'created' in this function into the buffer pool then we lose the original contents of the file flush lsn stamp. Then InnoDB could in a crash recovery print a big, false, corruption warning if the stamp contains an lsn bigger than the ib_logfile lsn. */ memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); #ifdef UNIV_DEBUG buf_dbg_counter++; Loading
innobase/include/read0read.h +3 −5 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ void read_view_print( /*============*/ read_view_t* view); /* in: read view */ /************************************************************************* Create a consistent cursor view for mysql to be used in cursors. In this consistent read view modifications done by the creating transaction or future Loading @@ -78,10 +77,9 @@ cursor_view_t* read_cursor_view_create_for_mysql( /*==============================*/ trx_t* cr_trx);/* in: trx where cursor view is created */ /************************************************************************* Close a given consistent cursor view for and restore global read view back to a transaction. */ Close a given consistent cursor view for mysql and restore global read view back to a transaction read view. */ void read_cursor_view_close_for_mysql( Loading @@ -90,7 +88,7 @@ read_cursor_view_close_for_mysql( cursor_view_t* curview); /* in: cursor view to be closed */ /************************************************************************* This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not null. Otherwice, function read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view. */ void Loading
innobase/include/trx0trx.h +5 −6 Original line number Diff line number Diff line Loading @@ -606,14 +606,13 @@ struct trx_struct{ /* memory heap for the global read view */ read_view_t* global_read_view; /* consistent read view used in the transaction is stored here if transaction is using a consistent read view associated to a cursor */ /* consistent read view associated to a transaction or NULL */ read_view_t* read_view; /* consistent read view used in the transaction or NULL, this read view can be normal read view associated to a transaction or read view if defined can be normal read view associated to a transaction (i.e. same as global_read_view) or read view associated to a cursor */ /*------------------------------*/ UT_LIST_BASE_NODE_T(trx_named_savept_t) Loading
innobase/read/read0read.c +3 −3 Original line number Diff line number Diff line Loading @@ -347,8 +347,8 @@ read_cursor_view_create_for_mysql( } /************************************************************************* Close a given consistent cursor view for and restore global read view back to a transaction. */ Close a given consistent cursor view for mysql and restore global read view back to a transaction read view. */ void read_cursor_view_close_for_mysql( Loading @@ -372,7 +372,7 @@ read_cursor_view_close_for_mysql( /************************************************************************* This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not null. Otherwice, function read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view. */ void Loading
innobase/row/row0sel.c +10 −2 Original line number Diff line number Diff line Loading @@ -3100,6 +3100,13 @@ row_search_for_mysql( "http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html\n" "InnoDB: how you can resolve the problem.\n", prebuilt->table->name); /* Restore a global read view back to a transaction. This forces MySQL always to set a cursor view before fetch from a cursor. */ trx->read_view = trx->global_read_view; return(DB_ERROR); } Loading Loading @@ -4091,8 +4098,9 @@ row_search_for_mysql( } func_exit: /* Restore a global read view back to transaction. This forces MySQL always to set cursor view before fetch if it is used. */ /* Restore a global read view back to a transaction. This forces MySQL always to set a cursor view before fetch from a cursor. */ trx->read_view = trx->global_read_view; Loading