Do not set charset for Drizzle.

This commit is contained in:
Michal Čihař
2010-10-21 10:04:37 +02:00
parent 2c7161c7a3
commit ae7a20607d

View File

@@ -979,12 +979,15 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
} }
} }
if (! empty($GLOBALS['collation_connection'])) { /* Skip charsets for Drizzle */
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE); if (PMA_MYSQL_MAJOR_VERSION < 2009) {
$mysql_charset = explode('_', $GLOBALS['collation_connection']); if (! empty($GLOBALS['collation_connection'])) {
PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE); PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
} else { $mysql_charset = explode('_', $GLOBALS['collation_connection']);
PMA_DBI_query("SET NAMES 'utf8' COLLATE 'utf8_general_ci';", $link, PMA_DBI_QUERY_STORE); PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE);
} else {
PMA_DBI_query("SET NAMES 'utf8' COLLATE 'utf8_general_ci';", $link, PMA_DBI_QUERY_STORE);
}
} }
} }