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

77 Commits

Author SHA1 Message Date
Georg Richter
adf7b569e3 Fix for MDEV-10361: Don't try to reconnect twice: if mysql->options.reconnect is set,
ma_simple_command already tries to reconnect, so there is no need to reconnect in mysql_ping again
2018-01-19 10:20:42 +01:00
Vladislav Vaintroub
935c33b690 Fix Windows size_t warnings. 2018-01-12 18:19:19 +00:00
Vladislav Vaintroub
63f841f78f Fix finding current program name with clang > 4.0
Use CRT _splitpath() to get program name on Windows, rather than
nonstandard functions from shell32
2017-11-24 14:37:24 +01:00
Georg Richter
b241f8995f MDEV-14101: tls-version
Client part of MDEV-14101: Add support for tls-version, via
mysql_options(mysql, MARIADB_OPT_TLS_VERSION, value)
Accepted values are "TLSv1.1", "TLSv1.2" and "TLSv1.3".

Fixed testcase openssl_1 for schannel
2017-10-23 11:09:54 +02:00
Georg Richter
abf4bf8024 Provide details about TLS/SSL library in use
When calling mariadb_get_infov with option MARIADB_TLS_LIBRARY
the functioni now returns the correct version number and name
of the tls/ssl library in use.
2017-10-17 15:57:42 +02:00
Georg Richter
3b297e08c9 Revert "MDEV-14027: Determine TLS/SSL library version"
This reverts commit 7b02cbb721.
2017-10-15 09:30:24 +02:00
Georg Richter
7b02cbb721 MDEV-14027: Determine TLS/SSL library version 2017-10-15 06:07:54 +02:00
Georg Richter
7bcd78f93b CONC-286:
- Force TLS/SSL connection if finger print options were specified
- Allow hex finger prints with colon separated 2 digit numbers
2017-10-10 12:25:27 +02:00
Georg Richter
453a88c7d4 Added missing break in mysql_get_infov 2017-09-08 12:22:14 +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
8b3e6b5dcf Fix for CONC-252:
All functions which are supported by libmysql use now unsigned long as length parameter instead of size_t
2017-07-01 15:42:52 +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
1ea7be32f5 Merge remote-tracking branch 'origin/MDEV-12471' 2017-06-14 11:12:59 +02:00
Vladislav Vaintroub
06d2490371 MDEV-11159 Add support for sending proxy protocol header 2017-06-13 18:19:07 +00: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
a86b36d08f CONC-250: SSL hostname verification for SubjectAltNames
Add hostname verification for SAN (OpenSSL)
2017-05-08 13:55:21 +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
be34e12ba0 remove ctx hooks after the successful reconnect
this fixes main.mysql_client_test_nonblock failures
in optimized builds
2017-03-31 14:30:04 +02:00
Sergei Golubchik
c042c1d8d0 add forgotten async ctxt initialization on reconnects 2017-03-25 22:41:03 +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
6655a8194e Remove unused include file
remove link to mariadbclient library
2017-01-21 19:36:16 +01:00
Georg Richter
65d2c41921 CONC-224: Allow to build Connector/C without TLS/SSL support.
- CMake option -DWITH_SSL=OFF disables TLS/SSL support for connector/c
- Fixed warning when building with OpenSSL 1.1.0c
2017-01-11 15:17:53 +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
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
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
4d1af73242 Set stmt_id to -1 only for mariadb_stmt_execute_direct 2016-11-04 16:02:08 +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
Vladislav Vaintroub
7cb8479605 Fix Win64 warnings. Correctly define my_socket in ma_global.h 2016-10-12 21:05:31 +00:00
Georg Richter
6723c52c46 Fixed function declaration for mysql_error and mysql_info (const char * instead of char *) 2016-10-06 09:44:57 +02:00
Sergei Golubchik
4ff192bb40 few bugs in the tracker support
* ma_multi_malloc wanted uint for size arguments, not size_t
* ma_multi_malloc needs NULL pointer at the end. Simple 0
  is not always the right size
* don't look for tracker info, if the packet does not even
  has the info_len field
2016-09-21 17:35:54 +02:00
Vladislav Vaintroub
110aa7ddca Windows : Do not default connection protocol to SHM,only if
mysql->options.shared_memory_base_name is set.

Only make SHM connections if
mysql->options.protocol == MYSQL_PROTOCOL_MEMORY
2016-09-12 16:05:02 +00:00
Vladislav Vaintroub
da8977d670 Merge branch 'master' into serg-integr 2016-09-12 11:47:14 +00:00
Georg Richter
c68c5dc27f Part for fix of CONC-200:
declare type of my_ulonglong
2016-09-08 08:01:21 +02:00
Sergei Golubchik
c87193af81 use ssl as libmysqlclient did 2016-09-07 08:33:03 +02:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
2a7cc977fb Shared memory fixes 2016-08-24 19:26:30 +02:00
Georg Richter
c374386bce Fix crash (introduced by CLIENT_REMEMBER_OPTIONS leak fix)
see also http://lists.askmonty.org/pipermail/commits/2016-August/009643.html
2016-08-19 08:24:47 +02:00
Georg Richter
9207626bb4 10.2-integration
readded api functions
- mysql_debug (dummy)
- mysql_get_parameters
added low level api functions
- mysql_net_field_length
- mysql_net_read
2016-08-18 12:24:32 +02:00
Georg Richter
b68843a93d Merge from 2.3: Free options if CLIENT_REMEMBER_OPTIONS wasn't set 2016-08-16 18:38:41 +02:00
Georg Richter
429b166cbe Move mariadb specific client flags and server capabilities to mysql->extension 2016-08-16 14:58:15 +02:00
Vladislav Vaintroub
1cefbbecb9 C/C integration 2016-08-12 13:12:49 +02:00
Georg Richter
7b14603438 Fix for CONC-196: merged manually from connector_c_2.3 branch 2016-08-03 12:30:54 +02:00
Georg Richter
26d31929d4 several fixes for mariadb_stmt_execute_direct:
- allow param binding via mysql_stmt_attr_set:
  mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, &param_count);
- If a prepared statement will be reexecuted, we send COM_STMT_CLOSE
  together with COM_STMT_PREPARE and COM_STMT_EXECUTE
2016-06-18 14:07:28 +02:00
Georg Richter
ac651213eb Merge branch 'master' of https://github.com/MariaDB/mariadb-connector-c 2016-06-01 20:23:57 +02:00