summaryrefslogtreecommitdiff
path: root/ext/mysqli/php_mysqli_structs.h
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-02-27 08:45:16 +0100
committerRemi Collet <remi@php.net>2014-02-27 08:45:16 +0100
commit9137acc7ecdf1542fe6fda5056a0273359682735 (patch)
treea7d448f83390b238fcd44923935fa06c24807e21 /ext/mysqli/php_mysqli_structs.h
parentbd961f3e873f71c1408111da065d94cd0c6527d9 (diff)
downloadphp-git-9137acc7ecdf1542fe6fda5056a0273359682735.tar.gz
Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
Each new mysqli_stmt now increase the refcount of the link object. So the link is really destroy after all statements. Only implemented with libmysqlclient, as mysqlnd already implement this internally. So, libmysqlclient and mysqlnd have the same behavior.
Diffstat (limited to 'ext/mysqli/php_mysqli_structs.h')
-rw-r--r--ext/mysqli/php_mysqli_structs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index d652592707..d2fb34b908 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -116,6 +116,10 @@ typedef struct {
BIND_BUFFER param;
BIND_BUFFER result;
char *query;
+#ifndef MYSQLI_USE_MYSQLND
+ /* used to manage refcount with libmysql (already implement in mysqlnd) */
+ zend_object_handle link_handle;
+#endif
} MY_STMT;
typedef struct {