kalle Mon Feb 23 21:21:23 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/mssql php_mssql.c
Log:
Fixed #37209 (mssql_execute with non fatal errors)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1427&r2=1.2027.2.547.2.1428&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1427 php-src/NEWS:1.2027.2.547.2.1428
--- php-src/NEWS:1.2027.2.547.2.1427 Thu Feb 19 18:33:37 2009
+++ php-src/NEWS Mon Feb 23 21:21:23 2009
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Feb 2009, PHP 5.2.9RC4
+- Fixed bug #37209 (mssql_execute with non fatal errors). (Kalle)
19 Feb 2009, PHP 5.2.9RC3
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit
linux).
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.152.2.13.2.11&r2=1.152.2.13.2.12&diff_format=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.152.2.13.2.11
php-src/ext/mssql/php_mssql.c:1.152.2.13.2.12
--- php-src/ext/mssql/php_mssql.c:1.152.2.13.2.11 Wed Dec 31 11:17:40 2008
+++ php-src/ext/mssql/php_mssql.c Mon Feb 23 21:21:23 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.152.2.13.2.11 2008/12/31 11:17:40 sebastian Exp $ */
+/* $Id: php_mssql.c,v 1.152.2.13.2.12 2009/02/23 21:21:23 kalle Exp $ */
#ifdef COMPILE_DL_MSSQL
#define HAVE_MSSQL 1
@@ -2158,11 +2158,12 @@
int num_fields;
int batchsize;
int ac = ZEND_NUM_ARGS();
+ int exec_retval;
batchsize = MS_SQL_G(batchsize);
if (ac < 1 || ac > 2 || zend_get_parameters_ex(ac, &stmt,
&skip)==FAILURE) {
- WRONG_PARAM_COUNT;
- }
+ WRONG_PARAM_COUNT;
+ }
if (ac == 2) {
skip_results = Z_BVAL_PP(skip);
}
@@ -2170,10 +2171,15 @@
ZEND_FETCH_RESOURCE(statement, mssql_statement *, stmt, -1, "MS
SQL-Statement", le_statement);
mssql_ptr=statement->link;
+ exec_retval = dbrpcexec(mssql_ptr->link);
- if (dbrpcexec(mssql_ptr->link)==FAIL || dbsqlok(mssql_ptr->link)==FAIL)
{
+ if (exec_retval == FAIL || dbsqlok(mssql_ptr->link) == FAIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "stored procedure
execution failed");
- dbcancel(mssql_ptr->link);
+
+ if (exec_retval == FAIL) {
+ dbcancel(mssql_ptr->link);
+ }
+
RETURN_FALSE;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php