Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

alias used on a expression in the same projection should fail always #590

Closed
ajnavarro opened this issue Jan 17, 2019 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ajnavarro
Copy link
Contributor

the following query:

select 
    language(blob_content, file_path) as lang, 
    substring(lang,1,1) as result
from refs 
NATURAL JOIN commits 
NATURAL JOIN commit_files 
NATURAL JOIN files 
where lang != '' limit 100;

Is returning results, but it should fail with the following error:
ERROR 1105 (HY000): unknown error: column "lang" does not exist in scope, but there is an alias defined in this projection with that name. Aliases cannot be used in the same projection they're defined in

@ajnavarro ajnavarro added the bug Something isn't working label Jan 17, 2019
@mcarmonaa mcarmonaa self-assigned this Jan 23, 2019
mcarmonaa added a commit to mcarmonaa/go-mysql-server that referenced this issue Jan 29, 2019
 src-d#590]

Signed-off-by: Manuel Carmona <manu.carmona90@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants