Page 1 of 1
Update Server - keeps trying to update NPCs
Posted: Wed Feb 27, 2008 6:40 pm
by John Adams
I've seen a few new SQLs try to get altered on my server the last few days, but each time I start the world, this ALTER fails (last one was adding initial_state). Now, the Update server tells me I have used my alotted connections.
I'll reset my version info for NPCs, but I already seem to have those alterations. Not sure why it continues to try.
Posted: Wed Feb 27, 2008 7:08 pm
by LethalEncounter
Odd. I'll reset your download limit so you can get it again, but was the original failure from maybe a column that you could have added previously and it had the same name as the update?
Anyone else having the same problem?
Posted: Wed Feb 27, 2008 7:11 pm
by John Adams
Yesterday the column trying to be updated was `action_state` I believe, which I had already gotten last week. The server was starting fine repeatedly during our tests yesterday. Today's restart now is complaining about a column that definitely was not there yesterday (initial_state), but is now there and continues to try to ALTER the NPCs table.
What version should npcs be? Mine is 9, with 1 download now.
Posted: Wed Feb 27, 2008 7:18 pm
by LethalEncounter
Do you have activity_status in your table? update 10 for NPCs included both these updates:
ALTER TABLE `npcs` ADD `initial_state` SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE `npcs` ADD `activity_status` SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
If one update failed then the whole update failed but the first update wouldnt have been rolled back, which might have caused your problem.
Posted: Wed Feb 27, 2008 7:19 pm
by John Adams
OOPS sorry, that was the field that failed. activity_status. Sorry, it's been a horribly long 3 days heh...
And yes, that one failed. I am locked out again, but I will nuke both those fields from my NPCs and try again.
Posted: Wed Feb 27, 2008 7:27 pm
by John Adams
Thanks, got the updates that time.
Posted: Wed Feb 27, 2008 7:29 pm
by LethalEncounter
kk np, I'll see if I can somehow implement something to fix problems like that so they wont happen in the future. Not sure how I can though.
Posted: Wed Feb 27, 2008 7:48 pm
by John Adams
Hmm, I was reading up on ALTER IGNORE, but I am not sure that will solve your problem since you're doing individual ALTERs.
What if you combine your ALTER into a single statement, so if one part failed, the whole transaction would fail?
Code: Select all
ALTER TABLE `npcs`
ADD `initial_state` SMALLINT UNSIGNED DEFAULT '0' NOT NULL,
ADD `activity_status` SMALLINT UNSIGNED DEFAULT '0' NOT NULL;
In a test I just ran, if either of those two fields were present during the ALTER, the whole query failed. If both were missing, the query completes.
Naturally, this will not help if you have multiple tables all being updated in the same update rev... but maybe you can work that out with versioning.
Posted: Thu Feb 28, 2008 7:12 am
by ZexisStryfe
I seem to be having a similar issue. The visual_states table is trying to update and fails for some unknown reason, but i can't download it because i hit my limit.