Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35842 invoked by uid 1010); 24 Oct 2007 06:16:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35827 invoked from network); 24 Oct 2007 06:16:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2007 06:16:12 -0000 Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:33363] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/82-09947-B23EE174 for ; Wed, 24 Oct 2007 02:16:12 -0400 Received: from [192.168.1.34] (ppp91-76-71-20.pppoe.mtu-net.ru [91.76.71.20]) by daylessday.org (Postfix) with ESMTP id E0E8D6401B2; Wed, 24 Oct 2007 10:16:08 +0400 (MSD) Message-ID: <471EE329.1000603@daylessday.org> Date: Wed, 24 Oct 2007 10:16:09 +0400 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Lars Westermann CC: internals@lists.php.net References: <471E7442.4070409@daylessday.org> <61.90.03376.CE57E174@pb1.pair.com> In-Reply-To: <61.90.03376.CE57E174@pb1.pair.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Interbase bugfixes From: tony@daylessday.org (Antony Dovgal) On 24.10.2007 02:30, Lars Westermann wrote: > Hi > > For ibase_query.c the unified diff is: Please don't include diffs into the message body (you can try applying it now yourself to see why). It's also become completely unreadable, especially the first part of it. And some comments on WHY the diff looks like this would be appreciated ("this fixes bug #.. which happens because.. "). > 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 > -- Wbr, Antony Dovgal