summaryrefslogtreecommitdiff
path: root/mysql-test/t/order_by.test
diff options
context:
space:
mode:
authorigor@hundin.mysql.fi <>2003-04-26 14:54:53 +0300
committerigor@hundin.mysql.fi <>2003-04-26 14:54:53 +0300
commitb6534b667f4dbf4f93feeadd1f528eab5b79193b (patch)
tree80c95d09cfb07015bb056bcb2e03eca60324902c /mysql-test/t/order_by.test
parent2ad37c06325604e371c0faa1a80f1d64d2e187dd (diff)
downloadmariadb-git-b6534b667f4dbf4f93feeadd1f528eab5b79193b.tar.gz
filesort.cc, order_by.result:
Fixed bug 263 order_by.test: Fixed bug 263
Diffstat (limited to 'mysql-test/t/order_by.test')
-rw-r--r--mysql-test/t/order_by.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 06a5d0ceb20..1fb83509ebb 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -331,3 +331,17 @@ INSERT INTO t2 (numeropost,pseudo) VALUES (1,'joce'),(1,'bug');
SELECT titre,t1.numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
SELECT titre,t1.numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
drop table t1,t2;
+
+#
+# Test order by with NULL values
+#
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1, 2);
+INSERT INTO t1 VALUES (3, 4);
+INSERT INTO t1 VALUES (5, NULL);
+SELECT * FROM t1 ORDER BY b;
+SELECT * FROM t1 ORDER BY b DESC;
+SELECT * FROM t1 ORDER BY (a + b);
+SELECT * FROM t1 ORDER BY (a + b) DESC;
+DROP TABLE t1;
+