summaryrefslogtreecommitdiff
path: root/mysql-test/r/delete.result
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2007-02-23 18:49:41 +0200
committerunknown <gkodinov/kgeorge@macbook.gmz>2007-02-23 18:49:41 +0200
commit4e4152c56f70367a98717f2329ca1b8be39c2eb0 (patch)
treeb505b29146f11fd016c6ab59c903d9eb4052ed2e /mysql-test/r/delete.result
parent1f93b0c83af4b30b90e3a71eb6f2a663375feebc (diff)
downloadmariadb-git-4e4152c56f70367a98717f2329ca1b8be39c2eb0.tar.gz
Bug #26186:
When handling DELETE ... FROM if there is no condition it is internally transformed to TRUNCATE for more efficient execution by the storage handler. The check for validity of the optional ORDER BY clause is done after the check for the above optimization and will not be performed if the optimization can be applied. Moved the validity check for ORDER BY before the optimization so it performed regardless of the optimization. mysql-test/r/delete.result: Bug #26186: test case mysql-test/t/delete.test: Bug #26186: test case sql/sql_delete.cc: Bug #26186: do validity check of the ORDER BY before deciding to skip it.
Diffstat (limited to 'mysql-test/r/delete.result')
-rw-r--r--mysql-test/r/delete.result9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index ba4e9386312..4bdf1c770d3 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -214,3 +214,12 @@ select count(*) from t1;
count(*)
0
drop table t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+DELETE FROM t1 ORDER BY x;
+ERROR 42S22: Unknown column 'x' in 'order clause'
+DELETE FROM t1 ORDER BY t2.x;
+ERROR 42S22: Unknown column 't2.x' in 'order clause'
+DELETE FROM t1 ORDER BY (SELECT x);
+ERROR 42S22: Unknown column 'x' in 'field list'
+DROP TABLE t1;