This adds support for using prepared statements for MySQL queries. It is
intended for use in a database quest API but it can be used in source
with some caveats:
- It uses exceptions for error handling instead of returning a fake
result that needs checked. Usage must be wrapped in try/catch.
- DBcore has a connection mutex which indicates the connection might be
shared with other threads. This mutex is locked for certain stmt
operations in an attempt to make it safe to use with multi threaded
connections.
- Prepared statements should only be used on the main thread since the
internal logging is not synchronized.
- Unlike the current query API which retrieves all results as strings,
results are stored in buffers that represent the db field type.
Getter functions are available to retrieve values as desired types.
* [Cleanup] Delete errmsg.h in common and zone
# Notes
- These files were mostly unused.
- Moved the stuff that was used to the `dbcore.h` file since it's already used.
* Remove references
* MYSQL objects cannot be copied in a well defined way, this removes the copy and replaces it with another connection
* Change to share underlying pointers.
* Push up mutex changes
* Post rebase
* Formatting
---------
Co-authored-by: KimLS <KimLS@peqtgc.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
We want to use winsock2.h rather than winsock.h. This was mostly enforced
from the global_defines.h file, but I wanted to make it consistent.
Most of these includes can be removed since they're included via
global_defines.h, but someone on windows should clean that up