Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[Fixed ] Database c...
 
Notifications
Clear all

[Fixed ] Database collation error 1253

3 Posts
2 Users
0 Reactions
3,376 Views
 sbs
(@sbs)
Posts: 5
Active Member
Topic starter
 
[#6580]

Hello,

We have installed a new version of Prjeqtor (8.4.0) with mysql database stored on a separate server. Database was created using the standard setup.

Users randomly get errors when performing actions on activity (could not yet pinpoint what course of action leads to this error).
When looking in the logs, I found several occurence of the following error :

** ERROR ** [V8.4.0] Exception-[42000] SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'

Below is a sample of the faulty query:

SELECT planningelement.*
 FROM
  ( SELECT cast(id as CHAR) COLLATE utf8_general_ci as id,idProject,cast(refType AS CHAR) COLLATE utf8_general_ci as refType,refId,refName,topId,topRefType,topRefId,^M
        priority,elementary,idle,done,cancelled,idPlanningMode,idBill,^M
        initialStartDate,validatedStartDate,validatedStartFraction,plannedStartDate,plannedStartFraction,realStartDate,^M
        initialEndDate,validatedEndDate,validatedEndFraction,plannedEndDate,plannedEndFraction,realEndDate,^M
        latestStartDate,latestEndDate,^M
        initialDuration,validatedDuration,plannedDuration,realDuration,^M
        initialWork,validatedWork,assignedWork,plannedWork,leftWork,realWork,^M
        validatedCost,assignedCost,plannedCost,leftCost,realCost,^M
        progress,expectedProgress,wbs,wbsSortable,isOnCriticalPath,notPlannedWork, needReplan,^M
        null as idType, null as idStatus, null as idResource, 0 as isGlobal ^M
      FROM planningelement
    WHERE  ((planningelement.idProject not in (0) or planningelement.idProject is null ) and (planningelement.idProject not in (0) or planningelement.idProject is null or (1=4) ) and (planningelement.idProject not in (0) or planningelement.idProject is null or (1=3) )) ) as planningelement
 WHERE (1=1) and planningelement.idProject in (20, 16, 11, 13, 9, 14, 1, 10, 17, 15, 12, 19, 18, 21, 22, 26, 27, 28, 29, 30, 31, 32) and planningelement.idProject not in (0)
 ORDER BY planningelement.wbsSortable

I thought there was a collation issue in the database but all tables are utf8. When running the query from mysql workbench I get a slightly different error message :
Error Code: 1253. COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'

Did I miss some configuration item somewhere? How can I fix this?

Regards,


 
Posted : 20 Mar 2020 18H11
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

You DB is configured with collation utf8mb4
ProjeQtOr supports only utf8 collations.


 
Posted : 25 Mar 2020 17H51
 sbs
(@sbs)
Posts: 5
Active Member
Topic starter
 

Hello,

I have issued the required alter database statement to set it to UTF8.

May be the setup should take care of this (or if not possible warn that the database must be altered with the proper query).

I'll keep you posted in the next days to confirm that this fixed our issue.

Regards,

After a few weeks, we don't seem to find this error anymore. Tnak you


 
Posted : 26 Mar 2020 9H27
Share:

Scroll to Top