Skip to content

Write through Poco::Exception exception to MySQL protocol client#12383

Merged
alexey-milovidov merged 7 commits intoClickHouse:masterfrom
bohutang:mysql_write_through_poco_exception
Jul 11, 2020
Merged

Write through Poco::Exception exception to MySQL protocol client#12383
alexey-milovidov merged 7 commits intoClickHouse:masterfrom
bohutang:mysql_write_through_poco_exception

Conversation

@bohutang
Copy link
Copy Markdown
Contributor

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Write the detail exception message to the client instead of 'MySQL server has gone away'

Detailed description / Documentation draft:

...

By adding documentation, you'll allow users to try your new feature immediately, not when someone else will have time to document it later. Documentation is necessary for all features that affect user experience in any way. You can add brief documentation draft above, or add documentation right into your patch as Markdown files in docs folder.

If you are doing this for the first time, it's recommended to read the lightweight Contributing to ClickHouse Documentation guide first.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Jul 10, 2020
@bohutang bohutang marked this pull request as ready for review July 10, 2020 06:30
Comment thread src/Server/MySQLHandler.cpp Outdated
log->log(exc);
packet_sender->sendPacket(ERR_Packet(exc.code(), "00000", exc.message()), true);
}
catch (const Poco::Exception & exc)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also std::exception and unknown exceptions?

PS. We can do it in more generic way: catch (...) and getCurrentExceptionCode, getCurrentExceptionMessage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, thanks for the advice, has been updated.

@alexey-milovidov alexey-milovidov merged commit 160dcf7 into ClickHouse:master Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-docs-needed pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants