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/suite/parts/r/partition_bit_innodb.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/suite/parts/r/partition_bit_innodb.result')
-rw-r--r-- | mysql-test/suite/parts/r/partition_bit_innodb.result | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mysql-test/suite/parts/r/partition_bit_innodb.result b/mysql-test/suite/parts/r/partition_bit_innodb.result index 2e802d85b1f..558b5b3aae4 100644 --- a/mysql-test/suite/parts/r/partition_bit_innodb.result +++ b/mysql-test/suite/parts/r/partition_bit_innodb.result @@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT b'0', + `a` bit(1) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */ @@ -18,7 +18,7 @@ partition pa2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) NOT NULL DEFAULT b'0', + `a` bit(1) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -30,7 +30,7 @@ partition by key (a) partitions 2; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT b'0', + `a` bit(64) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(64) NOT NULL DEFAULT b'0', + `a` bit(64) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -88,7 +88,7 @@ partition by key (a) partitions 4; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT b'0', + `a` bit(1) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -102,7 +102,7 @@ alter table t2 drop primary key; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT b'0' + `a` bit(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */ @@ -114,7 +114,7 @@ alter table t2 add primary key (a); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(1) NOT NULL DEFAULT b'0', + `a` bit(1) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) @@ -133,7 +133,7 @@ partition pa4 values less than (256)); show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` bit(8) NOT NULL DEFAULT b'0', + `a` bit(8) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) @@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32)); show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` bit(8) NOT NULL DEFAULT b'0', + `a` bit(8) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) |