[Digikam-devel] [digikam] [Bug 338050] New: MySQL Nested Set Fields Not Updating when Moving Tag within Hierarchy
Martin Nichol
bugz at asdepique.ca
Tue Aug 5 13:55:52 BST 2014
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: digikam-devel at kde.org
Reporter: bugz at asdepique.ca
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.
More information about the Digikam-devel
mailing list