[MDEV-30468] ALTER COLUMN NOT NULL fails with "cannot convert NULL to non-constant DEFAULT" error even if default is constant when using INPLACE algorithm Created: 2023-01-25 Updated: 2023-11-28 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.3, 10.4, 10.3.37, 10.4.27, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sébastien Volle | Assignee: | Marko Mäkelä |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04.1 LTS, Ubuntu 20.04.5 LTS |
||
| Description |
|
Applying an online change for a column from NULL to NOT NULL using a constant default value fails with a "cannot convert NULL to non-constant DEFAULT".
Trying to apply a constant default before applying the NOT NULL change does not change the behavior. |
| Comments |
| Comment by Alice Sherepa [ 2023-01-25 ] | |||||||||||||
|
This seems to be a related to timestamp type (and DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP):
|