Commit Graph

46 Commits

Author SHA1 Message Date
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Tad Hardesty
37ba1c5f1b Remove redundant max_threads value (#52317) 2020-07-22 05:30:06 -03:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Jordie0608
fb119b1e22 adds arguments listing to query error logging 2020-07-10 04:41:29 +10:00
spookydonut
88d1d36aef Removes some var/const that should be defines (#51461)
* Removes some var/const that should be defines

* change requests

* change requests
2020-06-25 03:00:09 -04:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
Tad Hardesty
829e95896e Replace BSQL with rust-g, paramaterize all queries (#51255)
cl
refactor: BSQL has been replaced with rust-g, improving SQL reliability and safety.
/cl

Queries were parameterized as much as possible. Careful code read by someone else also versed in SQL would be a good idea. Things seemed fine spot-testing roundstart, library, bans, and polls, but more stress-testing may be useful.

Also updates rust-g to v0.4.5:

    Improved Linux .so detection
    Perlin noise functions

Also updates Travis script to bionic.
2020-06-08 16:00:07 +12:00
Jordie
902ca44026 Queries attempt reconnection on mysql 2006 error (#44144)
* queries attempt reconnection on mysql 2006 error

* change failed connection cutoff to use timer
2019-05-31 19:11:16 +02:00
MrStonedOne
186f6c8ddd dbstickybans: Qdeleting queries, misc fixes, Query select proc for executing mutiple queries at once... 2019-03-16 00:23:40 -07:00
Jordan Brown
9a44187c1c Censor the right BSQL call (#41076) 2018-10-22 21:55:21 +03:00
vuonojenmustaturska
e9ee3e72aa [Adventurous testmerging only] make all (except one) DB operations async (#40611)
cl Naksu
code: DB queries are now async by default, the code that runs in /world/New has been adjusted to continue blocking as it apparently is not allowed to sleep.
/cl

closes #40610
2018-10-01 09:44:38 +13:00
Jordan Brown
a139ca31e5 Fix connection errors not showing with SSdbcore.ErrorMsg() (#39613) 2018-08-09 17:02:49 -04:00
Jordan Brown
32a2221302 Adds BSQL thread limit to configuration options 2018-07-24 14:46:36 -04:00
Kyle Spier-Swenson
07824d3a20 MassInsert now defaults to async. (#39180) 2018-07-18 22:53:05 +03:00
Jordan Brown
d210adbf1a Adds BSQL (#38323)
* Add BSQL library v1.1.1.0

* Modify dbcore to use BSQL

* Add missing QDEL_NULL for connectOperation

* Moves BSQL_Shutdown() call to dbcore shutdown

* Fix passing the wrong argument to DBQuery/New()

* Darn it @Jordie0608. Fixes db calls without Connect check

No seriously please make sure I'm not breaking anything

* Queries with a null connection won't runtime

* Fix quoting

* Fix mistake

* Update BSQL to v1.1.2.0

* Update BSQL DMAPI to v1.0.1.0

* Fix connection instatiation

* Does the smart thing in regards to quoting

* Fix braces

* Update BSQL to 1.2.0.0. DMAPI to 1.1.0.0

* Execute/NextRow/MassInsert now have async parameter

* Build BSQL for tests

* Add missing apt source

* Def still need gcc-multilib

* Wut

* Revert "Wut"

This reverts commit d7c98a9a6b27f6db03e9f5cc534650d59d018048.

* Try this then

* Could it really be that simple?

* Literally running out of ideas here

* Update BSQL to v1.2.1.0 DMAPI to v1.1.1.0

* Update BSQL travis version

* Nothing about this makes sense tbqhwyfam

* Whoo boy

* No idea why this isn't working tbh

* Absolute madness

* Ahhhhhhhhhhhhh

* *deep breath*

* "though yet again i was frustrated by failure"

* Add BSQL to Dockerfile

* Pass through MassInsert async param

* BSQL to v1.3.0.0 DMAPI to 1.2.0.0

* Add timeout support

* Wait, something's fucky

* Wtf is this meme?

* Just get good lmao

* Just stop being shit lol

* Stupid verbose logging

* Remove verbosity

* Good god

* BSQL to v1.3.0.1 DMAPI to v1.2.0.1

* BSQL to v1.3.0.2

* Update BSQL travis version

* Update BSQL docker version

* Didn't mean to change that

* Strip connection information from debug logs and make it configgable

* Move this to where CONFIG_GET is defined
2018-07-16 17:05:41 +03:00
Jordan Brown
84ae366f06 Fixes MassInsert query deleting (#38610) 2018-06-20 17:03:44 -07:00
Jordan Brown
bc065d4bbc Adds /datum/DBQuery/proc/SetQuery (#38584)
* Adds /datum/DBQuery/proc/SetQuery

* Needful newness
2018-06-20 00:18:23 -07:00
Jordan Brown
1a22d45dbf [s] Fixes stack overflow (#38592)
[s] Fixes direct sql datum call exploit.
2018-06-19 16:10:30 +02:00
Jordan Brown
cf7e8aa9ec Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 22:48:35 +03:00
Jordan Brown
b661a52ed1 Merge pull request #37838 from Jordie0608/ithoughtaboutmakingthissendanemailbutidontwanttodrownmyinbox
Query debug logging
2018-05-17 22:38:32 -04:00
Jordie0608
124230251b log only slow queries 2018-05-16 15:30:27 +10:00
Jordie0608
d25762dddd query debug logging as a config option 2018-05-16 14:59:39 +10:00
Jordie
37854a5489 Splits up round table initialize, start, end and shutdown (#37665)
For planned change to how TGS initializes server instances ahead of time so rounds aren't tracked as being far longer than they really would be. Similarly end time split for a more accurate round duration.
2018-05-15 19:11:39 +12:00
Jordie0608
6b4316a201 query debug logging 2018-05-14 19:55:20 +10:00
Jordan Brown
916241cbd2 Un-Cyberboss' DB conversions 2018-03-23 15:02:23 -05:00
Emmett Gaines
70beb65889 Unit test to make sure all subsystems which initialize call parent (#36466) 2018-03-20 14:01:46 +01:00
Jordie
71ca25afbb Merge pull request #35120 from tgstation/a
Revert "Removes unused consts from dbcore (#34711)"
2018-01-31 09:08:36 +11:00
Cyberboss
f3cf3c5e2d Revert "Revert "Fix sql injection""
This reverts commit 23eeb4ac80.
2018-01-29 21:54:19 -05:00
Cyberboss
23eeb4ac80 Revert "Fix sql injection"
This reverts commit de4be23ff7.
2018-01-29 21:53:16 -05:00
Jordan Brown
de4be23ff7 Fix sql injection 2018-01-29 21:51:19 -05:00
Jordan Brown
d038551fbd Revert "Removes unused consts from dbcore (#34711)"
This reverts commit 1dc1bfcfef.
2018-01-29 16:32:43 -05:00
Jordan Brown
1dc1bfcfef Removes unused consts from dbcore (#34711) 2018-01-21 22:14:34 -05:00
Jordan Brown
dfa6576452 Removes an unused proc 2018-01-21 18:12:37 -06:00
oranges
a26ad89646 Move roundid and schema check to dbcore subsystem
The admin messages about a schema mismatch are now queued until
subsystem Initialize, as clients do not exist until after world/New, so
there was no clients for goonchat to queue messages to before then
2018-01-16 09:14:45 +00:00
swindly
d3df913402 fixes spelling and stuff (#32531) 2017-11-09 11:03:50 -06:00
Firecage
ee3e8d2846 merge conflict fix 2017-10-05 11:22:57 +02:00
Firecage
2ae0380fef Does some code standardization/consistency 2017-10-05 11:13:47 +02:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
Jordie
6dece51512 Fixes faulty query and logic (#27890) 2017-05-31 10:38:12 -03:00
Jordie
f042d97448 Adds round table to replace tacking some data in feedback table (#27454)
* adds round table to replace tacking some data in feedback table

* removes obsolete code for acolytes_survived

* uses a better query

* corrects var name

* uses actual sql queries

* adds commit column and connected checks before queries
2017-05-26 22:17:44 +02:00
Cyberboss
1c3b0321ad Fixes DBCore Recovery 2017-05-23 13:30:39 -04:00
Kyle Spier-Swenson
e23fee4c2c >mysql 2017-05-15 12:03:33 -07:00
Kyle Spier-Swenson
206abf39e3 Adds Mass Insert proc to sql (#27139) 2017-05-15 15:24:59 -03:00
Cyberboss
e7cd4c4bc8 Fixes SSdbcore showing the incorrect ErrorMsg (#26352) 2017-04-19 13:08:24 -06:00
Cyberboss
3c3f7d3b60 Refactors dbcon into a subsystem (#26134)
* Refactors dbcon into a subsystem

* Swear I got that already...
2017-04-17 15:18:17 +10:00