Temp table bug?
Posted in 1995
On an RS6000, running AIX,
we are using the following Informix releases:
INFORMIX-SQL Version 4.10.UD2
INFORMIX-4GL Version 4.10.UD3
INFORMIX-OnLine Version 4.10.UE4
Users are occasionally getting the following fatal error in a 4GL application:
Date: 02/24/1995 Time: 09:49:34
Program error at "rpbida10.4gl", line number 2507.
SQL statement error number -242.
Could not open database table (spd.tmp_704).
SYSTEM error number -101.
ISAM error: file is not open.
Those two error numbers indicate:
-242 Could not open database table (tablename).
The database engine is unable to begin reading a table. Check the
accompanying ISAM error code for more information. There may be
a problem with file permissions, or a hardware error, or the system
catalog may have been corrupted. Unless the ISAM error code or an
operating system message points to another cause, run the bcheck
utility to verify file integrity.
-101 ISAM error: file is not open.
The ISAM processor has been asked to use an unopened file (table).
C-ISAM programs: The program has tried to use a file before opening
it with a call to isopen, or has tried to write to a file that was opened
read-only. SQL products: Should not occur; note the circumstances
and contact Informix Technical support.
The 4GL program line that causes the error is at the INSERT statement
listed below,
CREATE TEMP TABLE tmp_704 (rb_id INTEGER,
rl_id INTEGER,
quantity DECIMAL(16,4),
exch_ext_price DECIMAL(17,4),
old_select CHAR(1),
new_select CHAR(1))
DECLARE tmp_tbl_curs CURSOR WITH HOLD FOR
SELECT rb_id,
rl_id,
quantity,
exch_ext_price,
old_select
FROM tmp_704
WHERE rl_id = mre_detail.rl_id
AND new_select = "1"
INSERT INTO tmp_704
SELECT rp_bid_line_704.rb_id,
rp_bid_line_704.rl_id,
rp_bid_line_704.quantity,
(((rp_bid_line_704.unit_price
* mre_detail.qty_comm)
+ rp_bid_line_704.other_price
) / rp_bid_mast_678.exchange_rate),
rp_bid_line_704.selected,
"1"
FROM rp_bid_line_704,
rp_bid_mast_678,
rp_head_line_700,
rp_head_675
WHERE rp_bid_line_704.rl_id = mre_detail.rl_id
AND rp_bid_mast_678.rb_id = rp_bid_line_704.rb_id
AND rp_head_line_700.rl_id = rp_bid_line_704.rl_id
AND rp_head_675.rp_id = rp_head_line_700.rp_id
AND selected ="B"
The function that calls this routine also later calls a routine to drop the
temp table.
Any know problems with TEMP table creation, manipulation, deletion that
could cause this fatal error?
--
Colin McGrath Internet: cmm@trac3000.ueci.com
Raytheon Engineers & Constructors Inc. UUCP: ..!uunet!trac2000!trac3000!cmm
30 S. 17th St Voice: 215-422-4144
Philadelphia, PA, 19101 FAX: 215-422-1445
<Standard disclaimers apply>