mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-22 16:35:30 +01:00
Add TCL test for self ambiguous join
This commit is contained in:
@@ -1074,3 +1074,23 @@ do_execsql_test_on_specific_db {:memory:} rowid-select-from-clause-subquery-expl
|
||||
SELECT rowid,a FROM (SELECT rowid,a FROM t);
|
||||
} {1|abc}
|
||||
|
||||
# https://github.com/tursodatabase/turso/issues/3505 regression test
|
||||
do_execsql_test_in_memory_any_error ambiguous-self-join {
|
||||
CREATE TABLE T(a);
|
||||
INSERT INTO t VALUES (1), (2), (3);
|
||||
SELECT * fROM t JOIN t;
|
||||
}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} unambiguous-self-join {
|
||||
CREATE TABLE T(a);
|
||||
INSERT INTO t VALUES (1), (2), (3);
|
||||
SELECT * fROM t as ta JOIN t order by ta.a;
|
||||
} {1|1
|
||||
1|2
|
||||
1|3
|
||||
2|1
|
||||
2|2
|
||||
2|3
|
||||
3|1
|
||||
3|2
|
||||
3|3}
|
||||
|
||||
Reference in New Issue
Block a user