[Kde-pim] Review Request 117769: Support for tag types + and fixed tag fetch by RID.

Dan Vrátil dvratil at redhat.com
Fri Apr 25 17:41:45 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117769/#review56543
-----------------------------------------------------------


This update won't work if you have any tags in the database. You are adding the typeId column which references a new (empty) TagTypeTable and you don't allow NULL values in that column, so database will won't be able to initialize values in that column for existing entries and so the ALTER TABLE ADD COLUMN query will fail.

One possible solutions to this is to add <data columns="id,name" values="1,'PLAIN'" />  TagType table definition and add default="1" attribute typeId column definition in Tag table, however I'd like to avoid abusing <data> to fix migration problems :-)


server/src/handler/tagappend.cpp
<https://git.reviewboard.kde.org/r/117769/#comment39457>

    This is related to my comment above. Unless you specify the default value for typeId column, the INSERT will fail in case this condition evaluates to False (because you will try to reference invalid (none) row in TagTypeTable).
    
    If you use the default="1" attribute in typeId column definition in akonadidb.xml, then you can keep this switch, otherwise it should be removed, as type is mandatory.



server/src/handler/tagfetchhelper.cpp
<https://git.reviewboard.kde.org/r/117769/#comment39458>

    Type can never be empty, see above.


- Dan Vrátil


On April 25, 2014, 3:49 p.m., Christian Mollekopf wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117769/
> -----------------------------------------------------------
> 
> (Updated April 25, 2014, 3:49 p.m.)
> 
> 
> Review request for Akonadi.
> 
> 
> Repository: akonadi
> 
> 
> Description
> -------
> 
> Support for tag types + and fixed tag fetch by RID.
> 
> The type is stored a separate table and always returned when fetching a tag.
> Additionally we're now picking the right result of the query as rid.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 39c6027d073effc016a90578516a0e1178bc5eac 
>   server/src/connection.cpp 5889f44cfee6ea21ba1a87cbc639211c1c8a863d 
>   server/src/handler/tagappend.cpp 1d0bfd40056ed80f2c0dcaf24d8dabad95020ba7 
>   server/src/handler/tagfetchhelper.cpp 081eedbd262af32fdd9fd713c1e6fa1453aec410 
>   server/src/storage/akonadidb.xml 6c3d25e06c62a5f321988cf163f8d88b487ea1f4 
> 
> Diff: https://git.reviewboard.kde.org/r/117769/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Christian Mollekopf
> 
>

_______________________________________________
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