diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-06-21 15:09:58 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-06-21 15:09:58 +0400 |
commit | b36a02822430ce90285f067f8e6e8d87859732aa (patch) | |
tree | 789d19b4ef2ce00af4ba713d60dfc106c0af4fad /sql/opt_range.cc | |
parent | 5088fb1394a51003038efc6fb901461ad880255a (diff) | |
download | mariadb-git-b36a02822430ce90285f067f8e6e8d87859732aa.tar.gz |
Bug#50389 Using intersect does not return all rows
In process of record search it is not taken into account
that inital quick->file->ref value could be inapplicable
to range interval. After proper row is found this value is
stored into the record buffer and later the record is
filtered out at condition evaluation stage.
The fix is store a refernce of found row to the handler ref field.
mysql-test/r/innodb_mysql.result:
test case
mysql-test/std_data/intersect-bug50389.tsv:
test case
mysql-test/t/innodb_mysql.test:
test case
sql/opt_range.cc:
store a refernce of found row to the handler ref field.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 5c6cb64c04f..2f4281d539f 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8349,6 +8349,7 @@ int QUICK_ROR_INTERSECT_SELECT::get_next() if ((error= quick->get_next())) DBUG_RETURN(error); } + quick->file->position(quick->record); } memcpy(last_rowid, quick->file->ref, head->file->ref_length); last_rowid_count= 1; |