Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58228 invoked by uid 1010); 23 Oct 2007 22:30:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58211 invoked from network); 23 Oct 2007 22:30:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2007 22:30:05 -0000 X-Host-Fingerprint: 80.197.188.103 0x50c5bc67.odnxx5.adsl-dhcp.tele.dk Received: from [80.197.188.103] ([80.197.188.103:22375] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/90-03376-CE57E174 for ; Tue, 23 Oct 2007 18:30:05 -0400 Message-ID: <61.90.03376.CE57E174@pb1.pair.com> To: internals@lists.php.net Reply-To: "Lars Westermann" References: <471E7442.4070409@daylessday.org> Date: Wed, 24 Oct 2007 00:30:18 +0200 Lines: 93 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original X-Posted-By: 80.197.188.103 Subject: Re: [PHP-DEV] Interbase bugfixes From: Lars.Westermann@privat.dk ("Lars Westermann") Hi For ibase_query.c the unified diff is: diff -u -r1.23.2.1.2.10 ibase_query.c --- ibase_query.c 7 Jun 2007 08:59:00 -0000 1.23.2.1.2.10 +++ ibase_query.c 23 Oct 2007 18:18:28 -0000 @@ -144,8 +144,13 @@ } if (ib_query->stmt) { IBDEBUG("Dropping statement handle (free_query)..."); - if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)) { - _php_ibase_error(TSRMLS_C); + /* Bugfix #39397: Only free statement if db-connection is still open */ + char db_items[] = {isc_info_page_size}, res_buf[40]; + if (SUCCESS == isc_database_info(IB_STATUS, &ib_query->link->handle, + sizeof(db_items), db_items, sizeof(res_buf), res_buf)) { + if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)) { + _php_ibase_error(TSRMLS_C); + } } } if (ib_query->in_array) { @@ -302,6 +307,12 @@ static char info_type[] = {isc_info_sql_stmt_type}; char result[8]; + /* Bugfix #32143: Crashing IBserver 7 with empty querystring */ + if (*query == '\0') { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Querystring empty."); + return FAILURE; + } + ib_query->link = link; ib_query->trans = trans; ib_query->result_res_id = 0; @@ -1288,9 +1299,23 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{ */ int scale, int flag TSRMLS_DC) { - static ISC_INT64 const scales[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 100000000, 1000000000, - 1000000000, LL_LIT(10000000000),LL_LIT(100000000000),LL_LIT(10000000000000),LL_LIT(100000000000000), - LL_LIT(1000000000000000),LL_LIT(1000000000000000),LL_LIT(1000000000000000000) }; + static ISC_INT64 const scales[] = { 1, 10, 100, 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000, + LL_LIT(10000000000), + LL_LIT(100000000000), + LL_LIT(1000000000000), + LL_LIT(10000000000000), + LL_LIT(100000000000000), + LL_LIT(1000000000000000), + LL_LIT(10000000000000000), + LL_LIT(100000000000000000), + LL_LIT(1000000000000000000) + }; switch (type & ~1) { unsigned short l; "Antony Dovgal" skrev i en meddelelse news:471E7442.4070409@daylessday.org... > On 24.10.2007 02:11, Lars Westermann wrote: >> Hi! >> >> I've had a long mail-dialogue with Wez regarding bugfixes for the >> Interbase >> modules (the old interbase and the new PDO version). In the PHP_5_3 >> branch I >> have worked on the files mentioned below. As these files aren't changed >> from >> the PHP_5_2 branch, the bugfixes will easily go into the PHP_5_2 branch >> as >> well. >> >> I have attached the file for someone to review/comment before I commit >> anything. > > Please attach unified diffs (diff -u), not the patched files. > Also separate diffs for each bug (with comments) are very welcome. > > -- > Wbr, > Antony Dovgal