Wrong Result For Added Column After Table Creation in 11g (Doc ID 1106553.1)

Last updated on APRIL 06, 2015

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2.0 [Release 11.1 to 11.2]
Information in this document applies to any platform.

Symptoms

Different results are retrieved intermittently from a column that was added after the table creation with a DEFAULT value and NOT NULL constraint.


Column Name
-----------
         2
         2
         2
         2
         2
         2
-9.80E+125 ---<<<<<----- wrong result
-9.80E+125 ---<<<<<----- wrong result
-9.80E+125 ---<<<<<----- wrong result
-9.80E+125 ---<<<<<----- wrong result

Wrong results can be retrieved after doing  (select * from dual) or by (analyze table compute statistics).
The wrong values appear when there are more than one column listed in the query. If only the affected column is selected, correct values are retrieved.

The SQL trace (10046) of the statement references "ecol$":

...
select binaryDefVal, length(binaryDefVal) from ecol$ where tabobj# = :1 and colnum = :2
...

"ecol$" holds some internal information for added columns.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms