Subject | Not your typical 'gds software consistency check (284)' |
---|---|
Author | Bob Murdoch |
Post date | 2009-05-11T20:43:33Z |
I'm running FB 2.1.2.18118 on Win2003 in classic mode. I have a
Dialect 1 database that was backed up by FB1.5 and restored on this
server, so that is has an ODS of 11.1. This database has been running
on FB2.1 for the past week without any issues.
I started receiving the 'internal gds software consistency check
(cannot restore singleton select data (284), file: rse.cpp line:
3426)' last night, and tracked it down to a stored procedure that has
been running in production for well over a year. I have read the
description of the cause of this error, and can definitely say that it
does not apply to this situation.
The procedure in question is called from another procedure, and
basically parses out a string value into it's component parts. This
process runs without throwing the error if exit #1 is in the code
below, but fails if only exit #2 is present. I therefore know that
the problem is with the " if (vLocationNbr is not NULL) then begin"
statement.
The strange thing is that vLocationNbr is NULL in the cases I looked
at, so this block of code shouldn't even be running.
(BTW, "substr" is a UDF)
CREATE OR ALTER PROCEDURE ADD_ JOURNAL_TYPE_34(
TRANSACTION_JOURNAL_ID INTEGER,
ACCOUNT_ID INTEGER,
DETAILS VARCHAR(100),
EMP_NBR VARCHAR(10))
RETURNS (
WHSE_PROCESS_AREA_ID INTEGER,
LOCATION_ID INTEGER,
ACTUAL_ACCOUNT_ID INTEGER)
AS
declare vLocationStr char(3);
declare vLocationNbr integer;
declare vNewFlag char(1);
declare vCount integer;
declare vTypeCode char;
declare vRefNbr varchar(20);
declare vSku varchar(20);
declare vBegCard varchar(10);
declare vEndCard varchar(10);
declare vPrinter varchar(10);
begin
whse_process_area_id = 23;
location_id = NULL;
actual_account_id = NULL;
vLocationStr = substr(:details, '', 3, 3);
select first 1
l.location_id, l.account_id
from
hub_receipt_code hr
join location_group g on (g.hub_id = hr.hub_id)
join location l on (l.location_group_id = g.location_group_id)
where
(
(:account_id = 2 and l.account_id = 2) or
(:account_id <> 2 and l.account_id <> 2)
) and
l.active_flag = 'Y' and
l.whse_flag = 'Y' and
hr.hub_code = :vLocationStr
into
:location_id, :actual_account_id;
vLocationNbr = NULL;
if (location_id is NULL) then begin
vLocationNbr = NULL;
begin
vLocationNbr = cast(vLocationStr as integer);
when any do
vLocationNbr = NULL;
end
end
EXIT #1 ***********************
/* If the value in vLocationStr was an integer, see if we can find
a whse with that number */
if (vLocationNbr is not NULL) then begin
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;
end
EXIT #2 ***********************
< other parsing and saving to table code omitted>
end
Any help on this is greatly appreciated. I have tried rewriting the
procedure to see if the problem was some kind of alignment issue but
that didn't fix it.
Again, this error did not exist until yesterday, and the procedure had
not been changed.
thanks,
Bob M..
[Non-text portions of this message have been removed]
Dialect 1 database that was backed up by FB1.5 and restored on this
server, so that is has an ODS of 11.1. This database has been running
on FB2.1 for the past week without any issues.
I started receiving the 'internal gds software consistency check
(cannot restore singleton select data (284), file: rse.cpp line:
3426)' last night, and tracked it down to a stored procedure that has
been running in production for well over a year. I have read the
description of the cause of this error, and can definitely say that it
does not apply to this situation.
The procedure in question is called from another procedure, and
basically parses out a string value into it's component parts. This
process runs without throwing the error if exit #1 is in the code
below, but fails if only exit #2 is present. I therefore know that
the problem is with the " if (vLocationNbr is not NULL) then begin"
statement.
The strange thing is that vLocationNbr is NULL in the cases I looked
at, so this block of code shouldn't even be running.
(BTW, "substr" is a UDF)
CREATE OR ALTER PROCEDURE ADD_ JOURNAL_TYPE_34(
TRANSACTION_JOURNAL_ID INTEGER,
ACCOUNT_ID INTEGER,
DETAILS VARCHAR(100),
EMP_NBR VARCHAR(10))
RETURNS (
WHSE_PROCESS_AREA_ID INTEGER,
LOCATION_ID INTEGER,
ACTUAL_ACCOUNT_ID INTEGER)
AS
declare vLocationStr char(3);
declare vLocationNbr integer;
declare vNewFlag char(1);
declare vCount integer;
declare vTypeCode char;
declare vRefNbr varchar(20);
declare vSku varchar(20);
declare vBegCard varchar(10);
declare vEndCard varchar(10);
declare vPrinter varchar(10);
begin
whse_process_area_id = 23;
location_id = NULL;
actual_account_id = NULL;
vLocationStr = substr(:details, '', 3, 3);
select first 1
l.location_id, l.account_id
from
hub_receipt_code hr
join location_group g on (g.hub_id = hr.hub_id)
join location l on (l.location_group_id = g.location_group_id)
where
(
(:account_id = 2 and l.account_id = 2) or
(:account_id <> 2 and l.account_id <> 2)
) and
l.active_flag = 'Y' and
l.whse_flag = 'Y' and
hr.hub_code = :vLocationStr
into
:location_id, :actual_account_id;
vLocationNbr = NULL;
if (location_id is NULL) then begin
vLocationNbr = NULL;
begin
vLocationNbr = cast(vLocationStr as integer);
when any do
vLocationNbr = NULL;
end
end
EXIT #1 ***********************
/* If the value in vLocationStr was an integer, see if we can find
a whse with that number */
if (vLocationNbr is not NULL) then begin
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;
end
EXIT #2 ***********************
< other parsing and saving to table code omitted>
end
Any help on this is greatly appreciated. I have tried rewriting the
procedure to see if the problem was some kind of alignment issue but
that didn't fix it.
Again, this error did not exist until yesterday, and the procedure had
not been changed.
thanks,
Bob M..
[Non-text portions of this message have been removed]