From d1959549fe8694123cca229feb0c9e663268d737 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 21 Apr 2017 12:31:21 +0300 Subject: [PATCH] Update limitations document Add note about prepared statements, transaction state and autocommit mode. --- Documentation/About/Limitations.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/About/Limitations.md b/Documentation/About/Limitations.md index 943424845..e622d6194 100644 --- a/Documentation/About/Limitations.md +++ b/Documentation/About/Limitations.md @@ -21,6 +21,28 @@ collect columns, functions and tables used in the `SELECT` defining the Consequently, the database firewall will **not** block `WITH` statements where the `SELECT` of the `WITH` clause refers to forbidden columns. +## Prepared Statements + +For its proper functioning, MaxScale needs in general to be aware of the +transaction state and _autocommit_ mode. In order to be that, MaxScale +parses statements going through it. + +However, if a transaction is commited or rolled back, or the autocommit +mode is changed using a prepared statement, MaxScale will miss that and its +internal state will be incorrect, until the transaction state or autocommit +mode is changed using an explicit statement. + +For instance, after the following sequence of commands, MaxScale will still +think _autocommit_ is on: +``` +set autocommit=1 +PREPARE hide_autocommit FROM "set autocommit=0" +EXECUTE hide_autocommit +``` + +To ensure that MaxScale functions properly, do not commit or rollback a +transaction or change the autocommit mode using a prepared statement. + ## Protocol limitations ### Limitations with MySQL Protocol support (MySQLClient)