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

98 Commits

Author SHA1 Message Date
rusher
0a3f217396 [TODO-5373] add github action 2025-06-25 09:50:30 +02: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
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
fa987a3bc4 Added test case for CONC-163 2024-12-02 06:36: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
diego Dupin
fb85d99d13 Adding xpand to test suite 2022-03-23 11:46:40 +01:00
Georg Richter
3fe2f50545 Merge branch '3.1' into 3.2 2022-01-25 03:51:45 +01:00
Georg Richter
49a22c269a Merge pull request #153 from Antchel/3.1
test fixes
2022-01-23 21:08:32 +01:00
Marko Mäkelä
8574d0b840 Merge 3.1 into 3.2 2021-10-05 16:59:15 +03:00
Marko Mäkelä
33853036dd fixup 9c02505474: build failure outside clang 2021-10-05 16:48:31 +03:00
Georg Richter
2933a1ca75 Merge branch '3.1' into 3.2 2021-10-05 15:19:59 +02:00
Georg Richter
9c02505474 Fixed for MDEV-26761:
If mariadb_stmt_execute_direct fails, we need to set the number
of parameters (obtained by response packet of mysql_stmt_prepare)
back to the number of prebinded parameters to avoid memory
overrun.

This fix also includes several adress-sanitizer bugs in unit tests
of Connector/C.
2021-10-05 14:50:32 +02:00
Georg Richter
547fc4987b Post-merge fix:
Prevent double freeing of result set
2021-07-26 18:10:34 +02:00
Georg Richter
61a2ae2705 Merge branch '3.1' into 3.2 2021-07-26 18:05:17 +02:00
Marko Mäkelä
490100ccac CONC-49 fixup
test_conc49(): Do not leak memory.
2021-07-22 15:55:45 +03:00
Vladislav Vaintroub
7d3d7c5ff4 Fix GCC's "ISO C90 forbids mixed declarations and code" 2021-07-20 10:55:07 +02:00
Georg Richter
4853464ed2 Test case fixes:
- remove table af end of test
- fixed memory leak (missing mysql_free_result)
2021-07-09 06:38:28 +02:00
Sergei Golubchik
fffa8167d8 ISO C90 forbids mixed declarations and code 2021-07-05 12:43:06 +02:00
Georg Richter
353e99fba1 More test fixes 2021-06-24 12:48:16 +02:00
kolzeq
25e38080cb Merge branch '3.1' into 3.2-diego
# Conflicts:
#	.travis.yml
#	unittest/libmariadb/charset.c
#	unittest/libmariadb/connection.c
2021-06-17 10:54:30 +02:00
Georg Richter
85c3742252 Follow up of dec061fa95
Use EVP_PKEY_set1_RSA() instead of EVP_PKEY_assign_RSA, since
the public key will be freed when releasing pkey-
2021-06-16 16:13:14 +02:00
kolzeq
94e85cdd4b testing various correction
travis: use connector-test-machine test script that permit to run the following tests :

* MariaDB all supported version
* Maxscale
* MySQL
* SkySQL

If CONNECTOR_TEST_SECRET_KEY is not provided (PR) only MariaDB and MySQL community will be test
Pull request testing correction

appveyor correction using archive if not latest server release
2021-06-15 17:09:10 +02:00
Georg Richter
e4e5b28452 CONC-533: Support for asynchronous statements (binary protocol)
Added a new option MARIADB_OPT_SKIP_READ_RESPONSE which skips automatic
reading of server response after sending a command to the server.

Server packets have to be retrieved by calling the corresponding methods,
e.g:

Send command                         Read method
mysql_real_query/mysql_send_query    db_read_query_result
mysql_stmt_prepare                   db_read_prepare_response
mysql_stmt_execute,
mariadb_stmt_execute_direct          db_read_execute_response
2021-05-13 21:21:43 +02:00
Oleksandr Byelkin
b503e52288 fix problems found by 10.0 2021-01-27 13:13:31 +01:00
Anton Golovenko
a7e888b518 Test bugs fixes 2021-01-20 18:54:55 +05:00
kolzeq
29fc3bc7bd [misc] test improvement
* adding SkySQL HA to test suite
* test server build 10.6
* test maxscale 2.5.3
2021-01-19 10:23:14 +01:00
Georg Richter
8a4fac7f22 unittest fix:
Added macro SKIP_NOTLS for skipping tests if MariaDB Connector/C
was build without TLS support.
2020-10-23 06:39:15 +02:00
Georg Richter
9637689e5e Test and travis modification for testing against SkySQL 2020-09-02 14:08:19 +02:00
Georg Richter
960dca55ae Travis fixes:
server verification still fails due to wrong hostname - these tests are now disabled for Travis only
Disable test when testing against a MySQL server.
2020-03-16 14:02:12 +01:00
Georg Richter
d4f75481f6 Fix for CONC-458:
Fixed crash in mysql_get_timeout and mysql_get_timeout_ms functions,
which happened when no asynchronous context was set before.
2020-03-05 09:50:12 +01:00
Georg Richter
6a0c8ff2e5 Fix for CONC-457:
mysql_list_processlists was marked as deprecated in MySQL 4.0 and not
updated anymore. It exists still in latest MySQL and MariaDB connectors.
It now supports the 4.1 protocol, using 7 instead of 5 fields.

The following functions are now marked deprecated in source:
* mysql_list_dbs
* mysql_list_tables
* mysql_list_processes
2020-02-28 12:56:37 +01:00
Marko Mäkelä
68e6c5bd67 CONC-394: The unit test does not compile on Windows 2019-05-05 22:40:45 +03:00
Georg Richter
ad385b954a CONC-394: Some TLS related options are not settable in configuration file
The following options are now supported in configuration files:
* ssl_enforce (bool)
* ssl_crl (string)
* ssl_crlpath (string)
2019-04-06 11:42:24 +02:00
Georg Richter
a8bec1c68a CONC-395: Dashes and underscores are not interchangeable in options in my.cnf 2019-03-26 16:48:21 +01:00
Sergei Golubchik
4aad20db15 Merge tag 'v3.0.9' into 3.1 2019-02-18 20:16:23 +01:00
Georg Richter
70f2964dc4 Fix for CONC-384:
fixed length calculation for connection attributes. We now call mysql_net_store_length passing the size of the connection attribute and substract the offset of the passed buffer to determine the correct size.
2019-02-07 04:14:55 +01:00
Georg Richter
3ab17c0310 Fix compiler warning (gcc-8.1) 2019-02-03 17:26:24 +01:00
Georg Richter
7d5511c2e3 Fix warning in misc.c unittest 2018-12-01 18:07:20 +01:00
Georg Richter
50d48e91fa Reworked plugin interface
Plugin configuration happens now in CMakeLists.txt files in corresponding plugin directories.

plugins.cmake now contains REGISTER_PLUGIN_FUNCTION which accepts the following parameters:
  - TARGET: the name of the plugin (dynamic plugins will be named ${TARGET}.so (or .dll)
  - SOURCES: source files
  - LIBRARIES: additional libraries for linking
  - INCLUDES: include directories
  - CONFIGURATIONS: possible plugin configurations: valid arguments are DYNAMIC, STATIC, OFF
  - DEFAULT: default configuration (see CONFIGURATIONS)
  - COMPILE_OPTIONS: compiler flags

The default plugin configuration can be specified via cmake parameter -DCLIENT_PLUGIN_${TARGET}=[DYNAMIC|STATIC|OFF]
2018-04-07 07:14:43 +02:00
Georg Richter
83eef02ec8 Test fixes:
for api functions which require string with length parameter (e.g.
  mysql_real_connect() or mysql_stmt_prepare() we now use the macro
  SL(string) which substitutes string and string length.
2018-02-16 13:05:35 +01:00
Georg Richter
929614903e Travis and Appveyor integration:
- added travis support
  - fixed appveyor settings
  - fixed some warnings (gcc 4.8)
  - removed sleep commands
  - disabled failing tests when running against MySQL server,
    mostly related to stored procedures and binary protocol
  - reverted fix for MDEV_10361

Still open: TLS/SSL appveyor tests, since .msi installation on appveyor doesn't provide certificates.
2018-02-16 12:14:01 +01:00
Georg Richter
eefaadfe21 Removed automatic detection of program name 2018-02-16 11:43:32 +01:00
Vladislav Vaintroub
935c33b690 Fix Windows size_t warnings. 2018-01-12 18:19:19 +00:00
Sergei Golubchik
9fc53fcafa delete a zero-length frm manually
because DROP TABLE won't do it
2017-11-22 18:31:06 +01:00
Sergei Golubchik
67277fb1d1 followup for e2df6d2: default directories, files, and groups
* do not read ini_exts array beyond the end
* do not use local variable (val) address outside of the variable's scope
* do not read $HOME/my.cnf
* do not create files in the user's $HOME, use $MYSQL_TMP_DIR
* test reading of the executable name group
* fail the test if .my.cnf cannot be opened
2017-07-04 19:34:28 +02:00
Georg Richter
ea8a31e63a Fixed compiler warnings 2017-07-04 13:56:38 +02:00
Georg Richter
6e156a63e3 Fixes for bigendian systems (CONC-252, CONC-265) 2017-06-30 14:00:28 +02:00