1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-05 15:55:58 +03:00

- Unittests: link static library instead of dynamic

- 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
This commit is contained in:
Georg Richter
2016-03-28 10:29:55 +02:00
parent 2004962331
commit bea035a72b
18 changed files with 89 additions and 139 deletions

View File

@@ -101,7 +101,9 @@ wait_for_mysql(MYSQL *mysql, int status)
(status & MYSQL_WAIT_WRITE ? POLLOUT : 0) |
(status & MYSQL_WAIT_EXCEPT ? POLLPRI : 0);
if (status & MYSQL_WAIT_TIMEOUT)
{
timeout= mysql_get_timeout_value_ms(mysql);
}
else
timeout= -1;
do {
@@ -151,11 +153,11 @@ static int async1(MYSQL *my)
check_mysql_rc(rc, (MYSQL *)&mysql);
/* set timeouts to 300 microseconds */
default_timeout= 300;
default_timeout= 3;
mysql_options(&mysql, MYSQL_OPT_READ_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_OPT_WRITE_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "myapp");
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "myapp");
/* Returns 0 when done, else flag for what to wait for when need to block. */
status= mysql_real_connect_start(&ret, &mysql, hostname, username, password, NULL,