Skip to content

Commit

Permalink
Results updated for tokudb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun Gupta committed Apr 25, 2019
1 parent 6599cd9 commit 8747297
Show file tree
Hide file tree
Showing 29 changed files with 100 additions and 1 deletion.
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_add_drop.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, d int, key(a), key(b), key(c));
insert into tt values (0,0,0,0),(1,0,0,0),(2,0,1,0),(3,0,1,0);
show indexes from tt;
Expand Down Expand Up @@ -37,4 +39,5 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 1 a 1 a A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
tt 1 d 1 d A 2 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_add_index.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
Expand Down Expand Up @@ -46,4 +48,5 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 1 b 1 b A 2 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_drop_index.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
Expand Down Expand Up @@ -29,4 +31,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, primary key(a), key(b), key(c));
insert into tt values (0, 0, 0), (0+1, 0, 0), (0+2, 0, 0), (0+3, 0, 0);
insert into tt values (4, 4, 0), (4+1, 4, 0), (4+2, 4, 0), (4+3, 4, 0);
Expand Down Expand Up @@ -156,4 +158,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 500 NULL NULL BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
Expand All @@ -26,4 +28,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 b 1 b A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_pk_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, primary key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
show indexes from tt;
Expand All @@ -19,4 +21,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 0 PRIMARY 2 b A 4 NULL NULL BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, primary key(a), key(b));
insert into tt values (4*0,4*0+1),(4*0+1,4*0+2),(4*0+2,4*0+3),(4*0+3,4*0+4);
insert into tt values (4*1,4*1+1),(4*1+1,4*1+2),(4*1+2,4*1+3),(4*1+3,4*1+4);
Expand Down Expand Up @@ -2037,4 +2039,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4000 NULL NULL BTREE
tt 1 b 1 b A 2 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_sk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, key(b));
insert into tt values (1,0),(2,1),(3,2),(4,3);
insert into tt values (5,0),(6,1),(7,2),(8,3);
Expand All @@ -17,4 +19,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 b 1 b A 8 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
3 changes: 3 additions & 0 deletions storage/tokudb/mysql-test/tokudb/r/card_sk_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
show indexes from tt;
Expand All @@ -19,4 +21,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 a 1 a A 4 NULL NULL YES BTREE
tt 1 a 2 b A 4 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_add_drop.test
Expand Up @@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, d int, key(a), key(b), key(c));
insert into tt values (0,0,0,0),(1,0,0,0),(2,0,1,0),(3,0,1,0);

Expand All @@ -24,5 +27,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_add_index.test
Expand Up @@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);

Expand All @@ -30,5 +33,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_drop_index.test
Expand Up @@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);

Expand All @@ -26,5 +29,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test
Expand Up @@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, primary key(a), key(b), key(c));
let $a=0;
while ($a < 500) {
Expand All @@ -32,4 +35,5 @@ show indexes from tt;
flush tables;
show indexes from tt;

set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test
Expand Up @@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);

Expand All @@ -22,5 +25,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_pk_2.test
Expand Up @@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, primary key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);

Expand All @@ -16,5 +19,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test
Expand Up @@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, primary key(a), key(b));
let $i=0;
while ($i < 1000) {
Expand Down Expand Up @@ -40,6 +43,7 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;

Expand Down
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test
Expand Up @@ -6,6 +6,9 @@ set @orig_throttle = @@session.tokudb_analyze_throttle;
set @orig_time = @@session.tokudb_analyze_time;
set @orig_scale_percent = @@global.tokudb_cardinality_scale_percent;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, c int, d int, primary key(a), key(b), key(c), key(d)) engine=tokudb;
let $i=0;
while ($i < 1000) {
Expand Down Expand Up @@ -50,5 +53,6 @@ drop table tt;
set session tokudb_analyze_throttle = @orig_throttle;
set session tokudb_analyze_time = @orig_time;
set global tokudb_cardinality_scale_percent = @orig_scale_percent;
set @@use_stat_tables = @save_use_stat_tables;

-- enable_query_log
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_sk.test
Expand Up @@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, key(b));
insert into tt values (1,0),(2,1),(3,2),(4,3);
insert into tt values (5,0),(6,1),(7,2),(8,3);
Expand All @@ -17,5 +20,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
4 changes: 4 additions & 0 deletions storage/tokudb/mysql-test/tokudb/t/card_sk_2.test
Expand Up @@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;

set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;

create table tt (a int, b int, key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);

Expand All @@ -16,5 +19,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
set @@use_stat_tables = @save_use_stat_tables;

drop table tt;
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
set @save_use_stat_tables= @@use_stat_tables;
set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
Expand All @@ -19,4 +21,5 @@ show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 6 NULL NULL BTREE
t 1 x 1 x A 6 NULL NULL YES BTREE
set @@use_stat_tables= @save_use_stat_tables;
drop table t;
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
set @save_use_stat_tables= @@use_stat_tables;
set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
Expand All @@ -18,4 +20,5 @@ show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
set @@use_stat_tables= @save_use_stat_tables;
drop table t;
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
Expand All @@ -19,4 +21,5 @@ show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 7 NULL NULL BTREE
t 1 x 1 x A 7 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table t;
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
Expand All @@ -18,4 +20,5 @@ show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table t;
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
set @save_use_stat_tables = @@use_stat_tables;
set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, y int, primary key (id), key (x), key (y))
partition by range(id)
( partition p0 values less than (10), partition p1 values less than maxvalue);
Expand Down Expand Up @@ -31,7 +33,7 @@ insert into t values (100,1,1),(200,2,1),(300,3,1),(400,4,1),(500,5,1);
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 9 NULL NULL BTREE
t 1 x 1 x A 2 NULL NULL YES BTREE
t 1 x 1 x A 9 NULL NULL YES BTREE
t 1 y 1 y A 9 NULL NULL YES BTREE
alter table t analyze partition p0;
Table Op Msg_type Msg_text
Expand All @@ -51,4 +53,5 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t 0 PRIMARY 1 id A 9 NULL NULL BTREE
t 1 x 1 x A 9 NULL NULL YES BTREE
t 1 y 1 y A 9 NULL NULL YES BTREE
set @@use_stat_tables = @save_use_stat_tables;
drop table t;
Expand Up @@ -5,11 +5,14 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
set @save_use_stat_tables= @@use_stat_tables;
set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (1,1),(3,1),(5,1);
insert into t values (2,1),(4,1),(6,1);
show indexes from t;
analyze table t;
show indexes from t;
set @@use_stat_tables= @save_use_stat_tables;
drop table t;

0 comments on commit 8747297

Please sign in to comment.