cache MySQL version info

This commit is contained in:
Sebastian Mendel
2008-01-21 11:19:21 +00:00
parent bd501a302b
commit 6174b881c5

View File

@@ -805,6 +805,10 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null
function PMA_DBI_postConnect($link, $is_controluser = false)
{
if (! defined('PMA_MYSQL_INT_VERSION')) {
if (isset($_SESSION['PMA_MYSQL_INT_VERSION'])) {
define('PMA_MYSQL_INT_VERSION', $_SESSION['PMA_MYSQL_INT_VERSION']);
define('PMA_MYSQL_STR_VERSION', $_SESSION['PMA_MYSQL_STR_VERSION']);
} else {
$mysql_version = PMA_DBI_fetch_value(
'SELECT VERSION()', 0, 0, $link, PMA_DBI_QUERY_STORE);
if ($mysql_version) {
@@ -818,6 +822,9 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
define('PMA_MYSQL_INT_VERSION', 50015);
define('PMA_MYSQL_STR_VERSION', '5.00.15');
}
$_SESSION['PMA_MYSQL_INT_VERSION'] = PMA_MYSQL_INT_VERSION;
$_SESSION['PMA_MYSQL_STR_VERSION'] = PMA_MYSQL_STR_VERSION;
}
}
if (! empty($GLOBALS['collation_connection'])) {