diff options
author | Monty <monty@mariadb.org> | 2015-08-18 00:42:08 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-08-18 11:18:57 +0300 |
commit | 6b20342651bb5207b6c125d2d11b664a1bebcc41 (patch) | |
tree | 2f2e6ca60f3e45239224909eed19b907614f5054 /mysql-test/r/bigint.result | |
parent | 92fd65832727162a003647b4c48344dc9567ce84 (diff) | |
download | mariadb-git-6b20342651bb5207b6c125d2d11b664a1bebcc41.tar.gz |
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)
Diffstat (limited to 'mysql-test/r/bigint.result')
-rw-r--r-- | mysql-test/r/bigint.result | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 505d655b6bb..cc2ab456833 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -180,14 +180,14 @@ create table t1 select 1 as 'a'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(1) NOT NULL DEFAULT '0' + `a` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select 9223372036854775809 as 'a'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(19) unsigned NOT NULL DEFAULT '0' + `a` bigint(19) unsigned NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; a @@ -397,12 +397,12 @@ select -(-9223372036854775808), -(-(-9223372036854775808)); create table t1 select -9223372036854775808 bi; describe t1; Field Type Null Key Default Extra -bi bigint(20) NO 0 +bi bigint(20) NO NULL drop table t1; create table t1 select -9223372036854775809 bi; describe t1; Field Type Null Key Default Extra -bi decimal(19,0) NO 0 +bi decimal(19,0) NO NULL drop table t1; # # Bug #45360: wrong results |