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

605 Commits

Author SHA1 Message Date
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
Georg Richter
d32add15c8 Fix certificate generation for travis 2020-03-16 12:36:03 +01:00
Georg Richter
3be5897c33 Fix for MDEV-21920
when converting (or copying) from string empty string weren't handled
correctly. This was a regression error, introduced by a prior covscan fix.
2020-03-12 12:06:40 +01:00
Georg Richter
f9a50468cd Merge pull request #129 from ottok/3.1-fix-spelling
Fix typo in output string: inital -> initial
2020-03-11 08:25:59 +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
Otto Kekäläinen
c0d5d7d15b Fix typo in output string: inital -> initial 2020-03-04 20:05:56 +02: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
Georg Richter
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
Sergei Golubchik
84dc415fce ssl unit test fixes
* don't abuse CONFIGURE_FILE
  no need to generate ssl.c during the build
* don't skip tests when the input data is missing
  if the certificate is not found it is not OK
* run-time CERT_PATH is not the same as build-time CERT_PATH
  load server-cert.sha1 at run-time
* test an invalid fingerprint - it has to fail
* do not delete certificates at the end of the test
* test SSL_VERIFY_SERVER_CERT with a system CA
2020-01-23 06:09:39 +01:00
Georg Richter
8e9c311610 Follow up of ffbdaaac2b
commit ffbdaaac2b was incomplete, changes from ma_pvio.c
were missing. Beside this fix, this commit also contains necessary changes for GnuTLS.
2020-01-22 11:08:18 +01:00
Georg Richter
ffbdaaac2b TLS/OpenSSL fix:
If ssl_verify_server_cert or MYSQL_OPT_SSL_VERIFY_SERVER_CERT option was set
without setting a local ca file, the server certificate will be checked using
the system ca store.
This might lead to an error, in case the server certificate was self signed.
In this case, the preferred way is to specify a local CA.
2020-01-20 17:30:17 +01:00
Georg Richter
947357354a Added test for testing maximun number of parmeters in binary protocol. 2019-10-22 17:36:22 +02:00
Georg Richter
66d449fc99 Added test for CONC-443 2019-10-17 18:41:58 +02:00
rusher
158a2d7db3 [MENT-26] Adding Azure CI testing
Tests configured for windows and ubuntu 18.04

Tests with simple password are changed for more complex password to
satisfy possible complex password requirement.
2019-07-22 09:40:53 +02:00
Oleksandr Byelkin
5fa9c4615e Merge branch '3.0' into 3.1 2019-07-18 13:51:03 +02:00
Oleksandr Byelkin
0c20765baf Fix of memory leack in the test and end spaces. 2019-07-18 13:42:29 +02: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
86a9e07feb Merge commit 'd09ac51df3c35e569e91313affb58ae74fd3470a' into 3.1 2019-06-30 12:47:17 +02:00
Georg Richter
d09ac51df3 Workaround/Fix for CONC-424:
1) In case a cursor is used in a stored procedure server sends a SERVER_STATUS_CURSOR_EXISTS flag,
even if the client didn't open a cursor via mysql_stmt_attr_set. This ends in a "comands out of sync" error,
since the client is sending a COM_STMT_FETCH command while the result sets were not read before.
We check now in case server sends a SERVER_STATUS_CURSOR_EXIST flag, if the client opened a cursor before.

2) The stmt error codes weren't update for all COM_STMT* commands correctly, e.g. COM_STMT_FETCH didn't show an error even if it failed.
2019-06-30 12:41:42 +02:00
Georg Richter
5e5bb66e32 Merge commit 'c6b344d730885051fdaf347f0d33c54ec22c415c' into 3.1 2019-06-26 09:18:38 +02:00
Georg Richter
c6b344d730 Fix for CONC-423: GnuTLS fails with "error reading authentication packet" with a TLSv1.3 connection
We now check the return code of gnutls_record_send() and gnutls_record_recv().
If GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED was returned we will loop and read/write
again until a timeout occurs or buffer was read or written.
2019-06-26 09:13:00 +02:00
Georg Richter
94d87e8559 Merge commit 'ff13dd446dcd6dd861026a8aa3cd23f3a9c759d3' into 3.1 2019-06-24 18:10:30 +02:00
Georg Richter
ff13dd446d CONC-421:
Fixed crash in case certificate and key are stored in the same file.
Instead of reading key and cert separately we now call gnutls api function
gnutls_certificate_x509_keyfile2() to load certificate and key.
2019-06-24 18:07:53 +02:00
Georg Richter
c098613d28 Moved rpl_api test to manual tests, since there is an endless loop
for now without timeout.
2019-06-14 13:48:31 +02:00
Georg Richter
8983406ade Merge commit 'd4a0a384459e3a6645ad4df46db18a5d2dd4c780' into 3.1 2019-06-14 13:36:07 +02:00
Oleksandr Byelkin
d4a0a38445 Better test of warnings during prepare. 2019-06-14 08:47:21 +02:00
Georg Richter
546b07a3f0 Merge commit 'b0411b731f5d61df38fe3f783437df13526774f2' into 3.1 2019-06-02 13:46:16 +02:00
Georg Richter
b0411b731f CONC-386:
Added support for pem files which contain certificate and private key.
In case the file will contain more than one certificate or key, the first
certificate or key found will be used.
2019-06-02 13:39:27 +02:00
Marko Mäkelä
68e6c5bd67 CONC-394: The unit test does not compile on Windows 2019-05-05 22:40:45 +03:00
Oleksandr Byelkin
bce6c80138 Free memory used in the unit test 2019-05-04 13:04:14 +02: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
4ac8030b33 fix memory leaks to keep LeakSanitizer happy 2019-03-05 20:21:32 +01: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
Georg Richter
af47d1beab Merge branch '3.0' into 3.1 2019-03-03 14:03:20 +01:00
Georg Richter
f24915057c Don't close default connection in test_conc392 in case we have to skip test 2019-03-02 14:49:27 +01:00
Georg Richter
0cc2df4180 Follow up of 68d05007bb:
Skip test if the server doesn't support session tracking
2019-03-02 14:26:55 +01:00
Georg Richter
68d05007bb Fix for CONC-392:
Fixed crash when server sent session tracking information with session type
SESSION_TRACK_STATE_CHANGE. In this special case the packet doesn't contain
the overall length. (see https://mariadb.com/kb/en/library/ok_packet/).
2019-03-02 07:54:06 +01:00
Georg Richter
0acf529e34 Fix for MDEV-18634:
Even if this test is intended to fail we need to pass valid memory buffer
to simulate overflow (length > length of sql statement).
2019-02-19 08:44:19 +01:00