Skip to content

Commit 4bc8f6a

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2 parents 0f559f0 + 22948b7 commit 4bc8f6a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/Advisory/Advisor.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,22 @@ private function replaceVariable(array $matches): string
369369
*/
370370
private function evaluateRuleExpression(string $expression): mixed
371371
{
372-
return $this->expression->evaluate($expression, array_merge($this->variables, $this->globals));
372+
$variables = array_merge($this->variables, $this->globals);
373+
374+
// Set default values for missing InnoDB variables when InnoDB is disabled
375+
if (! isset($variables['innodb_buffer_pool_size'])) {
376+
$variables['innodb_buffer_pool_size'] = 0;
377+
}
378+
379+
if (! isset($variables['innodb_log_file_size'])) {
380+
$variables['innodb_log_file_size'] = 0;
381+
}
382+
383+
if (! isset($variables['innodb_log_files_in_group'])) {
384+
$variables['innodb_log_files_in_group'] = 0;
385+
}
386+
387+
return $this->expression->evaluate($expression, $variables);
373388
}
374389

375390
/**

0 commit comments

Comments
 (0)