"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)E8W1O<[EMAIL PROTECTED]<9&5V7'!H<"US<F-<
M97AT7"[EMAIL PROTECTED](&EN=&5R8F%S92]I8F%S95]Q=65R>2YC"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!O<VET;W)Y+W!H<"US<F,O
M97AT+VEN=&5R8F%S92]I8F%S95]Q=65R>2YC+'8*<F5T<FEE=FEN9R!R979I
M<VEO;B Q+C(S+C(N,2XR+C$P"[EMAIL PROTECTED]@+7(Q+C(S+C(N,2XR+C$P(&EB
M87-E7W%U97)Y+F,*+2TM(&EN=&5R8F%S92]I8F%S95]Q=65R>2YC"3<@2G5N
M(#(P,#<@,[EMAIL PROTECTED],# @+3 P,# ),2XR,RXR+C$N,BXQ, HK*RL@:6YT97)B
M87-E+VEB87-E7W%U97)Y+F,),C,@3V-T(#(P,#<@,[EMAIL PROTECTED],[EMAIL 
PROTECTED],C@@+3 P,# *
M0$ @+3$T-"PX("LQ-#0L,3,@0$ *( E]"B ):[EMAIL PROTECTED]&EB7W%U97)Y+3YS=&UT
M*2!["B )"4E"1$5"54<H(D1R;W!P:6YG('-T871E;65N="!H86YD;&[EMAIL PROTECTED]&9R
M965?<75E<GDI+BXN(BD["BT)"6EF("AI<V-?9'-Q;%]F<F5E7W-T871E;65N
M="A)0E]35$%455,L("9I8E]Q=65R>2T^<W1M="[EMAIL PROTECTED]<F]P*2D@>PHM
M"0D)7W!H<%]I8F%S95]E<G)O<BA44U)-3%-?0RD["BL)"2\J($)U9V9I>" C
M,SDS.3<Z($]N;'[EMAIL PROTECTED])E92!S=&%T96UE;G0@:[EMAIL 
PROTECTED]&(M8V]N;F5C=&EO;B!I
M<R!S=&EL;"!O<&5N("HO"BL)"6-H87(@9&)?:71E;7-;72 ]('MI<V-?:6YF
M;U]P86=E7W-I>F5]+"!R97-?8G5F6S0P73L**PD):[EMAIL PROTECTED],@/3T@
M:7-C7V1A=&%B87-E7VEN9F\H24)?4U1!5%53+" F:6)?<75E<GDM/FQI;FLM
M/FAA;F1L92P@"BL)"0D)"0D)<VEZ96]F*&[EMAIL PROTECTED]&)?:71E;7,L
M('-I>F5O9BAR97-?8G5F*2P@<F5S7V)U9BDI('L**PD)"6EF("AI<V-?9'-Q
M;%]F<F5E7W-T871E;65N="A)0E]35$%455,L("9I8E]Q=65R>2T^<W1M="P@
M1%-13%]D<F]P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$Q?
M3$E4*#$P,# P,# P,# P,# P,# I+$Q,7TQ)5"@Q,# P,# P,# P,# P,# P
M*2Q,3%],250H,3 P,# P,# P,# P,# P,# P,"[EMAIL PROTECTED]&%T:6,@25-#
M7TE.5#8T(&-O;G-T('-C86QE<UM=(#T@>R 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 )<W=I=&-H("AT>7!E("8@
=?C$I('L*( D)=6YS:6=N960@<VAO<G0@;#L*"@H`
`
end

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to