From 08a68482a460a45827fba90de74750fe0269881d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 16 Oct 2018 22:36:06 -0700 Subject: [PATCH] rdbms: do not treat SAVEPOINT and RELEASE SAVEPOINT as write queries Change-Id: Ib5d15d90260f30d08f3641a7fb36d82d363b012c --- includes/libs/rdbms/database/Database.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 + ); } /** -- 2.20.1