Commit Graph
22 Commits
Author SHA1 Message Date
Michael Flaherty 34e91fbd81 Restore SQL_CheckConfig Behavior (#873)
* Change lookup strategy for SQL_CheckConfig

* Ensure db conf lookup failures default to ..default

* Revert "Ensure db conf lookup failures default to ..default"

This reverts commit 03dc703daeeeadaa134e2160bf2c7cd812402758.
2018-10-07 14:08:11 -07:00
Michael Flaherty b9b6832a11 Streamline ConfDb loading proceedure (#791)
* Create DatabaseConfBuilder & remove locking
* Remove all refcounting

This is part 1/n in regards to this PR's rework
* Move db conf lookup out of RunThreadPart
* Return default configuration for failed lookups
* RefPtr members & stop leaks
* fix uint comparison warning
2018-06-19 09:35:37 -07:00
peace-maker ea8fdd8fbb Fix crash when a database transaction fails (bug 6531) (#577)
If one of the queries fails in a transaction, the DBI system would only allocate an array of the size of the amount of all the successful queries before the failed one. It writes data for all the queries though effectively writing past the array bounds leading to heap corruption.

Create the right sized array!
2017-01-22 22:27:31 -08:00
peace-maker d3d16a93cf Fix threaded query's result handle access rights (#567)
Plugins were able to close the results handle in the threaded query
callback causing a double free crash. The access rights are setup right
before the handle is created, but weren't used.
2016-12-11 16:35:53 -08:00
Asher Baker 215599b90f Merge PR #489: Do not call functions in paused plugins
This should be reverted when pausing is removed, see PR discussion.
2016-10-03 16:51:45 +01:00
Asher Baker 47dd2870d9 Merge pull request #476 from alliedmodders/query-format
Implement an auto-escaping Format native for SQL query construction
2016-10-03 16:20:01 +01:00
David Anderson 27e812461f Update to the latest SourcePawn and AMTL. 2016-09-24 16:45:04 -07:00
Peace-Maker 4f4903a05e Don't try to call functions in paused plugins
This avoids spam of "Plugin not runnable" exceptions on shutdown or
plugin unload.

When re/unloading a plugin which has other ones depending on it, like
the adminmenu, It pauses the depending plugins putting them in an
"Depends on plugin: %s" error state. ForwardSys doesn't remove them from
the forward lists on pause, specially the global forwards, and still
tries to call all the global forwards like OnPlayerRunCmd and
OnLibraryAdded etc. on the paused plugins. Executing functions in paused
runtimes has been ignored in the VM before introducing the "Exception"
mechanism, but now they're all logged.

This adds checks to make sure the plugin is runnable before calling a
function. (Stolen from #438)
2016-03-14 13:24:23 +01:00
Asher Baker 700ec92a9a Implement an auto-escaping Format native for SQL query construction 2016-02-15 15:05:16 +00:00
David Anderson e2b399b8d3 Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
David Anderson 4e275eea97 Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
David Anderson 3d5c9f0e21 Rename smcore to bridge, and use it as a pointer. 2015-08-30 23:27:53 -07:00
David Anderson 49383e7391 Fix wrong value in transitional DBI callback. (bug 6292) 2015-01-16 00:33:29 -08:00
David Anderson b1cb06c5ce Update DBI for transitional syntax. 2014-12-13 16:34:58 -08:00
David Anderson b64551e984 Fix a Handle leak when reporting transaction errors. 2014-06-22 11:05:20 -07:00
David Anderson f250461648 Fix typo. 2014-06-05 01:28:53 -07:00
David Anderson 36c342fc7b Add comment. 2014-06-05 01:22:44 -07:00
David Anderson e6d8416f0e Fix typo. 2014-06-05 00:59:46 -07:00
David Anderson cb16a78681 Fix memory bugs. 2014-06-05 00:38:09 -07:00
David Anderson 2930fb1963 Change indentation. 2014-06-04 22:46:40 -07:00
David Anderson d7b49f7706 Initial implementation. 2014-06-04 22:45:26 -07:00
Nicholas Hastings 1d1b5d1c6d Move DBManager and DB natives from core to logic (bug 5953, r=fyren).
--HG--
rename : core/Database.cpp => core/logic/Database.cpp
rename : core/Database.h => core/logic/Database.h
rename : core/sm_simple_prioqueue.h => core/logic/sm_simple_prioqueue.h
rename : core/smn_database.cpp => core/logic/smn_database.cpp
rename : core/sm_queue.h => public/sm_queue.h
2013-10-09 08:43:08 -04:00