Commit Graph

29 Commits

Author SHA1 Message Date
49a13a1b8d CONCPP-138 Application could crash if rs used after connection closed
That could happen only with binary results, i.e. with results of
PreparedStatement if useServerPrepStmts option set.

Also the commit contain some performance improvements. In particular for
converting string values to double.
2025-02-24 01:29:10 +01:00
7471580570 Extended a bit the test Bytes array parameter from previous commit
to demonstatrate and check its work, and a bit of sql::bytes

Corrected vendor name in cpack configuration.
2025-02-17 01:06:56 +01:00
ae20e01ee0 ByteArrayParameter: all bytes.length to size() and add test 2025-02-04 10:20:37 +01:00
3a6e29a6db Changes in tests for MySQL 2024-11-30 21:45:22 +01:00
d2dc327ee5 CONCPP-136 Adding Statement batch, fixing issue in previous commit
Statement::addBatch was omitted in previous commit. Here it is optimized
as well(in similar way).
Previous commit did not restore the autocommit in the stored server
status, so next query could thing it still off.

Fixed testcases for maxscale and fixing testing with mysql servers.
2024-11-18 12:13:02 +01:00
9ae1efaac5 CONCPP=133 Backported missing stuff from 1.1 to make it fully functional 2024-10-05 12:15:28 +02:00
7080eedd79 CONCPP-133 Partial fix(or rather part of fix) for merge into 1.1 mainly 2024-08-26 02:13:53 +02:00
9c40018528 CONCPP-116 The fix testcases and updated old testcase
Using setByte could crash driver at the query execution. Also, all
integer getters - i.e. getBytes, ..., getUInt64 would not return correct
number in case of binary string field. They old would try to use field
value as string data and convert string to the appropriate integer type.
It was revealed by setBytes testcase, as getBytes(for SELECT ? query)
would not return the same value, that had been set, or even throw
exception as "value is out of range"
2023-12-13 12:56:29 +01:00
6789821344 C/C moved to v3.3.8
Fix of test in databasemetadata, that checks functions returning server
version.
Update of Travis matrix
Added couple of tests to prepared statement to test SP with PS instead
of CallableStatement
2023-12-06 11:52:27 +01:00
2008641cc2 CONCPP-18 Fix of warnings with more warnings enabled
Also fixed bug in batch execution using param array(aka bulk) method.
Callback for parameters returned wrong type, and sometimes it could be
interpreted as an error, and the whole bulk operation would fail

Fix of the test in databasemetadata, that did not now wxpect server
major version can be 11

Removed 10.3 and added 11.0 to the travic config
2023-06-24 13:50:57 +02:00
bfd35a6849 Removed few cases for regexp use
These are to decide if string is date, is time, if the statement is Call
and is the statement prepareble/should be prepared on server
Also, removed some regexp references, that are currently not used(i.e.
in parts of code for features we currently not support)
2023-04-24 14:20:01 +02: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
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
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
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
983e4a84af CONCPP-65 Fix of various possible memorey leaks and other errors 2021-02-08 11:12:24 +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
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
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
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
3d4a0059af First public commit 2020-03-17 15:05:27 +02:00