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>
2270: Consider time_freq() r=def- a=Learath2
The timer ticks way faster on macOS leading to some insane pings :D
Co-authored-by: Learath <learath2@gmail.com>
2268: Fix macOS CI r=def- a=Learath2
2269: Mark unused tunes as such r=def- a=Learath2
These are only used in the client for prediction.
Co-authored-by: Learath <learath2@gmail.com>