summaryrefslogtreecommitdiff
path: root/mysql-test/r/order_by.result
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2004-09-30 16:28:17 +0400
committerdlenev@brandersnatch.localdomain <>2004-09-30 16:28:17 +0400
commit0aa589d0998b41f3e0f55e1f62e86ec8d9d17ba9 (patch)
tree869403a16f8b3c117fed13dae2bac7e2f7ab89b6 /mysql-test/r/order_by.result
parent36548b10ca2d796c46436ab445569f6e0476ecaf (diff)
downloadmariadb-git-0aa589d0998b41f3e0f55e1f62e86ec8d9d17ba9.tar.gz
Final solution for bug# 4302 "Ambiguos order by when renamed column is
identical to another in result" According to SQL standard queries like "select t1.a as col from t1, t2 order by a" should return an error if both tables contain field a.
Diffstat (limited to 'mysql-test/r/order_by.result')
-rw-r--r--mysql-test/r/order_by.result9
1 files changed, 3 insertions, 6 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 69ce69ad499..94d56bbc2fa 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -680,6 +680,9 @@ order by col;
ERROR 23000: Column 'col' in order clause is ambiguous
select col1 from t1, t2 where t1.col1=t2.col2 order by col;
ERROR 23000: Column 'col' in order clause is ambiguous
+select t1.col as t1_col, t2.col2 from t1, t2 where t1.col1=t2.col2
+order by col;
+ERROR 23000: Column 'col' in order clause is ambiguous
select t1.col as t1_col, t2.col from t1, t2 where t1.col1=t2.col2
order by col;
t1_col col
@@ -696,12 +699,6 @@ col col2
1 3
2 2
3 1
-select t1.col as t1_col, t2.col2 from t1, t2 where t1.col1=t2.col2
-order by col;
-t1_col col2
-1 1
-2 2
-3 3
select t2.col2, t2.col, t2.col from t2 order by col;
col2 col col
3 1 1