mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02: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:
parent
92fd658327
commit
6b20342651
184 changed files with 6776 additions and 6305 deletions
|
|
@ -39,14 +39,14 @@ t1 CREATE TABLE `t1` (
|
|||
`sec_to_time(12345)` time DEFAULT NULL,
|
||||
`sec_to_time(12345.6789)` time(4) DEFAULT NULL,
|
||||
`sec_to_time(1234567e-2)` time(6) DEFAULT NULL,
|
||||
`now()` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`curtime(0)` time NOT NULL DEFAULT '00:00:00',
|
||||
`utc_timestamp(1)` datetime(1) NOT NULL DEFAULT '0000-00-00 00:00:00.0',
|
||||
`utc_time(2)` time(2) NOT NULL DEFAULT '00:00:00.00',
|
||||
`current_time(3)` time(3) NOT NULL DEFAULT '00:00:00.000',
|
||||
`current_timestamp(4)` datetime(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
|
||||
`localtime(5)` datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
|
||||
`localtimestamp(6)` datetime(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`now()` datetime NOT NULL,
|
||||
`curtime(0)` time NOT NULL,
|
||||
`utc_timestamp(1)` datetime(1) NOT NULL,
|
||||
`utc_time(2)` time(2) NOT NULL,
|
||||
`current_time(3)` time(3) NOT NULL,
|
||||
`current_timestamp(4)` datetime(4) NOT NULL,
|
||||
`localtime(5)` datetime(5) NOT NULL,
|
||||
`localtimestamp(6)` datetime(6) NOT NULL,
|
||||
`time_to_sec(123456)` bigint(17) DEFAULT NULL,
|
||||
`time_to_sec('12:34:56.789')` decimal(19,3) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue