[MXS-4269] UPDATE with user variable modification is treated as a session command Created: 2022-09-01  Updated: 2022-09-05  Resolved: 2022-09-05

Status: Closed
Project: MariaDB MaxScale
Component/s: QueryClassifier, readwritesplit
Affects Version/s: 2.5.21, 6.4.1, 22.08.0
Fix Version/s: 2.5.22, 6.4.3, 22.08.1

Type: Bug Priority: Critical
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

If a write query modifies a user variable in it, the query is treated as a session command instead of being properly classified as a write. This either corrupted the replicas if GTID strict mode wasn't used or broke replication if it was in use.

The problem can be reproduced with the following query:

UPDATE test.t1 SET id = (@var := @var + 1);


Generated at Thu Feb 08 04:27:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.