summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-05-21 21:39:58 +0300
committerunknown <monty@mashka.mysql.fi>2003-05-21 21:39:58 +0300
commitf72611b4fa7eb45259b26d75a733f7a29d20dc04 (patch)
tree3df25ac7036fb4b2e95ab56b9dc90477ec234b7c /mysql-test/r
parentdaac922bc306847581b9acee4bcf0a31707d72e7 (diff)
downloadmariadb-git-f72611b4fa7eb45259b26d75a733f7a29d20dc04.tar.gz
After merge fixes
Added initialization of all important global variables BUILD/SETUP.sh: build with readline client/mysqltest.c: Added variable SERVER_VERSION myisam/mi_key.c: Indentation change myisam/mi_open.c: After merge fix myisam/mi_range.c: After merge fix myisam/mi_rkey.c: After merge fix myisam/mi_search.c: After merge fix myisam/myisamdef.h: After merge fix mysql-test/include/not_embedded.inc: Fix test (because of wrong utf8 test) mysql-test/r/alter_table.result: Updated results after merge mysql-test/r/create.result: Updated results after merge mysql-test/r/ctype_recoding.result: Updated results after merge mysql-test/r/fulltext.result: Updated results after merge mysql-test/r/func_group.result: Updated results after merge mysql-test/r/group_by.result: Updated results after merge mysql-test/r/innodb.result: Updated results after merge mysql-test/r/join_outer.result: Updated results after merge mysql-test/r/null_key.result: Updated results after merge mysql-test/r/order_by.result: Updated results after merge mysql-test/r/query_cache.result: Updated results after merge mysql-test/r/repair.result: Updated results after merge mysql-test/r/rpl_flush_tables.result: Updated results after merge mysql-test/r/union.result: Updated results after merge mysql-test/r/update.result: Updated results after merge mysql-test/t/ansi.test: After merge fixes mysql-test/t/create.test: After merge fixes mysql-test/t/ctype_recoding.test: After merge fixes mysql-test/t/ctype_ujis.test: After merge fixes mysql-test/t/fulltext.test: After merge fixes mysql-test/t/innodb.test: After merge fixes mysql-test/t/join_outer.test: After merge fixes mysql-test/t/loaddata.test: After merge fixes mysql-test/t/order_by.test: After merge fixes mysql-test/t/rpl_flush_tables.test: After merge fixes mysql-test/t/status.test: After merge fixes mysql-test/t/subselect.test: After merge fixes sql/convert.cc: Code cleanup sql/field.cc: After merge fixes sql/filesort.cc: Remove compiler warning sql/item.cc: More efficient set_name() (no mallocs) sql/item_cmpfunc.cc: Code Code cleanup Item_bool_func2::fix_fields() added to get error handling right for cmp_charset sql/item_cmpfunc.h: New prototypes sql/item_func.cc: After merge fix sql/item_strfunc.cc: Faster check for BINARY sql/log_event.cc: Comment cleanup sql/mysql_priv.h: New prototypes and variables sql/mysqld.cc: Added initialization of all important global variables. Cleanup of variable declarations This is needed ot make the embedded version restartable sql/opt_sum.cc: After merge fix sql/set_var.cc: Code cleanup sql/sql_acl.cc: After merge fix Better error message sql/sql_db.cc: After merge fix sql/sql_derived.cc: After merge fix sql/sql_insert.cc: Indentation cleanups sql/sql_list.h: Added empty() to base_ilist sql/sql_parse.cc: After merge fix sql/sql_select.cc: After merge fix Fixed derived name handling in EXPLAIN sql/sql_show.cc: After merge fix sql/sql_string.cc: Made copy_and_convert global sql/sql_string.h: Made copy_and_convert global sql/sql_update.cc: After merge fix sql/sql_yacc.yy: After merge fix sql/thr_malloc.cc: Added sql_strmake_with_convert() sql/unireg.h: Added MAX_ALIAS_NAME strings/ctype-ujis.c: Fixed bug in converting to ujis
Diffstat (limited to 'mysql-test/r')
-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
15 files changed, 101 insertions, 108 deletions
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 '',