mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
98b448ebcc
2247: Thread safe SQL interaction r=def- a=Zwelf This PR intends to make the database interaction thread safe and optimizes some SQL queries. This is still a WIP, but since it is a rather big PR I wanted to get feedback early on. Benefits: * remove race conditions leading to undefined behavior and potential crashes * logging game related database results in teehistorian would be possible Behavior change: * /top5team prints ranks in reverse order when passing a negative number (like /top5, /top5points) * Optimize SQL statements for /rank /teamrank /top5 /top5team /points /top5points * /load without parameters doesn't pass the SQL error to the user (as most other functions) * Simplify IScore interface * Add UUID to /save table (update of database schema necessary): ``` ALTER TABLE record_saves ADD SaveID varchar(64); ``` * /save immediately kills team and loads it again if the database insert fails. still TBD: * [x] saving (team) score when finishing * [x] loading team save * [x] loading initial time and birthday check * [x] /map and random map votes * [x] RFC: generate a passphrase (2-3 word) if save-code exists or no save-code is given making /save failures much more rare and save-codes more secure * [x] clean up code (removing now unused structs, ordering of functions in IScore) Co-authored-by: Zwelf <zwelf@strct.cc> |
||
---|---|---|
.. | ||
audio | ||
countryflags | ||
editor | ||
fonts | ||
languages | ||
mapres | ||
maps | ||
shader | ||
skins | ||
arrow.png | ||
blob.png | ||
browse_icons.png | ||
ca-ddnet.pem | ||
console.png | ||
console_bar.png | ||
debug_font.png | ||
demo_buttons.png | ||
demo_buttons2.png | ||
emoticons.png | ||
file_icons.png | ||
game.png | ||
gui_buttons.png | ||
gui_cursor.png | ||
gui_icons.png | ||
gui_logo.png | ||
particles.png | ||
wordlist.txt |