[Akonadi] [Bug 305543] "Paramter count mismatch" during akonadi start-up due to broken SQL query

Maciej Mrozowski reavertm at gmail.com
Wed Nov 27 00:37:11 GMT 2013


https://bugs.kde.org/show_bug.cgi?id=305543

--- Comment #4 from Maciej Mrozowski <reavertm at gmail.com> ---
Relation CollectionPimItemRelation exists in my case, still query in question
fails.

UPDATE PimItemTable SET atime = :0 WHERE (
CollectionPimItemRelation.Collection_id = :1 AND (
CollectionPimItemRelation.PimItem_id = PimItemTable.id ) )

When I actually run in directly on my SQLite akonadi db, it fails differently:
"Query Error: no such column: CollectionPimItemRelation.Collection_id Unable to
execute statement"

Is this some MySQL shortcut? (bug reporter doesn't seem to have that problem)
I admit I haven't written SQL in a while but that SQL statement updates
PimItemTable but in WHERE clause it references foreign table
CollectionPimItemRelation, which would otherwise require separate lookup.
More portable query would look like:

UPDATE PimItemTable SET atime = :0 WHERE id = (SELECT PimItem_id FROM
CollectionPimItemRelation WHERE Collection_id = :1 AND PimItem_id =
PimItemTable.id )

Still it won't work when directly executed on database propably because of :0
and :1, which are likely stored procedure or prepared statement params (hence
value weren't printed in akonadi log).

Anway.. if "parameter mismatch" is the only error here, maybe stored
procedure/prepared statement parameter quoting is broken somewhere there?

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list