From 2cc3382a4627b16437704146e97a2940a11540b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 21 Apr 2017 09:44:55 +0300 Subject: [PATCH] Add JDBC batch execution limitation to documentation Readwritesplit doesn't properly handle batched statement execution in 2.1.3. This is now reflected by the limitations document. --- Documentation/About/Limitations.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/About/Limitations.md b/Documentation/About/Limitations.md index e622d6194..286d2454b 100644 --- a/Documentation/About/Limitations.md +++ b/Documentation/About/Limitations.md @@ -118,6 +118,17 @@ Read queries are routed to the master server in the following situations: * if there are multiple statements inside one query e.g. `INSERT INTO ... ; SELECT LAST_INSERT_ID();` +#### JDBC Batched Statements + +Readwritesplit does not support execution of JDBC batched statements with +non-INSERT statements mixed in it. This is caused by the fact that +readwritesplit expects that the protocol is idle before another command is sent. + +Most clients conform to this expectation but some JDBC drivers send multiple +requests without waiting for the protocol to be idle. If you are using the +MariaDB Connector/J, add `useBatchMultiSend=false` to the JDBC connection string +to disable batched statement execution. + #### Backend write timeout handling The backend connections opened by readwritesplit will not be kept alive if they