Commit 5e474f92 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-19836 Reuse new I_S table definition helper classes for RocksDB

parent 8d098333
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='INFORMATION_SCHEMA'
AND TABLE_NAME LIKE 'ROCKSDB%'
ORDER BY TABLE_NAME;
TABLE_NAME
ROCKSDB_CFSTATS
ROCKSDB_CF_OPTIONS
ROCKSDB_COMPACTION_STATS
ROCKSDB_DBSTATS
ROCKSDB_DDL
ROCKSDB_DEADLOCK
ROCKSDB_GLOBAL_INFO
ROCKSDB_INDEX_FILE_MAP
ROCKSDB_LOCKS
ROCKSDB_PERF_CONTEXT
ROCKSDB_PERF_CONTEXT_GLOBAL
ROCKSDB_SST_PROPS
ROCKSDB_TRX
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_CF_OPTIONS;
Table Create Table
ROCKSDB_CF_OPTIONS CREATE TEMPORARY TABLE `ROCKSDB_CF_OPTIONS` (
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`OPTION_TYPE` varchar(193) NOT NULL DEFAULT '',
`VALUE` varchar(193) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_CFSTATS;
Table Create Table
ROCKSDB_CFSTATS CREATE TEMPORARY TABLE `ROCKSDB_CFSTATS` (
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`STAT_TYPE` varchar(193) NOT NULL DEFAULT '',
`VALUE` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS;
Table Create Table
ROCKSDB_COMPACTION_STATS CREATE TEMPORARY TABLE `ROCKSDB_COMPACTION_STATS` (
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`LEVEL` varchar(513) NOT NULL DEFAULT '',
`TYPE` varchar(513) NOT NULL DEFAULT '',
`VALUE` double NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DBSTATS;
Table Create Table
ROCKSDB_DBSTATS CREATE TEMPORARY TABLE `ROCKSDB_DBSTATS` (
`STAT_TYPE` varchar(193) NOT NULL DEFAULT '',
`VALUE` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DDL;
Table Create Table
ROCKSDB_DDL CREATE TEMPORARY TABLE `ROCKSDB_DDL` (
`TABLE_SCHEMA` varchar(193) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(193) NOT NULL DEFAULT '',
`PARTITION_NAME` varchar(193) DEFAULT NULL,
`INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
`COLUMN_FAMILY` int(11) NOT NULL DEFAULT 0,
`INDEX_NUMBER` int(11) NOT NULL DEFAULT 0,
`INDEX_TYPE` smallint(6) NOT NULL DEFAULT 0,
`KV_FORMAT_VERSION` smallint(6) NOT NULL DEFAULT 0,
`TTL_DURATION` bigint(21) NOT NULL DEFAULT 0,
`INDEX_FLAGS` bigint(21) NOT NULL DEFAULT 0,
`CF` varchar(193) NOT NULL DEFAULT '',
`AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DEADLOCK;
Table Create Table
ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` (
`DEADLOCK_ID` bigint(21) NOT NULL DEFAULT 0,
`TIMESTAMP` bigint(21) NOT NULL DEFAULT 0,
`TRANSACTION_ID` bigint(21) NOT NULL DEFAULT 0,
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
`LOCK_TYPE` varchar(193) NOT NULL DEFAULT '',
`INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(193) NOT NULL DEFAULT '',
`ROLLED_BACK` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
Table Create Table
ROCKSDB_GLOBAL_INFO CREATE TEMPORARY TABLE `ROCKSDB_GLOBAL_INFO` (
`TYPE` varchar(513) NOT NULL DEFAULT '',
`NAME` varchar(513) NOT NULL DEFAULT '',
`VALUE` varchar(513) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_INDEX_FILE_MAP;
Table Create Table
ROCKSDB_INDEX_FILE_MAP CREATE TEMPORARY TABLE `ROCKSDB_INDEX_FILE_MAP` (
`COLUMN_FAMILY` int(11) NOT NULL DEFAULT 0,
`INDEX_NUMBER` int(11) NOT NULL DEFAULT 0,
`SST_NAME` varchar(193) NOT NULL DEFAULT '',
`NUM_ROWS` bigint(21) NOT NULL DEFAULT 0,
`DATA_SIZE` bigint(21) NOT NULL DEFAULT 0,
`ENTRY_DELETES` bigint(21) NOT NULL DEFAULT 0,
`ENTRY_SINGLEDELETES` bigint(21) NOT NULL DEFAULT 0,
`ENTRY_MERGES` bigint(21) NOT NULL DEFAULT 0,
`ENTRY_OTHERS` bigint(21) NOT NULL DEFAULT 0,
`DISTINCT_KEYS_PREFIX` varchar(800) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_LOCKS;
Table Create Table
ROCKSDB_LOCKS CREATE TEMPORARY TABLE `ROCKSDB_LOCKS` (
`COLUMN_FAMILY_ID` int(11) NOT NULL DEFAULT 0,
`TRANSACTION_ID` int(11) NOT NULL DEFAULT 0,
`KEY` varchar(513) NOT NULL DEFAULT '',
`MODE` varchar(32) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT;
Table Create Table
ROCKSDB_PERF_CONTEXT CREATE TEMPORARY TABLE `ROCKSDB_PERF_CONTEXT` (
`TABLE_SCHEMA` varchar(193) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(193) NOT NULL DEFAULT '',
`PARTITION_NAME` varchar(193) DEFAULT NULL,
`STAT_TYPE` varchar(193) NOT NULL DEFAULT '',
`VALUE` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT_GLOBAL;
Table Create Table
ROCKSDB_PERF_CONTEXT_GLOBAL CREATE TEMPORARY TABLE `ROCKSDB_PERF_CONTEXT_GLOBAL` (
`STAT_TYPE` varchar(193) NOT NULL DEFAULT '',
`VALUE` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_SST_PROPS;
Table Create Table
ROCKSDB_SST_PROPS CREATE TEMPORARY TABLE `ROCKSDB_SST_PROPS` (
`SST_NAME` varchar(193) NOT NULL DEFAULT '',
`COLUMN_FAMILY` int(11) NOT NULL DEFAULT 0,
`DATA_BLOCKS` bigint(21) NOT NULL DEFAULT 0,
`ENTRIES` bigint(21) NOT NULL DEFAULT 0,
`RAW_KEY_SIZE` bigint(21) NOT NULL DEFAULT 0,
`RAW_VALUE_SIZE` bigint(21) NOT NULL DEFAULT 0,
`DATA_BLOCK_SIZE` bigint(21) NOT NULL DEFAULT 0,
`INDEX_BLOCK_SIZE` bigint(21) NOT NULL DEFAULT 0,
`INDEX_PARTITIONS` int(11) NOT NULL DEFAULT 0,
`TOP_LEVEL_INDEX_SIZE` bigint(21) NOT NULL DEFAULT 0,
`FILTER_BLOCK_SIZE` bigint(21) NOT NULL DEFAULT 0,
`COMPRESSION_ALGO` varchar(193) NOT NULL DEFAULT '',
`CREATION_TIME` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_TRX;
Table Create Table
ROCKSDB_TRX CREATE TEMPORARY TABLE `ROCKSDB_TRX` (
`TRANSACTION_ID` bigint(21) NOT NULL DEFAULT 0,
`STATE` varchar(193) NOT NULL DEFAULT '',
`NAME` varchar(193) NOT NULL DEFAULT '',
`WRITE_COUNT` bigint(21) NOT NULL DEFAULT 0,
`LOCK_COUNT` bigint(21) NOT NULL DEFAULT 0,
`TIMEOUT_SEC` int(11) NOT NULL DEFAULT 0,
`WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
`WAITING_COLUMN_FAMILY_ID` int(11) NOT NULL DEFAULT 0,
`IS_REPLICATION` int(11) NOT NULL DEFAULT 0,
`SKIP_TRX_API` int(11) NOT NULL DEFAULT 0,
`READ_ONLY` int(11) NOT NULL DEFAULT 0,
`HAS_DEADLOCK_DETECTION` int(11) NOT NULL DEFAULT 0,
`NUM_ONGOING_BULKLOAD` int(11) NOT NULL DEFAULT 0,
`THREAD_ID` int(11) NOT NULL DEFAULT 0,
`QUERY` varchar(193) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
......@@ -13,15 +13,15 @@ connection default;
show create table information_schema.rocksdb_deadlock;
Table Create Table
ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` (
`DEADLOCK_ID` bigint(8) NOT NULL DEFAULT 0,
`TIMESTAMP` bigint(8) NOT NULL DEFAULT 0,
`TRANSACTION_ID` bigint(8) NOT NULL DEFAULT 0,
`DEADLOCK_ID` bigint(21) NOT NULL DEFAULT 0,
`TIMESTAMP` bigint(21) NOT NULL DEFAULT 0,
`TRANSACTION_ID` bigint(21) NOT NULL DEFAULT 0,
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
`LOCK_TYPE` varchar(193) NOT NULL DEFAULT '',
`INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(193) NOT NULL DEFAULT '',
`ROLLED_BACK` bigint(8) NOT NULL DEFAULT 0
`ROLLED_BACK` bigint(21) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
create table t (i int primary key) engine=rocksdb;
insert into t values (1), (2), (3);
......
--source include/have_rocksdb.inc
--source include/have_partition.inc
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='INFORMATION_SCHEMA'
AND TABLE_NAME LIKE 'ROCKSDB%'
ORDER BY TABLE_NAME;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_CF_OPTIONS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_CFSTATS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DBSTATS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DDL;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_DEADLOCK;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_INDEX_FILE_MAP;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_LOCKS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT_GLOBAL;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_SST_PROPS;
SHOW CREATE TABLE INFORMATION_SCHEMA.ROCKSDB_TRX;
This diff is collapsed.
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