You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATETABLE `t` (
`col_5`textNOT NULL,
`col_6`tinyint(3) unsigned DEFAULT NULL,
`col_7` float DEFAULT '4779.165058537128',
`col_8`smallint(6) NOT NULL DEFAULT '-24790',
`col_9`date DEFAULT '2031-01-15',
`col_37`int(11) DEFAULT '1350204687',
PRIMARY KEY (`col_5`(6),`col_8`) /*T![clustered_index] NONCLUSTERED */,
UNIQUE KEY `idx_6` (`col_9`,`col_7`,`col_8`),
KEY `idx_8` (`col_8`,`col_6`,`col_5`(6),`col_9`,`col_7`),
KEY `idx_9` (`col_9`,`col_7`,`col_8`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY RANGE ( `col_8` ) (
PARTITION `p0`VALUES LESS THAN (-17650),
PARTITION `p1`VALUES LESS THAN (-13033),
PARTITION `p2`VALUES LESS THAN (2521),
PARTITION `p3`VALUES LESS THAN (7510)
);
insert into t values ("", NULL, 6304.0146, -24790, "2031-01-15", 1350204687);
select var_samp(col_7) aggCol from (select/*+ use_index_merge( t ) */*from t wheret.col_9in ( '2002-06-22' ) ort.col_5in ( 'PkfzI' ) ort.col_8in ( -24874 ) andt.col_6>nullandt.col_5>'r'andt.col_9in ( '1979-09-04' ) andt.col_7<8143.667552769195ort.col_5in ( 'iZhfEjRWci' , 'T' , '' ) ort.col_9<>'1976-09-11'andt.col_7=8796.436181615773andt.col_8=7372order by col_5,col_8 ) ordered_tbl group by col_6;
2. What did you expect to see? (Required)
No panic
3. What did you see instead (Required)
mysql>select var_samp(col_7) aggCol from (select/*+ use_index_merge( t ) */*from t wheret.col_9in ( '2002-06-22' ) ort.col_5in ( 'PkfzI' ) ort.col_8in ( -24874 ) andt.col_6>nullandt.col_5>'r'andt.col_9in ( '1979-09-04' ) andt.col_7<8143.667552769195ort.col_5in ( 'iZhfEjRWci' , 'T' , '' ) ort.col_9<>'1976-09-11'andt.col_7=8796.436181615773andt.col_8=7372order by col_5,col_8 ) ordered_tbl group by col_6;
ERROR 1105 (HY000): runtime error: index out of range [5] with length 5
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered:
droptable if exists t;
createtablet (a int, b int, index(a), index(b)) partition by hash (a) partitions 2;
insert into t values (1, 5);
select/*+ use_index_merge( t ) */*from t where a in (3) or b in (5) order by a;
This bug occurs when the following conditions are satisfied:
The table contains _tidb_rowid
The query has partition_union operator(partitions)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
No panic
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: