-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#10 Fixing character logout save #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @UTengine, thanks for the PR.
I would like to avoid from merging this, although it "fixes" the issue. We have a ticket in the backlog to convert these columns to binary instead of varchar. Database had it right, but server files didn't. Please check: ko4life-net/ko#94
Wondering if we can marge this, along with this, as an incremental step? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @srmeier! Thanks for that.
I tested and your fix indeed works. I'll have to rebase your PR a bit based on my feedback below. Nothing that needs to be done from your part, this is just as FYI for myself and you.
2023-7-6 13:56, * Packet Count : recv=0, send=0, realsend=0 , time = 13:56 2023-7-6 13:57, SelectCharacter : acname=steve, name=REDACTED, index=0, pid : 59028, front : 8 2023-7-6 13:58, * Packet Count : recv=1, send=1, realsend=1 , time = 13:58 2023-7-6 14:0, * Packet Count : recv=1, send=1, realsend=1 , time = 14:0 2023-7-6 14:1, [Error-DB Fail] {call UPDATE_USER_DATA ( 'REDACTED', 1,1,101,0,0,0,15,789,0,0,0,0,0,132,132,100,75,65,60,50,50,1,42,615549,1,-13108,39960,155580,12680,0,?,?,?)}, Skill[] Item[] 2023-7-6 14:1, [AccountLogout] acname=steve 2023-7-6 14:1, Logout : steve, REDACTED (W:1,U:0) 2023-7-6 14:1, Invalid Logout : steve, REDACTED (W:1,U:0,A:1) 2023-7-6 14:13, UserDataLogout Check Error: steve, REDACTED (W:0) fixed state: 2023-7-6 14:40, * Packet Count : recv=7, send=7, realsend=7 , time = 14:40 2023-7-6 14:42, SelectCharacter : acname=steve, name=REDACTED, index=7, pid : 59028, front : 53 2023-7-6 14:42, [AccountLogout] acname=steve 2023-7-6 14:42, Logout : steve, REDACTED (W:1,U:1) 2023-7-6 14:42, SelectCharacter : acname=steve, name=REDACTED, index=8, pid : 59028, front : 60 2023-7-6 14:42, * Packet Count : recv=9, send=9, realsend=9 , time = 14:42
@srmeier: + Adjusting migration script numbers and updating the src/migration/10_fix_userdata_columns.sql script to update to BINARY + Adjusting column names to reflect datatype + updating the load user data proc
+ Reworked the fix_userdata migration script to preserve columns order.
d4f9841
to
d5563e3
Compare
Both tables should now be compatible and use proper binary columns. Plus the procedure will properly transfer data to DELETE_USERDATA table as a backup resort.
The rename is just for consistency with USERDATA table. Also increase the capacity for bySerial column to match with byItem.
Note that when generating diffs, the code should already be formatted at this point in the db and source, hence there is no need to format again, which slows down things noticeably.
This will make it easier to see what they changed in the current db. If you update any of these migration scripts, please generate the diffs again so that they're synced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023-7-6 13:56, * Packet Count : recv=0, send=0, realsend=0 , time = 13:56 2023-7-6 13:57, SelectCharacter : acname=steve, name=REDACTED, index=0, pid : 59028, front : 8 2023-7-6 13:58, * Packet Count : recv=1, send=1, realsend=1 , time = 13:58 2023-7-6 14:0, * Packet Count : recv=1, send=1, realsend=1 , time = 14:0 2023-7-6 14:1, [Error-DB Fail] {call UPDATE_USER_DATA ( 'REDACTED', 1,1,101,0,0,0,15,789,0,0,0,0,0,132,132,100,75,65,60,50,50,1,42,615549,1,-13108,39960,155580,12680,0,?,?,?)}, Skill[] Item[] 2023-7-6 14:1, [AccountLogout] acname=steve
2023-7-6 14:1, Logout : steve, REDACTED (W:1,U:0)
2023-7-6 14:1, Invalid Logout : steve, REDACTED (W:1,U:0,A:1) 2023-7-6 14:13, UserDataLogout Check Error: steve, REDACTED (W:0) fixed state:
2023-7-6 14:40, * Packet Count : recv=7, send=7, realsend=7 , time = 14:40 2023-7-6 14:42, SelectCharacter : acname=steve, name=REDACTED, index=7, pid : 59028, front : 53 2023-7-6 14:42, [AccountLogout] acname=steve
2023-7-6 14:42, Logout : steve, REDACTED (W:1,U:1) 2023-7-6 14:42, SelectCharacter : acname=steve, name=REDACTED, index=8, pid : 59028, front : 60 2023-7-6 14:42, * Packet Count : recv=9, send=9, realsend=9 , time = 14:42