[Info-Ingres] E_OP0082 and SIGSEGV in Ingres10 -
05-11-2011
, 08:14 AM
Hi All,
Here's a beauty I've just come across in Ingres 10.
If a delete query using a not in subselect has aggregation in the subselectthen all hell breaks loose. The front end will get E_OP0082 and a SIGSEGV is generated in the back end.
I've reported this to IngresCorp and its now been given Bug No. 124351.
Try this....
1. createdb bowtest
2. sql bowtest << SQL_END
create table postal(
addr_id integer not null,
sesh_id integer not null,
pid integer not null,
addr_type integer not null,
addr_enc long varchar not null,
tinsert date not null default 'now'
);
\p\g
modify postal to btree unique on addr_id;
\p\g
SQL_END
3. sql bowtest << TRY_THIS
DELETE FROM postal WHERE addr_id NOT IN ( SELECT MAX(addr_id)
FROM postal GROUP BY pid, addr_type );
rollback
\p\g
\q
TRY_THIS
If the problem is present then the query will eventually fail with a SIGSEGV
in the errlog and at the front_end with error:
E_OP0082 consistency check
- unexpected exception occurred
Associated error messages which provide more detailed information about
the problem can be found in the error log (errlog.log)
Further note that executing with or without query flattening has no effect.
4. But this should work...
sql bowtest << TRY_THIS
create table x as
SELECT MAX(addr_id) as max_aid FROM postal GROUP BY pid, addr_type;
delete from postal where addr_id NOT IN (SELECT max_aid from x);
drop table x;
rollback
\p\g
\q
TRY_THIS
Martin Bowes |