If mariadb_stmt_execute_direct fails, we need to set the number
of parameters (obtained by response packet of mysql_stmt_prepare)
back to the number of prebinded parameters to avoid memory
overrun.
This fix also includes several adress-sanitizer bugs in unit tests
of Connector/C.
travis: use connector-test-machine test script that permit to run the following tests :
* MariaDB all supported version
* Maxscale
* MySQL
* SkySQL
If CONNECTOR_TEST_SECRET_KEY is not provided (PR) only MariaDB and MySQL community will be test
Pull request testing correction
appveyor correction using archive if not latest server release
POWER and other architectures that define char(as my_bool) to be unsigned (as the C
standard leaves this undefined). This resulted in error branches being
unreachabe as indicated by the below compile warnings.
plugins/pvio/pvio_socket.c:763:42: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
false [-Wtautological-constant-out-of-range-compare]
if (pvio_socket_blocking(pvio, 1, 0) == SOCKET_ERROR)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
plugins/pvio/pvio_socket.c:875:46: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
false [-Wtautological-constant-out-of-range-compare]
if (pvio_socket_blocking(pvio, 0, 0) == SOCKET_ERROR)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
plugins/pvio/pvio_socket.c:907:42: warning: comparison of constant -1 with expression of type 'my_bool' (aka 'char') is always
false [-Wtautological-constant-out-of-range-compare]
if (pvio_socket_blocking(pvio, 1, 0) == SOCKET_ERROR)
ma_hext2int: signed char - prevent compiler errors when char is unsigned.
libmariadb/ma_tls.c:169:31: warning: comparison of constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
if ((d1 = ma_hex2int(*p)) == - 1 ||
~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
libmariadb/ma_tls.c:170:35: warning: comparison of constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
(d2 = ma_hex2int(*(p+1))) == -1 ||
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
To fix this all the pvio_*_blocking functions have been changed to use
int as a return value.
Other my_bool/char differences fixed:
mariadb_dyncol_val_str: fix prototype to use char - like implemented function.
unittest: bind.is_null is my_bool* so we use a my_bool.
for api functions which require string with length parameter (e.g.
mysql_real_connect() or mysql_stmt_prepare() we now use the macro
SL(string) which substitutes string and string length.
- TLS/SSL: renamed HAVE_SSL to HAVE_TLS to avoid trouble in
10.2-integration
- Fixed wrong timeout in non-blocking mode
- Fixed valgrind error in prepared statement
Fixed compiler warnings in test suite
Skipped change_users tests: They don't work anymore (mysql_change_user) security fix
Applied patch from John Schember
obtain number of fields from mysql structure
added test case (ps_new.c)
- Added additional parameter cipher for mysql_ssl_set
- some cosmetics for test cases