From 86e0f42dc75a678d1a78b0f20a179b47c0215928 Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Wed, 22 Jul 2015 07:52:58 -0400 Subject: [PATCH] bail out if we can't get a lock on schema_update --- includes/sql-schema/update.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 4bb7df7211..19b043ada1 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -31,6 +31,11 @@ if (!isset($debug)) { } } +if (!dbGetLock('schema_update')) { + echo "Schema update already in progress. Exiting"; + exit(1); +} + $insert = 0; if ($db_rev = @dbFetchCell('SELECT version FROM `dbSchema` ORDER BY version DESC LIMIT 1')) {