Commit Graph

37 Commits

Author SHA1 Message Date
3780dc432c Merge branch '3.3' into 3.4 2025-02-11 11:45:53 +01:00
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
55fe56fa42 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-05-08 14:22:13 +02:00
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
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
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
aa614a8beb Merge branch '3.1' into 3.3 2023-04-05 09:28:40 +02:00
2740335aa8 Fix error macros range checking
Corrected range checking for IS_MYSQL_ERROR and IS_MARIADB_ERROR
macros.
2023-04-01 18:12:37 +02:00
ece593f571 Merge branch '3.3-rpl' into 3.3 2023-02-21 17:11:56 +01:00
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
abea2dfa6b Merge branch '3.1' into 3.3 2023-01-15 14:27:41 +01:00
bf82b2d8cb Fix for CONC-624:
- ER() macro now checks if the error code is known, if not it will return
  "Unknown or undefined error code" (instead of crashing)
- SET_CLIENT_STMT_ERROR now maps to stmt_set_error and accepts variadic
  arguments
2023-01-15 14:11:54 +01:00
9c2e470825 PL fixes 2022-08-30 17:39:36 +02:00
6dbd953420 Merge branch '3.1' into 3.3 2022-07-24 10:52:52 +02:00
cdb6e90c35 Fix for CONC-608: Replace server error codes
Since Connector/C is not able to retrieve
error strings for server error codes, the following
error codes were replaced:

- ER_NET_PACKET_TOO_LARFE by CR_NET_PACKET_TOO_LARGE
- ER_OUT_OF_RESOURCES by CR_OUT_OF_MEMORY
- ER_NET_WRITE_ERROR by CR_ERR_NET_WRITE (new constant)
- ER_NET_UNCOMPRESS_ERROR by CR_ERR_NET_UNCOMPRESS (new constant)
2022-07-21 09:11:29 +02:00
770cf2286a CONC-575: Support for MySQL zstd compression
ZSTD compression is now supported for connections
to a MySQL Server 8.0.

Compression algorithms are supported via compression
plugins, which can be found in plugins/compress.
2022-01-25 05:02:33 +01:00
515361df66 CONC-274: connection string support
A connection string contains key/value pairs, separated by a semicolon
as used in ODBC. Supported keys are all configuration options which can
be used in MariaDB configuration files. For a complete list check
https://github.com/mariadb-corporation/mariadb-connector-c/wiki/config_files#configuration-options.
The connection string must contain at least one semicolon, otherwise
it wil be interpreted as hostname. Unknown or invalid keys will be ignored.

To connect via connection string, the following methods might be used:

- by specifing connection option in configuration file:

  connection=host=localhost;ssl_enforce=1;

-  by using mariadb_connect() macro

   mariadb_connect(mysql, "host=localhost;ssl_enforce=1")

-  by passing connection string in host parameter to mysql_real_connect

   mysql_real_connect(mysql, "host=localhost;ssl_enforce=1", NULL, NULL, NULL, 0, NULL, 0)
2021-11-05 06:31:58 +01:00
7e0be5a919 CONC-544: restrict authentication plugins
Added new option MARIADB_OPT_RESTRICTED_AUTH (and corresponding
"restricted-auth" option for configuration files) which specifies
on or more comma spearated authentication plugins which are allowed
for authenication.

If the server asks for an authentication plugin not listed in this
option the connect attempt will fail with error CR_PLUGIN_NOT_ALLOWED.
2021-09-14 06:24:56 +02:00
1218ffac1a Fix for CONC-452 and CONC-453:
Various coverity scan fixes, including CONC-452 and CONC-453.
Special thanks to Lukas Javorsky for fixing numerous covscan
issues (This patch includes part of his pull request #126).

Coverity scan build was using the following cmake parameters:
-WITH_EXTERNAL_ZLIB=ON -DWITH_UNIT_TESTS=OFF.

CWE-416 (use after free) in dtoa.c (from netlib) is still open.
2020-02-14 09:52:21 +01:00
1888c141f7 Manual merge from CONC-325 branch: Initial implementation for binlog/replication API 2018-12-02 18:28:38 +01:00
b0f2e4e72f Coverity fixes and travis integration 2018-07-06 09:28:24 +02:00
e50571e3ab Disallow bulk execution if parameter count is 0 2017-05-15 14:11:59 +02:00
b10c4f9e7b Fix for CONC-231: Incorrect FSF address 2017-02-05 11:35:11 +01:00
3e624e50df removed definition of SQLSTATE_UNKNOWN (10.2 integration) 2016-11-17 16:04:33 +01:00
967b2830d8 renamed ma_errmsg.h back to errmsg.h 2016-11-16 18:13:59 +01:00
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00
c5ca735dd3 Renamed prefixes for 10.2 integration 2016-02-02 12:12:04 +01:00
a3bb1d2009 merge from 3.0.0 fixes 2015-12-29 21:06:23 +01:00
c8648cf4b2 Initial implementation for COM_MULTI 2015-12-17 19:21:52 +01:00
f30bb95c6a Fix for asynchronous (reconnect)
Fixed memory leak after reconnect/change user
2015-11-19 16:55:25 +01:00
f886562fb2 Initial cio implementation 2015-08-06 13:06:54 +02:00
6cd41756de Fix for CONC-104: mysql_options doesn't support MYSQL_SECURE_AUTH option 2014-09-15 15:47:17 +02:00
88cbaa97bb Fix for CONC-15
Removed redundant prototypes
  Fixed several prototypes with void parameters
2013-03-17 12:32:08 +01:00
84aea9721c Added support for embedded (sqlite) 2013-01-30 08:37:24 +01:00
012b30ae15 Added openssl layer support
Imported libmysql unittests
Added simple ssl tests
minor cleanup
2012-11-26 08:32:41 +01:00
dd3d0d6f52 First implementation based on libmysql 3.23.58 and php's mysqlnd extension 2012-11-14 18:43:45 +01:00
18cb6a1407 Initial import 2011-10-10 14:01:17 +03:00