summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant_lowercase.test
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-18 00:42:08 +0300
committerMonty <monty@mariadb.org>2015-08-18 11:18:57 +0300
commit6b20342651bb5207b6c125d2d11b664a1bebcc41 (patch)
tree2f2e6ca60f3e45239224909eed19b907614f5054 /mysql-test/t/grant_lowercase.test
parent92fd65832727162a003647b4c48344dc9567ce84 (diff)
downloadmariadb-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/t/grant_lowercase.test')
-rw-r--r--mysql-test/t/grant_lowercase.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/t/grant_lowercase.test b/mysql-test/t/grant_lowercase.test
index 4fc5facf808..4b27b4c674d 100644
--- a/mysql-test/t/grant_lowercase.test
+++ b/mysql-test/t/grant_lowercase.test
@@ -19,13 +19,13 @@ drop user user1@localhost;
# in acl_load()
call mtr.add_suppression("Incorrect database name");
alter table mysql.host modify Db varchar(200);
-alter table mysql.db modify User char(16), modify Db varchar(200);
+alter table mysql.db modify User char(16) default "", modify Db varchar(200) default "";
insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200));
insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200));
flush privileges; # shouldn't crash here
delete from mysql.host where db like '=>%';
delete from mysql.db where db like '=>%';
-alter table mysql.host modify Db char(64);
-alter table mysql.db modify Db char(64), modify User char(80);
+alter table mysql.host modify Db char(64) default "";
+alter table mysql.db modify Db char(64) default "", modify User char(80) default "";
flush privileges;