[MDEV-22579] No error when inserting DEFAULT(non_virtual_column) into a virtual column Created: 2020-05-15 Updated: 2020-05-18 Resolved: 2020-05-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Virtual Columns |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.5.4, 10.1.46, 10.2.33, 10.3.24, 10.4.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
I create a table with a virtual column:
Now I insert an explicit value to the virtual column, and it returns an error as expected:
Now I insert a value into the virtual column, but using DEFAULT(a) instead of an explicit value:
It inserted the record without the error. Looks wrong. Expect to get the same error. |
| Comments |
| Comment by Alexander Barkov [ 2020-05-15 ] | |||
|
Additionally, starting from 10.2, the following statement erroneously returns the error:
but if I use DEFAULT directly (instead of a binding it):
it works without errors. The variant which binds DEFAULT as a parameter should also work without errors. |