Bug 406106 - RemoteID is too small MYSQL error
Summary: RemoteID is too small MYSQL error
Status: RESOLVED DUPLICATE of bug 394839
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: 5.9.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-01 08:54 UTC by ad1rie3
Modified: 2019-06-01 14:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ad1rie3 2019-04-01 08:54:02 UTC
SUMMARY
When i synchronise my calendar with nextcloud, the remoteID field can greather than 255, in result of mysqlSQL error and crash .... 

g.kde.pim.akonadiserver: Error during insertion into table "PimItemTable" "Data too long for column 'remoteId' at row 1 QMYSQL3: Unable to execute statement"
g.kde.pim.akonadiserver:   Query: "INSERT INTO PimItemTable (rev, remoteId, remoteRevision, gid, collectionId, mimeTypeId, datetime, atime, dirty, size) VALUES (:0, :1, :2, :3, :4, :5, :6, :7, :8, :9)"
g.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(int, 0))(":1", QVariant(QString, "https://nextcloud.brain-networks.net/remote.php/dav/calendars/Adrien.Faveraux/personal_shared_by_Anselme.Josset/040000008200E00074C5B7101A82E0080000000C070CA1EA9B1D40100000000000000001000000004865F8D8ECEAA47B9D3185D6F97F452.ics#040000008200E00074C5B7101A82E00800000000C070CA1EA9B1D40100000000000000001000000004865F8D8ECEAA47B9D3185D6F97F4522019-03-25T14:00:00+01:00"))(":2", QVaria ....
g.kde.pim.akonadiserver:   Error text: "Data too long for column 'remoteId' at row 1 QMYSQL3: Unable to execute statement"
g.kde.pim.akonadiserver:   DB error:  "Data too long for column 'remoteId' at row 1"
g.kde.pim.akonadiserver:   Error code: "1406"
g.kde.pim.akonadiserver: DATABASE ERROR:


i have to edit the struct of mysql database of akonadi to set the limit more huge.

mysql  --socket=/tmp/akonadi-quartz.LHhNzx/mysql.socket
MariaDB [akonadi]> ALTER TABLE `PimItemTable` CHANGE `remoteId` `remoteId` VARBINARY(512) NULL;

Can you set the limit more user friendly by default ? 

STEPS TO REPRODUCE
1. Have an huge remoteID in ICS filename
2. 
3. 

OBSERVED RESULT
Crash

EXPECTED RESULT
Work :)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 29 
(available in About System)
KDE Plasma Version: 5.14.5
KDE Frameworks Version:  5.55
Qt Version:  5.11.3

ADDITIONAL INFORMATION
Comment 1 Erik Quaeghebeur 2019-04-02 06:42:20 UTC

*** This bug has been marked as a duplicate of bug 394839 ***
Comment 2 Christophe Marin 2019-06-01 14:43:56 UTC
*** Bug 408042 has been marked as a duplicate of this bug. ***