Commit 5c57f8cc authored by Marko Mäkelä's avatar Marko Mäkelä

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