Patch for bug #2565948 ported to the 3.1 branch.

This commit is contained in:
Alexander M. Turek
2009-02-18 09:17:28 +00:00
parent 80a1c191bb
commit a4986c10bf
2 changed files with 5 additions and 3 deletions

View File

@@ -26,7 +26,9 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2568722 [designer] Compound key not shown
- patch #2550323 [XHTML] in server_databases.php, thanks to Virsacer - virsacer
- patch #2358861 [navi] Row count tooltip wrong for information_schema,
thanks to Herman van Rink - helmo
thanks to Herman van Rink - helmo
- bug #2565948 [core] Changing the connection collation changed the client
charset.
3.1.2.0 (2009-01-19)
- bug #1253252 [display] Can't NULL a column with relation defined

View File

@@ -850,9 +850,9 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
}
if (! empty($GLOBALS['collation_connection'])) {
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
$mysql_charset = explode('_', $GLOBALS['collation_connection']);
PMA_DBI_query("SET NAMES '" . $mysql_charset[0] . "' COLLATE '" . $GLOBALS['collation_connection'] . "';",
$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);
}