Description:
Same query return inconsistent results after modifying tables' partition strategy
How to repeat:
create table if not exists t0(c0 float zerofill unique key comment 'asdf' primary key) ;
create table if not exists t1(c0 float zerofill primary key storage memory comment 'asdf' column_format default not null unique) ;
insert into t0(c0) values(436790095);
insert delayed into t0(c0) values(0.851835924302088);
alter table t1 compression 'none', stats_auto_recalc 1, row_format redundant, checksum 0, pack_keys 1, rename to t4, stats_persistent 0, disable keys, algorithm copy, force;
create table if not exists t0_oracle(c0 float zerofill unique key comment 'asdf' primary key) partition by key(c0) partitions 28;
create table if not exists t1_oracle(c0 float zerofill primary key storage memory comment 'asdf' column_format default not null unique) partition by key() partitions 94;
INSERT HIGH_PRIORITY IGNORE INTO t0_oracle(c0) VALUES('');
INSERT DELAYED INTO t0_oracle(c0) VALUES(0.851835924302088);
alter table t0 partition by key(c0) partitions 49;
alter table t4 partition by key(c0) partitions 34;
SELECT DISTINCT SUM((+ (t0.c0))) AS ref0 FROM t0 STRAIGHT_JOIN t0_oracle ON -271423304 LEFT JOIN t4 ON t0_oracle.c0;
+-------------------+
| ref0 |
+-------------------+
| 873580161.7036718 |
+-------------------+
1 row in set (0.00 sec)
alter table t0 remove partitioning;
alter table t4 remove partitioning;
SELECT DISTINCT SUM((+ (t0.c0))) AS ref0 FROM t0 STRAIGHT_JOIN t0_oracle ON -271423304 LEFT JOIN t4 ON t0_oracle.c0;
+-------------------+
| ref0 |
+-------------------+
| 873580161.7036719 |
+-------------------+
1 row in set (0.00 sec)
Description: Same query return inconsistent results after modifying tables' partition strategy How to repeat: create table if not exists t0(c0 float zerofill unique key comment 'asdf' primary key) ; create table if not exists t1(c0 float zerofill primary key storage memory comment 'asdf' column_format default not null unique) ; insert into t0(c0) values(436790095); insert delayed into t0(c0) values(0.851835924302088); alter table t1 compression 'none', stats_auto_recalc 1, row_format redundant, checksum 0, pack_keys 1, rename to t4, stats_persistent 0, disable keys, algorithm copy, force; create table if not exists t0_oracle(c0 float zerofill unique key comment 'asdf' primary key) partition by key(c0) partitions 28; create table if not exists t1_oracle(c0 float zerofill primary key storage memory comment 'asdf' column_format default not null unique) partition by key() partitions 94; INSERT HIGH_PRIORITY IGNORE INTO t0_oracle(c0) VALUES(''); INSERT DELAYED INTO t0_oracle(c0) VALUES(0.851835924302088); alter table t0 partition by key(c0) partitions 49; alter table t4 partition by key(c0) partitions 34; SELECT DISTINCT SUM((+ (t0.c0))) AS ref0 FROM t0 STRAIGHT_JOIN t0_oracle ON -271423304 LEFT JOIN t4 ON t0_oracle.c0; +-------------------+ | ref0 | +-------------------+ | 873580161.7036718 | +-------------------+ 1 row in set (0.00 sec) alter table t0 remove partitioning; alter table t4 remove partitioning; SELECT DISTINCT SUM((+ (t0.c0))) AS ref0 FROM t0 STRAIGHT_JOIN t0_oracle ON -271423304 LEFT JOIN t4 ON t0_oracle.c0; +-------------------+ | ref0 | +-------------------+ | 873580161.7036719 | +-------------------+ 1 row in set (0.00 sec)