diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-10-31 22:00:15 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-10-31 22:00:15 +0300 |
commit | d9a8dd22b2e88e9ef0844c32fa442ed6d3f8bc56 (patch) | |
tree | 69e114f52d8a9ee8f5569569b27ad0ba9554973c /sql/multi_range_read.h | |
parent | 8e4c627ef8bff737e072fde733ee39351c17f70b (diff) | |
download | mariadb-git-d9a8dd22b2e88e9ef0844c32fa442ed6d3f8bc56.tar.gz |
DS-MRR/CPK improvements: correct buffer exhaustion handling
Diffstat (limited to 'sql/multi_range_read.h')
-rw-r--r-- | sql/multi_range_read.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index a7748a32b6b..b4f2a699dc5 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -126,8 +126,16 @@ public: index tuple or a table record. Getting HA_ERR_END_OF_FILE from get_next() means that the source should be - re-filled. if eof() returns true after refill attempt, then the end of + re-filled. + + Was: + if eof() returns true after refill attempt, then the end of stream has been reached and get_next() must not be called anymore. + + Now: + if refill_buffer() returns HA_ERR_END_OF_FILE that means the stream is + really exhausted. + */ class Mrr_reader @@ -168,7 +176,7 @@ public: void *seq_init_param, uint n_ranges, uint mode, Buffer_manager *buf_manager_arg); int get_next(char **range_info); - int refill_buffer() { return 0; } + int refill_buffer() { return HA_ERR_END_OF_FILE; } bool eof() { return test(res); } uchar *get_rowid_ptr() { return h->ref; } bool skip_record(char *range_id, uchar *rowid) |