[MDEV-13596] CHECK constraints disallow NULL to pass through, violating SQL Created: 2017-08-21 Updated: 2017-09-18 Resolved: 2017-09-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert |
| Affects Version/s: | 10.2.1, 10.2 |
| Fix Version/s: | 10.2.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mike Bayer | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Given a table as follows:
the database disallows the value of "x" to be NULL:
This despite the fact that the constraint condition here evaluates to NULL:
Per SQL standard in Foundations: "4.6.6.3 Table constraints" the result here is NULL, not false; null is "unknown". The behavior is also inconsistent with that of other major databases: Postgresql:
Oracle:
|
| Comments |
| Comment by Sergei Golubchik [ 2017-08-21 ] |
|
Also, in 4.23.3.4 Table check constraints of part 2, SQL:2016
|