diff options
Diffstat (limited to 'storage/tokudb')
44 files changed, 220 insertions, 120 deletions
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index eaad6488796..bc7e5826cac 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -38,6 +38,7 @@ SET(TOKUDB_SOURCES tokudb_thread.cc tokudb_dir_cmd.cc) MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY + DISABLED COMPONENT tokudb-engine CONFIG ${CMAKE_CURRENT_BINARY_DIR}/tokudb.cnf) IF(NOT TARGET tokudb) diff --git a/storage/tokudb/PerconaFT/ft/tests/logcursor-empty-logfile-3.cc b/storage/tokudb/PerconaFT/ft/tests/logcursor-empty-logfile-3.cc index 8bb9d961fdd..e54ea4955f1 100644 --- a/storage/tokudb/PerconaFT/ft/tests/logcursor-empty-logfile-3.cc +++ b/storage/tokudb/PerconaFT/ft/tests/logcursor-empty-logfile-3.cc @@ -174,7 +174,7 @@ test_main (int argc, const char *argv[]) { r = toku_logger_open(TOKU_TEST_FILENAME, logger); assert(r==0); toku_logger_maybe_trim_log(logger, trim_lsn); - assert( toku_logfilemgr_num_logfiles(logger->logfilemgr) == 4 ); // untrimmed log, empty log, plus newly openned log + assert( toku_logfilemgr_num_logfiles(logger->logfilemgr) == 4 ); // untrimmed log, empty log, plus newly opened log r = toku_logger_close(&logger); } diff --git a/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/aclocal.m4 b/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/aclocal.m4 index 881dba8f0cd..10f8e70596b 100644 --- a/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/aclocal.m4 +++ b/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/aclocal.m4 @@ -8681,7 +8681,7 @@ fi[]dnl # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place +# only at the first occurrence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index f706ab86fc9..cc7911da557 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -6387,7 +6387,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { "created master %p", trx->all); trx->sp_level = trx->all; - trans_register_ha(thd, true, tokudb_hton); + trans_register_ha(thd, true, tokudb_hton, 0); } DBUG_PRINT("trans", ("starting transaction stmt")); if (trx->stmt) { @@ -6429,7 +6429,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { trx->sp_level, trx->stmt); reset_stmt_progress(&trx->stmt_progress); - trans_register_ha(thd, false, tokudb_hton); + trans_register_ha(thd, false, tokudb_hton, 0); cleanup: return error; } @@ -6594,7 +6594,7 @@ int ha_tokudb::start_stmt(THD* thd, thr_lock_type lock_type) { share->rows_from_locked_table = added_rows - deleted_rows; } transaction = trx->sub_sp_level; - trans_register_ha(thd, false, tokudb_hton); + trans_register_ha(thd, false, tokudb_hton, 0); cleanup: TOKUDB_HANDLER_DBUG_RETURN(error); } @@ -7793,11 +7793,6 @@ 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); @@ -7899,7 +7894,9 @@ double ha_tokudb::index_only_read_time(uint keynr, double records) { // number > 0 - There are approximately number matching rows in the range // HA_POS_ERROR - Something is wrong with the index tree // -ha_rows ha_tokudb::records_in_range(uint keynr, key_range* start_key, key_range* end_key) { +ha_rows ha_tokudb::records_in_range(uint keynr, const key_range* start_key, + const key_range* end_key, + page_range *pages) { TOKUDB_HANDLER_DBUG_ENTER("%d %p %p", keynr, start_key, end_key); DBT *pleft_key, *pright_key; DBT left_key, right_key; diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index d74c99a5f8b..5a7027a6b04 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -844,7 +844,9 @@ public: int external_lock(THD * thd, int lock_type); int start_stmt(THD * thd, thr_lock_type lock_type); - ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key); + ha_rows records_in_range(uint inx, const key_range * min_key, + const key_range * max_key, + page_range *pages); uint32_t get_cursor_isolation_flags(enum thr_lock_type lock_type, THD* thd); THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type); @@ -869,10 +871,6 @@ public: uint8 table_cache_type() { return HA_CACHE_TBL_TRANSACT; } - 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/ha_tokudb_alter_56.cc b/storage/tokudb/ha_tokudb_alter_56.cc index 4bdf2cf7bda..233d929a509 100644 --- a/storage/tokudb/ha_tokudb_alter_56.cc +++ b/storage/tokudb/ha_tokudb_alter_56.cc @@ -57,7 +57,7 @@ public: expand_varchar_update_needed(false), expand_fixed_update_needed(false), expand_blob_update_needed(false), - optimize_needed(false), + optimize_needed(false), changed_fields(PSI_INSTRUMENT_MEM), table_kc_info(NULL), altered_table_kc_info(NULL) { } diff --git a/storage/tokudb/hatoku_cmp.cc b/storage/tokudb/hatoku_cmp.cc index 5f82d1e48be..51f447da13e 100644 --- a/storage/tokudb/hatoku_cmp.cc +++ b/storage/tokudb/hatoku_cmp.cc @@ -6,6 +6,7 @@ This file is part of TokuDB Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. +Copyright (c) 2020, MariaDB Corporation. TokuDBis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, @@ -727,8 +728,7 @@ static inline uchar* pack_toku_blob( max_num_bytes/charset->mbmaxlen : max_num_bytes); if (length > local_char_length) { - local_char_length= my_charpos( - charset, + local_char_length= charset->charpos( blob_buf, blob_buf+length, local_char_length @@ -817,8 +817,7 @@ static uchar* pack_toku_varstring_from_desc( key_part_length/charset->mbmaxlen : key_part_length); if (length > local_char_length) { - local_char_length= my_charpos( - charset, + local_char_length= charset->charpos( from_desc, from_desc+length, local_char_length @@ -880,8 +879,7 @@ static inline uchar* pack_toku_varstring( max_num_bytes/charset->mbmaxlen : max_num_bytes); if (length > local_char_length) { - local_char_length= my_charpos( - charset, + local_char_length= charset->charpos( from_mysql+length_bytes_in_mysql, from_mysql+length_bytes_in_mysql+length, local_char_length @@ -917,8 +915,7 @@ static inline int cmp_toku_string( charset = get_charset_from_num(charset_number); - ret_val = charset->coll->strnncollsp( - charset, + ret_val = charset->strnncollsp( a_buf, a_num_bytes, b_buf, diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index 6002a3efd88..c4d2cbf20a0 100644 --- a/storage/tokudb/hatoku_hton.cc +++ b/storage/tokudb/hatoku_hton.cc @@ -350,7 +350,6 @@ static int tokudb_init_func(void *p) { TOKUDB_SHARE::static_init(); tokudb::background::initialize(); - tokudb_hton->state = SHOW_OPTION_YES; // tokudb_hton->flags= HTON_CAN_RECREATE; // QQQ this came from skeleton tokudb_hton->flags = HTON_CLOSE_CURSORS_AT_COMMIT | HTON_SUPPORTS_EXTENDED_KEYS; diff --git a/storage/tokudb/man/tokuft_logprint.1 b/storage/tokudb/man/tokuft_logprint.1 index c97f7e19f69..c6b4d17e243 100644 --- a/storage/tokudb/man/tokuft_logprint.1 +++ b/storage/tokudb/man/tokuft_logprint.1 @@ -1,6 +1,6 @@ '\" t .\" -.TH "\FBTOKUFT_LOGPRINT\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System" +.TH "\FBTOKUFT_LOGPRINT\FR" "1" "27 June 2019" "MariaDB 10\&.5" "MariaDB Database System" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- diff --git a/storage/tokudb/man/tokuftdump.1 b/storage/tokudb/man/tokuftdump.1 index a9c900e0045..04934f754d7 100644 --- a/storage/tokudb/man/tokuftdump.1 +++ b/storage/tokudb/man/tokuftdump.1 @@ -1,6 +1,6 @@ '\" t .\" -.TH "\FBTOKUFTDUMP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System" +.TH "\FBTOKUFTDUMP\FR" "1" "27 June 2019" "MariaDB 10\&.5" "MariaDB Database System" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- @@ -223,7 +223,7 @@ Provide summary info\&. .SH "COPYRIGHT" .br .PP -Copyright 2016 MariaDB Foundation +Copyright 2016-2019 MariaDB Foundation .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result index f85845232dd..cb8cb1c68bb 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result @@ -27,7 +27,7 @@ a b c d 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 ALL c NULL NULL NULL NULL; Using where +1 SIMPLE t1 range c c 5 NULL NULL; Using where select * from t1 where c > 850; a b c d 9 90 900 9000 diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result index 4c2fc08cd48..b01aaef6ee7 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result @@ -53,7 +53,7 @@ a b 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 +1 SIMPLE t1 range c c 4 NULL NULL; Using where; Using index select a,c from t1 where c > 350; a c 4 400 @@ -160,7 +160,7 @@ a b 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 +1 SIMPLE t1 range c c 4 NULL NULL; Using where; Using index select a,c from t1 where c > 350; a c 4 400 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 6b458b36585..4309b622293 100644 --- a/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result +++ b/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result @@ -22,5 +22,5 @@ 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 explain select a from t1 where c > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index c c 5 NULL NULL; Using where; Using index +1 SIMPLE t1 range c c 5 NULL NULL; Using where; Using index drop table t1; 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 2dcb65cee10..137f2a930ca 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 @@ -38,7 +38,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 index a a 10 NULL 14 Using where; Using index +1 SIMPLE z1 range a a 5 NULL 9 Using where; Using index select max(a) from z1 where a < 3; max(a) 1 diff --git a/storage/tokudb/mysql-test/tokudb/r/type_bit.result b/storage/tokudb/mysql-test/tokudb/r/type_bit.result index 76a032d99c4..5ef5783d866 100644 --- a/storage/tokudb/mysql-test/tokudb/r/type_bit.result +++ b/storage/tokudb/mysql-test/tokudb/r/type_bit.result @@ -675,7 +675,7 @@ INSERT INTO t1(a) VALUES (65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535); EXPLAIN SELECT 1 FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL a 3 NULL 10 Using index +1 SIMPLE t1 range NULL a 3 NULL 11 Using index for group-by SELECT 1 FROM t1 GROUP BY a; 1 1 @@ -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 index a a 5 NULL 5 Using where; Using index; Using filesort +1 SIMPLE t1 range a a 2 NULL 4 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 f3d634d84c1..6acfcf0fed3 100644 --- a/storage/tokudb/mysql-test/tokudb/r/type_blob.result +++ b/storage/tokudb/mysql-test/tokudb/r/type_blob.result @@ -234,6 +234,8 @@ HELLO MY a hello set big_tables=1; +Warnings: +Warning 1287 '@@big_tables' is deprecated and will be removed in a future release select distinct t from t1; t NULL @@ -315,6 +317,8 @@ HELLO MY a hello set big_tables=0; +Warnings: +Warning 1287 '@@big_tables' is deprecated and will be removed in a future release select distinct * from t1; t c b d NULL NULL NULL NULL diff --git a/storage/tokudb/mysql-test/tokudb/r/type_datetime.result b/storage/tokudb/mysql-test/tokudb/r/type_datetime.result index dbe93b37271..61aec6f9ea7 100644 --- a/storage/tokudb/mysql-test/tokudb/r/type_datetime.result +++ b/storage/tokudb/mysql-test/tokudb/r/type_datetime.result @@ -105,7 +105,7 @@ date numfacture expedition 0000-00-00 00:00:00 1212 0001-00-00 00:00:00 EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL expedition NULL NULL NULL 2 Using where +1 SIMPLE t1 ref expedition expedition 5 const 2 drop table t1; create table t1 (a datetime not null, b datetime not null); insert into t1 values (now(), now()); diff --git a/storage/tokudb/mysql-test/tokudb/t/bf_delete.test b/storage/tokudb/mysql-test/tokudb/t/bf_delete.test index a55d78784cc..cdfb5dbc1a6 100644 --- a/storage/tokudb/mysql-test/tokudb/t/bf_delete.test +++ b/storage/tokudb/mysql-test/tokudb/t/bf_delete.test @@ -2,6 +2,8 @@ source include/have_tokudb.inc; source include/big_test.inc; +# ASan causes test to timeout +source include/not_asan.inc; set default_storage_engine='tokudb'; disable_warnings; drop table if exists t; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result index 80402df665d..88f28362119 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result @@ -20,7 +20,7 @@ z a b c 999 4 40 400 explain select * from foo where b > 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 4 Using where; Using index +1 SIMPLE foo range b b 5 NULL 2 Using where; Using index select* from foo where b > 10; z a b c 999 2 20 200 @@ -40,7 +40,7 @@ a b c 4 40 400 explain select * from foo where b > 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 4 Using where; Using index +1 SIMPLE foo range b b 5 NULL 2 Using where; Using index select* from foo where b > 10; a b c 2 20 200 @@ -59,7 +59,7 @@ a b c z 4 40 400 NULL explain select * from foo where b > 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 4 Using where; Using index +1 SIMPLE foo range b b 5 NULL 2 Using where; Using index select* from foo where b > 10; a b c z 2 20 200 NULL @@ -94,7 +94,7 @@ a b c 3 30 300 4 40 400 id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 4 Using where; Using index +1 SIMPLE foo range b b 5 NULL 2 Using where; Using index a b c 2 20 200 3 30 300 @@ -110,7 +110,7 @@ a b c 4 40 400 explain select * from foo where b > 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 4 Using where; Using index +1 SIMPLE foo range b b 5 NULL 2 Using where; Using index select* from foo where b > 10; a b c 2 20 200 @@ -154,7 +154,7 @@ a b c g 4 40 400 NULL 5 50 500 NULL id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 5 NULL 5 Using where; Using index +1 SIMPLE foo range b b 5 NULL 3 Using where; Using index set autocommit=on; explain select * from foo; id select_type table type possible_keys key key_len ref rows Extra diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcr3.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcr3.result index b7aefaa4b8d..5e044461d84 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcr3.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcr3.result @@ -43,7 +43,7 @@ foo CREATE TABLE `foo` ( ) ENGINE=TokuDB DEFAULT CHARSET=latin1 explain select bb from foo FORCE INDEX (b) where bb > 5; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index b b 9 NULL 1 Using where; Using index +1 SIMPLE foo range b b 9 NULL 1 Using where; Using index select bb from foo FORCE INDEX (b) where bb > 5; bb 10 diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/2383.result b/storage/tokudb/mysql-test/tokudb_bugs/r/2383.result index bda2cceb7ba..fce13e39504 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/2383.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/2383.result @@ -10,7 +10,7 @@ create table foo (a char (255), key (a))charset=utf8; insert into foo values (repeat('A', 255)); explain select a from foo where a > "a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE foo index a a 766 NULL 1 Using where; Using index +1 SIMPLE foo range a a 766 NULL 1 Using where; Using index select a from foo where a > "a"; a AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_background_job_status.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_background_job_status.result new file mode 100644 index 00000000000..a4e42a10b57 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_background_job_status.result @@ -0,0 +1,13 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_BACKGROUND_JOB_STATUS; +Table Create Table +TokuDB_background_job_status CREATE TEMPORARY TABLE `TokuDB_background_job_status` ( + `id` bigint(0) NOT NULL DEFAULT 0, + `database_name` varchar(256) NOT NULL DEFAULT '', + `table_name` varchar(256) NOT NULL DEFAULT '', + `job_type` varchar(256) NOT NULL DEFAULT '', + `job_params` varchar(256) NOT NULL DEFAULT '', + `scheduler` varchar(32) NOT NULL DEFAULT '', + `scheduled_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `started_time` datetime DEFAULT NULL, + `status` varchar(1024) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_file_map.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_file_map.result new file mode 100644 index 00000000000..1d82039ebf3 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_file_map.result @@ -0,0 +1,9 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FILE_MAP; +Table Create Table +TokuDB_file_map CREATE TEMPORARY TABLE `TokuDB_file_map` ( + `dictionary_name` varchar(256) NOT NULL DEFAULT '', + `internal_file_name` varchar(256) NOT NULL DEFAULT '', + `table_schema` varchar(256) NOT NULL DEFAULT '', + `table_name` varchar(256) NOT NULL DEFAULT '', + `table_dictionary_name` varchar(256) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_block_map.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_block_map.result new file mode 100644 index 00000000000..a90db7a5b96 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_block_map.result @@ -0,0 +1,13 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_BLOCK_MAP; +Table Create Table +TokuDB_fractal_tree_block_map CREATE TEMPORARY TABLE `TokuDB_fractal_tree_block_map` ( + `dictionary_name` varchar(256) NOT NULL DEFAULT '', + `internal_file_name` varchar(256) NOT NULL DEFAULT '', + `checkpoint_count` bigint(0) NOT NULL DEFAULT 0, + `blocknum` bigint(0) NOT NULL DEFAULT 0, + `offset` bigint(0) DEFAULT NULL, + `size` bigint(0) DEFAULT NULL, + `table_schema` varchar(256) NOT NULL DEFAULT '', + `table_name` varchar(256) NOT NULL DEFAULT '', + `table_dictionary_name` varchar(256) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_info.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_info.result new file mode 100644 index 00000000000..6b071d35b46 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_fractal_tree_info.result @@ -0,0 +1,13 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_INFO; +Table Create Table +TokuDB_fractal_tree_info CREATE TEMPORARY TABLE `TokuDB_fractal_tree_info` ( + `dictionary_name` varchar(256) NOT NULL DEFAULT '', + `internal_file_name` varchar(256) NOT NULL DEFAULT '', + `bt_num_blocks_allocated` bigint(0) NOT NULL DEFAULT 0, + `bt_num_blocks_in_use` bigint(0) NOT NULL DEFAULT 0, + `bt_size_allocated` bigint(0) NOT NULL DEFAULT 0, + `bt_size_in_use` bigint(0) NOT NULL DEFAULT 0, + `table_schema` varchar(256) NOT NULL DEFAULT '', + `table_name` varchar(256) NOT NULL DEFAULT '', + `table_dictionary_name` varchar(256) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_lock_waits.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_lock_waits.result new file mode 100644 index 00000000000..b90db36691c --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_lock_waits.result @@ -0,0 +1,13 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCK_WAITS; +Table Create Table +TokuDB_lock_waits CREATE TEMPORARY TABLE `TokuDB_lock_waits` ( + `requesting_trx_id` bigint(0) NOT NULL DEFAULT 0, + `blocking_trx_id` bigint(0) NOT NULL DEFAULT 0, + `lock_waits_dname` varchar(256) NOT NULL DEFAULT '', + `lock_waits_key_left` varchar(256) NOT NULL DEFAULT '', + `lock_waits_key_right` varchar(256) NOT NULL DEFAULT '', + `lock_waits_start_time` bigint(0) NOT NULL DEFAULT 0, + `lock_waits_table_schema` varchar(256) NOT NULL DEFAULT '', + `lock_waits_table_name` varchar(256) NOT NULL DEFAULT '', + `lock_waits_table_dictionary_name` varchar(256) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_locks.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_locks.result new file mode 100644 index 00000000000..2c1084643d8 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_locks.result @@ -0,0 +1,12 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCKS; +Table Create Table +TokuDB_locks CREATE TEMPORARY TABLE `TokuDB_locks` ( + `locks_trx_id` bigint(0) NOT NULL DEFAULT 0, + `locks_mysql_thread_id` bigint(0) NOT NULL DEFAULT 0, + `locks_dname` varchar(256) NOT NULL DEFAULT '', + `locks_key_left` varchar(256) NOT NULL DEFAULT '', + `locks_key_right` varchar(256) NOT NULL DEFAULT '', + `locks_table_schema` varchar(256) NOT NULL DEFAULT '', + `locks_table_name` varchar(256) NOT NULL DEFAULT '', + `locks_table_dictionary_name` varchar(256) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_trx.result b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_trx.result new file mode 100644 index 00000000000..94c1b0c7642 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/r/tokudb_trx.result @@ -0,0 +1,7 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_TRX; +Table Create Table +TokuDB_trx CREATE TEMPORARY TABLE `TokuDB_trx` ( + `trx_id` bigint(0) NOT NULL DEFAULT 0, + `trx_mysql_thread_id` bigint(0) NOT NULL DEFAULT 0, + `trx_time` bigint(0) NOT NULL DEFAULT 0 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/suite.opt b/storage/tokudb/mysql-test/tokudb_i_s/suite.opt new file mode 100644 index 00000000000..ea8042b7740 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/suite.opt @@ -0,0 +1 @@ +--tokudb --plugin-load-add=$HA_TOKUDB_SO --loose-tokudb-check-jemalloc=0 diff --git a/storage/tokudb/mysql-test/tokudb_i_s/suite.pm b/storage/tokudb/mysql-test/tokudb_i_s/suite.pm new file mode 100644 index 00000000000..a6e01cd6dd4 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/suite.pm @@ -0,0 +1,14 @@ +package My::Suite::TokuDB_bugs; +use File::Basename; +@ISA = qw(My::Suite); + +# Ensure we can run the TokuDB tests even if hugepages are enabled +$ENV{TOKU_HUGE_PAGES_OK}=1; + +#return "Not run for embedded server" if $::opt_embedded_server; +return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; + +sub is_default { not $::opt_embedded_server } + +bless { }; + diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_background_job_status.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_background_job_status.test new file mode 100644 index 00000000000..7d52e902b03 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_background_job_status.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_BACKGROUND_JOB_STATUS; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_file_map.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_file_map.test new file mode 100644 index 00000000000..ef45fa58651 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_file_map.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FILE_MAP; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_block_map.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_block_map.test new file mode 100644 index 00000000000..655714c31d4 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_block_map.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_BLOCK_MAP; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_info.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_info.test new file mode 100644 index 00000000000..d05d20a58f3 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_fractal_tree_info.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_INFO; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_lock_waits.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_lock_waits.test new file mode 100644 index 00000000000..5a43ec908ef --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_lock_waits.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCK_WAITS; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_locks.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_locks.test new file mode 100644 index 00000000000..7975c2f9e6c --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_locks.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCKS; diff --git a/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_trx.test b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_trx.test new file mode 100644 index 00000000000..adb4b631809 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_i_s/t/tokudb_trx.test @@ -0,0 +1 @@ +SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_TRX; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/mrr.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/mrr.result index 50e5b1940b0..0dd05170252 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/r/mrr.result +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/mrr.result @@ -33,7 +33,7 @@ explain SELECT t3.task_id, t3.field FROM t3,t2 WHERE t3.task_id=t2.task_id AND t2.type NOT IN (8,11); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index PRIMARY,ymtasks_type ymtasks_type 2 NULL 2 Using where; Using index +1 SIMPLE t2 range PRIMARY,ymtasks_type ymtasks_type 2 NULL 2 Using where; Using index 1 SIMPLE t3 ref ymtasksoptions_task ymtasksoptions_task 4 test.t2.task_id 1 SELECT t3.task_id, t3.field FROM t3,t2 WHERE t3.task_id=t2.task_id AND t2.type NOT IN (8,11); @@ -84,7 +84,7 @@ explain SELECT t3.task_id, t3.field FROM t3,t2 WHERE t3.task_id=t2.task_id AND t2.type NOT IN (8,11); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index PRIMARY,ymtasks_type ymtasks_type 2 NULL 2 Using where; Using index +1 SIMPLE t2 range PRIMARY,ymtasks_type ymtasks_type 2 NULL 2 Using where; Using index 1 SIMPLE t3 ref ymtasksoptions_task ymtasksoptions_task 4 test.t2.task_id 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan SELECT t3.task_id, t3.field FROM t3,t2 WHERE t3.task_id=t2.task_id AND t2.type NOT IN (8,11); diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/xa.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/xa.result index 4724a0af926..34233b6fd8d 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/r/xa.result +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/xa.result @@ -65,4 +65,5 @@ a 20 disconnect con1; connection default; +xa rollback 'testb',0x2030405060,11; drop table t1; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/xa.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/xa.test index dc5520a39b8..a6be07963f5 100644 --- a/storage/tokudb/mysql-test/tokudb_mariadb/t/xa.test +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/xa.test @@ -68,6 +68,9 @@ xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; select * from t1; disconnect con1; +xa recover; + connection default; +xa rollback 'testb',0x2030405060,11; drop table t1; diff --git a/storage/tokudb/mysql-test/tokudb_parts/t/partition_alter4_tokudb.test b/storage/tokudb/mysql-test/tokudb_parts/t/partition_alter4_tokudb.test index 93a3a0cbdce..e450574634b 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/t/partition_alter4_tokudb.test +++ b/storage/tokudb/mysql-test/tokudb_parts/t/partition_alter4_tokudb.test @@ -49,6 +49,8 @@ let $more_pk_ui_tests= 0; --source include/big_test.inc # Skiping this test from Valgrind execution as per Bug-14627884 --source include/not_valgrind.inc +# Don't run with asan as it causes timeouts +--source include/not_asan.inc #------------------------------------------------------------------------------# # Engine specific settings and requirements diff --git a/storage/tokudb/tokudb_dir_cmd.cc b/storage/tokudb/tokudb_dir_cmd.cc index d0da92eab27..871bb712406 100644 --- a/storage/tokudb/tokudb_dir_cmd.cc +++ b/storage/tokudb/tokudb_dir_cmd.cc @@ -67,7 +67,7 @@ static int MDL_and_TDC(THD *thd, table); return error; } - tdc_remove_table(thd, TDC_RT_REMOVE_ALL, db, table, false); + tdc_remove_table(thd, db, table); return error; } diff --git a/storage/tokudb/tokudb_information_schema.cc b/storage/tokudb/tokudb_information_schema.cc index 0b9882060cd..fef72557b18 100644 --- a/storage/tokudb/tokudb_information_schema.cc +++ b/storage/tokudb/tokudb_information_schema.cc @@ -56,11 +56,17 @@ st_mysql_information_schema trx_information_schema = { MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION }; +using ::Show::Column; +using ::Show::SLonglong; +using ::Show::CEnd; +using ::Show::Varchar; +using ::Show::Datetime; + ST_FIELD_INFO trx_field_info[] = { - {"trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"trx_mysql_thread_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"trx_time", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("trx_id", SLonglong(0), NOT_NULL), + Column("trx_mysql_thread_id", SLonglong(0), NOT_NULL), + Column("trx_time", SLonglong(0), NOT_NULL), + CEnd() }; struct trx_extra_t { @@ -152,16 +158,16 @@ st_mysql_information_schema lock_waits_information_schema = { }; ST_FIELD_INFO lock_waits_field_info[] = { - {"requesting_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"blocking_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_dname", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_key_left", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_key_right", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_start_time", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"lock_waits_table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("requesting_trx_id", SLonglong(0), NOT_NULL), + Column("blocking_trx_id", SLonglong(0), NOT_NULL), + Column("lock_waits_dname", Varchar(256), NOT_NULL), + Column("lock_waits_key_left", Varchar(256), NOT_NULL), + Column("lock_waits_key_right", Varchar(256), NOT_NULL), + Column("lock_waits_start_time", SLonglong(0), NOT_NULL), + Column("lock_waits_table_schema", Varchar(256), NOT_NULL), + Column("lock_waits_table_name", Varchar(256), NOT_NULL), + Column("lock_waits_table_dictionary_name", Varchar(256), NOT_NULL), + CEnd() }; struct lock_waits_extra_t { @@ -293,16 +299,16 @@ st_mysql_information_schema locks_information_schema = { MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION }; - ST_FIELD_INFO locks_field_info[] = { - {"locks_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_mysql_thread_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_dname", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_key_left", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_key_right", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"locks_table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} +ST_FIELD_INFO locks_field_info[] = { + Column("locks_trx_id", SLonglong(0), NOT_NULL), + Column("locks_mysql_thread_id", SLonglong(0), NOT_NULL), + Column("locks_dname", Varchar(256), NOT_NULL), + Column("locks_key_left", Varchar(256), NOT_NULL), + Column("locks_key_right", Varchar(256), NOT_NULL), + Column("locks_table_schema", Varchar(256), NOT_NULL), + Column("locks_table_name", Varchar(256), NOT_NULL), + Column("locks_table_dictionary_name", Varchar(256), NOT_NULL), + CEnd() }; struct locks_extra_t { @@ -434,12 +440,12 @@ st_mysql_information_schema file_map_information_schema = { }; ST_FIELD_INFO file_map_field_info[] = { - {"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("dictionary_name", Varchar(256), NOT_NULL), + Column("internal_file_name", Varchar(256), NOT_NULL), + Column("table_schema", Varchar(256), NOT_NULL), + Column("table_name", Varchar(256), NOT_NULL), + Column("table_dictionary_name", Varchar(256), NOT_NULL), + CEnd() }; int report_file_map(TABLE* table, THD* thd) { @@ -581,16 +587,16 @@ st_mysql_information_schema fractal_tree_info_information_schema = { }; ST_FIELD_INFO fractal_tree_info_field_info[] = { - {"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"bt_num_blocks_allocated", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"bt_num_blocks_in_use", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"bt_size_allocated", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"bt_size_in_use", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("dictionary_name", Varchar(256), NOT_NULL), + Column("internal_file_name", Varchar(256), NOT_NULL), + Column("bt_num_blocks_allocated", SLonglong(0), NOT_NULL), + Column("bt_num_blocks_in_use", SLonglong(0), NOT_NULL), + Column("bt_size_allocated", SLonglong(0), NOT_NULL), + Column("bt_size_in_use", SLonglong(0), NOT_NULL), + Column("table_schema", Varchar(256), NOT_NULL), + Column("table_name", Varchar(256), NOT_NULL), + Column("table_dictionary_name", Varchar(256), NOT_NULL), + CEnd() }; int report_fractal_tree_info_for_db( @@ -793,16 +799,16 @@ st_mysql_information_schema fractal_tree_block_map_information_schema = { }; ST_FIELD_INFO fractal_tree_block_map_field_info[] = { - {"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"checkpoint_count", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"blocknum", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"offset", 0, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, - {"size", 0, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, - {"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("dictionary_name", Varchar(256), NOT_NULL), + Column("internal_file_name", Varchar(256), NOT_NULL), + Column("checkpoint_count", SLonglong(0), NOT_NULL), + Column("blocknum", SLonglong(0), NOT_NULL), + Column("offset", SLonglong(0), NULLABLE), + Column("size", SLonglong(0), NULLABLE), + Column("table_schema", Varchar(256), NOT_NULL), + Column("table_name", Varchar(256), NOT_NULL), + Column("table_dictionary_name", Varchar(256), NOT_NULL), + CEnd() }; struct report_fractal_tree_block_map_iterator_extra_t { @@ -1089,16 +1095,16 @@ st_mysql_information_schema background_job_status_information_schema = { }; ST_FIELD_INFO background_job_status_field_info[] = { - {"id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"database_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"job_type", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"job_params", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"scheduler", 32, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"scheduled_time", 0, MYSQL_TYPE_DATETIME, 0, 0, NULL, SKIP_OPEN_TABLE }, - {"started_time", 0, MYSQL_TYPE_DATETIME, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, - {"status", 1024, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, - {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} + Column("id", SLonglong(0), NOT_NULL), + Column("database_name", Varchar(256), NOT_NULL), + Column("table_name", Varchar(256), NOT_NULL), + Column("job_type", Varchar(256), NOT_NULL), + Column("job_params", Varchar(256), NOT_NULL), + Column("scheduler", Varchar(32), NOT_NULL), + Column("scheduled_time", Datetime(0), NOT_NULL), + Column("started_time", Datetime(0), NULLABLE), + Column("status", Varchar(1024), NULLABLE), + CEnd() }; struct background_job_status_extra { diff --git a/storage/tokudb/tokudb_memory.h b/storage/tokudb/tokudb_memory.h index 2687c1cda8e..a12db83e022 100644 --- a/storage/tokudb/tokudb_memory.h +++ b/storage/tokudb/tokudb_memory.h @@ -40,31 +40,19 @@ void* multi_malloc(myf myFlags, ...); inline void* malloc(size_t s, myf flags) { -#if 50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799 return ::my_malloc(0, s, flags); -#else - return ::my_malloc(s, flags); -#endif } inline void* realloc(void* p, size_t s, myf flags) { if (s == 0) return p; -#if 50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799 return ::my_realloc(0, p, s, flags); -#else - return ::my_realloc(p, s, flags | MY_ALLOW_ZERO_PTR); -#endif } inline void free(void* ptr) { if (ptr) ::my_free(ptr); } inline char* strdup(const char* p, myf flags) { -#if 50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799 return ::my_strdup(0, p, flags); -#else - return ::my_strdup(p, flags); -#endif } inline void* multi_malloc(myf myFlags, ...) { va_list args; |