From: Hartmut Holzgraefe Date: Fri, 11 Apr 2003 04:41:52 +0000 (+0000) Subject: accept possible leaks for now to make SELECTS with both bound parameters X-Git-Tag: RELEASE_0_5~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e06fdaae8b27e38b6d6eb54652f1b7c3904f3d98;p=php accept possible leaks for now to make SELECTS with both bound parameters and results again ... --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index af7d6d9c06..31f3deacdd 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -134,11 +134,16 @@ PHP_FUNCTION(mysqli_bind_param) /* prevent leak if variables are already bound */ +#if HHOLZGRA_0 + /* this would prevent using both bind_param and bind_result on SELECT + queries so it is disabled for now */ if (stmt->var_cnt) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variables already bound"); efree(args); RETURN_FALSE; } +#endif + stmt->is_null = ecalloc(num_vars, sizeof(char)); bind = (MYSQL_BIND *)ecalloc(num_vars, sizeof(MYSQL_BIND)); @@ -265,11 +270,15 @@ PHP_FUNCTION(mysqli_bind_result) var_cnt = argc - start; /* prevent leak if variables are already bound */ +#if HHOLZGRA_0 + /* this would prevent using both bind_param and bind_result on SELECT + queries so it is disabled for now */ if (stmt->var_cnt) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variables already bound"); efree(args); RETURN_FALSE; } +#endif bind = (MYSQL_BIND *)ecalloc(var_cnt, sizeof(MYSQL_BIND)); stmt->bind = (BIND_BUFFER *)ecalloc(var_cnt,sizeof(BIND_BUFFER));