Sunday, February 26, 2012

When Did a Non-Existent Rowid Cause an ORA-00600?

I was looking through some old notes today. I found some which showed a query trying to use a non-existent rowid to access a table. This caused an ORA-00600 with the following arguments:
[2846], [6], [77249], [1], [51200], [], [], []
There was no date on the notes nor any mention of an Oracle version but I decided to try it out
on an Oracle 10 database. First I created a table with 1 row and checked its rowid:

SQL> create table andrews_table
  2  as select 1 col1 from dual
  3  /

Table created.

SQL> select rowid, col1 from andrews_table
  2  /

ROWID                    COL1
------------------ ----------
AAAMl6AABAAAOtqAAA          1

SQL>

Then I checked that I could use the rowid to retrieve the row:

SQL> select col1 from andrews_table
  2  where rowid = 'AAAMl6AABAAAOtqAAA'
  3  /

      COL1
----------
         1

SQL>

Then I made a small change to the rowid and tried again:

SQL> l
  1  select col1 from andrews_table
  2* where rowid = 'BAAMl6AABAAAOtqAAA'
SQL> /
select col1 from andrews_table
                 *
ERROR at line 1:
ORA-01410: invalid ROWID

SQL>

This only produced an ORA-01410 error message. I looked in the alert log but there was no sign of an ORA-00600 message there either. So I assume that the ORA-00600 messages were produced by a bug which has since been fixed.

No comments: