-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for UNKNOWN DATABASE
exception
#344
Conversation
… target DB. `runQuery()` tries to execute `CREATE DATABASE` statement within an absent context. We can use multistatement to execute `CREATE DATABASE` query within a `system` DB context
@IlyaTsoi can u please check why the test u added is failing, please pull latest from develop. |
I did try) But I can't reproduce this error in my environment, test passes successfully. |
instead of localhost and 8123, you should get the host and port from clickHouseContainer.
|
This reverts commit 7353ef1.
|
||
@Container | ||
private ClickHouseContainer clickHouseContainer = new ClickHouseContainer("clickhouse/clickhouse-server:latest") | ||
.withInitScript("./init_clickhouse.sql");; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra semicolon
We get a
UNKNOWN DATABASE
exception because a connection string uses target DB.runQuery()
tries to executeCREATE DATABASE
statement within an absent context. We can use multistatement as a workaround to executeCREATE DATABASE
query within asystem
DB context