Changing `class_skill` to BIGINT(20) in spells table

Development forum for the EQ2Emulator Database project.

Moderator: Team Members

Post Reply
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:

Changing `class_skill` to BIGINT(20) in spells table

Post by John Adams » Sun Aug 17, 2008 4:02 pm

This change shouldn't affect anyone, but let me know if it does. Due to the value on some of our `skills` (like Ordination's ID = 3,587,918,036) I had to change the data type from INT(10) to BIGINT(20) (just because, 20 sounded good to me).
Applying this change to the DB Update (dev) server now.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 17, 2008 4:47 pm

huh? Why did it need to be changed? Your not going to be using values over 0xFFFFFFFF are you?

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:

Post by John Adams » Sun Aug 17, 2008 5:16 pm

Because when I set Ordination as a class_skill, the larger number would not set and kept rounding off to 2bil whatever the max is for INT.
This would happen to any skill I set that was larger than the max int value.
To see what I am talking about, go look at the skills table ID values.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 17, 2008 6:18 pm

The field is set as an unsigned int(10) which means the max value is 0xFFFFFFFF or 4,294,967,295. If you are having problems using a value that large there might be a problem somewhere. Make sure that the field is indeed unsigned. That could be the problem.

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:

Post by John Adams » Sun Aug 17, 2008 7:05 pm

Aye, it was unsigned. I have no idea why it wasn't working, but it does now.
Is there a problem with it being BIGINT(20)?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Mon Aug 18, 2008 3:17 am

Not in the database, but the largest value it would ever use in the code and client would be 0xFFFFFFFF, so if you went over that value in the db you would have problems with it in the code.

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:

Post by John Adams » Mon Aug 18, 2008 6:13 am

Hmm. Well, 3,587,918,036 is definitely less than 4,294,967,295, so I am not sure why my editor couldn't handle it. I will look into it from the php/iis perspective and see if it's something there.
If so, we can revert this change. I don't want to mess up the code, though I do not believe there is a value higher than 4,294,967,295 in the skills table.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests