Commit Graph

49 Commits

Author SHA1 Message Date
18b2d22c51 CONCPP-110 Fixed, that could confuse the compiler.
Contains also libmariadb submodule update to the latest release and some
tests improvements/fixes.
2022-11-16 15:37:46 +01:00
d19b6611fa Adding ability to set tests verbosity using env variable
Made teavis tests verbose. Made some tests timeout longer
2022-09-26 14:32:15 +02:00
96efd9e142 CONCPP-106 Enabling use of bulk statement execution with the testcase
The feature is enabled with useBulkStmts boolean options, that is off by
default. Works only with MariaDB servers >= 10.2.7. It won't be used
with streaming parameters.
2022-09-26 00:40:15 +02:00
b311cbec93 CONCPP-107 Preventing possibility to set fetch size !=0
1.0 version does not support this feature
2022-09-20 14:39:04 +02:00
ff0f77cd8a CONCPP-105 crash when attempting connections from multiple threads
The RowProtocal class used reference to static object, that caused race
condition in concurrent environment.
Also, small addition to packaging on macos.
2022-07-26 14:54:24 +02:00
4f4609add7 [misc] travis test adding suite
mysql test improvement
2022-07-19 15:03:07 +02:00
e2e03dadfd CONCPP-99 rewriteBatchedStatements option support
For insert queries, rewrites batch of staments to execute in a single
executeQuery. e.g.
insert into ab (i) values (?) with first batch values = 1, second = 2
will be rewritten as insert into ab (i) values (1), (2)
If query cannot be rewriten in "multi-values", rewrite will use
multi-queries, i.e.
insert into ab (i) values (1);insert into ab (i) values (2)
Using this option causes the useServerPrepStmts option to be set to false
2022-07-17 19:14:52 +02:00
ed44e401b0 Fixed the teststcase in databasemetadata for 10.8
It's about descending part of an index.
Moved 10.8 out of allowed failures section on Travis

Fixed getServerVersion in the test framework to work correctly with
minor versions >9(and affected testcases)
2022-05-23 23:22:40 +02:00
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
f2df1062c2 CONCPP-78 Introduced useCharacterEncoding connection option
Users can use it to set charset used in the conection.

Temporarily made tests against built 10.6 allowed to fail(before that
fixed for travis)
2021-06-14 11:08:33 +02:00
ed2632f03e Tentative fix for the issue.
There is no ticket yet, but bound to use of binaries built with
differnet VS version.
2021-05-05 23:39:23 +02:00
474973768e Fixed tests for run in Travis against SkySQL
Added useCompression to the README
Removed one obsolete cmake option from travis build script
2021-04-16 18:36:35 +02:00
be22353bc2 CONCPP-70 statement::addBatch test sporadically failed
The reason was, that filling of vector with executeBatch results was
done using undefined behavior - it was done using [] operator member
access for not existing members. The values were inserted correctly, but
the size of vector happened to not always be reported correctly.
Added similar test to preparedstatement.
Made clearBatch not to reset current set of parameters - that looks
like to be that jdbc specs expect.
Fixed other such cases of wrong vector use.
Made some to/from text conversion to use C locale.
2021-02-19 10:45:36 +01:00
029bd01df6 Removed direct openssl dependency
Updated dll's copyright year.
Small example program change.
Modified connectionmetadata::getColumnPrivileges test
2021-02-12 18:36:32 +01:00
983e4a84af CONCPP-65 Fix of various possible memorey leaks and other errors 2021-02-08 11:12:24 +01:00
cb827c8653 CONCPP-64 The fix of the reconnect method
Statements created on connection before reconnect stay unusable(in case
connection were lost). New objects have to be created
2021-02-08 02:32:23 +01: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
02a4ff2488 [misc] test addition
* test against latest 10.6 build
* add SkySQL HA
* update to maxscale 2.5.3
2021-01-19 23:54:09 +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
c03f6aa5e5 Build fix
Lately to fix one test build with certain VS version, not portable
change has been made, that broke build on other platforms.

Fix of couple of tests for older server versions.
2020-12-04 16:09:08 +01:00
32afc2799a Fix of one testcase in 'statement' that fails with some VS versions
Build fails.
2020-11-25 00:33:25 +01:00
fff542dde4 CONCPP-52,53,54 executeBatch() would execute only last query
and bytes, Ints, Longs were not exported.

API change: execute(Large)Batch return reference to const objects,
rather than pointers.
Restructuring of API and internal headers and introducing of new
separate header files.
Added statement testsuite to ctest - that was forgotten
Connector quality set to RC
2020-11-24 23:13:22 +01:00
2704acd7f4 CONCPP-46 Addition - fix of the build with gcc on macos
Some travis congig fixes for macos

Errors and warnings.
Fix of one testcase failing aginst 10.2
2020-11-15 23:57:16 +01:00
3145f965c6 CONCPP-46 Resultset navigation issue(s) fix and testcase
In particular connector failed, if navigaten started from 'absolut()'
call, but coulrd be others problem as well.
The patch extended existing test.
Added 'unsorted_bugs testsuite to the ctest
Fix of the build on macos in travis - openssl libs could not be found
2020-11-13 15:34:24 +01:00
197c36b4c6 CONCPP-46 Fix of clang compilation errors&warnings
Added testing against 10.5 in travis.
2020-11-10 23:30:38 +01:00
1ce04edb44 CONCPP-45 Various issues with CallableStatement
Also fixed many things in multiple resultsets processing. Fixed many
tests(previously skipped), and workarounded CONC-504
2020-10-05 22:59:39 +02:00
2f4acdb898 CONCPP-44 The fix and the testcase
For binary protocol connector expected the string is null-terminated.
Also it getBoolead was subotimal and significantly slowed down the
testsuite running.
Removed 5.5 server from travis config
Fixed database metadata test to skip one check with 10.1 server, as it
returns wrong data in many cases.
2020-09-28 13:21:00 +02:00
d911eafb2c Fixed few tests that depend on features not supported in older servers 2020-09-25 23:14:50 +02: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
9a8daef07e CONCPP-29 Introducing DriverManager class with getConnection only
functionality. Unlike connecting via Driver class,
DriverManager::getConnection methods throw an exception in case
connection could not be established for whatever reason. i.e. also if
the format of url is incorrect and could not be parsed.
DriverManager only permits jdbc:mariadb:// type of url. Well, it's
driver manager after all, and needs to know which driver to invoke.
Changed unit tests to connect via DriverManager
Added use examples to the README.md
Fixed return from false to nullptr in couple of methods of the Statement class. They were added to
remove warnings, bool value is wrong for the methods.
Fixed build of database metadata class test on 32b Windows
2020-08-11 14:17:28 +02:00
8baa37e6c0 CONCPP-28 Various fixes int DatabaseMetaData class and in related tests.
The biggest class of changes is making MariaDB schema(database) a schema
in the connector, and not a catalog.
Then many methods and/or tests returned/expected wrong data.
Fixed also issue with resultset navigation. Certain sequences of
the cursor navigation methods could cause the cursor to be at the wrong
position. If I am not mistaken, one of sequences could be next-set of
navigation commands-absolute(0)-next
2020-08-10 19:13:42 +02:00
1a22b796cd CONCPP-26 fix(and the test for getBestRowIdentifier was already where)
enum's in all public interface classes have been verified and changed
where needed.
getBestRowIdentifier returns bestRowSession for SCOPE, not unique
indexes excluded, and generated columns are said to be "pseudo"
2020-08-05 12:50:14 +02:00
374aa394ba Added one more testsuite to ctest(connection)
Added queryTimeout init by the respective constructor and changed its
check to > 0 from !=0
2020-08-03 14:56:39 +02:00
c71b1afc35 Extended a bit testcase to test CONCPP-20
Made timeouts for somet tests longer(it takes time with remote SkySQL
DB).
2020-08-03 14:25:04 +02:00
8dfd4b354f CONCPP-21 Testcase only - it must has been fixed before 2020-08-03 13:07:44 +02:00
485fa861a1 Re-arranged unit/classes tests build
Moved common files to the separate OBJECT lib, as it looked like it is
quite difficult for the gcc to chew it.
Skipped tiem-outing test for now. Needs to be fixed.
2020-07-31 10:50:37 +02:00
dda40e1fc7 Connector/C submodule update to 3.1.9
Build error fix
2020-07-30 17:29:24 +02:00
94abce1a8b CONCPP-15 Fixed memory leaks in testcases 2020-07-26 23:22:06 +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
eb681b4ff4 Updated requred cmake version to 3.1
FIxed possible compilation error - added inclusion of <stdexcept> to
ClassField.h.
Fixed couple of remained errors in connection and bugs tests, where properties
were initialized with bool value.
Also, fixed few compilation warnings(CONCPP-12). 2 of them weren't
harmless and were bugs(assingment instead of comparison in 'if'
condition).
2020-06-16 16:51:01 +02:00
690e253004 Changes to the tarball package layout
Changed includes directory and Connector/C no goes to the same dir as
C/C++
Turned off one test - needs fix.
2020-05-11 13:54:48 +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
c8ec1a0a7a CONCPP-8 Introduced set/getUInt methods. Version bumped to 0.9.2
Also added stubs for setClientOption(throwing SQLFeatureNotImplementedException)
Added to ctest another testsuite(which is actually failing)
2020-05-04 14:39:48 +02:00
7bc285cd5a CONCPP-6 The fix and the testcase
The connector wour throw on getParameterCount, if the query was w/out
parameters. Also, getParameterMetaData would not throw on closed PS.
Adding parameter metadata testsuite.
2020-04-12 20:20:17 +02:00
67f146ee6e Includes added to MSI
New banner product upgrade code and banner for msi.
Some amendments to tests build
2020-03-19 00:15:43 +01:00
3d4a0059af First public commit 2020-03-17 15:05:27 +02:00