Bug#12963823 CRASH IN PURGE THREAD UNDER UNUSUAL CIRCUMSTANCES

Replace part of the patch that Kevin apparently forgot to push.
Fix the bug also in the built-in InnoDB of MySQL 5.1.

I cannot explain why the test case was not failing without the
full patch.

This was rb:762, approved by me.
This commit is contained in:
Marko Mäkelä 2011-09-22 13:35:02 +03:00
parent 8d036bcd61
commit 5c57f8cc9b
3 changed files with 15 additions and 7 deletions

View File

@ -379,7 +379,8 @@ row_purge_upd_exist_or_extern(
ut_ad(node);
if (node->rec_type == TRX_UNDO_UPD_DEL_REC) {
if (node->rec_type == TRX_UNDO_UPD_DEL_REC
|| (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
goto skip_secondaries;
}
@ -488,14 +489,14 @@ row_purge_parse_undo_rec(
dulint roll_ptr;
ulint info_bits;
ulint type;
ulint cmpl_info;
ut_ad(node && thr);
trx = thr_get_trx(thr);
ptr = trx_undo_rec_get_pars(node->undo_rec, &type, &cmpl_info,
updated_extern, &undo_no, &table_id);
ptr = trx_undo_rec_get_pars(
node->undo_rec, &type, &node->cmpl_info,
updated_extern, &undo_no, &table_id);
node->rec_type = type;
if (type == TRX_UNDO_UPD_DEL_REC && !(*updated_extern)) {
@ -508,7 +509,8 @@ row_purge_parse_undo_rec(
node->table = NULL;
if (type == TRX_UNDO_UPD_EXIST_REC
&& cmpl_info & UPD_NODE_NO_ORD_CHANGE && !(*updated_extern)) {
&& node->cmpl_info & UPD_NODE_NO_ORD_CHANGE
&& !(*updated_extern)) {
/* Purge requires no changes to indexes: we may return */
@ -563,7 +565,7 @@ row_purge_parse_undo_rec(
/* Read to the partial row the fields that occur in indexes */
if (!(cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
if (!(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
ptr = trx_undo_rec_get_partial_row(ptr, clust_index,
&(node->row), node->heap);
}

View File

@ -1,3 +1,8 @@
2011-09-20 The InnoDB Team
* row/row0purge.c:
Fix Bug#12963823 CRASH IN PURGE THREAD UNDER UNUSUAL CIRCUMSTANCES
2011-09-12 The InnoDB Team
* row/row0sel.c:

View File

@ -406,7 +406,8 @@ row_purge_upd_exist_or_extern_func(
ut_ad(node);
if (node->rec_type == TRX_UNDO_UPD_DEL_REC) {
if (node->rec_type == TRX_UNDO_UPD_DEL_REC
|| (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
goto skip_secondaries;
}