Skip to content
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

Enumerated all fields explicitly for INSERT operation #52

Merged
merged 1 commit into from
Sep 21, 2018
Merged

Enumerated all fields explicitly for INSERT operation #52

merged 1 commit into from
Sep 21, 2018

Conversation

pavel-odintsov
Copy link
Contributor

@pavel-odintsov pavel-odintsov commented Sep 20, 2018

Hello!

After Clickhouse release 18.12.14 I noticed Clickhouse server crashes and reported them to Yandex: ClickHouse/ClickHouse#3141

Alexey Milovidov found issue and it was caused by different number of fields in table and number of fields in insert operation.

But that's my case because as suggested in https://github.com/artpaul/clickhouse-cpp/issues/38 I switched to "DEFAULT" value for single field and do not populate it from INSERT operation.

In this PR I added explicit enumeration for all fields to avoid such issue. After this fix, issue disappeared and Clickhouse serveк (18.12.17) did not crash anymore.

And insert operation looks like:

2018.09.20 23:08:36.266265 [ 24 ] {27fc3e44-cdc8-4585-a705-021b448eb4d4} <Debug> executeQuery: (from 127.0.0.1:53863) INSERT INTO meta.host_metrics ( metricDateTime,host,packets_incoming,packets_outgoing,bits_incoming,bits_outgoing,flows_incoming,flows_outgoing  ) VALUES

Thank you!

@artpaul artpaul merged commit a8a2aa2 into artpaul:master Sep 21, 2018
@pavel-odintsov
Copy link
Contributor Author

pavel-odintsov commented Sep 21, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants