diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 192cf0ec6..c1b34e073 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -985,10 +985,12 @@ function PMA_DBI_postConnect($link, $is_controluser = false) PMA_cacheSet('PMA_MYSQL_MAJOR_VERSION', PMA_MYSQL_MAJOR_VERSION, true); PMA_cacheSet('PMA_MYSQL_STR_VERSION', PMA_MYSQL_STR_VERSION, true); } + // detect Drizzle by version number (year.month.day.?patch-version) + define('PMA_DRIZZLE', PMA_MYSQL_MAJOR_VERSION >= 2009); } /* Skip charsets for Drizzle */ - if (PMA_MYSQL_MAJOR_VERSION < 2009) { + if (!PMA_DRIZZLE) { if (! empty($GLOBALS['collation_connection'])) { PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE); PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE); diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 5663dd92c..4f5ca46e0 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -11,7 +11,7 @@ if (! defined('PHPMYADMIN')) { /** * */ -if (PMA_MYSQL_MAJOR_VERSION >= 2009) { +if (PMA_DRIZZLE) { /* There are no charsets in Drizzle */ $GLOBALS['mysql_charsets'] = array(); $GLOBALS['mysql_charsets_descriptions'] = array('utf8' => 'UTF-8 Unicode'); diff --git a/main.php b/main.php index c29a508c6..6943c32e6 100644 --- a/main.php +++ b/main.php @@ -97,7 +97,7 @@ if ($server > 0 './user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class); } } // end if - if (PMA_MYSQL_MAJOR_VERSION < 2009) { + if (PMA_DRIZZLE) { echo '