[MDEV-10371] Check constraints on INSERT on non-specified virtual columns not checked when NULL is allowed Created: 2016-07-13 Updated: 2017-03-22 Resolved: 2017-03-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Virtual Columns |
| Affects Version/s: | 10.2.1 |
| Fix Version/s: | 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Anders Karlsson | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | 10.2-ga | ||
| Issue Links: |
|
||||||||
| Description |
|
When there is a CHECK constraint on a virtual column that allows NULL and the column is not specified in an INSERT, then the constraint is not checked:
The following fails, which is correct:
The following succeeds, which is also correct:
The following though is also successful, which is incorrect (c2 will have the value 2):
|
| Comments |
| Comment by Sergei Golubchik [ 2017-03-22 ] |
|
Same as |