diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-09-18 22:49:34 +0300 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2008-09-18 22:49:34 +0300 |
commit | 3e1d88d188b13a9b7ad2e40b5fee264d44c618e2 (patch) | |
tree | 434dea964599ae751d307d22db4eab045a8e5900 /sql/ha_partition.h | |
parent | 14ce62ffbbbb136f8d913a4dd7986be78749d55a (diff) | |
download | mariadb-git-3e1d88d188b13a9b7ad2e40b5fee264d44c618e2.tar.gz |
Bug#30573: Ordered range scan over partitioned tables returns some rows twice
and
Bug#33555: Group By Query does not correctly aggregate partitions
Backport of bug-33257 which is the same bug.
read_range_*() calls was not passed to the partition handlers,
but was translated to index_read/next family calls.
Resulting in duplicates rows and wrong aggregations.
mysql-test/r/partition_range.result:
Bug#30573: Ordered range scan over partitioned tables returns some rows twice
Updated result file
mysql-test/t/partition_range.test:
Bug#30573: Ordered range scan over partitioned tables returns some rows twice
Re-enabled the test
sql/ha_partition.cc:
Bug#30573: Ordered range scan over partitioned tables returns some rows twice
backport of bug-33257, correct handling of read_range_* calls,
without converting them to index_read/next calls
sql/ha_partition.h:
Bug#30573: Ordered range scan over partitioned tables returns some rows twice
backport of bug-33257, correct handling of read_range_* calls,
without converting them to index_read/next calls
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 97f5624608f..459b566b6d8 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -49,7 +49,8 @@ private: partition_index_first_unordered= 2, partition_index_last= 3, partition_index_read_last= 4, - partition_no_index_scan= 5 + partition_read_range = 5, + partition_no_index_scan= 6 }; /* Data for the partition handler */ int m_mode; // Open mode @@ -63,8 +64,6 @@ private: handler **m_reorged_file; // Reorganised partitions handler **m_added_file; // Added parts kept for errors partition_info *m_part_info; // local reference to partition - uchar *m_start_key_ref; // Reference of start key in current - // index scan info Field **m_part_field_array; // Part field array locally to save acc uchar *m_ordered_rec_buffer; // Row and key buffer for ord. idx scan KEY *m_curr_key_info; // Current index @@ -429,9 +428,7 @@ public: virtual int read_range_next(); private: - int common_index_read(uchar * buf, const uchar * key, - key_part_map keypart_map, - enum ha_rkey_function find_flag); + int common_index_read(uchar * buf, bool have_start_key); int common_first_last(uchar * buf); int partition_scan_set_up(uchar * buf, bool idx_read_flag); int handle_unordered_next(uchar * buf, bool next_same); |