You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
sql cannot read error msg by mysql client if table is on cluster
Does it reproduce on recent release?
server: clickhouse 21.2.4.6
client: mysql client 8.0.20、msyql client 5.7.26 access through mysql_port
How to reproduce
create table on cluster
CREATE TABLE `test`.`t7_all` ON CLUSTER cluster_1 (`id` Int64, `createtime` Date) ENGINE = ReplicatedMergeTree('/clickhouse/cluster1/{layer}-{shard}/t7', '{replica}') PARTITION BY createtime ORDER BY id SETTINGS index_granularity=8192;
create table names test.t7_all again
CREATE TABLE `test`.`t7_all` ON CLUSTER cluster_1 (`id` Int64, `createtime` Date) ENGINE = ReplicatedMergeTree('/clickhouse/cluster1/{layer}-{shard}/t7', '{replica}') PARTITION BY createtime ORDER BY id SETTINGS index_granularity=8192;
Expected behavior
mysql client get error message same with clickhouse client: Table test.t7_all already exists
Error message and/or stacktrace
mysql client cannot read err message and report:
Lost connection to MySQL server during query
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
The reason is that ClickHouse sends ERR_Packet with incorrect sequence number, so MySQL client does not recognize it as a part of COM_QUERY_Response and resets connection. It happens if exception is thrown during query execution:
mysql> select throwIf(number) from numbers(2) settings max_block_size=1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
I will try to fix it
tavplubix
changed the title
mysql protocol not support error code with table on cluster
mysql protocol does not support error during query execution
Jul 6, 2021
Describe the bug
sql cannot read error msg by mysql client if table is on cluster
Does it reproduce on recent release?
server: clickhouse 21.2.4.6
client: mysql client 8.0.20、msyql client 5.7.26 access through mysql_port
How to reproduce
test
.t7_all
againExpected behavior
mysql client get error message same with clickhouse client: Table test.t7_all already exists
Error message and/or stacktrace
mysql client cannot read err message and report:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: