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

667 Commits

Author SHA1 Message Date
SergMariaDB
80215e221d Merge pull request #171 from pasha-bolokhov/patch-1
Update async.c
2021-10-05 05:26:31 -04:00
Georg Richter
18f7cf423f Merge branch '3.1' into 3.2 2021-09-25 16:28:04 +02:00
Georg Richter
4b9379b2aa Fix for CONC-566:
If cursor type is set to read only, and SERVER_STATUS_CURSOR_EXISTS
flag was not set in the server_status of EOF packet, the assumption
was made that a single result set will follow which will be stored
by a call to mysql_stmt_store_result().

As the example in the bug report shows, this is not always the case,
since a stored procedure call might also unset the CURSOR flag and
will always return multiple result sets. In this case it will be
handled now as "normal" unbuffered result set.
2021-09-25 16:07:24 +02:00
Georg Richter
e142c3b24a Skip test for CONC-544 when testing against SkySQL/MaxScale. 2021-09-14 07:11:19 +02:00
Georg Richter
7e0be5a919 CONC-544: restrict authentication plugins
Added new option MARIADB_OPT_RESTRICTED_AUTH (and corresponding
"restricted-auth" option for configuration files) which specifies
on or more comma spearated authentication plugins which are allowed
for authenication.

If the server asks for an authentication plugin not listed in this
option the connect attempt will fail with error CR_PLUGIN_NOT_ALLOWED.
2021-09-14 06:24:56 +02:00
diego Dupin
2ca0c22fd3 correct test after 3.1 merge 2021-08-31 19:02:43 +02:00
Marko Mäkelä
fc25d79083 Merge 3.1 into 3.2 2021-08-31 10:28:30 +03:00
Marko Mäkelä
42cb1e442c test_bug38486(): Do not leave behind a garbage table
This fixes "Check of testcase failed for: unit.conc_cursor"
in the MariaDB Server test suite.
2021-08-25 09:37:42 +03:00
Marko Mäkelä
9990ab7d49 Fix clang -Wunused-but-set-variable 2021-08-25 09:10:10 +03:00
Georg Richter
7cf38704c9 Merge branch '3.1' into 3.2 2021-07-28 06:06:11 +02:00
Sergei Golubchik
0cc16f18c1 compilation failure with gcc 4.8.5
/home/buildbot/buildbot/build/libmariadb/unittest/libmariadb/ps.c:5152:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (unsigned int i=0; i < mysql_field_count(mysql); i++)
   ^
/home/buildbot/buildbot/build/libmariadb/unittest/libmariadb/ps.c:5152:3: note: use option -std=c99 or -std=gnu99 to compile your code
2021-07-27 20:43:37 +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
Georg Richter
9c651bd678 CONC-565: Incorrect max_length in binary protocol
Fixed max_length values in ma_stmt_codecs for integer types:
- all types included an extra byte for trailing zero character
- maximum value for year column type is 2155 (and not 0xFFFF).
2021-07-26 17:47:37 +02:00
Marko Mäkelä
490100ccac CONC-49 fixup
test_conc49(): Do not leak memory.
2021-07-22 15:55:45 +03:00
Georg Richter
7e6ae832bd removed aurora test:
aurora plugin was removed in C/C 3.2.0
2021-07-20 17:24:10 +02: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
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
Georg Richter
9661ddaefb Fixed compiler warnings (introduced by changeset b78ba1b251) 2021-06-24 15:05:08 +02:00
Georg Richter
353e99fba1 More test fixes 2021-06-24 12:48:16 +02:00
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