Skip to content

Commit

Permalink
Fix bug in mariadb async for mysql_close()
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Feb 7, 2016
1 parent 4dea661 commit e004b54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deps/mariadb-client-library/libmariadb.c.patch
@@ -1,12 +1,13 @@
@@ -2192,6 +2192,16 @@
@@ -2192,6 +2192,17 @@
my_free(mysql->options.extension->ssl_crlpath, MYF(MY_ALLOW_ZERO_PTR));
if(hash_inited(&mysql->options.extension->connect_attrs))
hash_free(&mysql->options.extension->connect_attrs);
+ {
+ struct mysql_async_context *ctxt;
+ if ((ctxt = mysql->options.extension->async_context) != 0) {
+ //if (ctxt->active==0) {
+ my_context_destroy(&ctxt->async_context);
+ if (&ctxt->async_context)
+ my_context_destroy(&ctxt->async_context);
+ my_free((gptr)ctxt, MYF(0));
+ mysql->options.extension->async_context=NULL;
+ //}
Expand All @@ -15,7 +16,7 @@
}
my_free((gptr)mysql->options.extension, MYF(MY_ALLOW_ZERO_PTR));
/* clear all pointer */
@@ -2256,6 +2266,36 @@
@@ -2256,6 +2267,36 @@

/* reset the connection in all active statements
todo: check stmt->mysql in mysql_stmt* functions ! */
Expand Down

0 comments on commit e004b54

Please sign in to comment.