diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-10-29 01:37:58 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-10-29 01:37:58 +0300 |
commit | 9cb002b359ca8281cd30b711690dd589a254db4e (patch) | |
tree | 6adedb208b9394f5d70973ac6556c2f598769131 /sql/multi_range_read.h | |
parent | 94c8f33569ec2b8094928463150567d4dcf67398 (diff) | |
download | mariadb-git-9cb002b359ca8281cd30b711690dd589a254db4e.tar.gz |
MDEV-6878: Use of uninitialized saved_primary_key in Mrr_ordered_index_reader::resume_read()
(Backport to 5.3)
(variant #2, with fixed coding style)
- Make Mrr_ordered_index_reader::resume_read() restore index position
only if it was saved before with Mrr_ordered_index_reader::interrupt_read().
Diffstat (limited to 'sql/multi_range_read.h')
-rw-r--r-- | sql/multi_range_read.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index 1b72e71944d..0ad61142b12 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -324,6 +324,12 @@ private: uchar *saved_key_tuple; /* Saved current key tuple */ uchar *saved_primary_key; /* Saved current primary key tuple */ + /* + TRUE<=> saved_key_tuple (and saved_primary_key when applicable) have + valid values. + */ + bool read_was_interrupted; + static int compare_keys(void* arg, uchar* key1, uchar* key2); static int compare_keys_reverse(void* arg, uchar* key1, uchar* key2); |