-- https://www.phpmyadmin.net/
--
-- 主機： localhost
-- 產生時間： 2024 年 06 月 17 日 11:05
-- 伺服器版本： 8.0.36-28
-- PHP 版本： 7.4.33

START TRANSACTION;



--
-- 資料庫: `information_schema`
--

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ADMINISTRABLE_ROLE_AUTHORIZATIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ADMINISTRABLE_ROLE_AUTHORIZATIONS` (
`USER` varchar(97)
,`HOST` varchar(256)
,`GRANTEE` varchar(97)
,`GRANTEE_HOST` varchar(256)
,`ROLE_NAME` varchar(255)
,`ROLE_HOST` varchar(256)
,`IS_GRANTABLE` varchar(3)
,`IS_DEFAULT` varchar(3)
,`IS_MANDATORY` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `APPLICABLE_ROLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `APPLICABLE_ROLES` (
`USER` varchar(97)
,`HOST` varchar(256)
,`GRANTEE` varchar(97)
,`GRANTEE_HOST` varchar(256)
,`ROLE_NAME` varchar(255)
,`ROLE_HOST` varchar(256)
,`IS_GRANTABLE` varchar(3)
,`IS_DEFAULT` varchar(3)
,`IS_MANDATORY` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `CHARACTER_SETS`
-- (請參考以下實際畫面)
--
CREATE TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(64)
,`DEFAULT_COLLATE_NAME` varchar(64)
,`DESCRIPTION` varchar(2048)
,`MAXLEN` int unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `CHECK_CONSTRAINTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `CHECK_CONSTRAINTS` (
`CONSTRAINT_CATALOG` varchar(64)
,`CONSTRAINT_SCHEMA` varchar(64)
,`CONSTRAINT_NAME` varchar(64)
,`CHECK_CLAUSE` longtext
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `CLIENT_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `CLIENT_STATISTICS` (
`CLIENT` varchar(64)
,`TOTAL_CONNECTIONS` bigint unsigned
,`CONCURRENT_CONNECTIONS` bigint unsigned
,`CONNECTED_TIME` double(21,0) unsigned
,`BUSY_TIME` double(21,0) unsigned
,`CPU_TIME` double(21,0) unsigned
,`BYTES_RECEIVED` bigint unsigned
,`BYTES_SENT` bigint unsigned
,`BINLOG_BYTES_WRITTEN` bigint unsigned
,`ROWS_FETCHED` bigint unsigned
,`ROWS_UPDATED` bigint unsigned
,`TABLE_ROWS_READ` bigint unsigned
,`SELECT_COMMANDS` bigint unsigned
,`UPDATE_COMMANDS` bigint unsigned
,`OTHER_COMMANDS` bigint unsigned
,`COMMIT_TRANSACTIONS` bigint unsigned
,`ROLLBACK_TRANSACTIONS` bigint unsigned
,`DENIED_CONNECTIONS` bigint unsigned
,`LOST_CONNECTIONS` bigint unsigned
,`ACCESS_DENIED` bigint unsigned
,`EMPTY_QUERIES` bigint unsigned
,`TOTAL_SSL_CONNECTIONS` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLLATIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLLATIONS` (
`COLLATION_NAME` varchar(64)
,`CHARACTER_SET_NAME` varchar(64)
,`ID` bigint unsigned
,`IS_DEFAULT` varchar(3)
,`IS_COMPILED` varchar(3)
,`SORTLEN` int unsigned
,`PAD_ATTRIBUTE` enum('PAD SPACE','NO PAD')
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLLATION_CHARACTER_SET_APPLICABILITY`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` (
`COLLATION_NAME` varchar(64)
,`CHARACTER_SET_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLUMNS`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLUMNS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`ORDINAL_POSITION` int unsigned
,`COLUMN_DEFAULT` text
,`IS_NULLABLE` varchar(3)
,`DATA_TYPE` longtext
,`CHARACTER_MAXIMUM_LENGTH` bigint
,`CHARACTER_OCTET_LENGTH` bigint
,`NUMERIC_PRECISION` bigint unsigned
,`NUMERIC_SCALE` bigint unsigned
,`DATETIME_PRECISION` int unsigned
,`CHARACTER_SET_NAME` varchar(64)
,`COLLATION_NAME` varchar(64)
,`COLUMN_TYPE` mediumtext
,`COLUMN_KEY` enum('','PRI','UNI','MUL')
,`EXTRA` varchar(256)
,`PRIVILEGES` varchar(154)
,`COLUMN_COMMENT` text
,`GENERATION_EXPRESSION` longtext
,`SRS_ID` int unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLUMNS_EXTENSIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLUMNS_EXTENSIONS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`ENGINE_ATTRIBUTE` json
,`SECONDARY_ENGINE_ATTRIBUTE` json
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLUMN_PRIVILEGES`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLUMN_PRIVILEGES` (
`GRANTEE` varchar(292)
,`TABLE_CATALOG` varchar(512)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`PRIVILEGE_TYPE` varchar(64)
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COLUMN_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `COLUMN_STATISTICS` (
`SCHEMA_NAME` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`HISTOGRAM` json
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COMPRESSION_DICTIONARY`
-- (請參考以下實際畫面)
--
CREATE TABLE `COMPRESSION_DICTIONARY` (
`DICT_VERSION` int unsigned
,`DICT_NAME` varchar(64)
,`DICT_DATA` blob
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `COMPRESSION_DICTIONARY_TABLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `COMPRESSION_DICTIONARY_TABLES` (
`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`DICT_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ENABLED_ROLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `ENABLED_ROLES` (
`ROLE_NAME` varchar(255)
,`ROLE_HOST` varchar(255)
,`IS_DEFAULT` varchar(3)
,`IS_MANDATORY` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ENGINES`
-- (請參考以下實際畫面)
--
CREATE TABLE `ENGINES` (
`ENGINE` varchar(64)
,`SUPPORT` varchar(8)
,`COMMENT` varchar(80)
,`TRANSACTIONS` varchar(3)
,`XA` varchar(3)
,`SAVEPOINTS` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `EVENTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `EVENTS` (
`EVENT_CATALOG` varchar(64)
,`EVENT_SCHEMA` varchar(64)
,`EVENT_NAME` varchar(64)
,`DEFINER` varchar(288)
,`TIME_ZONE` varchar(64)
,`EVENT_BODY` varchar(3)
,`EVENT_DEFINITION` longtext
,`EVENT_TYPE` varchar(9)
,`EXECUTE_AT` datetime
,`INTERVAL_VALUE` varchar(256)
,`INTERVAL_FIELD` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND')
,`SQL_MODE` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','NOT_USED_9','NOT_USED_10','NOT_USED_11','NOT_USED_12','NOT_USED_13','NOT_USED_14','NOT_USED_15','NOT_USED_16','NOT_USED_17','NOT_USED_18','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','ALLOW_INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NOT_USED_29','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','TIME_TRUNCATE_FRACTIONAL')
,`STARTS` datetime
,`ENDS` datetime
,`STATUS` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
,`ON_COMPLETION` varchar(12)
,`CREATED` timestamp
,`LAST_ALTERED` timestamp
,`LAST_EXECUTED` datetime
,`EVENT_COMMENT` varchar(2048)
,`ORIGINATOR` int unsigned
,`CHARACTER_SET_CLIENT` varchar(64)
,`COLLATION_CONNECTION` varchar(64)
,`DATABASE_COLLATION` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `FILES`
-- (請參考以下實際畫面)
--
CREATE TABLE `FILES` (
`FILE_ID` bigint
,`FILE_NAME` text
,`FILE_TYPE` varchar(256)
,`TABLESPACE_NAME` varchar(268)
,`TABLE_CATALOG` char(0)
,`TABLE_SCHEMA` binary(0)
,`TABLE_NAME` binary(0)
,`LOGFILE_GROUP_NAME` varchar(256)
,`LOGFILE_GROUP_NUMBER` bigint
,`ENGINE` varchar(64)
,`FULLTEXT_KEYS` binary(0)
,`DELETED_ROWS` binary(0)
,`UPDATE_COUNT` binary(0)
,`FREE_EXTENTS` bigint
,`TOTAL_EXTENTS` bigint
,`EXTENT_SIZE` bigint
,`INITIAL_SIZE` bigint
,`MAXIMUM_SIZE` bigint
,`AUTOEXTEND_SIZE` bigint
,`CREATION_TIME` binary(0)
,`LAST_UPDATE_TIME` binary(0)
,`LAST_ACCESS_TIME` binary(0)
,`RECOVER_TIME` binary(0)
,`TRANSACTION_COUNTER` binary(0)
,`VERSION` bigint
,`ROW_FORMAT` varchar(256)
,`TABLE_ROWS` binary(0)
,`AVG_ROW_LENGTH` binary(0)
,`DATA_LENGTH` binary(0)
,`MAX_DATA_LENGTH` binary(0)
,`INDEX_LENGTH` binary(0)
,`DATA_FREE` bigint
,`CREATE_TIME` binary(0)
,`UPDATE_TIME` binary(0)
,`CHECK_TIME` binary(0)
,`CHECKSUM` binary(0)
,`STATUS` varchar(256)
,`EXTRA` varchar(256)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `GLOBAL_TEMPORARY_TABLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `GLOBAL_TEMPORARY_TABLES` (
`SESSION_ID` bigint
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`ENGINE` varchar(64)
,`NAME` varchar(512)
,`TABLE_ROWS` bigint unsigned
,`AVG_ROW_LENGTH` bigint unsigned
,`DATA_LENGTH` bigint unsigned
,`INDEX_LENGTH` bigint unsigned
,`CREATE_TIME` datetime
,`UPDATE_TIME` datetime
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INDEX_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INDEX_STATISTICS` (
`TABLE_SCHEMA` varchar(192)
,`TABLE_NAME` varchar(192)
,`INDEX_NAME` varchar(192)
,`ROWS_READ` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_BUFFER_PAGE`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_BUFFER_PAGE` (
`POOL_ID` bigint unsigned
,`BLOCK_ID` bigint unsigned
,`SPACE` bigint unsigned
,`PAGE_NUMBER` bigint unsigned
,`PAGE_TYPE` varchar(64)
,`FLUSH_TYPE` bigint unsigned
,`FIX_COUNT` bigint unsigned
,`IS_HASHED` varchar(3)
,`NEWEST_MODIFICATION` bigint unsigned
,`OLDEST_MODIFICATION` bigint unsigned
,`ACCESS_TIME` bigint unsigned
,`TABLE_NAME` varchar(1024)
,`INDEX_NAME` varchar(1024)
,`NUMBER_RECORDS` bigint unsigned
,`DATA_SIZE` bigint unsigned
,`COMPRESSED_SIZE` bigint unsigned
,`PAGE_STATE` varchar(64)
,`IO_FIX` varchar(64)
,`IS_OLD` varchar(3)
,`FREE_PAGE_CLOCK` bigint unsigned
,`IS_STALE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_BUFFER_PAGE_LRU`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_BUFFER_PAGE_LRU` (
`POOL_ID` bigint unsigned
,`LRU_POSITION` bigint unsigned
,`SPACE` bigint unsigned
,`PAGE_NUMBER` bigint unsigned
,`PAGE_TYPE` varchar(64)
,`FLUSH_TYPE` bigint unsigned
,`FIX_COUNT` bigint unsigned
,`IS_HASHED` varchar(3)
,`NEWEST_MODIFICATION` bigint unsigned
,`OLDEST_MODIFICATION` bigint unsigned
,`ACCESS_TIME` bigint unsigned
,`TABLE_NAME` varchar(1024)
,`INDEX_NAME` varchar(1024)
,`NUMBER_RECORDS` bigint unsigned
,`DATA_SIZE` bigint unsigned
,`COMPRESSED_SIZE` bigint unsigned
,`COMPRESSED` varchar(3)
,`IO_FIX` varchar(64)
,`IS_OLD` varchar(3)
,`FREE_PAGE_CLOCK` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_BUFFER_POOL_STATS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_BUFFER_POOL_STATS` (
`POOL_ID` bigint unsigned
,`POOL_SIZE` bigint unsigned
,`FREE_BUFFERS` bigint unsigned
,`DATABASE_PAGES` bigint unsigned
,`OLD_DATABASE_PAGES` bigint unsigned
,`MODIFIED_DATABASE_PAGES` bigint unsigned
,`PENDING_DECOMPRESS` bigint unsigned
,`PENDING_READS` bigint unsigned
,`PENDING_FLUSH_LRU` bigint unsigned
,`PENDING_FLUSH_LIST` bigint unsigned
,`PAGES_MADE_YOUNG` bigint unsigned
,`PAGES_NOT_MADE_YOUNG` bigint unsigned
,`PAGES_MADE_YOUNG_RATE` float(12,0)
,`PAGES_MADE_NOT_YOUNG_RATE` float(12,0)
,`NUMBER_PAGES_READ` bigint unsigned
,`NUMBER_PAGES_CREATED` bigint unsigned
,`NUMBER_PAGES_WRITTEN` bigint unsigned
,`PAGES_READ_RATE` float(12,0)
,`PAGES_CREATE_RATE` float(12,0)
,`PAGES_WRITTEN_RATE` float(12,0)
,`NUMBER_PAGES_GET` bigint unsigned
,`HIT_RATE` bigint unsigned
,`YOUNG_MAKE_PER_THOUSAND_GETS` bigint unsigned
,`NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint unsigned
,`NUMBER_PAGES_READ_AHEAD` bigint unsigned
,`NUMBER_READ_AHEAD_EVICTED` bigint unsigned
,`READ_AHEAD_RATE` float(12,0)
,`READ_AHEAD_EVICTED_RATE` float(12,0)
,`LRU_IO_TOTAL` bigint unsigned
,`LRU_IO_CURRENT` bigint unsigned
,`UNCOMPRESS_TOTAL` bigint unsigned
,`UNCOMPRESS_CURRENT` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CACHED_INDEXES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CACHED_INDEXES` (
`SPACE_ID` int unsigned
,`INDEX_ID` bigint unsigned
,`N_CACHED_PAGES` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMP`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMP` (
`page_size` int
,`compress_ops` int
,`compress_ops_ok` int
,`compress_time` int
,`uncompress_ops` int
,`uncompress_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMPMEM`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMPMEM` (
`page_size` int
,`buffer_pool_instance` int
,`pages_used` int
,`pages_free` int
,`relocation_ops` bigint
,`relocation_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMPMEM_RESET`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMPMEM_RESET` (
`page_size` int
,`buffer_pool_instance` int
,`pages_used` int
,`pages_free` int
,`relocation_ops` bigint
,`relocation_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMP_PER_INDEX`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMP_PER_INDEX` (
`database_name` varchar(192)
,`table_name` varchar(192)
,`index_name` varchar(192)
,`compress_ops` int
,`compress_ops_ok` int
,`compress_time` int
,`uncompress_ops` int
,`uncompress_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMP_PER_INDEX_RESET`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMP_PER_INDEX_RESET` (
`database_name` varchar(192)
,`table_name` varchar(192)
,`index_name` varchar(192)
,`compress_ops` int
,`compress_ops_ok` int
,`compress_time` int
,`uncompress_ops` int
,`uncompress_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_CMP_RESET`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_CMP_RESET` (
`page_size` int
,`compress_ops` int
,`compress_ops_ok` int
,`compress_time` int
,`uncompress_ops` int
,`uncompress_time` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_COLUMNS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_COLUMNS` (
`TABLE_ID` bigint unsigned
,`NAME` varchar(193)
,`POS` bigint unsigned
,`MTYPE` int
,`PRTYPE` int
,`LEN` int
,`HAS_DEFAULT` int
,`DEFAULT_VALUE` text
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_DATAFILES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_DATAFILES` (
`SPACE` varbinary(256)
,`PATH` varchar(512)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FIELDS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FIELDS` (
`INDEX_ID` varbinary(256)
,`NAME` varchar(64)
,`POS` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FOREIGN`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FOREIGN` (
`ID` varchar(129)
,`FOR_NAME` varchar(129)
,`REF_NAME` varchar(129)
,`N_COLS` bigint
,`TYPE` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FOREIGN_COLS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FOREIGN_COLS` (
`ID` varchar(129)
,`FOR_COL_NAME` varchar(64)
,`REF_COL_NAME` varchar(64)
,`POS` int unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_BEING_DELETED`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_BEING_DELETED` (
`DOC_ID` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_CONFIG`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_CONFIG` (
`KEY` varchar(193)
,`VALUE` varchar(193)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_DEFAULT_STOPWORD`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_DEFAULT_STOPWORD` (
`value` varchar(18)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_DELETED`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_DELETED` (
`DOC_ID` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_INDEX_CACHE`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_INDEX_CACHE` (
`WORD` varchar(337)
,`FIRST_DOC_ID` bigint unsigned
,`LAST_DOC_ID` bigint unsigned
,`DOC_COUNT` bigint unsigned
,`DOC_ID` bigint unsigned
,`POSITION` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_FT_INDEX_TABLE`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_FT_INDEX_TABLE` (
`WORD` varchar(337)
,`FIRST_DOC_ID` bigint unsigned
,`LAST_DOC_ID` bigint unsigned
,`DOC_COUNT` bigint unsigned
,`DOC_ID` bigint unsigned
,`POSITION` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_INDEXES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_INDEXES` (
`INDEX_ID` bigint unsigned
,`NAME` varchar(193)
,`TABLE_ID` bigint unsigned
,`TYPE` int
,`N_FIELDS` int
,`PAGE_NO` int
,`SPACE` int
,`MERGE_THRESHOLD` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_METRICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_METRICS` (
`NAME` varchar(193)
,`SUBSYSTEM` varchar(193)
,`COUNT` bigint
,`MAX_COUNT` bigint
,`MIN_COUNT` bigint
,`AVG_COUNT` float(12,0)
,`COUNT_RESET` bigint
,`MAX_COUNT_RESET` bigint
,`MIN_COUNT_RESET` bigint
,`AVG_COUNT_RESET` float(12,0)
,`TIME_ENABLED` datetime
,`TIME_DISABLED` datetime
,`TIME_ELAPSED` bigint
,`TIME_RESET` datetime
,`STATUS` varchar(193)
,`TYPE` varchar(193)
,`COMMENT` varchar(193)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_SESSION_TEMP_TABLESPACES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_SESSION_TEMP_TABLESPACES` (
`ID` int unsigned
,`SPACE` int unsigned
,`PATH` varchar(4001)
,`SIZE` bigint unsigned
,`STATE` varchar(192)
,`PURPOSE` varchar(192)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TABLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TABLES` (
`TABLE_ID` bigint unsigned
,`NAME` varchar(655)
,`FLAG` int
,`N_COLS` int
,`SPACE` bigint
,`ROW_FORMAT` varchar(12)
,`ZIP_PAGE_SIZE` int unsigned
,`SPACE_TYPE` varchar(10)
,`INSTANT_COLS` int
,`TOTAL_ROW_VERSIONS` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TABLESPACES`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TABLESPACES` (
`SPACE` int unsigned
,`NAME` varchar(655)
,`FLAG` int unsigned
,`ROW_FORMAT` varchar(22)
,`PAGE_SIZE` int unsigned
,`ZIP_PAGE_SIZE` int unsigned
,`SPACE_TYPE` varchar(10)
,`FS_BLOCK_SIZE` int unsigned
,`FILE_SIZE` bigint unsigned
,`ALLOCATED_SIZE` bigint unsigned
,`AUTOEXTEND_SIZE` bigint unsigned
,`SERVER_VERSION` varchar(10)
,`SPACE_VERSION` int unsigned
,`ENCRYPTION` varchar(1)
,`STATE` varchar(10)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TABLESPACES_BRIEF`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TABLESPACES_BRIEF` (
`SPACE` varbinary(256)
,`NAME` varchar(268)
,`PATH` varchar(512)
,`FLAG` varbinary(256)
,`SPACE_TYPE` varchar(7)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TABLESTATS`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TABLESTATS` (
`TABLE_ID` bigint unsigned
,`NAME` varchar(193)
,`STATS_INITIALIZED` varchar(193)
,`NUM_ROWS` bigint unsigned
,`CLUST_INDEX_SIZE` bigint unsigned
,`OTHER_INDEX_SIZE` bigint unsigned
,`MODIFIED_COUNTER` bigint unsigned
,`AUTOINC` bigint unsigned
,`REF_COUNT` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TEMP_TABLE_INFO`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TEMP_TABLE_INFO` (
`TABLE_ID` bigint unsigned
,`NAME` varchar(64)
,`N_COLS` int unsigned
,`SPACE` int unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_TRX`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_TRX` (
`trx_id` bigint unsigned
,`trx_state` varchar(13)
,`trx_started` datetime
,`trx_requested_lock_id` varchar(105)
,`trx_wait_started` datetime
,`trx_weight` bigint unsigned
,`trx_mysql_thread_id` bigint unsigned
,`trx_query` varchar(1024)
,`trx_operation_state` varchar(64)
,`trx_tables_in_use` bigint unsigned
,`trx_tables_locked` bigint unsigned
,`trx_lock_structs` bigint unsigned
,`trx_lock_memory_bytes` bigint unsigned
,`trx_rows_locked` bigint unsigned
,`trx_rows_modified` bigint unsigned
,`trx_concurrency_tickets` bigint unsigned
,`trx_isolation_level` varchar(16)
,`trx_unique_checks` int
,`trx_foreign_key_checks` int
,`trx_last_foreign_key_error` varchar(256)
,`trx_adaptive_hash_latched` int
,`trx_adaptive_hash_timeout` bigint unsigned
,`trx_is_read_only` int
,`trx_autocommit_non_locking` int
,`trx_schedule_weight` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `INNODB_VIRTUAL`
-- (請參考以下實際畫面)
--
CREATE TABLE `INNODB_VIRTUAL` (
`TABLE_ID` bigint unsigned
,`POS` int unsigned
,`BASE_POS` int unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `KEYWORDS`
-- (請參考以下實際畫面)
--
CREATE TABLE `KEYWORDS` (
`WORD` varchar(128)
,`RESERVED` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `KEY_COLUMN_USAGE`
-- (請參考以下實際畫面)
--
CREATE TABLE `KEY_COLUMN_USAGE` (
`CONSTRAINT_CATALOG` varchar(64)
,`CONSTRAINT_SCHEMA` varchar(64)
,`CONSTRAINT_NAME` varchar(64)
,`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`ORDINAL_POSITION` int unsigned
,`POSITION_IN_UNIQUE_CONSTRAINT` int unsigned
,`REFERENCED_TABLE_SCHEMA` varchar(64)
,`REFERENCED_TABLE_NAME` varchar(64)
,`REFERENCED_COLUMN_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `OPTIMIZER_TRACE`
-- (請參考以下實際畫面)
--
CREATE TABLE `OPTIMIZER_TRACE` (
`QUERY` varchar(65535)
,`TRACE` varchar(65535)
,`MISSING_BYTES_BEYOND_MAX_MEM_SIZE` int
,`INSUFFICIENT_PRIVILEGES` tinyint(1)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `PARAMETERS`
-- (請參考以下實際畫面)
--
CREATE TABLE `PARAMETERS` (
`SPECIFIC_CATALOG` varchar(64)
,`SPECIFIC_SCHEMA` varchar(64)
,`SPECIFIC_NAME` varchar(64)
,`ORDINAL_POSITION` bigint unsigned
,`PARAMETER_MODE` varchar(5)
,`PARAMETER_NAME` varchar(64)
,`DATA_TYPE` longtext
,`CHARACTER_MAXIMUM_LENGTH` bigint
,`CHARACTER_OCTET_LENGTH` bigint
,`NUMERIC_PRECISION` int unsigned
,`NUMERIC_SCALE` bigint
,`DATETIME_PRECISION` int unsigned
,`CHARACTER_SET_NAME` varchar(64)
,`COLLATION_NAME` varchar(64)
,`DTD_IDENTIFIER` mediumtext
,`ROUTINE_TYPE` enum('FUNCTION','PROCEDURE')
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `PARTITIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `PARTITIONS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`PARTITION_NAME` varchar(64)
,`SUBPARTITION_NAME` varchar(64)
,`PARTITION_ORDINAL_POSITION` int unsigned
,`SUBPARTITION_ORDINAL_POSITION` int unsigned
,`PARTITION_METHOD` varchar(13)
,`SUBPARTITION_METHOD` varchar(13)
,`PARTITION_EXPRESSION` varchar(2048)
,`SUBPARTITION_EXPRESSION` varchar(2048)
,`PARTITION_DESCRIPTION` text
,`TABLE_ROWS` bigint unsigned
,`AVG_ROW_LENGTH` bigint unsigned
,`DATA_LENGTH` bigint unsigned
,`MAX_DATA_LENGTH` bigint unsigned
,`INDEX_LENGTH` bigint unsigned
,`DATA_FREE` bigint unsigned
,`CREATE_TIME` timestamp
,`UPDATE_TIME` datetime
,`CHECK_TIME` datetime
,`CHECKSUM` bigint
,`PARTITION_COMMENT` text
,`NODEGROUP` varchar(256)
,`TABLESPACE_NAME` varchar(268)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `PLUGINS`
-- (請參考以下實際畫面)
--
CREATE TABLE `PLUGINS` (
`PLUGIN_NAME` varchar(64)
,`PLUGIN_VERSION` varchar(20)
,`PLUGIN_STATUS` varchar(10)
,`PLUGIN_TYPE` varchar(80)
,`PLUGIN_TYPE_VERSION` varchar(20)
,`PLUGIN_LIBRARY` varchar(64)
,`PLUGIN_LIBRARY_VERSION` varchar(20)
,`PLUGIN_AUTHOR` varchar(64)
,`PLUGIN_DESCRIPTION` varchar(65535)
,`PLUGIN_LICENSE` varchar(80)
,`LOAD_OPTION` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `PROCESSLIST`
-- (請參考以下實際畫面)
--
CREATE TABLE `PROCESSLIST` (
`ID` bigint unsigned
,`USER` varchar(32)
,`HOST` varchar(261)
,`DB` varchar(64)
,`COMMAND` varchar(16)
,`TIME` int
,`STATE` varchar(64)
,`INFO` varchar(65535)
,`TIME_MS` bigint
,`ROWS_SENT` bigint unsigned
,`ROWS_EXAMINED` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `PROFILING`
-- (請參考以下實際畫面)
--
CREATE TABLE `PROFILING` (
`QUERY_ID` int
,`SEQ` int
,`STATE` varchar(30)
,`DURATION` decimal(905,0)
,`CPU_USER` decimal(905,0)
,`CPU_SYSTEM` decimal(905,0)
,`CONTEXT_VOLUNTARY` int
,`CONTEXT_INVOLUNTARY` int
,`BLOCK_OPS_IN` int
,`BLOCK_OPS_OUT` int
,`MESSAGES_SENT` int
,`MESSAGES_RECEIVED` int
,`PAGE_FAULTS_MAJOR` int
,`PAGE_FAULTS_MINOR` int
,`SWAPS` int
,`SOURCE_FUNCTION` varchar(30)
,`SOURCE_FILE` varchar(20)
,`SOURCE_LINE` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `REFERENTIAL_CONSTRAINTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `REFERENTIAL_CONSTRAINTS` (
`CONSTRAINT_CATALOG` varchar(64)
,`CONSTRAINT_SCHEMA` varchar(64)
,`CONSTRAINT_NAME` varchar(64)
,`UNIQUE_CONSTRAINT_CATALOG` varchar(64)
,`UNIQUE_CONSTRAINT_SCHEMA` varchar(64)
,`UNIQUE_CONSTRAINT_NAME` varchar(64)
,`MATCH_OPTION` enum('NONE','PARTIAL','FULL')
,`UPDATE_RULE` enum('NO ACTION','RESTRICT','CASCADE','SET NULL','SET DEFAULT')
,`DELETE_RULE` enum('NO ACTION','RESTRICT','CASCADE','SET NULL','SET DEFAULT')
,`TABLE_NAME` varchar(64)
,`REFERENCED_TABLE_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `RESOURCE_GROUPS`
-- (請參考以下實際畫面)
--
CREATE TABLE `RESOURCE_GROUPS` (
`RESOURCE_GROUP_NAME` varchar(64)
,`RESOURCE_GROUP_TYPE` enum('SYSTEM','USER')
,`RESOURCE_GROUP_ENABLED` tinyint(1)
,`VCPU_IDS` blob
,`THREAD_PRIORITY` int
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ROLE_COLUMN_GRANTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ROLE_COLUMN_GRANTS` (
`GRANTOR` varchar(97)
,`GRANTOR_HOST` varchar(256)
,`GRANTEE` char(32)
,`GRANTEE_HOST` char(255)
,`TABLE_CATALOG` varchar(3)
,`TABLE_SCHEMA` char(64)
,`TABLE_NAME` char(64)
,`COLUMN_NAME` char(64)
,`PRIVILEGE_TYPE` set('Select','Insert','Update','References')
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ROLE_ROUTINE_GRANTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ROLE_ROUTINE_GRANTS` (
`GRANTOR` varchar(97)
,`GRANTOR_HOST` varchar(256)
,`GRANTEE` char(32)
,`GRANTEE_HOST` char(255)
,`SPECIFIC_CATALOG` varchar(3)
,`SPECIFIC_SCHEMA` char(64)
,`SPECIFIC_NAME` char(64)
,`ROUTINE_CATALOG` varchar(3)
,`ROUTINE_SCHEMA` char(64)
,`ROUTINE_NAME` char(64)
,`PRIVILEGE_TYPE` set('Execute','Alter Routine','Grant')
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ROLE_TABLE_GRANTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ROLE_TABLE_GRANTS` (
`GRANTOR` varchar(97)
,`GRANTOR_HOST` varchar(256)
,`GRANTEE` char(32)
,`GRANTEE_HOST` char(255)
,`TABLE_CATALOG` varchar(3)
,`TABLE_SCHEMA` char(64)
,`TABLE_NAME` char(64)
,`PRIVILEGE_TYPE` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ROUTINES`
-- (請參考以下實際畫面)
--
CREATE TABLE `ROUTINES` (
`SPECIFIC_NAME` varchar(64)
,`ROUTINE_CATALOG` varchar(64)
,`ROUTINE_SCHEMA` varchar(64)
,`ROUTINE_NAME` varchar(64)
,`ROUTINE_TYPE` enum('FUNCTION','PROCEDURE')
,`DATA_TYPE` longtext
,`CHARACTER_MAXIMUM_LENGTH` bigint
,`CHARACTER_OCTET_LENGTH` bigint
,`NUMERIC_PRECISION` int unsigned
,`NUMERIC_SCALE` int unsigned
,`DATETIME_PRECISION` int unsigned
,`CHARACTER_SET_NAME` varchar(64)
,`COLLATION_NAME` varchar(64)
,`DTD_IDENTIFIER` longtext
,`ROUTINE_BODY` varchar(3)
,`ROUTINE_DEFINITION` longtext
,`EXTERNAL_NAME` binary(0)
,`EXTERNAL_LANGUAGE` varchar(64)
,`PARAMETER_STYLE` varchar(3)
,`IS_DETERMINISTIC` varchar(3)
,`SQL_DATA_ACCESS` enum('CONTAINS SQL','NO SQL','READS SQL DATA','MODIFIES SQL DATA')
,`SQL_PATH` binary(0)
,`SECURITY_TYPE` enum('DEFAULT','INVOKER','DEFINER')
,`CREATED` timestamp
,`LAST_ALTERED` timestamp
,`SQL_MODE` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','NOT_USED_9','NOT_USED_10','NOT_USED_11','NOT_USED_12','NOT_USED_13','NOT_USED_14','NOT_USED_15','NOT_USED_16','NOT_USED_17','NOT_USED_18','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','ALLOW_INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NOT_USED_29','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','TIME_TRUNCATE_FRACTIONAL')
,`ROUTINE_COMMENT` text
,`DEFINER` varchar(288)
,`CHARACTER_SET_CLIENT` varchar(64)
,`COLLATION_CONNECTION` varchar(64)
,`DATABASE_COLLATION` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `SCHEMATA`
-- (請參考以下實際畫面)
--
CREATE TABLE `SCHEMATA` (
`CATALOG_NAME` varchar(64)
,`SCHEMA_NAME` varchar(64)
,`DEFAULT_CHARACTER_SET_NAME` varchar(64)
,`DEFAULT_COLLATION_NAME` varchar(64)
,`SQL_PATH` binary(0)
,`DEFAULT_ENCRYPTION` enum('NO','YES')
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `SCHEMATA_EXTENSIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `SCHEMATA_EXTENSIONS` (
`CATALOG_NAME` varchar(64)
,`SCHEMA_NAME` varchar(64)
,`OPTIONS` varchar(256)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `SCHEMA_PRIVILEGES`
-- (請參考以下實際畫面)
--
CREATE TABLE `SCHEMA_PRIVILEGES` (
`GRANTEE` varchar(292)
,`TABLE_CATALOG` varchar(512)
,`TABLE_SCHEMA` varchar(64)
,`PRIVILEGE_TYPE` varchar(64)
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `STATISTICS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`NON_UNIQUE` int
,`INDEX_SCHEMA` varchar(64)
,`INDEX_NAME` varchar(64)
,`SEQ_IN_INDEX` int unsigned
,`COLUMN_NAME` varchar(64)
,`COLLATION` varchar(1)
,`CARDINALITY` bigint
,`SUB_PART` bigint
,`PACKED` binary(0)
,`NULLABLE` varchar(3)
,`INDEX_TYPE` varchar(11)
,`COMMENT` varchar(8)
,`INDEX_COMMENT` varchar(2048)
,`IS_VISIBLE` varchar(3)
,`EXPRESSION` longtext
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ST_GEOMETRY_COLUMNS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ST_GEOMETRY_COLUMNS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`COLUMN_NAME` varchar(64)
,`SRS_NAME` varchar(80)
,`SRS_ID` int unsigned
,`GEOMETRY_TYPE_NAME` longtext
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ST_SPATIAL_REFERENCE_SYSTEMS`
-- (請參考以下實際畫面)
--
CREATE TABLE `ST_SPATIAL_REFERENCE_SYSTEMS` (
`SRS_NAME` varchar(80)
,`SRS_ID` int unsigned
,`ORGANIZATION` varchar(256)
,`ORGANIZATION_COORDSYS_ID` int unsigned
,`DEFINITION` varchar(4096)
,`DESCRIPTION` varchar(2048)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `ST_UNITS_OF_MEASURE`
-- (請參考以下實際畫面)
--
CREATE TABLE `ST_UNITS_OF_MEASURE` (
`UNIT_NAME` varchar(255)
,`UNIT_TYPE` varchar(7)
,`CONVERSION_FACTOR` double
,`DESCRIPTION` varchar(255)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLES` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`TABLE_TYPE` enum('BASE TABLE','VIEW','SYSTEM VIEW')
,`ENGINE` varchar(64)
,`VERSION` int
,`ROW_FORMAT` enum('Fixed','Dynamic','Compressed','Redundant','Compact','Paged')
,`TABLE_ROWS` bigint unsigned
,`AVG_ROW_LENGTH` bigint unsigned
,`DATA_LENGTH` bigint unsigned
,`MAX_DATA_LENGTH` bigint unsigned
,`INDEX_LENGTH` bigint unsigned
,`DATA_FREE` bigint unsigned
,`AUTO_INCREMENT` bigint unsigned
,`CREATE_TIME` timestamp
,`UPDATE_TIME` datetime
,`CHECK_TIME` datetime
,`TABLE_COLLATION` varchar(64)
,`CHECKSUM` bigint
,`CREATE_OPTIONS` varchar(256)
,`TABLE_COMMENT` text
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLESPACES`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLESPACES` (
`TABLESPACE_NAME` varchar(64)
,`ENGINE` varchar(64)
,`TABLESPACE_TYPE` varchar(64)
,`LOGFILE_GROUP_NAME` varchar(64)
,`EXTENT_SIZE` bigint unsigned
,`AUTOEXTEND_SIZE` bigint unsigned
,`MAXIMUM_SIZE` bigint unsigned
,`NODEGROUP_ID` bigint unsigned
,`TABLESPACE_COMMENT` varchar(2048)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLESPACES_EXTENSIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLESPACES_EXTENSIONS` (
`TABLESPACE_NAME` varchar(268)
,`ENGINE_ATTRIBUTE` json
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLES_EXTENSIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLES_EXTENSIONS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`ENGINE_ATTRIBUTE` json
,`SECONDARY_ENGINE_ATTRIBUTE` json
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLE_CONSTRAINTS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLE_CONSTRAINTS` (
`CONSTRAINT_CATALOG` varchar(64)
,`CONSTRAINT_SCHEMA` varchar(64)
,`CONSTRAINT_NAME` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`CONSTRAINT_TYPE` varchar(11)
,`ENFORCED` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLE_CONSTRAINTS_EXTENSIONS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLE_CONSTRAINTS_EXTENSIONS` (
`CONSTRAINT_CATALOG` varchar(64)
,`CONSTRAINT_SCHEMA` varchar(64)
,`CONSTRAINT_NAME` varchar(64)
,`TABLE_NAME` varchar(64)
,`ENGINE_ATTRIBUTE` json
,`SECONDARY_ENGINE_ATTRIBUTE` json
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLE_PRIVILEGES`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLE_PRIVILEGES` (
`GRANTEE` varchar(292)
,`TABLE_CATALOG` varchar(512)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`PRIVILEGE_TYPE` varchar(64)
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TABLE_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TABLE_STATISTICS` (
`TABLE_SCHEMA` varchar(192)
,`TABLE_NAME` varchar(192)
,`ROWS_READ` bigint unsigned
,`ROWS_CHANGED` bigint unsigned
,`ROWS_CHANGED_X_INDEXES` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TEMPORARY_TABLES`
-- (請參考以下實際畫面)
--
CREATE TABLE `TEMPORARY_TABLES` (
`SESSION_ID` bigint
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`ENGINE` varchar(64)
,`NAME` varchar(512)
,`TABLE_ROWS` bigint unsigned
,`AVG_ROW_LENGTH` bigint unsigned
,`DATA_LENGTH` bigint unsigned
,`INDEX_LENGTH` bigint unsigned
,`CREATE_TIME` datetime
,`UPDATE_TIME` datetime
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `THREAD_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `THREAD_STATISTICS` (
`THREAD_ID` bigint unsigned
,`TOTAL_CONNECTIONS` bigint unsigned
,`CONNECTED_TIME` double(21,0) unsigned
,`BUSY_TIME` double(21,0) unsigned
,`CPU_TIME` double(21,0) unsigned
,`BYTES_RECEIVED` bigint unsigned
,`BYTES_SENT` bigint unsigned
,`BINLOG_BYTES_WRITTEN` bigint unsigned
,`ROWS_FETCHED` bigint unsigned
,`ROWS_UPDATED` bigint unsigned
,`TABLE_ROWS_READ` bigint unsigned
,`SELECT_COMMANDS` bigint unsigned
,`UPDATE_COMMANDS` bigint unsigned
,`OTHER_COMMANDS` bigint unsigned
,`COMMIT_TRANSACTIONS` bigint unsigned
,`ROLLBACK_TRANSACTIONS` bigint unsigned
,`DENIED_CONNECTIONS` bigint unsigned
,`LOST_CONNECTIONS` bigint unsigned
,`ACCESS_DENIED` bigint unsigned
,`EMPTY_QUERIES` bigint unsigned
,`TOTAL_SSL_CONNECTIONS` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `TRIGGERS`
-- (請參考以下實際畫面)
--
CREATE TABLE `TRIGGERS` (
`TRIGGER_CATALOG` varchar(64)
,`TRIGGER_SCHEMA` varchar(64)
,`TRIGGER_NAME` varchar(64)
,`EVENT_MANIPULATION` enum('INSERT','UPDATE','DELETE')
,`EVENT_OBJECT_CATALOG` varchar(64)
,`EVENT_OBJECT_SCHEMA` varchar(64)
,`EVENT_OBJECT_TABLE` varchar(64)
,`ACTION_ORDER` int unsigned
,`ACTION_CONDITION` binary(0)
,`ACTION_STATEMENT` longtext
,`ACTION_ORIENTATION` varchar(3)
,`ACTION_TIMING` enum('BEFORE','AFTER')
,`ACTION_REFERENCE_OLD_TABLE` binary(0)
,`ACTION_REFERENCE_NEW_TABLE` binary(0)
,`ACTION_REFERENCE_OLD_ROW` varchar(3)
,`ACTION_REFERENCE_NEW_ROW` varchar(3)
,`CREATED` timestamp(2)
,`SQL_MODE` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','NOT_USED_9','NOT_USED_10','NOT_USED_11','NOT_USED_12','NOT_USED_13','NOT_USED_14','NOT_USED_15','NOT_USED_16','NOT_USED_17','NOT_USED_18','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','ALLOW_INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NOT_USED_29','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','TIME_TRUNCATE_FRACTIONAL')
,`DEFINER` varchar(288)
,`CHARACTER_SET_CLIENT` varchar(64)
,`COLLATION_CONNECTION` varchar(64)
,`DATABASE_COLLATION` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `USER_ATTRIBUTES`
-- (請參考以下實際畫面)
--
CREATE TABLE `USER_ATTRIBUTES` (
`USER` char(32)
,`HOST` char(255)
,`ATTRIBUTE` longtext
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `USER_PRIVILEGES`
-- (請參考以下實際畫面)
--
CREATE TABLE `USER_PRIVILEGES` (
`GRANTEE` varchar(292)
,`TABLE_CATALOG` varchar(512)
,`PRIVILEGE_TYPE` varchar(64)
,`IS_GRANTABLE` varchar(3)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `USER_STATISTICS`
-- (請參考以下實際畫面)
--
CREATE TABLE `USER_STATISTICS` (
`USER` varchar(96)
,`TOTAL_CONNECTIONS` bigint unsigned
,`CONCURRENT_CONNECTIONS` bigint unsigned
,`CONNECTED_TIME` double(21,0) unsigned
,`BUSY_TIME` double(21,0) unsigned
,`CPU_TIME` double(21,0) unsigned
,`BYTES_RECEIVED` bigint unsigned
,`BYTES_SENT` bigint unsigned
,`BINLOG_BYTES_WRITTEN` bigint unsigned
,`ROWS_FETCHED` bigint unsigned
,`ROWS_UPDATED` bigint unsigned
,`TABLE_ROWS_READ` bigint unsigned
,`SELECT_COMMANDS` bigint unsigned
,`UPDATE_COMMANDS` bigint unsigned
,`OTHER_COMMANDS` bigint unsigned
,`COMMIT_TRANSACTIONS` bigint unsigned
,`ROLLBACK_TRANSACTIONS` bigint unsigned
,`DENIED_CONNECTIONS` bigint unsigned
,`LOST_CONNECTIONS` bigint unsigned
,`ACCESS_DENIED` bigint unsigned
,`EMPTY_QUERIES` bigint unsigned
,`TOTAL_SSL_CONNECTIONS` bigint unsigned
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `VIEWS`
-- (請參考以下實際畫面)
--
CREATE TABLE `VIEWS` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`VIEW_DEFINITION` longtext
,`CHECK_OPTION` enum('NONE','LOCAL','CASCADED')
,`IS_UPDATABLE` enum('NO','YES')
,`DEFINER` varchar(288)
,`SECURITY_TYPE` varchar(7)
,`CHARACTER_SET_CLIENT` varchar(64)
,`COLLATION_CONNECTION` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `VIEW_ROUTINE_USAGE`
-- (請參考以下實際畫面)
--
CREATE TABLE `VIEW_ROUTINE_USAGE` (
`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
,`SPECIFIC_CATALOG` varchar(64)
,`SPECIFIC_SCHEMA` varchar(64)
,`SPECIFIC_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `VIEW_TABLE_USAGE`
-- (請參考以下實際畫面)
--
CREATE TABLE `VIEW_TABLE_USAGE` (
`VIEW_CATALOG` varchar(64)
,`VIEW_SCHEMA` varchar(64)
,`VIEW_NAME` varchar(64)
,`TABLE_CATALOG` varchar(64)
,`TABLE_SCHEMA` varchar(64)
,`TABLE_NAME` varchar(64)
);

-- --------------------------------------------------------

--
-- 檢視表結構 `ADMINISTRABLE_ROLE_AUTHORIZATIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ADMINISTRABLE_ROLE_AUTHORIZATIONS`  AS SELECT `APPLICABLE_ROLES`.`USER` AS `USER`, `APPLICABLE_ROLES`.`HOST` AS `HOST`, `APPLICABLE_ROLES`.`GRANTEE` AS `GRANTEE`, `APPLICABLE_ROLES`.`GRANTEE_HOST` AS `GRANTEE_HOST`, `APPLICABLE_ROLES`.`ROLE_NAME` AS `ROLE_NAME`, `APPLICABLE_ROLES`.`ROLE_HOST` AS `ROLE_HOST`, `APPLICABLE_ROLES`.`IS_GRANTABLE` AS `IS_GRANTABLE`, `APPLICABLE_ROLES`.`IS_DEFAULT` AS `IS_DEFAULT`, `APPLICABLE_ROLES`.`IS_MANDATORY` AS `IS_MANDATORY` FROM `APPLICABLE_ROLES` WHERE (`APPLICABLE_ROLES`.`IS_GRANTABLE` = 'YES')  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `APPLICABLE_ROLES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `APPLICABLE_ROLES`  AS   with recursive `role_graph` (`c_parent_user`,`c_parent_host`,`c_from_user`,`c_from_host`,`c_to_user`,`c_to_host`,`role_path`,`c_with_admin`,`c_enabled`) as (select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast('' as char(64) charset utf8mb4) AS `CAST('' as CHAR(64) CHARSET utf8mb4)`,cast('' as char(255) charset utf8mb4) AS `CAST('' as CHAR(255) CHARSET utf8mb4)`,cast(sha2(concat(quote(internal_get_username()),'@',quote(internal_get_hostname())),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(INTERNAL_GET_USERNAME()),'@',                        QUOTE(INTERNAL_GET_HOSTNAME())), 256)            AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` union select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,`mandatory_roles`.`ROLE_NAME` AS `ROLE_NAME`,`mandatory_roles`.`ROLE_HOST` AS `ROLE_HOST`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast(sha2(concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(ROLE_NAME),'@',                   CONVERT(QUOTE(ROLE_HOST) using utf8mb4)), 256)              AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` from json_table(internal_get_mandatory_roles_json(), '$[*]' columns (`ROLE_NAME` varchar(255) character set utf8mb4 path '$.ROLE_NAME', `ROLE_HOST` varchar(255) character set utf8mb4 path '$.ROLE_HOST')) `mandatory_roles` where concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)) in (select concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)) from `mysql`.`role_edges` where ((`mysql`.`role_edges`.`TO_USER` = internal_get_username()) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = convert(internal_get_hostname() using utf8mb4)))) is false union select `role_graph`.`c_parent_user` AS `c_parent_user`,`role_graph`.`c_parent_host` AS `c_parent_host`,`mysql`.`role_edges`.`FROM_USER` AS `FROM_USER`,`mysql`.`role_edges`.`FROM_HOST` AS `FROM_HOST`,`mysql`.`role_edges`.`TO_USER` AS `TO_USER`,`mysql`.`role_edges`.`TO_HOST` AS `TO_HOST`,if((locate(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256),`role_graph`.`role_path`) = 0),concat(`role_graph`.`role_path`,'->',convert(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256) using utf8mb4)),NULL) AS `IF(LOCATE(SHA2(CONCAT(QUOTE(FROM_USER),'@',                      CONVERT(QUOTE(FROM_HOST) using utf8mb4)), 256),                 role_path) = 0,          CONCAT(role_path,'->', SHA2(CONCAT(QUOTE(FROM_USER),'@',           CONVERT(QUOTE(FROM_HOST) using utf8`,`mysql`.`role_edges`.`WITH_ADMIN_OPTION` AS `WITH_ADMIN_OPTION`,if(((0 <> `role_graph`.`c_enabled`) or (0 <> internal_is_enabled_role(`mysql`.`role_edges`.`FROM_USER`,`mysql`.`role_edges`.`FROM_HOST`))),true,false) AS `IF(c_enabled OR        INTERNAL_IS_ENABLED_ROLE(FROM_USER, FROM_HOST), TRUE, FALSE)` from (`mysql`.`role_edges` join `role_graph`) where ((`mysql`.`role_edges`.`TO_USER` = `role_graph`.`c_from_user`) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = `role_graph`.`c_from_host`) and (`role_graph`.`role_path` is not null))) select distinct `role_graph`.`c_parent_user` AS `USER`,`role_graph`.`c_parent_host` AS `HOST`,`role_graph`.`c_to_user` AS `GRANTEE`,`role_graph`.`c_to_host` AS `GRANTEE_HOST`,`role_graph`.`c_from_user` AS `ROLE_NAME`,`role_graph`.`c_from_host` AS `ROLE_HOST`,if((`role_graph`.`c_with_admin` = 'N'),'NO','YES') AS `IS_GRANTABLE`,(select if(count(0),'YES','NO') from `mysql`.`default_roles` where ((`mysql`.`default_roles`.`DEFAULT_ROLE_USER` = `role_graph`.`c_from_user`) and (convert(`mysql`.`default_roles`.`DEFAULT_ROLE_HOST` using utf8mb4) = `role_graph`.`c_from_host`) and (`mysql`.`default_roles`.`USER` = `role_graph`.`c_parent_user`) and (convert(`mysql`.`default_roles`.`HOST` using utf8mb4) = `role_graph`.`c_parent_host`))) AS `IS_DEFAULT`,if(internal_is_mandatory_role(`role_graph`.`c_from_user`,`role_graph`.`c_from_host`),'YES','NO') AS `IS_MANDATORY` from `role_graph` where (`role_graph`.`c_to_user` <> '')  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `CHARACTER_SETS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `CHARACTER_SETS`  AS SELECT `cs`.`name` AS `CHARACTER_SET_NAME`, `col`.`name` AS `DEFAULT_COLLATE_NAME`, `cs`.`comment` AS `DESCRIPTION`, `cs`.`mb_max_length` AS `MAXLEN` FROM (`mysql`.`character_sets` `cs` join `mysql`.`collations` `col` on((`cs`.`default_collation_id` = `col`.`id`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `CHECK_CONSTRAINTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `CHECK_CONSTRAINTS`  AS SELECT `cat`.`name` AS `CONSTRAINT_CATALOG`, `sch`.`name` AS `CONSTRAINT_SCHEMA`, `cc`.`name` AS `CONSTRAINT_NAME`, `cc`.`check_clause_utf8` AS `CHECK_CLAUSE` FROM (((`mysql`.`check_constraints` `cc` join `mysql`.`tables` `tbl` on((`cc`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `CLIENT_STATISTICS`
--

CREATE TEMPORARY TABLE `CLIENT_STATISTICS` (
  `CLIENT` varchar(64) NOT NULL DEFAULT '',
  `TOTAL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CONCURRENT_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CONNECTED_TIME` double NOT NULL DEFAULT '0',
  `BUSY_TIME` double NOT NULL DEFAULT '0',
  `CPU_TIME` double NOT NULL DEFAULT '0',
  `BYTES_RECEIVED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BYTES_SENT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BINLOG_BYTES_WRITTEN` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_FETCHED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_UPDATED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TABLE_ROWS_READ` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SELECT_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `UPDATE_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OTHER_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMMIT_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROLLBACK_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DENIED_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LOST_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ACCESS_DENIED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `EMPTY_QUERIES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TOTAL_SSL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLLATIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLLATIONS`  AS SELECT `col`.`name` AS `COLLATION_NAME`, `cs`.`name` AS `CHARACTER_SET_NAME`, `col`.`id` AS `ID`, if(exists(select 1 from `mysql`.`character_sets` where (`mysql`.`character_sets`.`default_collation_id` = `col`.`id`)),'Yes','') AS `IS_DEFAULT`, if(`col`.`is_compiled`,'Yes','') AS `IS_COMPILED`, `col`.`sort_length` AS `SORTLEN`, `col`.`pad_attribute` AS `PAD_ATTRIBUTE` FROM (`mysql`.`collations` `col` join `mysql`.`character_sets` `cs` on((`col`.`character_set_id` = `cs`.`id`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLLATION_CHARACTER_SET_APPLICABILITY`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLLATION_CHARACTER_SET_APPLICABILITY`  AS SELECT `col`.`name` AS `COLLATION_NAME`, `cs`.`name` AS `CHARACTER_SET_NAME` FROM (`mysql`.`character_sets` `cs` join `mysql`.`collations` `col` on((`cs`.`id` = `col`.`character_set_id`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLUMNS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLUMNS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, (`col`.`name` collate utf8mb3_tolower_ci) AS `COLUMN_NAME`, `col`.`ordinal_position` AS `ORDINAL_POSITION`, `col`.`default_value_utf8` AS `COLUMN_DEFAULT`, if((`col`.`is_nullable` = 1),'YES','NO') AS `IS_NULLABLE`, substring_index(substring_index(`col`.`column_type_utf8`,'(',1),' ',1) AS `DATA_TYPE`, internal_dd_char_length(`col`.`type`,`col`.`char_length`,`coll`.`name`,0) AS `CHARACTER_MAXIMUM_LENGTH`, internal_dd_char_length(`col`.`type`,`col`.`char_length`,`coll`.`name`,1) AS `CHARACTER_OCTET_LENGTH`, if((`col`.`numeric_precision` = 0),NULL,`col`.`numeric_precision`) AS `NUMERIC_PRECISION`, if(((`col`.`numeric_scale` = 0) and (`col`.`numeric_precision` = 0)),NULL,`col`.`numeric_scale`) AS `NUMERIC_SCALE`, `col`.`datetime_precision` AS `DATETIME_PRECISION`, (case `col`.`type` when 'MYSQL_TYPE_STRING' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_SET' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) else NULL end) AS `CHARACTER_SET_NAME`, (case `col`.`type` when 'MYSQL_TYPE_STRING' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) when 'MYSQL_TYPE_SET' then if((`cs`.`name` = 'binary'),NULL,`coll`.`name`) else NULL end) AS `COLLATION_NAME`, `col`.`column_type_utf8` AS `COLUMN_TYPE`, `col`.`column_key` AS `COLUMN_KEY`, internal_get_dd_column_extra((`col`.`generation_expression_utf8` is null),`col`.`is_virtual`,`col`.`is_auto_increment`,`col`.`update_option`,if(length(`col`.`default_option`),true,false),`col`.`options`,`col`.`hidden`,`tbl`.`type`) AS `EXTRA`, get_dd_column_privileges(`sch`.`name`,`tbl`.`name`,`col`.`name`) AS `PRIVILEGES`, ifnull(`col`.`comment`,'') AS `COLUMN_COMMENT`, ifnull(`col`.`generation_expression_utf8`,'') AS `GENERATION_EXPRESSION`, `col`.`srs_id` AS `SRS_ID` FROM (((((`mysql`.`columns` `col` join `mysql`.`tables` `tbl` on((`col`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll` on((`col`.`collation_id` = `coll`.`id`))) join `mysql`.`character_sets` `cs` on((`coll`.`character_set_id` = `cs`.`id`))) WHERE ((0 <> internal_get_view_warning_or_error(`sch`.`name`,`tbl`.`name`,`tbl`.`type`,`tbl`.`options`)) AND (0 <> can_access_column(`sch`.`name`,`tbl`.`name`,`col`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`,(`col`.`hidden` not in ('Visible','User')),`col`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLUMNS_EXTENSIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLUMNS_EXTENSIONS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, (`col`.`name` collate utf8mb3_tolower_ci) AS `COLUMN_NAME`, `col`.`engine_attribute` AS `ENGINE_ATTRIBUTE`, `col`.`secondary_engine_attribute` AS `SECONDARY_ENGINE_ATTRIBUTE` FROM (((`mysql`.`columns` `col` join `mysql`.`tables` `tbl` on((`col`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE ((0 <> internal_get_view_warning_or_error(`sch`.`name`,`tbl`.`name`,`tbl`.`type`,`tbl`.`options`)) AND (0 <> can_access_column(`sch`.`name`,`tbl`.`name`,`col`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`,(`col`.`hidden` not in ('Visible','User')),`col`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLUMN_PRIVILEGES`
--

CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` (
  `GRANTEE` varchar(292) NOT NULL DEFAULT '',
  `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
  `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
  `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
  `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `COLUMN_STATISTICS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COLUMN_STATISTICS`  AS SELECT `mysql`.`column_statistics`.`schema_name` AS `SCHEMA_NAME`, `mysql`.`column_statistics`.`table_name` AS `TABLE_NAME`, `mysql`.`column_statistics`.`column_name` AS `COLUMN_NAME`, `mysql`.`column_statistics`.`histogram` AS `HISTOGRAM` FROM `mysql`.`column_statistics` WHERE (0 <> can_access_table(`mysql`.`column_statistics`.`schema_name`,`mysql`.`column_statistics`.`table_name`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COMPRESSION_DICTIONARY`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COMPRESSION_DICTIONARY`  AS SELECT `dict`.`version` AS `DICT_VERSION`, `dict`.`name` AS `DICT_NAME`, `dict`.`data` AS `DICT_DATA` FROM `mysql`.`compression_dictionary` AS `dict``dict`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `COMPRESSION_DICTIONARY_TABLES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `COMPRESSION_DICTIONARY_TABLES`  AS SELECT `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, `col`.`name` AS `COLUMN_NAME`, `dict`.`name` AS `DICT_NAME` FROM ((((`mysql`.`compression_dictionary_cols` `cdc` join `mysql`.`tables` `tbl` on((`cdc`.`table_id` = `tbl`.`id`))) join `mysql`.`columns` `col` on(((`col`.`table_id` = `cdc`.`table_id`) and (`col`.`id` = `cdc`.`column_id`)))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`compression_dictionary` `dict` on((`dict`.`id` = `cdc`.`dict_id`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ENABLED_ROLES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ENABLED_ROLES`  AS SELECT `current_user_enabled_roles`.`ROLE_NAME` AS `ROLE_NAME`, `current_user_enabled_roles`.`ROLE_HOST` AS `ROLE_HOST`, (select if(count(0),'YES','NO') from `mysql`.`default_roles` where ((`mysql`.`default_roles`.`DEFAULT_ROLE_USER` = `current_user_enabled_roles`.`ROLE_NAME`) and (convert(`mysql`.`default_roles`.`DEFAULT_ROLE_HOST` using utf8mb4) = `current_user_enabled_roles`.`ROLE_HOST`) and (`mysql`.`default_roles`.`USER` = internal_get_username()) and (convert(`mysql`.`default_roles`.`HOST` using utf8mb4) = convert(internal_get_hostname() using utf8mb4)))) AS `IS_DEFAULT`, if(internal_is_mandatory_role(`current_user_enabled_roles`.`ROLE_NAME`,`current_user_enabled_roles`.`ROLE_HOST`),'YES','NO') AS `IS_MANDATORY` FROM json_table(internal_get_enabled_role_json(), '$[*]' columns (`ROLE_NAME` varchar(255) character set utf8mb4 path '$.ROLE_NAME', `ROLE_HOST` varchar(255) character set utf8mb4 path '$.ROLE_HOST')) AS `current_user_enabled_roles``current_user_enabled_roles`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ENGINES`
--

CREATE TEMPORARY TABLE `ENGINES` (
  `ENGINE` varchar(64) NOT NULL DEFAULT '',
  `SUPPORT` varchar(8) NOT NULL DEFAULT '',
  `COMMENT` varchar(80) NOT NULL DEFAULT '',
  `TRANSACTIONS` varchar(3) DEFAULT NULL,
  `XA` varchar(3) DEFAULT NULL,
  `SAVEPOINTS` varchar(3) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `EVENTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `EVENTS`  AS SELECT `cat`.`name` AS `EVENT_CATALOG`, `sch`.`name` AS `EVENT_SCHEMA`, `evt`.`name` AS `EVENT_NAME`, `evt`.`definer` AS `DEFINER`, `evt`.`time_zone` AS `TIME_ZONE`, 'SQL' AS `EVENT_BODY`, `evt`.`definition_utf8` AS `EVENT_DEFINITION`, if((`evt`.`interval_value` is null),'ONE TIME','RECURRING') AS `EVENT_TYPE`, convert_tz(`evt`.`execute_at`,'+00:00',`evt`.`time_zone`) AS `EXECUTE_AT`, convert_interval_to_user_interval(`evt`.`interval_value`,`evt`.`interval_field`) AS `INTERVAL_VALUE`, `evt`.`interval_field` AS `INTERVAL_FIELD`, `evt`.`sql_mode` AS `SQL_MODE`, convert_tz(`evt`.`starts`,'+00:00',`evt`.`time_zone`) AS `STARTS`, convert_tz(`evt`.`ends`,'+00:00',`evt`.`time_zone`) AS `ENDS`, `evt`.`status` AS `STATUS`, if((`evt`.`on_completion` = 'DROP'),'NOT PRESERVE','PRESERVE') AS `ON_COMPLETION`, `evt`.`created` AS `CREATED`, `evt`.`last_altered` AS `LAST_ALTERED`, convert_tz(`evt`.`last_executed`,'+00:00',`evt`.`time_zone`) AS `LAST_EXECUTED`, `evt`.`comment` AS `EVENT_COMMENT`, `evt`.`originator` AS `ORIGINATOR`, `cs_client`.`name` AS `CHARACTER_SET_CLIENT`, `coll_conn`.`name` AS `COLLATION_CONNECTION`, `coll_db`.`name` AS `DATABASE_COLLATION` FROM ((((((`mysql`.`events` `evt` join `mysql`.`schemata` `sch` on((`evt`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll_client` on((`coll_client`.`id` = `evt`.`client_collation_id`))) join `mysql`.`character_sets` `cs_client` on((`cs_client`.`id` = `coll_client`.`character_set_id`))) join `mysql`.`collations` `coll_conn` on((`coll_conn`.`id` = `evt`.`connection_collation_id`))) join `mysql`.`collations` `coll_db` on((`coll_db`.`id` = `evt`.`schema_collation_id`))) WHERE (0 <> can_access_event(`sch`.`name`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `FILES`
--
-- 讀取資料表 information_schema.FILES 的結構時出現錯誤： #1227 - Access denied; you need (at least one of) the PROCESS privilege(s) for this operation

-- --------------------------------------------------------

--
-- 檢視表結構 `GLOBAL_TEMPORARY_TABLES`
--

CREATE TEMPORARY TABLE `GLOBAL_TEMPORARY_TABLES` (
  `SESSION_ID` bigint NOT NULL DEFAULT '0',
  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
  `ENGINE` varchar(64) NOT NULL DEFAULT '',
  `NAME` varchar(512) NOT NULL DEFAULT '',
  `TABLE_ROWS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `AVG_ROW_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DATA_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `INDEX_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CREATE_TIME` datetime DEFAULT NULL,
  `UPDATE_TIME` datetime DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INDEX_STATISTICS`
--

CREATE TEMPORARY TABLE `INDEX_STATISTICS` (
  `TABLE_SCHEMA` varchar(192) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(192) NOT NULL DEFAULT '',
  `INDEX_NAME` varchar(192) NOT NULL DEFAULT '',
  `ROWS_READ` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_BUFFER_PAGE`
--

CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
  `POOL_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BLOCK_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SPACE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGE_NUMBER` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGE_TYPE` varchar(64) DEFAULT NULL,
  `FLUSH_TYPE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `FIX_COUNT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `IS_HASHED` varchar(3) DEFAULT NULL,
  `NEWEST_MODIFICATION` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OLDEST_MODIFICATION` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ACCESS_TIME` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TABLE_NAME` varchar(1024) DEFAULT NULL,
  `INDEX_NAME` varchar(1024) DEFAULT NULL,
  `NUMBER_RECORDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DATA_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMPRESSED_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGE_STATE` varchar(64) DEFAULT NULL,
  `IO_FIX` varchar(64) DEFAULT NULL,
  `IS_OLD` varchar(3) DEFAULT NULL,
  `FREE_PAGE_CLOCK` bigint UNSIGNED NOT NULL DEFAULT '0',
  `IS_STALE` varchar(3) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_BUFFER_PAGE_LRU`
--

CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
  `POOL_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LRU_POSITION` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SPACE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGE_NUMBER` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGE_TYPE` varchar(64) DEFAULT NULL,
  `FLUSH_TYPE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `FIX_COUNT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `IS_HASHED` varchar(3) DEFAULT NULL,
  `NEWEST_MODIFICATION` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OLDEST_MODIFICATION` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ACCESS_TIME` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TABLE_NAME` varchar(1024) DEFAULT NULL,
  `INDEX_NAME` varchar(1024) DEFAULT NULL,
  `NUMBER_RECORDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DATA_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMPRESSED_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMPRESSED` varchar(3) DEFAULT NULL,
  `IO_FIX` varchar(64) DEFAULT NULL,
  `IS_OLD` varchar(3) DEFAULT NULL,
  `FREE_PAGE_CLOCK` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_BUFFER_POOL_STATS`
--

CREATE TEMPORARY TABLE `INNODB_BUFFER_POOL_STATS` (
  `POOL_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `POOL_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `FREE_BUFFERS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DATABASE_PAGES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OLD_DATABASE_PAGES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `MODIFIED_DATABASE_PAGES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PENDING_DECOMPRESS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PENDING_READS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PENDING_FLUSH_LRU` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PENDING_FLUSH_LIST` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGES_MADE_YOUNG` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGES_NOT_MADE_YOUNG` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGES_MADE_YOUNG_RATE` double NOT NULL DEFAULT '0',
  `PAGES_MADE_NOT_YOUNG_RATE` double NOT NULL DEFAULT '0',
  `NUMBER_PAGES_READ` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NUMBER_PAGES_CREATED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NUMBER_PAGES_WRITTEN` bigint UNSIGNED NOT NULL DEFAULT '0',
  `PAGES_READ_RATE` double NOT NULL DEFAULT '0',
  `PAGES_CREATE_RATE` double NOT NULL DEFAULT '0',
  `PAGES_WRITTEN_RATE` double NOT NULL DEFAULT '0',
  `NUMBER_PAGES_GET` bigint UNSIGNED NOT NULL DEFAULT '0',
  `HIT_RATE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `YOUNG_MAKE_PER_THOUSAND_GETS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NUMBER_PAGES_READ_AHEAD` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NUMBER_READ_AHEAD_EVICTED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `READ_AHEAD_RATE` double NOT NULL DEFAULT '0',
  `READ_AHEAD_EVICTED_RATE` double NOT NULL DEFAULT '0',
  `LRU_IO_TOTAL` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LRU_IO_CURRENT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `UNCOMPRESS_TOTAL` bigint UNSIGNED NOT NULL DEFAULT '0',
  `UNCOMPRESS_CURRENT` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CACHED_INDEXES`
--

CREATE TEMPORARY TABLE `INNODB_CACHED_INDEXES` (
  `SPACE_ID` int UNSIGNED NOT NULL DEFAULT '0',
  `INDEX_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `N_CACHED_PAGES` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMP`
--

CREATE TEMPORARY TABLE `INNODB_CMP` (
  `page_size` int NOT NULL DEFAULT '0',
  `compress_ops` int NOT NULL DEFAULT '0',
  `compress_ops_ok` int NOT NULL DEFAULT '0',
  `compress_time` int NOT NULL DEFAULT '0',
  `uncompress_ops` int NOT NULL DEFAULT '0',
  `uncompress_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMPMEM`
--

CREATE TEMPORARY TABLE `INNODB_CMPMEM` (
  `page_size` int NOT NULL DEFAULT '0',
  `buffer_pool_instance` int NOT NULL DEFAULT '0',
  `pages_used` int NOT NULL DEFAULT '0',
  `pages_free` int NOT NULL DEFAULT '0',
  `relocation_ops` bigint NOT NULL DEFAULT '0',
  `relocation_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMPMEM_RESET`
--

CREATE TEMPORARY TABLE `INNODB_CMPMEM_RESET` (
  `page_size` int NOT NULL DEFAULT '0',
  `buffer_pool_instance` int NOT NULL DEFAULT '0',
  `pages_used` int NOT NULL DEFAULT '0',
  `pages_free` int NOT NULL DEFAULT '0',
  `relocation_ops` bigint NOT NULL DEFAULT '0',
  `relocation_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMP_PER_INDEX`
--

CREATE TEMPORARY TABLE `INNODB_CMP_PER_INDEX` (
  `database_name` varchar(192) NOT NULL DEFAULT '',
  `table_name` varchar(192) NOT NULL DEFAULT '',
  `index_name` varchar(192) NOT NULL DEFAULT '',
  `compress_ops` int NOT NULL DEFAULT '0',
  `compress_ops_ok` int NOT NULL DEFAULT '0',
  `compress_time` int NOT NULL DEFAULT '0',
  `uncompress_ops` int NOT NULL DEFAULT '0',
  `uncompress_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMP_PER_INDEX_RESET`
--

CREATE TEMPORARY TABLE `INNODB_CMP_PER_INDEX_RESET` (
  `database_name` varchar(192) NOT NULL DEFAULT '',
  `table_name` varchar(192) NOT NULL DEFAULT '',
  `index_name` varchar(192) NOT NULL DEFAULT '',
  `compress_ops` int NOT NULL DEFAULT '0',
  `compress_ops_ok` int NOT NULL DEFAULT '0',
  `compress_time` int NOT NULL DEFAULT '0',
  `uncompress_ops` int NOT NULL DEFAULT '0',
  `uncompress_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_CMP_RESET`
--

CREATE TEMPORARY TABLE `INNODB_CMP_RESET` (
  `page_size` int NOT NULL DEFAULT '0',
  `compress_ops` int NOT NULL DEFAULT '0',
  `compress_ops_ok` int NOT NULL DEFAULT '0',
  `compress_time` int NOT NULL DEFAULT '0',
  `uncompress_ops` int NOT NULL DEFAULT '0',
  `uncompress_time` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_COLUMNS`
--

CREATE TEMPORARY TABLE `INNODB_COLUMNS` (
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(193) NOT NULL DEFAULT '',
  `POS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `MTYPE` int NOT NULL DEFAULT '0',
  `PRTYPE` int NOT NULL DEFAULT '0',
  `LEN` int NOT NULL DEFAULT '0',
  `HAS_DEFAULT` int NOT NULL DEFAULT '0',
  `DEFAULT_VALUE` mediumblob
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_DATAFILES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `INNODB_DATAFILES`  AS SELECT get_dd_tablespace_private_data(`ts`.`se_private_data`,'id') AS `SPACE`, `ts_files`.`file_name` AS `PATH` FROM (`mysql`.`tablespace_files` `ts_files` join `mysql`.`tablespaces` `ts` on((`ts`.`id` = `ts_files`.`tablespace_id`))) WHERE ((`ts`.`se_private_data` is not null) AND (`ts`.`engine` = 'InnoDB') AND (`ts`.`name` <> 'mysql') AND (`ts`.`name` <> 'innodb_temporary'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FIELDS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `INNODB_FIELDS`  AS SELECT get_dd_index_private_data(`idx`.`se_private_data`,'id') AS `INDEX_ID`, `col`.`name` AS `NAME`, (`fld`.`ordinal_position` - 1) AS `POS` FROM (((`mysql`.`index_column_usage` `fld` join `mysql`.`columns` `col` on((`fld`.`column_id` = `col`.`id`))) join `mysql`.`indexes` `idx` on((`fld`.`index_id` = `idx`.`id`))) join `mysql`.`tables` `tbl` on((`tbl`.`id` = `idx`.`table_id`))) WHERE ((`tbl`.`type` <> 'VIEW') AND (`tbl`.`hidden` = 'Visible') AND (0 = `fld`.`hidden`) AND (`tbl`.`se_private_id` is not null) AND (`tbl`.`engine` = 'INNODB'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FOREIGN`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `INNODB_FOREIGN`  AS SELECT concat(`sch`.`name`,'/',`fk`.`name`) AS `ID`, concat(`sch`.`name`,'/',`tbl`.`name`) AS `FOR_NAME`, concat(`fk`.`referenced_table_schema`,'/',`fk`.`referenced_table_name`) AS `REF_NAME`, count(0) AS `N_COLS`, (((((if((`fk`.`delete_rule` = 'CASCADE'),1,0) | if((`fk`.`delete_rule` = 'SET NULL'),2,0)) | if((`fk`.`update_rule` = 'CASCADE'),4,0)) | if((`fk`.`update_rule` = 'SET NULL'),8,0)) | if((`fk`.`delete_rule` = 'NO ACTION'),16,0)) | if((`fk`.`update_rule` = 'NO ACTION'),32,0)) AS `TYPE` FROM (((`mysql`.`foreign_keys` `fk` join `mysql`.`tables` `tbl` on((`fk`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`fk`.`schema_id` = `sch`.`id`))) join `mysql`.`foreign_key_column_usage` `col` on((`fk`.`id` = `col`.`foreign_key_id`))) WHERE ((`tbl`.`type` <> 'VIEW') AND (`tbl`.`hidden` = 'Visible') AND (`tbl`.`se_private_id` is not null) AND (`tbl`.`engine` = 'INNODB')) GROUP BY `fk`.`id``id`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FOREIGN_COLS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `INNODB_FOREIGN_COLS`  AS SELECT concat(`sch`.`name`,'/',`fk`.`name`) AS `ID`, `col`.`name` AS `FOR_COL_NAME`, `fk_col`.`referenced_column_name` AS `REF_COL_NAME`, `fk_col`.`ordinal_position` AS `POS` FROM ((((`mysql`.`foreign_key_column_usage` `fk_col` join `mysql`.`foreign_keys` `fk` on((`fk`.`id` = `fk_col`.`foreign_key_id`))) join `mysql`.`tables` `tbl` on((`fk`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`fk`.`schema_id` = `sch`.`id`))) join `mysql`.`columns` `col` on(((`tbl`.`id` = `col`.`table_id`) and (`fk_col`.`column_id` = `col`.`id`)))) WHERE ((`tbl`.`type` <> 'VIEW') AND (`tbl`.`hidden` = 'Visible') AND (`tbl`.`se_private_id` is not null) AND (`tbl`.`engine` = 'INNODB'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_BEING_DELETED`
--

CREATE TEMPORARY TABLE `INNODB_FT_BEING_DELETED` (
  `DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_CONFIG`
--

CREATE TEMPORARY TABLE `INNODB_FT_CONFIG` (
  `KEY` varchar(193) NOT NULL DEFAULT '',
  `VALUE` varchar(193) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_DEFAULT_STOPWORD`
--

CREATE TEMPORARY TABLE `INNODB_FT_DEFAULT_STOPWORD` (
  `value` varchar(18) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_DELETED`
--

CREATE TEMPORARY TABLE `INNODB_FT_DELETED` (
  `DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_INDEX_CACHE`
--

CREATE TEMPORARY TABLE `INNODB_FT_INDEX_CACHE` (
  `WORD` varchar(337) NOT NULL DEFAULT '',
  `FIRST_DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LAST_DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DOC_COUNT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `POSITION` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_FT_INDEX_TABLE`
--

CREATE TEMPORARY TABLE `INNODB_FT_INDEX_TABLE` (
  `WORD` varchar(337) NOT NULL DEFAULT '',
  `FIRST_DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LAST_DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DOC_COUNT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DOC_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `POSITION` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_INDEXES`
--

CREATE TEMPORARY TABLE `INNODB_INDEXES` (
  `INDEX_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(193) NOT NULL DEFAULT '',
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TYPE` int NOT NULL DEFAULT '0',
  `N_FIELDS` int NOT NULL DEFAULT '0',
  `PAGE_NO` int NOT NULL DEFAULT '0',
  `SPACE` int NOT NULL DEFAULT '0',
  `MERGE_THRESHOLD` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_METRICS`
--

CREATE TEMPORARY TABLE `INNODB_METRICS` (
  `NAME` varchar(193) NOT NULL DEFAULT '',
  `SUBSYSTEM` varchar(193) NOT NULL DEFAULT '',
  `COUNT` bigint NOT NULL DEFAULT '0',
  `MAX_COUNT` bigint DEFAULT NULL,
  `MIN_COUNT` bigint DEFAULT NULL,
  `AVG_COUNT` double DEFAULT NULL,
  `COUNT_RESET` bigint NOT NULL DEFAULT '0',
  `MAX_COUNT_RESET` bigint DEFAULT NULL,
  `MIN_COUNT_RESET` bigint DEFAULT NULL,
  `AVG_COUNT_RESET` double DEFAULT NULL,
  `TIME_ENABLED` datetime DEFAULT NULL,
  `TIME_DISABLED` datetime DEFAULT NULL,
  `TIME_ELAPSED` bigint DEFAULT NULL,
  `TIME_RESET` datetime DEFAULT NULL,
  `STATUS` varchar(193) NOT NULL DEFAULT '',
  `TYPE` varchar(193) NOT NULL DEFAULT '',
  `COMMENT` varchar(193) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_SESSION_TEMP_TABLESPACES`
--

CREATE TEMPORARY TABLE `INNODB_SESSION_TEMP_TABLESPACES` (
  `ID` int UNSIGNED NOT NULL DEFAULT '0',
  `SPACE` int UNSIGNED NOT NULL DEFAULT '0',
  `PATH` varchar(4001) NOT NULL DEFAULT '',
  `SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `STATE` varchar(192) NOT NULL DEFAULT '',
  `PURPOSE` varchar(192) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TABLES`
--

CREATE TEMPORARY TABLE `INNODB_TABLES` (
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(655) NOT NULL DEFAULT '',
  `FLAG` int NOT NULL DEFAULT '0',
  `N_COLS` int NOT NULL DEFAULT '0',
  `SPACE` bigint NOT NULL DEFAULT '0',
  `ROW_FORMAT` varchar(12) DEFAULT NULL,
  `ZIP_PAGE_SIZE` int UNSIGNED NOT NULL DEFAULT '0',
  `SPACE_TYPE` varchar(10) DEFAULT NULL,
  `INSTANT_COLS` int NOT NULL DEFAULT '0',
  `TOTAL_ROW_VERSIONS` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TABLESPACES`
--

CREATE TEMPORARY TABLE `INNODB_TABLESPACES` (
  `SPACE` int UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(655) NOT NULL DEFAULT '',
  `FLAG` int UNSIGNED NOT NULL DEFAULT '0',
  `ROW_FORMAT` varchar(22) DEFAULT NULL,
  `PAGE_SIZE` int UNSIGNED NOT NULL DEFAULT '0',
  `ZIP_PAGE_SIZE` int UNSIGNED NOT NULL DEFAULT '0',
  `SPACE_TYPE` varchar(10) DEFAULT NULL,
  `FS_BLOCK_SIZE` int UNSIGNED NOT NULL DEFAULT '0',
  `FILE_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ALLOCATED_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `AUTOEXTEND_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SERVER_VERSION` varchar(10) DEFAULT NULL,
  `SPACE_VERSION` int UNSIGNED NOT NULL DEFAULT '0',
  `ENCRYPTION` varchar(1) DEFAULT NULL,
  `STATE` varchar(10) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TABLESPACES_BRIEF`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `INNODB_TABLESPACES_BRIEF`  AS SELECT get_dd_tablespace_private_data(`ts`.`se_private_data`,'id') AS `SPACE`, `ts`.`name` AS `NAME`, `ts_files`.`file_name` AS `PATH`, get_dd_tablespace_private_data(`ts`.`se_private_data`,'flags') AS `FLAG`, if((get_dd_tablespace_private_data(`ts`.`se_private_data`,'id') = 0),'System',if((((get_dd_tablespace_private_data(`ts`.`se_private_data`,'flags') & 2048) >> 11) <> 0),'General','Single')) AS `SPACE_TYPE` FROM (`mysql`.`tablespace_files` `ts_files` join `mysql`.`tablespaces` `ts` on((`ts`.`id` = `ts_files`.`tablespace_id`))) WHERE ((`ts`.`se_private_data` is not null) AND (`ts`.`engine` = 'InnoDB') AND (`ts`.`name` <> 'mysql') AND (`ts`.`name` <> 'innodb_temporary'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TABLESTATS`
--

CREATE TEMPORARY TABLE `INNODB_TABLESTATS` (
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(193) NOT NULL DEFAULT '',
  `STATS_INITIALIZED` varchar(193) NOT NULL DEFAULT '',
  `NUM_ROWS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CLUST_INDEX_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OTHER_INDEX_SIZE` bigint UNSIGNED NOT NULL DEFAULT '0',
  `MODIFIED_COUNTER` bigint UNSIGNED NOT NULL DEFAULT '0',
  `AUTOINC` bigint UNSIGNED NOT NULL DEFAULT '0',
  `REF_COUNT` int NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TEMP_TABLE_INFO`
--

CREATE TEMPORARY TABLE `INNODB_TEMP_TABLE_INFO` (
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `NAME` varchar(64) DEFAULT NULL,
  `N_COLS` int UNSIGNED NOT NULL DEFAULT '0',
  `SPACE` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_TRX`
--

CREATE TEMPORARY TABLE `INNODB_TRX` (
  `trx_id` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_state` varchar(13) NOT NULL DEFAULT '',
  `trx_started` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `trx_requested_lock_id` varchar(105) DEFAULT NULL,
  `trx_wait_started` datetime DEFAULT NULL,
  `trx_weight` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_mysql_thread_id` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_query` varchar(1024) DEFAULT NULL,
  `trx_operation_state` varchar(64) DEFAULT NULL,
  `trx_tables_in_use` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_tables_locked` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_lock_structs` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_lock_memory_bytes` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_rows_locked` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_rows_modified` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_concurrency_tickets` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_isolation_level` varchar(16) NOT NULL DEFAULT '',
  `trx_unique_checks` int NOT NULL DEFAULT '0',
  `trx_foreign_key_checks` int NOT NULL DEFAULT '0',
  `trx_last_foreign_key_error` varchar(256) DEFAULT NULL,
  `trx_adaptive_hash_latched` int NOT NULL DEFAULT '0',
  `trx_adaptive_hash_timeout` bigint UNSIGNED NOT NULL DEFAULT '0',
  `trx_is_read_only` int NOT NULL DEFAULT '0',
  `trx_autocommit_non_locking` int NOT NULL DEFAULT '0',
  `trx_schedule_weight` bigint UNSIGNED DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `INNODB_VIRTUAL`
--

CREATE TEMPORARY TABLE `INNODB_VIRTUAL` (
  `TABLE_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `POS` int UNSIGNED NOT NULL DEFAULT '0',
  `BASE_POS` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `KEYWORDS`
--



-- --------------------------------------------------------

--
-- 檢視表結構 `KEY_COLUMN_USAGE`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `KEY_COLUMN_USAGE`  AS SELECT `cat`.`name` AS `CONSTRAINT_CATALOG`, `sch`.`name` AS `CONSTRAINT_SCHEMA`, `constraints`.`CONSTRAINT_NAME` AS `CONSTRAINT_NAME`, `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, (`col`.`name` collate utf8mb3_tolower_ci) AS `COLUMN_NAME`, `constraints`.`ORDINAL_POSITION` AS `ORDINAL_POSITION`, `constraints`.`POSITION_IN_UNIQUE_CONSTRAINT` AS `POSITION_IN_UNIQUE_CONSTRAINT`, `constraints`.`REFERENCED_TABLE_SCHEMA` AS `REFERENCED_TABLE_SCHEMA`, `constraints`.`REFERENCED_TABLE_NAME` AS `REFERENCED_TABLE_NAME`, `constraints`.`REFERENCED_COLUMN_NAME` AS `REFERENCED_COLUMN_NAME` FROM (((`mysql`.`tables` `tbl` join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join (lateral (select `idx`.`name` AS `CONSTRAINT_NAME`,`icu`.`ordinal_position` AS `ORDINAL_POSITION`,NULL AS `POSITION_IN_UNIQUE_CONSTRAINT`,NULL AS `REFERENCED_TABLE_SCHEMA`,NULL AS `REFERENCED_TABLE_NAME`,NULL AS `REFERENCED_COLUMN_NAME`,`icu`.`column_id` AS `column_id`,((0 <> `idx`.`hidden`) or (0 <> `icu`.`hidden`)) AS `HIDDEN` from (`mysql`.`indexes` `idx` join `mysql`.`index_column_usage` `icu` on((`icu`.`index_id` = `idx`.`id`))) where ((`idx`.`table_id` = `tbl`.`id`) and (`idx`.`type` in ('PRIMARY','UNIQUE'))) union all select (`fk`.`name` collate utf8mb3_tolower_ci) AS `CONSTRAINT_NAME`,`fkcu`.`ordinal_position` AS `ORDINAL_POSITION`,`fkcu`.`ordinal_position` AS `POSITION_IN_UNIQUE_CONSTRAINT`,`fk`.`referenced_table_schema` AS `REFERENCED_TABLE_SCHEMA`,`fk`.`referenced_table_name` AS `REFERENCED_TABLE_NAME`,`fkcu`.`referenced_column_name` AS `REFERENCED_COLUMN_NAME`,`fkcu`.`column_id` AS `column_id`,false AS `HIDDEN` from (`mysql`.`foreign_keys` `fk` join `mysql`.`foreign_key_column_usage` `fkcu` on((`fkcu`.`foreign_key_id` = `fk`.`id`))) where (`fk`.`table_id` = `tbl`.`id`)) `constraints` join `mysql`.`columns` `col` on((`constraints`.`column_id` = `col`.`id`)))) WHERE ((0 <> can_access_column(`sch`.`name`,`tbl`.`name`,`col`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`,((`col`.`hidden` not in ('Visible','User')) OR (0 <> `constraints`.`HIDDEN`)),`col`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `OPTIMIZER_TRACE`
--

CREATE TEMPORARY TABLE `OPTIMIZER_TRACE` (
  `QUERY` longtext NOT NULL,
  `TRACE` longtext NOT NULL,
  `MISSING_BYTES_BEYOND_MAX_MEM_SIZE` int NOT NULL DEFAULT '0',
  `INSUFFICIENT_PRIVILEGES` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `PARAMETERS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `PARAMETERS`  AS SELECT `cat`.`name` AS `SPECIFIC_CATALOG`, `sch`.`name` AS `SPECIFIC_SCHEMA`, `rtn`.`name` AS `SPECIFIC_NAME`, if((`rtn`.`type` = 'FUNCTION'),(`prm`.`ordinal_position` - 1),`prm`.`ordinal_position`) AS `ORDINAL_POSITION`, if(((`rtn`.`type` = 'FUNCTION') and (`prm`.`ordinal_position` = 1)),NULL,`prm`.`mode`) AS `PARAMETER_MODE`, if(((`rtn`.`type` = 'FUNCTION') and (`prm`.`ordinal_position` = 1)),NULL,`prm`.`name`) AS `PARAMETER_NAME`, substring_index(substring_index(`prm`.`data_type_utf8`,'(',1),' ',1) AS `DATA_TYPE`, internal_dd_char_length(`prm`.`data_type`,`prm`.`char_length`,`col`.`name`,0) AS `CHARACTER_MAXIMUM_LENGTH`, internal_dd_char_length(`prm`.`data_type`,`prm`.`char_length`,`col`.`name`,1) AS `CHARACTER_OCTET_LENGTH`, `prm`.`numeric_precision` AS `NUMERIC_PRECISION`, if((`prm`.`numeric_precision` is null),NULL,ifnull(`prm`.`numeric_scale`,0)) AS `NUMERIC_SCALE`, `prm`.`datetime_precision` AS `DATETIME_PRECISION`, (case `prm`.`data_type` when 'MYSQL_TYPE_STRING' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) when 'MYSQL_TYPE_SET' then if((`cs`.`name` = 'binary'),NULL,`cs`.`name`) else NULL end) AS `CHARACTER_SET_NAME`, (case `prm`.`data_type` when 'MYSQL_TYPE_STRING' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) when 'MYSQL_TYPE_SET' then if((`cs`.`name` = 'binary'),NULL,`col`.`name`) else NULL end) AS `COLLATION_NAME`, `prm`.`data_type_utf8` AS `DTD_IDENTIFIER`, `rtn`.`type` AS `ROUTINE_TYPE` FROM (((((`mysql`.`parameters` `prm` join `mysql`.`routines` `rtn` on((`prm`.`routine_id` = `rtn`.`id`))) join `mysql`.`schemata` `sch` on((`rtn`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `col` on((`prm`.`collation_id` = `col`.`id`))) join `mysql`.`character_sets` `cs` on((`col`.`character_set_id` = `cs`.`id`))) WHERE (0 <> can_access_routine(`sch`.`name`,`rtn`.`name`,`rtn`.`type`,`rtn`.`definer`,false))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `PARTITIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `PARTITIONS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, `part`.`name` AS `PARTITION_NAME`, `sub_part`.`name` AS `SUBPARTITION_NAME`, (`part`.`number` + 1) AS `PARTITION_ORDINAL_POSITION`, (`sub_part`.`number` + 1) AS `SUBPARTITION_ORDINAL_POSITION`, (case `tbl`.`partition_type` when 'HASH' then 'HASH' when 'RANGE' then 'RANGE' when 'LIST' then 'LIST' when 'AUTO' then 'AUTO' when 'KEY_51' then 'KEY' when 'KEY_55' then 'KEY' when 'LINEAR_KEY_51' then 'LINEAR KEY' when 'LINEAR_KEY_55' then 'LINEAR KEY' when 'LINEAR_HASH' then 'LINEAR HASH' when 'RANGE_COLUMNS' then 'RANGE COLUMNS' when 'LIST_COLUMNS' then 'LIST COLUMNS' else NULL end) AS `PARTITION_METHOD`, (case `tbl`.`subpartition_type` when 'HASH' then 'HASH' when 'RANGE' then 'RANGE' when 'LIST' then 'LIST' when 'AUTO' then 'AUTO' when 'KEY_51' then 'KEY' when 'KEY_55' then 'KEY' when 'LINEAR_KEY_51' then 'LINEAR KEY' when 'LINEAR_KEY_55' then 'LINEAR KEY' when 'LINEAR_HASH' then 'LINEAR HASH' when 'RANGE_COLUMNS' then 'RANGE COLUMNS' when 'LIST_COLUMNS' then 'LIST COLUMNS' else NULL end) AS `SUBPARTITION_METHOD`, `tbl`.`partition_expression_utf8` AS `PARTITION_EXPRESSION`, `tbl`.`subpartition_expression_utf8` AS `SUBPARTITION_EXPRESSION`, `part`.`description_utf8` AS `PARTITION_DESCRIPTION`, internal_table_rows(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `TABLE_ROWS`, internal_avg_row_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `AVG_ROW_LENGTH`, internal_data_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `DATA_LENGTH`, internal_max_data_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `MAX_DATA_LENGTH`, internal_index_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `INDEX_LENGTH`, internal_data_free(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `DATA_FREE`, `tbl`.`created` AS `CREATE_TIME`, internal_update_time(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `UPDATE_TIME`, internal_check_time(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `CHECK_TIME`, internal_checksum(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),if((`sub_part`.`name` is null),if((`part`.`name` is null),`tbl`.`se_private_data`,`part_ts`.`se_private_data`),`sub_part_ts`.`se_private_data`),0,0,ifnull(`sub_part`.`name`,`part`.`name`)) AS `CHECKSUM`, if((`sub_part`.`name` is null),ifnull(`part`.`comment`,''),ifnull(`sub_part`.`comment`,'')) AS `PARTITION_COMMENT`, if((`part`.`name` is null),'',internal_get_partition_nodegroup(if((`sub_part`.`name` is null),`part`.`options`,`sub_part`.`options`))) AS `NODEGROUP`, ifnull(`sub_part_ts`.`name`,`part_ts`.`name`) AS `TABLESPACE_NAME` FROM ((((((`mysql`.`tables` `tbl` join `mysql`.`schemata` `sch` on((`sch`.`id` = `tbl`.`schema_id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) left join `mysql`.`table_partitions` `part` on((`part`.`table_id` = `tbl`.`id`))) left join `mysql`.`table_partitions` `sub_part` on((`sub_part`.`parent_partition_id` = `part`.`id`))) left join `mysql`.`tablespaces` `part_ts` on((`part_ts`.`id` = `part`.`tablespace_id`))) left join `mysql`.`tablespaces` `sub_part_ts` on(((`sub_part`.`tablespace_id` is not null) and (`sub_part_ts`.`id` = `sub_part`.`tablespace_id`)))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)) AND (`part`.`parent_partition_id` is null))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `PLUGINS`
--

CREATE TEMPORARY TABLE `PLUGINS` (
  `PLUGIN_NAME` varchar(64) NOT NULL DEFAULT '',
  `PLUGIN_VERSION` varchar(20) NOT NULL DEFAULT '',
  `PLUGIN_STATUS` varchar(10) NOT NULL DEFAULT '',
  `PLUGIN_TYPE` varchar(80) NOT NULL DEFAULT '',
  `PLUGIN_TYPE_VERSION` varchar(20) NOT NULL DEFAULT '',
  `PLUGIN_LIBRARY` varchar(64) DEFAULT NULL,
  `PLUGIN_LIBRARY_VERSION` varchar(20) DEFAULT NULL,
  `PLUGIN_AUTHOR` varchar(64) DEFAULT NULL,
  `PLUGIN_DESCRIPTION` longtext,
  `PLUGIN_LICENSE` varchar(80) DEFAULT NULL,
  `LOAD_OPTION` varchar(64) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `PROCESSLIST`
--

CREATE TEMPORARY TABLE `PROCESSLIST` (
  `ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `USER` varchar(32) NOT NULL DEFAULT '',
  `HOST` varchar(261) NOT NULL DEFAULT '',
  `DB` varchar(64) DEFAULT NULL,
  `COMMAND` varchar(16) NOT NULL DEFAULT '',
  `TIME` int NOT NULL DEFAULT '0',
  `STATE` varchar(64) DEFAULT NULL,
  `INFO` longtext,
  `TIME_MS` bigint NOT NULL DEFAULT '0',
  `ROWS_SENT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_EXAMINED` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `PROFILING`
--

CREATE TEMPORARY TABLE `PROFILING` (
  `QUERY_ID` int NOT NULL DEFAULT '0',
  `SEQ` int NOT NULL DEFAULT '0',
  `STATE` varchar(30) NOT NULL DEFAULT '',
  `DURATION` decimal(9,6) NOT NULL DEFAULT '0.000000',
  `CPU_USER` decimal(9,6) DEFAULT NULL,
  `CPU_SYSTEM` decimal(9,6) DEFAULT NULL,
  `CONTEXT_VOLUNTARY` int DEFAULT NULL,
  `CONTEXT_INVOLUNTARY` int DEFAULT NULL,
  `BLOCK_OPS_IN` int DEFAULT NULL,
  `BLOCK_OPS_OUT` int DEFAULT NULL,
  `MESSAGES_SENT` int DEFAULT NULL,
  `MESSAGES_RECEIVED` int DEFAULT NULL,
  `PAGE_FAULTS_MAJOR` int DEFAULT NULL,
  `PAGE_FAULTS_MINOR` int DEFAULT NULL,
  `SWAPS` int DEFAULT NULL,
  `SOURCE_FUNCTION` varchar(30) DEFAULT NULL,
  `SOURCE_FILE` varchar(20) DEFAULT NULL,
  `SOURCE_LINE` int DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `REFERENTIAL_CONSTRAINTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `REFERENTIAL_CONSTRAINTS`  AS SELECT `cat`.`name` AS `CONSTRAINT_CATALOG`, `sch`.`name` AS `CONSTRAINT_SCHEMA`, (`fk`.`name` collate utf8mb3_tolower_ci) AS `CONSTRAINT_NAME`, `fk`.`referenced_table_catalog` AS `UNIQUE_CONSTRAINT_CATALOG`, `fk`.`referenced_table_schema` AS `UNIQUE_CONSTRAINT_SCHEMA`, `fk`.`unique_constraint_name` AS `UNIQUE_CONSTRAINT_NAME`, `fk`.`match_option` AS `MATCH_OPTION`, `fk`.`update_rule` AS `UPDATE_RULE`, `fk`.`delete_rule` AS `DELETE_RULE`, `tbl`.`name` AS `TABLE_NAME`, `fk`.`referenced_table_name` AS `REFERENCED_TABLE_NAME` FROM (((`mysql`.`foreign_keys` `fk` join `mysql`.`tables` `tbl` on((`fk`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`fk`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `RESOURCE_GROUPS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `RESOURCE_GROUPS`  AS SELECT `res`.`resource_group_name` AS `RESOURCE_GROUP_NAME`, `res`.`resource_group_type` AS `RESOURCE_GROUP_TYPE`, `res`.`resource_group_enabled` AS `RESOURCE_GROUP_ENABLED`, convert_cpu_id_mask(`res`.`cpu_id_mask`) AS `VCPU_IDS`, `res`.`thread_priority` AS `THREAD_PRIORITY` FROM `mysql`.`resource_groups` AS `res` WHERE (0 <> can_access_resource_group(`res`.`resource_group_name`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ROLE_COLUMN_GRANTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ROLE_COLUMN_GRANTS`  AS   with recursive `role_graph` (`c_parent_user`,`c_parent_host`,`c_from_user`,`c_from_host`,`c_to_user`,`c_to_host`,`role_path`,`c_with_admin`,`c_enabled`) as (select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast('' as char(64) charset utf8mb4) AS `CAST('' as CHAR(64) CHARSET utf8mb4)`,cast('' as char(255) charset utf8mb4) AS `CAST('' as CHAR(255) CHARSET utf8mb4)`,cast(sha2(concat(quote(internal_get_username()),'@',quote(internal_get_hostname())),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(INTERNAL_GET_USERNAME()),'@',                        QUOTE(INTERNAL_GET_HOSTNAME())), 256)            AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` union select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,`mandatory_roles`.`ROLE_NAME` AS `ROLE_NAME`,`mandatory_roles`.`ROLE_HOST` AS `ROLE_HOST`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast(sha2(concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(ROLE_NAME),'@',                   CONVERT(QUOTE(ROLE_HOST) using utf8mb4)), 256)              AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` from json_table(internal_get_mandatory_roles_json(), '$[*]' columns (`ROLE_NAME` varchar(255) character set utf8mb4 path '$.ROLE_NAME', `ROLE_HOST` varchar(255) character set utf8mb4 path '$.ROLE_HOST')) `mandatory_roles` where concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)) in (select concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)) from `mysql`.`role_edges` where ((`mysql`.`role_edges`.`TO_USER` = internal_get_username()) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = convert(internal_get_hostname() using utf8mb4)))) is false union select `role_graph`.`c_parent_user` AS `c_parent_user`,`role_graph`.`c_parent_host` AS `c_parent_host`,`mysql`.`role_edges`.`FROM_USER` AS `FROM_USER`,`mysql`.`role_edges`.`FROM_HOST` AS `FROM_HOST`,`mysql`.`role_edges`.`TO_USER` AS `TO_USER`,`mysql`.`role_edges`.`TO_HOST` AS `TO_HOST`,if((locate(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256),`role_graph`.`role_path`) = 0),concat(`role_graph`.`role_path`,'->',convert(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256) using utf8mb4)),NULL) AS `IF(LOCATE(SHA2(CONCAT(QUOTE(FROM_USER),'@',                      CONVERT(QUOTE(FROM_HOST) using utf8mb4)), 256),                 role_path) = 0,          CONCAT(role_path,'->', SHA2(CONCAT(QUOTE(FROM_USER),'@',           CONVERT(QUOTE(FROM_HOST) using utf8`,`mysql`.`role_edges`.`WITH_ADMIN_OPTION` AS `WITH_ADMIN_OPTION`,if(((0 <> `role_graph`.`c_enabled`) or (0 <> internal_is_enabled_role(`mysql`.`role_edges`.`FROM_USER`,`mysql`.`role_edges`.`FROM_HOST`))),true,false) AS `IF(c_enabled OR        INTERNAL_IS_ENABLED_ROLE(FROM_USER, FROM_HOST), TRUE, FALSE)` from (`mysql`.`role_edges` join `role_graph`) where ((`mysql`.`role_edges`.`TO_USER` = `role_graph`.`c_from_user`) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = `role_graph`.`c_from_host`) and (`role_graph`.`role_path` is not null))) select distinct internal_get_username(`tp`.`Grantor`) AS `GRANTOR`,internal_get_hostname(`tp`.`Grantor`) AS `GRANTOR_HOST`,`cp`.`User` AS `GRANTEE`,`cp`.`Host` AS `GRANTEE_HOST`,'def' AS `TABLE_CATALOG`,`cp`.`Db` AS `TABLE_SCHEMA`,`cp`.`Table_name` AS `TABLE_NAME`,`cp`.`Column_name` AS `COLUMN_NAME`,`cp`.`Column_priv` AS `PRIVILEGE_TYPE`,if((find_in_set('Grant',`tp`.`Table_priv`) > 0),'YES','NO') AS `IS_GRANTABLE` from ((`mysql`.`tables_priv` `tp` join `role_graph` `rg` on(((`tp`.`User` = `rg`.`c_from_user`) and (convert(`tp`.`Host` using utf8mb4) = `rg`.`c_from_host`)))) join `mysql`.`columns_priv` `cp` on(((convert(`tp`.`Host` using utf8mb4) = `cp`.`Host`) and (`cp`.`Db` = `tp`.`Db`) and (`cp`.`User` = `tp`.`User`) and (`cp`.`Table_name` = `tp`.`Table_name`)))) where ((`cp`.`Column_priv` > 0) and (`rg`.`c_to_user` <> '') and (`rg`.`c_enabled` = true))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ROLE_ROUTINE_GRANTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ROLE_ROUTINE_GRANTS`  AS   with recursive `role_graph` (`c_parent_user`,`c_parent_host`,`c_from_user`,`c_from_host`,`c_to_user`,`c_to_host`,`role_path`,`c_with_admin`,`c_enabled`) as (select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast('' as char(64) charset utf8mb4) AS `CAST('' as CHAR(64) CHARSET utf8mb4)`,cast('' as char(255) charset utf8mb4) AS `CAST('' as CHAR(255) CHARSET utf8mb4)`,cast(sha2(concat(quote(internal_get_username()),'@',quote(internal_get_hostname())),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(INTERNAL_GET_USERNAME()),'@',                        QUOTE(INTERNAL_GET_HOSTNAME())), 256)            AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` union select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,`mandatory_roles`.`ROLE_NAME` AS `ROLE_NAME`,`mandatory_roles`.`ROLE_HOST` AS `ROLE_HOST`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast(sha2(concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(ROLE_NAME),'@',                   CONVERT(QUOTE(ROLE_HOST) using utf8mb4)), 256)              AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` from json_table(internal_get_mandatory_roles_json(), '$[*]' columns (`ROLE_NAME` varchar(255) character set utf8mb4 path '$.ROLE_NAME', `ROLE_HOST` varchar(255) character set utf8mb4 path '$.ROLE_HOST')) `mandatory_roles` where concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)) in (select concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)) from `mysql`.`role_edges` where ((`mysql`.`role_edges`.`TO_USER` = internal_get_username()) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = convert(internal_get_hostname() using utf8mb4)))) is false union select `role_graph`.`c_parent_user` AS `c_parent_user`,`role_graph`.`c_parent_host` AS `c_parent_host`,`mysql`.`role_edges`.`FROM_USER` AS `FROM_USER`,`mysql`.`role_edges`.`FROM_HOST` AS `FROM_HOST`,`mysql`.`role_edges`.`TO_USER` AS `TO_USER`,`mysql`.`role_edges`.`TO_HOST` AS `TO_HOST`,if((locate(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256),`role_graph`.`role_path`) = 0),concat(`role_graph`.`role_path`,'->',convert(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256) using utf8mb4)),NULL) AS `IF(LOCATE(SHA2(CONCAT(QUOTE(FROM_USER),'@',                      CONVERT(QUOTE(FROM_HOST) using utf8mb4)), 256),                 role_path) = 0,          CONCAT(role_path,'->', SHA2(CONCAT(QUOTE(FROM_USER),'@',           CONVERT(QUOTE(FROM_HOST) using utf8`,`mysql`.`role_edges`.`WITH_ADMIN_OPTION` AS `WITH_ADMIN_OPTION`,if(((0 <> `role_graph`.`c_enabled`) or (0 <> internal_is_enabled_role(`mysql`.`role_edges`.`FROM_USER`,`mysql`.`role_edges`.`FROM_HOST`))),true,false) AS `IF(c_enabled OR        INTERNAL_IS_ENABLED_ROLE(FROM_USER, FROM_HOST), TRUE, FALSE)` from (`mysql`.`role_edges` join `role_graph`) where ((`mysql`.`role_edges`.`TO_USER` = `role_graph`.`c_from_user`) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = `role_graph`.`c_from_host`) and (`role_graph`.`role_path` is not null))) select distinct internal_get_username(`pp`.`Grantor`) AS `GRANTOR`,internal_get_hostname(`pp`.`Grantor`) AS `GRANTOR_HOST`,`pp`.`User` AS `GRANTEE`,`pp`.`Host` AS `GRANTEE_HOST`,'def' AS `SPECIFIC_CATALOG`,`pp`.`Db` AS `SPECIFIC_SCHEMA`,`pp`.`Routine_name` AS `SPECIFIC_NAME`,'def' AS `ROUTINE_CATALOG`,`pp`.`Db` AS `ROUTINE_SCHEMA`,`pp`.`Routine_name` AS `ROUTINE_NAME`,`pp`.`Proc_priv` AS `PRIVILEGE_TYPE`,if((find_in_set('Grant',`pp`.`Proc_priv`) > 0),'YES','NO') AS `IS_GRANTABLE` from (`mysql`.`procs_priv` `pp` join `role_graph` `rg` on(((`pp`.`User` = `rg`.`c_from_user`) and (convert(`pp`.`Host` using utf8mb4) = `rg`.`c_from_host`)))) where ((`pp`.`Proc_priv` > 0) and (`rg`.`c_to_user` <> '') and (`rg`.`c_enabled` = true))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ROLE_TABLE_GRANTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ROLE_TABLE_GRANTS`  AS   with recursive `role_graph` (`c_parent_user`,`c_parent_host`,`c_from_user`,`c_from_host`,`c_to_user`,`c_to_host`,`role_path`,`c_with_admin`,`c_enabled`) as (select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast('' as char(64) charset utf8mb4) AS `CAST('' as CHAR(64) CHARSET utf8mb4)`,cast('' as char(255) charset utf8mb4) AS `CAST('' as CHAR(255) CHARSET utf8mb4)`,cast(sha2(concat(quote(internal_get_username()),'@',quote(internal_get_hostname())),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(INTERNAL_GET_USERNAME()),'@',                        QUOTE(INTERNAL_GET_HOSTNAME())), 256)            AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` union select internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,`mandatory_roles`.`ROLE_NAME` AS `ROLE_NAME`,`mandatory_roles`.`ROLE_HOST` AS `ROLE_HOST`,internal_get_username() AS `INTERNAL_GET_USERNAME()`,internal_get_hostname() AS `INTERNAL_GET_HOSTNAME()`,cast(sha2(concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)),256) as char(17000) charset utf8mb4) AS `CAST(SHA2(CONCAT(QUOTE(ROLE_NAME),'@',                   CONVERT(QUOTE(ROLE_HOST) using utf8mb4)), 256)              AS CHAR(17000) CHARSET utf8mb4)`,cast('N' as char(1) charset utf8mb4) AS `CAST('N' as CHAR(1) CHARSET utf8mb4)`,false AS `FALSE` from json_table(internal_get_mandatory_roles_json(), '$[*]' columns (`ROLE_NAME` varchar(255) character set utf8mb4 path '$.ROLE_NAME', `ROLE_HOST` varchar(255) character set utf8mb4 path '$.ROLE_HOST')) `mandatory_roles` where concat(quote(`mandatory_roles`.`ROLE_NAME`),'@',convert(quote(`mandatory_roles`.`ROLE_HOST`) using utf8mb4)) in (select concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)) from `mysql`.`role_edges` where ((`mysql`.`role_edges`.`TO_USER` = internal_get_username()) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = convert(internal_get_hostname() using utf8mb4)))) is false union select `role_graph`.`c_parent_user` AS `c_parent_user`,`role_graph`.`c_parent_host` AS `c_parent_host`,`mysql`.`role_edges`.`FROM_USER` AS `FROM_USER`,`mysql`.`role_edges`.`FROM_HOST` AS `FROM_HOST`,`mysql`.`role_edges`.`TO_USER` AS `TO_USER`,`mysql`.`role_edges`.`TO_HOST` AS `TO_HOST`,if((locate(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256),`role_graph`.`role_path`) = 0),concat(`role_graph`.`role_path`,'->',convert(sha2(concat(convert(quote(`mysql`.`role_edges`.`FROM_USER`) using utf8mb4),'@',convert(quote(`mysql`.`role_edges`.`FROM_HOST`) using utf8mb4)),256) using utf8mb4)),NULL) AS `IF(LOCATE(SHA2(CONCAT(QUOTE(FROM_USER),'@',                      CONVERT(QUOTE(FROM_HOST) using utf8mb4)), 256),                 role_path) = 0,          CONCAT(role_path,'->', SHA2(CONCAT(QUOTE(FROM_USER),'@',           CONVERT(QUOTE(FROM_HOST) using utf8`,`mysql`.`role_edges`.`WITH_ADMIN_OPTION` AS `WITH_ADMIN_OPTION`,if(((0 <> `role_graph`.`c_enabled`) or (0 <> internal_is_enabled_role(`mysql`.`role_edges`.`FROM_USER`,`mysql`.`role_edges`.`FROM_HOST`))),true,false) AS `IF(c_enabled OR        INTERNAL_IS_ENABLED_ROLE(FROM_USER, FROM_HOST), TRUE, FALSE)` from (`mysql`.`role_edges` join `role_graph`) where ((`mysql`.`role_edges`.`TO_USER` = `role_graph`.`c_from_user`) and (convert(`mysql`.`role_edges`.`TO_HOST` using utf8mb4) = `role_graph`.`c_from_host`) and (`role_graph`.`role_path` is not null))) select distinct internal_get_username(`tp`.`Grantor`) AS `GRANTOR`,internal_get_hostname(`tp`.`Grantor`) AS `GRANTOR_HOST`,`tp`.`User` AS `GRANTEE`,`tp`.`Host` AS `GRANTEE_HOST`,'def' AS `TABLE_CATALOG`,`tp`.`Db` AS `TABLE_SCHEMA`,`tp`.`Table_name` AS `TABLE_NAME`,`tp`.`Table_priv` AS `PRIVILEGE_TYPE`,if((find_in_set('Grant',`tp`.`Table_priv`) > 0),'YES','NO') AS `IS_GRANTABLE` from (`mysql`.`tables_priv` `tp` join `role_graph` `rg` on(((`tp`.`User` = `rg`.`c_from_user`) and (convert(`tp`.`Host` using utf8mb4) = `rg`.`c_from_host`)))) where ((`tp`.`Table_priv` > 0) and (`rg`.`c_to_user` <> '') and (`rg`.`c_enabled` = true))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ROUTINES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ROUTINES`  AS SELECT `rtn`.`name` AS `SPECIFIC_NAME`, `cat`.`name` AS `ROUTINE_CATALOG`, `sch`.`name` AS `ROUTINE_SCHEMA`, `rtn`.`name` AS `ROUTINE_NAME`, `rtn`.`type` AS `ROUTINE_TYPE`, if((`rtn`.`type` = 'PROCEDURE'),'',substring_index(substring_index(`rtn`.`result_data_type_utf8`,'(',1),' ',1)) AS `DATA_TYPE`, internal_dd_char_length(`rtn`.`result_data_type`,`rtn`.`result_char_length`,`coll_result`.`name`,0) AS `CHARACTER_MAXIMUM_LENGTH`, internal_dd_char_length(`rtn`.`result_data_type`,`rtn`.`result_char_length`,`coll_result`.`name`,1) AS `CHARACTER_OCTET_LENGTH`, `rtn`.`result_numeric_precision` AS `NUMERIC_PRECISION`, `rtn`.`result_numeric_scale` AS `NUMERIC_SCALE`, `rtn`.`result_datetime_precision` AS `DATETIME_PRECISION`, (case `rtn`.`result_data_type` when 'MYSQL_TYPE_STRING' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) when 'MYSQL_TYPE_SET' then if((`cs_result`.`name` = 'binary'),NULL,`cs_result`.`name`) else NULL end) AS `CHARACTER_SET_NAME`, (case `rtn`.`result_data_type` when 'MYSQL_TYPE_STRING' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_VAR_STRING' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_VARCHAR' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_TINY_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_MEDIUM_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_LONG_BLOB' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_ENUM' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) when 'MYSQL_TYPE_SET' then if((`cs_result`.`name` = 'binary'),NULL,`coll_result`.`name`) else NULL end) AS `COLLATION_NAME`, if((`rtn`.`type` = 'PROCEDURE'),NULL,`rtn`.`result_data_type_utf8`) AS `DTD_IDENTIFIER`, 'SQL' AS `ROUTINE_BODY`, if(can_access_routine(`sch`.`name`,`rtn`.`name`,`rtn`.`type`,`rtn`.`definer`,true),`rtn`.`definition_utf8`,NULL) AS `ROUTINE_DEFINITION`, NULL AS `EXTERNAL_NAME`, `rtn`.`external_language` AS `EXTERNAL_LANGUAGE`, 'SQL' AS `PARAMETER_STYLE`, if((`rtn`.`is_deterministic` = 0),'NO','YES') AS `IS_DETERMINISTIC`, `rtn`.`sql_data_access` AS `SQL_DATA_ACCESS`, NULL AS `SQL_PATH`, `rtn`.`security_type` AS `SECURITY_TYPE`, `rtn`.`created` AS `CREATED`, `rtn`.`last_altered` AS `LAST_ALTERED`, `rtn`.`sql_mode` AS `SQL_MODE`, `rtn`.`comment` AS `ROUTINE_COMMENT`, `rtn`.`definer` AS `DEFINER`, `cs_client`.`name` AS `CHARACTER_SET_CLIENT`, `coll_conn`.`name` AS `COLLATION_CONNECTION`, `coll_db`.`name` AS `DATABASE_COLLATION` FROM ((((((((`mysql`.`routines` `rtn` join `mysql`.`schemata` `sch` on((`rtn`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll_client` on((`coll_client`.`id` = `rtn`.`client_collation_id`))) join `mysql`.`character_sets` `cs_client` on((`cs_client`.`id` = `coll_client`.`character_set_id`))) join `mysql`.`collations` `coll_conn` on((`coll_conn`.`id` = `rtn`.`connection_collation_id`))) join `mysql`.`collations` `coll_db` on((`coll_db`.`id` = `rtn`.`schema_collation_id`))) left join `mysql`.`collations` `coll_result` on((`coll_result`.`id` = `rtn`.`result_collation_id`))) left join `mysql`.`character_sets` `cs_result` on((`cs_result`.`id` = `coll_result`.`character_set_id`))) WHERE (0 <> can_access_routine(`sch`.`name`,`rtn`.`name`,`rtn`.`type`,`rtn`.`definer`,false))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `SCHEMATA`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `SCHEMATA`  AS SELECT `cat`.`name` AS `CATALOG_NAME`, `sch`.`name` AS `SCHEMA_NAME`, `cs`.`name` AS `DEFAULT_CHARACTER_SET_NAME`, `col`.`name` AS `DEFAULT_COLLATION_NAME`, NULL AS `SQL_PATH`, `sch`.`default_encryption` AS `DEFAULT_ENCRYPTION` FROM (((`mysql`.`schemata` `sch` join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `col` on((`sch`.`default_collation_id` = `col`.`id`))) join `mysql`.`character_sets` `cs` on((`col`.`character_set_id` = `cs`.`id`))) WHERE (0 <> can_access_database(`sch`.`name`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `SCHEMATA_EXTENSIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `SCHEMATA_EXTENSIONS`  AS SELECT `cat`.`name` AS `CATALOG_NAME`, `sch`.`name` AS `SCHEMA_NAME`, get_dd_schema_options(`sch`.`options`) AS `OPTIONS` FROM (`mysql`.`schemata` `sch` join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE (0 <> can_access_database(`sch`.`name`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `SCHEMA_PRIVILEGES`
--

CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` (
  `GRANTEE` varchar(292) NOT NULL DEFAULT '',
  `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
  `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
  `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `STATISTICS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `STATISTICS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),0,1) AS `NON_UNIQUE`, `sch`.`name` AS `INDEX_SCHEMA`, (`idx`.`name` collate utf8mb3_tolower_ci) AS `INDEX_NAME`, `icu`.`ordinal_position` AS `SEQ_IN_INDEX`, if((`col`.`hidden` = 'SQL'),NULL,(`col`.`name` collate utf8mb3_tolower_ci)) AS `COLUMN_NAME`, (case when (`icu`.`order` = 'DESC') then 'D' when (`icu`.`order` = 'ASC') then 'A' else NULL end) AS `COLLATION`, internal_index_column_cardinality(`sch`.`name`,`tbl`.`name`,`idx`.`name`,`col`.`name`,`idx`.`ordinal_position`,`icu`.`ordinal_position`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,((`tbl`.`hidden` <> 'Visible') or (0 <> `idx`.`hidden`) or (0 <> `icu`.`hidden`)),coalesce(`stat`.`cardinality`,cast(-(1) as unsigned)),coalesce(cast(`stat`.`cached_time` as unsigned),0)) AS `CARDINALITY`, get_dd_index_sub_part_length(`icu`.`length`,`col`.`type`,`col`.`char_length`,`col`.`collation_id`,`idx`.`type`) AS `SUB_PART`, NULL AS `PACKED`, if((`col`.`is_nullable` = 1),'YES','') AS `NULLABLE`, (case when (`idx`.`type` = 'SPATIAL') then 'SPATIAL' when (`idx`.`algorithm` = 'SE_PRIVATE') then '' else `idx`.`algorithm` end) AS `INDEX_TYPE`, if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),'',if(internal_keys_disabled(`tbl`.`options`),'disabled','')) AS `COMMENT`, `idx`.`comment` AS `INDEX_COMMENT`, if(`idx`.`is_visible`,'YES','NO') AS `IS_VISIBLE`, if((`col`.`hidden` = 'SQL'),`col`.`generation_expression_utf8`,NULL) AS `EXPRESSION` FROM (((((((`mysql`.`index_column_usage` `icu` join `mysql`.`indexes` `idx` on((`idx`.`id` = `icu`.`index_id`))) join `mysql`.`tables` `tbl` on((`idx`.`table_id` = `tbl`.`id`))) join `mysql`.`columns` `col` on((`icu`.`column_id` = `col`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll` on((`tbl`.`collation_id` = `coll`.`id`))) left join `mysql`.`index_stats` `stat` on(((`tbl`.`name` = `stat`.`table_name`) and (`sch`.`name` = `stat`.`schema_name`) and (`idx`.`name` = `stat`.`index_name`) and (`col`.`name` = `stat`.`column_name`)))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`,((0 <> `idx`.`hidden`) OR (0 <> `icu`.`hidden`)),`idx`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ST_GEOMETRY_COLUMNS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ST_GEOMETRY_COLUMNS`  AS SELECT `cols`.`TABLE_CATALOG` AS `TABLE_CATALOG`, `cols`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`, `cols`.`TABLE_NAME` AS `TABLE_NAME`, `cols`.`COLUMN_NAME` AS `COLUMN_NAME`, `srs`.`SRS_NAME` AS `SRS_NAME`, `cols`.`SRS_ID` AS `SRS_ID`, `cols`.`DATA_TYPE` AS `GEOMETRY_TYPE_NAME` FROM (`COLUMNS` `cols` left join `ST_SPATIAL_REFERENCE_SYSTEMS` `srs` on((`cols`.`SRS_ID` = `srs`.`SRS_ID`))) WHERE (`cols`.`DATA_TYPE` in ('geometry','point','linestring','polygon','multipoint','multilinestring','multipolygon','geomcollection'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ST_SPATIAL_REFERENCE_SYSTEMS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ST_SPATIAL_REFERENCE_SYSTEMS`  AS SELECT `mysql`.`st_spatial_reference_systems`.`name` AS `SRS_NAME`, `mysql`.`st_spatial_reference_systems`.`id` AS `SRS_ID`, `mysql`.`st_spatial_reference_systems`.`organization` AS `ORGANIZATION`, `mysql`.`st_spatial_reference_systems`.`organization_coordsys_id` AS `ORGANIZATION_COORDSYS_ID`, `mysql`.`st_spatial_reference_systems`.`definition` AS `DEFINITION`, `mysql`.`st_spatial_reference_systems`.`description` AS `DESCRIPTION` FROM `mysql`.`st_spatial_reference_systems``st_spatial_reference_systems`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `ST_UNITS_OF_MEASURE`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `ST_UNITS_OF_MEASURE`  AS SELECT `ST_UNITS_OF_MEASURE`.`UNIT_NAME` AS `UNIT_NAME`, `ST_UNITS_OF_MEASURE`.`UNIT_TYPE` AS `UNIT_TYPE`, `ST_UNITS_OF_MEASURE`.`CONVERSION_FACTOR` AS `CONVERSION_FACTOR`, `ST_UNITS_OF_MEASURE`.`DESCRIPTION` AS `DESCRIPTION` FROM json_table('[["British link (Sears 1922 truncated)","LINEAR","",0.20116756],["foot","LINEAR","",0.3048],["British yard (Benoit 1895 B)","LINEAR","",0.9143992042898124],["British yard (Sears 1922 truncated)","LINEAR","",0.914398],["British yard (Benoit 1895 A)","LINEAR","",0.9143992],["British chain (Sears 1922)","LINEAR","",20.116765121552632],["Clarke\'s link","LINEAR","",0.201166195164],["Clarke\'s yard","LINEAR","",0.9143917962],["British chain (Benoit 1895 A)","LINEAR","",20.1167824],["kilometre","LINEAR","",1000],["US survey foot","LINEAR","",0.30480060960121924],["British yard (Sears 1922)","LINEAR","",0.9143984146160287],["centimetre","LINEAR","",0.01],["millimetre","LINEAR","",0.001],["British foot (Sears 1922)","LINEAR","",0.3047994715386762],["British link (Sears 1922)","LINEAR","",0.2011676512155263],["fathom","LINEAR","",1.8288],["US survey chain","LINEAR","",20.11684023368047],["US survey link","LINEAR","",0.2011684023368047],["metre","LINEAR","",1],["German legal metre","LINEAR","",1.0000135965],["nautical mile","LINEAR","",1852],["British link (Benoit 1895 A)","LINEAR","",0.201167824],["British foot (Benoit 1895 B)","LINEAR","",0.30479973476327077],["British chain (Benoit 1895 B)","LINEAR","",20.116782494375872],["Statute mile","LINEAR","",1609.344],["British link (Benoit 1895 B)","LINEAR","",0.2011678249437587],["British foot (1865)","LINEAR","",0.30480083333333335],["Indian foot (1962)","LINEAR","",0.3047996],["Indian foot","LINEAR","",0.30479951024814694],["Indian foot (1937)","LINEAR","",0.30479841],["British foot (Benoit 1895 A)","LINEAR","",0.3047997333333333],["Indian foot (1975)","LINEAR","",0.3047995],["Indian yard (1962)","LINEAR","",0.9143988],["Indian yard (1975)","LINEAR","",0.9143985],["Indian yard","LINEAR","",0.9143985307444408],["link","LINEAR","",0.201168],["British foot (1936)","LINEAR","",0.3048007491],["Clarke\'s chain","LINEAR","",20.1166195164],["yard","LINEAR","",0.9144],["US survey mile","LINEAR","",1609.3472186944375],["Gold Coast foot","LINEAR","",0.3047997101815088],["chain","LINEAR","",20.1168],["Indian yard (1937)","LINEAR","",0.91439523],["British foot (Sears 1922 truncated)","LINEAR","",0.30479933333333337],["Clarke\'s foot","LINEAR","",0.3047972654],["British chain (Sears 1922 truncated)","LINEAR","",20.116756]]', '$[*]' columns (`UNIT_NAME` varchar(255) character set utf8mb4 path '$[0]', `UNIT_TYPE` varchar(7) character set utf8mb4 path '$[1]', `DESCRIPTION` varchar(255) character set utf8mb4 path '$[2]', `CONVERSION_FACTOR` double path '$[3]')) AS `ST_UNITS_OF_MEASURE``ST_UNITS_OF_MEASURE`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TABLES`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, `tbl`.`type` AS `TABLE_TYPE`, if((`tbl`.`type` = 'BASE TABLE'),`tbl`.`engine`,NULL) AS `ENGINE`, if((`tbl`.`type` = 'VIEW'),NULL,10) AS `VERSION`, `tbl`.`row_format` AS `ROW_FORMAT`, if((`tbl`.`type` = 'VIEW'),NULL,internal_table_rows(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`table_rows`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `TABLE_ROWS`, if((`tbl`.`type` = 'VIEW'),NULL,internal_avg_row_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`avg_row_length`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `AVG_ROW_LENGTH`, if((`tbl`.`type` = 'VIEW'),NULL,internal_data_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`data_length`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `DATA_LENGTH`, if((`tbl`.`type` = 'VIEW'),NULL,internal_max_data_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`max_data_length`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `MAX_DATA_LENGTH`, if((`tbl`.`type` = 'VIEW'),NULL,internal_index_length(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`index_length`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `INDEX_LENGTH`, if((`tbl`.`type` = 'VIEW'),NULL,internal_data_free(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`data_free`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `DATA_FREE`, if((`tbl`.`type` = 'VIEW'),NULL,internal_auto_increment(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,((0 <> is_visible_dd_object(`tbl`.`hidden`,false,`tbl`.`options`)) is false),`ts`.`se_private_data`,coalesce(`stat`.`auto_increment`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0),`tbl`.`se_private_data`)) AS `AUTO_INCREMENT`, `tbl`.`created` AS `CREATE_TIME`, if((`tbl`.`type` = 'VIEW'),NULL,internal_update_time(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(cast(`stat`.`update_time` as unsigned),0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `UPDATE_TIME`, if((`tbl`.`type` = 'VIEW'),NULL,internal_check_time(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(cast(`stat`.`check_time` as unsigned),0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `CHECK_TIME`, `col`.`name` AS `TABLE_COLLATION`, if((`tbl`.`type` = 'VIEW'),NULL,internal_checksum(`sch`.`name`,`tbl`.`name`,if((`tbl`.`partition_type` is null),`tbl`.`engine`,''),`tbl`.`se_private_id`,(`tbl`.`hidden` <> 'Visible'),`ts`.`se_private_data`,coalesce(`stat`.`checksum`,0),coalesce(cast(`stat`.`cached_time` as unsigned),0))) AS `CHECKSUM`, if((`tbl`.`type` = 'VIEW'),NULL,get_dd_create_options(`tbl`.`options`,if((ifnull(`tbl`.`partition_expression`,'NOT_PART_TBL') = 'NOT_PART_TBL'),0,1),if((`sch`.`default_encryption` = 'YES'),1,0))) AS `CREATE_OPTIONS`, internal_get_comment_or_error(`sch`.`name`,`tbl`.`name`,`tbl`.`type`,`tbl`.`options`,`tbl`.`comment`) AS `TABLE_COMMENT` FROM (((((`mysql`.`tables` `tbl` join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) left join `mysql`.`collations` `col` on((`tbl`.`collation_id` = `col`.`id`))) left join `mysql`.`tablespaces` `ts` on((`tbl`.`tablespace_id` = `ts`.`id`))) left join `mysql`.`table_stats` `stat` on(((`tbl`.`name` = `stat`.`table_name`) and (`sch`.`name` = `stat`.`schema_name`)))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLESPACES`
--

CREATE TEMPORARY TABLE `TABLESPACES` (
  `TABLESPACE_NAME` varchar(64) NOT NULL DEFAULT '',
  `ENGINE` varchar(64) NOT NULL DEFAULT '',
  `TABLESPACE_TYPE` varchar(64) DEFAULT NULL,
  `LOGFILE_GROUP_NAME` varchar(64) DEFAULT NULL,
  `EXTENT_SIZE` bigint UNSIGNED DEFAULT NULL,
  `AUTOEXTEND_SIZE` bigint UNSIGNED DEFAULT NULL,
  `MAXIMUM_SIZE` bigint UNSIGNED DEFAULT NULL,
  `NODEGROUP_ID` bigint UNSIGNED DEFAULT NULL,
  `TABLESPACE_COMMENT` varchar(2048) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLESPACES_EXTENSIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TABLESPACES_EXTENSIONS`  AS SELECT `tsps`.`name` AS `TABLESPACE_NAME`, `tsps`.`engine_attribute` AS `ENGINE_ATTRIBUTE` FROM `mysql`.`tablespaces` AS `tsps``tsps`  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLES_EXTENSIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TABLES_EXTENSIONS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, `tbl`.`engine_attribute` AS `ENGINE_ATTRIBUTE`, `tbl`.`secondary_engine_attribute` AS `SECONDARY_ENGINE_ATTRIBUTE` FROM ((`mysql`.`tables` `tbl` join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLE_CONSTRAINTS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TABLE_CONSTRAINTS`  AS SELECT `cat`.`name` AS `CONSTRAINT_CATALOG`, `sch`.`name` AS `CONSTRAINT_SCHEMA`, `constraints`.`CONSTRAINT_NAME` AS `CONSTRAINT_NAME`, `sch`.`name` AS `TABLE_SCHEMA`, `tbl`.`name` AS `TABLE_NAME`, `constraints`.`CONSTRAINT_TYPE` AS `CONSTRAINT_TYPE`, `constraints`.`ENFORCED` AS `ENFORCED` FROM (((`mysql`.`tables` `tbl` join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join lateral (select `idx`.`name` AS `CONSTRAINT_NAME`,if((`idx`.`type` = 'PRIMARY'),'PRIMARY KEY',`idx`.`type`) AS `CONSTRAINT_TYPE`,'YES' AS `ENFORCED` from `mysql`.`indexes` `idx` where ((`idx`.`table_id` = `tbl`.`id`) and (`idx`.`type` in ('PRIMARY','UNIQUE')) and (0 <> is_visible_dd_object(`tbl`.`hidden`,`idx`.`hidden`,`idx`.`options`))) union all select (`fk`.`name` collate utf8mb3_tolower_ci) AS `CONSTRAINT_NAME`,'FOREIGN KEY' AS `CONSTRAINT_TYPE`,'YES' AS `ENFORCED` from `mysql`.`foreign_keys` `fk` where (`fk`.`table_id` = `tbl`.`id`) union all select `cc`.`name` AS `CONSTRAINT_NAME`,'CHECK' AS `CONSTRAINT_TYPE`,`cc`.`enforced` AS `ENFORCED` from `mysql`.`check_constraints` `cc` where (`cc`.`table_id` = `tbl`.`id`)) `constraints`) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLE_CONSTRAINTS_EXTENSIONS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TABLE_CONSTRAINTS_EXTENSIONS`  AS SELECT `cat`.`name` AS `CONSTRAINT_CATALOG`, `sch`.`name` AS `CONSTRAINT_SCHEMA`, `idx`.`name` AS `CONSTRAINT_NAME`, `tbl`.`name` AS `TABLE_NAME`, `idx`.`engine_attribute` AS `ENGINE_ATTRIBUTE`, `idx`.`secondary_engine_attribute` AS `SECONDARY_ENGINE_ATTRIBUTE` FROM (((`mysql`.`indexes` `idx` join `mysql`.`tables` `tbl` on((`idx`.`table_id` = `tbl`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) WHERE ((0 <> can_access_table(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`,false,`idx`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLE_PRIVILEGES`
--

CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` (
  `GRANTEE` varchar(292) NOT NULL DEFAULT '',
  `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
  `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
  `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `TABLE_STATISTICS`
--

CREATE TEMPORARY TABLE `TABLE_STATISTICS` (
  `TABLE_SCHEMA` varchar(192) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(192) NOT NULL DEFAULT '',
  `ROWS_READ` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_CHANGED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_CHANGED_X_INDEXES` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `TEMPORARY_TABLES`
--

CREATE TEMPORARY TABLE `TEMPORARY_TABLES` (
  `SESSION_ID` bigint NOT NULL DEFAULT '0',
  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
  `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
  `ENGINE` varchar(64) NOT NULL DEFAULT '',
  `NAME` varchar(512) NOT NULL DEFAULT '',
  `TABLE_ROWS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `AVG_ROW_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DATA_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `INDEX_LENGTH` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CREATE_TIME` datetime DEFAULT NULL,
  `UPDATE_TIME` datetime DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `THREAD_STATISTICS`
--

CREATE TEMPORARY TABLE `THREAD_STATISTICS` (
  `THREAD_ID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TOTAL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CONNECTED_TIME` double NOT NULL DEFAULT '0',
  `BUSY_TIME` double NOT NULL DEFAULT '0',
  `CPU_TIME` double NOT NULL DEFAULT '0',
  `BYTES_RECEIVED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BYTES_SENT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BINLOG_BYTES_WRITTEN` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_FETCHED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_UPDATED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TABLE_ROWS_READ` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SELECT_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `UPDATE_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OTHER_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMMIT_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROLLBACK_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DENIED_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LOST_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ACCESS_DENIED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `EMPTY_QUERIES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TOTAL_SSL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `TRIGGERS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `TRIGGERS`  AS SELECT `cat`.`name` AS `TRIGGER_CATALOG`, `sch`.`name` AS `TRIGGER_SCHEMA`, `trg`.`name` AS `TRIGGER_NAME`, `trg`.`event_type` AS `EVENT_MANIPULATION`, `cat`.`name` AS `EVENT_OBJECT_CATALOG`, `sch`.`name` AS `EVENT_OBJECT_SCHEMA`, `tbl`.`name` AS `EVENT_OBJECT_TABLE`, `trg`.`action_order` AS `ACTION_ORDER`, NULL AS `ACTION_CONDITION`, `trg`.`action_statement_utf8` AS `ACTION_STATEMENT`, 'ROW' AS `ACTION_ORIENTATION`, `trg`.`action_timing` AS `ACTION_TIMING`, NULL AS `ACTION_REFERENCE_OLD_TABLE`, NULL AS `ACTION_REFERENCE_NEW_TABLE`, 'OLD' AS `ACTION_REFERENCE_OLD_ROW`, 'NEW' AS `ACTION_REFERENCE_NEW_ROW`, `trg`.`created` AS `CREATED`, `trg`.`sql_mode` AS `SQL_MODE`, `trg`.`definer` AS `DEFINER`, `cs_client`.`name` AS `CHARACTER_SET_CLIENT`, `coll_conn`.`name` AS `COLLATION_CONNECTION`, `coll_db`.`name` AS `DATABASE_COLLATION` FROM (((((((`mysql`.`triggers` `trg` join `mysql`.`tables` `tbl` on((`tbl`.`id` = `trg`.`table_id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll_client` on((`coll_client`.`id` = `trg`.`client_collation_id`))) join `mysql`.`character_sets` `cs_client` on((`cs_client`.`id` = `coll_client`.`character_set_id`))) join `mysql`.`collations` `coll_conn` on((`coll_conn`.`id` = `trg`.`connection_collation_id`))) join `mysql`.`collations` `coll_db` on((`coll_db`.`id` = `trg`.`schema_collation_id`))) WHERE ((`tbl`.`type` <> 'VIEW') AND (0 <> can_access_trigger(`sch`.`name`,`tbl`.`name`)) AND (0 <> is_visible_dd_object(`tbl`.`hidden`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `USER_ATTRIBUTES`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `USER_ATTRIBUTES`  AS SELECT `mysql`.`user`.`User` AS `USER`, `mysql`.`user`.`Host` AS `HOST`, json_unquote(json_extract(`mysql`.`user`.`User_attributes`,'$.metadata')) AS `ATTRIBUTE` FROM `mysql`.`user` WHERE (0 <> can_access_user(`mysql`.`user`.`User`,`mysql`.`user`.`Host`))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `USER_PRIVILEGES`
--

CREATE TEMPORARY TABLE `USER_PRIVILEGES` (
  `GRANTEE` varchar(292) NOT NULL DEFAULT '',
  `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
  `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
  `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `USER_STATISTICS`
--

CREATE TEMPORARY TABLE `USER_STATISTICS` (
  `USER` varchar(96) NOT NULL DEFAULT '',
  `TOTAL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CONCURRENT_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `CONNECTED_TIME` double NOT NULL DEFAULT '0',
  `BUSY_TIME` double NOT NULL DEFAULT '0',
  `CPU_TIME` double NOT NULL DEFAULT '0',
  `BYTES_RECEIVED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BYTES_SENT` bigint UNSIGNED NOT NULL DEFAULT '0',
  `BINLOG_BYTES_WRITTEN` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_FETCHED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROWS_UPDATED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TABLE_ROWS_READ` bigint UNSIGNED NOT NULL DEFAULT '0',
  `SELECT_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `UPDATE_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `OTHER_COMMANDS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `COMMIT_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ROLLBACK_TRANSACTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `DENIED_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `LOST_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0',
  `ACCESS_DENIED` bigint UNSIGNED NOT NULL DEFAULT '0',
  `EMPTY_QUERIES` bigint UNSIGNED NOT NULL DEFAULT '0',
  `TOTAL_SSL_CONNECTIONS` bigint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3;

-- --------------------------------------------------------

--
-- 檢視表結構 `VIEWS`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `VIEWS`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `vw`.`name` AS `TABLE_NAME`, if((can_access_view(`sch`.`name`,`vw`.`name`,`vw`.`view_definer`,`vw`.`options`) = true),`vw`.`view_definition_utf8`,'') AS `VIEW_DEFINITION`, `vw`.`view_check_option` AS `CHECK_OPTION`, `vw`.`view_is_updatable` AS `IS_UPDATABLE`, `vw`.`view_definer` AS `DEFINER`, if((`vw`.`view_security_type` = 'DEFAULT'),'DEFINER',`vw`.`view_security_type`) AS `SECURITY_TYPE`, `cs`.`name` AS `CHARACTER_SET_CLIENT`, `conn_coll`.`name` AS `COLLATION_CONNECTION` FROM (((((`mysql`.`tables` `vw` join `mysql`.`schemata` `sch` on((`vw`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `conn_coll` on((`conn_coll`.`id` = `vw`.`view_connection_collation_id`))) join `mysql`.`collations` `client_coll` on((`client_coll`.`id` = `vw`.`view_client_collation_id`))) join `mysql`.`character_sets` `cs` on((`cs`.`id` = `client_coll`.`character_set_id`))) WHERE ((0 <> can_access_table(`sch`.`name`,`vw`.`name`)) AND (`vw`.`type` = 'VIEW'))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `VIEW_ROUTINE_USAGE`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `VIEW_ROUTINE_USAGE`  AS SELECT `cat`.`name` AS `TABLE_CATALOG`, `sch`.`name` AS `TABLE_SCHEMA`, `vw`.`name` AS `TABLE_NAME`, `vru`.`routine_catalog` AS `SPECIFIC_CATALOG`, `vru`.`routine_schema` AS `SPECIFIC_SCHEMA`, `vru`.`routine_name` AS `SPECIFIC_NAME` FROM ((((`mysql`.`tables` `vw` join `mysql`.`schemata` `sch` on((`vw`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`view_routine_usage` `vru` on((`vru`.`view_id` = `vw`.`id`))) join `mysql`.`routines` `rtn` on(((`vru`.`routine_catalog` = `cat`.`name`) and (`vru`.`routine_schema` = `sch`.`name`) and (`vru`.`routine_name` = `rtn`.`name`)))) WHERE ((`vw`.`type` = 'VIEW') AND (0 <> can_access_routine(`vru`.`routine_schema`,`vru`.`routine_name`,`rtn`.`type`,`rtn`.`definer`,false)) AND (0 <> can_access_view(`sch`.`name`,`vw`.`name`,`vw`.`view_definer`,`vw`.`options`)))  ;

-- --------------------------------------------------------

--
-- 檢視表結構 `VIEW_TABLE_USAGE`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `VIEW_TABLE_USAGE`  AS SELECT `cat`.`name` AS `VIEW_CATALOG`, `sch`.`name` AS `VIEW_SCHEMA`, `vw`.`name` AS `VIEW_NAME`, `vtu`.`table_catalog` AS `TABLE_CATALOG`, `vtu`.`table_schema` AS `TABLE_SCHEMA`, `vtu`.`table_name` AS `TABLE_NAME` FROM (((`mysql`.`tables` `vw` join `mysql`.`schemata` `sch` on((`vw`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`view_table_usage` `vtu` on((`vtu`.`view_id` = `vw`.`id`))) WHERE ((0 <> can_access_table(`vtu`.`table_schema`,`vtu`.`table_name`)) AND (`vw`.`type` = 'VIEW') AND (0 <> can_access_view(`sch`.`name`,`vw`.`name`,`vw`.`view_definer`,`vw`.`options`)))  ;
COMMIT;

