https://bugs.kde.org/show_bug.cgi?id=338050
Bug ID: 338050 Summary: MySQL Nested Set Fields Not Updating when Moving Tag within Hierarchy Product: digikam Version: 4.0.0 Platform: RedHat RPMs OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Tags Assignee: [hidden email] Reporter: [hidden email] Found this in 3.5.0 and reproduced in 4.0.0. Looking at the Tags table, it appears to use a Nest Set (lft,rgt fields) for managing tag hierarchy in addition to the pid field. When moving a tag within the hierarchy, the lft and rgt fields are not updated. Given this initial tree: +----+------+----------------------------+------+---------+-----+-----+ | id | pid | name | icon | iconkde | lft | rgt | +----+------+----------------------------+------+---------+-----+-----+ | 8 | 0 | Parent | 0 | NULL | 4 | 15 | | 10 | 8 | Child1 | 0 | NULL | 9 | 14 | | 11 | 8 | Child2 | 0 | NULL | 5 | 8 | | 12 | 10 | SubChild1A | 0 | NULL | 12 | 13 | | 13 | 10 | SubChild1B | 0 | NULL | 10 | 11 | | 14 | 11 | SubChild2A | 0 | NULL | 6 | 7 | +----+------+----------------------------+------+---------+-----+-----+ Moving SubChild1A under Child2 results in this: +----+------+----------------------------+------+---------+-----+-----+ | id | pid | name | icon | iconkde | lft | rgt | +----+------+----------------------------+------+---------+-----+-----+ | 8 | 0 | Parent | 0 | NULL | 4 | 15 | | 10 | 8 | Child1 | 0 | NULL | 9 | 14 | | 11 | 8 | Child2 | 0 | NULL | 5 | 8 | | 12 | 11 | SubChild1A | 0 | NULL | 12 | 13 | | 13 | 10 | SubChild1B | 0 | NULL | 10 | 11 | | 14 | 11 | SubChild2A | 0 | NULL | 6 | 7 | +----+------+----------------------------+------+---------+-----+-----+ The pid is properly updated, but the lft and rgt columns still indicate is a child of Child1. I suspect this also explains bug 273852. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
https://bugs.kde.org/show_bug.cgi?id=338050
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|MySQL Nested Set Fields Not |MySQL : Nested Set Fields |Updating when Moving Tag |Not Updating when Moving |within Hierarchy |Tag within Hierarchy CC| |[hidden email] -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Tags |Database -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|MySQL : Nested Set Fields |MYSQL : nested set fields |Not Updating when Moving |not updating when moving |Tag within Hierarchy |tag within hierarchy -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Database |Database-Mysql -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #1 from [hidden email] --- This file still valid using last digiKam 5.0.0 ? Gilles Caulier -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[hidden email] --- Comment #2 from [hidden email] --- Martin, How exactly did you move the tag? Did you first remove and then assigned the tag again? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #3 from Martin Nichol <[hidden email]> --- (In reply to swatilodha27 from comment #2) > Martin, > > How exactly did you move the tag? Did you first remove and then assigned the > tag again? It was drag and drop within the tags hierarchy. Martin -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #4 from Martin Nichol <[hidden email]> --- (In reply to caulier.gilles from comment #1) > This file still valid using last digiKam 5.0.0 ? > > Gilles Caulier I'll have to get back to you on that. Martin -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #5 from [hidden email] --- I can reproduce the problem with 5.0.0 version. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- Version|4.0.0 |5.0.0 --- Comment #6 from [hidden email] --- Valid for both Internal and Remote. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #7 from [hidden email] --- Created attachment 100043 --> https://bugs.kde.org/attachment.cgi?id=100043&action=edit Please test this. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|MYSQL : nested set fields |MYSQL : nested set fields |not updating when moving |not updating when moving |tag within hierarchy |tag within hierarchy | |[patch] -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #8 from [hidden email] --- Created attachment 100063 --> https://bugs.kde.org/attachment.cgi?id=100063&action=edit Please see this one too. Which of these approaches would be fine? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100063|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100043|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #9 from [hidden email] --- Created attachment 100102 --> https://bugs.kde.org/attachment.cgi?id=100102&action=edit Please test with this patch. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #10 from [hidden email] --- Swaty, Just to be clear, what's the clear procedure to check if patch work as expected ? Which mysql commands do you use to check tags hierarchy ? Gilles -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #11 from [hidden email] --- Steps to reproduce: 1) Add a new image and assign it 2-3 tags. 2) Check in Tags table, and observe the pid, lft, rgt values in it for the Tags assigned. 3) Back in DK, under "Tags" view (in left sidebar), drap and drop tags such that they're in hierarchy. (one tag becomes child of another) 4) Check back the Tags table. (without patch) --->parent tag id (pid) is updated, but lft and rgt values are still the same. (with patch) ---> all three values updated according to hierarchy. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Martin Nichol
https://bugs.kde.org/show_bug.cgi?id=338050
--- Comment #12 from [hidden email] --- I tested the Mysql Database into Tags table with Tora frontend. I confirm that without the patch lft/rgt id are not updated in database when i move a tags from hierarchy in another place. I confirm also that your patch do the job as expected. Gilles Caulier -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |