From 0a80a06a39c5ff024527c3b3f3a90bd7f946693e Mon Sep 17 00:00:00 2001 From: armano2 Date: Sun, 29 May 2011 18:06:32 +0200 Subject: Fix optional cleanup query from f8bd56 Signed-off-by: Machiavelli --- sql/updates/characters/2011_05_29_0_characters_mail_items.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/updates/characters/2011_05_29_0_characters_mail_items.sql b/sql/updates/characters/2011_05_29_0_characters_mail_items.sql index 6d9feb2401d..3162fe1b263 100644 --- a/sql/updates/characters/2011_05_29_0_characters_mail_items.sql +++ b/sql/updates/characters/2011_05_29_0_characters_mail_items.sql @@ -1,5 +1,6 @@ --- Uncomment this query if the second query gives you primary key violation errors --- DELETE FROM `mail_items` WHERE `item_guid` IN (SELECT `item_guid` FROM `mail_items` GROUP BY `item_guid` HAVING COUNT(`item_guid`) > 1); +-- Uncomment this query if the ALTER query gives you primary key violation errors +-- SET @item_guid := (SELECT `item_guid` FROM `mail_items` GROUP BY `item_guid` HAVING COUNT(`item_guid`) > 1); +-- DELETE FROM `mail_items` WHERE `item_guid` IN (@item_guid); ALTER TABLE `mail_items` DROP PRIMARY KEY, -- cgit v1.2.3