]> git.mxchange.org Git - friendica.git/commitdiff
Improved structure
authorMichael <heluecht@pirati.ca>
Sat, 16 May 2020 09:01:54 +0000 (09:01 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 16 May 2020 09:01:54 +0000 (09:01 +0000)
src/Database/DBStructure.php

index 9f225cbb93c3ec5bcef55d4ffebcc460f3cdde8f..352e8b0f8791af06b93a7bf11e2ddf9b84db55cb 100644 (file)
@@ -1074,21 +1074,18 @@ class DBStructure
         */
        private static function isUpdating()
        {
-               $processes = DBA::select(['information_schema' => 'processlist'],
-                       ['command', 'info'], ['db' => DBA::databaseName()]);
-
                $isUpdate = false;
 
+               $processes = DBA::select(['information_schema' => 'processlist'], ['info'],
+                       ['db' => DBA::databaseName(), 'command' => ['Query', 'Execute']]);
+
                while ($process = DBA::fetch($processes)) {
-                       if (empty($process['info'])) {
-                               continue;
-                       }
                        $parts = explode(' ', $process['info']);
-                       $command = strtolower(array_shift($parts));
-                       if ($command == 'alter') {
+                       if (strtolower(array_shift($parts)) == 'alter') {
                                $isUpdate = true;
                        }
                }
+
                DBA::close($processes);
 
                return $isUpdate;