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

Merge remote-tracking branch 'origin/connector_c_2.2'

This commit is contained in:
Georg Richter
2015-06-26 11:01:10 +02:00
2 changed files with 17 additions and 0 deletions

View File

@@ -2196,6 +2196,7 @@ static void mysql_close_options(MYSQL *mysql)
my_free(mysql->options.ssl_cipher);
if (mysql->options.extension)
{
struct mysql_async_context *ctxt;
my_free(mysql->options.extension->plugin_dir);
my_free(mysql->options.extension->default_auth);
my_free(mysql->options.extension->db_driver);
@@ -2205,6 +2206,12 @@ static void mysql_close_options(MYSQL *mysql)
my_free(mysql->options.extension->ssl_fp_list);
if(hash_inited(&mysql->options.extension->connect_attrs))
hash_free(&mysql->options.extension->connect_attrs);
if ((ctxt = mysql->options.extension->async_context) != 0)
{
my_context_destroy(&ctxt->async_context);
my_free(ctxt);
}
}
my_free(mysql->options.extension);
/* clear all pointer */

View File

@@ -191,9 +191,19 @@ static int async1(MYSQL *my)
return OK;
}
static int test_conc131(MYSQL *my)
{
/* this test needs to run under valgrind */
MYSQL *mysql=mysql_init(NULL);
mysql_options(mysql, MYSQL_OPT_NONBLOCK, 0);
mysql_close(mysql);
return OK;
}
struct my_tests_st my_tests[] = {
{"async1", async1, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc131", test_conc131, TEST_CONNECTION_NONE, 0, NULL, NULL},
{NULL, NULL, 0, 0, NULL, NULL}
};