cvs: php4 /ext/mysqli mysqli_api.c
| From: | Hartmut Holzgraefe | Date: | Fri, 11 Apr 2003 04:41:53 +0000 |
| Subject: | cvs: php4 /ext/mysqli mysqli_api.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20230@lists.php.net to get a copy of this message | ||
hholzgra Fri Apr 11 00:41:53 2003 EDT
Modified files:
/php4/ext/mysqli mysqli_api.c
Log:
accept possible leaks for now to make SELECTS with both bound parameters
and results again ...
Index: php4/ext/mysqli/mysqli_api.c
diff -u php4/ext/mysqli/mysqli_api.c:1.24 php4/ext/mysqli/mysqli_api.c:1.25
--- php4/ext/mysqli/mysqli_api.c:1.24 Fri Apr 11 00:30:29 2003
+++ php4/ext/mysqli/mysqli_api.c Fri Apr 11 00:41:52 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.24 2003/04/11 04:30:29 hholzgra Exp $
+ $Id: mysqli_api.c,v 1.25 2003/04/11 04:41:52 hholzgra Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -134,11 +134,16 @@
/* 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 @@
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));