@@ -1080,8 +1080,6 @@ PHP_FUNCTION(ibase_query)
10801080 zend_resource * trans_res = NULL ;
10811081 ibase_db_link * ib_link = NULL ;
10821082 ibase_trans * trans = NULL ;
1083- ibase_query ib_query = { NULL , NULL , 0 , 0 };
1084- ibase_result * result = NULL ;
10851083
10861084 RESET_ERRMSG ;
10871085
@@ -1117,13 +1115,13 @@ PHP_FUNCTION(ibase_query)
11171115 if (SUCCESS == zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (),
11181116 "ls" , & l , & query , & query_len ) && l == PHP_IBASE_CREATE ) {
11191117 isc_db_handle db = 0 ;
1120- isc_tr_handle trans = 0 ;
1118+ isc_tr_handle trh = 0 ;
11211119
11221120 if (((l = INI_INT ("ibase.max_links" )) != -1 ) && (IBG (num_links ) >= l )) {
11231121 _php_ibase_module_error ("CREATE DATABASE is not allowed: maximum link count "
11241122 "(" ZEND_LONG_FMT ") reached" , l );
11251123
1126- } else if (isc_dsql_execute_immediate (IB_STATUS , & db , & trans , (short )query_len ,
1124+ } else if (isc_dsql_execute_immediate (IB_STATUS , & db , & trh , (short )query_len ,
11271125 query , SQL_DIALECT_CURRENT , NULL )) {
11281126 _php_ibase_error ();
11291127
@@ -1143,8 +1141,9 @@ PHP_FUNCTION(ibase_query)
11431141
11441142 RETVAL_RES (zend_register_resource (ib_link , le_link ));
11451143 Z_TRY_ADDREF_P (return_value );
1146- Z_TRY_ADDREF_P ( return_value );
1144+
11471145 IBG (default_link ) = Z_RES_P (return_value );
1146+ Z_TRY_ADDREF_P (return_value );
11481147 }
11491148 return ;
11501149 }
0 commit comments