[Digikam-devel] [Bug 283323] a new label _Digikam_root_tag_ is created every time

Francesco Riosa francesco+kde at pnpitalia.it
Tue Oct 4 21:07:40 BST 2011


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


Francesco Riosa <francesco+kde at pnpitalia.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |francesco+kde at pnpitalia.it




--- Comment #2 from Francesco Riosa <francesco+kde pnpitalia it>  2011-10-04 20:07:39 ---
(In reply to comment #0)
Leo if you're running on mysql database could you provide the output of the
following query?

SELECT * FROM Tags ORDER BY id LIMIT 10;



(In reply to comment #1)
> Francesco, I believe this is a MySQL specific tag?

yes it is:
file: data/database/dbconfig.xml.cmake
Revision 24ee26d9

the tree algorithm used by the mysql schema need one and only one root, thus
I'm inserting/replacing the tag with id = 0 in the tags table.

it should be executed _only_ by the "CreateTriggers" DBACtion.

SELECT
  @minLeft := IF(ISNULL(MIN(lft)), 1, MIN(lft)-1),
  @maxRight := IF(ISNULL(MAX(rgt)), 2, MAX(rgt)+1)
FROM Tags
WHERE id >= 0 AND pid>=0;

SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';

REPLACE INTO Tags
  (id, pid, name, icon, iconkde, lft, rgt)
VALUES
(0, -1, '_Digikam_root_tag_', 0, NULL, @minLeft, @maxRight )

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list