diff --git a/libraries/DatabaseInterface.class.php b/libraries/DatabaseInterface.class.php index 3469f58dac..5dfe93344a 100644 --- a/libraries/DatabaseInterface.class.php +++ b/libraries/DatabaseInterface.class.php @@ -1473,6 +1473,10 @@ class PMA_DatabaseInterface 'PMA_MYSQL_VERSION_COMMENT', PMA_Util::cacheGet('PMA_MYSQL_VERSION_COMMENT', true) ); + define( + 'PMA_DRIZZLE', + PMA_Util::cacheGet('PMA_DRIZZLE', true) + ); } else { $version = $this->fetchSingleRow( 'SELECT @@version, @@version_comment', @@ -1520,11 +1524,26 @@ class PMA_DatabaseInterface PMA_MYSQL_VERSION_COMMENT, true ); + + /* Detect Drizzle - it does not support charsets */ + $charset_result = $this->query( + 'SHOW VARIABLES LIKE "character_set_results"', + $link + ); + if ($this->numRows($charset_result) == 0) { + define('PMA_DRIZZLE', true); + } else { + define('PMA_DRIZZLE', false); + } + $this->freeResult($charset_result); + + PMA_Util::cacheSet( + 'PMA_DRIZZLE', + PMA_DRIZZLE, + true + ); } } - // detect Drizzle by version number: - // ..(.= 2009); // Skip charsets for Drizzle if (!PMA_DRIZZLE) {