mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment
In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not. For example: create table t1 (a int primary key) - No default create table t2 (a int, primary key(a)) - DEFAULT 0 create table t1 SELECT .... - Default for all fields, even if they where defined as NOT NULL ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value. The patch is quite big because we had some many test cases that used CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore. Other things: - Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
This commit is contained in:
@ -25,7 +25,7 @@ insert into t2 values(fn1(2));
|
||||
SHOW CREATE TABLE test.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL DEFAULT '0',
|
||||
`a` int(11) NOT NULL,
|
||||
`blob_column` longblob,
|
||||
`vchar_column` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
|
Reference in New Issue
Block a user