--- /home/ycp/source/mysql-server/src/mysql-test/suite/gcol/r/order_by_subst.result	2025-05-15 06:41:27.774322811 +0300
+++ /home/ycp/source/mysql-server/build/mysql-test/var/log/order_by_subst.reject	2025-05-15 06:42:10.505802235 +0300
@@ -1,45 +1,71 @@
 #
 # MDEV-36132 Optimizer support for functional indexes: handle GROUP/ORDER BY
 #
+create table s (c int);
+insert into s values (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
 create table t (c int, key (c));
-insert into t select seq from seq_1_to_10000;
+insert into t select 1 + s1.c + s2.c * 10 + s3.c * 100 + s4.c * 1000 from s s1, s s2, s s3, s s4;
 alter table t
 add column vc int as (c + 1),
 add index(vc);
 explain select c from t order by c;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	c	5	NULL	10000	Using index
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	c	5	NULL	9980	100.00	Using index
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`c` AS `c` from `test`.`t` order by `test`.`t`.`c`
 explain select vc from t order by vc;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	vc	5	NULL	10000	Using index
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	vc	5	NULL	9980	100.00	Using index
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`vc` AS `vc` from `test`.`t` order by `test`.`t`.`vc`
 explain select vc from t order by vc limit 10;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	vc	5	NULL	10	Using index
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	vc	5	NULL	10	100.00	Using index
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`vc` AS `vc` from `test`.`t` order by `test`.`t`.`vc` limit 10
 explain select c + 1 from t order by c + 1;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	c	5	NULL	10000	Using index; Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select (`test`.`t`.`c` + 1) AS `c + 1` from `test`.`t` order by (`test`.`t`.`c` + 1)
 explain select c + 1 from t order by vc;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	10000	Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select (`test`.`t`.`c` + 1) AS `c + 1` from `test`.`t` order by `test`.`t`.`vc`
 explain select vc from t order by c + 1;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	10000	Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`vc` AS `vc` from `test`.`t` order by (`test`.`t`.`c` + 1)
 explain select vc from t order by c;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	10000	Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`vc` AS `vc` from `test`.`t` order by `test`.`t`.`c`
 explain select c from t order by vc;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	10000	Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`c` AS `c` from `test`.`t` order by `test`.`t`.`vc`
 explain select c from t order by c + 1;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	c	5	NULL	10000	Using index; Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	ALL	NULL	NULL	NULL	NULL	9980	100.00	Using filesort
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`c` AS `c` from `test`.`t` order by (`test`.`t`.`c` + 1)
 explain select vc from t order by c + 1 limit 2;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	10000	Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	vc	5	NULL	2	100.00	NULL
+Warnings:
+Note	1003	/* select#1 */ select `test`.`t`.`vc` AS `vc` from `test`.`t` order by (`test`.`t`.`c` + 1) limit 2
 explain select c + 1 from t order by c + 1 limit 2;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	c	5	NULL	10000	Using index; Using filesort
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	vc	5	NULL	2	100.00	NULL
+Warnings:
+Note	1003	/* select#1 */ select (`test`.`t`.`c` + 1) AS `c + 1` from `test`.`t` order by (`test`.`t`.`c` + 1) limit 2
 explain select c + 1 from t order by vc limit 2;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t	index	NULL	vc	5	NULL	2	
+id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t	NULL	index	NULL	vc	5	NULL	2	100.00	NULL
+Warnings:
+Note	1003	/* select#1 */ select (`test`.`t`.`c` + 1) AS `c + 1` from `test`.`t` order by `test`.`t`.`vc` limit 2
 drop table t;
