More reliable Drizzle detection
Checking version is not working since Drizzle has changed versioning scheme. As it does not support charsets, checking whether server supports these seems to be better approach. Also see https://bugs.launchpad.net/drizzle/+bug/951788
This commit is contained in:
parent
7365676ce0
commit
37781045a4
@ -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:
|
||||
// <year>.<month>.<build number>(.<patch rev)
|
||||
define('PMA_DRIZZLE', PMA_MYSQL_MAJOR_VERSION >= 2009);
|
||||
|
||||
// Skip charsets for Drizzle
|
||||
if (!PMA_DRIZZLE) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user