diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-08-12 23:59:29 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-08-12 23:59:29 +0400 |
commit | d098596ba5466b02823dc2431b632a43a077c2d5 (patch) | |
tree | d7df94952823aa8341caaa9f2df829c5f4ebe695 /sql/multi_range_read.h | |
parent | 8d07c16ad91190e812907723d5dcaee0b6511e70 (diff) | |
download | mariadb-git-d098596ba5466b02823dc2431b632a43a077c2d5.tar.gz |
Fix a number of problems with reverse buffer use
Diffstat (limited to 'sql/multi_range_read.h')
-rw-r--r-- | sql/multi_range_read.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index e49b1ab914d..1589e65b49f 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -102,14 +102,25 @@ public: { *unused_start= start; *unused_end= read_pos; + start= read_pos; } else { - *unused_start=read_pos; - *unused_end=end; + *unused_start= read_pos; + *unused_end= end; + end= read_pos; } } + void flip() + { + uchar *tmp= read_pos; + read_pos= write_pos; + write_pos= tmp; + direction= -direction; + } + bool is_reverse() { return direction == -1; } + void grow(uchar *unused_start, uchar *unused_end) { /* |