Commit graph

33 commits

Author SHA1 Message Date
Zwelf 88dc1c1a9c Add print functionality to SQLite 2020-09-10 20:16:42 +02:00
Zwelf 46b0ff354e Align InsertIgnore with other SQL query related functions 2020-09-10 20:16:42 +02:00
def 9bbd7f6259 Improve performance of /points
No need to do the rank() calculation at all

by heinrich5991
2020-09-07 23:11:24 +02:00
def a2b5d639a0 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:12:55 +02:00
def d492d6d270 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:10:23 +02:00
def f89766034c Don't lock SQL writes for teamrace
The slow query logs are full of this:

  # Time: 200906 21:03:43
  # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120]
  # Thread_id: 101540  Schema: teeworlds  QC_hit: No
  # Query_time: 11.012166  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
  # Rows_affected: 0  Bytes_sent: 67
  SET timestamp=1599419023;
  LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE;

Do we really need these lock? See also
https://dev.mysql.com/doc/refman/5.7/en/table-locking.html

> InnoDB tables use row-level locking so that multiple sessions and
> applications can read from and write to the same table simultaneously,
> without making each other wait or producing inconsistent results. For
> this storage engine, avoid using the LOCK TABLES statement, because it
> does not offer any extra protection, but instead reduces concurrency.
2020-09-07 00:34:01 +02:00
def c3f9dc7c9f INSERT OR IGNORE on sqlite 2020-09-04 16:12:12 +02:00
def e613f7df7f Allow loading from any server
Since we are switching to a single write sql server for sake of
simplicity
2020-09-03 22:56:22 +02:00
def 63f6ecd19d Ignore duplicate records when inserting (fixes #2636) 2020-08-29 08:26:03 +02:00
Zwelf f3619c27ee Remove incorrect check when inserting team ranks
Can be reliable reproduced by finishing in this sequence:

1. A, B
2. A, C
3. B, C <- triggers error

Fixes #2568
2020-08-13 09:58:56 +02:00
Zwelf a866c3e9b7 Fix team rank not updating after SQLite update 2020-08-12 10:57:43 +02:00
Zwelf 5b53a05a40 Rename LoadString to FromString to fix windows build 2020-08-09 17:14:11 +02:00
Zwelf d71bf5cef1 Use DB write server for /load 2020-08-03 12:58:52 +02:00
Zwelf 3e1324dd0a Add uuid parsing 2020-08-03 12:58:52 +02:00
Zwelf c6b1b08355 Database specific collate utf8 nocase
making and work
2020-08-03 12:58:52 +02:00
Zwelf d16bb5cc08 Make timestamps compatible with SQLite
works for `/mapinfo`, `/load`, `/save`, `/times`
2020-08-03 12:58:52 +02:00
Zwelf 41b5ee9dd8 Make /teamrank compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf aee73b99dc Rewrite insert teamrank making code reuse easier 2020-08-03 12:58:52 +02:00
Zwelf c8d710926f Fix missing last line 2020-08-03 12:58:52 +02:00
Zwelf 044edbe42b Make storing teamrank compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf a6df9be98e Make getting birthday compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf eb4d77f071 Make inserting ranks compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf 2eb3d23ef4 Rewrite score using the new interface
delete file_score for now as it will be replaced by a sqlite backend
2020-08-03 12:58:52 +02:00
Zwelf a8abc3937b Make game less dependend on score backend 2020-06-25 12:36:01 +02:00
GreYFoXGTi f6f7699ef1 btd Fixed compiling
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
2010-08-24 14:46:44 +02:00
GreYFoXGTi 51c6af1303 SvShotgunBulletSound
also added protection to shotgun stucks, needs to be tested when a random crazy shotgun bullet gets stuck
loaded the score file before saving to avoid corruption
added freeze and unfreeze in rcon
added protection in some rcon commands

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
2010-08-23 23:40:23 +02:00
btd d22052d800 Small improvements 2010-08-20 22:03:51 +04:00
GreYFoXGTi 05d81bc49a fixed seg fault on /top5 //thanks nevi
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
2010-08-20 19:45:25 +02:00
GreYFoXGTi 20930ce68b too many stuff to write but the idea is to implement the telelayer&speed thnx to Redix and Sushi Tee
also FrontLayer is ready to be implemented soon

Signed-off-by: GreYFoXGTi <GreYFoXGTi@Gmail.com>
2010-08-10 19:32:32 +03:00
btd 84cf23203d Revert storage.h 2010-08-07 12:02:58 +04:00
btd 7f65d880f3 Fix external records 2010-07-31 15:04:19 +04:00
btd eabe4639c8 Add storage.h. Add config variable for holding records in appSaveDir. I am not sure is it right way 2010-07-31 13:14:20 +04:00
GreYFoXGTi 434b4aad86 The Porting of DDRace-Beta to trunk by [BlackTee] den Maps with one and two layer works properly. Laser works. Fix second game layer Re-added logs Readded the rcon commands addvote and scoring system and time Fixed Weapons
Signed-off-by: btd <bardadymchik@gmail.com>
2010-07-29 08:59:32 +03:00