[Kde-pim] Review Request: fix collation and charsets in mysql database
Bertjan Broeksema
b.broeksema at home.nl
Mon May 3 18:52:21 BST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3877/#review5377
-----------------------------------------------------------
/trunk/kdesupport/akonadi/server/src/storage/dbupdate.xml
<http://reviewboard.kde.org/r/3877/#comment5086>
These look indeed mysql specific. I had a quick look at the sqlite website but it isn't immediately clear to me how to solve this. I think you need to do it programmatic partly.
Have a look here:
http://www.sqlite.org/datatype3.html#collation
and here:
http://www.sqlite.org/c3ref/create_collation.html
- Bertjan
On 2010-05-03 16:57:42, Milian Wolff wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3877/
> -----------------------------------------------------------
>
> (Updated 2010-05-03 16:57:42)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> Akonadi works with UTF internally but the MySQL database uses latin1 for collation and default charsets, which this patch should fix.
>
> I have no idea how to do that for SQLite or PSQL, nor whether it's actually a problem there. But for MySQL this also
> fixes the test cases which currently emit:
>
> FAIL! : CollectionJobTest::testRidCreateDelete(UTF8) 'delJob->exec()' returned FALSE. (Unknown error. (Unable to execute collection query))
> Loc: [/home/speedy/projects/kde4/kdepimlibs/akonadi/tests/collectionjobtest.cpp(639)]
> [akonadiserver] Error during executing query "SELECT CollectionTable.id, CollectionTable.remoteId, CollectionTable.remoteRevision, CollectionTable.name, CollectionTable.parentId, CollectionTable.resourceId, CollectionTable.subscribed, CollectionTable.cachePolicyInherit, CollectionTable.cachePolicyCheckInterval, CollectionTable.cachePolicyCacheTimeout, CollectionTable.cachePolicySyncOnDemand, CollectionTable.cachePolicyLocalParts, CollectionTable.queryString, CollectionTable.queryLanguage FROM CollectionTable WHERE ( CollectionTable.remoteId = ( :0 ) AND CollectionTable.resourceId = :1 )" : "Illegal mix of collations (latin1_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' QMYSQL3: Unable to execute statement"
>
>
> Diffs
> -----
>
> /trunk/kdesupport/akonadi/server/src/storage/dbinitializer.cpp 1122335
> /trunk/kdesupport/akonadi/server/src/storage/dbupdate.xml 1122335
>
> Diff: http://reviewboard.kde.org/r/3877/diff
>
>
> Testing
> -------
>
> currently failing test cases work again (see above), I successfully updated my test-akonadidb.
>
>
> Thanks,
>
> Milian
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list