Fixed different behavior of pvio_is_alive (which was first used
with fix of CONC-589). Both for sockets and named pipe the function
now returns true if the connection is alive, otherwise false.
If automatic reconnect is enabled (MYSQL_OPT_RECONNECT) it is
mandatory to check if the connection/socket is still alive before
sending a command to the server (unless the command is COM_QUIT).
- Build server build with latest C/C: Instead of copying the C/C directory
into server, we now fetch the actual commit or PR into server repository
- Fix travis environment variables (Windows)
- Skip character set tests if the server doesn't support charset/collation
- Don't use CREATE OR REPLACE SQL syntax to make MySQL happy
- Disable TLS connection test for MaxScale
- Don't set TEST environment variables if they are empty
- Added TLSv1.3 ciphers to cipher map.
- Fixed retrieval of cipher suite: Since gnutls_cipher_suite_get_name
supports only TLSv1.2 (and lower) cipher suites, we have to call
gnutls_ciphersuite_get() (requires GnuTLS 3.7.4 or newer).
This reverts 395641549ac7..536d9e2b9e5b, in particular:
8dffd56936 MDEV-31857 enable MYSQL_OPT_SSL_VERIFY_SERVER_CERT by default
a99570c118 MDEV-31855 SSL cert validation protocol extension
9aa15e72a7 TLS fingerprint
and related commits
because the default value of every option is 0
(option and option.extension are bzero-ed to reset),
tls_verify_server_cert was renamed to tls_allow_invalid_server_cert
with the default value of 0, "do not allow".
API didn't change, it's still MYSQL_OPT_SSL_VERIFY_SERVER_CERT
Skip character set tests which set character set
during handshake, since MaxScale sends utf8mb4 via
session_track information in handshake OK packet.
(https://jira.mariadb.org/browse/MXS-4898).
When resetting the connection with mysql reset_connection(), the
server_status must be checked and any other resultsets that mayi
exist must be removed.
This feature allows client applications to register a callback function,
which is called as soon as the server status changes or session_track
information was sent by the server.
Registration is handled via mysql_optionsv() API function:
mysql_optionsv(mysql, MARIADB_OPT_STATUS_CALLBACK, function, data)
The callback function must be defined as follws:
void status_callback(void *data, enum enum_mariadb_status_info type, ..)
Parameters:
- data Pointer passed with registration of callback function
(usually a connection handle)
- type Information type STATUS_TYPE or SESSION_TRACK_TYPE
Variadic Parameters:
if (type == STATUS_TYPE):
- server status (unsigned int)
if (type == SESSION_TRACK_TYPE)
- enum enum_session_state_type track_type - session track type
if (track_type == SESSION_TRACK_SYSTEM_VARIABLES)
- MARIADB_CONST_STRING *key
- MARIADB_CONST_STRING *value
else
- MARIADB_CONST_STRING *value
An example can be found in connection.c (test_status_callback)
Since Connector/C is not able to retrieve
error strings for server error codes, the following
error codes were replaced:
- ER_NET_PACKET_TOO_LARFE by CR_NET_PACKET_TOO_LARGE
- ER_OUT_OF_RESOURCES by CR_OUT_OF_MEMORY
- ER_NET_WRITE_ERROR by CR_ERR_NET_WRITE (new constant)
- ER_NET_UNCOMPRESS_ERROR by CR_ERR_NET_UNCOMPRESS (new constant)
ZSTD compression is now supported for connections
to a MySQL Server 8.0.
Compression algorithms are supported via compression
plugins, which can be found in plugins/compress.
- For reconnection/and multi host tests specify also socket location,
since mtr doesn't use default socket for localhost connections
- parse_connection_string now returns NULL for empty password in
curly braces
host parameter of mysql_real_connect (and corresponding configuration
settings MYSQL_OPT_HOST for mysql_options() api call and host key in
configuration files) now accepts to specify multiple hosts and ports.
When establishing a connection, the list of specified hosts is run
through until a connection can be established. If no connection
can be established to any of the specified hosts, an error is returned.
Specifications for multiple hosts/ports:
- hostname and port must be seperated by a colon (:)
- IPv6 addresses must be enclosed within square brackets
- hostname:port pairs must be be seperated by a comma (,)
- if only one host:port was specified, the host string needs to end
with a comma.
- if no port was specified, the default port will be used.
Examples for failover host string:
host=[::1]:3306,192.168.0.1:3306,test.example.com
host=localhost:3306,