[Digikam-devel] [digikam] [Bug 283323] MYSQL : a new label "_Digikam_root_tag_" is created every time

via KDE Bugzilla bugzilla_noreply at kde.org
Thu May 26 15:19:27 BST 2016


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

--- Comment #71 from swatilodha27 at gmail.com ---
(In reply to Richard Mortimer from comment #69)
> First step to resolve this has to be to add UNIQUE(name, pid) to the MySQL
> version of the Tags table (around line 1056 in dbconfig.xml.cmake).
> 
> That will at least force MySQL to reject any attempts to add duplicates.
> Once that is done then it should be easier to find out why digikam is trying
> to add the duplicates in the first place.

Is this fine?

CREATE TABLE `Tags` (
    ->   `id` int(11) NOT NULL AUTO_INCREMENT,
    ->   `pid` int(11) DEFAULT NULL UNIQUE,
    ->   `name` varchar(100) CHARACTER SET utf8 NOT NULL UNIQUE,
    ->   `icon` int(11) DEFAULT NULL,
    ->   `iconkde` longtext CHARACTER SET utf8,
    ->   `lft` int(11) NOT NULL,
    ->   `rgt` int(11) NOT NULL,
    ->   PRIMARY KEY (`id`),
    ->   KEY `Tags_Images` (`icon`),
    ->   CONSTRAINT `Tags_Images` FOREIGN KEY (`icon`) REFERENCES `Images`
(`id`) ON DELETE SET NULL ON UPDATE CASCADE
    -> ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4; 

For column 'name' I changed from TEXT to VARCHAR ('cause it gave error:
TEXT/BLOB column 'name' used in key specification without key length)

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



More information about the Digikam-devel mailing list