diff options
Diffstat (limited to 'mysql-test/t')
36 files changed, 294 insertions, 116 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index b9b8c244699..d86466572d8 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -2,6 +2,7 @@ # Test of auto_increment; The test for BDB tables is in bdb.test # +drop table if exists t1; create table t1 (a int not null auto_increment,b int, primary key (a)) type=myisam auto_increment=3; insert into t1 values (1,1),(NULL,3),(NULL,4); delete from t1 where a=4; @@ -18,20 +19,6 @@ insert into t1 values (NULL,9,9); select * from t1; drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where a=4 or a=2; -insert into t1 values (NULL,4),(NULL,5),(6,6); -select * from t1; -delete from t1 where a=6; -#show table status like "t1"; -replace t1 values (3,1); -replace t1 values (3,3); -ALTER TABLE t1 add c int; -insert into t1 values (NULL,6,6); -select * from t1; -drop table t1; - create table t1 ( skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY, sval char(20) diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test index 43ea6fd19ad..c622522c870 100644 --- a/mysql-test/t/backup.test +++ b/mysql-test/t/backup.test @@ -39,9 +39,3 @@ reap; unlock tables; connection con1; reap; - - - - - - diff --git a/mysql-test/t/bench_count_distinct.test b/mysql-test/t/bench_count_distinct.test index 62d456a3cf8..9059428bea4 100644 --- a/mysql-test/t/bench_count_distinct.test +++ b/mysql-test/t/bench_count_distinct.test @@ -1,12 +1,13 @@ drop table if exists t1; create table t1(n int not null, key(n)) delay_key_write = 1; let $1=100; +disable_query_log; while ($1) { eval insert into t1 values($1); eval insert into t1 values($1); dec $1; } - +enable_query_log; select count(distinct n) from t1; drop table t1; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 6470b6f6a30..52ae9ad35db 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -14,3 +14,18 @@ select * from t1 where a='18446744073709551615'; delete from t1 where a=18446744073709551615; select * from t1; drop table t1; + +create table t1 ( a int not null default 1, big bigint ); +insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(18446744073709551615); +select min(big),max(big),max(big)-1 from t1; +select min(big),max(big),max(big)-1 from t1 group by a; +alter table t1 modify big bigint unsigned not null; +select min(big),max(big),max(big)-1 from t1; +select min(big),max(big),max(big)-1 from t1 group by a; +alter table t1 add key (big); +select min(big),max(big),max(big)-1 from t1; +select min(big),max(big),max(big)-1 from t1 group by a; +alter table t1 modify big bigint not null; +select min(big),max(big),max(big)-1 from t1; +select min(big),max(big),max(big)-1 from t1 group by a; +drop table t1; diff --git a/mysql-test/t/check.test b/mysql-test/t/check.test index 6296b31d65d..421c98d79e0 100644 --- a/mysql-test/t/check.test +++ b/mysql-test/t/check.test @@ -5,11 +5,13 @@ drop table if exists t1; #add a lot of keys to slow down check create table t1(n int not null, key(n), key(n), key(n), key(n)); let $1=10000; +disable_query_log; while ($1) { eval insert into t1 values ($1); dec $1; } +enable_query_log; send check table t1 type=extended; connection con2; insert into t1 values (200000); diff --git a/mysql-test/t/count_distinct2-master.opt b/mysql-test/t/count_distinct2-master.opt index 8f1be6dce3a..d81cc55090d 100644 --- a/mysql-test/t/count_distinct2-master.opt +++ b/mysql-test/t/count_distinct2-master.opt @@ -1 +1 @@ --O max_heap_table_size=16384 +--set-variable=max_heap_table_size=16384 diff --git a/mysql-test/t/count_distinct2.test b/mysql-test/t/count_distinct2.test index 33d4cf54278..d1bea7614c8 100644 --- a/mysql-test/t/count_distinct2.test +++ b/mysql-test/t/count_distinct2.test @@ -1,3 +1,5 @@ +drop table if exists t1; + create table t1(n1 int, n2 int, s char(20), vs varchar(20), t text); insert into t1 values (1,11, 'one','eleven', 'eleven'), (1,11, 'one','eleven', 'eleven'), @@ -44,14 +46,16 @@ select count(distinct n1), count(distinct n2) from t1; select count(distinct n2), n1 from t1 group by n1; drop table t1; -# test the converstion from tree to MyISAM +# test the conversion from tree to MyISAM create table t1 (n int default NULL); let $1=5000; +disable_query_log; while ($1) { eval insert into t1 values($1); dec $1; } +enable_query_log; flush status; select count(distinct n) from t1; @@ -61,12 +65,13 @@ drop table t1; #test conversion from heap to MyISAM create table t1 (s text); let $1=5000; +disable_query_log; while ($1) { eval insert into t1 values('$1'); dec $1; } - +enable_query_log; flush status; select count(distinct s) from t1; show status like 'Created_tmp_disk_tables'; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index d45d013c9fb..3eb4f35bdc2 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -25,14 +25,10 @@ drop table if exists t1,t2; !$1164 create table t1 (a int not null auto_increment,primary key (a)) type=heap; !$1163 create table t1 (a int not null,b text) type=heap; !$1171 create table t1 (a int ,primary key(a)) type=heap; -!$1121 create table t1 (a int,b text, index(a)) type=isam; -!$1073 create table t1 (a int,b text, index(b)) type=isam; drop table if exists t1; -!$1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam; !$1164 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap; !$1171 create table t1 (ordid int(8), primary key (ordid)); -!$1121 create table t1 (ordid int(8), unique (ordid)) type=isam; -- error 1044,1 create table not_existing_database.test (a int); diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index 4491de1f82b..fe219471041 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -1,3 +1,11 @@ +# This test doesn't work with the embedded version as this code +# assumes that one query is running while we are doing queries on +# a second connection. +# This would work if mysqltest run would be threaded and handle each +# connection in a separate thread. +# +-- source include/not_embedded.inc + connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con1; @@ -7,6 +15,7 @@ drop table if exists t2; create table t2(n int); insert into t2 values(3); let $1=100; +disable_query_log; while ($1) { connection con1; @@ -19,7 +28,7 @@ while ($1) reap; dec $1; } - +enable_query_log; connection con1; select * from t1; connection con2; diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test index b0bdbe472dd..052e0530cf6 100644 --- a/mysql-test/t/func_system.test +++ b/mysql-test/t/func_system.test @@ -2,5 +2,5 @@ # system functions # -select database(),user(); +select database(),user() like "%@%"; select version()>="3.23.29"; diff --git a/mysql-test/t/isam.test b/mysql-test/t/isam.test index 1cf068b42ba..5b3ab7647c7 100644 --- a/mysql-test/t/isam.test +++ b/mysql-test/t/isam.test @@ -1,3 +1,7 @@ +-- source include/have_isam.inc + +drop table if exists t1,t2; + # # Test possible problem with rows that are about 65535 bytes long # @@ -5,11 +9,13 @@ create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)); let $1=100; +disable_query_log; while ($1) { eval insert into t1 (b) values(repeat(char(65+$1),65540-$1)); dec $1; } +enable_query_log; check table t1; repair table t1; delete from t1 where (a & 1); @@ -17,3 +23,48 @@ check table t1; repair table t1; check table t1; drop table t1; + +# +# Test of auto_increment; The test for BDB tables is in bdb.test +# + +create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where a=4 or a=2; +insert into t1 values (NULL,4),(NULL,5),(6,6); +select * from t1; +delete from t1 where a=6; +#show table status like "t1"; +replace t1 values (3,1); +replace t1 values (3,3); +ALTER TABLE t1 add c int; +insert into t1 values (NULL,6,6); +select * from t1; +drop table t1; + +# +# Test of some CREATE TABLE's that should fail +# +!$1121 create table t1 (a int,b text, index(a)) type=isam; +!$1073 create table t1 (a int,b text, index(b)) type=isam; +!$1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam; +!$1121 create table t1 (ordid int(8), unique (ordid)) type=isam; +drop table if exists t1; + +# +# Test of some show commands +# + +create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); +insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); +create table t2 type=isam select * from t1; +optimize table t1; +check table t1,t2; +repair table t1,t2; +check table t2,t1; +lock tables t1 write; +check table t2,t1; +show columns from t1; +show full columns from t1; +show index from t1; +drop table t1,t2; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 6fff628ccb9..224db1dd8f0 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -89,3 +89,26 @@ select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using --error 1116 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); drop table t1; + +# +# Simple join test. This failed in 3.23.42, there should have been +# no matches, still three matches were found. +# + +CREATE TABLE t1 ( + a int(11) NOT NULL, + b int(11) NOT NULL, + PRIMARY KEY (a,b) +) TYPE=MyISAM; + +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(2,3); + +CREATE TABLE t2 ( + a int(11) default NULL +) TYPE=MyISAM; + +INSERT INTO t2 VALUES (2),(3); + +SELECT t1.a,t2.a,b FROM t1,t2 WHERE t1.a=t2.a AND (t1.a=1 OR t1.a=2) AND b>=1 AND b<=3; + +DROP TABLE t1, t2; diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index be6860a3cc3..6bcc43ac916 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -1,3 +1,11 @@ +# This test doesn't work with the embedded version as this code +# assumes that one query is running while we are doing queries on +# a second connection. +# This would work if mysqltest run would be threaded and handle each +# connection in a separate thread. +# +-- source include/not_embedded.inc + connect (con1, localhost, root,,); connect (con2, localhost, root,,); diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test index 77354e63252..385713174d2 100644 --- a/mysql-test/t/lock.test +++ b/mysql-test/t/lock.test @@ -53,45 +53,3 @@ lock tables t1 write; check table t2; unlock tables; drop table t1,t2; - -#test to see if select will get the lock ahead of low priority update -connect (locker,localhost,root,,); -connect (reader,localhost,root,,); -connect (writer,localhost,root,,); - -connection locker; -create table t1(n int); -insert into t1 values (1); -lock tables t1 write; -connection writer; -send update low_priority t1 set n = 4; -connection reader; ---sleep 2 -send select n from t1; -connection locker; ---sleep 2 -unlock tables; -connection writer; -reap; -connection reader; -reap; -drop table t1; - -connection locker; -create table t1(n int); -insert into t1 values (1); -lock tables t1 read; -connection writer; -send update low_priority t1 set n = 4; -connection reader; ---sleep 2 -send select n from t1; -connection locker; ---sleep 2 -unlock tables; -connection writer; -reap; -connection reader; -reap; -drop table t1; - diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test new file mode 100644 index 00000000000..53e9fd3393c --- /dev/null +++ b/mysql-test/t/lock_multi.test @@ -0,0 +1,49 @@ +# This test doesn't work with the embedded version as this code +# assumes that one query is running while we are doing queries on +# a second connection. +# This would work if mysqltest run would be threaded and handle each +# connection in a separate thread. +# +-- source include/not_embedded.inc + +#test to see if select will get the lock ahead of low priority update + +connect (locker,localhost,root,,); +connect (reader,localhost,root,,); +connect (writer,localhost,root,,); + +connection locker; +create table t1(n int); +insert into t1 values (1); +lock tables t1 write; +connection writer; +send update low_priority t1 set n = 4; +connection reader; +--sleep 2 +send select n from t1; +connection locker; +--sleep 2 +unlock tables; +connection writer; +reap; +connection reader; +reap; +drop table t1; + +connection locker; +create table t1(n int); +insert into t1 values (1); +lock tables t1 read; +connection writer; +send update low_priority t1 set n = 4; +connection reader; +--sleep 2 +send select n from t1; +connection locker; +--sleep 2 +unlock tables; +connection writer; +reap; +connection reader; +reap; +drop table t1; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 188f699cd64..5bd78769a05 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -2,7 +2,7 @@ # test of MERGE TABLES # -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4,t5,t6; create table t1 (a int not null primary key auto_increment, message char(20)); create table t2 (a int not null primary key auto_increment, message char(20)); INSERT INTO t1 (message) VALUES ("Testing"),("table"),("t1"); @@ -31,6 +31,14 @@ select * from t3 where a > 10 and a < 20; explain select a from t3 order by a desc limit 10; select a from t3 order by a desc limit 10; select a from t3 order by a desc limit 300,10; +delete from t3 where a=3; +select * from t3 where a < 10; +delete from t3 where a >= 6 and a <= 8; +select * from t3 where a < 10; +update t3 set a=3 where a=9; +select * from t3 where a < 10; +update t3 set a=6 where a=7; +select * from t3 where a < 10; show create table t3; # The following should give errors @@ -114,3 +122,49 @@ insert into t2 values (1,1),(2,2),(0,0),(4,4),(5,5),(6,6); flush tables; select * from t3 where a=1 order by b limit 2; drop table t3,t1,t2; + +# +# [phi] testing INSERT_METHOD stuff +# + +drop table if exists t6, t5, t4, t3, t2, t1; +# first testing of common stuff with new parameters +create table t1 (a int not null, b int not null, key(a,b)); +create table t2 (a int not null, b int not null, key(a,b)); +create table t3 (a int not null, b int not null, key(a,b)) UNION=(t1,t2) INSERT_METHOD=NO; +create table t4 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=NO; +create table t5 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST; +create table t6 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST; +show create table t3; +show create table t4; +show create table t5; +show create table t6; +insert into t1 values (1,1),(1,2),(1,3),(1,4); +insert into t2 values (2,1),(2,2),(2,3),(2,4); +select * from t3 order by b,a limit 3; +select * from t4 order by b,a limit 3; +select * from t5 order by b,a limit 3,3; +select * from t6 order by b,a limit 6,3; +# now testing inserts and where the data gets written +insert into t5 values (5,1),(5,2); +insert into t6 values (6,1),(6,2); +select * from t1 order by a,b; +select * from t2 order by a,b; +select * from t4 order by a,b; +# preperation for next test +insert into t3 values (3,1),(3,2),(3,3),(3,4); +select * from t3 order by a,b; +# now testing whether options are kept by alter table +alter table t4 UNION=(t1,t2,t3); +show create table t4; +select * from t4 order by a,b; +# testing switching off insert method and inserts again +alter table t4 INSERT_METHOD=FIRST; +show create table t4; +insert into t4 values (4,1),(4,2); +select * from t1 order by a,b; +select * from t2 order by a,b; +select * from t3 order by a,b; +select * from t4 order by a,b; +select * from t5 order by a,b; +drop table if exists t6, t5, t4, t3, t2, t1; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 7959b67ee9c..0fc4d923469 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -9,6 +9,7 @@ drop table if exists t1,t2,t3; create table t1(id1 int not null auto_increment primary key, t char(12)); create table t2(id2 int not null, t char(12)); create table t3(id3 int not null, t char(12), index(id3)); +disable_query_log; let $1 = 10000; while ($1) { @@ -27,7 +28,7 @@ while ($1) } dec $1; } - +enable_query_log; delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 9500; check table t1, t2, t3; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 0dc7f84efc5..48a8b5d6c65 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -24,11 +24,13 @@ drop table t1; create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)); let $1=100; +disable_query_log; while ($1) { eval insert into t1 (b) values(repeat(char(65+$1),65550-$1)); dec $1; } +enable_query_log; check table t1; repair table t1; delete from t1 where (a & 1); diff --git a/mysql-test/t/order_fill_sortbuf-master.opt b/mysql-test/t/order_fill_sortbuf-master.opt index af4e7d33143..116494d4588 100644 --- a/mysql-test/t/order_fill_sortbuf-master.opt +++ b/mysql-test/t/order_fill_sortbuf-master.opt @@ -1 +1 @@ --O sort_buffer=0 +--set-variable=sort_buffer=0 diff --git a/mysql-test/t/order_fill_sortbuf.test b/mysql-test/t/order_fill_sortbuf.test index a64ffce08e3..6419f2a93df 100644 --- a/mysql-test/t/order_fill_sortbuf.test +++ b/mysql-test/t/order_fill_sortbuf.test @@ -9,12 +9,13 @@ CREATE TABLE `t1` ( `id2` int(11) NOT NULL default '0', `id3` int(11) NOT NULL default '0'); let $1=4000; +disable_query_log; while ($1) { eval insert into t1 (id,id2,id3) values ($1,$1,$1); dec $1; } - +enable_query_log; create table t2 select id2 from t1 order by id3; select count(*) from t2; drop table t1,t2; diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test index 2a9cf113a47..ce4651d8de3 100644 --- a/mysql-test/t/rename.test +++ b/mysql-test/t/rename.test @@ -12,13 +12,19 @@ select * from t1; rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; select * from t1; + # The following should give errors -!$1050 rename table t1 to t2; -!$1050 rename table t1 to t1; -!$1050 rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2; +--error 1050,1050 +rename table t1 to t2; +--error 1050,1050 +rename table t1 to t1; +--error 1050,1050 +rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2; show tables like "t_"; -!$1050 rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1; -!$1017 rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1; +--error 1050,1050 +rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1; +--error 1017,1017 +rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1; select * from t1; select * from t2; diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 54882d7bd43..113a9637dac 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -42,10 +42,10 @@ save_master_pos; connection master1; #avoid generating result create temporary table t1_temp(n int); -insert into t1_temp select get_lock('crash_lock', 1) from t2; +insert into t1_temp select get_lock('crash_lock%20C', 1) from t2; connection master; -send update t1 set n = n + get_lock('crash_lock', 2); +send update t1 set n = n + get_lock('crash_lock%20C', 2); connection master1; sleep 2; select (@id := id) - id from t2; diff --git a/mysql-test/t/rpl000002.test b/mysql-test/t/rpl000002.test index 865aa5e5bab..420ae27a337 100644 --- a/mysql-test/t/rpl000002.test +++ b/mysql-test/t/rpl000002.test @@ -1,4 +1,5 @@ source include/master-slave.inc; +eval_result; connection master; use test; drop table if exists t1; diff --git a/mysql-test/t/rpl000015.test b/mysql-test/t/rpl000015.test index 73a10bed7b3..3b29049f1d7 100644 --- a/mysql-test/t/rpl000015.test +++ b/mysql-test/t/rpl000015.test @@ -1,5 +1,6 @@ -connect (master,localhost,root,,test,0,mysql-master.sock); -connect (slave,localhost,root,,test,0, mysql-slave.sock); +connect (master,localhost,root,,test,0,master.sock); +connect (slave,localhost,root,,test,0, slave.sock); +eval_result; connection master; reset master; show master status; @@ -31,4 +32,3 @@ drop table t1; save_master_pos; connection slave; sync_with_master; - diff --git a/mysql-test/t/rpl000016.test b/mysql-test/t/rpl000016.test index 7b46bc75498..964419f5172 100644 --- a/mysql-test/t/rpl000016.test +++ b/mysql-test/t/rpl000016.test @@ -1,5 +1,6 @@ -connect (master,localhost,root,,test,0,mysql-master.sock); -connect (slave,localhost,root,,test,0,mysql-slave.sock); +connect (master,localhost,root,,test,0,master.sock); +connect (slave,localhost,root,,test,0,slave.sock); +eval_result; system cat /dev/null > var/slave-data/master.info; system chmod 000 var/slave-data/master.info; connection slave; @@ -75,12 +76,14 @@ connection master; let $1=100; drop table if exists t3; create table t3 (n int); +disable_query_log; while ($1) { #eval means expand $ expressions eval insert into t3 values($1 + 4); dec $1; } +enable_query_log; show master logs; show master status; save_master_pos; diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh index 23117597ca5..c717500ae4a 100755 --- a/mysql-test/t/rpl000017-slave.sh +++ b/mysql-test/t/rpl000017-slave.sh @@ -3,8 +3,8 @@ master-bin.001 4 127.0.0.1 replicate -aaaaaaaaaaaaaaab -9306 +aaaaaaaaaaaaaaabthispartofthepasswordisnotused +$MASTER_MYPORT 1 0 EOF diff --git a/mysql-test/t/rpl000017.test b/mysql-test/t/rpl000017.test index 04a2bc9c78a..011b6507e49 100644 --- a/mysql-test/t/rpl000017.test +++ b/mysql-test/t/rpl000017.test @@ -1,8 +1,9 @@ -connect (master,localhost,root,,test,0,mysql-master.sock); -connect (slave,localhost,root,,test,0,mysql-slave.sock); +connect (master,localhost,root,,test,0,master.sock); +connect (slave,localhost,root,,test,0,slave.sock); connection master; reset master; grant file on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; +grant file on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; connection slave; slave start; connection master; diff --git a/mysql-test/t/rpl000018-master.sh b/mysql-test/t/rpl000018-master.sh deleted file mode 100755 index e570f106ec6..00000000000 --- a/mysql-test/t/rpl000018-master.sh +++ /dev/null @@ -1,3 +0,0 @@ -rm -f $MYSQL_TEST_DIR/var/master-data/master-bin.* -cp $MYSQL_TEST_DIR/std_data/master-bin.001 $MYSQL_TEST_DIR/var/master-data/ -echo ./master-bin.001 > $MYSQL_TEST_DIR/var/master-data/master-bin.index diff --git a/mysql-test/t/rpl000018.test b/mysql-test/t/rpl000018.test index 44236323d1d..621147b7c3e 100644 --- a/mysql-test/t/rpl000018.test +++ b/mysql-test/t/rpl000018.test @@ -1,5 +1,7 @@ -connect (master,localhost,root,,test,0,mysql-master.sock); -connect (slave,localhost,root,,test,0,mysql-slave.sock); +connect (master,localhost,root,,test,0,master.sock); +connect (slave,localhost,root,,test,0,slave.sock); +server_stop master; +server_start master; connection slave; reset slave; slave start; diff --git a/mysql-test/t/rpl_failsafe.test b/mysql-test/t/rpl_failsafe.test new file mode 100644 index 00000000000..b8ef5b3f365 --- /dev/null +++ b/mysql-test/t/rpl_failsafe.test @@ -0,0 +1,5 @@ +source include/master-slave.inc; +connection master; +show variables like 'rpl_recovery_rank'; +connection slave; +show variables like 'rpl_recovery_rank'; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 426553b4bdc..841524d57e6 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -46,3 +46,4 @@ show new master for slave with master_log_file='master-bin.002' and master_log_pos=4 and master_log_seq=1 and master_server_id=1; show new master for slave with master_log_file='master-bin.002' and master_log_pos=137 and master_log_seq=3 and master_server_id=1; + diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 0e0d79e7d16..56370b9ca85 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -1,21 +1,8 @@ # # Test of some show commands # -drop table if exists t1,t2; -create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); -insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); -create table t2 type=isam select * from t1; -optimize table t1; -check table t1,t2; -repair table t1,t2; -check table t2,t1; -lock tables t1 write; -check table t2,t1; -show columns from t1; -show full columns from t1; -show index from t1; -drop table t1,t2; +drop table if exists t1,t2; create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); check table t1 type=fast; @@ -79,3 +66,11 @@ create table t1(n int); insert into t1 values (1); show open tables; drop table t1; + +create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" TYPE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed; +show create table t1; +alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; +show create table t1; +ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default; +show create table t1; +drop table t1; diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index bdfeb26073f..cffca437cf1 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -1,3 +1,11 @@ +# This test doesn't work with the embedded version as this code +# assumes that one query is running while we are doing queries on +# a second connection. +# This would work if mysqltest run would be threaded and handle each +# connection in a separate thread. +# +-- source include/not_embedded.inc + connect (con1,localhost,root,,); connect (con2,localhost,root,,); diff --git a/mysql-test/t/tablelock.test b/mysql-test/t/tablelock.test index c32a3f7cd35..fa8c4f03675 100644 --- a/mysql-test/t/tablelock.test +++ b/mysql-test/t/tablelock.test @@ -2,6 +2,7 @@ # Test of lock tables # +drop table if exists t1,t2; create table t1 ( n int auto_increment primary key); lock tables t1 write; insert into t1 values(NULL); @@ -36,12 +37,10 @@ drop table t1; CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); lock tables t1 write,t1 as b write, t2 write, t2 as c read; -drop table t1; -drop table t2; +drop table t1,t2; CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); lock tables t1 write,t1 as b write, t2 write, t2 as c read; -drop table t2; -drop table t1; +drop table t2,t1; unlock tables; diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test index 0278f53c642..62d83388a67 100644 --- a/mysql-test/t/type_enum.test +++ b/mysql-test/t/type_enum.test @@ -2,6 +2,7 @@ # Problem with many enums # +DROP TABLE if exists t1; CREATE TABLE t1 ( field enum('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007','002008','002009','002012','002013','002014','003002','003003','003004','003005','003006','003007','003008','003009','003010','003011','003012','003013','003014','003015','003016','003017','003018','003019','004002','004003','004005','004006','004007','004008','004010','004012','004014','004016','004017','004020','004021','004022','004023','004024','004025','004026','006002','006004','006006','006010','006011','006012','006013','006014','007001','007002','007003','007004','007005','007006','007007','007008','007009','007010','007011','007012','007013','007014','007015','007016','007017','007018','007019','007020','007021','007022','007023','007024','007025','007026','007027','007028','007029','007030','007031','007032','007033','007034','007035','007036','007037','007038','007039','007040','007043','007044','009001','009002','009004','009005','009006','009007','009008','009009','009010','009011','009012','009013','010002','010003','010004','010005','010006','010007','010008','010009','010010','010011','010012','010013','010015','010016','010017','010018','010019','010020','010021','010022','010023','010024','010025','010026','010027','010028','011001','011002','011003','011004','011006','011012','011013','011014','011015','011016','012017','012018','012019','012023','012027','012028','012029','012030','012031','012032','012033','012034','012035','012036','012037','012038','012039','014001','016002','016003','016004','016007','016010','016011','016016','016019','016020','016021','016022','016023','016024','016026','016027','016028','016029','016030','016031','016032','016033','016034','017002','018001','019002','019004','020001','020003','020004','020005','020006','020007','020008','020009','022001','022002','022003','023001','023002','023003','023004','023005','023006','023007','023008','023010','023011','023012','023017','023019','023020','023021','023025','023026','023027','023028','023029','023030','023031','023032','023033','023034','023035','025001','025003','025004','025005','025006','025007','025008','025009','025010','025011','025012','025013','025014','025015','025016','025017','025018','025019','025020','025021','025022','025023','025024','025025','025026','025027','025028','025029','025030','025031','025032','025033','025034','025035','025036','025037','025038','025039','025040','025041','025042','025043','025044','025045','025046','025047','025048','025049','025050','025051','025052','025053','025054','025055','025056','025057','025058','025059','025060','025061','025062','025063','027001','027002','027011','035008','035012','036001','037001','037003','037004','037005','037006','037007','037008','037009','038004','038005','038006','038007','038009','039001','039002','039003','039004','039005','039006','046001','046002','046003','046004','046005','046007','046008','046009','046010','046011','046012','046013','046014','047001','047002','048001','051001','051002','051003','051004','052001','052002','052005','053015','053016','053019','053020','053023','053024','053026','053028','053029','053033','053034','053036','053037','053038','053039','053041','053042','053043','053045','053046','053047','053048','053051','053052','053054','053055','053056','053057','053068','053069','053070','053073','053074','053075','053086','053094','053095','053096','053097','053098','053099','053100','053101','053102','053103','053104','053105','053107','053122','053123','053124','053125','053127','053128','054001','054002','054003','054004','054005','054006','054007','054009','054010','056001','056002','056003','056004','056005','056006','056009','056010','056011','056016','056017','056018','056019','056020','056021','056022','057001','057002','057003','057004','058002','058003','058004','058005','060001','060003','060004','060005','060006','060007','061002','061003','061004','061005','061006','069006','069007','069010','069011','069012','069013','069014','069015','069016','069017','069018','069020','069021','069022','069023','069024','071002','071003','071004','071005','071006','071008','071011','071013','071020','071021','071022','072001','073001','073002','073003','073004','074001','074002','074003','074004','074005','074006','074007','074008','074009','074010','074011','074012','075001','075007','076101','076102','076103','077001','077002','077003','077004','077006','077007','077008','077009','078005','079002','079003','079004','079005','079006','079007','081001','082006','082007','082011','082013','082014','082015','082016','082017','082021','082022','082023','082024','082025','082026','082027','082028','082029','082030','082031','082032','082033','082034','082035','082036','082037','082038','082039','082040','082041','082042','082043','082044','084001','084002','084003','084004','084005','084007','084008','084009','084011','084013','084014','084016','084017','084027','084031','084032','084033','084035','084036','084037','084038','084039','084040','084041','084042','084043','084044','084045','084046','084047','084048','084049','084050','084051','085001','085002','085003','085004','085005','085006','085007','085009','085011','085012','085013','085014','085015','085016','085017','085018','085019','085020','085021','085022','085023','085028','085029','085030','085031','085033','085034','085035','085036','085037','085038','085040','085041','085042','085043','085044','085045','085046','085047','085048','085063','085064','085065','085068','085070','085071','085073','085082','085083','085086','085088','085089','085090','085091','085092','085093','085094','085095','085096','085097','085098','085099','085100','085101','085102','085103','085104','085105','085106','085107','085108','085109','085110','085111','085112','085113','085115','085119','085120','085121','085122','085123','085124','085125','085126','085127','085128','085129','085130','085132','085133','085134','085135','085136','085137','086001','086002','086003','086004','086005','088001','088003','088005','088006','088007','088008','088009','089001','090001','090002','090003','090004','090005','090006','090007','090008','090009','090010','090013','090015','090016','090017','090018','090019','090022','090027','090028','091001','091002','091005','091008','091009','091010','091011','091012','091013','091014','091015','091016','091017','091018','093001','093003','093098','093100','093102','093104','093141','093142','093146','093151','093153','093167','093168','093176','094001','094002','094004','094005','095004','099001','099002','100001','101001','102002','102003','105001','105002','106001','113001','113002','113003','113004','113005','113006','113007','113008','113009','113010','113011','113012','113013','113014','113015','113016','113017','113018','113019','113020','113021','113022','113023','113024','113025','113026','113027','113028','114001','115001','115002','115003','115004','115005','115006','115007','115008','115009','115010','115011','115012','115013','115014','115015','115016','115017','115018','115020','115021','115022','115023','115025','115026','115027','115028','115029','115030','115031','115032','115033','115034','115035','115036','115039','115040','115041','115042','115043','115044','115045','115046','115047','115048','115049','115050','115051','115052','115053','115054','115055','115056','115057','115059','115060','115061','115062','115063','115064','115065','115066','115067','115068','115069','115070','115071','115072','115073','115075','115076','115081','115082','115085','115086','115087','115088','115095','115096','115097','115098','115099','115101','115102','115103','115104','115105','115106','115108','115109','115110','115111','115112','115113','115114','115115','115116','115117','115118','115119','115120','115121','115122','116001','116002','116003','116004','116005','116006','116007','116008','116009','116010','116011','116012','117001','117002','117003','123001','124010','124014','124015','124019','124024','124025','124026','124027','124028','124029','124030','124031','124032','124033','124035','124036','124037','124038','124039','124040','124041','124042','124043','124044','124045','124046','124047','124048','124049','124050','124051','124052','124053','124054','124055','124056','124057','124058','124059','124060','124061','124062','124063','124064','124065','126001','126002','126003','126004','126005','126006','126007','126008','126009','126010','126011','126012','130001','132001','132002','132003','133001','133008','133009','133010','133011','133012','133013','133014','133015','133016','133017','133018','133019','133020','133021','133022','133023','133024','133025','133027','133028','133029','133030','133031','134001','135001','135002','135003','135004','135005','135006','135007','135008','135009','135010','136001','137009','137010','137011','137012','137013','137014','137015','137016','137017','137018','137019','138001','138002','138003','138004','139001','139003','140001','141001','141002','141003','141006','141007','141008','141009','141011','141012','141014','141015','141016','141017','141018','141019','141020','141021','141022','141023','141024','141025','141026','141027','141028','142001','142002','142003','142004','142005','142006','142007','142008','142010','142011','142012','144001','145001','145002','145003','145004','145005','145006','145007','145008','145009','145010','145011','145012','145013','145014','145015','145016','147001','150003','150005','150009','150013','150014','150015','150016','150017','150020','150021','152001','152002','152003','152004','152005','152006','152007','154001','154002','154003','155001','155002','155003','155004','155005','155006','159001','159002','159003','159004','160001','160002','160003','161001','162001','162002','162003','162004','162007','162010','162011','162012','163001','163002','163003','163005','163010','163011','163014','163015','163016','165001','165002','165003','165004','165005','165006','165007','165008','165009','165010','165011','165012','165013','165014','165015','165016','165017','165018','165019','165020','165021','165022','165023','165024','165025','165026','165027','165028','165029','165030','165031','165032','165033','165034','165035','165036','167001','168001','168002','168003','168004','168005','168007','168008','168009','168010','168011','168012','168013','168014','169001','169002','169003','169007','169008','169009','169010','170001','171001','171002','171003','171004','171005','171006','171007','171008','171009','172001','174001','174002','174003','176001','176002','176003','177001','177002','179001','179002','179003','179004','179005','179006','179007','179008','179009','179010','179011','179012','179013','179014','179015','179016','179017','179018','179019','179020','179021','179022','179023','179024','179025','179026','179027','179028','179029','179030','179031','179032','179033','179034','179035','179036','179037','179038','179039','179040','179041','179042','179043','179044','179045','179046','179047','180001','180010','180012','180013','180014','180015','180016','180017','180018','180019','180020','180021','180022','180023','180024','180025','180026','180027','180028','180030','180031','180032','180033','180034','180035','180036','180037','180038','180039','180041','180042','180043','180044','180045','180046','180047','180048','180049','180050','180051','180052','180053','180054','180055','180056','180057','180058','180059','180060','180061','180062','180063','180064','180065','180066','180067','180068','180069','180070','180071','182001','184001','184002','184005','184006','184007','184008','184009','184010','184011','185001','185003','187001','188001','188002','188003','188004','188005','188006','188007','188008','188009','188010','188011','191001','191002','192002','194001','194002','194003','194004','194005','194006','194007','195001','195002','195003','195004','195005','195006','195007','196001','196002','197001','197002','197003','197004','197005','197006','198001','198003','198004','198005','198006','198007','198008','198009','198010','198011','198012','198013','198014','198015','198016','198017','201001','201002','201005','202001','203001','203002','203003','203017','203018','203019','204001','204002','204003','205001','208001','208002','208003','208004','208005','209001','209002','209003','210001','210002','210003','210004','210005','210006','210007','210008','210009','210010','210011','210012','210013','211017','212001','212002','212003','212004','212005','212006','212007','212008','212009','212010','212011','212012','212013','218001','218003','218004','218006','218007','218008','218009','218011','218015','218016','218017','218018','218019','218020','218021','218022','218023','218024','218025','218026','218027','218028','218029','218030','218031','218032','218033','218034','218035','218036','221001','221002','221003','221004','221005','221006','221007','221008','221009','221010','221011','221012','221013','223001','223002','223003','224001','224002','224003','224006','224007','224008','225001','225002','225003','225004','225005','225006','225007','225008','225009','225010','225011','225012','225013','226001','226002','226003','226004','226005','226006','226007','226008','226009','227001','227002','227003','227004','227005','227006','227007','227008','227009','227010','227011','227012','227013','227014','227015','227016','227017','227018','227019','227020','227021','227022','227023','227024','227025','227026','227027','227028','227029','227030','227031','227032','227033','227034','227035','227036','227037','227038','227039','227040','227041','227042','227043','227044','227045','227046','227047','227048','227049','227050','227051','227052','227053','227054','227055','227056','227057','227058','227059','227060','227061','227062','227063','227064','227065','227066','227067','227068','227069','227070','227071','227072','227073','227074','227075','227076','227077','227078','227079','227080','227081','227082','227083','227084','227085','227086','227087','227088','227089','227090','227091','227092','227093','227094','227095','227096','227097','227098','227099','227100','227101','227102','227103','227104','227105','227106','227107','227108','227109','227110','227111','227112','227113','227114','227115','227116','227117','227118','227119','227120','227122','227123','227124','227125','227126','227127','227128','227129','227130','227131','227132','227133','227134','227135','227136','227137','227138','227139','227140','227141','227142','227143','227144','227145','227146','227147','227148','227149','227150','227151','227152','228001','229001','229002','229003','229004','229005','230001','230002','232001','233001','233002','233003','233004','233005','233006','233007','233008','234001','234002','234003','234004','234005','234006','234007','234008','234009','234010','234011','234012','234013','234014','234015','234016','234017','234018','234019','234020','234021','234022','234023','234024','234025','234026','234027','234028','234029','234030','235001','235002','235003','235004','235005','236001','236002','236003','237001','238002','238003','238004','238005','238006','238007','238008','333013','333014','333015','333016','333017','333018','333019','333020','333021','333022','333023','333024','333025','333030','333031','333032','333033','333034','333035','334001','334002','334003','334004','334005','334006','334007','336004','337001','337002','337003','337004','339001','339002','343001','344001','344002','344003','344004','344005','345001','345002','345003','347001','347002','348001','348002','348003','348004','348005','349001','349002','349003','350001','353001','353002','353003','353004','355001','355002','355003','355004','355005','355006','356001','358001','359001','359002','360001','360002','360003','360004','360005','366001','366002','366003','366004','369001','373001','373002','373003','373004','373005','373006','373007','373008','373009','373010','373011','373012','373013','373014','373015','373016','373017','373018','373019','373020','373021','374001','374002','374003','374004','374005','374006','374007','374008','374009','374010','374011','374012','374013','374014','374015','374016','376001','376002','376003','376004','376005','376006','376007','376008','376009','376010','376011','376012','376013','376016','376017','376018','376019','376020','376021','379003','382001','382002','383001','384001','384002','385001','385002','386001','386002','386003','386004','386005','386006','386007','386008','386009','386010','386011','386012','386013','386014','387001','389001','389002','389003','389004','392001','393001','393002','393003','393004','395001','396001','397001','397002','399001','399002','399003','400001','400002','401001','401002','401003','402001','402002','402003','402004','402005','403001','403002','403003','504001','504002','504004','504005','504006','504007','504008','504009','504010','504011','504012','504013','504014','504017','504018','504019','504021','504022','504023','504024','504025','506001','506002','508001','508002','511001','511002','511003','511004','511005','511006','511007','511008','511009','511010','511011','511012','511013','511014','511017','511018','511020','511021','511022','511024','511028','511029','513001','513002','513003','513004','514001','515001','515002','515003','515007','515008','515009','515010','515011','515012','515013','515014','515015','518001','518002','518003','520001','520002','521001','521002','521003','521004','521005','521006','521007','521008','521009','521010','521011','521012','521013','521014','521015','521016','523001','523002','523003','523004','523005','523006','523007','524001','700001','701001','701002','701003','702001','702002','702003','702004','702005','702006','702007','702008','703001','703002','703003','704001','704002','704003','704004','705001','706001','706002','707001','707002','707003','708001','709001','709002','710001','710002','711001','711002','712001','713001','713002','714001','714002','715001','716001','718001','718002','719001','719002','991001','991002','991003','991004','991005','991006','991007','991008','992001','995001','996001','996002','996003','998001','998002','998003','998004','998005','998006','998007','999001','999002','011017','011018','034001','034002','071010','208006','239001','519001','519003','126013','184012','053071','374017','374018','374019','374020','374021','404001','405002','405001','405003','405007','405006','405005','405004','240011','240010','240009','240008','240007','240006','240005','240004','240003','240002','240001','240012','240013','240014','240015','240016','240017','357001','235006','235007','712002','355008','355007','056023','999999','046015','019005','126014','241003','241002','241001','240018','240020','240019','242001','242002','242003','242004','242005','242006','089002','406001','406002','406003','406004','406005','406006','243001','243002','243003','243004','243005','243006','243007','243008','010030','010029','407001','407006','407005','407004','407003','407002','408001','366005','133032','016035','077010','996004','025064','011019','407007','407008','407009','409001','115123','504026','039007','039009','039008','039010','039011','039012','180072','240021','240023','408002','405008','235008','525001','525002','525003','525004','410001','410002','410003','410004','410005','410006','410007','410008','410009','410010','410011','410012','410013','410014','410015','410016','344006','240031','240030','240029','240028','240027','240026','240025','240024','240034','240033','240032','410017','410018','411001','411002','411003','411004','411005','411006','411007','411008','203020','203021','203022','412001','412002','412003','412004','069025','244001','244002','244009','244008','244007','244006','244005','244004','244003','244015','244014','244013','244012','244011','244010','244016','244017','240042','240041','240040','240039','240038','240037','240036','240035','405009','405010','240043','504034','504033','504032','504031','504030','504029','504028','504027','504042','504041','504040','504039','504038','504037','504036','504035','800001','410019','410020','410021','244018','244019','244020','399004','413001','504043','198018','198019','344007','082045','010031','010032','010033','010034','010035','504044','515016','801002','801003','801004','801005','802001','801001','414001','414002','414003','141029','141030','803001','803002','803003','803004','803005','803006','803007','803008','803009','803010','803011','803012','803013','803014','803015','803016','803017','410022','410023','803018','803019','803020','415002','415001','244021','011020','011023','011022','011021','025065','165037','165038','165039','416001','416002','416003','417001','418001','504045','803022','803021','240022','419001','420001','804010','804009','804008','804007','804006','804005','804004','804003','804002','804001','804020','804019','804018','804017','804016','804015','804014','804013','804012','804011','804024','804021','804023','804022','511019','511016','511015','511032','511031','511030','511027','511026','511025','511033','511023','133034','133033','169011','344008','344009','244022','244026','244025','244030','244023','244024','244027','244028','244029','244031','082046','082047','082048','126015','126016','416004','416005','421001','421002','016037','016036','115124','115125','115126','240049','240048','240047','240046','240045','240044','244032','244033','422001','422002','422003','422004','422005','184013','239002','805001','805002','805003','805004','805005','056024','423001','344010','235009','212014','056025','056026','802002','244034','244035','244036','244037','244038','244039','515017','504046','203015','245002','245001','071023','056027','056028','056029','056030','056031','056032','424001','056034','056033','805006','805007','805008','805009','805010','422008','422007','422006','422010','422009','422011','209004','150022','150023','100002','056035','023036','185004','185005','246001','247001','247002','425001','416006','165042','165041','165040','165043','010040','010039','010038','010037','010036','422012','422013','422014','422015','426000','248001','248002','248003','248004','248005','249001','249002','249003','249004','249005','249006','250007','250001','250002','250003','250004','250005','250006','250008','250009','250010','250011','250012','250013','251001','251002','422016','422017','422018','806001','806002','116013','235010','235011','091026','091027','091028','091029','091019','091020','091021','091022','091023','091024','091025','252001','243009','249007','249008','249009','011024','011025','427001','428002','428001','169012','429001','429002','429003') DEFAULT '001001' NOT NULL, KEY field (field) diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index a4a29c76e65..5c4a62d5c41 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -61,5 +61,8 @@ CREATE TABLE t1 ( INSERT INTO t1 (pseudo,pseudo1,same) VALUES ('joce', 'testtt', 1),('joce', 'tsestset', 1),('dekad', 'joce', 1); SELECT pseudo FROM t1 WHERE pseudo1='joce' UNION SELECT pseudo FROM t1 WHERE pseudo='joce'; SELECT pseudo1 FROM t1 WHERE pseudo1='joce' UNION SELECT pseudo1 FROM t1 WHERE pseudo='joce'; -SELECT * FROM t1 WHERE pseudo1='joce' UNION SELECT * FROM t1 WHERE pseudo='joce' order by pseudo desc; +SELECT * FROM t1 WHERE pseudo1='joce' UNION SELECT * FROM t1 WHERE pseudo='joce' order by pseudo desc,pseudo1 desc; +SELECT pseudo1 FROM t1 WHERE pseudo='joce' UNION SELECT pseudo FROM t1 WHERE pseudo1='joce'; +SELECT pseudo1 FROM t1 WHERE pseudo='joce' UNION ALL SELECT pseudo FROM t1 WHERE pseudo1='joce'; +SELECT pseudo1 FROM t1 WHERE pseudo='joce' UNION SELECT 1; drop table t1; |