From 69b98b42e2977f93c6eb70f85001e7dc510c5f84 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 9 Feb 2009 15:25:54 +0000 Subject: [PATCH] Bug #2565948 --- ChangeLog | 4 +++- libraries/database_interface.lib.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index be15c8e4d..d5628ae0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,7 +23,9 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Virsacer - virsacer + patch #2506831 [privileges] Create user for existing database, thanks to Herman van Rink and Virsacer -+ patch #2505255 [privileges] Cleanup, thanks to Virsacer - virsacer ++ patch #2505255 [privileges] Cleanup, thanks to Virsacer - virsacer ++ bug #2565948 [core] Changing the connection collation changed the client + charset. 3.1.3.0 (not yet released) + [lang] Turkish update, thanks to Burak Yavuz diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 7e5ad4540..cdcb4e8dd 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -906,9 +906,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); }