1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a faulty assert() in the "AS" alias resolution logic of the parser.

FossilOrigin-Name: b5e43602833249aa4b73337bf85b7f308450dab6
This commit is contained in:
drh
2015-04-23 13:37:05 +00:00
parent 00808deed0
commit 41148f83c4
4 changed files with 19 additions and 11 deletions

View File

@ -11,10 +11,12 @@
#
# This file tests features of the name resolver (the component that
# figures out what identifiers in the SQL statement refer to) that
# were fixed by ticket [2500cdb9be]
# were fixed by ticket [2500cdb9be].
#
# See also tickets [1c69be2daf] and [f617ea3125] from 2013-08-14.
#
# Also a fuzzer-discovered problem on 2015-04-23.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -201,6 +203,12 @@ do_execsql_test resolver01-6.3 {
GROUP BY lower(name);
} {1 {} 1 {}}
do_execsql_test resolver01-7.1 {
SELECT 2 AS x WHERE (SELECT x AS y WHERE 3>y);
} {2}
do_execsql_test resolver01-7.2 {
SELECT 2 AS x WHERE (SELECT x AS y WHERE 1>y);
} {}