163 Commits

Author SHA1 Message Date
91189648c8 Mainly to push 1.0 to the new branch(1.0)
Small fix of the readme
2025-06-24 15:21:29 +02:00
3370bf1555 bump the VERSION 2025-03-14 10:40:49 -04:00
a36ff95ac6 ODBC-141 Certificate validation is now explicitly turned off
If not selected otherwise.
The connection option `trustServerCertificate` responsible for that is
now properly documented in the README(.md) It is true by default that
means that certificate is not verified. If not set to false it now
causes also that certificate verification is explictitly turned off.
That enables connector to work without problem with C/C 3.4
1.0.5
2025-02-27 17:41:32 +01:00
9bb717ca28 CONCPP-137 Inconsistent type names returned by getColumnTypeName
from ResultSetMetaData. Some of them have prefix "Types::", some not.
They all should not have.

Fix of error in the previous commit in the RowProtocol.cpp
2025-02-24 11:41:46 +01:00
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
1365645497 CONCPP-140 Marked reset and reconnect Connection methods deprecated 2025-02-24 01:22:08 +01:00
e25877bba3 Updated C/C to v.3.3.14
Corrected test for caching_sha1_pwd as we doing things defferently, than
mysql.
2025-02-17 12:54:07 +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
1746a34afd Fix ByteArrayParameter::writeTo(SQLString& str) for negative sql::bytes::length
sql::bytes::length may be negative. That ByteArrayParameter::writeTo(SQLString& str) static_cast it directly to size_t causes unexpected result in this case.
2025-02-04 10:20:37 +01:00
db23132038 Remove a #endif of unknown significance
A #endif appears at an ill-formed location. Delete.
2025-01-30 14:53:52 +01:00
72724ffa1d Include <cstdint> in CArray.hpp
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
2025-01-21 16:47:35 +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
55d4e48372 CONCPP-136 bad batch execution performance with default settings
Changed default execution method to turn autocommit off for the time of
execution if it was on. Committing after the end of the batch if
autommit was on.
2024-11-10 18:15:49 +01:00
da8799b1c4 Replace usage of sprintf with snprintf
Co-authored-by: JOAQUIN BEJAR <jb@taunais.com>
2024-11-04 10:48:29 +01:00
73e6afbc0c Copied travis.yml from 1.1
Fixed warning in LoggerFactory
2024-11-04 10:33:09 +01:00
2c636f4be0 CONCPP-134: Remove use of volatile in ServerPrepareResult::shareCounter and others 2024-11-03 19:01:44 +01:00
366414f29b bump the VERSION 2024-10-21 15:08:11 -04:00
9ae1efaac5 CONCPP=133 Backported missing stuff from 1.1 to make it fully functional 1.0.4 2024-10-05 12:15:28 +02:00
db9241c72f Fix typos in some CMake option documentation strings 2024-09-10 12:16:26 +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
7aaf7aeff3 CONCPP-132 getMoreResults can read result belonging to the other stmt
The fix and the testcase
2024-08-19 12:51:30 +02:00
b09555de99 [CMake] Make possible building as submodule
The CMake variable `CMAKE_SOURCE_DIR` expands to the directory of the
top level CMakeLists being invoked. When added as a git submodule and
imported into a CMake project via `add_subdirectory`,
mariadb-connector-cpp fails to configure as it attempts to look for its
files in the top level directory instead of its own directory. For
example, assuming mariadb-connector-cpp is in
`project/ext/mariadb-connector-cpp/`, when attempting to find a file X,
the search path is `project/X` instead of
`project/ext/mariadb-connector-cpp/X`.

We change `CMAKE_SOURCE_DIR` to `CMAKE_CURRENT_SOURCE_DIR` which expands
to the directory currently being processed by CMake.
2024-01-28 14:21:38 +01:00
c809074da8 bump the VERSION 2024-01-23 12:22:20 -05:00
748d9bb1cf Changed deb/rpm files nameing to mariadb-connector-cpp-xxx...
from mariadbcpp-xxx... to align with tarballs naming pattern.
Fixed one ommitted thing from mingw patch.
1.0.3
2024-01-02 13:31:15 +01:00
8641b1453a Small addition to CONCPP-117
The test linked against static lib needs to link against pthread as well

Small fix for for cmake on macos - the error prevented building unsigned
code and package.
2023-12-22 14:42:40 +01:00
e3df703ba5 Changes to make MinGW work (PR #11)
---------

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.
2023-12-21 16:52:26 +01:00
d951c14eff CONCPP-117 Second part
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
2023-12-19 20:38:49 +01:00
f931b8ef76 CONCPP-117 Adding build and packaging of the static library
Added new target for comiling objects that then used by both shared and
static libraries targets.
Static library on Windows named mariadbcpp-static.lib
static_test is now linked against static library, as we need to test it
(static library) somehow, and the name of test kinda suggested to use
it.
It's been added to msi and other packages. MSI target depends on static
lib target.
Renamed package components the way it's done in C/C. Static lib and
headers are in Development, library is in SharedLibraries.
Small error mistake in one class(not related to the commit, just not to
be lost)
2023-12-19 00:05:14 +01:00
6d2ed83801 Added CMake options to control static/dynamic linking & building (#7)
Co-authored-by: Tyson Cox <coxtyso@isu.edu>
Co-authored-by: lawrinn <lawrin.novitsky@mariadb.com>
2023-12-13 15:14:02 +01: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
9d00f658cb Unit test for Pull Request #9 2023-12-06 13:19:21 +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
963bf3e425 C/C subproject moved to v3.3.7. Source rpm build has been added
Also added src rpm dependencies assembling.
Couple of compilation warnings fix.
2023-09-20 13:36:28 +02:00
f089e4aa6c [misc] updating server test suite 2023-08-30 16:04:35 +02:00
0cc0219a88 Made library to be installed to INSTALL_LIB_SUFFIX for DEB and RPM,
and not to mariadb subdirectory of it.
Added C99 as minimum standard to override problems with C/C compilation
2023-08-16 16:45:11 +02:00
fd589fd331 Small cmake fix for the build using C/C installed in the system
Compilation warning fixes and minor tests fixes
2023-08-01 19:15:48 +02:00
c5ab6a47f2 CONCPP-102 Added WITH_UNIT_TESTS option to control tests build
The default value is ON.
Also added option BUILD_TESTS_ONLY that makes only test projects to be
generated.
2023-06-28 17:25:37 +02:00
7caec32903 Changed testcases expecting connection to fail not to fail with 11.0 ser
ver. As it most probably due to root/Administrator account gssapi
authentication.
Changed testframework to make possible empty value for command line
arguments, e.g. empty password.
Removed some unused and not really needed code from cmake config
2023-06-28 13:27:25 +02: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
1099247c82 Got rid off any use of regex in the driver.
That should make easier building with old compiler versions, that are
still out there. Hence has made minimal required GCC version 4.8
Updated C/C to v3.3.5
2023-06-20 14:48:35 +02:00
7b3e087340 Added WITH_ASAN, WITH_UBSAN and WITH_MSAN cmake option to enable
respective compiler options.
Fix of issued found with ASAN on Windows on Linux - one memory leak in case of parameter array operation,
and the reast are all about not respecting bytes object length and assuming it's null terminated.
2023-05-22 10:39:14 +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
c02f061196 CONCPP-112 Adding support of connection attributes
Attibutes can be defined in URL or in properties under the name
connectionAttributes in the format
connectionAttributes=attr1:value1,attr2:value2
Added test and info to the README.md
2023-04-19 23:46:29 +02:00
9aae3528cf Couple of small changes 2023-02-18 10:21:14 +01:00
3cce5663bd Removed in msi references to the gssapi client plugin
Since it is now static by default.
Some changes in trvis config
2022-11-24 15:30:05 +01:00
00c292bf46 Fix of the test in databasemetadata for 10.10 change
COLUMN_DEFAULT is now NULL for TIMESTAMP, and not '0000-00-00 00:00:00'
2022-11-21 13:19:44 +01:00
24eb3f002e Temporarily allowed Windows build failure in Travis
as it's absolutely not clear, what is going on there and it's not even
starting really.
2022-11-16 23:47:27 +01:00
272000ab00 CONCPP-110 Fixed, that could confuse the compiler.
Contains also libmariadb submodule update to the latest release and some
tests improvements/fixes, in particular caused by latest server release
changes.
2022-11-16 20:58:16 +01:00