Jump to content

Correct order of DB Updates (Which first: UDB or "yours")?


Guest DracoDruid
 Share

Recommended Posts

Hello and yes, it's me again. :/

Thanks to you guys, my server seems to work so far.

But as some of you might have read, I had some problems building the database,

especially applying the correct updates.

Now I am having a strange problem with a self-made item (a bag that works correctly but isn't displayed like I defined).

I posted this problem/bug over at UDB but no answer so far.

Now I am wondering, if I made some mistake in building the DB

and I wanted to ask, since both MaNGOS and UDB release Updates for the DB, which ones do I have to apply first?

My DB now got all UDB updates first (without errors) and then all MaNGOS updates later on.

I am really confused about all this.

UDB 1.12.1 is ver.10545 and it's updates bring it to ver.11376.

Afterwards I applied all "MaNGOS" updates dated AFTER ver.11376.

Was that correct in that order?

Oh. And another one.

In the Install-Guide from "Temporary", stood that I could take all updates regarding one DB (in my case the "characters"-DB)

and execute them all in one query entry (in correct order of course).

I tried that, but it ended in error.

Afterwards, I tried to apply the updates one by one, but none of them worked anymore.

Come to think of it. I guess my characters-DB might be damaged or incorrectly constructed.

Link to comment
Share on other sites

the core updates are self-protecting, to prevent double applying.

UDB delivers a collection of the mangos sql updates with each updatepack, so they are only there to make yourself the life easier(1)

so, it doesn't matter if you apply the updates from mangos or udb(or another db-provider providing them), they are the same.

Which updates you need, you can always see when checking the db_version table (for world-database) or character_db_version table (for characters database)

(1) depending on the changes of the core fixes, you might get problems when trying to apply an updatepack to some (for this updatepack's view) future or past db_version

hence the suggested way to apply is

xyz_corepatch_mangos.sql

xyz_updatepack.sql

xyz+1_corepatch_mangos.sql

xyz+1_updatepack.sql

...

apply all remaining sql-updates from MaNGOS sql/updates folder, to be up-to-date

<update-process then>

apply remaining sql-updates from MaNGOS, to be on finish stand of zyx_corepatch_mangos.sql

apply zyx_updatepack.sql

...

Link to comment
Share on other sites

In case you refer to this file: [1] After running this you shouldn't need to apply other updates. Updates for character database are required if you like to convert an existing database. If you apply the above linked file your server is ready for account creation.

On a side note, all required information how to setup and update a database are in the wiki [2]

Regards

Skirnir

[1] https://github.com/mangos/mangos/blob/master/sql/characters.sql

[2] http://getmangos.eu/wiki/

Link to comment
Share on other sites

to [1]:

Yepp. That's the file I meant.

So that file is up-2-date with 11620, correct?

And the reason the UDB-characters updates failed was that they were already integrated?

Then why on earth is this stupid bag not working?!

(I know topic for UDB-forum...)

to [2]:

No offense (to anyone), but the wiki isn't THAT helpful. At least for me.

(escpecially the guides section)

Take this topic for example.

There is a long and somewhat confusingly written article about setting up behind a router,

and at the end is a note - almost invisible though because there is no clear separation - that states:

Nope. Sorry all you've read just don't work anymore.

Followed by another confusingly written solution.

(wtf is test.homeip.net used to mean?)

Link to comment
Share on other sites

So that file is up-2-date with 11620, correct?
Yes it's supposed to be up to date. All yes you are correct, udb character updates failed, because your character file already was the latest. This happens because: There is a certain db entry updated with every updated version of the database. MaNGOS core reads this field, if it matches what the core expects your good, else you'll see a error message.

Lets say the field entry at start is X. Now the core gets some updates. You build a new core, but now the expected database version is X+1. Until you apply this update the core prints something like:

you have database version X. required is X+1

Updates use this logic as well. They are written to check if there is a required version, before they apply. In the given example: You have version X. You apply updatepack X+1, which updates entry X to X+1. The core starts and reads the database version which is X+1 and your good to go.

What could happen is you start with version X and try to apply X+2 before you run update X+1, in this case your mysql console prints an error. In your case you already had X+200 and tried to apply X+5, this could have erased the entry field. Just drop the database and reimport the linked sql file.

For a fresh start you run create_mysql.sql, realmd.sql and characters.sql. Ofc you edit create_mysql.sql to your needs! After that you import the latest sql dump of your database provider and run mangos updates till the next database provider updatepack revision. You do that until you have applied all updatepacks and after that you apply all MaNGOS updates till the revision of your core. This update procedure can take some time ;-) After that, modify your mangos conf files (maybe import scriptdev2 and acid) and your done.

I've once written a script for myself which creates a file with the correct order to create a fresh world db, you might find the output useful [1]. I did update it to the latest, but no one cared and it's not that beautiful written.

Then why on earth is this stupid bag not working?!
I don't know about what your talking.
No offense, but the wiki isn't THAT helpful. At least for me.
I'm not offended, I didn't write the articles. I just feel like they cover most of the relevant aspects, have a look at the linux guides, maybe they are better than the windows guides. Also I'm quite often member of the silent (and dying) mangos user irc channel, for questions join us and ask.

Regards

Skirnir

PS: Wall of text and I'm supposed to finish my diploma thesis -.-

[1] https://gist.github.com/747461

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use