diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-10-31 18:07:02 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-10-31 18:07:02 -0400 |
commit | 4d1511296288782df0e3d9373396724e250b24c1 (patch) | |
tree | 9fa47d141b71933859d6c2da585e5bb5e52db212 /storage/tokudb | |
parent | 17b0b45b1de41a1b188c5de6c3e9d8e6ecc48a72 (diff) | |
parent | d775ecdd010daad4dc6147fba58acd006bf2c60c (diff) | |
download | mariadb-git-4d1511296288782df0e3d9373396724e250b24c1.tar.gz |
Merge tag 'mariadb-10.0.22' into 10.0-galera
Diffstat (limited to 'storage/tokudb')
-rw-r--r-- | storage/tokudb/hatoku_hton.cc | 20 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result | 32 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test | 34 |
3 files changed, 49 insertions, 37 deletions
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index a804fc80489..f1a2426c0e3 100644 --- a/storage/tokudb/hatoku_hton.cc +++ b/storage/tokudb/hatoku_hton.cc @@ -356,9 +356,23 @@ static int tokudb_init_func(void *p) { tokudb_hton = (handlerton *) p; #if TOKUDB_CHECK_JEMALLOC - if (tokudb_check_jemalloc && dlsym(RTLD_DEFAULT, "mallctl") == NULL) { - sql_print_error("%s is not initialized because jemalloc is not loaded", tokudb_hton_name); - goto error; + if (tokudb_check_jemalloc) { + typedef int (*mallctl_type)(const char *, void *, size_t *, void *, size_t); + mallctl_type mallctl_func; + mallctl_func= (mallctl_type)dlsym(RTLD_DEFAULT, "mallctl"); + if (!mallctl_func) { + sql_print_error("%s is not initialized because jemalloc is not loaded", tokudb_hton_name); + goto error; + } + char *ver; + size_t len= sizeof(ver); + mallctl_func("version", &ver, &len, NULL, 0); + /* jemalloc 2.2.5 crashes mysql-test */ + if (strcmp(ver, "2.3.") < 0) { + sql_print_error("%s is not initialized because jemalloc is older than 2.3.0", tokudb_hton_name); + goto error; + } + } #endif diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result index 7e92604d0f5..48f66942bc3 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result @@ -9,7 +9,7 @@ insert into t1 values (4,40,400,4000,40000,400000); insert into t1 values (5,50,500,5000,50000,500000); explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b NULL NULL NULL; Using index +1 SIMPLE t1 index NULL b NULL NULL NULL Using index select * from t1; a b c d e f 1 10 100 1000 10000 100000 @@ -19,7 +19,7 @@ a b c d e f 5 50 500 5000 50000 500000 explain select * from t1 where b > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index select * from t1 where b > 0; a b c d e f 1 10 100 1000 10000 100000 @@ -29,7 +29,7 @@ a b c d e f 5 50 500 5000 50000 500000 explain select * from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select * from t1 where d > 0; a b c d e f 1 10 100 1000 10000 100000 @@ -39,7 +39,7 @@ a b c d e f 5 50 500 5000 50000 500000 explain select a from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select a from t1 where d > 0; a 1 @@ -71,7 +71,7 @@ e f update t1 set a = a+1, b = b+10; explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b NULL NULL NULL; Using index +1 SIMPLE t1 index NULL b NULL NULL NULL Using index select * from t1; a b c d e f 2 20 100 1000 10000 100000 @@ -81,7 +81,7 @@ a b c d e f 6 60 500 5000 50000 500000 explain select * from t1 where b > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index select * from t1 where b > 0; a b c d e f 2 20 100 1000 10000 100000 @@ -91,7 +91,7 @@ a b c d e f 6 60 500 5000 50000 500000 explain select * from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select * from t1 where d > 0; a b c d e f 2 20 100 1000 10000 100000 @@ -101,7 +101,7 @@ a b c d e f 6 60 500 5000 50000 500000 explain select a from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select a from t1 where d > 0; a 2 @@ -133,28 +133,28 @@ e f delete from t1 where b > 35; explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b NULL NULL NULL; Using index +1 SIMPLE t1 index NULL b NULL NULL NULL Using index select * from t1; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select * from t1 where b > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index select * from t1 where b > 0; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select * from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select * from t1 where d > 0; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select a from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index select a from t1 where d > 0; a 2 @@ -175,28 +175,28 @@ alter table t1 drop index b, drop index d; alter table t1 add key b(b) clustering=yes, add index d(d,a) clustering=yes; explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b NULL NULL NULL; Using index +1 SIMPLE t1 index NULL b NULL NULL NULL Using index select * from t1; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select * from t1 where b > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index +1 SIMPLE t1 X b b NULL NULL NULL Using where; Using index select * from t1 where b > 0; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select * from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 X d d NULL NULL NULL Using where; Using index select * from t1 where d > 0; a b c d e f 2 20 100 1000 10000 100000 3 30 200 2000 20000 200000 explain select a from t1 where d > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 NULL d d NULL NULL NULL; Using where; Using index +1 SIMPLE t1 NULL d d NULL NULL NULL Using where; Using index select a from t1 where d > 0; a 2 diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test index 2abc9a91ff1..1a72b8e9303 100644 --- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test +++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test @@ -14,19 +14,19 @@ insert into t1 values (4,40,400,4000,40000,400000); insert into t1 values (5,50,500,5000,50000,500000); # ignore key_len and rows columns ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1; select * from t1; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where b > 0; select * from t1 where b > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where d > 0; select * from t1 where d > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select a from t1 where d > 0; select a from t1 where d > 0; select e,f from t1 where c > 0; @@ -34,19 +34,19 @@ select e,f from t1 where b > 0; select e,f from t1 where d > 0; update t1 set a = a+1, b = b+10; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1; select * from t1; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where b > 0; select * from t1 where b > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where d > 0; select * from t1 where d > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select a from t1 where d > 0; select a from t1 where d > 0; select e,f from t1 where c > 0; @@ -54,19 +54,19 @@ select e,f from t1 where b > 0; select e,f from t1 where d > 0; delete from t1 where b > 35; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1; select * from t1; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where b > 0; select * from t1 where b > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1 where d > 0; select * from t1 where d > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select a from t1 where d > 0; select a from t1 where d > 0; select e,f from t1 where c > 0; @@ -78,25 +78,23 @@ alter table t1 drop index b, drop index d; alter table t1 add key b(b) clustering=yes, add index d(d,a) clustering=yes; ---replace_column 7 NULL 9 NULL; +--replace_column 7 NULL 9 NULL explain select * from t1; select * from t1; ---replace_column 7 NULL 9 NULL; +--replace_column 4 X 7 NULL 9 NULL explain select * from t1 where b > 0; select * from t1 where b > 0; ---replace_column 7 NULL 9 NULL; +--replace_column 4 X 7 NULL 9 NULL explain select * from t1 where d > 0; select * from t1 where d > 0; ---replace_column 4 NULL 7 NULL 9 NULL; +--replace_column 4 NULL 7 NULL 9 NULL explain select a from t1 where d > 0; select a from t1 where d > 0; select e,f from t1 where c > 0; select e,f from t1 where b > 0; select e,f from t1 where d > 0; - - DROP TABLE t1; |