php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36879 Collation Charset of connection is unchangeable
Submitted: 2006-03-27 23:56 UTC Modified: 2006-03-28 00:00 UTC
From: dbarth at gmx dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.2 OS: Mandrake
Private report: No CVE-ID: None
 [2006-03-27 23:56 UTC] dbarth at gmx dot net
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 '='


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 00:00 UTC] dbarth at gmx dot net
Sorry folks for bothering you,

sometimes it only needs an email for finding the failure...

it was my fault, i just missed a database.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC