diff options
author | Michael Widenius <monty@askmonty.org> | 2010-11-26 17:18:51 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-11-26 17:18:51 +0200 |
commit | b8b3716ae029f2c550e1ec0b1e50ac01aabf5dc5 (patch) | |
tree | 633c422f0dd5cbc2b5bfb50bad0db0993114b3ba /sql/opt_range.h | |
parent | 171260f37c31973e3bc55a7d97723ca67fdc7900 (diff) | |
download | mariadb-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 'sql/opt_range.h')
-rw-r--r-- | sql/opt_range.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h index f2a1cce29b5..1e3008d78aa 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -585,13 +585,21 @@ public: void dbug_dump(int indent, bool verbose); #endif int init_ror_merged_scan(bool reuse_handler); - bool push_quick_back(QUICK_RANGE_SELECT *quick_sel_range); + bool push_quick_back(MEM_ROOT *alloc, QUICK_RANGE_SELECT *quick_sel_range); + + class QUICK_SELECT_WITH_RECORD : public Sql_alloc + { + public: + QUICK_RANGE_SELECT *quick; + uchar *key_tuple; + ~QUICK_SELECT_WITH_RECORD() { delete quick; } + }; /* Range quick selects this intersection consists of, not including cpk_quick. */ - List<QUICK_RANGE_SELECT> quick_selects; + List<QUICK_SELECT_WITH_RECORD> quick_selects; /* Merged quick select that uses Clustered PK, if there is one. This quick |