Skip to content

Commit e2ff85b

Browse files
Merge pull request #19283 from liviuconcioiu/18897
Fix #18897 - Unknown storage engine InnoDB
2 parents 29018a5 + 43f114a commit e2ff85b

3 files changed

Lines changed: 6 additions & 12 deletions

File tree

libraries/classes/Database/Routines.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ public function flushPrivileges($flushPrivileges)
405405
{
406406
if ($flushPrivileges) {
407407
// Flush the Privileges
408-
$flushPrivQuery = 'FLUSH PRIVILEGES;';
409-
$this->dbi->query($flushPrivQuery);
408+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
410409

411410
$message = Message::success(
412411
__(

libraries/classes/Operations.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ public function adjustPrivilegesMoveDb($oldDb, $newname): void
345345
$this->dbi->query($query_proc_specific);
346346

347347
// Finally FLUSH the new privileges
348-
$flush_query = 'FLUSH PRIVILEGES;';
349-
$this->dbi->query($flush_query);
348+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
350349
}
351350

352351
/**
@@ -442,8 +441,7 @@ public function adjustPrivilegesCopyDb($oldDb, $newname): void
442441
}
443442

444443
// Finally FLUSH the new privileges
445-
$flush_query = 'FLUSH PRIVILEGES;';
446-
$this->dbi->query($flush_query);
444+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
447445
}
448446

449447
/**
@@ -816,8 +814,7 @@ public function adjustPrivilegesRenameOrMoveTable($oldDb, $oldTable, $newDb, $ne
816814
$this->dbi->query($query_col_specific);
817815

818816
// Finally FLUSH the new privileges
819-
$flush_query = 'FLUSH PRIVILEGES;';
820-
$this->dbi->query($flush_query);
817+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
821818
}
822819

823820
/**
@@ -871,8 +868,7 @@ public function adjustPrivilegesCopyTable($oldDb, $oldTable, $newDb, $newTable):
871868
}
872869

873870
// Finally FLUSH the new privileges
874-
$flush_query = 'FLUSH PRIVILEGES;';
875-
$this->dbi->query($flush_query);
871+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
876872
}
877873

878874
/**

libraries/classes/Server/Privileges.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,8 +2477,7 @@ public function updateMessageForReload(): ?Message
24772477
{
24782478
$message = null;
24792479
if (isset($_GET['flush_privileges'])) {
2480-
$sqlQuery = 'FLUSH PRIVILEGES;';
2481-
$this->dbi->query($sqlQuery);
2480+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
24822481
$message = Message::success(
24832482
__('The privileges were reloaded successfully.')
24842483
);

0 commit comments

Comments
 (0)