#36879 [NEW]: Collation Charset of connection is unchangeable
| From: | dbarth at gmx dot net | Date: | Mon, 27 Mar 2006 21:56:37 +0000 |
| Subject: | #36879 [NEW]: Collation Charset of connection is unchangeable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-94938@lists.php.net to get a copy of this message | ||
From: dbarth at gmx dot net
Operating system: Mandrake
PHP version: 5.1.2
PHP Bug Type: MySQL related
Bug description: Collation Charset of connection is unchangeable
Description:
------------
Hello,
im working on some mysql-connections and queries, and now im getting the
mysql-error messages of "Illegal mix of collations". So i changed
everthing to the right collation. in my case, latin1_german1_ci. Now, also
setting the right collation right before sending the query, mysql seems to
ingnore the charset. it looks that php sends its mysqlcommand with some
precompiled collations.
Now, i'm wondering if this is a bug in php or not. did i miss something?
thanks in advance
Actual result:
--------------
array(7) {
[0]=>
array(2) {
["variable_name"]=>
string(20) "character_set_client"
["value"]=>
string(6) "latin1"
}
[1]=>
array(2) {
["variable_name"]=>
string(24) "character_set_connection"
["value"]=>
string(6) "latin1"
}
[2]=>
array(2) {
["variable_name"]=>
string(22) "character_set_database"
["value"]=>
string(6) "latin1"
}
[3]=>
array(2) {
["variable_name"]=>
string(21) "character_set_results"
["value"]=>
string(6) "latin1"
}
[4]=>
array(2) {
["variable_name"]=>
string(20) "character_set_server"
["value"]=>
string(6) "latin1"
}
[5]=>
array(2) {
["variable_name"]=>
string(20) "character_set_system"
["value"]=>
string(4) "utf8"
}
[6]=>
array(2) {
["variable_name"]=>
string(18) "character_sets_dir"
["value"]=>
string(26) "/usr/share/mysql/charsets/"
}
}
array(3) {
[0]=>
array(2) {
["variable_name"]=>
string(20) "collation_connection"
["value"]=>
string(17) "latin1_german1_ci"
}
[1]=>
array(2) {
["variable_name"]=>
string(18) "collation_database"
["value"]=>
string(17) "latin1_german1_ci"
}
[2]=>
array(2) {
["variable_name"]=>
string(16) "collation_server"
["value"]=>
string(17) "latin1_german1_ci"
}
}
Fatal error: 1267 - Illegal mix of collations (latin1_german1_ci,IMPLICIT)
and (latin1_swedish_ci,IMPLICIT) for operation '='
--
Edit bug report at http://bugs.php.net/?id=36879&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36879&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36879&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36879&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36879&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36879&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36879&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36879&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36879&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36879&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36879&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36879&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36879&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36879&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36879&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36879&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36879&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36879&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36879&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36879&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36879&r=mysqlcfg