Helpful Tip - Duplicate Quest Name , "One of a Kind"

CharacterProfiler.lua file uploading issues

Helpful Tip - Duplicate Quest Name , "One of a Kind"

Postby mook » Tue Dec 23, 2008 3:38 am

Howdy folks!

After updating to the latest and greatest WoWRoster (2.0.2) and CharacterProfiler, I encountered an error on my first upload:

Database Error
1062: Duplicate entry '364-One of a Kind' for key 1
SQL:
INSERT INTO `roster_quests` SET `member_id` = '364', `quest_name` = 'One of a Kind', `quest_index` = '5', `quest_level` = '73', `zone` = 'Dragonblight', `quest_tag` = 'Group', `is_complete` = '0'

If you are experiencing this as well, it is because Blizzard a bit foolishly named two different quests with the same name:

One of a Kind (Gundrak, Dungeon - http://www.wowhead.com/?quest=13111)
One of a Kind (Dragonblight - http://www.wowhead.com/?quest=12148)

One of my characters had both quests in his quest log, causing this error. To allow a proper upload, just open your 'CharacterProfiler.lua' and change one instance of 'One of a Kind' to 'One of a Kind - Two' (or whatever, as long as it's different).

Hopefully can save someone else a little time trying to figure out what the problem is. : )
mook
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Thu Jul 27, 2006 1:53 am

Helpful Tip - Duplicate Quest Name , "One of a Kind"

Postby zanix » Tue Dec 23, 2008 12:06 pm

Ah crap....forgot one bug

We knew about this but probably forgot

Try running this in phpmyadmin or another mysql management tool
Code: Select all
ALTER TABLE `roster_quests` DROP INDEX `quest_index`;
ALTER TABLE `roster_quests` DROP PRIMARY KEY
ADD PRIMARY KEY ( `quest_index` , `quest_level` , `quest_tag` );
Last edited by zanix on Tue Dec 23, 2008 12:07 pm, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Helpful Tip - Duplicate Quest Name , "One of a Kind"

Postby tuigii » Tue Dec 23, 2008 10:25 pm

[Be carefull - SQL noob inside]

zanix wrote:
Code: Select all
.....
ALTER TABLE `roster_quests` DROP PRIMARY KEY
ADD PRIMARY KEY ( `quest_index` , `quest_level` , `quest_tag` );


Houston....... got a red light here.

My roster_quests table isn't empty.
And I confirm that the set quest_index-quest_level-quest_tag as a key isn't unique, so SQL barks about that, and won't let me install a PRIMARY KEY.

Now, that was the bad news.

Proposal : What about adding `member_id` to make this unique ?
I'll bet even that [ `member_id`and `quest_index` ] are always unique because if I understand well `quest_index`its the slot number of a players quest list (is 1 to 25).
So, an ADD PRIMARY KEY ( `member_id`, `quest_index` ) should do the job.


The good news: I don't have 30000000 mission critical wow-quests in the table anyway (only about 2000) - the fact that the PRIMARY is missing now, does that hurt ? I don't 'think' so.

Over to the experts.
Last edited by tuigii on Tue Dec 23, 2008 10:58 pm, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Helpful Tip - Duplicate Quest Name , "One of a Kind"

Postby zanix » Tue Dec 23, 2008 11:14 pm

Oh yes, good idea
Code: Select all
ALTER TABLE `roster_quests` DROP PRIMARY KEY
ADD PRIMARY KEY ( `member_id`, `quest_index` )
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Helpful Tip - Duplicate Quest Name , "One of a Kind"

Postby zanix » Wed Dec 24, 2008 9:04 am

Wow, I just realized the quest name is "One of a Kind" and there are two of them... :scratch:
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Uploading

Who is online

Users browsing this forum: No registered users and 0 guests

cron