SDO_AGGR_MBR on set of points causes error (e.g. ORA-00600)
Hi all,
I have a very weird behaviour of the SDO_AGGR_MBR spatial function on a set of 28 3D points (type 3001).
I have following SQL:
---
select SDO_AGGR_MBR(MYVIEW.GEO) BBOX from MYVIEW MYVIEW
where (MYVIEW.C01, MYVIEW.C02) in (select C01, C02 from TEMP_WAHL_FFMKANAL where CTAB = 'MYVIEW')
---
Table TEMP_WAHL_FFMKANAL serves as a selection table and contains 28 keys for the objects stored in view MYVIEW. MYVIEW is basically a compound view over a few tables combined by "union all" (Actually it is a bit more complicated, but nothing too exotic).
The point geometries involved look like the following, for example:
SDO_GEOMETRY(3001, NULL, SDO_POINT_TYPE(3478208,204, 5553520,873, 0), NULL, NULL)
SDO_GEOMETRY(3001, NULL, SDO_POINT_TYPE(3478212,99, 5553517,236, 100,73), NULL, NULL)
(Note that decimal delimiter is komma.)
So what happens:
When executing this very same statement three things can happen, changing from time to time and session to session:
a) I get a wrong result:
SDO_GEOMETRY(3001, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY(3465139,536, 5550419,032, 95,76))
I get a point (type 3001) back, although a set of 28 different points should of course return a rectangle.
b) I get an error message:
ORA-00600: internal error code, arguments: [kope2_readstr232], [5], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [19703], [14], [], [], [], [], [], [], [], [], [], []
c) I get another error message:
ORA-13033: Ungültige Daten in SDO_ELEM_INFO_ARRAY in Objekt SDO_GEOMETRY
ORA-06512: in "MDSYS.SDO_3GL", Zeile 1977
ORA-06512: in "MDSYS.SDO_GEOM", Zeile 2364
ORA-06512: in "MDSYS.SDO_GEOM", Zeile 2487
ORA-06512: in "MDSYS.SDOAGGR", Zeile 41
ORA-06512: in "MDSYS.AGGRMBR", Zeile 14
If I slightly alter the SQL, run it, and change back to the original SQL and run that then I suddenly get another of the three above behavirous. Really wild ... Oracle is not deterministic!
This behaviour has been reported on two differnt servers of Oracle 11.2 with either JDBC or Benthic Golden SQL editor as client, f.e.:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Executed on Win7 64 Bit.
But wait, it gets even more strange! I now did the following:
---
create table temp_test as (
select GEO from MYVIEW
where (MYVIEW.C01, MYVIEW.C02) in (select C01, C02 from TEMP_WAHL_FFMKANAL where CTAB = 'MYVIEW')
);
select SDO_AGGR_MBR(GEO) BBOX from temp_test;
drop table temp_test;
---
Guess what? If I let SDO_AGGR_MBR(GEO) run over just this freshly created table containing the same 28 points, it gives the correct result:
SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARRAY(3478208,204, 5553514,065, 0, 3478289,281, 5553556,09, 101,63))
This leaves me with the impression that Oracle has a problem with the view MYVIEW when using the SDO_AGGR_MBR function.
Does anybody have an idea what's wrong here? Is this really an Oracle bug?