forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#34357 from kssenii/fix-clickhouse-local…
…-use-db Fix USE database for clickhouse-local
- Loading branch information
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/queries/0_stateless/02206_clickhouse_local_use_database.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SHOW TABLES; | ||
CREATE DATABASE test1; | ||
CREATE TABLE test1.table1 (a Int32) ENGINE=Memory; | ||
USE test1; | ||
SHOW TABLES; | ||
table1 | ||
CREATE DATABASE test2; | ||
USE test2; | ||
SHOW TABLES; | ||
USE test1; | ||
SHOW TABLES; | ||
table1 |
19 changes: 19 additions & 0 deletions
19
tests/queries/0_stateless/02206_clickhouse_local_use_database.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
# shellcheck source=../shell_config.sh | ||
. "$CURDIR"/../shell_config.sh | ||
|
||
|
||
$CLICKHOUSE_LOCAL --echo --multiline --multiquery -q """ | ||
SHOW TABLES; | ||
CREATE DATABASE test1; | ||
CREATE TABLE test1.table1 (a Int32) ENGINE=Memory; | ||
USE test1; | ||
SHOW TABLES; | ||
CREATE DATABASE test2; | ||
USE test2; | ||
SHOW TABLES; | ||
USE test1; | ||
SHOW TABLES; | ||
""" |