mysql_list_processlists was marked as deprecated in MySQL 4.0 and not
updated anymore. It exists still in latest MySQL and MariaDB connectors.
It now supports the 4.1 protocol, using 7 instead of 5 fields.
The following functions are now marked deprecated in source:
* mysql_list_dbs
* mysql_list_tables
* mysql_list_processes
Various coverity scan fixes, including CONC-452 and CONC-453.
Special thanks to Lukas Javorsky for fixing numerous covscan
issues (This patch includes part of his pull request #126).
Coverity scan build was using the following cmake parameters:
-WITH_EXTERNAL_ZLIB=ON -DWITH_UNIT_TESTS=OFF.
CWE-416 (use after free) in dtoa.c (from netlib) is still open.
* don't abuse CONFIGURE_FILE
no need to generate ssl.c during the build
* don't skip tests when the input data is missing
if the certificate is not found it is not OK
* run-time CERT_PATH is not the same as build-time CERT_PATH
load server-cert.sha1 at run-time
* test an invalid fingerprint - it has to fail
* do not delete certificates at the end of the test
* test SSL_VERIFY_SERVER_CERT with a system CA
If ssl_verify_server_cert or MYSQL_OPT_SSL_VERIFY_SERVER_CERT option was set
without setting a local ca file, the server certificate will be checked using
the system ca store.
This might lead to an error, in case the server certificate was self signed.
In this case, the preferred way is to specify a local CA.
Tests configured for windows and ubuntu 18.04
Tests with simple password are changed for more complex password to
satisfy possible complex password requirement.
1) In case a cursor is used in a stored procedure server sends a SERVER_STATUS_CURSOR_EXISTS flag,
even if the client didn't open a cursor via mysql_stmt_attr_set. This ends in a "comands out of sync" error,
since the client is sending a COM_STMT_FETCH command while the result sets were not read before.
We check now in case server sends a SERVER_STATUS_CURSOR_EXIST flag, if the client opened a cursor before.
2) The stmt error codes weren't update for all COM_STMT* commands correctly, e.g. COM_STMT_FETCH didn't show an error even if it failed.
We now check the return code of gnutls_record_send() and gnutls_record_recv().
If GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED was returned we will loop and read/write
again until a timeout occurs or buffer was read or written.
Fixed crash in case certificate and key are stored in the same file.
Instead of reading key and cert separately we now call gnutls api function
gnutls_certificate_x509_keyfile2() to load certificate and key.
Added support for pem files which contain certificate and private key.
In case the file will contain more than one certificate or key, the first
certificate or key found will be used.
Fixed crash when server sent session tracking information with session type
SESSION_TRACK_STATE_CHANGE. In this special case the packet doesn't contain
the overall length. (see https://mariadb.com/kb/en/library/ok_packet/).
fixed length calculation for connection attributes. We now call mysql_net_store_length passing the size of the connection attribute and substract the offset of the passed buffer to determine the correct size.
if the length of the provided result buffer is equal or smaller than the converted number and
ZEROFILL FLAG is set, a truncation error will be reported.
Fix a regression in new my_atoll()/my_atoull()
to set error, if there are non-digits found in the string.
Spaces at the start and end of string are ignored (however, not between the
digits).