Oracle bug 12415167, oracle12316167

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.