diff options
author | unknown <sergefp@mysql.com> | 2007-11-20 05:02:49 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2007-11-20 05:02:49 +0300 |
commit | 0b22925cc0553c11fc7d131f27b1846253a8ee87 (patch) | |
tree | bece4a64380034d28f6208449edb115f8b306f12 /sql/ha_partition.cc | |
parent | 83e7133071b00cb3fe77346fc7c302d7549bbfe0 (diff) | |
download | mariadb-git-0b22925cc0553c11fc7d131f27b1846253a8ee87.tar.gz |
BUG#30573: Ordered range scan over partitioned tables returns some rows twice
The problem: ha_partition::read_range_first() could return a record that is
outside of the scanned range. If that record happened to be in the next
subsequent range, it would satisfy the WHERE and appear in the output twice.
(we would get it the second time when scanning the next subsequent range)
Fix:
Made ha_partition::read_range_first() check if the returned recod is within
the scanned range, like other read_range_first() implementations do.
mysql-test/r/partition_range.result:
BUG#30573: Ordered range scan over partitioned tables returns some rows twice
- Testcase
mysql-test/t/partition_range.test:
BUG#30573: Ordered range scan over partitioned tables returns some rows twice
- Testcase
sql/ha_partition.cc:
BUG#30573: Ordered range scan over partitioned tables returns some rows twice
- Make ha_partition::read_range_first() check if the returned record is
within the range.
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 1400d9da753..423415ce4ae 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3838,7 +3838,7 @@ int ha_partition::read_range_first(const key_range *start_key, start_key->key, start_key->keypart_map, start_key->flag); } - DBUG_RETURN(error); + DBUG_RETURN (error? error: compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE); } |