summaryrefslogtreecommitdiff
path: root/mysql-test/include/ps_query.inc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-11-20 19:18:21 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-11-20 19:18:21 +0200
commit870d46819e517ec9dcd7b0e077147c69dbafa929 (patch)
treeb567ffec12a992784efcb1e8e99b2b7d6c19a69f /mysql-test/include/ps_query.inc
parent86744a32d659463c5cc0b56537c23efe14c480b5 (diff)
downloadmariadb-git-870d46819e517ec9dcd7b0e077147c69dbafa929.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. mysql-test/include/ps_query.inc: Bug #32400: fixed old test queries mysql-test/r/ps_2myisam.result: Bug #32400: fixed old test queries mysql-test/r/ps_3innodb.result: Bug #32400: fixed old test queries mysql-test/r/ps_4heap.result: Bug #32400: fixed old test queries mysql-test/r/ps_5merge.result: Bug #32400: fixed old test queries mysql-test/r/ps_6bdb.result: Bug #32400: fixed old test queries mysql-test/r/ps_7ndb.result: Bug #32400: fixed old test queries mysql-test/r/subselect.result: Bug #32400: test case mysql-test/t/subselect.test: Bug #32400: test case sql/item.cc: Bug #32400: don't allow references to aliases in WHERE tests/mysql_client_test.c: Bug #32400: fixed old test queries
Diffstat (limited to 'mysql-test/include/ps_query.inc')
-rw-r--r--mysql-test/include/ps_query.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc
index e96d666eaec..ae6027a0e07 100644
--- a/mysql-test/include/ps_query.inc
+++ b/mysql-test/include/ps_query.inc
@@ -434,8 +434,8 @@ execute stmt1 ;
let $1= 3 ;
while ($1)
{
- prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
- (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
+ prepare stmt1 from ' 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) ';
execute stmt1 ;
deallocate prepare stmt1 ;
dec $1 ;