Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
Normally DEFAULT NULL is not allowed for NOT NULL columns:
MariaDB [test]> create table t1 (a int not null default null); |
ERROR 1067 (42000): Invalid default value for 'a' |
MariaDB [test]> create table t1 (a int default null primary key); |
ERROR 1067 (42000): Invalid default value for 'a' |
But this error condition is not always detected and sometimes DEFAULT NULL is silently ignored:
MariaDB [test]> create table t1 (a int default null, primary key (a)); |
Query OK, 0 rows affected (0.014 sec) |
 |
MariaDB [test]> show create table t1\G |
*************************** 1. row ***************************
|
Table: t1 |
Create Table: CREATE TABLE `t1` ( |
`a` int(11) NOT NULL, |
PRIMARY KEY (`a`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
1 row in set (0.001 sec) |
Attachments
Issue Links
- blocks
-
MDEV-29075 Changing explicit_defaults_for_timestamp within stored procedure works inconsistently
- Closed