Issue 8550: Check for a good table_definition cache value

This commit is contained in:
Michael 2020-04-29 06:28:06 +00:00
parent 4991fa4e27
commit 6487daa4a9
3 changed files with 36 additions and 0 deletions

View file

@ -1645,6 +1645,21 @@ class Database
return (["list" => $statelist, "amount" => $processes]);
}
/**
* Fetch a database variable
*
* @param string $name
* @return string content
*/
public function getVariable(string $name)
{
$result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name);
if (!isset($result['Value'])) {
return null;
}
return $result['Value'];
}
/**
* Checks if $array is a filled array with at least one entry.
*