diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/order_by.result | 4 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 8 |
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; + |