From: Aaron Schulz Date: Wed, 17 Oct 2018 05:36:06 +0000 (-0700) Subject: rdbms: do not treat SAVEPOINT and RELEASE SAVEPOINT as write queries X-Git-Tag: 1.34.0-rc.0~3743^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=08a68482a460a45827fba90de74750fe0269881d;p=lhc%2Fweb%2Fwiklou.git rdbms: do not treat SAVEPOINT and RELEASE SAVEPOINT as write queries Change-Id: Ib5d15d90260f30d08f3641a7fb36d82d363b012c --- diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 68d4c9aa87..3d23a83d4f 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -1052,7 +1052,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // that transactions by themselves don't make changes, only actual writes // within the transaction matter, which we still detect. return !preg_match( - '/^(?:SELECT|BEGIN|ROLLBACK|COMMIT|SET|SHOW|EXPLAIN|\(SELECT)\b/i', $sql ); + '/^(?:SELECT|BEGIN|ROLLBACK|COMMIT|SAVEPOINT|RELEASE|SET|SHOW|EXPLAIN|\(SELECT)\b/i', + $sql + ); } /**