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

594 Commits

Author SHA1 Message Date
Georg Richter
47df15edb6 Fixed compiler warnings (introduced by changeset b78ba1b251) 2021-06-24 11:27:07 +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
ea4e47f41a Merge branch '3.1' into 3.2 2021-06-10 17:37:48 +02:00
Georg Richter
aca697e5a1 Travis test fixes
Since 10.6 server returns utf8mb3 for character set (and it will change
to utf8mb4), so we use strncmp to check the character set returned by
server.
2021-06-09 07:29:56 +02:00
pasha-bolokhov
6710f59817 Update async.c
Typo fix
2021-05-17 07:54:50 -07: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
Georg Richter
01ada4b85f Merge branch '3.1' into 3.2 2021-05-03 14:01:37 +02:00
Georg Richter
9244281d6b Fix for CONC-490:
If CLIENT_CONNECT_WITH_DB flag was specified without a database name,
we need to unset this flag to prevent breaking connection handshake.
2021-04-29 10:59:25 +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
Vladislav Vaintroub
b6f8883d96 CONC-534 memory leak in ps_bugs.c 2021-03-15 20:07:28 +01:00
Georg Richter
b21c39c001 Merge branch '3.1' into 3.2 2021-03-14 12:03:07 +01:00
Georg Richter
56497646b7 Disable failing tests when running against MaxScale. 2021-03-14 11:53:28 +01:00
Georg Richter
ca1ea5c1a2 Fix for CONC-525: Support LOAD * LOCAL INFILE statements in binary protocol
With implementation of MDEV-16708 (support all commands in binary protocol) we
need to check for local infile in text and binary protocol. Therefore the local
infile relevant part from ma_simple_command was moved to mthd_my_send_cmd method.
2021-02-23 07:55:35 +01:00
Georg Richter
67cd96f141 Revert "CONC-142: Fix memory leak in connection"
This reverts commit 63a207e790.
2021-02-09 20:27:52 +01:00
Georg Richter
63a207e790 CONC-142: Fix memory leak in connection
When closing connection object the reference of server_version_info
needs to be decremented to prevent memory leakage.
2021-02-09 20:25:55 +01:00
Oleksandr Byelkin
e62ff462c5 fix memory leack in the test 2021-01-28 11:20:35 +01:00
Oleksandr Byelkin
e21d21d71f Fix ASAN issues in the tests 2021-01-27 20:25:13 +01:00
Oleksandr Byelkin
b503e52288 fix problems found by 10.0 2021-01-27 13:13:31 +01:00
Anton Golovenko
f52582d1f8 unittests fix 2021-01-20 19:07:38 +05: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
820faff627 codespell fixes, removed MSDOS preprocessor macros 2020-11-26 09:07:17 +01:00
Georg Richter
88e9d172b4 Added missing test case for CONC-512 2020-11-08 14:52:42 +01:00
Georg Richter
03948821ae Test fix:
Drop procedure at end of test.
2020-10-28 10:58:05 +01:00
Marko Mäkelä
0cdc1656a7 Do not leak memory in the skipped MDEV-23768 unit test 2020-10-24 11:07:47 +03: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
dec58668dd Test fix (appveyor):
Don't use hardcoded schema name, since default schema can be set via
environment variable (or option).
2020-10-20 15:25:05 +02:00
Georg Richter
55a64c1bd5 Fix for CONC-504: reset stmt->result.rows when executing mysql_stmt_next_result
While in text protocol the number of rows is resetted in mysql_store/use_result
in binary protocol we need to explicitly reset it when switching to next result set.
2020-10-02 09:47:52 +02:00
Georg Richter
aa65bd1beb Skip test_returning, since it's not fixed on server yet (MDEV-23768) 2020-09-21 18:25:10 +02:00
Georg Richter
8752eea4f2 Use a newer ubuntu version for travis 2020-09-21 15:44:05 +02:00
Georg Richter
7052619cc4 Added build option WITH_ICONV.
Default is OFF, which means MariaDB Connector/C
will be built without iconv support.

If set to OFF The API function mariadb_convert_string will always
return -1 and errorcode ENOTSUP.
2020-09-14 12:01:06 +02:00
Georg Richter
29a3396456 CONC-302: Added support for SESSION_TRACK_GTIDS (MySQL server) 2020-09-12 10:58:33 +02:00
Georg Richter
2c22f8e71b Don't test session tracking for character set against server < 10.3 2020-09-10 17:27:39 +02:00
Georg Richter
a17e73f953 Skip test_conc496 if session_tracking_transaction_info variable is not available/supported. 2020-09-10 16:30:04 +02:00
Georg Richter
3e699a1738 CONC-496: Added support for SESSION_TRACK_TRANSACTION_STATE in ok packet 2020-09-10 14:03:00 +02:00
Georg Richter
01859950cf Revert "Fix for CONC-494:"
This reverts commit 8581cafad4.
2020-09-09 12:19:27 +02:00
Georg Richter
8581cafad4 Fix for CONC-494:
Install all symlinks for shared and static libraries in
component Development instead of SharedLibraries.
2020-09-09 10:24:55 +02:00
Georg Richter
8102851bab Increase timeout for cursor and ps_new 2020-09-06 14:26:34 +02:00
Georg Richter
9637689e5e Test and travis modification for testing against SkySQL 2020-09-02 14:08:19 +02:00
Georg Richter
5e5e7b8dc6 Skip SSL tests for TRAVIS 2020-08-30 10:23:25 +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
Sergei Golubchik
c7ae385817 harmless memory leak in the dyncol unit test
to make ASAN happy
2020-05-26 14:09:51 +02:00
Georg Richter
37a4fd1d6d Workaround for CONC-469
If no default authentication plugin was specified and the server sends preferred
authentication method in server hello package client now uses servers preferred
authentication method instead of using mysql_native_password. If no default
authentication plugin was specified and the server didn't send an
authenticatoin method client uses the default mysql_native_password plugin.
2020-05-25 11:50:04 +02:00
Georg Richter
2d81c70a41 Fix max_param test:
Allocate memory for parameters on heap instead of stack.
2020-04-26 03:07:59 +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