Bug #14676249 : ROW_VERS_IMPL_X_LOCKED_LOW() MIGHT HIT !BPAGE->FILE_PAGE_WAS_FREED ASSERTION
trx_undo_prev_version_build() should confirm existence of inherited (not-own) external pages. Bug #14676084 : ROW_UNDO_MOD_UPD_DEL_SEC() DOESN'T NEED UNDO_ROW AND UNDO_EXT INITIALIZED mtr script could hit the assertion error !bpage->file_page_was_freed using this path. So, also fixed rb://1337 approved by Marko Makela.
This commit is contained in:
commit
718de371c1
@ -519,6 +519,7 @@ row_undo_mod_upd_del_sec(
|
||||
ulint err = DB_SUCCESS;
|
||||
|
||||
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
|
||||
ut_ad(!node->undo_row);
|
||||
heap = mem_heap_create(1024);
|
||||
|
||||
while (node->index != NULL) {
|
||||
@ -580,6 +581,8 @@ row_undo_mod_del_mark_sec(
|
||||
dict_index_t* index;
|
||||
ulint err;
|
||||
|
||||
ut_ad(!node->undo_row);
|
||||
|
||||
heap = mem_heap_create(1024);
|
||||
|
||||
while (node->index != NULL) {
|
||||
|
@ -216,7 +216,7 @@ row_undo_search_clust_to_pcur(
|
||||
|
||||
node->row = row_build(ROW_COPY_DATA, clust_index, rec,
|
||||
offsets, NULL, ext, node->heap);
|
||||
if (node->update) {
|
||||
if (node->rec_type == TRX_UNDO_UPD_EXIST_REC) {
|
||||
node->undo_row = dtuple_copy(node->row, node->heap);
|
||||
row_upd_replace(node->undo_row, &node->undo_ext,
|
||||
clust_index, node->update, node->heap);
|
||||
|
@ -58,6 +58,8 @@ Created 10/8/1995 Heikki Tuuri
|
||||
*******************************************************/
|
||||
|
||||
/* Dummy comment */
|
||||
#include "m_string.h" /* for my_sys.h */
|
||||
#include "my_sys.h" /* DEBUG_SYNC_C */
|
||||
#include "srv0srv.h"
|
||||
|
||||
#include "ut0mem.h"
|
||||
@ -1571,6 +1573,10 @@ srv_suspend_mysql_thread(
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
|
||||
if (trx->mysql_thd != 0) {
|
||||
DEBUG_SYNC_C("srv_suspend_mysql_thread_enter");
|
||||
}
|
||||
|
||||
os_event_set(srv_lock_timeout_thread_event);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
@ -1634,6 +1634,25 @@ trx_undo_prev_version_build(
|
||||
if (row_upd_changes_field_size_or_external(index, offsets, update)) {
|
||||
ulint n_ext;
|
||||
|
||||
/* We should confirm the existence of disowned external data,
|
||||
if the previous version record is delete marked. If the trx_id
|
||||
of the previous record is seen by purge view, we should treat
|
||||
it as missing history, because the disowned external data
|
||||
might be purged already.
|
||||
|
||||
The inherited external data (BLOBs) can be freed (purged)
|
||||
after trx_id was committed, provided that no view was started
|
||||
before trx_id. If the purge view can see the committed
|
||||
delete-marked record by trx_id, no transactions need to access
|
||||
the BLOB. */
|
||||
|
||||
if ((update->info_bits & REC_INFO_DELETED_FLAG)
|
||||
&& read_view_sees_trx_id(purge_sys->view, trx_id)) {
|
||||
/* treat as a fresh insert, not to
|
||||
cause assertion error at the caller. */
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
|
||||
/* We have to set the appropriate extern storage bits in the
|
||||
old version of the record: the extern bits in rec for those
|
||||
fields that update does NOT update, as well as the bits for
|
||||
|
Loading…
x
Reference in New Issue
Block a user