summaryrefslogtreecommitdiff
path: root/mysql-test/main/order_by.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 16:03:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 16:03:53 +0300
commitf4425d3a3dbe5638daceb41dca4dfdb5eba1ffaf (patch)
tree88134dff388f88041cd557eb53bc262667f51f96 /mysql-test/main/order_by.test
parentbf5c050fd28f616d789a02b0fbd6fd8ff53c78d3 (diff)
parentb8d38c5e39d526e006f4e8e8977ac4c6166bc4c6 (diff)
downloadmariadb-git-f4425d3a3dbe5638daceb41dca4dfdb5eba1ffaf.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/main/order_by.test')
-rw-r--r--mysql-test/main/order_by.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test
index fbdf193269f..4cdd8d0b1c2 100644
--- a/mysql-test/main/order_by.test
+++ b/mysql-test/main/order_by.test
@@ -2295,6 +2295,22 @@ SET max_sort_length= @save_max_sort_length;
SET sql_select_limit= @save_sql_select_limit;
DROP TABLE t1;
+--echo #
+--echo # MDEV-25682: EXPLAIN for SELECT with ORDER BY after [ORDER BY] LIMIT
+--echo #
+
+create table t1 (a int);
+insert into t1 values (3), (7), (1);
+explain (select a from t1 limit 2) order by a desc;
+(select a from t1 limit 2) order by a desc;
+
+create table t2 (a int, b int);
+insert into t2 values (3,70), (7,10), (1,40), (4,30);
+explain (select b,a from t2 order by a limit 3) order by b desc;
+(select b,a from t2 order by a limit 3) order by b desc;
+
+drop table t1,t2;
+
--echo # End of 10.2 tests
--echo #