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

594 Commits

Author SHA1 Message Date
Georg Richter
f9232bacff Fixed redefinition for ssl structure 2016-01-18 06:36:38 +01:00
Georg Richter
f8912935b1 - Fixed several aurora plugin crashes (after reconnect)
- moved mysql->reconnect to mysql->options.reconnect
2016-01-16 07:04:28 +01:00
Georg Richter
77fec5c58f Fix for aurora: remember options when trying to connect inside
plugin to avoid double free of options
2016-01-11 08:58:15 +01:00
Oleksandr Byelkin
0c7fabc0b1 More control over results in the unittest. 2016-01-08 13:08:47 +01:00
Georg Richter
f62a2e0270 Fixed several memory leaks in ma_ssl.c 2016-01-07 13:23:28 +01:00
Oleksandr Byelkin
0518bd6b41 Very simple test of COM_MULTI 2016-01-05 20:41:37 +01:00
Oleksandr Byelkin
45729a2d25 Fix building. 2016-01-05 16:46:45 +01:00
Georg Richter
4cb9b79ced renamed MARIADB_OPT_SSL_PASSWORD to PASSPHRASE
Since MySQL server is picky about cipher suites, cipher suites in GnuTLS
switched back to default (NORMAL) without RHE_DSA
2016-01-05 09:49:49 +01:00
Georg Richter
b5cf443681 Windows fixes for remote_io plugin 2016-01-04 10:02:10 +01:00
Georg Richter
a3bb1d2009 merge from 3.0.0 fixes 2015-12-29 21:06:23 +01:00
Georg Richter
5f98f7710a Fixed mysql_api methods: On Windows functions need to be declared with
STDCALL.
Fixed warning in my_context.h
2015-12-29 20:37:18 +01:00
Georg Richter
d73e4c23a2 Added new API function mysql_get_info/mysql_get_infov which retrieves
global or connection dependent information:

mysql_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...)

the following value types are supported:
    MARIADB_CHARSET_ID (requires numeric 4th parameter)
    MARIADB_CHARSET_INFO (requires string 4th parameter)
    MARIADB_CHARSET_NAME
    MARIADB_CLIENT_ERRORS
    MARIADB_CLIENT_VERSION
    MARIADB_CLIENT_VERSION_ID
    MARIADB_CONNECTION_ASYNC_TIMEOUT
    MARIADB_CONNECTION_ASYNC_TIMEOUT_MS
    MARIADB_CONNECTION_HOST
    MARIADB_CONNECTION_INFO
    MARIADB_CONNECTION_PORT
    MARIADB_CONNECTION_PROTOCOL_VERSION_ID
    MARIADB_CONNECTION_PVIO_TYPE
    MARIADB_CONNECTION_SCHEMA
    MARIADB_CONNECTION_SERVER_TYPE
    MARIADB_CONNECTION_SERVER_VERSION
    MARIADB_CONNECTION_SERVER_VERSION_ID
    MARIADB_CONNECTION_SOCKET
    MARIADB_CONNECTION_SSL_CIPHER
    MARIADB_CONNECTION_SSL_VERSION
    MARIADB_CONNECTION_SSL_VERSION_ID
    MARIADB_CONNECTION_TYPE
    MARIADB_CONNECTION_UNIX_SOCKET
    MARIADB_CONNECTION_USER
    MARIADB_MAX_ALLOWED_PACKET
    MARIADB_NET_BUFFER_LENGTH

MARIADB_CONNECTION prefix indicates that a valid connection handle has
to be passed as first parameter.
2015-12-28 07:32:53 +01:00
Georg Richter
2c8ef31641 renamed aurora test to t_aurora, since we already have a so target
aurora (if plugin was build dynamicilly)
2015-12-21 08:13:17 +01:00
Georg Richter
1308b0598f Skip test for key protected keyfile when using Schannel 2015-12-20 11:14:03 +01:00
Georg Richter
d68c7dae95 Fixed warning on Windows 64-bit build 2015-12-19 17:07:10 +01:00
Georg Richter
c8648cf4b2 Initial implementation for COM_MULTI 2015-12-17 19:21:52 +01:00
Georg Richter
279ea7ea8c suppress openssl output while generating certificates 2015-12-16 10:41:35 +01:00
Georg Richter
0485ddb8a3 Link tests statically, since we need to access getopt (which is not
exported by shared object)
2015-12-16 07:30:18 +01:00
Georg Richter
518a30675c added missing mutex_init/destroy for ssl test conc-102 2015-12-15 19:19:08 +01:00
Georg Richter
4c7e5cbd1b Added new option MARIADB_OPT_USERDATA.
Syntax: mysql_optionsv(MYSQL *mysql, MYSQL_OPT_USERDATA, void *key, void
*data)
2015-12-14 11:56:17 +01:00
Georg Richter
da017f5381 Merge branch 'master' of https://github.com/MariaDB/mariadb-connector-c
Conflicts:
	CMakeLists.txt
2015-12-10 12:55:02 +01:00
Georg Richter
bec245a913 Initial aurora implementation 2015-12-10 12:52:51 +01:00
Georg Richter
edcfe061c1 Added new functions mysql_get_optionv and mysql_get_option 2015-12-10 06:51:01 +01:00
Georg Richter
ebe3cc9935 - Added new function mariadb_get_connection_type which returns -1 on
error, or MARIADB_CONNECTION_{UNIX_SOCKET,TCP,NAMEDPIPE,SHAREDMEM}
- Disabled asynchronous API for named pipes and shared memory connecit++ions
- Added package suffix ("alpha")
- removed myodbc_remove_escape api function
- Fixed return value (length) for named pipe read/write operations
2015-11-23 10:58:28 +01:00
Georg Richter
f30bb95c6a Fix for asynchronous (reconnect)
Fixed memory leak after reconnect/change user
2015-11-19 16:55:25 +01:00
Georg Richter
0af129fe80 Moved async read/write to pvio:
plugins now contain their own asynchronous read/write functions.
Todo:
  - asynchronous SSL
  - asynchronous read/write for non socket plugins
2015-11-16 07:37:31 +01:00
Georg Richter
9b1cbf15a5 Fix for asynchronous connect:
Unless the connection was successfully established mysql_get_socket will
return INVALID_SOCKET. In this case we need to check if an asynchronous
operation is in progress and return pvio from asynchronous context.
2015-11-15 08:00:43 +01:00
Georg Richter
32f1903f97 Added new option MARIADB_OPT_SSL_PASSWORD which allows use of
decrypted client certificate (private key only).
Currently this option is supported by GnuTLS and OpenSSL only
2015-11-13 12:41:29 +01:00
Georg Richter
72f7c4abf5 Windows 64-bit fixes:
changed type of length parameter in mysql_stmt_prepare,
mysql_real_query, mysql_stmt_send_long_data (incl. async _start
functions) from unsigned long to size_t.
Fixed warnings
2015-11-05 11:52:50 +01:00
Georg Richter
e85caa83ca Added new test for testing binding interfaces:
To run these tests a TCP/IP connection is required and
  the environment variable MYSQL_TEST_BINADDR has to be specified.
2015-11-02 18:42:00 +01:00
Georg Richter
dd29c4abec Renamed MYSQL_COM_* to COM_
changed default schema for tests to test_c
2015-11-02 15:19:10 +01:00
Lawrin Novitsky
fd96479d51 Fix for mariadb_convert_string - charset names for utf16 and utf32 are changed so iconv understands it. Also if endianness is not specified, BE charsets used by default, to avoid BOMs
Names mapped for both source and destination charsets.
Also the regression test for this change is added to charset.c
2015-10-28 16:00:07 +02:00
Georg Richter
7500f37150 - Renamed cio to pvio (pluggable virtual IO)
- minor fixes in windows schannel
2015-10-27 10:24:48 +01:00
Georg Richter
5827c04551 Windows build fixes 2015-10-19 09:52:30 +02:00
Georg Richter
1b597e0e37 Merge remote-tracking branch 'origin/cio' 2015-10-18 13:53:09 +02:00
Eric Herman
f10aa72112 fix compiler cast warnings in unittests
size_t is not always an unsigned long on all platforms, but for diagnostic
message in a test, it should be fine to cast it this way

addresses these warnings:

unittest/libmariadb/connection.c:635:3: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'time_t' [-Wformat=]
   diag("elapsed: %u", elapsed);

unittest/libmariadb/dyncol.c:149:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
     diag("%s %d", my_keys[i].str, my_keys[i].length);

unittest/libmariadb/dyncol.c:227:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
     diag("Key: %s Len: %d", unpack_keys[i].str, unpack_keys[i].length);
2015-10-16 11:55:01 +02:00
Georg Richter
74e62c2892 Merge remote-tracking branch 'origin/master' into cio
Conflicts:
	CMakeLists.txt
	include/mysql/client_plugin.h
	libmariadb/client_plugin.c.in
	libmariadb/libmariadb.c
	libmariadb/ma_secure.c
	libmariadb/my_malloc.c
	libmariadb/net.c
	plugins/io/CMakeLists.txt
	unittest/libmariadb/misc.c
2015-10-02 12:28:54 +02:00
Georg Richter
05659c872e More plugin configuration changes (last commit was incomplete) 2015-10-02 10:09:41 +02:00
Georg Richter
0bc7dc5e3c Added build option WITH_REMOTEIO (default=off) 2015-09-19 13:02:30 +02:00
Georg Richter
f0e8953faf Merge branch 'connector_c_2.2' of http://github.com/MariaDB/mariadb-connector-c
Conflicts:
	cmake/FindIconv.cmake
2015-09-18 15:27:47 +02:00
Georg Richter
b950d2cf48 CONC-141: set stmt->state to MYSQL_STMT_FETCH_DONE if no more resultsets
are available
2015-09-17 08:14:13 +02:00
Georg Richter
4597cd6a80 Various ssl and schannel fixes 2015-09-10 17:16:21 +02:00
Georg Richter
abf0080bfa Fix for CONC-129 (asynchronous api): Check if connection is still alive in
mysql_close_start
2015-09-08 07:33:30 +02:00
Georg Richter
23895fbd4f Fixed gnutls support 2015-08-13 14:01:33 +02:00
Georg Richter
f2955a4b39 more fixes 2015-08-10 12:09:14 +02:00
Georg Richter
cc85e25666 Added missing cio components 2015-08-06 15:08:25 +02:00
Georg Richter
f886562fb2 Initial cio implementation 2015-08-06 13:06:54 +02:00
Georg Richter
9e0f506901 Fixed libs in mariadb_config 2015-08-02 14:11:37 +02:00
Georg Richter
8f5ec7de19 Fixed libs in mariadb_config 2015-08-02 14:05:36 +02:00
Georg Richter
8f5e915b2f Merge remote-tracking branch 'origin/connector_c_2.2' 2015-06-26 11:01:10 +02:00