Skip to content

Send UNKNOWN_DATABASE to the client (via TCP)#29229

Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:send-UNKNOWN_DATABASE-to-client
Sep 26, 2021
Merged

Send UNKNOWN_DATABASE to the client (via TCP)#29229
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:send-UNKNOWN_DATABASE-to-client

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Sep 21, 2021

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Send normal Database doesn't exist error (UNKNOWN_DATABASE) to the client (via TCP) instead of Attempt to read after eof (ATTEMPT_TO_READ_AFTER_EOF)

Detailed description / Documentation draft:
Before this patch:

$ clickhouse-client --database foo -q 'select 1'
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)

After:

$ clickhouse-client --database foo -q 'select 1'
Received exception from server (version 21.11.1):
Code: 81. DB::Exception: Received from localhost:9000. DB::Exception: Database foo doesn't exist. (UNKNOWN_DATABASE)
(query: select 1)

Fixes: #26864 (cc @vitlibar)

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Sep 21, 2021
@alexey-milovidov alexey-milovidov self-assigned this Sep 21, 2021
@azat azat force-pushed the send-UNKNOWN_DATABASE-to-client branch from 4035c61 to 6107698 Compare September 21, 2021 19:10
Before this patch:

    $ clickhouse-client --database foo -q 'select 1'
    Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)

After:

    $ clickhouse-client --database foo -q 'select 1'
    Received exception from server (version 21.11.1):
    Code: 81. DB::Exception: Received from localhost:9000. DB::Exception: Database foo doesn't exist. (UNKNOWN_DATABASE)
    (query: select 1)

Fixes: ClickHouse#26864 (cc @vitlibar)
@azat
Copy link
Copy Markdown
Member Author

azat commented Sep 26, 2021

Marker check — 5 checks failed (max 5)

Will rebase to re-trigger checks on CI

@azat azat force-pushed the send-UNKNOWN_DATABASE-to-client branch from 6107698 to b3d1bfc Compare September 26, 2021 20:46
@alexey-milovidov alexey-milovidov merged commit 319e0c1 into ClickHouse:master Sep 26, 2021
@azat azat deleted the send-UNKNOWN_DATABASE-to-client branch September 27, 2021 06:47
alexey-milovidov added a commit that referenced this pull request Sep 28, 2021
Backport #29229 to 21.10: Send UNKNOWN_DATABASE to the client (via TCP)
alexey-milovidov added a commit that referenced this pull request Sep 28, 2021
Backport #29229 to 21.9: Send UNKNOWN_DATABASE to the client (via TCP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants