Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL)
-
Linux
-
10.1.6-2
Description
Reproduction:
1) Create table
CREATE TABLE `table2` (
|
`i1` INT(10) UNSIGNED NOT NULL,
|
`d1` TIMESTAMP NULL DEFAULT NULL
|
) ENGINE=INNODB;
|
2) Fill table
INSERT INTO table2 (i1) VALUES (1), (2), (3), (4), (5);
|
3) Try Alter table with making field `d1` not nullable with default value CURRENT_TIMESTAMP
ALTER TABLE `table2`
|
CHANGE `d1` `d1` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
|
Error happens here:
Error Code: 1138
|
Invalid use of NULL value
|
Expected that column `d1` will be filled with NOW() value
SELECT @@sql_mode
|
@@sql_mode
|
---------------------------------------------------------------------------------------------------------------------------
|
NO_BACKSLASH_ESCAPES,STRICT_ALL_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
In continue bug https://mariadb.atlassian.net/browse/MDEV-6880 but also needed with already created fields.
Attachments
Issue Links
- relates to
-
MDEV-12586 ALTER TABLE…ALGORITHM=INPLACE fails with non-constant DEFAULT values
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.0.20 [ 19201 ] | |
Assignee | Jan Lindström [ jplindst ] | |
Labels | upstream |
Sprint | 10.1.6-2 [ 7 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Component/s | Storage Engine - XtraDB [ 10135 ] | |
Fix Version/s | 10.0.21 [ 19406 ] | |
Fix Version/s | 10.1.6 [ 19401 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 70348 ] | MariaDB v4 [ 149315 ] |