Commit Graph

13 Commits

Author SHA1 Message Date
014f4ac0be Some additions to previous patch + downmerge from 1.1
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.
2022-05-23 23:03:37 +02:00
aec36978c3 CONCPP-96 The fix and testcase
The fix sets precision 30 for conversion of the double number to its
string representation, requeired for "client side" statement preparing(server
side wasn't affected by the bug). 30 is taked because it's max number of
decimals for decimal column type. This can cause "overflow" errors if
setDouble is used to populate shorter varchar or other types. SOme older
test have been amended to deal with that.
Testframework was fixed to be more informative about where the error
occured(often it printed line where the exception was caught, and for
some tests that is not very helpful.
Fixed couple of compilation warnings.
2022-05-04 19:28:48 +02:00
623eefe3f2 CONCPP-61 Fix of build with VS2015
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.
2021-02-05 14:51:50 +01:00
ffb3ba5776 CONCPP-59,60 Windows package issues, Exception crash fix, and more
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.
2021-02-04 14:15:58 +01:00
43d72ad28b CONCPP-57,CONCPP-55 Making client side prepared statement a default(instead of ssps)
This includes fixes of various outstanding bugs in CSPS
Made setDouble to accept long double(CONCPP-55)
static_test and driver_test now make one run with default CSPS, and one
with SSPS
Updated README.md with more options info. Changed desription of some
options in DefaultOptions.cpp. Fixed use of autoReconnect and
localSocket
2021-01-19 17:40:49 +01:00
eff5d647b9 Made all tests configurable via env variables
Tests connection credentials can be passed using env variables. All
tests use the same settings for that.

Added the link to the documentation to the README(.md)

Changed in SQLString all size_t to std::size_t(more like for
consictency).
Added npos constant there
2020-12-09 17:56:33 +01:00
c235b46300 CONCPP-51 Crash in stmt created on later deleted connection
Also fixed error in tests, that could make ctest not to notice filed
test suites.
Increased timeouts for some tests(skysql)
Some changes in travis osx script
2020-11-18 23:15:08 +01:00
11183f39ba CONCPP-35, CONCPP-36, CONCPP-37, CONCPP-40 Fixes and testcases covering
these and previous couple of commits(without specific test)
2020-09-25 14:30:36 +02:00
c33fe179cb CONCPP-25 The fix and the testcase
DatabaseMetaData didn't return correct server version - the call of the
function setting corresponding properties on connection was lost
somewhere.
String utils have been moved to separate unit(util/String.cpp) from
SQLString.cpp, and added to test framework for testing purposes. In
particular few bugs in the split function have been found.
2020-07-23 12:54:34 +02:00
1c9861ed93 CONCPP-23 CONCPP-22 CONCPP-12
CONCPP-23 and CONCPP-12 are connected, since good part of warnings were
caused by the SQLString class, and its redesign eleminated them among other
things. CONCPP-22 changes could probably be separated from others, but changed files
could also contain changes for other tickets. And still can be fairly
easy separated in case of need.
SQLString now hides internal string implementation and does not provide
the operator for transparent cast to std::string. While const char*
stays in place. Depending on the compiler, a construction
std::string var= <method_call_returning_SQLString>;
may work or may work not.
std::string var(<method_call_returning_SQLString>);
seems to be more portable.
But in the particular case of a blob fetched with
the getString, using the SQLString variable to accept the value is probably the only
choice(because of possible \0 bytes in the string)

Move constructor has been added.
2020-07-20 11:58:23 +02:00
9453d93d99 CONCPP-10 Fix of failing tests(mostly bugs causing them)
The commit contains too many fixes to remember all of them, really. May
resultset navigation fixes. Crashes, caused by not initializing of some
properties in some classes, etc.
2020-05-10 23:17:59 +02:00
ce18509577 Initial travis config. Enabling running tests with ctest
Changed all tests to have configurable via cmake parameters connection
defaults.
cts.sql now uses optional database, and is located in
CMAKE_BINARY_DIR/test
2020-03-29 23:15:16 +02:00
3d4a0059af First public commit 2020-03-17 15:05:27 +02:00