Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5e474f92
Commit
5e474f92
authored
Jun 22, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19836 Reuse new I_S table definition helper classes for RocksDB
parent
8d098333
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
281 additions
and
125 deletions
+281
-125
storage/rocksdb/mysql-test/rocksdb/r/i_s.result
storage/rocksdb/mysql-test/rocksdb/r/i_s.result
+155
-0
storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
+4
-4
storage/rocksdb/mysql-test/rocksdb/t/i_s.test
storage/rocksdb/mysql-test/rocksdb/t/i_s.test
+21
-0
storage/rocksdb/rdb_i_s.cc
storage/rocksdb/rdb_i_s.cc
+101
-121
No files found.
storage/rocksdb/mysql-test/rocksdb/r/i_s.result
0 → 100644
View file @
5e474f92
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
storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result
View file @
5e474f92
...
@@ -13,15 +13,15 @@ connection default;
...
@@ -13,15 +13,15 @@ connection default;
show create table information_schema.rocksdb_deadlock;
show create table information_schema.rocksdb_deadlock;
Table Create Table
Table Create Table
ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` (
ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` (
`DEADLOCK_ID` bigint(
8
) NOT NULL DEFAULT 0,
`DEADLOCK_ID` bigint(
21
) NOT NULL DEFAULT 0,
`TIMESTAMP` bigint(
8
) NOT NULL DEFAULT 0,
`TIMESTAMP` bigint(
21
) NOT NULL DEFAULT 0,
`TRANSACTION_ID` bigint(
8
) NOT NULL DEFAULT 0,
`TRANSACTION_ID` bigint(
21
) NOT NULL DEFAULT 0,
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`CF_NAME` varchar(193) NOT NULL DEFAULT '',
`WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
`WAITING_KEY` varchar(513) NOT NULL DEFAULT '',
`LOCK_TYPE` varchar(193) NOT NULL DEFAULT '',
`LOCK_TYPE` varchar(193) NOT NULL DEFAULT '',
`INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
`INDEX_NAME` varchar(193) NOT NULL DEFAULT '',
`TABLE_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
) ENGINE=MEMORY DEFAULT CHARSET=utf8
create table t (i int primary key) engine=rocksdb;
create table t (i int primary key) engine=rocksdb;
insert into t values (1), (2), (3);
insert into t values (1), (2), (3);
...
...
storage/rocksdb/mysql-test/rocksdb/t/i_s.test
0 → 100644
View file @
5e474f92
--
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
;
storage/rocksdb/rdb_i_s.cc
View file @
5e474f92
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment