Commit 1c27a050 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-19818 Reuse new I_S table definition helper classes for TokuDB

parent 9561b0b4
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
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
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
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
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
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
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
--tokudb --plugin-load-add=$HA_TOKUDB_SO --loose-tokudb-check-jemalloc=0
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 { };
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_BACKGROUND_JOB_STATUS;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FILE_MAP;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_BLOCK_MAP;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_FRACTAL_TREE_INFO;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCK_WAITS;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_LOCKS;
SHOW CREATE TABLE INFORMATION_SCHEMA.TOKUDB_TRX;
...@@ -56,11 +56,17 @@ st_mysql_information_schema trx_information_schema = { ...@@ -56,11 +56,17 @@ st_mysql_information_schema trx_information_schema = {
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION 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[] = { ST_FIELD_INFO trx_field_info[] = {
{"trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("trx_id", SLonglong(0), NOT_NULL),
{"trx_mysql_thread_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("trx_mysql_thread_id", SLonglong(0), NOT_NULL),
{"trx_time", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("trx_time", SLonglong(0), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
struct trx_extra_t { struct trx_extra_t {
...@@ -152,16 +158,16 @@ st_mysql_information_schema lock_waits_information_schema = { ...@@ -152,16 +158,16 @@ st_mysql_information_schema lock_waits_information_schema = {
}; };
ST_FIELD_INFO lock_waits_field_info[] = { ST_FIELD_INFO lock_waits_field_info[] = {
{"requesting_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("requesting_trx_id", SLonglong(0), NOT_NULL),
{"blocking_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("blocking_trx_id", SLonglong(0), NOT_NULL),
{"lock_waits_dname", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_dname", Varchar(256), NOT_NULL),
{"lock_waits_key_left", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_key_left", Varchar(256), NOT_NULL),
{"lock_waits_key_right", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_key_right", Varchar(256), NOT_NULL),
{"lock_waits_start_time", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_start_time", SLonglong(0), NOT_NULL),
{"lock_waits_table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_table_schema", Varchar(256), NOT_NULL),
{"lock_waits_table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_table_name", Varchar(256), NOT_NULL),
{"lock_waits_table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("lock_waits_table_dictionary_name", Varchar(256), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
struct lock_waits_extra_t { struct lock_waits_extra_t {
...@@ -293,16 +299,16 @@ st_mysql_information_schema locks_information_schema = { ...@@ -293,16 +299,16 @@ st_mysql_information_schema locks_information_schema = {
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
}; };
ST_FIELD_INFO locks_field_info[] = { ST_FIELD_INFO locks_field_info[] = {
{"locks_trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_trx_id", SLonglong(0), NOT_NULL),
{"locks_mysql_thread_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_mysql_thread_id", SLonglong(0), NOT_NULL),
{"locks_dname", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_dname", Varchar(256), NOT_NULL),
{"locks_key_left", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_key_left", Varchar(256), NOT_NULL),
{"locks_key_right", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_key_right", Varchar(256), NOT_NULL),
{"locks_table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_table_schema", Varchar(256), NOT_NULL),
{"locks_table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_table_name", Varchar(256), NOT_NULL),
{"locks_table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("locks_table_dictionary_name", Varchar(256), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
struct locks_extra_t { struct locks_extra_t {
...@@ -434,12 +440,12 @@ st_mysql_information_schema file_map_information_schema = { ...@@ -434,12 +440,12 @@ st_mysql_information_schema file_map_information_schema = {
}; };
ST_FIELD_INFO file_map_field_info[] = { ST_FIELD_INFO file_map_field_info[] = {
{"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("dictionary_name", Varchar(256), NOT_NULL),
{"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("internal_file_name", Varchar(256), NOT_NULL),
{"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_schema", Varchar(256), NOT_NULL),
{"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_name", Varchar(256), NOT_NULL),
{"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_dictionary_name", Varchar(256), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
int report_file_map(TABLE* table, THD* thd) { int report_file_map(TABLE* table, THD* thd) {
...@@ -581,16 +587,16 @@ st_mysql_information_schema fractal_tree_info_information_schema = { ...@@ -581,16 +587,16 @@ st_mysql_information_schema fractal_tree_info_information_schema = {
}; };
ST_FIELD_INFO fractal_tree_info_field_info[] = { ST_FIELD_INFO fractal_tree_info_field_info[] = {
{"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("dictionary_name", Varchar(256), NOT_NULL),
{"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("internal_file_name", Varchar(256), NOT_NULL),
{"bt_num_blocks_allocated", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("bt_num_blocks_allocated", SLonglong(0), NOT_NULL),
{"bt_num_blocks_in_use", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("bt_num_blocks_in_use", SLonglong(0), NOT_NULL),
{"bt_size_allocated", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("bt_size_allocated", SLonglong(0), NOT_NULL),
{"bt_size_in_use", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("bt_size_in_use", SLonglong(0), NOT_NULL),
{"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_schema", Varchar(256), NOT_NULL),
{"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_name", Varchar(256), NOT_NULL),
{"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_dictionary_name", Varchar(256), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
int report_fractal_tree_info_for_db( int report_fractal_tree_info_for_db(
...@@ -793,16 +799,16 @@ st_mysql_information_schema fractal_tree_block_map_information_schema = { ...@@ -793,16 +799,16 @@ st_mysql_information_schema fractal_tree_block_map_information_schema = {
}; };
ST_FIELD_INFO fractal_tree_block_map_field_info[] = { ST_FIELD_INFO fractal_tree_block_map_field_info[] = {
{"dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("dictionary_name", Varchar(256), NOT_NULL),
{"internal_file_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("internal_file_name", Varchar(256), NOT_NULL),
{"checkpoint_count", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("checkpoint_count", SLonglong(0), NOT_NULL),
{"blocknum", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("blocknum", SLonglong(0), NOT_NULL),
{"offset", 0, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, Column("offset", SLonglong(0), NULLABLE),
{"size", 0, MYSQL_TYPE_LONGLONG, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, Column("size", SLonglong(0), NULLABLE),
{"table_schema", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_schema", Varchar(256), NOT_NULL),
{"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_name", Varchar(256), NOT_NULL),
{"table_dictionary_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_dictionary_name", Varchar(256), NOT_NULL),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
struct report_fractal_tree_block_map_iterator_extra_t { struct report_fractal_tree_block_map_iterator_extra_t {
...@@ -1089,16 +1095,16 @@ st_mysql_information_schema background_job_status_information_schema = { ...@@ -1089,16 +1095,16 @@ st_mysql_information_schema background_job_status_information_schema = {
}; };
ST_FIELD_INFO background_job_status_field_info[] = { ST_FIELD_INFO background_job_status_field_info[] = {
{"id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("id", SLonglong(0), NOT_NULL),
{"database_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("database_name", Varchar(256), NOT_NULL),
{"table_name", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("table_name", Varchar(256), NOT_NULL),
{"job_type", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("job_type", Varchar(256), NOT_NULL),
{"job_params", 256, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("job_params", Varchar(256), NOT_NULL),
{"scheduler", 32, MYSQL_TYPE_STRING, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("scheduler", Varchar(32), NOT_NULL),
{"scheduled_time", 0, MYSQL_TYPE_DATETIME, 0, 0, NULL, SKIP_OPEN_TABLE }, Column("scheduled_time", Datetime(0), NOT_NULL),
{"started_time", 0, MYSQL_TYPE_DATETIME, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, Column("started_time", Datetime(0), NULLABLE),
{"status", 1024, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL, NULL, SKIP_OPEN_TABLE }, Column("status", Varchar(1024), NULLABLE),
{NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} CEnd()
}; };
struct background_job_status_extra { struct background_job_status_extra {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment