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

605 Commits

Author SHA1 Message Date
Vladislav Vaintroub
931450c3f8 Fix some conversion warnings.
Exclude definitions from my_config.h that conflict with server's config.h
(most of ma_config.h is not used by connector anyway)

Avoid overriding server's SIGN_TARGET() macro, if used as subproject.
Make WITH_UNIT_TESTS exclude unit tests, like it is for the server.
2017-09-30 22:38:53 +00:00
Georg Richter
240204eaeb Fix for CONC-282: mysql_stmt_fetch_column doesn't work with prior call to mysql_stmt_store_result
- If no bind variables were bound or the function mysql_stmt_store_result was not called before, the internal bind variables (stmt->bind) was not filled (lengths and null values)
2017-09-25 15:45:14 +02:00
Georg Richter
02f57a9c14 Fix for CONC-276: client library crashes on Windows after TLS reconnect:
The connection pointer mysql is now no longer part (and doesn't need to be updated) of schannel security context, since it can be obtained directly from tls container.
2017-08-24 18:09:50 +02:00
Sergei Golubchik
524f14a8e3 conc_connection fails on 32-bit 2017-07-05 12:06:45 +02: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
Georg Richter
e2df6d2552 Fix for MDEV-12965 and MDEV-13100:
If no configuration file and no configuration group was specified, Connector/C ddoesn't read any configurationm files.
By default the follwing groups will be read:
- client
- client-server
- client-mariadb

If no configuration file was specified, Connector/C looks up for configuration files in following locations:
- Windows:
  - System directory
  - Windows directory
  - C:\
  - Directoy from which the application was started
  - MYSQL_HOME environment variable
- Unix platforms
  - DEFAULT_SYSCONFIR (if specified)
  or
  - /etc and /etc/mysql
  - MYSQL_HOME environment variable
  - .my.cnf in home directory

Special case: If NULL or empty string will be passed for MYSQL_READ_DEFAULT_GROUP option Connector/C will read the default groups and the group which matches the application name.
2017-06-25 14:14:55 +02:00
Georg Richter
ff4bfdf1ca Added conversion tests for bulk 2017-06-14 14:04:00 +02:00
Georg Richter
1ea7be32f5 Merge remote-tracking branch 'origin/MDEV-12471' 2017-06-14 11:12:59 +02:00
Georg Richter
e50571e3ab Disallow bulk execution if parameter count is 0 2017-05-15 14:11:59 +02:00
Sergei Golubchik
e14ed01c8e fix connection unit test 2017-05-09 18:27:52 +02:00
Georg Richter
d2aec415d7 Minor fixes:
fixed compiler warnings in openssl.c and dialog.c
  fixed timeout setting (was wrong in a previous commit)
  disabled session tracking test
2017-05-09 16:40:09 +02:00
Georg Richter
5c4cf7a9b6 Implementation of SHA256 authentication plugin (CONC-229).
On Windows the sha256 plugin doesn't need any external TLS/Crypto libraries, it uses windows cryto library. On non Windws platforms the plugin requires OpenSSL (GnuTLS doesn't support OAEP v2.0 padding yet)
2017-05-08 14:12:17 +02: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
Oleksandr Byelkin
d0f9234620 MDEV-12471: BULK Command
After test fixes.
bulk_null() is disabled. Before the client library took care about MYSQL_TYPE_NULL, now it do not do it so server return an error. and I have no idea what should be chenged test or client library.
2017-05-01 15:05:49 +02:00
Georg Richter
08450df078 initial implementation for MDEV-12471 2017-04-24 15:45:58 +02:00
Georg Richter
bde93e828d Merge branch 'master' of https://github.com/MariaDB/mariadb-connector-c 2017-04-03 18:12:13 +02:00
Sergei Golubchik
424c542e7f compiler warning 2017-03-25 22:44:05 +01:00
Georg Richter
082b165c6d Smaller test case fixes 2017-03-23 16:53:00 +01:00
Georg Richter
63e0897d43 Fix for MDEV-12247:
If a statement with open (read only) cursor is executed there is no buffered
result set (result set rows will be fetched directly from server), so we need to skip reading unbuffered result sets if a cursor is open.
2017-03-21 17:26:19 +01:00
Georg Richter
6bec9204f0 Fix for MDEV-12446:
When no default configuration is present, C/C crashed due to double free
in ma_default.c
2017-03-20 07:29:51 +01:00
Georg Richter
9a865bc88c Fix for CONC-243:
ABI breakage: Revert parameter length from size_t to unsigned long.
  (affects mysql_stmt_prepare, mysql_real_query, mysql_send_query)
2017-03-14 16:11:04 +01:00
Georg Richter
a1315d2a2d Fixed compiler warnings in bulk1.c and features-10_2.c 2017-03-06 15:04:47 +01:00
Georg Richter
aae1d2df74 Fixed test case for reset_connection:
We need to cast with my_ulonglong instead of ulong
2017-03-06 06:33:19 +01: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
99419d35f0 Fix for CONC-223: Add client support for missing collations
If a collation is not available the client will not be able to set
correct character set.
2017-01-02 12:47:52 +01:00
Georg Richter
87e861c360 client side implemetation for MDEV-10340:
int STDCALL mysql_reset_connection(MYSQL *mysql)
2016-12-29 19:10:35 +01:00
Georg Richter
ab3ffdc473 removed api function mysql_get_server_status (introduced in last commit). Instead of mariadb_get_infov now supports additional parameters:
* MARIADB_CONNECTION_SERVER_STATUS
* MARIADB_CONNECTION_SERVER_CAPABILITIES
* MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES
* MARIADB_CONNECTION_CLIENT_CAPABILITIES
2016-12-13 07:09:06 +01:00
Georg Richter
7a1e3a699d - Fixed crash in prepared statement: Indicator variable should be checked only if we are in bulk operation mode (=stmt->array_size > 0 and bulk is supported by server
- Added new api function mysql_get_server_status, so client applications no longer need to access members of the mysql structure
2016-12-10 14:09:53 +01:00
Georg Richter
64536703c7 Fix for CONC-218:
To prevent unexpected behavior when reusing a statement with mariadb_stmt_execute_direct
a call to mysql_stmt_attr_set with option STMT_ATTR_PREBIND_PARAMS will reset the statement before.
2016-11-29 13:30:17 +01:00
Georg Richter
dad2cf6cf4 remove async_example 2016-11-28 18:32:26 +01:00
Georg Richter
c89d5d38e0 Fix for CONC-217: mariadb_stmt_execute_direct: Clear error message from mysql_stmt_execute if mysql_stmt_prepare failed 2016-11-26 13:47:43 +01:00
Georg Richter
8695a17cbc Added support for STMT_INDICATE_IGNORE indicator - please note that the counter part for indicator type ignore is not pushed in server repo yet. 2016-11-26 13:23:57 +01:00
Georg Richter
aabaac04aa Plugin fixes
- include ma_errmsg.h if plugin is built dynamically
- trace_example fixes
2016-11-24 08:56:27 +01:00
Georg Richter
3e624e50df removed definition of SQLSTATE_UNKNOWN (10.2 integration) 2016-11-17 16:04:33 +01:00
Georg Richter
a11382a8f5 Row wise binding fixes for prepared statements (bulk)
- Fixed offset calculation for length and indicator
- Ignore null values if indicator is STMT_INDICATOR_DEFAULT
2016-11-17 10:47:15 +01:00
Georg Richter
967b2830d8 renamed ma_errmsg.h back to errmsg.h 2016-11-16 18:13:59 +01:00
Georg Richter
a499722377 removed ma_errmsg from mysql.h 2016-11-16 17:27:59 +01:00
Georg Richter
3378c0d8b7 Fixed array_binding for MYSQL_TYPE_NULL 2016-11-13 18:37:22 +01:00
Georg Richter
03a7ec1b8b Support mariadb_stmt_execute_direct also for versions < 10.2
Bundled COM_CLOSE and COM_PREPARE packets
2016-11-12 17:51:01 +01:00
Georg Richter
64862325a5 Removed com_multi for mariadb_stmt_execute_direct
added support for pre 10.2-servers in mariadb_stmt_execute_direct
2016-11-10 05:49:11 +01:00
Georg Richter
6306c9f46b - removed COM_MULTI from options
COM_MULTI is now available for internal use only, e.g. in
  mariadb_stmt_execute_direct
2016-10-20 08:47:51 +02:00
Georg Richter
468cda3cfb Fixed compilation errors introduced by 629ec646303.. 2016-10-18 10:53:31 +02: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
Vladislav Vaintroub
7cb8479605 Fix Win64 warnings. Correctly define my_socket in ma_global.h 2016-10-12 21:05:31 +00:00
Georg Richter
c8dd0899d4 When an attempt to open a unix sucket failed, the socket was not properly closed. 2016-09-24 11:14:53 +02:00
Vladislav Vaintroub
878f1439e3 Fix misc.warnings.
SSL_LIBRARIES should be set to secur32 with SCHANNEL.
malloc/free declarations were not found in sspi_client, so compiler assumed
malloc() returns an int.
2016-09-22 21:48:54 +00:00
Sergei Golubchik
f95877dc5f Merge branch 'master' into serg-integr 2016-09-15 09:21:30 +02:00