Jump to content

Recommended Posts

Posted

Mangos Version: 8073

Custom Patches: AHBot-004-HotFix-01 by Naicisum

SD2 Version: 1155

Database Name and Version : UDB 381

Just updated to MaNGOS Version 8073, applied all corepatches without error.

Didnt know where to post this but i suspect this patch to be the reason.

I got this errors like this since i updated:

 21:34:10 SQL: UPDATE money = '157715809' WHERE guid = '14'
21:34:10 SQL ERROR: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ''1577
15809' WHERE guid = '14'' at line 1

Whats wrong ?

Posted

void Player::SaveGoldToDB()
{
   CharacterDatabase.PExecute("UPDATE money = '%u' WHERE guid = '%u'", GetMoney(), GetGUIDLow());
}

Should be

void Player::SaveGoldToDB()
{
   CharacterDatabase.PExecute("UPDATE characters SET money = '%u' WHERE guid = '%u'", GetMoney(), GetGUIDLow());
}

Posted
I don't see why this values that are calculated every login shouldn't receive their own field... it would consume some space as a trade for cpu consuming. I'm wondering with the retail armory needs to calculate anything... :mellow:
You really don't want to go back to the problems caused by using the stat values loaded from the DB. The calculation needs to be done whether there is a separate field for it or not, making sure everything works correctly. So loading the value is a completely unnecessary overhead. This is not a tradeoff between space/cpu usage, both are just made worse by having the fields. Saving the values can on the other hand be useful to external tools and i think making a config option to enable that (even if never loaded by the server later i.e an unnecessary performance overhead for those who can afford it) might be something that can be discussed.
Posted
void Player::SaveGoldToDB()
{
   CharacterDatabase.PExecute("UPDATE money = '%u' WHERE guid = '%u'", GetMoney(), GetGUIDLow());
}

Should be

void Player::SaveGoldToDB()
{
   CharacterDatabase.PExecute("UPDATE characters SET money = '%u' WHERE guid = '%u'", GetMoney(), GetGUIDLow());
}

In [8074]. Thank you :)

Posted

and even if the data field is completely removed, its always possible to add an own table for your website or whatever that stores exactly the values you need. never beeing read, but always written on character save. (1 query more in whole saving process)

this will also save work when data field offsets change.

  • 2 weeks later...
Posted

with big chance no.... at least final `data` drop 100% sure will not added to 0.12: hard to recreated for preoper way switch to 0.13 structure and data.. For adding just new fields withuot `data` drop... fi this considered useful...

Posted

Vladimir we not needing apply rollback query before use [before_upgrade_to_0.13\\052_8072_01_characters_characters.sql] ?!

Example :

[HIGHLIGHT=SQL]

UPDATE `characters` SET `data`=CONCAT(CAST(SUBSTRING_INDEX(`data`, ' ', 1461) AS CHAR), ' ', `money`, ' ', CAST(SUBSTRING_INDEX(`data`, ' ', -131)AS CHAR));

[/HIGHLIGHT]

Posted

no, data at save stored and in old and in new fields so just drop new fields not create peoblem with backporting.

Except only case when you for example change level for _offline_ character and he not login before backport.

In like case he will have old level after backport. Same for other offline change data stored in new fields.

Posted

Are you eventually going to do away with `data`? Or are you waiting until all data contained within the data blob is moved out to individual columns?

Posted
Normal save still save _all_ data in `data`. So nothing deactivated. This data just not used at loading.

Ok... I understood the many:

- SaveDataFieldToDB();

+ SaveGoldToDB();

like killing the saving of money to `data`.

Posted
Are you eventually going to do away with `data`? Or are you waiting until all data contained within the data blob is moved out to individual columns?

Only when it will not need finally (nothing data will read at player loading from it).

Posted
Ok... I understood the many:

- SaveDataFieldToDB();

+ SaveGoldToDB();

like killing the saving of money to `data`.

This only meaning that moeny to `data` will saved _only_ at full save. But it not need anyway while new columps used. After normal logout value in `money` and monet in `data` must be same anyway.

Guest
This topic is now closed to further replies.
×
×
  • 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