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

66 Commits

Author SHA1 Message Date
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
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
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
rusher
dd927bd171 Update server test suite 2023-08-30 09:52:22 +02:00
Georg Richter
1acb81e11c Build fixes:
- Fixed build error, which was previously introduced by commit
c8ca89112e

- Treat warnings as errors
2023-08-16 14:09:34 +02:00
Georg Richter
780c330f38 Since we can't determine if load data local is
suppoerted by Xpand, we skip it for now.
2023-02-17 11:23:22 +01:00
Georg Richter
abea2dfa6b Merge branch '3.1' into 3.3 2023-01-15 14:27:41 +01:00
Georg Richter
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
Georg Richter
e8e356e355 Merge branch '3.1' into 3.3 2022-07-18 11:48:33 +02:00
Georg Richter
9a572bc548 Fix for CONC-604 and CONC-605:
This patch fixes a crash when reconnectiong via TLS.
2022-07-18 11:41:46 +02:00
Georg Richter
0d20e47fe5 unittests: print server tls information 2022-04-28 13:10:44 +02:00
Georg Richter
f60a31b5a8 Debug information for tests:
Print tls releated server variables
2022-04-21 11:59:14 +02:00
diego Dupin
fb85d99d13 Adding xpand to test suite 2022-03-23 11:46:40 +01:00
Georg Richter
bc9458893f Merge branch '3.1' into 3.2 2022-03-01 11:28:33 +01:00
Georg Richter
abc1cf89f1 Test fix:
For detecting if we test against MaxScale check also if
mysql_get_server_info contains "maxScale".
2022-03-01 10:23:34 +01:00
Georg Richter
16a031945a Merge branch '3.1' into 3.2 2021-06-24 16:49:15 +02:00
Georg Richter
d111980380 Fix for MDEV-25820:
Tests will be skipped unless the following environment variables
were specified:

- MYSQLTEST_VARDIR (will be automatically set when running inside
  mtr)
- MARIADB_CC_TEST
2021-06-24 16:44:21 +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
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
Rucha Deodhar
2f7230c62b MDEV-8334: Rename utf8 to utf8mb3
This patch is made as a part of MDEV-8334 to fix failing test in unit and
main test suite so that utf8mb3 characterset is recognized. Failing tests:
main.mysql_client_test
main.mysql_client_test_comp
unit.conc_basic-t
unit.conc_charset
unit.conc_connection
2021-04-17 02:10:25 +05:30
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
b24d337027 More test fixes:
Always provide a message to the FAIL_ macros
2020-10-20 16:17:25 +02:00
Georg Richter
9637689e5e Test and travis modification for testing against SkySQL 2020-09-02 14:08:19 +02:00
Vicențiu Ciorbaru
ee5c10b919 MDEV-14811 unit.conc_misc fails in buildbot on bld-starfs-release in test_conc49
Make sure sql_mode is cleared when starting a new connection.

The problem:
When a test is skipped and there was an error in the last sql statement
sent on the default connection, the mysql_default connection is
recreated, but without sql_mode set to ''.

This leads to sql_mode having NO_ENGINE_SUBSTITUTION set.
test_conc49 tries to create an InnoDB table, but if the previous test
(in this particular case test_connect_attrs) is skipped and it errored
(in this case because it tried selecting from a performance schema
table that did not exist), it will recreate the mysql_default
connection via test_connect before running test_conc49.

Fix by making sure test_connect clears the sql_mode, just like
reset_connection, which is normally called between successful test
runs.
2020-06-18 21:53:00 +03:00
Oleksandr Byelkin
895dcb61e3 C preprocessor defines fix 2020-06-04 16:49:21 +02:00
Georg Richter
6552b294e4 Fix for previous commit 2020-03-16 14:27:11 +01: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
b5bd0e5818 Merge commit '77d051e89d0b342333d951e66e53f2aea43f6e36' into 3.1 2019-07-16 17:33:00 +02:00
Georg Richter
77d051e89d Windows build fixes for OpenSSL 2019-07-16 08:52:24 +02:00
Georg Richter
8473246541 Fix authentication tests:
- specify correct plugin type for checks
- allow access to test schema for ed25519 user
2019-03-04 17:06:00 +01:00
Sergei Golubchik
a4effc462d fix connection unit test to work in mtr 2019-02-04 16:05:41 +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
99d054ebad Fix for MDEV-12578: Connector/C doesn't read .my.cnf file in home directory.
After lookup in standard directories C/C now also checks in home directory for
configuration file .my.cnf
2017-05-07 07:46:43 +02:00
Georg Richter
4ab155cf39 Unit test fixes for server integration
- SSL tests require CERT_PATH. Subdirectory certs was removed. If Connector/C is build outside of the server tree, certification path has to be specified manually (-DCERT_PATH=/path/to/certs).
- All tables and users will removed, if the test passed (otherwise mtr will complain).
2017-03-04 17:37:39 +01:00
Georg Richter
fd005f9bc1 Fixed exit code in case the test can't connect 2017-01-04 12:44:08 +01:00
Georg Richter
967b2830d8 renamed ma_errmsg.h back to errmsg.h 2016-11-16 18:13:59 +01:00
Georg Richter
c20974b039 - removed global context for tls, so code can be used also with no yassl branch in 10.2
- added new gnutls cipher mapping
- fixed ssl test case: skip hostname verification if both server and client run on localhost
- added server certificates
2016-10-17 16:02:51 +02:00
Sergei Golubchik
f95877dc5f Merge branch 'master' into serg-integr 2016-09-15 09:21:30 +02:00
Georg Richter
9b436eaaf7 TLS fixes:
- don't use password in global context
  - load keys and certs via callback functions
  - don't use gnutls_bye since server is not able to detect dead socket
  - fixed valgrind errors in gnutls
2016-09-13 16:12:34 +02:00
Vladislav Vaintroub
da8977d670 Merge branch 'master' into serg-integr 2016-09-12 11:47:14 +00:00
Georg Richter
b0506f63e9 Instead of mysql_real_connect in tests we call now my_test_connect to apply global options like tls usage 2016-09-08 07:59:34 +02:00
Vladislav Vaintroub
6c582c0c3d fix C/C integration, Windows build 2016-09-05 18:05:07 +00:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
454e5247af Fixed test build 2016-08-25 06:22:29 +02:00
Georg Richter
2a7cc977fb Shared memory fixes 2016-08-24 19:26:30 +02:00
Georg Richter
0a187a0c3b Build remote_io as dynamic plugin to avoid build problems on several
machines with broken OpenSSL installation
2016-03-02 16:43:39 +01:00