1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00
Commit Graph

32 Commits

Author SHA1 Message Date
Georg Richter
4f5950b4b6 Merge branch '3.1' into 3.3 2023-10-21 19:46:00 +02:00
Georg Richter
8320f0d54d Fix error on 32-bit systems
Problem was introduced with fix for CONC-668.
2023-10-21 19:43:42 +02:00
Georg Richter
6dbd953420 Merge branch '3.1' into 3.3 2022-07-24 10:52:52 +02:00
Georg Richter
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
Georg Richter
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
Georg Richter
820faff627 codespell fixes, removed MSDOS preprocessor macros 2020-11-26 09:07:17 +01:00
Marko Mäkelä
e382442206 CONC-514 ma_net_write_buff() invokes memcpy() on null pointer
When the function ma_net_write_buff() is invoked with len=0,
it may call memcpy() on a null pointer, which is flagged in
WITH_UBSAN builds.
2020-10-30 16:22:59 +02:00
Georg Richter
ca4f043cfe Fix for CONC-507:
Setting max_allowed_packet in every ma_net_init() call may lead to
race conditions (Thanks to Alexander Sapin for reporting this issue).
Global variables max_allowed_packet_size and
net_buffer_size can be set via mysql_optionsv. If globally and not
per connection this should happen immeidately after library initialization.
2020-10-20 19:32:49 +02:00
Vladislav Vaintroub
c0837c3b8d MDEV-21612 Remove COM_MULTI.
The server command code 254 is now reserved,
as well as corresponding protocol flag.

Do not reuse them.
2020-09-22 17:26:04 +02:00
Georg Richter
64a4212953 Fix for CONC-495:
Fixed possible memory leak in ma_net_real_write: When using compressed
protocol the buffer allocated for compression must be freed in case ma_pvio_write
fails. Kudos to Animesh Soni for reporing this bug.
2020-09-10 07:17:44 +02:00
Georg Richter
b0f2e4e72f Coverity fixes and travis integration 2018-07-06 09:28:24 +02:00
luz.paz
b2e6ed0295 Fixes misc. typos
found via `codespell -q 3`
2018-04-13 07:30:23 +02:00
Georg Richter
0db59d2b10 CONC-290: Return error (=1) instead of exiting. 2017-10-26 18:34:53 +02:00
Georg Richter
b10c4f9e7b Fix for CONC-231: Incorrect FSF address 2017-02-05 11:35:11 +01:00
Georg Richter
a499722377 removed ma_errmsg from mysql.h 2016-11-16 17:27:59 +01:00
Georg Richter
64862325a5 Removed com_multi for mariadb_stmt_execute_direct
added support for pre 10.2-servers in mariadb_stmt_execute_direct
2016-11-10 05:49:11 +01:00
Georg Richter
6306c9f46b - removed COM_MULTI from options
COM_MULTI is now available for internal use only, e.g. in
  mariadb_stmt_execute_direct
2016-10-20 08:47:51 +02:00
Vladislav Vaintroub
629ec64630 Fix PVIO to return number of bytes read/written as "signed" integer
since there is a lot of checks for return code being < 0 or -1.
2016-10-13 17:42:03 +00:00
Sergei Golubchik
f95877dc5f Merge branch 'master' into serg-integr 2016-09-15 09:21:30 +02:00
Vladislav Vaintroub
da8977d670 Merge branch 'master' into serg-integr 2016-09-12 11:47:14 +00:00
Vladislav Vaintroub
8afde21910 Merge branch 'master' of https://github.com/mariadb/mariadb-connector-c 2016-09-09 20:03:16 +00:00
Vladislav Vaintroub
38b5e400da C/C integration : Fix mysql_test_client test
- #include <stdlib.h> for strtod and other prototypes
- remove ma_config_win.h as it  redefines things from ma_config.h
- fix compile warnings
2016-09-07 17:14:02 +00:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
7615dc73a2 Fixed length packet for COM_MULTI parts
(kudos to Sanja Byelkin)
2016-08-31 19:08:59 +02:00
Vladislav Vaintroub
a06574afab Implement mysql_stmt_execute_direct without COM_MULTI.
Network roundtrip is avoided, but  no other optimization done in this
commit. Like, possible to accumulate send 2 command packets in single
send(), and it is trivial to do,  but ommited here on reasons of clarity
2016-07-09 20:21:44 +00:00
Georg Richter
31113af2f3 Fixed possible buffer overrun for multi_commands:
update current position after reallocating buffer
2016-06-06 12:14:48 +02:00
Georg Richter
80714f3bbd Fix multi com bug: Don't change current multi buffer position after
reallcating multi buffer
2016-05-14 11:20:09 +02:00
Georg Richter
06e5422715 10.2-integration fixes:
- always send COM_STMT_RESET if specified
- prevent double free of context buffer
2016-03-10 14:02:30 +01:00
Georg Richter
d68b48f954 10.2 integration fixes
- changed plugin API to avoid crashes: Oracle/MariaDB changed
    structure several times without updating interface version.
  - ABI fixes: moved additional net items to net->extension (connection
    handler and com_multi buffer)
2016-02-22 11:37:13 +01:00
Georg Richter
c014b9f6ae 10.2 integration fixes:
- renamed/prefixed password functions
- prepared statement fixes for mysql_client_test
2016-02-19 22:23:00 +01:00
Georg Richter
d303cf76a7 More 10.2-integ fixes:
- renamed my_net functions (ma_net)
- fixed wrong types in ma_schannel.c
- fixed wrong parameter in client_plugin when building load string
2016-02-17 10:00:53 +01:00
Georg Richter
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00