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)