summaryrefslogtreecommitdiff
path: root/storage/pbxt
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-11-26 17:18:51 +0200
committerMichael Widenius <monty@askmonty.org>2010-11-26 17:18:51 +0200
commitb8b3716ae029f2c550e1ec0b1e50ac01aabf5dc5 (patch)
tree633c422f0dd5cbc2b5bfb50bad0db0993114b3ba /storage/pbxt
parent171260f37c31973e3bc55a7d97723ca67fdc7900 (diff)
downloadmariadb-git-b8b3716ae029f2c550e1ec0b1e50ac01aabf5dc5.tar.gz
Patch from Sergey Petrunya:
Fix post-merge failure in 5.1-merge - Let QUICK_RANGE_INTERSECT_SELECT not make assumption that HA_EXTRA_KEYREAD scans do not touch parts of table->record[0] that refer to fields that are not covered by the used index. This assumption is not true for XtraDB (e.g. grep row/row0sel.c for "init null bytes with default values as they might be").
Diffstat (limited to 'storage/pbxt')
-rw-r--r--storage/pbxt/src/table_xt.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/pbxt/src/table_xt.cc b/storage/pbxt/src/table_xt.cc
index 2d93f161ac9..8fc6217e183 100644
--- a/storage/pbxt/src/table_xt.cc
+++ b/storage/pbxt/src/table_xt.cc
@@ -4450,10 +4450,10 @@ xtPublic int xt_tab_maybe_committed(XTOpenTablePtr ot, xtRecordID rec_id, xtXact
xtXactID rec_xn_id = 0;
xtBool wait = FALSE;
xtXactID wait_xn_id = 0;
- xtRowID row_id;
+ xtRowID row_id= 0;
xtRecordID var_rec_id;
xtXactID xn_id;
- register XTTableHPtr tab;
+ register XTTableHPtr tab = 0;
#ifdef TRACE_VARIATIONS_IN_DUP_CHECK
char t_buf[500];
int len;
@@ -4628,7 +4628,8 @@ xtPublic int xt_tab_maybe_committed(XTOpenTablePtr ot, xtRecordID rec_id, xtXact
return FALSE;
failed:
- XT_TAB_ROW_UNLOCK(&tab->tab_row_rwlock[row_id % XT_ROW_RWLOCKS], ot->ot_thread);
+ if (tab)
+ XT_TAB_ROW_UNLOCK(&tab->tab_row_rwlock[row_id % XT_ROW_RWLOCKS], ot->ot_thread);
return XT_ERR;
}