diff --git a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference index c79c5b1fbc7..5186cb8eeff 100644 --- a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference +++ b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference @@ -5,3 +5,4 @@ 12 11 0 1 +123 456 diff --git a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql index af62eef03ca..7480f137a65 100644 --- a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql +++ b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql @@ -6,3 +6,10 @@ select s.a + 2 as b, s.a + 1 as a from (select 10 as a) s; SELECT 0 as t FROM (SELECT 1 as t) as inn WHERE inn.t = 1; SELECT sum(value) as value FROM (SELECT 1 as value) as data WHERE data.value > 0; + +USE test; +DROP TABLE IF EXISTS test; +CREATE TABLE test (field String, not_field String) ENGINE = Memory; +INSERT INTO test (field, not_field) VALUES ('123', '456') +SELECT test.field AS other_field, test.not_field AS field FROM test; +DROP TABLE test;