Details
Description
The following SQL ends up being stored in the session command history if it's in one COM_QUERY:
SET autocommit=1; UPDATE test.t1 SET a = 1;
|
The result of this is that upon reconnection, the whole query may be executed again, resulting in writes being sent to other servers than the master and potentially re-executing it again even on the master.
The reason for this is that the QueryClassifier class doesn't correctly initialize a variable that controls whether the multi-statement detection is done or not. Additionally, the client protocol code returns the wrong value from a callback that would flag the query as a write even if the multi-statement code was correct.
Attachments
Issue Links
- relates to
-
MXS-5190 dotnet EntityFrameworkCore generates insert queries that are getting routed to all nodes as session write
- Closed