Commit 87472974 authored by Varun Gupta's avatar Varun Gupta

Results updated for tokudb tests

parent 6599cd98
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;
......@@ -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;
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;
......@@ -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;
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;
......@@ -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;
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);
......@@ -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;
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;
......@@ -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;
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;
......@@ -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;
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);
......@@ -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;
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);
......@@ -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;
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;
......@@ -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;
......@@ -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);
......@@ -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;
......@@ -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);
......@@ -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;
......@@ -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);
......@@ -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;
......@@ -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) {
......@@ -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;
......@@ -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);
......@@ -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;
......@@ -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);
......@@ -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;
......@@ -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) {
......@@ -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;
......
......@@ -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) {
......@@ -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
......@@ -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);
......@@ -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;
......@@ -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);
......@@ -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;
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
......@@ -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;
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
......@@ -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;
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
......@@ -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;
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
......@@ -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;
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);
......@@ -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
......@@ -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;
......@@ -5,6 +5,8 @@ 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);
......@@ -12,4 +14,5 @@ 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;
......@@ -5,10 +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);
show indexes from t;
analyze table t;
show indexes from t;
set @@use_stat_tables= @save_use_stat_tables;
drop table t;
......@@ -5,6 +5,8 @@ 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,2),(5,3);
......@@ -12,4 +14,5 @@ insert into t values (2,1),(4,1),(6,1),(8,1);
show indexes from t;
analyze table t;
show indexes from t;
set @@use_stat_tables = @save_use_stat_tables;
drop table t;
......@@ -5,10 +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 (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;
......@@ -4,6 +4,8 @@ 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, y int, primary key (id), key (x), key (y))
partition by range(id)
......@@ -22,5 +24,6 @@ alter table t analyze partition p0;
show indexes from t;
alter table t analyze partition p1;
show indexes from t;
set @@use_stat_tables = @save_use_stat_tables;
drop table t;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment