diff options
author | unknown <monty@mashka.mysql.fi> | 2003-02-04 21:52:14 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-02-04 21:52:14 +0200 |
commit | 2ff82a7b152181a49814f5ea125ca8dc6551fbdd (patch) | |
tree | bad5f8dd7f020cc76a4c5e0f19bd130e3fb4a735 /mysql-test/r | |
parent | 5a7189cf8c238c991e2b590ee3bb968d13fed63c (diff) | |
parent | dfbd628cd7ec0d3dbe86ee8e4f820d78f10b8ad0 (diff) | |
download | mariadb-git-2ff82a7b152181a49814f5ea125ca8dc6551fbdd.tar.gz |
Merge with 4.0.11
BitKeeper/etc/gone:
auto-union
BitKeeper/etc/logging_ok:
auto-union
Makefile.am:
Auto merged
bdb/os/os_handle.c:
Auto merged
client/mysqladmin.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/resolveip.c:
Auto merged
include/Makefile.am:
Auto merged
include/config-win.h:
Auto merged
include/my_base.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
libmysql/Makefile.am:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/manager.c:
Auto merged
libmysqld/libmysqld.c:
Auto merged
myisam/ft_static.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_open.c:
Auto merged
myisam/mi_test3.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/handler.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/select_found.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/backup.test:
Auto merged
mysql-test/t/bigint.test:
Auto merged
mysql-test/t/binary.test:
Auto merged
mysql-test/t/count_distinct.test:
Auto merged
mysql-test/t/func_crypt.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/handler.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/rpl000015.test:
Auto merged
mysql-test/t/rpl000017.test:
Auto merged
mysys/default.c:
Auto merged
mysys/my_getwd.c:
Auto merged
mysys/my_init.c:
Auto merged
sql/Makefile.am:
Auto merged
sql/des_key_file.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/hostname.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/lex.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql-bench/crash-me.sh:
Auto merged
sql-bench/server-cfg.sh:
Auto merged
sql-bench/test-insert.sh:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/table.cc:
Auto merged
Docs/manual.texi:
Use remote version
client/mysql.cc:
Merge
configure.in:
Merge
libmysql/libmysql.c:
Merge
libmysqld/lib_sql.cc:
Merge
myisam/ft_stopwords.c:
Merge
myisam/myisamchk.c:
Merge
mysql-test/r/bigint.result:
Merge
mysql-test/r/group_by.result:
Merge
mysql-test/r/rpl000009.result:
Merge
mysql-test/t/group_by.test:
Merge
mysql-test/t/rpl000009.test:
Merge
mysql-test/t/rpl_rotate_logs.test:
Merge
mysys/Makefile.am:
Merge
mysys/charset.c:
Merge
sql/item.h:
Merge
sql/item_cmpfunc.cc:
Merge
sql/item_cmpfunc.h:
Merge
sql/item_create.cc:
Merge
sql/item_func.cc:
Merge
sql/item_strfunc.h:
Merge
sql/log.cc:
Merge
sql/mysql_priv.h:
Merge
sql/mysqld.cc:
Merge
sql/protocol.cc:
Merge
sql/slave.cc:
Merge
sql/sql_class.h:
Merge
sql/sql_db.cc:
Merge
sql/sql_handler.cc:
Merge
sql/sql_parse.cc:
Merge
sql/sql_select.cc:
Merge
sql/sql_yacc.yy:
Merge
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/bigint.result | 12 | ||||
-rw-r--r-- | mysql-test/r/binary.result | 19 | ||||
-rw-r--r-- | mysql-test/r/count_distinct.result | 4 | ||||
-rw-r--r-- | mysql-test/r/fulltext_var.result | 3 | ||||
-rw-r--r-- | mysql-test/r/func_group.result | 53 | ||||
-rw-r--r-- | mysql-test/r/func_math.result | 2 | ||||
-rw-r--r-- | mysql-test/r/grant.result | 11 | ||||
-rw-r--r-- | mysql-test/r/group_by.result | 83 | ||||
-rw-r--r-- | mysql-test/r/handler.result | 8 | ||||
-rw-r--r-- | mysql-test/r/have_crypt.require | 2 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 11 | ||||
-rw-r--r-- | mysql-test/r/rpl000009.result | 1 | ||||
-rw-r--r-- | mysql-test/r/rpl_insert_id.result | 41 | ||||
-rw-r--r-- | mysql-test/r/rpl_master_pos_wait.result | 9 | ||||
-rw-r--r-- | mysql-test/r/select_found.result | 14 | ||||
-rw-r--r-- | mysql-test/r/union.result | 2 |
16 files changed, 262 insertions, 13 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 8bc383c6f4c..2037085dfdb 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -8,6 +8,9 @@ select 9223372036854775807,-009223372036854775808; select +9999999999999999999,-9999999999999999999; +9999999999999999999 -9999999999999999999 10000000000000000000 -10000000000000000000 +select 9223372036854775808+1; +9223372036854775808+1 +9223372036854775808 create table t1 (a bigint unsigned not null, primary key(a)); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE); select * from t1; @@ -52,3 +55,12 @@ select min(big),max(big),max(big)-1 from t1 group by a; min(big) max(big) max(big)-1 -1 9223372036854775807 9223372036854775806 drop table t1; +create table t1 (id bigint auto_increment primary key, a int) auto_increment=9999999999; +insert into t1 values (null,1); +select * from t1; +id a +9999999999 1 +select * from t1 limit 9999999999; +id a +9999999999 1 +drop table t1; diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index 325accf00e7..4d5eb62cc71 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -43,16 +43,31 @@ name select name from t2 where name between 'Ä' and 'Ö'; name drop table t1,t2; -create table t1 (a char(10) not null, b char(10) binary not null,index (a)); +create table t1 (a char(10) not null, b char(10) binary not null,key (a), key(b)); insert into t1 values ("hello ","hello "),("hello2 ","hello2 "); +select * from t1 where a="hello"; +a b +hello hello select * from t1 where a="hello "; a b hello hello -select * from t1 where b="hello "; +select * from t1 ignore index (a) where a="hello "; a b +hello hello select * from t1 where b="hello"; a b hello hello +select * from t1 where b="hello "; +a b +hello hello +select * from t1 ignore index (b) where b="hello "; +a b +alter table t1 modify b tinytext not null, drop key b, add key (b(100)); +select * from t1 where b="hello "; +a b +select * from t1 ignore index (b) where b="hello "; +a b +hello hello drop table t1; create table t1 (b char(8)); insert into t1 values(NULL); diff --git a/mysql-test/r/count_distinct.result b/mysql-test/r/count_distinct.result index 3bff6c6ad88..81976d268ef 100644 --- a/mysql-test/r/count_distinct.result +++ b/mysql-test/r/count_distinct.result @@ -36,6 +36,10 @@ select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join isbn city libname a 007 Berkeley Berkeley Public1 2 000 New York New York Public Libra 2 +select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct concat(t1.libname,'a')) > 1; +isbn city libname a +007 Berkeley Berkeley Public1 2 +000 New York New York Public Libra 2 drop table t1, t2, t3; create table t1 (f1 int); insert into t1 values (1); diff --git a/mysql-test/r/fulltext_var.result b/mysql-test/r/fulltext_var.result index eb71e87538d..dda8e332fba 100644 --- a/mysql-test/r/fulltext_var.result +++ b/mysql-test/r/fulltext_var.result @@ -1,6 +1,7 @@ show variables like "ft\_%"; Variable_name Value +ft_boolean_syntax + -><()~*:""&| ft_min_word_len 4 ft_max_word_len 254 ft_max_word_len_for_sort 20 -ft_boolean_syntax + -><()~*:""&| +ft_stopword_file (built-in) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 409fd110ab9..b13dfa4de7a 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -151,3 +151,56 @@ sum(num) 45.63 51.80 drop table t1; +create table t1 (a1 int, a2 char(3), key k1(a1), key k2(a2)); +insert into t1 values(10,'aaa'), (10,null), (10,'bbb'), (20,'zzz'); +create table t2(a1 char(3), a2 int, a3 real, key k1(a1), key k2(a2, a1)); +select * from t1; +a1 a2 +10 aaa +10 NULL +10 bbb +20 zzz +select min(a2) from t1; +min(a2) +aaa +select max(t1.a1), max(t2.a2) from t1, t2; +max(t1.a1) max(t2.a2) +NULL NULL +select max(t1.a1) from t1, t2; +max(t1.a1) +NULL +select max(t2.a2), max(t1.a1) from t1, t2; +max(t2.a2) max(t1.a1) +NULL NULL +explain select min(a2) from t1; +Comment +Select tables optimized away +explain select max(t1.a1), max(t2.a2) from t1, t2; +Comment +No matching min/max row +insert into t2 values('AAA', 10, 0.5); +select max(t1.a1), max(t2.a1) from t1, t2 where t2.a2=9; +max(t1.a1) max(t2.a1) +NULL NULL +select max(t2.a1), max(t1.a1) from t1, t2 where t2.a2=9; +max(t2.a1) max(t1.a1) +NULL NULL +select t1.a1, t1.a2, t2.a1, t2.a2 from t1 left outer join t2 on t1.a1=10; +a1 a2 a1 a2 +10 aaa AAA 10 +10 NULL AAA 10 +10 bbb AAA 10 +20 zzz NULL NULL +select max(t1.a2) from t1 left outer join t2 on t1.a1=10; +max(t1.a2) +zzz +select max(t1.a2) from t1 left outer join t2 on t1.a1=10 where t1.a1=20; +max(t1.a2) +zzz +select max(t1.a2) from t1 left outer join t2 on t1.a1=10 where t1.a1=10; +max(t1.a2) +bbb +select max(t2.a1) from t1 left outer join t2 on t1.a2=t2.a1 and 1=0 where t2.a1='AAA'; +max(t2.a1) +NULL +drop table t1,t2; diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 811a16fff6c..d6596e51db4 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -36,7 +36,7 @@ select rand(999999),rand(); rand(999999) rand() 0.014231365187309 0.028870999839968 select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); -PI() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) +pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) 3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398 select degrees(pi()),radians(360); degrees(pi()) radians(360) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index a1a0c91a575..c1dcd5c29e9 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -22,6 +22,7 @@ GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' grant select on mysqltest.* to mysqltest_1@localhost require NONE; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; show grants for mysqltest_1@localhost; @@ -37,24 +38,34 @@ flush privileges; grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION revoke all privileges on mysqltest.* from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; flush privileges; +grant usage on test.* to user@localhost with grant option; +show grants for user@localhost; +Grants for user@localhost +GRANT USAGE ON *.* TO 'user'@'localhost' +GRANT USAGE ON `test`.* TO 'user'@'localhost' WITH GRANT OPTION diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index a63054da88b..40e2c72ff32 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -34,6 +34,11 @@ userid MIN(t1.score) 1 1 2 2 3 3 +SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid ORDER BY NULL; +userid MIN(t1.score) +1 1 +2 2 +3 3 SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid; userid MIN(t1.score) 1 1 @@ -42,6 +47,10 @@ SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1 userid MIN(t1.score+0.0) 1 1.0 2 2.0 +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; +userid MIN(t1.score+0.0) +1 1.0 +2 2.0 drop table t1,t2; CREATE TABLE t1 ( PID int(10) unsigned DEFAULT '0' NOT NULL auto_increment, @@ -88,6 +97,8 @@ INSERT INTO t2 VALUES (91,2); INSERT INTO t2 VALUES (92,2); SELECT cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid; cid CONCAT(firstname, ' ', surname) COUNT(call_id) +SELECT cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid ORDER BY NULL; +cid CONCAT(firstname, ' ', surname) COUNT(call_id) SELECT HIGH_PRIORITY cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid ORDER BY surname, firstname; cid CONCAT(firstname, ' ', surname) COUNT(call_id) drop table t1,t2; @@ -237,6 +248,9 @@ INSERT INTO t1 VALUES (1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,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 +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 select userid,count(*) from t1 group by userid desc; userid count(*) 3 3 @@ -252,6 +266,9 @@ 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 +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 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 @@ -266,6 +283,9 @@ spid count(*) explain select sql_big_result spid,sum(userid) from t1 group by spid desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +explain select sql_big_result spid,sum(userid) from t1 group by spid 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 select sql_big_result spid,sum(userid) from t1 group by spid desc; spid sum(userid) 5 3 @@ -276,6 +296,9 @@ spid sum(userid) explain select sql_big_result score,count(*) from t1 group by score desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL score 3 NULL 6 Using index +explain select sql_big_result score,count(*) from t1 group by score desc order by null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL score 3 NULL 6 Using index select sql_big_result score,count(*) from t1 group by score desc; score count(*) 3 3 @@ -482,3 +505,63 @@ NULL 9 3 b 1 drop table t1; +create table t1 (a int not null, b int not null); +insert into t1 values (1,1),(1,2),(3,1),(3,2),(2,2),(2,1); +create table t2 (a int not null, b int not null, key(a)); +insert into t2 values (1,3),(3,1),(2,2),(1,1); +select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b; +a b +1 1 +1 3 +2 2 +3 1 +select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL; +a b +1 3 +3 1 +2 2 +1 1 +explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +t2 ALL a NULL NULL NULL 4 Using where +explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 6 Using temporary +t2 ALL a NULL NULL NULL 4 Using where +drop table t1,t2; +create table t1 (a int, b int); +insert into t1 values (1, 4); +insert into t1 values (10, 40); +insert into t1 values (1, 4); +insert into t1 values (10, 43); +insert into t1 values (1, 4); +insert into t1 values (10, 41); +insert into t1 values (1, 4); +insert into t1 values (10, 43); +insert into t1 values (1, 4); +select a, MAX(b), INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) from t1 group by a; +a MAX(b) INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) +1 4 2 +10 43 6 +select a, MAX(b), CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end from t1 group by a; +a MAX(b) CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end +1 4 4 +10 43 43 +select a, MAX(b), FIELD(MAX(b), '43', '4', '5') from t1 group by a; +a MAX(b) FIELD(MAX(b), '43', '4', '5') +1 4 2 +10 43 1 +select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a; +a MAX(b) CONCAT_WS(MAX(b), '43', '4', '5') +1 4 434445 +10 43 43434435 +select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a; +a MAX(b) ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') +1 4 d +10 43 NULL +select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a; +a MAX(b) MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') +1 4 c +10 43 a,b,d,f +drop table t1; diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index b47f97e167f..9d3383efd8f 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -138,4 +138,10 @@ a b handler t2 read last; You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 handler t2 close; -drop table if exists t1; +handler t1 open as t2; +drop table t1; +create table t1 (a int); +insert into t1 values (17); +handler t2 read first; +Unknown table 't2' in HANDLER +drop table t1; diff --git a/mysql-test/r/have_crypt.require b/mysql-test/r/have_crypt.require new file mode 100644 index 00000000000..739fbb738f0 --- /dev/null +++ b/mysql-test/r/have_crypt.require @@ -0,0 +1,2 @@ +Variable_name Value +have_crypt YES diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 17c9c8edbd2..7114c251e03 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -544,3 +544,14 @@ select * from mysql.db; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 +create table t1(id int auto_increment primary key); +insert into t1 values (NULL), (NULL), (NULL); +select * from t1 where id=2; +id +2 +alter table t1 rename to t2; +select * from t1 where id=2; +Table 'test.t1' doesn't exist +drop table t2; +select * from t1 where id=2; +Table 'test.t1' doesn't exist diff --git a/mysql-test/r/rpl000009.result b/mysql-test/r/rpl000009.result index e67993b53f6..fef2b8c6179 100644 --- a/mysql-test/r/rpl000009.result +++ b/mysql-test/r/rpl000009.result @@ -8,6 +8,7 @@ drop database if exists mysqltest2; create database mysqltest2; drop database if exists mysqltest; create database mysqltest; +create database mysqltest2; create table mysqltest2.foo (n int); insert into mysqltest2.foo values(4); create table mysqltest2.foo (n int); diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result new file mode 100644 index 00000000000..d524818985e --- /dev/null +++ b/mysql-test/r/rpl_insert_id.result @@ -0,0 +1,41 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +drop table if exists t1; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (1),(2),(3); +insert into t1 values (null); +insert into t2 values (null,last_insert_id()); +select * from t1; +a +1 +2 +3 +4 +select * from t2; +b c +1 4 +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 values (null,last_insert_id()); +select * from t1; +a +10 +11 +12 +13 +select * from t2; +b c +5 0 +6 11 +drop table t1; +drop table t2; diff --git a/mysql-test/r/rpl_master_pos_wait.result b/mysql-test/r/rpl_master_pos_wait.result new file mode 100644 index 00000000000..22c7aef621c --- /dev/null +++ b/mysql-test/r/rpl_master_pos_wait.result @@ -0,0 +1,9 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +select master_pos_wait('master-bin.999999',0,10); +master_pos_wait('master-bin.999999',0,10) +-1 diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 5b6c490b928..c8991696b5e 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -12,43 +12,43 @@ a b 7 7 8 9 select found_rows(); -FOUND_ROWS() +found_rows() 8 select SQL_CALC_FOUND_ROWS * from t1 limit 1; a b 1 2 select found_rows(); -FOUND_ROWS() +found_rows() 8 select SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS * from t1 limit 1; a b 1 2 select found_rows(); -FOUND_ROWS() +found_rows() 8 select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1; a b 8 9 select found_rows(); -FOUND_ROWS() +found_rows() 8 select SQL_CALC_FOUND_ROWS distinct b from t1 limit 1; b 2 select found_rows(); -FOUND_ROWS() +found_rows() 6 select SQL_CALC_FOUND_ROWS b,count(*) as c from t1 group by b order by c desc limit 1; b c 5 3 select found_rows(); -FOUND_ROWS() +found_rows() 6 select SQL_CALC_FOUND_ROWS * from t1 left join t1 as t2 on (t1.b=t2.a) limit 2,1; a b a b 3 5 5 5 select found_rows(); -FOUND_ROWS() +found_rows() 8 drop table t1; create table t1 (a int not null primary key); diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index e546a8c8284..cb3a8029a87 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -91,7 +91,7 @@ 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() +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 |