This fixes compilation errors on systems, where the standard library doesn't happen to include sized integer definitions in one of the already included headers
---------
Co-authored-by: Lawrin Novitsky <lawrin.novitsky@mariadb.com>
I've made things simpler. Hopefully I've understood correctly what
problems did mingw have.
Along the way I've chcnged priority of the USE_SYSTEM_INSTALLED_LIB. It
wasn't respected, if libmariadb subdirecory is present and there is
CMakeLIsts.txt in it. Now if it's set, connector will be looking for
libs and headers installed on the system.
Introduced MARIADB_STATIC_LINK that needs to be defined if application
want to link static C/C++ lib on Windows. The other way is define
MARIADB_EXPORTS and MARRIADB_EXTERN as extern
Made MARIADB_EXPORTS definition in cmake target specific, and not
project wide.
Not sure why, but submodule looks to be not updated. Moved to v3.3.8 tag
The merge was done manually copying relevant code changes from 1.1.
In particulary merged the patch for CONCPP-94
Also many changes, that fix real possible issues, that was also present in 1.0 and found while
working on 1.1. For example(but not limited to), there were many cases of incorrect
find_first_of std::string method, where find had to be really used.
Also internally used class Value is changed to use SQLString, instead of
(smart) pointer to it. Added missing SQLString object creation/destruction in
that class.
Checking in appveyor initial configuration.
Added windows test (try) to travis config.
The problem was, that if the created exception was a subclass as SQLException, it(or it's
copy) would eventually be destructed as SQLException. Thus, everything
but SQLException would leak. That happened, because as a quick solution
at the time, they all were thrown as SQLException. Caught as
SQLException&(they could not be caught as an exception of its own
class), they would be destructed as SQLException.
As the solution, exception are thrown at the moment of creation, if
possible. Otherwise connector operates spesially created
class(MariaDBExceptionThrower), that
can throw exception of the correct type
It choked on const initialization with constexpr
Second possible issue was with
REASON_UNKNOWN in the ClientInfoStatus enum. It clashes with define in
one of Windows headers(Winreg.h). Added undersore prefix to the name.
Also fixed most often warning there.
Additionaly the commit contains some fixes in test faramework and in
tests.
Added missing headers to msi. Headers now installed into include/mariadb
ALl headers have been renamed from .h to .hpp
ConnCpp.hpp renamed to conncpp.hpp(all small letters)
All headers but conncpp.hpp, have been moved to conncpp subdirectory in
include, and in the msi
All exception classes have got explicit (exported from dll on Windows) copyconstructor
decluration, and definition of those constructors in the connector
library. And to stay on the safe side, all other constructors and
destructors definitions have been moved to library side.
Fixed the error, that few exception methods were declared as
dllimported, and defined in the header at the same time.