Oracle bug 12415167, oracle12316167
drop table t1;create table t1 (c1 char(2) primary key, c2 char(1) not null);insert into t1 values ('A ','A'); select t1.c1 from t1 where t1.c1 in (select c2 from t1 union all select '0'||c2 c2 from t1);
select /*+ full(t1) */ t1.c1 from t1 where t1.c1 in (select c2 from t1 union all select '0'||c2 c2 from t1); 1st query returns no row, 2nd query return 'A'
Oracle check constraints bug?
This depends on the mechanism by which the database processes null.
1. Because null is not equal to any value, the return values of null = 'male' and null = 'female 'are all unknown.
2. the unknown response from the system is somewhat special.
1) if the unknown is obtained in the where condition, the system will return flase. For example:
Select * from table_name where 1 = null;
At this time, no results will be returned.
2) But what happens if the unknown is returned in the check constraint?
The check constraint will use this unknown to return the true value, that is, it meets the check constraint.
3. This is the origin of your question. It is worth mentioning that this is not an oracle bug. Not only does oracle handle this problem, but SqlServer, mysql, and even access have all done this.
4. I believe that after the above explanation, you will not have any questions.
---
The above is helpful to you.
How Does oracle patch known bugs?
README makes it clear that it is not a problem to back up, patch, and roll back. The production database must be backed up, So patching with minor bugs is not a problem.