php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65693
Patch batch-query-fix revision 2013-09-18 05:10 UTC by ken-phpbugs at norganna dot com

Patch batch-query-fix for MSSQL related Bug #65693

Patch version 2013-09-18 05:10 UTC

Return to Bug #65693 | Download this patch
Patch Revisions:

Developer: ken-phpbugs@norganna.com

diff -aur php-5.5.3-orig/ext/mssql/php_mssql.c php-5.5.3/ext/mssql/php_mssql.c
--- php-5.5.3-orig/ext/mssql/php_mssql.c	2013-08-20 14:46:43.000000000 +1000
+++ php-5.5.3/ext/mssql/php_mssql.c	2013-09-18 14:42:55.316821157 +1000
@@ -360,7 +360,8 @@
 	mssql_result *result = (mssql_result *)rsrc->ptr;
 
 	_free_result(result, 1);
-	dbcancel(result->mssql_ptr->link);
+	if (result->lastresult == FAIL || result->lastresult == NO_MORE_ROWS)
+		dbcancel(result->mssql_ptr->link);
 	efree(result);
 }
 /* }}} */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 15:01:29 2024 UTC