diff options
| author | Georg Richter <georg@php.net> | 2004-03-16 21:43:25 +0000 |
|---|---|---|
| committer | Georg Richter <georg@php.net> | 2004-03-16 21:43:25 +0000 |
| commit | e3077eadef60213c9a1e1de425f5da7ed6366f60 (patch) | |
| tree | 759f7e19a480fd5a5f5d9c92137038a78b52f954 /ext/mysqli/mysqli.c | |
| parent | f66c62cef8d3ba4ff3fdd26e63f63819618e207b (diff) | |
| download | php-git-e3077eadef60213c9a1e1de425f5da7ed6366f60.tar.gz | |
fixed stmt->stmt->query which was removed in libmysql 4.1.2
added query buffer in internal stmt structure to copy string
after prepare
Diffstat (limited to 'ext/mysqli/mysqli.c')
| -rw-r--r-- | ext/mysqli/mysqli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index b2d71457a2..e8b1a9d9c8 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -64,11 +64,14 @@ void php_free_stmt_bind_buffer(BIND_BUFFER bbuf, int type) } for (i=0; i < bbuf.var_cnt; i++) { + + /* free temporary bind buffer */ if (type == FETCH_RESULT) { if (bbuf.buf[i].type == IS_STRING) { efree(bbuf.buf[i].val); } } + if (bbuf.vars[i]) { zval_ptr_dtor(&bbuf.vars[i]); } @@ -96,6 +99,9 @@ void php_clear_stmt_bind(STMT *stmt) php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE); php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); + if (stmt->query) { + efree(stmt->query); + } efree(stmt); return; } |
