mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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 ;
|
||||
|
Reference in New Issue
Block a user