1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-05 15:55:58 +03:00

605 Commits

Author SHA1 Message Date
Georg Richter
77bdf5a572 Fixed double close (introduced in PR275) 2025-07-17 10:36:37 +02:00
Pavol Sloboda
9e4042c149 fix: fixed a possible leak when one of the files (fp1 or fp2) fails to
open by adding a simple condition that checks whether one of them opens
while the other fails and closing it
and added the extra prentheses for the assignment inside the if statement
for easier debugging and to avoid static analysis flagging it as a wrong
statement inside the if clause
2025-07-17 09:14:53 +02:00
Pavol Sloboda
c10a3479fb fix: added the closing of the test_file before various fail statements
to avoid memory leaks
2025-07-17 09:14:53 +02:00
Pavol Sloboda
056f09bb06 fix: added frees for any allocated memory if the allocation of other
memory fails and the FAIL_UNLESS calls needed the stop the test if this
happens
2025-07-17 09:14:53 +02:00
Pavol Sloboda
7009f60416 fix: added the closing of the file descriptor if the check_mysql_rc
macro will return FAIL to avoid memory leaks
2025-07-17 09:14:53 +02:00
Pavol Sloboda
9fb319a7e7 fix: added the necessary frees for the bind var before any of the
check_stmt_rc() and check_mysql_rc() macros potentialy return from the
fuction
2025-07-17 09:14:53 +02:00
Pavol Sloboda
06e041cfa2 Added the FAIL_UNLESS call for the bind variable that is being allocated
to handle the possibility of the calloc failing and ensure we are not
working with NULL in the rest of the tests
2025-07-17 09:14:53 +02:00
Pavol Sloboda
0fc940259a Added the call to FAIL_UNLESS to handle the possibility of the
allocation of buffer failing to ensure we don't work with NULL further
in the test, also added a free to bind in this case to avoid a memory
leak
2025-07-17 09:14:53 +02:00
Vasilii Lakhin
40be423f08 Fix miscellaneous typos 2025-07-13 18:42:30 +03:00
Georg Richter
f410977447 Add diagnostic output for ci test 2025-06-25 09:51:29 +02:00
rusher
0a3f217396 [TODO-5373] add github action 2025-06-25 09:50:30 +02:00
Oleksandr Byelkin
55abb32038 Merge branch '3.1' into 3.3-merge 2025-04-20 10:16:30 +02:00
Georg Richter
28a1e4b599 Fix for CONC-762: Always set is_null and length in bind structure to avoid
msan errors
2025-03-31 11:02:35 +02:00
Oleksandr Byelkin
a7ad25b01b Fix memory leack in the test 2025-02-27 13:50:01 +01:00
Georg Richter
0ff64ca045 Merge branch '3.1' into 3.3 2025-02-27 09:35:33 +01:00
Georg Richter
f7633e9d68 Test fix: pipe name
Instead of relying on default (MySQL), we check @@socket and
pass the correct pipe name.
2025-02-27 09:33:35 +01:00
Georg Richter
4c9bc2b0f6 Merge branch '3.1' into 3.3 2025-02-27 07:52:35 +01:00
Georg Richter
aa240cd181 CONC-760: valid named pipe connection is closed
Fixed different behavior of pvio_is_alive (which was first used
with fix of CONC-589). Both for sockets and named pipe the function
now returns true if the connection is alive, otherwise false.
2025-02-27 07:48:58 +01:00
Georg Richter
fe8f48c6c3 Build fix: fix warning in ps_bugs.c 2025-02-12 08:34:10 +01:00
Georg Richter
992c7f26dd Travis fix: Skip maxscale for test_mdev35935 2025-02-12 07:12:14 +01:00
Georg Richter
1e4e47347d test fix: use my_ulonglong instead of ulong
Use 64-bit long instead of 32-bit value to avoid
overflow
2025-02-11 19:38:55 +01:00
Georg Richter
4877093937 Workaround for MDEV-35935
If the server returns an error packet without error number
(and message) we set errno=CR_ERR_MISSING_ERROR_INFO (5026)
2025-02-11 11:28:56 +01:00
Georg Richter
28ae227e80 CONC-755: Fix MSAN failure
Fixed uninitialized variable warning by initializing MYSQL_BIND
structure.
2025-02-11 10:50:40 +01:00
Sergei Golubchik
2d56f340c4 Merge branch '3.1' into 3.3 2025-01-24 14:52:35 +01:00
Sergei Golubchik
7d930974c0 CONC-751 unit.conc_connection fails with CYPHER missmatch on some builds
disable the test for old gnutls
2025-01-24 14:42:37 +01:00
Georg Richter
5f4b9b6e8c Travis fix: Skip reconnect test (MaxScale) 2025-01-21 14:21:33 +01:00
Georg Richter
53b7169315 Merge branch '3.1' into 3.3 2025-01-15 10:46:29 +01:00
Georg Richter
36d1c3ac77 Travis fix: Skip reconnect test (MaxScale) 2025-01-15 10:41:32 +01:00
Georg Richter
57ce0ce3c7 Merge branch '3.1' into 3.3 2025-01-15 08:00:19 +01:00
Georg Richter
e09e24e890 CONC-589: First query fails after reconnect
If automatic reconnect is enabled (MYSQL_OPT_RECONNECT) it is
mandatory to check if the connection/socket is still alive before
sending a command to the server (unless the command is COM_QUIT).
2025-01-15 07:26:18 +01:00
Georg Richter
fa9f5f66be Travis and test fixes:
- Build server build with latest C/C: Instead of copying the C/C directory
  into server, we now fetch the actual commit or PR into server repository
- Fix travis environment variables (Windows)
- Skip character set tests if the server doesn't support charset/collation
- Don't use CREATE OR REPLACE SQL syntax to make MySQL happy
- Disable TLS connection test for MaxScale
- Don't set TEST environment variables if they are empty
2025-01-07 16:57:53 +01:00
Georg Richter
486a07c824 Test fix:
use mysql_real_connect instead of my_test_connect for unix_socket
test to reduce diagnostic output from my_test_connect function.
2024-12-21 08:33:15 +01:00
Georg Richter
80a7fa5cee Test fix for charsets
Skipped 2 tests if running against MariaDB 11.4 or newer version.
2024-12-20 14:35:37 +01:00
Georg Richter
5485acd470 Test case fix:
Don't connect with anonymous user, since mtr doesn't run with
unix_sockets by default.
2024-12-20 12:02:35 +01:00
Georg Richter
32addee3fc Test case fix:
Don't connect with anonymous user, since mtr doesn't run with
unix_sockets by default.
2024-12-20 06:14:02 +01:00
Georg Richter
13c8815604 Fix test CONC-702
Drop procedure p2 to avoid failing mtr test
2024-12-17 19:04:08 +01:00
Georg Richter
dc8bc987d4 Test fix for character test conc223:
Show the missing collation IDs instead
of the total number of missing collations.

Patch submitted by Michael "Monty" Widenius.
2024-12-16 13:50:00 +01:00
Georg Richter
16e5b88bab MYSQL_OPT_ZSTD_COMPRESSION_LEVEL fixes:
Follow up for commit e633858c9e:
- Fixed ASAN bug (int to char conversion)
- Allow to retrieve zstd compression level via mysql_get_optionv()
2024-12-10 05:18:08 +01:00
Georg Richter
6d28fe89af Merge branch '3.1' into 3.3 2024-12-08 11:50:43 +01:00
Georg Richter
af44fc5c5e CONC-748: Allow to set TLSv1.3 ciphers in GnuTLS
- Added TLSv1.3 ciphers to cipher map.
- Fixed retrieval of cipher suite: Since gnutls_cipher_suite_get_name
  supports only TLSv1.2 (and lower) cipher suites, we have to call
  gnutls_ciphersuite_get() (requires GnuTLS 3.7.4 or newer).
2024-12-08 11:27:32 +01:00
Georg Richter
232e81f021 Add test case for CONC-176 2024-12-04 10:13:21 +01:00
Georg Richter
fa987a3bc4 Added test case for CONC-163 2024-12-02 06:36:56 +01:00
Georg Richter
b522ed1a43 Merge branch '3.1' into 3.3 2024-11-27 15:58:51 +01:00
Georg Richter
662a966056 CONC-702: Fix statement status
If a resultset in binary protpcpl doesn't contain data
(fields equal zero) and there are no more pending
result sets we need to change the statement status to
FETCH_DONE, otherwise it will be impossible to execute
other commands until the statement was closed.
2024-11-18 07:15:42 +01:00
Georg Richter
55e3b63c34 CONPY-739: prepared statement support AUTO_SEC_PART_DIGITS
FROM_UNIXTIME() function always returns AUTO_SEC_PART_DIGITS
(value=39). In case the microsecond value was set in MYSQL_TIME,
the decimal part should be SEC_PART_DIGITS (=6).
2024-11-15 17:41:23 +01:00
Georg Richter
858a3e36b7 Fix typo (thanks to OttoK). 2024-09-12 18:44:51 +02:00
Georg Richter
072dadc392 Disable test when running against MySQL server 2024-05-13 15:54:04 +02:00
Georg Richter
cba62ec2be Fix character set test.
Added a list of unsupported collations which
were added in 11.5
2024-05-10 10:26:44 +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