summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <df@pippilotta.erinye.com>2007-12-10 10:46:00 +0100
committerunknown <df@pippilotta.erinye.com>2007-12-10 10:46:00 +0100
commit304f5580c64ba424ae33231f93236d3fee88af48 (patch)
tree7ce9106532c1f2a4937aed14dea8d180a5640447 /mysql-test/r
parent5708df551b1a0d8658ecead65eb8f9735e597a9e (diff)
parent7d734a87bc9fb9fe0bbb44de9ade9fc54bfbb137 (diff)
downloadmariadb-git-304f5580c64ba424ae33231f93236d3fee88af48.tar.gz
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build client/mysqldump.c: Auto merged mysql-test/r/innodb_mysql.result: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/case.result20
-rw-r--r--mysql-test/r/ctype_ucs.result8
-rw-r--r--mysql-test/r/func_misc.result6
-rw-r--r--mysql-test/r/grant.result41
-rw-r--r--mysql-test/r/innodb.result30
-rw-r--r--mysql-test/r/innodb_mysql.result36
-rw-r--r--mysql-test/r/insert.result134
-rw-r--r--mysql-test/r/join_outer_innodb.result4
-rw-r--r--mysql-test/r/key.result45
-rw-r--r--mysql-test/r/log_state.result12
-rw-r--r--mysql-test/r/mysqlcheck.result25
-rw-r--r--mysql-test/r/ps.result5
-rw-r--r--mysql-test/r/status.result3
-rw-r--r--mysql-test/r/type_newdecimal.result20
14 files changed, 362 insertions, 27 deletions
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result
index 9ee64ee6dbd..d408a0b6153 100644
--- a/mysql-test/r/case.result
+++ b/mysql-test/r/case.result
@@ -1,4 +1,4 @@
-drop table if exists t1,t2;
+drop table if exists t1, t2;
select CASE "b" when "a" then 1 when "b" then 2 END;
CASE "b" when "a" then 1 when "b" then 2 END
2
@@ -200,3 +200,21 @@ CEMPNUM EMPMUM1 EMPNUM2
0.00 0 0.00
2.00 2 NULL
DROP TABLE t1,t2;
+End of 4.1 tests
+create table t1 (a int, b bigint unsigned);
+create table t2 (c int);
+insert into t1 (a, b) values (1,4572794622775114594), (2,18196094287899841997),
+(3,11120436154190595086);
+insert into t2 (c) values (1), (2), (3);
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+join t2 on t1.a=t2.c order by d;
+a d
+1 4572794622775114594
+3 11120436154190595086
+2 18196094287899841997
+select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
+join t2 on t1.a=t2.c where b=11120436154190595086 order by d;
+a d
+3 11120436154190595086
+drop table t1, t2;
+End of 5.0 tests
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 991c3bb82de..bd76f2a859f 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -811,6 +811,14 @@ quote(name)
????????
????????????????
drop table bug20536;
+set names ucs2;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set names ucs2 collate ucs2_bin;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set character_set_client= ucs2;
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
+set character_set_client= concat('ucs', substr('2', 1));
+ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
CREATE TABLE t1(a TEXT CHARSET ucs2 COLLATE ucs2_unicode_ci);
INSERT INTO t1 VALUES('abcd');
SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abcd' IN BOOLEAN MODE);
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index aa75cde0525..a7119090ec0 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -212,6 +212,12 @@ test
SELECT NAME_CONST('test', 'test');
test
test
+create table t1 (a int not null);
+insert into t1 values (-1), (-2);
+select min(a) from t1 group by inet_ntoa(a);
+min(a)
+-2
+drop table t1;
End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 0d40778d5f2..c46f29b787f 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -1194,6 +1194,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table '
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP USER mysqltest_1@localhost;
+DROP USER mysqltest_2@localhost;
use test;
CREATE TABLE t1 (f1 int, f2 int);
INSERT INTO t1 VALUES(1,1), (2,2);
@@ -1213,6 +1214,7 @@ f1 f2
REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost';
REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost';
REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost';
+DROP USER mysqltest_1@localhost;
DROP DATABASE db27878;
use test;
DROP TABLE t1;
@@ -1226,6 +1228,44 @@ drop user юзер_юзер@localhost;
grant select on test.* to очень_длинный_юзер@localhost;
ERROR HY000: String 'очень_длинный_юзер' is too long for user name (should be no longer than 16)
set names default;
+create database mysqltest;
+use mysqltest;
+grant create on mysqltest.* to mysqltest@localhost;
+create table t1 (i INT);
+insert into t1 values (1);
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+create table t2 (i INT);
+create table t4 (i INT);
+grant select, insert on mysqltest.t2 to mysqltest@localhost;
+grant insert on mysqltest.t4 to mysqltest@localhost;
+grant create, insert on mysqltest.t5 to mysqltest@localhost;
+grant create, insert on mysqltest.t6 to mysqltest@localhost;
+flush privileges;
+insert into t2 values (1);
+create table if not exists t1 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+create table if not exists t3 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't3'
+create table if not exists t4 select * from t2;
+Warnings:
+Note 1050 Table 't4' already exists
+create table if not exists t5 select * from t2;
+create table t6 select * from t2;
+create table t7 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't7'
+create table t4 select * from t2;
+ERROR 42S01: Table 't4' already exists
+create table t1 select * from t2;
+ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
+drop table t1,t2,t4,t5,t6;
+revoke create on mysqltest.* from mysqltest@localhost;
+revoke select, insert on mysqltest.t2 from mysqltest@localhost;
+revoke insert on mysqltest.t4 from mysqltest@localhost;
+revoke create, insert on mysqltest.t5 from mysqltest@localhost;
+revoke create, insert on mysqltest.t6 from mysqltest@localhost;
+drop user mysqltest@localhost;
+drop database mysqltest;
+use test;
FLUSH PRIVILEGES without procs_priv table.
RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
FLUSH PRIVILEGES;
@@ -1245,3 +1285,4 @@ CALL mysqltest1.test();
DROP DATABASE mysqltest1;
RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
FLUSH PRIVILEGES;
+End of 5.1 tests
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 4379959b60d..c04ec77846a 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -925,7 +925,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 4 NULL # Using index
explain select a,b from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL # Using index
+1 SIMPLE t1 index NULL PRIMARY 4 NULL #
explain select a,b,c from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL #
@@ -1153,14 +1153,14 @@ UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
SELECT * from t1;
a b
1 1
-102 2
-103 3
4 4
5 5
6 6
7 7
8 8
9 9
+102 2
+103 3
drop table t1;
CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
@@ -1184,7 +1184,6 @@ a b
update t1,t2 set t1.a=t1.a+100 where t1.a=101;
select * from t1;
a b
-201 1
102 2
103 3
104 4
@@ -1196,10 +1195,11 @@ a b
110 10
111 11
112 12
+201 1
update t1,t2 set t1.b=t1.b+10 where t1.b=2;
select * from t1;
a b
-201 1
+102 12
103 3
104 4
105 5
@@ -1209,34 +1209,34 @@ a b
109 9
110 10
111 11
-102 12
112 12
+201 1
update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
select * from t1;
a b
-201 1
+102 12
103 5
104 6
-106 6
105 7
+106 6
107 7
108 8
109 9
110 10
111 11
-102 12
112 12
+201 1
select * from t2;
a b
1 1
2 2
+3 13
+4 14
+5 15
6 6
7 7
8 8
9 9
-3 13
-4 14
-5 15
drop table t1,t2;
CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
@@ -1287,11 +1287,11 @@ insert into t1 (id) values (null),(null),(null),(null),(null);
update t1 set fk=69 where fk is null order by id limit 1;
SELECT * from t1;
id fk
+1 69
2 NULL
3 NULL
4 NULL
5 NULL
-1 69
drop table t1;
create table t1 (a int not null, b int not null, key (a));
insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
@@ -2420,8 +2420,8 @@ insert into t1 (b) values (1);
replace into t1 (b) values (2), (1), (3);
select * from t1;
a b
-3 1
2 2
+3 1
4 3
truncate table t1;
insert into t1 (b) values (1);
@@ -2430,8 +2430,8 @@ replace into t1 (b) values (1);
replace into t1 (b) values (3);
select * from t1;
a b
-3 1
2 2
+3 1
4 3
drop table t1;
create table t1 (rowid int not null auto_increment, val int not null,primary
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result
index 029cd049a13..a4e09887cac 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/r/innodb_mysql.result
@@ -355,13 +355,13 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 index PRIMARY,name PRIMARY 4 NULL 3 Using where
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 5
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
DROP TABLE t1,t2;
CREATE TABLE t1 (
@@ -1266,11 +1266,11 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key b
-key_len 5
+key PRIMARY
+key_len 4
ref NULL
rows 3
-Extra Using index; Using filesort
+Extra Using filesort
SELECT * FROM t1 ORDER BY b ASC, a DESC;
a b
1 1
@@ -1282,11 +1282,11 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
-key b
-key_len 5
+key PRIMARY
+key_len 4
ref NULL
rows 3
-Extra Using index; Using filesort
+Extra Using filesort
SELECT * FROM t1 ORDER BY b DESC, a ASC;
a b
2 2
@@ -1327,6 +1327,21 @@ test t1 Redundant
# - that's it, cleanup.
DROP TABLE t1;
+create table t1(a char(10) not null, unique key aa(a(1)),
+b char(4) not null, unique key bb(b(4))) engine=innodb;
+desc t1;
+Field Type Null Key Default Extra
+a char(10) NO UNI NULL
+b char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(10) NOT NULL,
+ `b` char(4) NOT NULL,
+ UNIQUE KEY `bb` (`b`),
+ UNIQUE KEY `aa` (`a`(1))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
@@ -1575,4 +1590,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
+create table t1 (a int auto_increment primary key) engine=innodb;
+alter table t1 order by a;
+Warnings:
+Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 8dbba4d454a..919aff4bfb7 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -499,4 +499,138 @@ i
2
2
DROP TABLE t1, t2;
+CREATE TABLE t1 (
+a char(20) NOT NULL,
+b char(7) DEFAULT NULL,
+c char(4) DEFAULT NULL
+);
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+SELECT * FROM t1;
+a b c
+9.999999 10 10
+1.225e-05 1.2e-05 1e-0
+0.0001225 0.00012 NULL
+0.1225 0.1225 NULL
+0.1225877 0.12259 NULL
+12.25 12.25 NULL
+12.25 12.25 12.2
+122500 122500 NULL
+12250000000 1.2e+10 NULL
+1.225e+15 1.2e+15 NULL
+5000000 5000000 NULL
+1.25e+78 1.2e+78 NULL
+1.25e-94 1.2e-94 NULL
+1.25e+203 1e+203 NULL
+1.25e-175 1e-175 NULL
+1.225 NULL 1.23
+1.37 NULL 1.37
+-1.37 NULL -1.3
+0.00187 NULL 0.00
+-0.0187 NULL -0.0
+5000 NULL 5000
+-5000 NULL -500
+DROP TABLE t1;
+CREATE TABLE t1 (
+a char(20) NOT NULL,
+b char(7) DEFAULT NULL,
+c char(5)
+);
+INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
+INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
+INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
+INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
+INSERT INTO t1(a,b) VALUES (1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b,c) VALUES (1.225e+01, 1.225e+01, 1.225e+01);
+INSERT INTO t1(a,b) VALUES (1.225e+05, 1.225e+05);
+INSERT INTO t1(a,b) VALUES (1.225e+10, 1.225e+10);
+INSERT INTO t1(a,b) VALUES (1.225e+15, 1.225e+15);
+INSERT INTO t1(a,b) VALUES (5000000e+0, 5000000e+0);
+INSERT INTO t1(a,b) VALUES (1.25e+78, 1.25e+78);
+INSERT INTO t1(a,b) VALUES (1.25e-94, 1.25e-94);
+INSERT INTO t1(a,b) VALUES (1.25e+203, 1.25e+203);
+INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
+INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
+INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
+INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
+INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
+INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
+SELECT * FROM t1;
+a b c
+9.999999 10 9.999
+1.225e-05 1.2e-05 1e-05
+0.0001225 0.00012 NULL
+0.1225 0.1225 NULL
+0.1225877 0.12259 NULL
+12.25 12.25 NULL
+12.25 12.25 12.25
+122500 122500 NULL
+12250000000 1.2e+10 NULL
+1.225e+15 1.2e+15 NULL
+5000000 5000000 NULL
+1.25e+78 1.2e+78 NULL
+1.25e-94 1.2e-94 NULL
+1.25e+203 1e+203 NULL
+1.25e-175 1e-175 NULL
+1.225 NULL 1.225
+1.37 NULL 1.37
+-1.37 NULL -1.37
+0.00187 NULL 0.002
+-0.0187 NULL -0.01
+5000 NULL 5000
+-5000 NULL -5000
+DROP TABLE t1;
+CREATE TABLE t (a CHAR(10),b INT);
+INSERT INTO t VALUES (),(),();
+INSERT INTO t(a) SELECT rand() FROM t;
+DROP TABLE t;
+CREATE TABLE t1 (c1 INT NOT NULL);
+INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500),
+('4188.32999999999992724042385816574096679687500'), (4188);
+SELECT * FROM t1;
+c1
+4188
+4188
+4188
+CREATE TABLE t2 (c1 BIGINT);
+INSERT INTO t2 VALUES('15449237462.0000000000');
+SELECT * FROM t2;
+c1
+15449237462
+DROP TABLE t1, t2;
End of 5.0 tests.
diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result
index e8a2d6f668b..24a11b12b03 100644
--- a/mysql-test/r/join_outer_innodb.result
+++ b/mysql-test/r/join_outer_innodb.result
@@ -8,12 +8,12 @@ EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t1 index PRIMARY,name PRIMARY 4 NULL 3 Using where
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
EXPLAIN
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
WHERE t1.name LIKE 'A%' OR FALSE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 5
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
DROP TABLE t1,t2;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 3db5e926d30..fcc09a0244d 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -530,6 +530,51 @@ ORDER BY c.b, c.d
a b c d e f g h i j a b c d
2 2 1 2004-11-30 12:00:00 1 0 0 0 0 0 2 3388000 -553000 NULL
DROP TABLE t1, t2;
+create table t1(a int not null, key aa(a),
+b char(10) not null, unique key bb(b(1)),
+c char(4) not null, unique key cc(c));
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` char(10) NOT NULL,
+ `c` char(4) NOT NULL,
+ UNIQUE KEY `cc` (`c`),
+ UNIQUE KEY `bb` (`b`(1)),
+ KEY `aa` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a int not null, key aa(a),
+b char(10) not null, unique key bb(b(1)),
+c char(4) not null);
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO NULL
+alter table t1 add unique key cc(c);
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO MUL NULL
+b char(10) NO UNI NULL
+c char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` char(10) NOT NULL,
+ `c` char(4) NOT NULL,
+ UNIQUE KEY `cc` (`c`),
+ UNIQUE KEY `bb` (`b`(1)),
+ KEY `aa` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+End of 5.0 tests
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT);
INSERT INTO t1 VALUES (), (), ();
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index b0ec0d25935..8ecfe3b2094 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -237,4 +237,16 @@ SELECT @@slow_query_log, @@log_slow_queries;
1 1
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+set @old_general_log_file= @@global.general_log_file;
+set @old_slow_query_log_file= @@global.slow_query_log_file;
+set global general_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
+set global general_log_file= NULL;
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL'
+set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master'
+set global slow_query_log_file= NULL;
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL'
+set global general_log_file= @old_general_log_file;
+set global slow_query_log_file= @old_slow_query_log_file;
End of 5.1 tests
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index b8ada0adff9..047b2662b1b 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
drop view if exists v1;
drop database if exists client_test_db;
mysql.columns_priv OK
@@ -57,4 +57,27 @@ test.t1 OK
test.t1 OK
drop view v1;
drop table t1;
+create table `t``1`(a int);
+create table `t 1`(a int);
+test.t 1 OK
+test.t`1 OK
+drop table `t``1`, `t 1`;
End of 5.0 tests
+create table t1(a int);
+create view v1 as select * from t1;
+show tables;
+Tables_in_test
+t1
+v1
+show tables;
+Tables_in_test
+t1
+#mysql50#v-1
+v1
+show tables;
+Tables_in_test
+t1
+v1
+v-1
+drop view v1, `v-1`;
+drop table t1;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 9d0906ad5e7..ae68f8a4c5e 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -1143,6 +1143,11 @@ a
13
DEALLOCATE PREPARE st1;
DROP TABLE t1;
+create table t1 (a int, b tinyint);
+prepare st1 from 'update t1 set b= (str_to_date(a, a))';
+execute st1;
+deallocate prepare st1;
+drop table t1;
End of 4.1 tests.
create table t1 (a varchar(20));
insert into t1 values ('foo');
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index db75044ee5d..c95b09597fc 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -8,6 +8,8 @@ VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 2
TABLE_LOCKS_WAITED 0
SET SQL_LOG_BIN=0;
+set @old_general_log = @@global.general_log;
+set global general_log = 'OFF';
drop table if exists t1;
create table t1(n int) engine=myisam;
insert into t1 values(1);
@@ -20,6 +22,7 @@ show status like 'Table_locks_waited';
Variable_name Value
Table_locks_waited 1
drop table t1;
+set global general_log = @old_general_log;
select 1;
1
1
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index 24be10a7a29..71be41b106f 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -1509,6 +1509,26 @@ SELECT 1 FROM t1 GROUP BY @b := @a, @b;
1
1
DROP TABLE t1;
+CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+Warnings:
+Note 1265 Data truncated for column 'f1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+f1 decimal(31,30) NO 0.000000000000000000000000000000
+SELECT f1 FROM t1;
+f1
+0.123456789012345678901234567890
+DROP TABLE t1;
+CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+f1 decimal(59,30) NO 0.000000000000000000000000000000
+SELECT f1 FROM t1;
+f1
+99999999999999999999999999999.999999999999999999999999999999
+DROP TABLE t1;
End of 5.0 tests
select cast(143.481 as decimal(4,1));
cast(143.481 as decimal(4,1))