summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorserg@serg.mylan <>2003-11-28 12:49:58 +0100
committerserg@serg.mylan <>2003-11-28 12:49:58 +0100
commit3b49d34f9764d3baa495705795c0cd8790b21166 (patch)
tree1cb27f26ea199bac52cd0ae788a09db5d4c2964c /mysql-test
parent38b140fb0976872876cc883c894b95540304a7ec (diff)
parent16e5b4f0ba9db861585a0667fdee1dae1cc1e267 (diff)
downloadmariadb-git-3b49d34f9764d3baa495705795c0cd8790b21166.tar.gz
merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/order_by.result4
-rw-r--r--mysql-test/t/order_by.test8
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index db747e3a7eb..a37f7e3c485 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -580,3 +580,7 @@ FieldKey LongVal StringVal
3 2 1
3 3 3
DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT);
+SET @id=0;
+UPDATE t1 SET a=0 ORDER BY (a=@id), b;
+DROP TABLE t1;
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 702feedc3ce..ca4143fa1c9 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -365,3 +365,11 @@ SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
DROP TABLE t1;
+#
+# Bug #1945 - Crashing bug with bad User Variables in UPDATE ... ORDER BY ...
+#
+CREATE TABLE t1 (a INT, b INT);
+SET @id=0;
+UPDATE t1 SET a=0 ORDER BY (a=@id), b;
+DROP TABLE t1;
+