v.24.3Improvement

Improvement to MySQL Compatibility Protocol for Transaction Handling

An improvement for the MySQL compatibility protocol. The issue #57598 mentions a variant behaviour regarding transaction handling. An issued COMMIT/ROLLBACK when no transaction is active is reported as an error contrary to MySQL behaviour. #60338 (PapaToemmsn).
Improves MySQL compatibility by adjusting transaction handling behavior to not report errors when COMMIT or ROLLBACK is issued without an active transaction.

Why it matters

This feature addresses a discrepancy in transaction handling between ClickHouse and MySQL. Previously, issuing COMMIT or ROLLBACK commands when no transaction was active caused an error in ClickHouse, unlike MySQL which allows it without error. This improvement enhances compatibility for users migrating or integrating systems using the MySQL protocol.

How to use it

Users benefit from this feature automatically when using the MySQL compatibility protocol; no special configuration is required. Simply issue COMMIT or ROLLBACK commands as usual, and ClickHouse will handle them without errors if no transaction is active, matching MySQL behavior.