diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-08-09 12:51:37 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-08-09 12:51:37 +0200 |
commit | 6592afd5c28c0e7519d76c8c894658a4a17515c0 (patch) | |
tree | 3faf961ee13adcecaa6a59cac456417e69fd62be /sql/sql_partition.cc | |
parent | 51672ec2d4d37e701b595ac74cde9abc37916a2d (diff) | |
download | mariadb-git-6592afd5c28c0e7519d76c8c894658a4a17515c0.tar.gz |
Bug#14342883: SELECT QUERY RETURNS NOT ALL
ROWS THAT ARE EXPECTED
For non range/list partitioned tables (i.e. HASH/KEY):
When prune_partitions finds a multi-range list
(or in this test '<>') for a field of the partition index,
even if it cannot make any use of the multi-range,
it will continue with the next field of the partition index
and use that for pruning (even if it the previous
field could not be used). This results in partitions is
pruned away, leaving partitions that only matches
the last field in the partition index, and will exclude
partitions which might match any previous fields.
Fixed by skipping rest of partitioning key fields/parts
if current key field/part could not be used.
Also notice it is the order of the fields in the CREATE TABLE
statement that triggers this bug, not the order of fields in
primary/unique key or PARTITION BY KEY ().
It must not be the last field in the partitioning expression that
is not equal (or have a non single point range).
I.e. the partitioning index is created with the same field order
as in the CREATE TABLE. And for the bug to appear
the last field must be a single point and some previous field
must be a multi-point range.
Diffstat (limited to 'sql/sql_partition.cc')
0 files changed, 0 insertions, 0 deletions