]> granicus.if.org Git - php/commitdiff
fix bug #17040 ibase_close again.....
authorDaniela Mariaschi <daniela@php.net>
Sun, 12 May 2002 12:18:56 +0000 (12:18 +0000)
committerDaniela Mariaschi <daniela@php.net>
Sun, 12 May 2002 12:18:56 +0000 (12:18 +0000)
User can't close a connection if there are blobs opened.
He must close them before to not loose data....

ext/interbase/interbase.c

index 7ce0fac90be61f46073217db91c718855afa5754..10186f416aa46b48725e7d12d559f1b96bbb9f1b 100644 (file)
@@ -435,7 +435,7 @@ static void _php_ibase_free_query(ibase_query *ib_query)
                }
                isc_transaction_info(IB_STATUS, &ib_query->trans,sizeof(tr_items), tr_items, sizeof(tmp), tmp );
                /* we have the trans still open and a statement to drop? */
-               if ( !(IB_STATUS[0] && IB_STATUS[0])  &&  ib_query->stmt) {
+               if ( !(IB_STATUS[0] && IB_STATUS[1])  &&  ib_query->stmt) {
                        IBDEBUG("Dropping statement handle (free_query)...");
                        if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)){
                                _php_ibase_error();
@@ -466,7 +466,7 @@ static void _php_ibase_free_blob(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 
        if (ib_blob->bl_handle != NULL) { /* blob open*/
                if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) {
-                       _php_ibase_error();
+                       php_error(E_ERROR, "You can lose data. Close any blob after reading of writing it. Use ibase_blob_close() before calling ibase_close()");
                }
        }
        efree(ib_blob);