From 11dbc697aa56c07705168abcbf33209da947881c Mon Sep 17 00:00:00 2001 From: Christian Rober Date: Mon, 16 Jan 2012 17:44:31 +0000 Subject: [PATCH] [t:4324] First batch of fixed tests. Only includes update rows column. git-svn-id: file:///svn/mysql/tests/mysql-test@38875 c7de825b-a66e-492c-adef-691d508d4ae1 --- mysql-test/suite/tokudb.bugs/r/1684.result | 2 +- mysql-test/suite/tokudb.bugs/r/1872.result | 8 ++--- mysql-test/suite/tokudb.bugs/r/895.result | 4 +-- .../suite/tokudb.bugs/r/index_read.result | 36 +++++++++---------- mysql-test/suite/tokudb.bugs/t/1684.test | 2 ++ mysql-test/suite/tokudb.bugs/t/1872.test | 8 +++++ mysql-test/suite/tokudb.bugs/t/895.test | 4 +++ .../suite/tokudb.bugs/t/index_read.test | 36 +++++++++++++++++++ 8 files changed, 75 insertions(+), 25 deletions(-) diff --git a/mysql-test/suite/tokudb.bugs/r/1684.result b/mysql-test/suite/tokudb.bugs/r/1684.result index 0e10719e0dc..e8cc9332e09 100755 --- a/mysql-test/suite/tokudb.bugs/r/1684.result +++ b/mysql-test/suite/tokudb.bugs/r/1684.result @@ -9,7 +9,7 @@ insert into foo values (4,"four"); alter table foo add clustering key a(a); explain select * From foo where a > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range a a 5 NULL 5 Using where +1 SIMPLE foo range a a 5 NULL NULL; Using where select * From foo where a > 0; a b 1 one diff --git a/mysql-test/suite/tokudb.bugs/r/1872.result b/mysql-test/suite/tokudb.bugs/r/1872.result index ba85b33f369..92759de3cb9 100755 --- a/mysql-test/suite/tokudb.bugs/r/1872.result +++ b/mysql-test/suite/tokudb.bugs/r/1872.result @@ -20,23 +20,23 @@ count(*) alter table foo add index (a), add index (b); explain select * from foo where a=2 and b=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index_merge a,b a,b 5,5 NULL 1024 Using intersect(a,b); Using where +1 SIMPLE foo index_merge a,b a,b 5,5 NULL NULL; Using intersect(a,b); Using where alter table foo drop index a; alter table foo add clustering index (a); explain select * from foo where a=2 and b=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref b,a a 5 const 6144 Using where +1 SIMPLE foo ref b,a a 5 const NULL; Using where alter table foo drop index a; alter table foo drop index b; alter table foo add index (a); alter table foo add clustering index(b); explain select * from foo where a=2 and b=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref a,b b 5 const 6144 Using where +1 SIMPLE foo ref a,b b 5 const NULL; Using where alter table foo drop index a; alter table foo drop index b; alter table foo add clustering index (a), add clustering index (b); explain select * from foo where a=2 and b=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref a,b a 5 const 6144 Using where +1 SIMPLE foo ref a,b a 5 const NULL; Using where DROP TABLE foo; diff --git a/mysql-test/suite/tokudb.bugs/r/895.result b/mysql-test/suite/tokudb.bugs/r/895.result index 8b4ad7d7947..33eeaba3198 100644 --- a/mysql-test/suite/tokudb.bugs/r/895.result +++ b/mysql-test/suite/tokudb.bugs/r/895.result @@ -4,9 +4,9 @@ CREATE TABLE t (r INT, s INT, t BIGINT, PRIMARY KEY (r, s)); INSERT INTO t VALUES (1,2,3),(4,5,6); EXPLAIN SELECT * FROM t WHERE r > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t range PRIMARY PRIMARY 4 NULL 2 Using where +1 SIMPLE t range PRIMARY PRIMARY 4 NULL NULL; Using where CREATE INDEX it on t(t); EXPLAIN SELECT * FROM t WHERE r > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t index PRIMARY it 9 NULL 2 Using where; Using index +1 SIMPLE t index PRIMARY it 9 NULL NULL; Using where; Using index DROP TABLE t; diff --git a/mysql-test/suite/tokudb.bugs/r/index_read.result b/mysql-test/suite/tokudb.bugs/r/index_read.result index d7f12d65ad9..49518d64b2e 100755 --- a/mysql-test/suite/tokudb.bugs/r/index_read.result +++ b/mysql-test/suite/tokudb.bugs/r/index_read.result @@ -19,14 +19,14 @@ a b c 6 600 600 explain select * from foo where a=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref PRIMARY PRIMARY 4 const 2 +1 SIMPLE foo ref PRIMARY PRIMARY 4 const NULL; select * from foo where a=4; a b c 4 40 400 4 400 400 explain select * from foo where a>4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 4 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL NULL; Using where select * from foo where a>4; a b c 5 50 500 @@ -35,7 +35,7 @@ a b c 6 600 600 explain select * from foo where a<3 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 4 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL NULL; Using where select * from foo where a<3 order by a desc; a b c 2 200 200 @@ -44,7 +44,7 @@ a b c 1 10 100 explain select * from foo where a>=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 6 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL NULL; Using where select * from foo where a>=4; a b c 4 40 400 @@ -55,7 +55,7 @@ a b c 6 600 600 explain select * from foo where a<=2 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 4 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL NULL; Using where select * from foo where a<=2 order by a desc; a b c 2 200 200 @@ -64,7 +64,7 @@ a b c 1 10 100 explain select * from foo where a=4 order by b desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref PRIMARY PRIMARY 4 const 2 Using where +1 SIMPLE foo ref PRIMARY PRIMARY 4 const NULL; Using where select * from foo where a=4 order by b desc; a b c 4 400 400 @@ -73,14 +73,14 @@ alter table foo drop primary key; alter table foo add clustering index clst_a(a,b); explain select * from foo where a=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref clst_a clst_a 4 const 2 +1 SIMPLE foo ref clst_a clst_a 4 const NULL; select * from foo where a=4; a b c 4 40 400 4 400 400 explain select * from foo where a>4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range clst_a clst_a 4 NULL 4 Using where +1 SIMPLE foo range clst_a clst_a 4 NULL NULL; Using where select * from foo where a>4; a b c 5 50 500 @@ -89,7 +89,7 @@ a b c 6 600 600 explain select * from foo where a<3 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range clst_a clst_a 4 NULL 4 Using where +1 SIMPLE foo range clst_a clst_a 4 NULL NULL; Using where select * from foo where a<3 order by a desc; a b c 2 200 200 @@ -98,7 +98,7 @@ a b c 1 10 100 explain select * from foo where a>=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range clst_a clst_a 4 NULL 6 Using where +1 SIMPLE foo range clst_a clst_a 4 NULL NULL; Using where select * from foo where a>=4; a b c 4 40 400 @@ -109,7 +109,7 @@ a b c 6 600 600 explain select * from foo where a<=2 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range clst_a clst_a 4 NULL 4 Using where +1 SIMPLE foo range clst_a clst_a 4 NULL NULL; Using where select * from foo where a<=2 order by a desc; a b c 2 200 200 @@ -118,7 +118,7 @@ a b c 1 10 100 explain select * from foo where a=4 order by b desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref clst_a clst_a 4 const 2 Using where +1 SIMPLE foo ref clst_a clst_a 4 const NULL; Using where select * from foo where a=4 order by b desc; a b c 4 400 400 @@ -127,14 +127,14 @@ alter table foo drop index clst_a; alter table foo add index (a,b); explain select * from foo where a=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref a a 4 const 2 +1 SIMPLE foo ref a a 4 const NULL; select * from foo where a=4; a b c 4 40 400 4 400 400 explain select * from foo where a>4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range a a 4 NULL 4 Using where +1 SIMPLE foo range a a 4 NULL NULL; Using where select * from foo where a>4; a b c 5 50 500 @@ -143,7 +143,7 @@ a b c 6 600 600 explain select * from foo where a<3 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range a a 4 NULL 4 Using where +1 SIMPLE foo range a a 4 NULL NULL; Using where select * from foo where a<3 order by a desc; a b c 2 200 200 @@ -152,7 +152,7 @@ a b c 1 10 100 explain select * from foo where a>=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range a a 4 NULL 6 Using where +1 SIMPLE foo range a a 4 NULL NULL; Using where select * from foo where a>=4; a b c 4 40 400 @@ -163,7 +163,7 @@ a b c 6 600 600 explain select * from foo where a<=2 order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range a a 4 NULL 4 Using where +1 SIMPLE foo range a a 4 NULL NULL; Using where select * from foo where a<=2 order by a desc; a b c 2 200 200 @@ -172,7 +172,7 @@ a b c 1 10 100 explain select * from foo where a=4 order by b desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo ref a a 4 const 2 Using where +1 SIMPLE foo ref a a 4 const NULL; Using where select * from foo where a=4 order by b desc; a b c 4 400 400 diff --git a/mysql-test/suite/tokudb.bugs/t/1684.test b/mysql-test/suite/tokudb.bugs/t/1684.test index 099478197b8..d74bba3404c 100755 --- a/mysql-test/suite/tokudb.bugs/t/1684.test +++ b/mysql-test/suite/tokudb.bugs/t/1684.test @@ -18,6 +18,8 @@ insert into foo values (4,"four"); alter table foo add clustering key a(a); +#ignore rows column +--replace_column 9 NULL; explain select * From foo where a > 0; select * From foo where a > 0; diff --git a/mysql-test/suite/tokudb.bugs/t/1872.test b/mysql-test/suite/tokudb.bugs/t/1872.test index a9b1e8ce59b..f8cde1e592d 100644 --- a/mysql-test/suite/tokudb.bugs/t/1872.test +++ b/mysql-test/suite/tokudb.bugs/t/1872.test @@ -24,21 +24,29 @@ insert into foo select * from foo; select count(*) from foo; alter table foo add index (a), add index (b); +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=2 and b=2; alter table foo drop index a; alter table foo add clustering index (a); +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=2 and b=2; alter table foo drop index a; alter table foo drop index b; alter table foo add index (a); alter table foo add clustering index(b); +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=2 and b=2; alter table foo drop index a; alter table foo drop index b; alter table foo add clustering index (a), add clustering index (b); +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=2 and b=2; # Final cleanup. diff --git a/mysql-test/suite/tokudb.bugs/t/895.test b/mysql-test/suite/tokudb.bugs/t/895.test index 905cad3cd91..fa450003bb1 100644 --- a/mysql-test/suite/tokudb.bugs/t/895.test +++ b/mysql-test/suite/tokudb.bugs/t/895.test @@ -9,8 +9,12 @@ DROP TABLE IF EXISTS t; CREATE TABLE t (r INT, s INT, t BIGINT, PRIMARY KEY (r, s)); INSERT INTO t VALUES (1,2,3),(4,5,6); +# ignore rows column +--replace_column 9 NULL; EXPLAIN SELECT * FROM t WHERE r > 0; CREATE INDEX it on t(t); +# ignore rows column +--replace_column 9 NULL; EXPLAIN SELECT * FROM t WHERE r > 0; # Final cleanup. diff --git a/mysql-test/suite/tokudb.bugs/t/index_read.test b/mysql-test/suite/tokudb.bugs/t/index_read.test index b48bf6eb24c..fe0fb0bbfc3 100755 --- a/mysql-test/suite/tokudb.bugs/t/index_read.test +++ b/mysql-test/suite/tokudb.bugs/t/index_read.test @@ -14,28 +14,40 @@ insert into foo values (1,100,100),(2,200,200),(3,300,300),(4,400,400),(5,500,50 select * from foo; #HA_READ_KEY_EXACT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4; select * from foo where a=4; #HA_READ_AFTER_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>4; select * from foo where a>4; #HA_READ_BEFORE_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<3 order by a desc; select * from foo where a<3 order by a desc; #HA_READ_KEY_OR_NEXT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>=4; select * from foo where a>=4; #HA_READ_KEY_OR_PREV not used anymore #HA_READ_PREFIX_LAST_OR_PREV +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<=2 order by a desc; select * from foo where a<=2 order by a desc; #HA_READ_PREFIX_LAST +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4 order by b desc; select * from foo where a=4 order by b desc; @@ -44,28 +56,40 @@ alter table foo drop primary key; alter table foo add clustering index clst_a(a,b); #HA_READ_KEY_EXACT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4; select * from foo where a=4; #HA_READ_AFTER_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>4; select * from foo where a>4; #HA_READ_BEFORE_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<3 order by a desc; select * from foo where a<3 order by a desc; #HA_READ_KEY_OR_NEXT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>=4; select * from foo where a>=4; #HA_READ_KEY_OR_PREV not used anymore #HA_READ_PREFIX_LAST_OR_PREV +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<=2 order by a desc; select * from foo where a<=2 order by a desc; #HA_READ_PREFIX_LAST +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4 order by b desc; select * from foo where a=4 order by b desc; @@ -73,28 +97,40 @@ alter table foo drop index clst_a; alter table foo add index (a,b); #HA_READ_KEY_EXACT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4; select * from foo where a=4; #HA_READ_AFTER_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>4; select * from foo where a>4; #HA_READ_BEFORE_KEY +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<3 order by a desc; select * from foo where a<3 order by a desc; #HA_READ_KEY_OR_NEXT +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a>=4; select * from foo where a>=4; #HA_READ_KEY_OR_PREV not used anymore #HA_READ_PREFIX_LAST_OR_PREV +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a<=2 order by a desc; select * from foo where a<=2 order by a desc; #HA_READ_PREFIX_LAST +# ignore rows column +--replace_column 9 NULL; explain select * from foo where a=4 order by b desc; select * from foo where a=4 order by b desc;