diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-12-09 00:47:33 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-12-09 00:47:33 +0300 |
commit | a86599e1e407be909cacdbdb4118e629f9c4c634 (patch) | |
tree | 35cae103d00cc90fa2cd83cfa84bc9223cd8b92e /sql/multi_range_read.h | |
parent | e2d2cdd7b81b2fdb19fc55b9b280497caa1e13db (diff) | |
download | mariadb-git-a86599e1e407be909cacdbdb4118e629f9c4c634.tar.gz |
BUG#671340: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5
- Make Mrr_ordered_index_reader() save the rowid across scan interruptions
Also
- Fix compiler warning for setup_buffer_sizes()
- Add commented key_copy/key_restore for better handling of a similar issue
with index record being destroyed by scan interruption (which causes
incorrect evaluation of pushed index condition later on).
Diffstat (limited to 'sql/multi_range_read.h')
-rw-r--r-- | sql/multi_range_read.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index f6e84e78e4d..a22ef0fef61 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -211,8 +211,11 @@ public: /* Get pointer to place where every get_next() call will put rowid */ virtual uchar *get_rowid_ptr() = 0; /* Get the rowid (call this after get_next() call) */ - void position(); + virtual void position(); virtual bool skip_record(char *range_id, uchar *rowid) = 0; + + virtual void interrupt_read() {} + virtual void resume_read() {} }; @@ -269,6 +272,10 @@ public: mrr_funcs.skip_index_tuple(mrr_iter, range_info)); } + void set_temp_space(uchar *space); + void interrupt_read(); + void resume_read(); + void position(); private: Key_value_records_iterator kv_it; @@ -300,6 +307,11 @@ private: /* TRUE == reached eof when enumerating ranges */ bool source_exhausted; + + /* TODO */ + /*uchar *saved_key_tuple;*/ + uchar *saved_rowid; + bool have_saved_rowid; static int compare_keys(void* arg, uchar* key1, uchar* key2); static int compare_keys_reverse(void* arg, uchar* key1, uchar* key2); |