Improved structure

This commit is contained in:
Michael 2020-05-16 09:01:54 +00:00
parent 4e1b1c0811
commit 4faef126ff

View 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;