eq2-updates.sql error

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 6:23 pm

I have ran across an error when trying to patch the database.
18:58:40 E Database : Error running MySQL queries from file 'eq2-updates.sql' (1050): Table 'bot_appearance' already exists
What I think has happened is that I sourced in the latest dev_db before I patched the database using the patcher. What I done was removed the create table from the eq2-updates.sql and ran the query. It had a few problems since some things were duplicates, and I just removed those lines and ran again until I got through every line.

Is there a way we can fix this so it will not happen in the future? Maybe a create if not exist instead of just create?
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: eq2-updates.sql error

Post by Jabantiz » Thu Jan 04, 2018 7:03 pm

On new tables we can add a drop before the create. But in general the patcher should always be ran before sourcing in the dump as the dump does not provide data for the table_versions table.

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 7:11 pm

Yeah I wasn't thinking. I now have a sort of messed up db now. I may need to nuke it and start all over. For some reason the live client is now crashing when trying to log in. I know my opcodes table is all a mess now, but I can't get the patcher to re download it.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: eq2-updates.sql error

Post by tyrbo » Thu Jan 04, 2018 7:16 pm

Mine is also messed up and has made it a pain to get updates, so I've been manually running CREATE TABLE calls from the updates file as needed.

Would love a dump of the latest table version table.

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 7:17 pm

I will post as soon as I patch.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 7:23 pm

Strange question, but how do I turn on and off the command line window output from the patcher. I know that there is a way as I did turn it off and now I don't get output when patcher is patching. I just can't remember what I done to turn it off.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: eq2-updates.sql error

Post by tyrbo » Thu Jan 04, 2018 7:32 pm

Probably in log_config.xml.

There's also

Code: Select all

#autotableverbose displays detailed information about the updates; options=true or false
autotableverbose=false

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: eq2-updates.sql error

Post by Jabantiz » Thu Jan 04, 2018 7:35 pm

Should be in the logs config file under patcher.

If you want to nuke the table and redownload it just delete its entry in the table_versions table, it will act like you don't have the table and redownload everything. opcodes does have a drop in front of it so it will nuke the table you currently have.

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 7:41 pm

autotableverbose=false
Yeah that is it. I knew I had changed something.

Jabantiz wrote: Thu Jan 04, 2018 7:35 pm If you want to nuke the table and redownload it just delete its entry in the table_versions table
Thanks that is good to know. I am restoring a backup I done just before I switched from MySQL to mariadb. I don't think I have added anything to my local that is not already on the svn, but it is a gamble.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: eq2-updates.sql error

Post by Jabantiz » Thu Jan 04, 2018 7:43 pm

Just went through the patcher db and added a drop before every create, only about 4 tables were missing them, most of them were the bots tables I committed :oops:

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: eq2-updates.sql error

Post by Cynnar » Thu Jan 04, 2018 7:58 pm

Jabantiz wrote: Thu Jan 04, 2018 7:43 pm Just went through the patcher db and added a drop before every create, only about 4 tables were missing them, most of them were the bots tables I committed :oops:
This should help on any future problems like some bonehead sourcing in the db before updating it? Cause you know I'm not the only bonehead. :D
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: eq2-updates.sql error

Post by John Adams » Sat Jan 06, 2018 2:47 pm

Jabantiz wrote: Thu Jan 04, 2018 7:03 pm On new tables we can add a drop before the create. But in general the patcher should always be ran before sourcing in the dump as the dump does not provide data for the table_versions table.
btw, if I ever finish the DB Auto-Updater query tool, it will always put a DROP statement before a CREATE if one is submitted without one. I am assuming if you are CREATEing something, it must not be there or you would have submitted an ALTER.

Also, couldn't Cynnar have just deleted or changed the version in table_versions to force an update? Or was it because there wasn't a DROP that it would never work right?


Edit: Oh, just finished reading the thread. Jabantiz laziness strikes again :D :D :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest