Kathey Marsden wrote:
With derby client, if I do a select and the exception occurs on the
third row, I do not get the first two rows of data. With embedded I
get the first two rows. I assume this is because client prefetches the
data, but I wonder if client should report the first two rows of data as
well.
Does anyone have thoughts on whether this is a bug with client or just
an expected behaviour difference?
I can see that it can be argued that client and embedded should behave
the samein this case, but I do not think that one can say that one
behavior is more correct than the other. (Especially in your example
where the query does not require any particular ordering of the records.)
--
Øystein
Thanks
Kathey
Below is an example.
ij version 10.3
ij> connect 'jdbc:derby:wombat'
;
ij> create table test (D DATE, C CHAR(60));
0 rows inserted/updated/deleted
ij> insert into test values(null,null);
1 row inserted/updated/deleted
ij> insert into test values(CURRENT_DATE,CURRENT_DATE);
1 row inserted/updated/deleted
ij> insert into test values(CURRENT_DATE,'aa');
1 row inserted/updated/deleted
i
with embedded I get two rows before the exception
ij> select NULLIF(D,C) from test;
1
----------
NULL
NULL
ERROR 22007: The syntax of the string representation of a datetime value
is incorrect.
With client the error comes up right away and we don't get results for
the first two rows.
ij> select NULLIF(D,C) from test;
ERROR 22007: The syntax of the string representation of a datetime value
is incorrect.