summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-11-20 19:18:21 +0200
committergkodinov/kgeorge@magare.gmz <>2007-11-20 19:18:21 +0200
commit846cbf3cd07eca4f8a81c038a705bff5dd7d513a (patch)
treeb567ffec12a992784efcb1e8e99b2b7d6c19a69f /tests
parent7ab844c905b2b3d0eef40d21550c6f3ae3775abf (diff)
downloadmariadb-git-846cbf3cd07eca4f8a81c038a705bff5dd7d513a.tar.gz
Bug #32400: Complex SELECT query returns correct result
only on some occasions Referencing an element from the SELECT list in a WHERE clause is not permitted. The namespace of the WHERE clause is the table columns only. This was not enforced correctly when resolving outer references in sub-queries. Fixed by not allowing references to aliases in a sub-query in WHERE.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 65e18da97f1..823878db23d 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -9283,7 +9283,7 @@ static void test_subqueries_ref()
{
MYSQL_STMT *stmt;
int rc, i;
- const char *query= "SELECT a as ccc from t1 where a+1=(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1)";
+ const char *query= "SELECT a as ccc from t1 outr where a+1=(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1)";
myheader("test_subqueries_ref");