Subject | RE: [firebird-support] Not your typical 'gds software consistency check (284)' |
---|---|
Author | Bob Murdoch |
Post date | 2009-05-28T18:16:39Z |
Dmitry,
-----Original Message-----
Sibiryakov
investigation and was able to solve the problem. As I mentioned in
the first post, I have a stored procedure that runs multiple queries.
Logically, none of these queries could return more than a single row,
but there was one query where the engine couldn't know that based on
the query itself.
select
count(*)
from
location
where
active_flag = 'Y' and
whse_flag = 'Y' and
location_nbr = :vLocationNbr
into
:vCount;
if (vCount = 1) then
select
account_id, location_id
from
location
where
active_flag = 'Y' and
whse_flag = 'Y' and
location_nbr = :vLocationNbr
into
:actual_account_id, :location_id;
The second query was the problem. As you can see, the first query
checks to make sure that there is only one row, and if so the second
query runs to pull the information from that row. However, when only
looking at the query itself, there is no way to know. I fixed the
problem by changing that second query to "select first 1", and all is
well.
Not sure if that helps with the bug report and subsequent fix, but
figured I would share anyway.
Bob M..
-----Original Message-----
> From: firebird-support@yahoogroups.com[mailto:firebird-support@yahoogroups.com] On Behalf Of Dimitry
Sibiryakov
> Sent: Monday, May 11, 2009 4:58 PMconsistency check (284)'
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Not your typical 'gds software
>> I'm running FB 2.1.2.18118 on Win2003 in classic mode. I have aI was unable to locate the 2.1.3 snapshot, but I did a little more
>> Dialect 1 database that was backed up by FB1.5 and restored on this
>> server, so that is has an ODS of 11.1.
> Did you pass through "fix metadata character set" procedure as
>described in installation manual?
> Did you try 2.1.3 snapshot?
investigation and was able to solve the problem. As I mentioned in
the first post, I have a stored procedure that runs multiple queries.
Logically, none of these queries could return more than a single row,
but there was one query where the engine couldn't know that based on
the query itself.
select
count(*)
from
location
where
active_flag = 'Y' and
whse_flag = 'Y' and
location_nbr = :vLocationNbr
into
:vCount;
if (vCount = 1) then
select
account_id, location_id
from
location
where
active_flag = 'Y' and
whse_flag = 'Y' and
location_nbr = :vLocationNbr
into
:actual_account_id, :location_id;
The second query was the problem. As you can see, the first query
checks to make sure that there is only one row, and if so the second
query runs to pull the information from that row. However, when only
looking at the query itself, there is no way to know. I fixed the
problem by changing that second query to "select first 1", and all is
well.
Not sure if that helps with the bug report and subsequent fix, but
figured I would share anyway.
Bob M..