mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
BUG#32772: partition crash 1: enum column
The bug was that for ordered index scans, ha_partition::index_init() did
not put index columns into table->read_set if the underlying storage
engine did not have HA_PARTIAL_COLUMN_READ flag.
This was causing assertion failure when handle_ordered_index_scan() tried
to sort the records according to index order.
Fixed by making ha_partition::index_init() put index columns into table->read_set
for all ordered scans.
mysql-test/r/partition.result:
BUG#32772: partition crash 1: enum column
- Testcase
mysql-test/t/partition.test:
BUG#32772: partition crash 1: enum column
- Testcase
sql/ha_partition.cc:
BUG#32772: partition crash 1: enum column
- Make ha_partition::index_init() include index columns in the read_set
whenever an ordered scan is initialized, no matter if
HA_PARTIAL_COLUMN_READ is set or not.
This commit is contained in:
@@ -1290,4 +1290,17 @@ create table t1
|
||||
partition by key(s1) partitions 3;
|
||||
insert into t1 values (null,null);
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
c0 int,
|
||||
c1 bigint,
|
||||
c2 set('sweet'),
|
||||
key (c2,c1,c0),
|
||||
key(c0)
|
||||
) engine=myisam partition by hash (month(c0)) partitions 5;
|
||||
insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
|
||||
insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
|
||||
select c1 from t1 group by (select c0 from t1 limit 1);
|
||||
c1
|
||||
-6862346
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
||||
Reference in New Issue
Block a user