Ticket #310 (new Bug)

Opened 4 months ago

Last modified 1 month ago

When database collation is not the default, mysql error "Illegal mix of collations"

Reported by: matt Assigned to:
Priority: major Milestone: RobotRock
Component: Core Version:
Keywords: Cc:

Description

I am using us_ascii as the default character set.

I get the following error on the piwik.php logging script:

Uncaught exception: 'Error query: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=''
More information
In /Users/netmon/Sites/piwik/modules/LogStats/Db.php on line 201
Backtrace:
#0 /Users/netmon/Sites/piwik/modules/LogStats/Db.php(160): Piwik_LogStats_Db->query('?SELECT idactio...', Array)
#1 /Users/netmon/Sites/piwik/modules/LogStats/Action.php(224): Piwik_LogStats_Db->fetch('?SELECT idactio...', Array)
#2 /Users/netmon/Sites/piwik/modules/LogStats/Action.php(95): Piwik_LogStats_Action->loadActionId()
#3 /Users/netmon/Sites/piwik/modules/LogStats/Visit.php(485): Piwik_LogStats_Action->getActionId()
#4 /Users/netmon/Sites/piwik/modules/LogStats/Visit.php(343): Piwik_LogStats_Visit->handleNewVisit()
#5 /Users/netmon/Sites/piwik/modules/LogStats.php(203): Piwik_LogStats_Visit->handle()
#6 /Users/netmon/Sites/piwik/modules/LogStats/Generator.php(661): Piwik_LogStats->main()
#7 /Users/netmon/Sites/piwik/modules/LogStats/Generator.php(369): Piwik_LogStats_Generator->saveVisit()
#8 /Users/netmon/Sites/piwik/misc/generateVisits.php(82): Piwik_LogStats_Generator->generate(12, 15)
#9 {main}

You can get help from http://piwik.org (give us the full error message + your PHP and Mysql version)

Possible solution: Create the piwik tables with a specific character set for all the application, scripts etc.

Change History

10/10/08 16:52:40 changed by matt

  • milestone changed from Future features to DigitalVibes.

10/10/08 18:53:33 changed by matt

  • milestone changed from DigitalVibes to RobotRock.