1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

667 Commits

Author SHA1 Message Date
Georg Richter
19dffea4dc CONC-692: Provide X509 peer certificate information
Added a new structure MARIADB_X509_INFO, which
contains information about servers certificate.
The information can be obtained via mysql_get_infov API
function:

MARIADB_X509_INFO *info;
mariadb_get_infov(mysql, MARIADB_TLS_PEER_CERT_INFO, &info);
2024-04-24 11:21:28 +02:00
Marko Mäkelä
02151b6a0e Merg 3.1 into 3.3 2024-04-11 14:54:08 +03:00
Marko Mäkelä
dab59732d9 Fix GCC 14 -Wcalloc-transposed-args 2024-04-11 14:50:07 +03:00
Georg Richter
1d3fd5818a Test fix for test_bug4236 2024-04-08 17:19:42 +02:00
Georg Richter
fef3e4ed6d CONC-683: Check pending results when closing statement.
Similiar to fix for CONC-667 we need to check if other
statements have a pending result set before we can close
a statement handle.
2024-03-23 12:53:24 +01:00
Georg Richter
b64282a9dd CONC-667: Fix statement handling when unbuffered results are pending.
Resetting a statement will result in an error, if another (different)
statement has a pending unbuffered result set (CR_COMMANDS_OUT_OF_SYNC).

Freeing a statement result set will return an error, if the statement
has no result set or was not executed (CR_STMT_NO_RESULT).
2024-03-23 12:27:55 +01:00
Sergei Golubchik
b4d75e78c4 unitest bulk1: force a particular storage engine
to get a predictable autoinc behavior
2024-03-18 14:11:51 +01:00
Georg Richter
2fc64d791c CONC-689: Fix parsing of HEARTBEAT_LOG_EVENT:
The heartbeat log event now contains the filename,
instead of wrong header information (which was
already processed when reading event header).
2024-03-18 08:09:02 +01:00
Sergei Golubchik
29041069db fix the test for mtr
* don't use seq_1_to_100, this plugin is disabled by default
* don't use InnoDB, same reason
* autoinc values are sequential
2024-03-15 19:45:55 +01:00
Georg Richter
d01d8c100a Follow up of fix for CONC-680:
mysql_old_password is disabled by default (setting DISABLED YES),
but can be used if the plugin was added to the list of restricted
authentication plugins (via mysql_optionsv using option
MARIADB_OPT_RESTRICTED_AUTH).
2024-03-15 14:41:53 +01:00
rusher
abce07da2a [MDEV-30366] Bulk unitary result flag client implementation part.
With MDEV-30366, server now permit to send a result-set containing generated id and Affected rows for each bulk operation. This feature can be enabled with option MARIADB_OPT_BULK_UNIT_RESULTS when server supports it.
2024-03-06 16:03:55 +01:00
Georg Richter
4a74f8784d Fix compiler warning in unittest/misc.c 2024-02-23 06:54:22 +01:00
Georg Richter
ebe1949540 Fix for CONC-505:
Don't allow to specify unsupported client flags (like
CLIENT_DEPRECATE_EOF) as client flag in mysql_real_connect
api function.
2024-02-22 09:03:51 +01:00
Georg Richter
fe411bf336 CONC-403:
Remove support of TLSv1.0 protocol
2024-02-20 09:52:07 +01:00
Sergei Golubchik
f6e99af056 Revert "self-signed certificate verification", it's 3.4 feature
This reverts 395641549ac7..536d9e2b9e5b, in particular:

8dffd56936 MDEV-31857 enable MYSQL_OPT_SSL_VERIFY_SERVER_CERT by default
a99570c118 MDEV-31855 SSL cert validation protocol extension
9aa15e72a7 TLS fingerprint

and related commits
2024-02-19 11:16:26 +01:00
Sergei Golubchik
8dffd56936 MDEV-31857 enable MYSQL_OPT_SSL_VERIFY_SERVER_CERT by default
because the default value of every option is 0
(option and option.extension are bzero-ed to reset),
tls_verify_server_cert was renamed to tls_allow_invalid_server_cert
with the default value of 0, "do not allow".

API didn't change, it's still MYSQL_OPT_SSL_VERIFY_SERVER_CERT
2024-02-04 22:17:25 +01:00
Sergei Golubchik
50f65db279 compilation warning
ps_bugs.c:3275:5: note: ‘sprintf’ output between 9 and 19 bytes into a destination of size 12
2024-02-04 22:17:25 +01:00
Georg Richter
00fb2062b9 Test fix for MaxScale:
Skip character set tests which set character set
during handshake, since MaxScale sends utf8mb4 via
session_track information in handshake OK packet.
(https://jira.mariadb.org/browse/MXS-4898).
2023-12-14 09:07:44 +01:00
Georg Richter
b0a2f65f55 Character set test:
Added diagnostic output.
2023-12-14 08:01:46 +01:00
Georg Richter
ba55b5b78f Test fix:
Append terminating 0 in status_callback_function.
2023-12-13 18:46:55 +01:00
Oleksandr Byelkin
64f9d88f30 Merge branch '3.1' into 3.3 2023-10-23 13:36:05 +02:00
Oleksandr Byelkin
ae565eea90 Use safer snprintf call. 2023-10-23 13:32:45 +02:00
rusher
dd927bd171 Update server test suite 2023-08-30 09:52:22 +02:00
Georg Richter
209b23a38c Test fixes:
- Fixed failing test when running against MySQL server
- Disabled test when running against MySQL server.
2023-08-30 07:44:32 +02:00
Georg Richter
5f88f50cf0 Build fix:
Move the setting "treat warning as errors" befind feature detection,
otherwise several try_compile/try_run commands will fail.
2023-08-16 15:02:02 +02:00
Georg Richter
1acb81e11c Build fixes:
- Fixed build error, which was previously introduced by commit
c8ca89112e

- Treat warnings as errors
2023-08-16 14:09:34 +02:00
Georg Richter
c8ca89112e Fix for CONC-659:
When checking for a semi sync indication header, we need also check if
the undocumented session variable @rpl_semi_sync_slave was set.
Otherwise the timestamp of the event could contain values which match
the 2 bytes of the semi sync header.

Since the variable rpl_semi_sync_slave and it's behavior is not documented,
a new option MARIADB_RPL_SEMI_SYNC was added.
2023-08-11 10:14:26 +02:00
Georg Richter
cd59c70ce7 Merge branch '3.1' into 3.3 2023-08-10 11:20:29 +02:00
Georg Richter
5000bc790a Test fix:
Always specify the socketname when calling my_test_connect().
2023-08-10 11:18:22 +02:00
Georg Richter
bec589e679 Merge branch '3.1' into 3.3 2023-04-26 08:10:40 +02:00
Georg Richter
f5a4c73df4 Fix memory leak in unittest 2023-04-26 08:10:08 +02:00
Georg Richter
dd8962a4b5 Merge branch '3.1' into 3.3 2023-04-25 15:08:28 +02:00
Georg Richter
b0ec2101bf Test fixes when testing against MySQL 2023-04-24 14:58:01 +02:00
Georg Richter
6c29921bbe travis fix:
remove server builds > 10.5, since 10.6 and above use
Connector/C 3.3 branch.
2023-04-22 06:56:53 +02:00
Georg Richter
2000b06183 Replace SET_CLIENT_STMT_ERROR by stmt_set_error(). 2023-04-11 18:31:19 +02:00
Georg Richter
dbb4d8d93b Fixed segfault:
Use rpl->host and port instead of mysql->options.
2023-02-22 11:32:21 +01:00
Georg Richter
ece593f571 Merge branch '3.3-rpl' into 3.3 2023-02-21 17:11:56 +01:00
Georg Richter
29a8156193 Skip test_bug49694 when testing with Xpand.
local_infile variable is not supported by XPand (XPT-600).
2023-02-18 08:49:25 +01:00
Georg Richter
2105a2bc7f Skip tests when testing with Xpand. 2023-02-18 08:39:10 +01:00
Georg Richter
80f18e417f SKIP debug test if testing with Xpand. 2023-02-18 08:33:49 +01:00
Georg Richter
780c330f38 Since we can't determine if load data local is
suppoerted by Xpand, we skip it for now.
2023-02-17 11:23:22 +01:00
Georg Richter
87bd5bfc34 Removed decryption stuff from rpl api 2023-02-12 14:26:02 +01:00
Georg Richter
e4417e725e Merge branch '3.1' into 3.3 2023-02-09 08:57:48 +01:00
Georg Richter
669726a1d9 Fix for CONC-633:
If prepare step failed in mariadb_stmt_execute_direct now both
mysql_stmt_error and mysql_error return the error message from
prepare step instead of error message of execute.
2023-02-08 12:21:22 +01:00
Georg Richter
75439c0f39 CONC-632
When resetting the connection with mysql reset_connection(), the
server_status must be checked and any other resultsets that mayi
exist must be removed.
2023-02-08 11:46:39 +01:00
Georg Richter
12bd1d5511 Merge branch '3.1' into 3.3 2023-01-16 12:12:46 +01:00
Georg Richter
895235815c Fix for CONC-627:
Don't substitute parameters in server error messages in
prepeated statement error handler function.
2023-01-16 11:13:00 +01:00
Georg Richter
003b5cd168 Follow up for CONC-622 test:
Host 0.0.0.0 is mapped to locahost, so we need another invalid
host address (1.0.0.0) instead and reduce the number of loops.
2023-01-15 17:41:29 +01:00
Georg Richter
5f6133653d Fix for CONC-623:
If callback function returns a non zero return code, execute
will now abort with error CR_ERR_STMT_PARAM_CALLBACK.
2023-01-15 15:12:38 +01:00
Georg Richter
abea2dfa6b Merge branch '3.1' into 3.3 2023-01-15 14:27:41 +01:00