[Commits] 876044e: MDEV-16188 Post merge fixes fot TokuDB
revision-id: 876044ee0a7d98bc0242fec1b88fed2360863a1b (mariadb-10.3.6-108-g876044e) parent(s): 9e114455a95c15cd1e37dabef0dff1fe2588d50a author: Igor Babaev committer: Igor Babaev timestamp: 2019-02-08 00:03:09 -0800 message: MDEV-16188 Post merge fixes fot TokuDB --- sql/handler.h | 2 + sql/multi_range_read.cc | 19 ++- storage/tokudb/ha_tokudb.cc | 20 +-- storage/tokudb/ha_tokudb.h | 1 + .../mysql-test/tokudb/include/cluster_key.inc | 73 ++++----- .../mysql-test/tokudb/r/cluster_2968-2.result | 2 +- .../tokudb/r/cluster_create_table.result | 8 +- .../mysql-test/tokudb/r/cluster_delete.result | 128 +++++++++------- .../mysql-test/tokudb/r/cluster_filter_key.result | 13 +- .../tokudb/mysql-test/tokudb/r/cluster_key.result | 165 +++++++++++---------- .../mysql-test/tokudb/r/cluster_query_plan.result | 8 +- .../tokudb/r/cluster_tokudb_bug_993_2.result | 4 +- .../mysql-test/tokudb/r/cluster_update.result | 115 ++++++++------ .../mysql-test/tokudb/r/ext_key_1_innodb.result | 2 +- .../mysql-test/tokudb/r/ext_key_1_tokudb.result | 2 +- .../mysql-test/tokudb/r/ext_key_2_innodb.result | 2 +- .../mysql-test/tokudb/r/ext_key_2_tokudb.result | 2 +- storage/tokudb/mysql-test/tokudb/r/mvcc-29.result | 4 +- storage/tokudb/mysql-test/tokudb/r/mvcc-30.result | 4 +- storage/tokudb/mysql-test/tokudb/r/mvcc-31.result | 4 +- .../tokudb/mysql-test/tokudb/r/tokudb_mrr.result | 12 +- storage/tokudb/mysql-test/tokudb/r/type_bit.result | 2 +- .../tokudb/mysql-test/tokudb/r/type_blob.result | 4 +- .../mysql-test/tokudb/t/cluster_create_table.test | 4 +- .../tokudb/mysql-test/tokudb/t/cluster_delete.test | 50 ++++--- .../mysql-test/tokudb/t/cluster_filter_key.test | 8 +- .../mysql-test/tokudb/t/cluster_query_plan.test | 8 +- .../tokudb/mysql-test/tokudb/t/cluster_update.test | 43 +++--- storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test | 8 +- 29 files changed, 403 insertions(+), 314 deletions(-) diff --git a/sql/handler.h b/sql/handler.h index 0836360..6f44c68 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -4748,6 +4748,8 @@ class handler :public Sql_alloc virtual void update_partition(uint part_id) {} + virtual bool is_clustering_key(uint index) { return false; } + protected: Handler_share *get_ha_share_ptr(); void set_ha_share_ptr(Handler_share *arg_ha_share); diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 12f72f5..027d2f7 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -20,10 +20,16 @@ #include "key.h" #include "sql_statistics.h" -static ulonglong key_block_no(handler *h, uint keyno, ha_rows keyentry_pos) +static ulonglong key_block_no(TABLE *table, uint keyno, ha_rows keyentry_pos) { - return (ulonglong) (h->keyread_time(keyno, 1, keyentry_pos + 1) - - h->keyread_time(keyno, 0, keyentry_pos + 1) + 0.5) + 1; + size_t len= table->key_info[keyno].key_length + table->file->ref_length; + if (keyno == table->s->primary_key && + table->file->primary_key_is_clustered()) + len= table->s->stored_rec_length; + uint keys_per_block= (uint) (table->file->stats.block_size/2.0/len+1); + ulonglong block_no= !keyentry_pos ? 0 : + (keyentry_pos - 1) / keys_per_block + 1; + return block_no; } /**************************************************************************** @@ -177,8 +183,8 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, } min_pos+= r - rows; } - min_block_no= key_block_no(this, keyno, min_pos); - max_block_no= key_block_no(this, keyno, min_pos + rows); + min_block_no= key_block_no(this->table, keyno, min_pos); + max_block_no= key_block_no(this->table, keyno, min_pos + rows); new_touched_blocks= max_block_no - min_block_no + MY_TEST(min_block_no != prev_max_block_no); prev_max_block_no= max_block_no; @@ -202,7 +208,8 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, cost->reset(); cost->avg_io_cost= 1; /* assume random seeks */ cost->idx_avg_io_cost= 1; - if (!(keyno == table->s->primary_key && primary_key_is_clustered())) + if (!((keyno == table->s->primary_key && primary_key_is_clustered()) || + is_clustering_key(keyno))) { cost->idx_io_count= total_touched_blocks + keyread_time(keyno, 0, total_rows); diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 4196440..b0f438b 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -7775,13 +7775,18 @@ double ha_tokudb::scan_time() { DBUG_RETURN(ret_val); } +bool ha_tokudb::is_clustering_key(uint index) +{ + return index == primary_key || key_is_clustering(&table->key_info[index]); +} + double ha_tokudb::keyread_time(uint index, uint ranges, ha_rows rows) { TOKUDB_HANDLER_DBUG_ENTER("%u %u %" PRIu64, index, ranges, (uint64_t) rows); - double ret_val; - if (index == primary_key || key_is_clustering(&table->key_info[index])) { - ret_val = read_time(index, ranges, rows); - DBUG_RETURN(ret_val); + double cost; + if (index == primary_key || is_clustering_key(index)) { + cost = read_time(index, ranges, rows); + DBUG_RETURN(cost); } /* It is assumed that we will read trough the whole key range and that all @@ -7791,11 +7796,8 @@ double ha_tokudb::keyread_time(uint index, uint ranges, ha_rows rows) blocks read. This model does not take into account clustered indexes - engines that support that (e.g. InnoDB) may want to overwrite this method. */ - double keys_per_block= (stats.block_size/2.0/ - (table->key_info[index].key_length + - ref_length) + 1); - ret_val = (rows + keys_per_block - 1)/ keys_per_block; - TOKUDB_HANDLER_DBUG_RETURN_DOUBLE(ret_val); + cost= handler::keyread_time(index, ranges, rows); + TOKUDB_HANDLER_DBUG_RETURN_DOUBLE(cost); } // diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index 75fabbf..58121f9 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -871,6 +871,7 @@ class ha_tokudb : public handler { bool primary_key_is_clustered() { return true; } + bool is_clustering_key(uint index); int cmp_ref(const uchar * ref1, const uchar * ref2); bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes); diff --git a/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc b/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc index d637b46..1914da1 100644 --- a/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc +++ b/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc @@ -1,7 +1,10 @@ # test for TokuDB clustering keys. # test assumes that a table 't1' exists with the following columns: # a int, b int, c int, d int -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); +insert into t1 values + (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), + (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), + (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); #normal queries @@ -13,20 +16,20 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select a from t1 where a > 8; -select a from t1 where a > 8; +explain select a from t1 where a > 10; +select a from t1 where a > 10; # ignore rows column --replace_column 9 NULL; @@ -35,8 +38,8 @@ select a,b from t1 where b > 30; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 350; +select a,c from t1 where c > 350; alter table t1 add index bdca(b,d,c,a) clustering=yes; @@ -51,25 +54,25 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select b from t1 where b > 30; -select b from t1 where b > 30; +explain select b from t1 where b > 70; +select b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select b from t1 where c > 750; -select c from t1 where c > 750; +explain select b from t1 where c > 950; +select c from t1 where c > 950; alter table t1 add e varchar(20); @@ -77,25 +80,25 @@ alter table t1 add primary key (a,b,c); # ignore rows column --replace_column 9 NULL; -explain select * from t1 where a > 5; -select * from t1 where a > 5; +explain select * from t1 where a > 8; +select * from t1 where a > 8; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select a from t1 where a > 8; -select a from t1 where a > 8; +explain select a from t1 where a > 10; +select a from t1 where a > 10; # ignore rows column --replace_column 9 NULL; @@ -104,8 +107,8 @@ select a,b from t1 where b > 30; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 350; +select a,c from t1 where c > 350; alter table t1 drop primary key; @@ -116,23 +119,23 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select b from t1 where b > 30; -select b from t1 where b > 30; +explain select b from t1 where b > 70; +select b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select b from t1 where c > 750; -select c from t1 where c > 750; +explain select b from t1 where c > 950; +select c from t1 where c > 950; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result index 4c3f971..b274996 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result @@ -1096,7 +1096,7 @@ t CREATE TABLE `t` ( explain select straight_join s.a,t.a from s,t where s.b = t.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s index b,b_2,b_3 b_2 10 NULL 1000 Using where; Using index -1 SIMPLE t ref b,b_2,b_3 b_2 5 test.s.b 1 Using index +1 SIMPLE t ref b,b_2,b_3 b_3 5 test.s.b 1 Using index alter table s drop key b_2; alter table t drop key b_2; show create table s; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result b/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result index 02a90c6..bbc886f 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result @@ -39,16 +39,20 @@ t1 CREATE TABLE `t1` ( KEY `foo` (`c`,`d`) `clustering`=yes, KEY `bar` (`d`,`c`,`b`,`a`) `clustering`=yes ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56); +insert into t1 value +(1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6), +(32,54,12,56); explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 16 NULL 5 Using index +1 SIMPLE t1 index NULL PRIMARY 16 NULL 7 Using index select * from t1; a b c d 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 +5 5 5 5 +6 6 6 6 32 54 12 56 explain select d from t1 where d > 30; id select_type table type possible_keys key key_len ref rows Extra diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result index 1fd519d..f858452 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result @@ -1,7 +1,10 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb; -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); +insert into t1 values +(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), +(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), +(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where @@ -11,48 +14,47 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -4 40 400 4000 -5 50 500 5000 -6 60 600 6000 -7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where c > 750; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where c > 850; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 5 NULL NULL; Using where -select * from t1 where c > 750; +1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where +select * from t1 where c > 850; a b c d -8 80 800 8000 9 90 900 9000 -explain select a from t1 where a > 8; +10 100 1000 10000 +11 110 1100 11000 +explain select a from t1 where a > 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index -select a from t1 where a > 8; +select a from t1 where a > 10; a -9 -explain select a,b from t1 where b > 30; +11 +explain select a,b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select a,b from t1 where b > 30; +select a,b from t1 where b > 70; a b -4 40 -5 50 -6 60 -7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select a,c from t1 where c > 750; +select a,c from t1 where c > 950; a c -8 800 -9 900 +10 1000 +11 1100 delete from t1 where b>30 and b < 60; select * from t1; a b c d @@ -63,15 +65,16 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where a > 5; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where a > 8; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where -select * from t1 where a > 5; +select * from t1 where a > 8; a b c d -6 60 600 6000 -7 70 700 7000 -8 80 800 8000 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select * from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index @@ -81,19 +84,25 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select * from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 5 NULL NULL; Using where +1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where select * from t1 where c > 750; a b c d 8 80 800 8000 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select a from t1 where a > 8; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index +1 SIMPLE t1 index PRIMARY c 5 NULL NULL; Using where; Using index select a from t1 where a > 8; a 9 +10 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index @@ -103,13 +112,14 @@ a b 7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 1050; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select a,c from t1 where c > 750; +select a,c from t1 where c > 1050; a c -8 800 -9 900 +11 1100 alter table t1 drop primary key; explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra @@ -120,22 +130,23 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -6 60 600 6000 -7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where c > 750; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where c > 1050; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 1050; a b c d -8 80 800 8000 -9 90 900 9000 +11 110 1100 11000 explain select a from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where @@ -145,61 +156,76 @@ a 7 8 9 -explain select a,b from t1 where b > 30; +10 +11 +explain select a,b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select a,b from t1 where b > 30; +select a,b from t1 where b > 70; a b -6 60 -7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 1050; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select a,c from t1 where c > 750; +select a,c from t1 where c > 1050; a c -8 800 -9 900 +11 1100 delete from t1 where b > 10 and b < 90; select * from t1; a b c d 1 10 100 1000 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where select * from t1 where a > 5; a b c d 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select * from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index select * from t1 where b > 30; a b c d 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select * from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where select * from t1 where c > 750; a b c d 9 90 900 9000 +10 100 1000 10000 +11 110 1100 11000 explain select a from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where select a from t1 where a > 5; a 9 +10 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index select a,b from t1 where b > 30; a b 9 90 +10 100 +11 110 explain select a,b from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where select a,c from t1 where c > 750; a c 9 900 +10 1000 +11 1100 drop table t1; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result index a594b10..aa33246 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result @@ -7,22 +7,19 @@ insert into t1 values (2,"20",200); insert into t1 values (3,"30",300); insert into t1 values (4,"40",400); insert into t1 values (5,"50",500); -explain select * from t1 where a > 2; +explain select * from t1 where a > 3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 5 NULL 3 Using where -select * from t1 where a > 2; +1 SIMPLE t1 range a a 5 NULL 2 Using where +select * from t1 where a > 3; a b c -3 30 300 4 40 400 5 50 500 -select b from t1 where a > 2; +select b from t1 where a > 3; b -30 40 50 -select c from t1 where a > 2; +select c from t1 where a > 3; c -300 400 500 delete from t1 where a <2; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result index fab2880..4c2fc08 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result @@ -1,7 +1,10 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a,b,c), key(b) clustering=yes, key (c))engine=tokudb; -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); +insert into t1 values +(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), +(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), +(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where @@ -11,30 +14,30 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -4 40 400 4000 -5 50 500 5000 -6 60 600 6000 -7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where c > 750; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d -8 80 800 8000 -9 90 900 9000 -explain select a from t1 where a > 8; +10 100 1000 10000 +11 110 1100 11000 +explain select a from t1 where a > 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index -select a from t1 where a > 8; +select a from t1 where a > 10; a -9 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b c 4 NULL NULL; Using where; Using index @@ -46,13 +49,21 @@ a b 7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 350; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index c c 4 NULL NULL; Using where; Using index -select a,c from t1 where c > 750; +select a,c from t1 where c > 350; a c +4 400 +5 500 +6 600 +7 700 8 800 9 900 +10 1000 +11 1100 alter table t1 add index bdca(b,d,c,a) clustering=yes; insert into t1 values (10,10,10,10); alter table t1 drop index bdca; @@ -67,79 +78,73 @@ a b c d 8 80 800 8000 9 90 900 9000 10 10 10 10 -explain select * from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -4 40 400 4000 -5 50 500 5000 -6 60 600 6000 -7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where c > 750; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d -8 80 800 8000 -9 90 900 9000 -explain select b from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select b from t1 where b > 30; +select b from t1 where b > 70; b -40 -50 -60 -70 80 90 -explain select b from t1 where c > 750; +100 +110 +explain select b from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select c from t1 where c > 750; +select c from t1 where c > 950; c -800 -900 +1000 +1100 alter table t1 add e varchar(20); alter table t1 add primary key (a,b,c); -explain select * from t1 where a > 5; +explain select * from t1 where a > 8; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where -select * from t1 where a > 5; +select * from t1 where a > 8; a b c d e -6 60 600 6000 NULL -7 70 700 7000 NULL -8 80 800 8000 NULL 9 90 900 9000 NULL 10 10 10 10 NULL -explain select * from t1 where b > 30; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d e -4 40 400 4000 NULL -5 50 500 5000 NULL -6 60 600 6000 NULL -7 70 700 7000 NULL 8 80 800 8000 NULL 9 90 900 9000 NULL -explain select * from t1 where c > 750; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d e -8 80 800 8000 NULL -9 90 900 9000 NULL -explain select a from t1 where a > 8; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select a from t1 where a > 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index -select a from t1 where a > 8; +select a from t1 where a > 10; a -9 -10 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b c 4 NULL NULL; Using where; Using index @@ -151,13 +156,21 @@ a b 7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 350; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index c c 4 NULL NULL; Using where; Using index -select a,c from t1 where c > 750; +select a,c from t1 where c > 350; a c +4 400 +5 500 +6 600 +7 700 8 800 9 900 +10 1000 +11 1100 alter table t1 drop primary key; explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra @@ -169,40 +182,38 @@ a b c d e 8 80 800 8000 NULL 9 90 900 9000 NULL 10 10 10 10 NULL -explain select * from t1 where b > 30; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d e -4 40 400 4000 NULL -5 50 500 5000 NULL -6 60 600 6000 NULL -7 70 700 7000 NULL 8 80 800 8000 NULL 9 90 900 9000 NULL -explain select * from t1 where c > 750; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d e -8 80 800 8000 NULL -9 90 900 9000 NULL -explain select b from t1 where b > 30; +10 100 1000 10000 NULL +11 110 1100 11000 NULL +explain select b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index -select b from t1 where b > 30; +select b from t1 where b > 70; b -40 -50 -60 -70 80 90 -explain select b from t1 where c > 750; +100 +110 +explain select b from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 4 NULL NULL; Using where -select c from t1 where c > 750; +select c from t1 where c > 950; c -800 -900 +1000 +1100 drop table t1; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result b/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result index c6754db..6b458b3 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result @@ -2,16 +2,16 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb; insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),(7,7,7,7),(8,8,8,8),(9,9,9,9); -explain select * from t1 where b > 2; +explain select * from t1 where b > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -explain select * from t1 where c > 2; +explain select * from t1 where c > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where -explain select * from t1 where a > 4; +explain select * from t1 where a > 7; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where -explain select * from t1 where c > 7; +explain select * from t1 where c > 8; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where explain select * from t1 where b > 7; diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result b/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result index 41abded..2dcb65c 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result @@ -32,13 +32,13 @@ max(a) 7 explain select a,b from z1 where a < 7; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE z1 range a a 5 NULL 12 Using where; Using index +1 SIMPLE z1 index a a 10 NULL 14 Using where; Using index select max(a) from z1 where a < 7; max(a) 3 explain select a,b from z1 where a < 3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE z1 range a a 5 NULL 9 Using where; Using index +1 SIMPLE z1 index a a 10 NULL 14 Using where; Using index select max(a) from z1 where a < 3; max(a) 1 diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_update.result b/storage/tokudb/mysql-test/tokudb/r/cluster_update.result index 14ab9a2..586cf2e 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_update.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_update.result @@ -1,7 +1,10 @@ SET DEFAULT_STORAGE_ENGINE='tokudb'; DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb; -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); +insert into t1 values +(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), +(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), +(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where @@ -11,48 +14,48 @@ a b c d 7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where b > 30; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -4 40 400 4000 -5 50 500 5000 -6 60 600 6000 -7 70 700 7000 8 80 800 8000 9 90 900 9000 -explain select * from t1 where c > 750; +10 100 1000 10000 +11 110 1100 11000 +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d -8 80 800 8000 -9 90 900 9000 -explain select a from t1 where a > 8; +10 100 1000 10000 +11 110 1100 11000 +explain select a from t1 where a > 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index select a from t1 where a > 8; a 9 -explain select a,b from t1 where b > 30; +10 +11 +explain select a,b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select a,b from t1 where b > 30; +select a,b from t1 where b > 70; a b -4 40 -5 50 -6 60 -7 70 8 80 9 90 -explain select a,b from t1 where c > 750; +10 100 +11 110 +explain select a,b from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select a,c from t1 where c > 750; +select a,c from t1 where c > 950; a c -8 800 -9 900 +10 1000 +11 1100 update t1 set c = c+5, b = b+5 where b>30; explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra @@ -63,6 +66,8 @@ a b c d 7 75 705 7000 8 85 805 8000 9 95 905 9000 +10 105 1005 10000 +11 115 1105 11000 explain select * from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index @@ -74,6 +79,8 @@ a b c d 7 75 705 7000 8 85 805 8000 9 95 905 9000 +10 105 1005 10000 +11 115 1105 11000 explain select * from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where @@ -81,12 +88,14 @@ select * from t1 where c > 750; a b c d 8 85 805 8000 9 95 905 9000 -explain select a from t1 where a > 8; +10 105 1005 10000 +11 115 1105 11000 +explain select a from t1 where a > 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index -select a from t1 where a > 8; +select a from t1 where a > 10; a -9 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NA b b 5 NULL NULL; Using where; Using index @@ -98,6 +107,8 @@ a b 7 75 8 85 9 95 +10 105 +11 115 explain select a,b from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where @@ -105,6 +116,8 @@ select a,c from t1 where c > 750; a c 8 805 9 905 +10 1005 +11 1105 alter table t1 drop primary key; explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra @@ -115,24 +128,25 @@ a b c d 7 75 705 7000 8 85 805 8000 9 95 905 9000 -explain select * from t1 where b > 30; +10 105 1005 10000 +11 115 1105 11000 +explain select * from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select * from t1 where b > 30; +select * from t1 where b > 70; a b c d -4 45 405 4000 -5 55 505 5000 -6 65 605 6000 7 75 705 7000 8 85 805 8000 9 95 905 9000 -explain select * from t1 where c > 750; +10 105 1005 10000 +11 115 1105 11000 +explain select * from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select * from t1 where c > 750; +select * from t1 where c > 950; a b c d -8 85 805 8000 -9 95 905 9000 +10 105 1005 10000 +11 115 1105 11000 explain select a from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where @@ -142,24 +156,25 @@ a 7 8 9 -explain select a,b from t1 where b > 30; +10 +11 +explain select a,b from t1 where b > 70; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index -select a,b from t1 where b > 30; +select a,b from t1 where b > 70; a b -4 45 -5 55 -6 65 7 75 8 85 9 95 -explain select a,b from t1 where c > 750; +10 105 +11 115 +explain select a,b from t1 where c > 950; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c c 5 NULL NULL; Using where -select a,c from t1 where c > 750; +select a,c from t1 where c > 950; a c -8 805 -9 905 +10 1005 +11 1105 update t1 set c = c+5, b = b+5 where b>30; select * from t1; a b c d @@ -172,6 +187,8 @@ a b c d 7 80 710 7000 8 90 810 8000 9 100 910 9000 +10 110 1010 10000 +11 120 1110 11000 explain select * from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where @@ -181,6 +198,8 @@ a b c d 7 80 710 7000 8 90 810 8000 9 100 910 9000 +10 110 1010 10000 +11 120 1110 11000 explain select * from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index @@ -192,6 +211,8 @@ a b c d 7 80 710 7000 8 90 810 8000 9 100 910 9000 +10 110 1010 10000 +11 120 1110 11000 explain select * from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where @@ -199,6 +220,8 @@ select * from t1 where c > 750; a b c d 8 90 810 8000 9 100 910 9000 +10 110 1010 10000 +11 120 1110 11000 explain select a from t1 where a > 5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where @@ -208,6 +231,8 @@ a 7 8 9 +10 +11 explain select a,b from t1 where b > 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index @@ -219,6 +244,8 @@ a b 7 80 8 90 9 100 +10 110 +11 120 explain select a,b from t1 where c > 750; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where @@ -226,4 +253,6 @@ select a,c from t1 where c > 750; a c 8 810 9 910 +10 1010 +11 1110 drop table t1; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result index 2a0ee4f..55a2cc4 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb; insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); explain select x,id from t force index (x) where x=0 and id=0; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result index 4580cc9..1b5998b 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=tokudb; insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); explain select x,id from t force index (x) where x=0 and id=0; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result index fb998e3..0bba5b7 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=innodb; insert into t values (0,0,0,0),(0,1,0,1); explain select c,a,b from t where c=0 and a=0 and b=1; diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result index 9d9fb4c..556c5ff 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result @@ -1,7 +1,7 @@ drop table if exists t; select @@optimizer_switch; @@optimizer_switch -index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on +index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=tokudb; insert into t values (0,0,0,0),(0,1,0,1); explain select c,a,b from t where c=0 and a=0 and b=1; diff --git a/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result b/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result index 994b906..f741dca 100644 --- a/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result +++ b/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result @@ -31,7 +31,7 @@ delete from foo where a > 5; # number of rows should be 9 explain select * from foo where a > 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 9 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # should have just 4 values select * from foo where a > 1; a b @@ -43,7 +43,7 @@ connection conn1; # number of rows should be 9 explain select * from foo where a > 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 9 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # 9 values select * From foo where a > 1; a b diff --git a/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result b/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result index 6bf54ef..37701ef 100644 --- a/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result +++ b/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result @@ -31,7 +31,7 @@ delete from foo where a < 10; # number of rows should be 9 explain select * from foo where a < 50; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 9 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # should have just 4 values select * from foo where a < 50; a b @@ -43,7 +43,7 @@ connection conn1; # number of rows should be 9 explain select * from foo where a < 50; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 9 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # 9 values select * From foo where a < 50; a b diff --git a/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result b/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result index cc2bb45..a404348 100644 --- a/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result +++ b/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result @@ -31,7 +31,7 @@ delete from foo where a = 2 or a = 4 or a = 10 or a = 30 or a = 50; # number of rows should be 8 explain select * from foo where a > 1 and a < 50; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 8 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # should have just 4 values select * from foo where a > 1 and a < 50; a b @@ -43,7 +43,7 @@ connection conn1; # number of rows should be 8 explain select * from foo where a > 1 and a < 50; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 8 Using where +1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 5 Using where # 8 values select * from foo where a > 1 and a < 50; a b diff --git a/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result b/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result index 024580d..fd584a3 100644 --- a/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result +++ b/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result @@ -305,25 +305,25 @@ dummy INT PRIMARY KEY, a INT UNIQUE, b INT ) ENGINE=TokuDB; -INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5); +INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5),(7,7,7),(8,8,8),(9,9,9); COMMIT; SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; SELECT @@tx_isolation; @@tx_isolation REPEATABLE-READ START TRANSACTION; -EXPLAIN SELECT * FROM t1 WHERE a >= 2 FOR UPDATE; +EXPLAIN SELECT * FROM t1 WHERE a >= 8 FOR UPDATE; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 2 Using where -SELECT * FROM t1 WHERE a >= 2 FOR UPDATE; +SELECT * FROM t1 WHERE a >= 8 FOR UPDATE; dummy a b -3 3 3 -5 5 5 +8 8 8 +9 9 9 connection con2; SET AUTOCOMMIT=0; SET TOKUDB_LOCK_TIMEOUT=2; START TRANSACTION; -INSERT INTO t1 VALUES (2,2,2); +INSERT INTO t1 VALUES (8,8,8); ERROR HY000: Lock wait timeout exceeded; try restarting transaction ROLLBACK; connection con1; diff --git a/storage/tokudb/mysql-test/tokudb/r/type_bit.result b/storage/tokudb/mysql-test/tokudb/r/type_bit.result index c147c20..76a032d 100644 --- a/storage/tokudb/mysql-test/tokudb/r/type_bit.result +++ b/storage/tokudb/mysql-test/tokudb/r/type_bit.result @@ -759,7 +759,7 @@ CREATE TABLE t1 (a BIT(7), b BIT(9), KEY(a, b)); INSERT INTO t1 VALUES(0, 0), (5, 3), (5, 6), (6, 4), (7, 0); EXPLAIN SELECT a+0, b+0 FROM t1 WHERE a > 4 and b < 7 ORDER BY 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 2 NULL 4 Using where; Using index; Using filesort +1 SIMPLE t1 index a a 5 NULL 5 Using where; Using index; Using filesort DROP TABLE t1; End of 5.0 tests create table t1(a bit(7)); diff --git a/storage/tokudb/mysql-test/tokudb/r/type_blob.result b/storage/tokudb/mysql-test/tokudb/r/type_blob.result index 1350bc0..3f65967 100644 --- a/storage/tokudb/mysql-test/tokudb/r/type_blob.result +++ b/storage/tokudb/mysql-test/tokudb/r/type_blob.result @@ -667,14 +667,14 @@ id txt alter table t1 modify column txt blob; explain select * from t1 where txt='Chevy' or txt is NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL txt_index NULL NULL NULL 4 Using where +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where select * from t1 where txt='Chevy' or txt is NULL; id txt 1 Chevy 3 NULL explain select * from t1 where txt='Chevy' or txt is NULL order by txt; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL txt_index NULL NULL NULL 4 Using where; Using filesort +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where; Using filesort select * from t1 where txt='Chevy' or txt is NULL order by txt; id txt 3 NULL diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test b/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test index c2196bf..0cace80 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test @@ -22,7 +22,9 @@ alter table t1 drop primary key; alter table t1 add primary key (a,b,c,d); alter table t1 add key bar(d,c,b,a) clustering=yes; show create table t1; -insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56); +insert into t1 value + (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6), + (32,54,12,56); explain select * from t1; select * from t1; explain select d from t1 where d > 30; diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test b/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test index 1c0ebad..cb49092 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test @@ -7,8 +7,10 @@ DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb; -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); - +insert into t1 values + (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), + (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), + (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); #normal queries @@ -19,38 +21,38 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 850; +select * from t1 where c > 850; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select a from t1 where a > 8; -select a from t1 where a > 8; +explain select a from t1 where a > 10; +select a from t1 where a > 10; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where b > 30; -select a,b from t1 where b > 30; +explain select a,b from t1 where b > 70; +select a,b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 950; +select a,c from t1 where c > 950; delete from t1 where b>30 and b < 60; select * from t1; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where a > 5; -select * from t1 where a > 5; +explain select * from t1 where a > 8; +select * from t1 where a > 8; # ignore rows column --replace_column 9 NULL; @@ -76,8 +78,8 @@ select a,b from t1 where b > 30; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 1050; +select a,c from t1 where c > 1050; alter table t1 drop primary key; @@ -88,13 +90,13 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 1050; +select * from t1 where c > 1050; #covering indexes @@ -105,13 +107,13 @@ select a from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where b > 30; -select a,b from t1 where b > 30; +explain select a,b from t1 where b > 70; +select a,b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 1050; +select a,c from t1 where c > 1050; delete from t1 where b > 10 and b < 90; diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test index 192e56f..dc788d5 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test @@ -13,10 +13,10 @@ insert into t1 values (3,"30",300); insert into t1 values (4,"40",400); insert into t1 values (5,"50",500); -explain select * from t1 where a > 2; -select * from t1 where a > 2; -select b from t1 where a > 2; -select c from t1 where a > 2; +explain select * from t1 where a > 3; +select * from t1 where a > 3; +select b from t1 where a > 3; +select c from t1 where a > 3; #explain delete from t1 where a <2; delete from t1 where a <2; diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test b/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test index a438653..23207f2 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test @@ -11,18 +11,18 @@ insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6 # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 2; +explain select * from t1 where b > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 2; +explain select * from t1 where c > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where a > 4; +explain select * from t1 where a > 7; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 7; +explain select * from t1 where c > 8; # ignore rows column --replace_column 9 NULL; explain select * from t1 where b > 7; diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_update.test b/storage/tokudb/mysql-test/tokudb/t/cluster_update.test index ce5a025..42a004f 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_update.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_update.test @@ -7,7 +7,10 @@ DROP TABLE IF EXISTS t1; create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb; -insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000); +insert into t1 values + (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000), + (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000), + (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000); #normal queries @@ -19,30 +22,30 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select a from t1 where a > 8; +explain select a from t1 where a > 10; select a from t1 where a > 8; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where b > 30; -select a,b from t1 where b > 30; +explain select a,b from t1 where b > 70; +select a,b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 950; +select a,c from t1 where c > 950; update t1 set c = c+5, b = b+5 where b>30; @@ -64,8 +67,8 @@ select * from t1 where c > 750; #covering indexes # ignore rows column --replace_column 9 NULL; -explain select a from t1 where a > 8; -select a from t1 where a > 8; +explain select a from t1 where a > 10; +select a from t1 where a > 10; # ignore rows column --replace_column 4 NA 9 NULL; @@ -86,13 +89,13 @@ select * from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where b > 30; -select * from t1 where b > 30; +explain select * from t1 where b > 70; +select * from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select * from t1 where c > 750; -select * from t1 where c > 750; +explain select * from t1 where c > 950; +select * from t1 where c > 950; #covering indexes # ignore rows column @@ -102,13 +105,13 @@ select a from t1 where a > 5; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where b > 30; -select a,b from t1 where b > 30; +explain select a,b from t1 where b > 70; +select a,b from t1 where b > 70; # ignore rows column --replace_column 9 NULL; -explain select a,b from t1 where c > 750; -select a,c from t1 where c > 750; +explain select a,b from t1 where c > 950; +select a,c from t1 where c > 950; update t1 set c = c+5, b = b+5 where b>30; select * from t1; diff --git a/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test b/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test index 6130933..dcee594 100644 --- a/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test +++ b/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test @@ -40,16 +40,16 @@ CREATE TABLE t1 ( b INT ) ENGINE=TokuDB; -INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5); +INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5),(7,7,7),(8,8,8),(9,9,9); COMMIT; SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; SELECT @@tx_isolation; START TRANSACTION; -EXPLAIN SELECT * FROM t1 WHERE a >= 2 FOR UPDATE; +EXPLAIN SELECT * FROM t1 WHERE a >= 8 FOR UPDATE; -SELECT * FROM t1 WHERE a >= 2 FOR UPDATE; +SELECT * FROM t1 WHERE a >= 8 FOR UPDATE; connection con2; @@ -58,7 +58,7 @@ SET TOKUDB_LOCK_TIMEOUT=2; START TRANSACTION; --error ER_LOCK_WAIT_TIMEOUT -INSERT INTO t1 VALUES (2,2,2); +INSERT INTO t1 VALUES (8,8,8); ROLLBACK; connection con1;
participants (1)
-
IgorBabaev