Skip to content

Commit 29d521b

Browse files
committed
QA: Cacti#5180 - database default
1 parent cf60b85 commit 29d521b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/audit_database.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function plugin_installed($plugin) {
310310
}
311311

312312
function repair_database($run = true) {
313-
global $altersopt;
313+
global $altersopt, $database_default;
314314

315315
$alters = report_audit_results(false);
316316

@@ -321,9 +321,9 @@ function repair_database($run = true) {
321321
foreach($alters as $table => $changes) {
322322
$tblinfo = db_fetch_row_prepared('SELECT ENGINE, SUBSTRING_INDEX(TABLE_COLLATION, "_", 1) AS COLLATION
323323
FROM information_schema.tables
324-
WHERE TABLE_SCHEMA="cacti"
324+
WHERE TABLE_SCHEMA = ?
325325
AND TABLE_NAME = ?',
326-
array($table));
326+
array($database_default, $table));
327327

328328
if ($tblinfo['ENGINE'] == 'MyISAM') {
329329
$suffix = ",\n ENGINE=InnoDB ROW_FORMAT=Dynamic CHARSET=" . $tblinfo['COLLATION'];

0 commit comments

Comments
 (0)