Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.32, 11.3(EOL)
-
None
Description
Noticed when working on MDEV-27576 on a 11.3 based commit. Not sure if it is intended
create or replace table t (a int, key(a asc)) engine=innodb;
|
insert into t select seq * 2 from seq_1_to_100 order by rand(1);
|
explain select max(200 - a) from t;
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
| 1 | SIMPLE | t | index | NULL | a | 5 | NULL | 100 | Using index |
|
select max(200 - a) from t;
|
max(200 - a)
|
198
|
explain select min(200 - a) from t;
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
| 1 | SIMPLE | t | index | NULL | a | 5 | NULL | 100 | Using index |
|
select min(200 - a) from t;
|
min(200 - a)
|
0
|
h/t danblack for spotting it