Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal mix of collations for operation 'concat' #891

Closed
robocoder opened this issue Jul 31, 2009 · 4 comments
Closed

Illegal mix of collations for operation 'concat' #891

robocoder opened this issue Jul 31, 2009 · 4 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@robocoder
Copy link
Contributor

From forum.

SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'concat'

Proposed fix:

Index: Piwik.php
===================================================================
--- Piwik.php    (revision 1344)
+++ Piwik.php    (working copy)
@@ -1233,6 +1233,7 @@
        Piwik_PostEvent('Reporting.createDatabase', $db);
        if(is_null($db))
        {
+            $dbInfos['driver_options'] = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;');
            $db = Zend_Db::factory($config->database->adapter, $dbInfos);
            $db->getConnection();
            // see http://framework.zend.com/issues/browse/ZF-1398
@robocoder
Copy link
Contributor Author

Or can we use?

    $db->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES utf8");

@robocoder
Copy link
Contributor Author

(In [1347]) refs #891 - specify mysql connect driver option for utf8

@robocoder
Copy link
Contributor Author

(In [1361]) refs #891 - revert patch

@robocoder
Copy link
Contributor Author

Appears to be a red herring. User was using MySQL 3.x.

@robocoder robocoder added this to the Piwik 0.4.3 milestone Jul 8, 2014
@robocoder robocoder self-assigned this Jul 8, 2014
@mattab mattab added the wontfix label Aug 3, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants