diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/bdb-crash.result | 7 | ||||
-rw-r--r-- | mysql-test/r/grant_cache.result | 42 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 22 | ||||
-rw-r--r-- | mysql-test/r/order_by.result | 97 |
4 files changed, 68 insertions, 100 deletions
diff --git a/mysql-test/r/bdb-crash.result b/mysql-test/r/bdb-crash.result index 778890e85e3..e414934b07c 100644 --- a/mysql-test/r/bdb-crash.result +++ b/mysql-test/r/bdb-crash.result @@ -37,3 +37,10 @@ analyze table t1; Table Op Msg_type Msg_text test.t1 analyze status Operation need committed state drop table t1; +create table t1 (a int) engine=bdb; +set autocommit=0; +insert into t1 values(1); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Operation need committed state +drop table t1; diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index f49db67a9f7..fc4073d23b1 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -41,17 +41,53 @@ grant SELECT on mysqltest.* to mysqltest_1@localhost; grant SELECT on mysqltest.t1 to mysqltest_2@localhost; grant SELECT on test.t1 to mysqltest_2@localhost; grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_not_cached"; +Variable_name Value +Qcache_not_cached 0 select "user1"; user1 user1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_not_cached"; +Variable_name Value +Qcache_not_cached 1 select * from t1; a b c 1 1 1 2 2 2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +show status like "Qcache_not_cached"; +Variable_name Value +Qcache_not_cached 1 select a from t1 ; a 1 2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +show status like "Qcache_not_cached"; +Variable_name Value +Qcache_not_cached 1 select c from t1; c 1 @@ -94,7 +130,7 @@ Variable_name Value Qcache_hits 7 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 3 +Qcache_not_cached 2 select "user3"; user3 user3 @@ -118,7 +154,7 @@ Variable_name Value Qcache_hits 7 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 8 +Qcache_not_cached 7 select "user4"; user4 user4 @@ -144,7 +180,7 @@ Variable_name Value Qcache_hits 8 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 9 +Qcache_not_cached 8 delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.tables_priv where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 1433c50f25c..5dc4803137e 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -460,6 +460,28 @@ a concat(b,'.') 1 a. 3 a . drop table t1; +create table t1 (a int not null); +create table t2 (a int not null, primary key (a)); +insert into t1 values (1); +insert into t2 values (1),(2); +select sql_big_result distinct t1.a from t1,t2 order by t2.a; +a +1 +select distinct t1.a from t1,t2 order by t2.a; +a +1 +select sql_big_result distinct t1.a from t1,t2; +a +1 +explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; +table type possible_keys key key_len ref rows Extra +t1 system NULL NULL NULL NULL 1 Using temporary +t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct +explain select distinct t1.a from t1,t2 order by t2.a; +table type possible_keys key key_len ref rows Extra +t1 system NULL NULL NULL NULL 1 Using temporary +t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct +drop table t1,t2; CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM; ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX' create table t1 (a int, b varchar(200), c text not null) checksum=1; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 006b507d409..2e9fe1995d0 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -546,100 +546,3 @@ a b 1 2 5 NULL DROP TABLE t1; -CREATE TABLE t1 ( -FieldKey varchar(36) NOT NULL default '', -LongVal bigint(20) default NULL, -StringVal mediumtext, -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'),('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 3 Using where -SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; -FieldKey LongVal StringVal -1 0 2 -1 1 3 -1 2 1 -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL 4 Using where; Using filesort -SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; -FieldKey LongVal StringVal -3 1 2 -3 2 1 -3 3 3 -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL 4 Using where -SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; -FieldKey LongVal StringVal -3 1 2 -3 2 1 -3 3 3 -DROP TABLE t1; -CREATE TABLE t1 (a INT, b INT); -SET @id=0; -UPDATE t1 SET a=0 ORDER BY (a=@id), b; -DROP TABLE t1; -CREATE TABLE t1 ( id smallint(6) unsigned NOT NULL default '0', menu tinyint(4) NOT NULL default '0', KEY id (id), KEY menu (menu)) ENGINE=MyISAM; -INSERT INTO t1 VALUES (11384, 2),(11392, 2); -SELECT id FROM t1 WHERE id <11984 AND menu =2 ORDER BY id DESC LIMIT 1 ; -id -11392 -drop table t1; -create table t1(a int, b int, index(b)); -insert into t1 values (2, 1), (1, 1), (4, NULL), (3, NULL), (6, 2), (5, 2); -explain select * from t1 where b=1 or b is null order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref_or_null b b 5 const 3 Using where; Using filesort -select * from t1 where b=1 or b is null order by a; -a b -1 1 -2 1 -3 NULL -4 NULL -explain select * from t1 where b=2 or b is null order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref_or_null b b 5 const 4 Using where; Using filesort -select * from t1 where b=2 or b is null order by a; -a b -3 NULL -4 NULL -5 2 -6 2 -drop table t1; -create table t1 (a int not null auto_increment, b int not null, c int not null, d int not null, -key(a,b,d), key(c,b,a)); -create table t2 like t1; -insert into t1 values (NULL, 1, 2, 0), (NULL, 2, 1, 1), (NULL, 3, 4, 2), (NULL, 4, 3, 3); -insert into t2 select null, b, c, d from t1; -insert into t1 select null, b, c, d from t2; -insert into t2 select null, b, c, d from t1; -insert into t1 select null, b, c, d from t2; -insert into t2 select null, b, c, d from t1; -insert into t1 select null, b, c, d from t2; -insert into t2 select null, b, c, d from t1; -insert into t1 select null, b, c, d from t2; -insert into t2 select null, b, c, d from t1; -insert into t1 select null, b, c, d from t2; -optimize table t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -set @row=10; -insert into t1 select 1, b, c + (@row:=@row - 1) * 10, d - @row from t2 limit 10; -select * from t1 where a=1 and b in (1) order by c, b, a; -a b c d -1 1 2 0 -1 1 12 -1 -1 1 52 -5 -1 1 92 -9 -select * from t1 where a=1 and b in (1); -a b c d -1 1 92 -9 -1 1 52 -5 -1 1 12 -1 -1 1 2 0 -drop table t1, t2; |