Subject Re: Firebird 1.5.1 SuperServer (debian sarge) crashes on select of stored proced
Author vandy899
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> > I'm having trouble with some code that worked on Interbase 6.0.
> >
> > The procedure is as follows:
> > SET TERM ## ;
> > CREATE PROCEDURE WEBSERVICE_CLIENT_INCIDENTS_I (
> <snip>
> > DECLARE VARIABLE location varchar (60);
> > BEGIN
> > BEGIN
> > location =(ADDR1 ||' '||CITY||' '||STATE||' '||POSTCODE);
> > incidentid = GEN_ID(GEN_SERVICE_INCIDENT, 0)+1;/* DONT INCR */
> > if (machinename <> '') then
> > select machineid from CLI_COMPUTERS
> > where (machine_name=:machinename) and clientid= :clientid
> > into machineid;
> > if (machineid is null) then machineid = 0;
> > select employeeid from cli_shipto S where S.LOCATIONID =
> > :locationid into employeeid;
> > END
> >
> > BEGIN
> > insert into
> > service_incidents(incidentid,startedby,clientid,employeeid,machine
> > id,deliveryid,contact,started,
> > mobile,phone,location)
> >
> > values(:incidentid,user,:clientid,:EMPLOYEEID,:MACHINEID,:DELIVERY
> > ID,:contact,'Now',:MOBILE,
> > :PHONE,:LOCATION);
> > END
> > suspend;
> > END##
> >
> > Upon "select * from WEBSERVICE_CLIENT_INCIDENTS_I ('xxx', 'xxx', 'x',
> > 'xxxx', 'xxxx', 'xx', 'xx', 'xxxxx', 'xxx', 'xxx', 'xxx')" (xs are
> > valid data in app with PHP 4.3.10 (debian) or kinterbasdb (a python
> > firebird interface). Using EXECUTE PROCEDURE doesn't help either.
> > However, if I use isql it works fine.
> >
> > Is it something I did? The log just said "terminated abnormally",
> > which doesn't tell me much... :(
> >
> > Cheers,
> >
> > Michael van der Kolff
> Couple of notes/questions:
> You don't need a begin end around an insert statement (or the other
stuff).
> Is there anything else you are doing? (that we are not being shown?)
> You are calling the generator with a "DONT INCR" comment but you are, in
> fact, incrementing from the none incremented value - why?
We're not incrementing the generator...
> Please note that WEBSERVICE_CLIENT_INCIDENTS_I is getting very close
to max
> length for object names. (you may know that already).
Yep - notice how we are not using *really* expanded names :)
Pythonesque people reckon that in the FB api, people must have been
running low on some letters on some days... :)

> Alan

Cheers,

Michael