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().
This commit is contained in:
Sergey Petrunya 2014-10-29 01:37:58 +03:00
commit 9cb002b359
4 changed files with 81 additions and 2 deletions

View file

@ -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);