Added skipped bats tests for a bug in multi db mode when joining two tables of the same name in two different databases

This commit is contained in:
Timothy Sehn
2021-10-26 12:59:01 -07:00
parent dad1ea3b14
commit 0850338a36

View File

@@ -83,3 +83,15 @@ seed_repos_with_tables_with_use_statements() {
[ "$status" -eq 0 ]
[[ "$output" =~ "$EXPECTED" ]] || false
}
@test "sql-multi-db: join on multiple databases with same name" {
seed_repos_with_tables_with_use_statements
dolt sql --multi-db-dir ./ -b -q "
USE repo1;
CREATE TABLE r2_t1 (pk BIGINT, c1 BIGINT, PRIMARY KEY(pk));
INSERT INTO r2_t1 (pk, c1) values (2,200),(3,300),(4,400);"
run dolt sql --multi-db-dir ./ -q "select * from repo1.r2_t1 join repo2.r2_t1 on repo1.r2_t1.pk=repo2.r2_t1.pk"
skip "Fails on Not unique table/alias"
[ "$status" -eq 0 ]
[[ ! $output =~ "Not unique table/alias" ]] || false
}