v.20.9Improvement
MySQL Handler Returns OK for Ignored SET Statements After Handshake
MySQL handler returnsOKfor queries likeSET @@var = value. Such statement is ignored. It is needed because some MySQL drivers sendSET @@query for setup after handshake https://github.com/ClickHouse/ClickHouse/issues/9336#issuecomment-686222422 . #14469 (BohuTANG).
Why it matters
Some MySQL drivers sendSET @@ queries to configure session variables after the handshake. Previously, these queries could cause issues since ClickHouse did not handle them properly. This feature ensures compatibility with such MySQL clients by silently accepting and ignoring these configuration statements, improving interoperability.How to use it
No explicit user action is required to enable this behavior. When using the MySQL protocol handler in ClickHouse, queries likeSET @@var = value will automatically return OK without affecting query execution.