1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-04-18 21:24:07 +03:00

2126 Commits

Author SHA1 Message Date
Georg Richter
9247ab71dd
Merge pull request #273 from knielsen/knielsen_conc764
CONC-764: Build error in ma_context.c on android
2025-04-17 02:14:19 +02:00
Daniel Bartholomew
7274f8f656
bump the VERSION 2025-04-09 18:15:34 -04:00
Kristian Nielsen
5b7df2276c CONC-764: Build error in ma_context.c on android
Some research show that X18 is mentioned as a platform-reserved
register on most non-linux platforms, including MacOS, Windows, and
FreeBSD. So only put it in the clobber list in Linux.

Note that the ma_context.c code does not itself use the X18 register
in any way. On platforms where X18 is reserved, the co-routine code
will preserve it. On platforms where co-routine code can modify X18,
it does not need to be preserved. Putting X18 in the clobber list is
only to avoid GCC itself generating code that requires that X18 is
preserved.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-04-03 07:54:22 +02:00
Kristian Nielsen
8e371bbe8e CONC-764: Build error in ma_context.c on android
X18 is a platform-reserved register on Android, not a callee-save
register. So it will not be touched by the spawned/resumed co-routine
and must not be included in the GCC asm clobber list on this platform.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-04-01 19:25:48 +02:00
Oleksandr Byelkin
a7ad25b01b Fix memory leack in the test v3.3.15 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.
v3.1.28
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
bbf07912ec Fix after previous revert 2025-02-18 16:32:29 +01:00
Georg Richter
c21a246b2d Merge branch '3.1' into 3.3 2025-02-18 16:31:09 +01:00
Georg Richter
d4eec05d00 Revert "CONC-710: Remove UDF declarations"
Since UDF declarations are used  e.g. by lib_mysqludf_sys, I'm reverting
this commit. (See also CONC-757).

This reverts commit 1a2ed3f67af698b394b2faed069b49d4f409a155.
2025-02-18 16:19:50 +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
Daniel Bartholomew
4bbfa5040e
bump the VERSION 2025-02-11 15:03:48 -05:00
Daniel Bartholomew
a8f9a57aa5
bump the VERSION 2025-02-11 15:01:15 -05: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
Georg Richter
ae507c3511
Merge pull request #270 from knielsen/knielsen_conc_fixes
Connector-C fixes for non-blocking API
2025-02-10 17:01:44 +01:00
Kristian Nielsen
2381127b11 CONC-473: mysql_real_connect_start() stack overrun with mdns hostname
Increase the default stack size for co-routines to 256 kByte. It was 60
kByte, which was too small for glibc getaddrinfo() when using mdns.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-06 00:24:28 +01:00
Kristian Nielsen
77754f4d87 CONC-725: Fix compiler warning about uninitialized union member
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-05 16:57:31 +01:00
Kristian Nielsen
fc49fa706d CONC-618: Please annotate swapcontext for ASAN
When compiling for AddressSanitizer, prefer the system ucontext or
boost::context co-routine libraries over our custom assembler routines. The
custom routines are not easily annotated with the required AddressSanitizer
__sanitizer_{start,finish}_switch_fiber() functions, while the system
routines should already be so annotated.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-05 16:08:25 +01:00
Kristian Nielsen
879fcab625 Remove obsolete reference to my_context.c which was renamed to ma_context.c
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-05 13:26:43 +01:00
Kristian Nielsen
003ea7e9de CONC-753: Compile error on .cfi_escape in builds with no unwind/cfi
Also CONC-754.

Depending on compiler options (eg. -fno-dwarf2-cfi-asm), the compiler may
not output .cfi_startproc / .cfi_endproc in generated assember, and this
causes a build error on the .cfi_escape directive put in my_context_spawn()
on systems with DWARF support.

Fix by using the proper preprocessor macro __GCC_HAVE_DWARF2_CFI_ASM to test
for .cfi_escape support, rather than crafted check for various compiler
brands and versions. Though this macro is only available in clang since
version 13.0.0, so unconditionally include the .cfi_escape in earlier clang
versions.

Thanks to Rainer Orth for the suggested fix.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-05 11:59:22 +01:00
Sergei Golubchik
2d56f340c4 Merge branch '3.1' into 3.3 v3.3.14 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
v3.1.27
2025-01-24 14:42:37 +01:00
Sergei Golubchik
232b563dc5 CONPY-739 don't use pow() to truncate an integer
it's
* generic power function, arbitrary floating-point arguments
* expensive
* returns double

while here we just need one of 1, 10, ..., 1000000.
2025-01-24 14:42:37 +01:00
Sergei Golubchik
836db56372 memory leaks after CONC-589, e09e24e8
we cannot just set `mysql->net.pvio= NULL`
we need to free(net->pvio) first.
And not protect `free(net->buff)` with `if (mysql->net.pvio)`.
2025-01-24 14:42:37 +01:00
Georg Richter
4431d5bf0b Merge branch '3.1' into 3.3 2025-01-24 06:02:27 +01:00
Georg Richter
1a34542eac Removed ASAN options which were merged by mistake. 2025-01-24 06:00:49 +01:00
Georg Richter
1337449281 Merge branch '3.1' into 3.3 2025-01-21 14:28:52 +01:00
Georg Richter
5f4b9b6e8c Travis fix: Skip reconnect test (MaxScale) 2025-01-21 14:21:33 +01:00
Georg Richter
31ecf2c0ab
Merge pull request #243 from joshuahunt/johunt/fix-async-check-result
CONC-693 Fix SSL_read/write return value checking in ma_tls_async_check_result
2025-01-21 14:18:39 +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
732a1ad194 Merge branch '3.1-georg' into 3.1 2025-01-15 07:37:54 +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
d3e10fee7d
Merge pull request #264 from mariadb-corporation/3.1.26-conc-750
CONC-750 unit.pfs_instr-oom fails on mac with dynamic-stack-overflow
2025-01-14 17:06:08 +01:00
Georg Richter
75d381ffb2 Build fix: moved Item_result back to mariadb_com.h
Since Item_result is not used by Connector/C's binlog api
only, but also by server code, Item_result enumeration was
moved back to mariadb_com.h
2025-01-07 16:58:39 +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
12a7054194 Partial revert of 1a2ed3f67af698b394b2faed069b49d4f409a155
Since Item_result enumerations are also used by MariaDB server, we
moved them back to mariadb_com.h.
Item_result is not used in Connector/C 3.3 and above for replication
api.
2024-12-22 11:00:12 +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
30bd00796e Travis: Include unit test suite 2024-12-20 06:17:01 +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
2fd03c8242 coverity fix: remove whitespace 2024-12-19 11:47:18 +01:00
Georg Richter
19495f1cdd Fix logical error in parse_connection_string
removed dead code (in_curly_brace is always true)
2024-12-19 11:14:19 +01:00