Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32965 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37163 invoked by uid 1010); 24 Oct 2007 14:44:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37148 invoked from network); 24 Oct 2007 14:44:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2007 14:44:49 -0000 X-Host-Fingerprint: 80.197.188.103 0x50c5bc67.odnxx5.adsl-dhcp.tele.dk Received: from [80.197.188.103] ([80.197.188.103:13906] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/2C-47805-06A5F174 for ; Wed, 24 Oct 2007 10:44:49 -0400 Message-ID: <5A.2C.47805.06A5F174@pb1.pair.com> To: internals@lists.php.net Reply-To: "Lars Westermann" References: <471E7442.4070409@daylessday.org> <61.90.03376.CE57E174@pb1.pair.com> <471EE329.1000603@daylessday.org> Date: Wed, 24 Oct 2007 16:44:39 +0200 Lines: 108 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: Interbase bugfixes - once again :) From: Lars.Westermann@privat.dk ("Lars Westermann") "Live and learn" ... Starting all over! Please find attached a unified diff (diff -u) for interbase/ibase_query.c (PHP_5_3 branch), which addresses the following bug reports: Bug #30907: (ibase_query() crashes (in fact the same bug as #32143) Bug #32143: (ibase_query() causing IBserver 7 crash with NULL param as link-id) Due to the new way of parsing parameters, the first NULL parameter in the examples is treated as the querystring (which it should be according to the documentation, as it isn't a resource). With Firebird 2 this resulted in an error stating that there is a problem with the query on line 1 column 1. In IBserver 7 I believe that this empty string causes a servercrash (I do not have access to an IBserver 7, so I can't test that). In either case I believe it is reasonable to assume, that an empty query doesn't make any sense, therefore the bugfix is to issue an error message _before_ trying to pass the query to the Interbase/Firebird API (@@ -302,6 +307,12 @@) Bug #39397: (invalid statement handle in Unknown on line 0) The error occurs when a query resource is destroyed, and the database-handle is already closed (and the statement resources in the Interbase/Firebird API therefore are already released). By checking that the statement-handle is still valid (by calling isc_database_info()), isc_dsql_free_statement() is only called when there is a valid handle. This way problems with the latter functioncall which aren't related to the handle still get reported (@@ -144,8 +144,13 @@) Bug #39056: (Interbase NUMERIC data type error) Bug #39700: (NUMERIC error when result precision are 7,8 or 12-14) Bug #42284: (duplicate of #39700) These are actually addressing the same problem, and I just took the solution given in the comment sections of the bugreports and put it into place (when lined up above each other, the errors are obvious in the original code) (@@ -1288,9 +1299,23 @@). Hope this is better! Best regards Lars begin 666 ibase_query_c-diff-u.txt M8W9S("UZ,R!D:69F("UU("AI;B!D:7)E8W1O2YC"CT]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T*4D-3(&9I;&4Z("]R97!O2YC+'8*2YC"3<@2G5N M(#(P,#<@,#@Z-3DZ,# @+3 P,# ),2XR,RXR+C$N,BXQ, HK*RL@:6YT97)B M87-E+VEB87-E7W%U97)Y+F,),C,@3V-T(#(P,#<@,3@Z,3@Z,C@@+3 P,# * M0$ @+3$T-"PX("LQ-#0L,3,@0$ *( E]"B ):68@*&EB7W%U97)Y+3YS=&UT M*2!["B )"4E"1$5"542T^PHM M"0D)7W!H<%]I8F%S95]E" C M,SDS.3F5]+"!R97-?8G5F6S0P73L**PD):68@*%-50T-%4U,@/3T@ M:7-C7V1A=&%B87-E7VEN9F\H24)?4U1!5%53+" F:6)?<75EF5O9BAR97-?8G5F*2P@2T^PHK"0D)"5]P:'!?:6)A2T^:6Y?87)R87DI('L* M0$ @+3,P,BPV("LS,#7!E?3L*( EC:&%R(')E" C,S(Q-#,Z($-R87-H:6YG($E"2!Q=65R>7-TPHK"0EP:'!?97)R;W)?9&]C7-T2XB*3L**PD)R J+PH@"6EN="!S8V%L92P@:6YT(&9L86<@5%-2 M34Q37T1#*0H@>PHM"7-T871I8R!)4T-?24Y4-C0@8V]NR Q+" Q,"P@,3 P+" Q,# P+" * M*PD),3 P,# L( HK"0DQ,# P,# L( HK"0DQ,# P,# P+" **PD),3 P,# P M,# L"BL)"3$P,# P,# P,"P@"BL)"3$P,# P,# P,# L( HK"0E,3%],250H M,3 P,# P,# P,# I+" **PD)3$Q?3$E4*#$P,# P,# P,# P,"DL"BL)"4Q, M7TQ)5"@Q,# P,# P,# P,# P*2P@"BL)"4Q,7TQ)5"@Q,# P,# P,# P,# P M,"DL( HK"0E,3%],250H,3 P,# P,# P,# P,# P*2P**PD)3$Q?3$E4*#$P M,# P,# P,# P,# P,# I+ HK"0E,3%],250H,3 P,# P,# P,# P,# P,# I M+" **PD)3$Q?3$E4*#$P,# P,# P,# P,# P,# P,"DL( HK"0E,3%],250H M,3 P,# P,# P,# P,# P,# P,"D**PE].PH@"B )7!E("8@ =?C$I('L*( D)=6YS:6=N960@