[MDEV-25891] Computed default for INVISIBLE column is ignored in INSERT Created: 2021-06-10 Updated: 2021-10-11 Resolved: 2021-10-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert |
| Affects Version/s: | 10.4.14, 10.5.9, 10.6.1, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.3.32, 10.4.22, 10.5.13, 10.6.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Anders Karlsson | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux CentOS 7.9 |
||
| Issue Links: |
|
||||||||
| Description |
|
When a table has an INVISIBLE column with a computed default, said default is only used in an INSERT if said column is not specified, but other columns are. Best illustrated with an example:
As can be seen, when doing an INSERT without specifying the columns, 0 is inserted and the defined DEFAULT is ignored. If an INSERT specifying which columns to insert though, the DEFAULT is computed appropriately. |
| Comments |
| Comment by Alice Sherepa [ 2021-06-10 ] | ||||||||||||||||
|
This is the same as Mdev-15085, which was fixed and the test was added (https://github.com/MariaDB/server/commit/2d73b58101), but then smth went wrong in https://github.com/MariaDB/server/commit/537f8594a60a1e09d6da0933b55764e0f8abbf5c merge commit and the bug is still reproducible on 10.3-10.5 | ||||||||||||||||
| Comment by Aleksey Midenkov [ 2021-09-29 ] | ||||||||||||||||
|
Please review bb-10.3-midenok | ||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-10-01 ] | ||||||||||||||||
|
| ||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-10-01 ] | ||||||||||||||||
|
OK to push! |