From a4986c10bf15f07fbd8708b9ed3adc3327c6e31c Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 18 Feb 2009 09:17:28 +0000 Subject: [PATCH] Patch for bug #2565948 ported to the 3.1 branch. --- ChangeLog | 4 +++- libraries/database_interface.lib.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3b4e059b..15fb2da7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index c568ba4e3..86f4a4e7b 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -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); }