summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/not_embedded.inc2
-rw-r--r--mysql-test/r/alter_table.result4
-rw-r--r--mysql-test/r/create.result6
-rw-r--r--mysql-test/r/ctype_recoding.result1
-rw-r--r--mysql-test/r/fulltext.result1
-rw-r--r--mysql-test/r/func_group.result94
-rw-r--r--mysql-test/r/group_by.result16
-rw-r--r--mysql-test/r/innodb.result12
-rw-r--r--mysql-test/r/join_outer.result1
-rw-r--r--mysql-test/r/null_key.result2
-rw-r--r--mysql-test/r/order_by.result4
-rw-r--r--mysql-test/r/query_cache.result20
-rw-r--r--mysql-test/r/repair.result2
-rw-r--r--mysql-test/r/rpl_flush_tables.result4
-rw-r--r--mysql-test/r/union.result37
-rw-r--r--mysql-test/r/update.result5
-rw-r--r--mysql-test/t/ansi.test2
-rw-r--r--mysql-test/t/create.test10
-rw-r--r--mysql-test/t/ctype_recoding.test1
-rw-r--r--mysql-test/t/ctype_ujis.test2
-rw-r--r--mysql-test/t/fulltext.test2
-rw-r--r--mysql-test/t/innodb.test1
-rw-r--r--mysql-test/t/join_outer.test2
-rw-r--r--mysql-test/t/loaddata.test2
-rw-r--r--mysql-test/t/order_by.test2
-rw-r--r--mysql-test/t/rpl_flush_tables.test2
-rw-r--r--mysql-test/t/status.test2
-rw-r--r--mysql-test/t/subselect.test2
28 files changed, 123 insertions, 118 deletions
diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc
index 52ae026ece3..fcc1756caab 100644
--- a/mysql-test/include/not_embedded.inc
+++ b/mysql-test/include/not_embedded.inc
@@ -1,5 +1,5 @@
-- require r/not_embedded.require
disable_query_log;
-select version() like "%embedded%" as "have_embedded";
+select version() like N'%embedded%' as 'have_embedded';
enable_query_log;
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 1fe874a211c..ec2f7220a3d 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -158,8 +158,8 @@ alter table t2 rename t1, add c char(10) comment "no comment";
show columns from t1;
Field Type Collation Null Key Default Extra
i int(10) unsigned binary PRI NULL auto_increment
-c char(10) latin1_swedish_ci YES NULL
-drop table t1;
+c char(10) latin1_swedish_ci YES NULL
+drop table t1;
create table t1 (a int, b int);
insert into t1 values(1,100), (2,100), (3, 100);
insert into t1 values(1,99), (2,99), (3, 99);
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 520227c0fba..4e06c724142 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -183,18 +183,20 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
-) TYPE=HEAP
+) TYPE=HEAP CHARSET=latin1
drop table t1;
SET SESSION table_type="gemini";
SELECT @@table_type;
@@table_type
GEMINI
CREATE TABLE t1 (a int not null);
+Warnings:
+Warning 1259 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
-) TYPE=MyISAM
+) TYPE=MyISAM CHARSET=latin1
SET SESSION table_type=default;
drop table t1;
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result
index fb813e394f4..815445150cd 100644
--- a/mysql-test/r/ctype_recoding.result
+++ b/mysql-test/r/ctype_recoding.result
@@ -41,3 +41,4 @@ Field Type Collation Null Key Default Extra
поле char(32) character set koi8r koi8r_general_ci
SET CHARACTER SET koi8r;
DROP TABLE ÔÁÂÌÉÃÁ;
+SET CHARACTER SET default;
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index d87b00dd4d7..5b410396390 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -216,7 +216,6 @@ test.t1 repair status OK
select * from t1 where match (a) against ('aaaa');
a
drop table t1;
-drop table if exists t1;
create table t1 ( ref_mag text not null, fulltext (ref_mag));
insert into t1 values ('test');
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index e9fb56a77d6..99d7bd2d087 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -42,22 +42,12 @@ insert into t1 values (null,null,'');
select count(distinct a),count(distinct grp) from t1;
count(distinct a) count(distinct grp)
6 3
-select sum(all a),count(all a),avg(all a),std(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;
-sum(all a) count(all a) avg(all a) std(all a) bit_or(all a) bit_and(all a) min(all a) max(all a) min(all c) max(all c)
-21 6 3.5000 1.7078 7 0 1 6 E
-select grp, sum(a),count(a),avg(a),std(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp;
-grp sum(a) count(a) avg(a) std(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c)
-NULL NULL 0 NULL NULL 0 0 NULL NULL
-1 1 1 1.0000 0.0000 1 1 1 1 a a
-2 5 2 2.5000 0.5000 3 2 2 3 b c
-3 15 3 5.0000 0.8165 7 4 4 6 C E
-select grp, sum(a)+count(a)+avg(a)+std(a)+bit_or(a)+bit_and(a)+min(a)+max(a)+min(c)+max(c) as sum from t1 group by grp;
select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;
sum(all a) count(all a) avg(all a) std(all a) variance(all a) bit_or(all a) bit_and(all a) min(all a) max(all a) min(all c) max(all c)
21 6 3.5000 1.7078 2.9167 7 0 1 6 E
select grp, sum(a),count(a),avg(a),std(a),variance(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp;
grp sum(a) count(a) avg(a) std(a) variance(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c)
-NULL 0 0 NULL NULL NULL 0 0 NULL NULL
+NULL NULL 0 NULL NULL NULL 0 0 NULL NULL
1 1 1 1.0000 0.0000 0.0000 1 1 1 1 a a
2 5 2 2.5000 0.5000 0.2500 3 2 2 3 b c
3 15 3 5.0000 0.8165 0.6667 7 4 4 6 C E
@@ -231,47 +221,6 @@ select max(t1.a2),max(t2.a1) from t1 left outer join t2 on t1.a1=10;
max(t1.a2) max(t2.a1)
zzz BBB
drop table t1,t2;
-CREATE TABLE t1 (a int, b int);
-select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1;
-count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-0 NULL NULL NULL NULL NULL -1 0
-select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-insert into t1 values (1,null);
-select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL -1 0
-insert into t1 values (1,null);
-insert into t1 values (2,null);
-select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL 0 0
-2 0 NULL NULL NULL NULL NULL 0 0
-select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL -1 0
-2 0 NULL NULL NULL NULL NULL -1 0
-insert into t1 values (2,1);
-select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL 0 0
-2 1 1 1.0000 0.0000 1 1 0 1
-select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL -1 0
-2 1 1 1.0000 0.0000 1 1 1 1
-insert into t1 values (3,1);
-select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL 0 0
-2 1 1 1.0000 0.0000 1 1 0 1
-3 1 1 1.0000 0.0000 1 1 1 1
-select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
-a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
-1 0 NULL NULL NULL NULL NULL -1 0
-2 1 1 1.0000 0.0000 1 1 1 1
-3 1 1 1.0000 0.0000 1 1 1 1
-drop table t1;
create table t1(
a1 char(3) primary key,
a2 smallint,
@@ -613,3 +562,44 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
1 SIMPLE t2 index NULL k2 4 NULL 6 Using where; Using index
drop table t1, t2;
+CREATE TABLE t1 (a int, b int);
+select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1;
+count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+0 NULL NULL NULL NULL NULL 18446744073709551615 0
+select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+insert into t1 values (1,null);
+select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
+insert into t1 values (1,null);
+insert into t1 values (2,null);
+select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 0 0
+2 0 NULL NULL NULL NULL NULL 0 0
+select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
+2 0 NULL NULL NULL NULL NULL 18446744073709551615 0
+insert into t1 values (2,1);
+select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 0 0
+2 1 1 1.0000 0.0000 1 1 0 1
+select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
+2 1 1 1.0000 0.0000 1 1 1 1
+insert into t1 values (3,1);
+select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 0 0
+2 1 1 1.0000 0.0000 1 1 0 1
+3 1 1 1.0000 0.0000 1 1 1 1
+select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a;
+a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b)
+1 0 NULL NULL NULL NULL NULL 18446744073709551615 0
+2 1 1 1.0000 0.0000 1 1 1 1
+3 1 1 1.0000 0.0000 1 1 1 1
+drop table t1;
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 5a5689f0185..2f9a55e0c42 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -54,9 +54,9 @@ userid MIN(t1.score+0.0)
2 2.0
1 1.0
EXPLAIN SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
-table type possible_keys key key_len ref rows Extra
-t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
-t2 eq_ref PRIMARY PRIMARY 4 t1.userID 1 Using index
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 t1.userID 1 Using index
drop table t1,t2;
CREATE TABLE t1 (
PID int(10) unsigned NOT NULL auto_increment,
@@ -253,10 +253,10 @@ key (score)
INSERT INTO t1 VALUES (1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,3,3),(6,3,3),(7,3,3);
explain select userid,count(*) from t1 group by userid desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort
explain select userid,count(*) from t1 group by userid desc order by null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary
select userid,count(*) from t1 group by userid desc;
userid count(*)
3 5
@@ -269,13 +269,13 @@ select userid,count(*) from t1 group by userid desc having 3 IN (1,COUNT(*));
userid count(*)
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
+1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
+1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid order by null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range spID spID 5 NULL 2 Using where; Using index
+1 SIMPLE t1 range spID spID 5 NULL 3 Using where; Using index
select spid,count(*) from t1 where spid between 1 and 2 group by spid;
spid count(*)
1 1
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 922f4816e90..98613dad628 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1209,7 +1209,8 @@ SET AUTOCOMMIT=0;
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
ROLLBACK;
-Warning: Some non-transactional changed tables couldn't be rolled back
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT * FROM t1;
B_ID
drop table t1,t2;
@@ -1247,12 +1248,12 @@ select count(*) from t1;
count(*)
29267
explain select * from t1 where c between 1 and 10000;
-table type possible_keys key key_len ref rows Extra
-t1 range c c 5 NULL 1 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range c c 5 NULL 1 Using where
update t1 set c=a;
explain select * from t1 where c between 1 and 10000;
-table type possible_keys key key_len ref rows Extra
-t1 ALL c NULL NULL NULL 29537 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL c NULL NULL NULL 29537 Using where
drop table t1,t2;
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) type=innodb;
insert into t1 (id) values (null),(null),(null),(null),(null);
@@ -1286,6 +1287,7 @@ a b
13 2
111 100
111 100
+drop table t1;
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
(stamp))TYPE=InnoDB;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 1412c5e7d10..123de82fe09 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -646,7 +646,6 @@ fooID barID fooID
20 2 NULL
30 3 30
drop table t1,t2;
-drop table if exists t3;
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index 3248d359546..c55f29a4e78 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -84,7 +84,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a,b a 5 NULL 5 Using where
explain select * from t1 where (a is null or a = 7) and b=7 and c=0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 5 NULL 12 Using where
+1 SIMPLE t1 ALL a,b NULL NULL NULL 12 Using where
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using where
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index a8a6dd6312d..0cfe1534252 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -549,10 +549,10 @@ KEY FieldKey (FieldKey),
KEY LongField (FieldKey,LongVal),
KEY StringField (FieldKey,StringVal(32))
);
-INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
+INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 2 Using where
+1 SIMPLE t1 ref FieldKey,LongField,StringField StringField 36 const 3 Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
FieldKey LongVal StringVal
1 0 2
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 48a2a8a5a21..1d46d1dcf25 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -382,14 +382,14 @@ a
set CHARACTER SET cp1251_koi8;
select * from t1;
a
-?
set CHARACTER SET DEFAULT;
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 2
+Qcache_queries_in_cache 1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 4
+Qcache_hits 5
drop table t1;
create database if not exists mysqltest;
create table mysqltest.t1 (i int not null);
@@ -415,7 +415,7 @@ Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 6
+Qcache_hits 7
drop database mysqltest;
drop table t1;
create table t1 (i int not null);
@@ -429,7 +429,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 6
+Qcache_hits 7
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@@ -441,7 +441,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 6
+Qcache_hits 7
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -454,7 +454,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 7
+Qcache_hits 8
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -466,7 +466,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 8
+Qcache_hits 9
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -535,7 +535,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 11
+Qcache_hits 12
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@@ -552,7 +552,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 12
+Qcache_hits 13
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result
index 6c2107b2cf3..eb46622dcc1 100644
--- a/mysql-test/r/repair.result
+++ b/mysql-test/r/repair.result
@@ -7,7 +7,7 @@ test.t1 repair status OK
alter table t1 TYPE=HEAP;
repair table t1 use_frm;
Table Op Msg_type Msg_text
-test.t1 repair error The handler for the table doesn't support repair
+test.t1 repair error The storage enginge for the table doesn't support repair
drop table t1;
repair table t1 use_frm;
Table Op Msg_type Msg_text
diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result
index 7eb3b77758e..6353a6101d6 100644
--- a/mysql-test/r/rpl_flush_tables.result
+++ b/mysql-test/r/rpl_flush_tables.result
@@ -14,7 +14,7 @@ rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
-master-bin.000001 4 Start 1 4 Server ver: 4.1.1-alpha-debug-log, Binlog ver: 3
+master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
@@ -27,7 +27,7 @@ a
flush tables;
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
-master-bin.000001 4 Start 1 4 Server ver: 4.1.1-alpha-debug-log, Binlog ver: 3
+master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int)
master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10)
master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int)
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index d506891b0fb..272ffdd330e 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -90,9 +90,6 @@ explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a l
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort
-select found_rows();
-found_rows()
-0
explain select a,b from t1 union all select a,b from t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
@@ -132,6 +129,23 @@ create table t3 select a,b from t1 union all select a,b from t2;
insert into t3 select a,b from t1 union all select a,b from t2;
replace into t3 select a,b as c from t1 union all select a,b from t2;
drop table t1,t2,t3;
+select * union select 1;
+No tables used
+select 1 as a,(select a union select a);
+a (select a union select a)
+1 1
+(select 1) union (select 2) order by 0;
+Unknown column '0' in 'order clause'
+SELECT @a:=1 UNION SELECT @a:=@a+1;
+@a:=1
+1
+2
+(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
+Unknown column 'a' in 'field list'
+(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
+1 3
+1 3
+2 1
CREATE TABLE t1 (
`pseudo` char(35) NOT NULL default '',
`pseudo1` char(35) NOT NULL default '',
@@ -255,11 +269,6 @@ uid rl g1 cid gg
uid rl g1 cid gg
1 NULL V1 NULL 1
drop table t1,t2,t3,t4,t5,t6;
-select * union select 1;
-No tables used
-select 1 as a,(select a union select a);
-a (select a union select a)
-1 1
CREATE TABLE t1 ( id int(3) unsigned default '0') TYPE=MyISAM;
INSERT INTO t1 (id) VALUES("1");
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) TYPE=MyISAM;
@@ -286,10 +295,6 @@ id_master id text1 text2
1 3 NULL bar3
1 4 foo4 bar4
drop table if exists t1,t2;
-(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
-1 3
-1 3
-2 1
create table t1 (a int not null primary key auto_increment, b int, key(b));
create table t2 (a int not null primary key auto_increment, b int);
insert into t1 (b) values (1),(2),(2),(3);
@@ -323,11 +328,3 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
2 UNION t1 ref b b 5 const 1 Using where
drop table t1,t2;
-(select 1) union (select 2) order by 0;
-Unknown column '0' in 'order clause'
-SELECT @a:=1 UNION SELECT @a:=@a+1;
-@a:=1
-1
-2
-(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
-Unknown column 'a' in 'field list'
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index c308b8fcbcd..1d483da2c77 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -137,7 +137,10 @@ a b
13 2
111 100
111 100
-drop table t1;
+create table t2 (a int not null, b int not null);
+insert into t2 values (1,1),(1,2),(1,3);
+update t1 set b=(select distinct 1 from (select * from t2) a);
+drop table t1,t2;
CREATE TABLE t1 (
`id_param` smallint(3) unsigned NOT NULL default '0',
`nom_option` char(40) NOT NULL default '',
diff --git a/mysql-test/t/ansi.test b/mysql-test/t/ansi.test
index e1ac8ffd4f9..da82b7a9e31 100644
--- a/mysql-test/t/ansi.test
+++ b/mysql-test/t/ansi.test
@@ -2,7 +2,9 @@
# Test of ansi mode
#
+--disable_warnings
drop table if exists t1;
+--enable_warnings
# Test some functions that works different in ansi mode
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 3a02e5d67e8..9bc37a0864d 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -145,9 +145,13 @@ drop table t1;
#
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
-!$1048 insert into t1 values ("c", NULL);
-!$1048 insert into t1 values (NULL, 3);
-!$1048 insert into t1 values (NULL, NULL);
+--error 1048
+insert into t1 values ("c", NULL);
+--error 1048
+insert into t1 values (NULL, 3);
+--error 1048
+insert into t1 values (NULL, NULL);
+drop table t1;
#
# Test create with foreign keys
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index 0330bbd23b4..68526806166 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -26,3 +26,4 @@ SHOW FIELDS FROM таблица;
SET CHARACTER SET koi8r;
DROP TABLE ÔÁÂÌÉÃÁ;
+SET CHARACTER SET default;
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index cd1dc965000..7308f26a8cf 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1,7 +1,9 @@
#
# Tests with the ujis character set
#
+--disable_warnings
drop table if exists t1;
+--enable_warnings
#
# Test problem with LEFT()
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 1c579ddcc62..40ac7f905c7 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -180,11 +180,9 @@ drop table t1;
# FULLTEXT index on a TEXT filed converted to a CHAR field doesn't work anymore
#
-drop table if exists t1;
create table t1 ( ref_mag text not null, fulltext (ref_mag));
insert into t1 values ('test');
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
alter table t1 change ref_mag ref_mag char (255) not null;
select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
drop table t1;
-
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index a0cb104df48..3736f4a2ddc 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -807,7 +807,6 @@ CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) TYPE=InnoDB;
SET AUTOCOMMIT=0;
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
--- error 1196
ROLLBACK;
SELECT * FROM t1;
drop table t1,t2;
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 49f13abe7c2..df7e5b1524d 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -417,7 +417,7 @@ explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
select * from t2 left join t1 ignore index(primary) on t1.fooID = t2.fooID and t1.fooID = 30;
drop table t1,t2;
-drop table if exists t3;
+
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index ceb5c47af11..d7e84590dc0 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -2,7 +2,9 @@
# Some simple test of load data
#
+--disable_warnings
drop table if exists t1;
+--enable_warnings
create table t1 (a date, b date, c date not null, d date);
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 5235eddd671..702feedc3ce 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -357,7 +357,7 @@ CREATE TABLE t1 (
KEY LongField (FieldKey,LongVal),
KEY StringField (FieldKey,StringVal(32))
);
-INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
+INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test
index e62ba2e94c7..67720343e83 100644
--- a/mysql-test/t/rpl_flush_tables.test
+++ b/mysql-test/t/rpl_flush_tables.test
@@ -17,12 +17,14 @@ rename table t1 to t5, t2 to t1;
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
flush no_write_to_binlog tables;
# Check that it's not in the binlog.
+--replace_result $SERVER_VERSION SERVER_VERSION
show binlog events;
# Check that the master is not confused.
select * from t3;
# This FLUSH should go into the binlog to not confuse the slave.
flush tables;
# Check that it's in the binlog.
+--replace_result $SERVER_VERSION SERVER_VERSION
show binlog events;
save_master_pos;
connection slave;
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 90d7f814359..30edcc79d9e 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -4,7 +4,7 @@
# This would work if mysqltest run would be threaded and handle each
# connection in a separate thread.
#
--- source include/not_embedded.inc
+--source include/not_embedded.inc
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 8e8a3dfe1d4..4a171c36293 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -396,6 +396,8 @@ SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 3);
SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2);
-- error 1093
INSERT INTO t2 VALUES ((SELECT * FROM t2));
+-- error 1093
+INSERT INTO t2 VALUES ((SELECT id FROM t2));
SELECT * FROM t2;
CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) TYPE=MyISAM CHARSET=latin1;
INSERT INTO t1 values (1),(1);