Subject Re: After UDF exception, the current connection stops working
Author vmdd_tech
Roman,

Here is a simpler test case:

insert into test (news) values ('aaa');
insert into test (NEWS) values ('more than 80 chars are in
hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
');
insert into test (NEWS) values ('more than 80 chars are in
hereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee');


select substr(news,1,2) from test;
select substr(news,1,2) from test;

Ben




--- In Firebird-Java@yahoogroups.com, "vmdd_tech" <vmdd_tech@y...>
wrote:
> I tested with Jaybird 1.5 and I could reproduce this bug. To be
> sure this bug had nothing to do with my front-end tool, I used
> another sql front-end (hsqldb manager), and I still could reproduce
> this error.
>
> To reproduce this error consistently, my previous test case has
> to be revised as:
>
> drop table test;
> create table test (news varchar(255));
>
> Insert about 200 rows for test. Some rows have columns longer than
> 80 characters.
>
> Then, do
> select substr(news,1,2) from test;
>
> This first select will issue an exception as expected.
>
> Then issue the same sql again,
> select substr(news,1,2) from test;
>
> This time, Jaybird will complain with the following:
> java.lang.NullPointerException
> at org.firebirdsql.jdbc.field.FBField.isNull
(FBField.java:177)
> at org.firebirdsql.jdbc.FBResultSet.getField
> (FBResultSet.java:336)
> at org.firebirdsql.jdbc.FBResultSet.getObject
> (FBResultSet.java:295)
> at Venus.doShowResultset(Venus.java:4570)
> at Venus$11.run(Venus.java:4341)
> ...
>
>
> Trying to narrow down the problem, I observer that the first
> select statement caused a SQLException, but the second select
> statement does NOT cause any exception. As a result, since the
> resultset is not null, the programs tries to display it. ==>
> Error.
>
> BEn
>
>
>
>
>
>
> --- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
> <rrokytskyy@a...> wrote:
> > Hi,
> >
> > > > I have reported the bug in the substr and other string
functions
> > > > in the Firebird general group. This occurs when the string
> argument
> > > > is longer than 80 characters. This bug helps expose another
> bug
> > > > (???) in the JDBC driver.
> > >
> > > Thanks a lot for the report! I will check this bug.
> >
> > I tried to reproduce bug with JayBird 1.5 and could not. Here's
the
> > report I get from driver:
> >
> > org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544321.
> > arithmetic exception, numeric overflow, or string truncation
> >
> > Can you create a reproducable test case for JayBird 1.5?
> >
> > Thanks!
> > Roman