EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   some code still referencing character_ table? (https://www.eqemulator.org/forums/showthread.php?t=38812)

noudess 09-22-2014 04:45 PM

some code still referencing character_ table?
 
So to test my understanding:

- when I got the latest code dump and ran it on my database, it detected that my db used blobs for character data, then ran a conversion to the new tables and renamed character_ to character_old.

- Now, lookng at the code elsewhere, I see references to character_ for looking up characters by name to get the account.

My server thus crashed every time I zoned.

I changed the code to use character_data and all is well.

In trying to figure out why others are not seeing this... I can only assume that all of them had to run the conversion more than once, and as such they repopulated character_. The second time they run conversion, I see that the rename would fail, leaving the table.

Do you guys agree that the code should no longer reference character_?

noudess

demonstar55 09-22-2014 04:47 PM

Update. All of them should of been fixed as of last night. If they're not, tell us where.

noudess 09-22-2014 04:49 PM

Ah good. I just pulled last night, so maybe I was a tad early. I'll give it a shot.

noudess 09-22-2014 05:07 PM

I am brand new to git, so I may have done something wrong, but it looks to be wrong still:

I did an uptream fetch and got 5 commits from the main line, but I still need to make this change.

I can commit this so I learn about git if you want.

Quote:

-- a/common/database.cpp
+++ b/common/database.cpp
@@ -771,7 +771,7 @@ uint32 Database::GetCharacterID(const char *name) {
Zero will also be returned if there is a database error.
*/
uint32 Database::GetAccountIDByChar(const char* charname, uint32* oCharID) {
- std::string query = StringFormat("SELECT account_id, id FROM character_ WHERE name='%s'", EscapeString(charname).c_str());
+ std::string query = StringFormat("SELECT account_id, id FROM character_data WHERE name='%s'", EscapeString(charname).c_str());


demonstar55 09-22-2014 05:18 PM

git pull does a git fetch and a git merge. fetch just downloads the changes, doesn't apply them.

noudess 09-22-2014 05:46 PM

Quote:

Originally Posted by demonstar55 (Post 234095)
git pull does a git fetch and a git merge. fetch just downloads the changes, doesn't apply them.

Ok thanks. I got it.

On a second note, there is a duplicate file (well, one with a naming issue that is a copy of another.

--- a/utils/sql/git/required/2014_06_25_AA_Updates..sql


All times are GMT -4. The time now is 06:13 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.