summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/auto_increment.result4
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/ctype_cp1250_ch.result8
-rw-r--r--mysql-test/r/ctype_utf8.result16
-rw-r--r--mysql-test/r/federated.result27
-rw-r--r--mysql-test/r/grant.result78
-rw-r--r--mysql-test/r/insert.result2
-rw-r--r--mysql-test/r/insert_select.result4
-rw-r--r--mysql-test/r/key.result4
-rw-r--r--mysql-test/r/null.result18
-rw-r--r--mysql-test/r/null_key.result2
-rw-r--r--mysql-test/r/ps_2myisam.result2
-rw-r--r--mysql-test/r/ps_3innodb.result2
-rw-r--r--mysql-test/r/ps_4heap.result2
-rw-r--r--mysql-test/r/ps_5merge.result4
-rw-r--r--mysql-test/r/ps_6bdb.result2
-rw-r--r--mysql-test/r/ps_7ndb.result2
-rw-r--r--mysql-test/r/strict.result18
-rw-r--r--mysql-test/r/view.result2
-rw-r--r--mysql-test/r/warnings.result8
-rw-r--r--mysql-test/t/ctype_cp1250_ch.test10
-rw-r--r--mysql-test/t/ctype_utf8.test14
-rw-r--r--mysql-test/t/federated.test45
-rw-r--r--mysql-test/t/grant.test133
-rw-r--r--mysql-test/t/mysql_client_test.test4
25 files changed, 372 insertions, 41 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index afbff905699..d0058118e4c 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -232,7 +232,7 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=6;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4
update t1 set a=300 where b=7;
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
@@ -274,7 +274,7 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=13;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 9
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 9
update t1 set a=500 where b=14;
select * from t1 order by b;
a b
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index ed83dfb4b49..3f8083a0e20 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -13,7 +13,7 @@ Warnings:
Note 1050 Table 't1' already exists
insert into t1 values (""),(null);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
select * from t1;
b
diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result
index 533bfb8cb53..b55849e4e12 100644
--- a/mysql-test/r/ctype_cp1250_ch.result
+++ b/mysql-test/r/ctype_cp1250_ch.result
@@ -42,3 +42,11 @@ id str
6 aaaaaa
7 aaaaaaa
drop table t1;
+set names cp1250;
+create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
+insert into t1 values("abcdefghá");
+insert into t1 values("ááèè");
+select a from t1 where a like "abcdefghá";
+a
+abcdefghá
+drop table t1;
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 934f56877ac..9416963a9cc 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1281,6 +1281,22 @@ id tid val
42749 72 VOLNÝ ADSL
44205 72 VOLNÝ ADSL
DROP TABLE t1;
+create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
+default charset=utf8 collate=utf8_unicode_ci;
+insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
+explain select distinct a from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary
+select distinct a from t1;
+a
+e
+explain select a from t1 group by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
+select a from t1 group by a;
+a
+e
+drop table t1;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index 454790f2df6..2b44fc8bd7e 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1788,6 +1788,33 @@ length(a)
5000
drop table t1;
drop table t1;
+DROP TABLE IF EXISTS federated.test;
+CREATE TABLE federated.test (
+`i` int(11) NOT NULL,
+`j` int(11) NOT NULL,
+`c` varchar(30) default NULL,
+PRIMARY KEY (`i`,`j`),
+UNIQUE KEY `i` (`i`,`c`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+DROP TABLE IF EXISTS federated.test1;
+DROP TABLE IF EXISTS federated.test2;
+create table federated.test1 (
+i int not null,
+j int not null,
+c varchar(30),
+primary key (i,j),
+unique key (i, c))
+engine = federated
+connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
+create table federated.test2 (
+i int default null,
+j int not null,
+c varchar(30),
+key (i))
+engine = federated
+connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
+drop table federated.test1, federated.test2;
+drop table federated.test;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 7ad2a5033e9..28b99430993 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -868,3 +868,81 @@ insert into mysql.user select * from t2;
flush privileges;
drop table t2;
drop table t1;
+CREATE DATABASE mysqltest3;
+use mysqltest3;
+CREATE TABLE t_nn (c1 INT);
+CREATE VIEW v_nn AS SELECT * FROM t_nn;
+CREATE DATABASE mysqltest2;
+use mysqltest2;
+CREATE TABLE t_nn (c1 INT);
+CREATE VIEW v_nn AS SELECT * FROM t_nn;
+CREATE VIEW v_yn AS SELECT * FROM t_nn;
+CREATE VIEW v_gy AS SELECT * FROM t_nn;
+CREATE VIEW v_ny AS SELECT * FROM t_nn;
+CREATE VIEW v_yy AS SELECT * FROM t_nn WHERE c1=55;
+GRANT SHOW VIEW ON mysqltest2.v_ny TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SELECT ON mysqltest2.v_yn TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SELECT ON mysqltest2.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SHOW VIEW,SELECT ON mysqltest2.v_yy TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+SHOW CREATE VIEW mysqltest2.v_nn;
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+SHOW CREATE TABLE mysqltest2.v_nn;
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+SHOW CREATE VIEW mysqltest2.v_yn;
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn'
+SHOW CREATE TABLE mysqltest2.v_yn;
+ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn'
+SHOW CREATE TABLE mysqltest2.v_ny;
+View Create View
+v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn`
+SHOW CREATE VIEW mysqltest2.v_ny;
+View Create View
+v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn`
+SHOW CREATE TABLE mysqltest3.t_nn;
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't_nn'
+SHOW CREATE VIEW mysqltest3.t_nn;
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't_nn'
+SHOW CREATE VIEW mysqltest3.v_nn;
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+SHOW CREATE TABLE mysqltest3.v_nn;
+ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v_nn'
+SHOW CREATE TABLE mysqltest2.t_nn;
+Table Create Table
+t_nn CREATE TABLE `t_nn` (
+ `c1` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE VIEW mysqltest2.t_nn;
+ERROR HY000: 'mysqltest2.t_nn' is not VIEW
+SHOW CREATE VIEW mysqltest2.v_yy;
+View Create View
+v_yy CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_yy` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` where (`mysqltest2`.`t_nn`.`c1` = 55)
+SHOW CREATE TABLE mysqltest2.v_yy;
+View Create View
+v_yy CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_yy` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` where (`mysqltest2`.`t_nn`.`c1` = 55)
+SHOW CREATE TABLE mysqltest2.v_nn;
+View Create View
+v_nn CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_nn` AS select `t_nn`.`c1` AS `c1` from `t_nn`
+SHOW CREATE VIEW mysqltest2.v_nn;
+View Create View
+v_nn CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_nn` AS select `t_nn`.`c1` AS `c1` from `t_nn`
+SHOW CREATE TABLE mysqltest2.t_nn;
+Table Create Table
+t_nn CREATE TABLE `t_nn` (
+ `c1` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE VIEW mysqltest2.t_nn;
+ERROR HY000: 'mysqltest2.t_nn' is not VIEW
+DROP VIEW mysqltest2.v_nn;
+DROP VIEW mysqltest2.v_yn;
+DROP VIEW mysqltest2.v_ny;
+DROP VIEW mysqltest2.v_yy;
+DROP TABLE mysqltest2.t_nn;
+DROP DATABASE mysqltest2;
+DROP VIEW mysqltest3.v_nn;
+DROP TABLE mysqltest3.t_nn;
+DROP DATABASE mysqltest3;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
+DROP USER 'mysqltest_1'@'localhost';
+create user mysqltest1_thisisreallytoolong;
+ERROR HY000: Operation CREATE USER failed for 'mysqltest1_thisisreallytoolong'@'%'
+End of 5.0 tests
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 82fad8e912c..80723d68b5a 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -63,7 +63,7 @@ insert into t1 values(NULL);
ERROR 23000: Column 'id' cannot be null
insert into t1 values (1), (NULL), (2);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id' at row 2
select * from t1;
id
1
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 3e2721fc09a..89ac863b8d2 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -606,8 +606,8 @@ NULL 2 100
create table t2(No int not null, Field int not null, Count int not null);
insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 2
select * from t2;
No Field Count
0 1 100
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 0174ea45935..eea884e4294 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -159,8 +159,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
UNIQUE (c,i));
INSERT INTO t1 (c) VALUES (NULL),(NULL);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2
SELECT * FROM t1;
c i
1
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 18eb10f0673..daedfa50b80 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -97,39 +97,39 @@ Warnings:
Warning 1265 Data truncated for column 'd' at row 1
UPDATE t1 SET d=NULL;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1
INSERT INTO t1 (a) values (null);
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (1/null);
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (null),(null);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
INSERT INTO t1 (b) values (null);
ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (1/null);
ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (null),(null);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
INSERT INTO t1 (c) values (null);
ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (1/null);
ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (null),(null);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2
INSERT INTO t1 (d) values (null);
ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (1/null);
ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (null),(null);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 2
select * from t1;
a b c d
0 0000-00-00 00:00:00 0
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index 7f746a3dbd8..6eb3cf312a0 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -342,7 +342,7 @@ index (id2)
);
insert into t1 values(null,null),(1,1);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id2' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id2' at row 1
select * from t1;
id id2
NULL 0
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index aa355067d1f..205c084b71f 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1304,7 +1304,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index ea7ed9371e8..2e7c4785542 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index fe4de89d6c7..8a0da364598 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1288,7 +1288,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index bee7b2400b8..1c6e11f203c 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1330,7 +1330,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
@@ -4344,7 +4344,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index d352ec9f9e2..3546b05870a 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index 8ce4c624fbc..b1986ca62dc 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
select a,b from t1 order by a;
a b
0 two
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 08a33734910..e144eed92f5 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -997,16 +997,16 @@ ERROR 23000: Column 'col2' cannot be null
INSERT INTO t1 VALUES (103,'',NULL);
ERROR 23000: Column 'col3' cannot be null
UPDATE t1 SET col1=NULL WHERE col1 =100;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
+ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
+ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
+ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col3' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col3' at row 1
SELECT * FROM t1;
col1 col2 col3
100 hello 2004-08-20
@@ -1031,11 +1031,11 @@ ERROR HY000: Field 'col2' doesn't have a default value
INSERT INTO t1 (col1) SELECT 1;
ERROR HY000: Field 'col2' doesn't have a default value
INSERT INTO t1 SELECT 1,NULL;
-ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
+ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
INSERT IGNORE INTO t1 values (NULL,NULL);
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
INSERT IGNORE INTO t1 (col1) values (3);
Warnings:
Warning 1364 Field 'col2' doesn't have a default value
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 534065a33b6..e7e953e28d9 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1495,7 +1495,7 @@ insert into v3(b) values (10);
insert into v3(a) select a from t2;
insert into v3(b) select b from t2;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a);
select * from t1;
a b
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 59be512d5a6..283a0661721 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -72,7 +72,7 @@ drop table t1;
create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ',';
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
Warning 1265 Data truncated for column 'd' at row 3
Warning 1265 Data truncated for column 'c' at row 4
Warning 1261 Row 5 doesn't contain data for all columns
@@ -86,7 +86,7 @@ drop table t1;
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'b' at row 2
Warning 1265 Data truncated for column 'c' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
@@ -99,7 +99,7 @@ Warning 1265 Data truncated for column 'c' at row 2
alter table t1 add d char(2);
update t1 set a=NULL where a=10;
Warnings:
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
update t1 set c='mysql ab' where c='test';
Warnings:
Warning 1265 Data truncated for column 'c' at row 4
@@ -115,7 +115,7 @@ Warnings:
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'b' at row 3
-Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4
Warning 1265 Data truncated for column 'b' at row 4
insert into t2(b) values('mysqlab');
Warnings:
diff --git a/mysql-test/t/ctype_cp1250_ch.test b/mysql-test/t/ctype_cp1250_ch.test
index 2d1e5f0bf9d..65550e0c193 100644
--- a/mysql-test/t/ctype_cp1250_ch.test
+++ b/mysql-test/t/ctype_cp1250_ch.test
@@ -44,4 +44,14 @@ INSERT INTO t1 VALUES (NULL, 'aaaaaaa');
select * from t1 where str like 'aa%';
drop table t1;
+#
+# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
+#
+set names cp1250;
+create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
+insert into t1 values("abcdefghá");
+insert into t1 values("ááèè");
+select a from t1 where a like "abcdefghá";
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 77b76a14171..eb5778aafa7 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1026,6 +1026,20 @@ ALTER TABLE t1 ADD KEY idx (tid,val(11));
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNÝ ADSL';
DROP TABLE t1;
+
+#
+# Bug 20709: problem with utf8 fields in temporary tables
+#
+
+create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
+ default charset=utf8 collate=utf8_unicode_ci;
+insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
+explain select distinct a from t1;
+select distinct a from t1;
+explain select a from t1 group by a;
+select a from t1 group by a;
+drop table t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index 38beab605fd..c2218b3451b 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -1499,4 +1499,49 @@ drop table t1;
connection master;
drop table t1;
+#
+# BUG #15133: unique index with nullable value not accepted in federated table
+#
+
+connection slave;
+--disable_warnings
+DROP TABLE IF EXISTS federated.test;
+CREATE TABLE federated.test (
+ `i` int(11) NOT NULL,
+ `j` int(11) NOT NULL,
+ `c` varchar(30) default NULL,
+ PRIMARY KEY (`i`,`j`),
+ UNIQUE KEY `i` (`i`,`c`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+--enable_warnings
+
+connection master;
+--disable_warnings
+DROP TABLE IF EXISTS federated.test1;
+DROP TABLE IF EXISTS federated.test2;
+--enable_warnings
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.test1 (
+ i int not null,
+ j int not null,
+ c varchar(30),
+ primary key (i,j),
+ unique key (i, c))
+engine = federated
+connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.test2 (
+ i int default null,
+ j int not null,
+ c varchar(30),
+ key (i))
+engine = federated
+connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
+drop table federated.test1, federated.test2;
+
+connection slave;
+drop table federated.test;
+
source include/federated_cleanup.inc;
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index 73857d8ab69..cc66615039f 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -683,3 +683,136 @@ drop table t2;
drop table t1;
+
+#
+# Bug#20214: Incorrect error when user calls SHOW CREATE VIEW on non
+# privileged view
+#
+
+connection master;
+
+CREATE DATABASE mysqltest3;
+use mysqltest3;
+
+CREATE TABLE t_nn (c1 INT);
+CREATE VIEW v_nn AS SELECT * FROM t_nn;
+
+CREATE DATABASE mysqltest2;
+use mysqltest2;
+
+CREATE TABLE t_nn (c1 INT);
+CREATE VIEW v_nn AS SELECT * FROM t_nn;
+CREATE VIEW v_yn AS SELECT * FROM t_nn;
+CREATE VIEW v_gy AS SELECT * FROM t_nn;
+CREATE VIEW v_ny AS SELECT * FROM t_nn;
+CREATE VIEW v_yy AS SELECT * FROM t_nn WHERE c1=55;
+
+GRANT SHOW VIEW ON mysqltest2.v_ny TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SELECT ON mysqltest2.v_yn TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SELECT ON mysqltest2.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+GRANT SHOW VIEW,SELECT ON mysqltest2.v_yy TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
+
+connect (mysqltest_1, localhost, mysqltest_1, mysqltest_1,);
+
+# fail because of missing SHOW VIEW (have generic SELECT)
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE VIEW mysqltest2.v_nn;
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE TABLE mysqltest2.v_nn;
+
+
+
+# fail because of missing SHOW VIEW
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE VIEW mysqltest2.v_yn;
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE TABLE mysqltest2.v_yn;
+
+
+
+# succeed (despite of missing SELECT, having SHOW VIEW bails us out)
+SHOW CREATE TABLE mysqltest2.v_ny;
+
+# succeed (despite of missing SELECT, having SHOW VIEW bails us out)
+SHOW CREATE VIEW mysqltest2.v_ny;
+
+
+
+# fail because of missing (specific or generic) SELECT
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE TABLE mysqltest3.t_nn;
+
+# fail because of missing (specific or generic) SELECT (not because it's not a view!)
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE VIEW mysqltest3.t_nn;
+
+
+
+# fail because of missing missing (specific or generic) SELECT (and SHOW VIEW)
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE VIEW mysqltest3.v_nn;
+--error ER_TABLEACCESS_DENIED_ERROR
+SHOW CREATE TABLE mysqltest3.v_nn;
+
+
+
+# succeed thanks to generic SELECT
+SHOW CREATE TABLE mysqltest2.t_nn;
+
+# fail because it's not a view! (have generic SELECT though)
+--error ER_WRONG_OBJECT
+SHOW CREATE VIEW mysqltest2.t_nn;
+
+
+
+# succeed, have SELECT and SHOW VIEW
+SHOW CREATE VIEW mysqltest2.v_yy;
+
+# succeed, have SELECT and SHOW VIEW
+SHOW CREATE TABLE mysqltest2.v_yy;
+
+
+
+#clean-up
+connection master;
+
+# succeed, we're root
+SHOW CREATE TABLE mysqltest2.v_nn;
+SHOW CREATE VIEW mysqltest2.v_nn;
+
+SHOW CREATE TABLE mysqltest2.t_nn;
+
+# fail because it's not a view!
+--error ER_WRONG_OBJECT
+SHOW CREATE VIEW mysqltest2.t_nn;
+
+
+
+DROP VIEW mysqltest2.v_nn;
+DROP VIEW mysqltest2.v_yn;
+DROP VIEW mysqltest2.v_ny;
+DROP VIEW mysqltest2.v_yy;
+
+DROP TABLE mysqltest2.t_nn;
+
+DROP DATABASE mysqltest2;
+
+
+
+DROP VIEW mysqltest3.v_nn;
+DROP TABLE mysqltest3.t_nn;
+
+DROP DATABASE mysqltest3;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
+DROP USER 'mysqltest_1'@'localhost';
+
+
+
+#
+# Bug #10668: CREATE USER does not enforce username length limit
+#
+--error ER_CANNOT_USER
+create user mysqltest1_thisisreallytoolong;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test
index b61deeac001..66a27abd61a 100644
--- a/mysql-test/t/mysql_client_test.test
+++ b/mysql-test/t/mysql_client_test.test
@@ -8,8 +8,8 @@
# server or run mysql-test-run --debug mysql_client_test and check
# var/log/mysql_client_test.trace
---disable_result_log
---exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M
+--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
+--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
# End of 4.1 tests
echo ok;