github.com/dolthub/go-mysql-server@v0.18.0/sql/information_schema/innodb_tables.go (about)

     1  // Copyright 2022 Dolthub, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package information_schema
    16  
    17  import (
    18  	"github.com/dolthub/vitess/go/sqltypes"
    19  
    20  	. "github.com/dolthub/go-mysql-server/sql"
    21  	"github.com/dolthub/go-mysql-server/sql/planbuilder"
    22  	"github.com/dolthub/go-mysql-server/sql/types"
    23  )
    24  
    25  const (
    26  	// InnoDBBufferPageName is the name of the INNODB_BUFFER_PAGE Table
    27  	InnoDBBufferPageName = "innodb_buffer_page"
    28  	// InnoDBBufferPageLRUName is the name of the INNODB_BUFFER_PAGE_LRU Table
    29  	InnoDBBufferPageLRUName = "innodb_buffer_page_lru"
    30  	// InnoDBBufferPoolStatsName is the name of the INNODB_BUFFER_POOL_STATS Table
    31  	InnoDBBufferPoolStatsName = "innodb_buffer_pool_stats"
    32  	// InnoDBCachedIndexesName is the name of the INNODB_CACHED_INDEXES Table
    33  	InnoDBCachedIndexesName = "innodb_cached_indexes"
    34  	// InnoDBCmpName is the name of the INNODB_CMP and INNODB_CMP_RESET Tables
    35  	InnoDBCmpName      = "innodb_cmp"
    36  	InnoDBCmpResetName = "innodb_cmp_reset"
    37  	// InnoDBCmpmemName is the name of the INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables
    38  	InnoDBCmpmemName      = "innodb_cmpmem"
    39  	InnoDBCmpmemResetName = "innodb_cmpmem_reset"
    40  	// InnoDBCmpPerIndexName is the name of the INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Table
    41  	InnoDBCmpPerIndexName      = "innodb_cmp_per_index"
    42  	InnoDBCmpPerIndexResetName = "innodb_cmp_per_index_reset"
    43  	// InnoDBColumnsName is the name of the INNODB_COLUMNS Table
    44  	InnoDBColumnsName = "innodb_columns"
    45  	// InnoDBDatafilesName is the name of the INNODB_DATAFILES Table
    46  	InnoDBDatafilesName = "innodb_datafiles"
    47  	// InnoDBFieldsName is the name of the INNODB_FIELDS Table
    48  	InnoDBFieldsName = "innodb_fields"
    49  	// InnoDBForeignName is the name of the INNODB_FOREIGN Table
    50  	InnoDBForeignName = "innodb_foreign"
    51  	// InnoDBForeignColsName is the name of the INNODB_FOREIGN_COLS Table
    52  	InnoDBForeignColsName = "innodb_foreign_cols"
    53  	// InnoDBFtBeingDeletedName is the name of the INNODB_FT_BEING_DELETED Table
    54  	InnoDBFtBeingDeletedName = "innodb_ft_being_deleted"
    55  	// InnoDBFtConfigName is the name of the INNODB_FT_CONFIG Table
    56  	InnoDBFtConfigName = "innodb_ft_config"
    57  	// InnoDBFtDefaultStopwordName is the name of the INNODB_FT_DEFAULT_STOPWORD Table
    58  	InnoDBFtDefaultStopwordName = "innodb_ft_default_stopword"
    59  	// InnoDBFtDeletedName is the name of the INNODB_FT_DELETED Table
    60  	InnoDBFtDeletedName = "innodb_ft_deleted"
    61  	// InnoDBFtIndexCacheName is the name of the INNODB_FT_INDEX_CACHE Table
    62  	InnoDBFtIndexCacheName = "innodb_ft_index_cache"
    63  	// InnoDBFtIndexTableName is the name of the INNODB_FT_INDEX_TABLE Table
    64  	InnoDBFtIndexTableName = "innodb_ft_index_table"
    65  	// InnoDBIndexesName is the name of the INNODB_INDEXES Table
    66  	InnoDBIndexesName = "innodb_indexes"
    67  	// InnoDBMetricsName is the name of the INNODB_METRICS Table
    68  	InnoDBMetricsName = "innodb_metrics"
    69  	// InnoDBSessionTempTablespacesName is the name of the INNODB_SESSION_TEMP_TABLESPACES Table
    70  	InnoDBSessionTempTablespacesName = "innodb_session_temp_tablespaces"
    71  	// InnoDBTablesName is the name of the INNODB_TABLES Table
    72  	InnoDBTablesName = "innodb_tables"
    73  	// InnoDBTablespacesName is the name of the INNODB_TABLESPACES Table
    74  	InnoDBTablespacesName = "innodb_tablespaces"
    75  	// InnoDBTablespacesBriefName is the name of the INNODB_TABLESPACES_BRIEF Table
    76  	InnoDBTablespacesBriefName = "innodb_tablespaces_brief"
    77  	// InnoDBTablestatsName is the name of the INNODB_TABLESTATS View
    78  	InnoDBTablestatsName = "innodb_tablestats"
    79  	// InnoDBTempTableInfoName is the name of the INNODB_TEMP_TABLE_INFO table
    80  	InnoDBTempTableInfoName = "innodb_temp_table_info"
    81  	// InnoDBTrxName is the name of the INNODB_TRX Table
    82  	InnoDBTrxName = "innodb_trx"
    83  	// InnoDBVirtualName is the name of the INNODB_VIRTUAL Table
    84  	InnoDBVirtualName = "innodb_virtual"
    85  )
    86  
    87  var innoDBBufferPageSchema = Schema{
    88  	{Name: "pool_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    89  	{Name: "block_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    90  	{Name: "space", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    91  	{Name: "page_number", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    92  	{Name: "page_type", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
    93  	{Name: "flush_type", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    94  	{Name: "fix_count", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    95  	{Name: "is_hashed", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
    96  	{Name: "newest_modification", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    97  	{Name: "oldest_modification", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    98  	{Name: "access_time", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
    99  	{Name: "table_name", Type: types.MustCreateString(sqltypes.VarChar, 1024, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   100  	{Name: "index_name", Type: types.MustCreateString(sqltypes.VarChar, 1024, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   101  	{Name: "number_records", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
   102  	{Name: "data_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
   103  	{Name: "compressed_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
   104  	{Name: "page_state", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   105  	{Name: "io_fix", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   106  	{Name: "is_old", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   107  	{Name: "free_page_clock", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageName},
   108  	{Name: "is_stale", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageName},
   109  }
   110  
   111  var innoDBBufferPageLRUSchema = Schema{
   112  	{Name: "pool_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   113  	{Name: "lru_position", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   114  	{Name: "space", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   115  	{Name: "page_number", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   116  	{Name: "page_type", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   117  	{Name: "flush_type", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   118  	{Name: "fix_count", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   119  	{Name: "is_hashed", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   120  	{Name: "newest_modification", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   121  	{Name: "oldest_modification", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   122  	{Name: "access_time", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   123  	{Name: "table_name", Type: types.MustCreateString(sqltypes.VarChar, 1024, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   124  	{Name: "index_name", Type: types.MustCreateString(sqltypes.VarChar, 1024, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   125  	{Name: "number_records", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   126  	{Name: "data_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   127  	{Name: "compressed_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   128  	{Name: "compressed", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   129  	{Name: "io_fix", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   130  	{Name: "is_old", Type: types.MustCreateString(sqltypes.VarChar, 3, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBBufferPageLRUName},
   131  	{Name: "free_page_clock", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPageLRUName},
   132  }
   133  
   134  var innoDBBufferPoolStatsSchema = Schema{
   135  	{Name: "pool_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   136  	{Name: "pool_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   137  	{Name: "free_buffers", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   138  	{Name: "database_pages", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   139  	{Name: "old_database_pages", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   140  	{Name: "modified_database_pages", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   141  	{Name: "pending_decompress", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   142  	{Name: "pending_reads", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   143  	{Name: "pending_flush_lru", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   144  	{Name: "pending_flush_list", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   145  	{Name: "pages_made_young", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   146  	{Name: "pages_not_made_young", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   147  	{Name: "pages_made_young_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   148  	{Name: "pages_made_not_young_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   149  	{Name: "number_pages_read", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   150  	{Name: "number_pages_created", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   151  	{Name: "number_pages_written", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   152  	{Name: "pages_read_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   153  	{Name: "pages_create_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   154  	{Name: "pages_written_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   155  	{Name: "number_pages_get", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   156  	{Name: "hit_rate", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   157  	{Name: "young_make_per_thousand_gets", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   158  	{Name: "not_young_make_per_thousand_gets", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   159  	{Name: "number_pages_read_ahead", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   160  	{Name: "number_read_ahead_evicted", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   161  	{Name: "read_ahead_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   162  	{Name: "read_ahead_evicted_rate", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   163  	{Name: "lru_io_total", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   164  	{Name: "lru_io_current", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   165  	{Name: "uncompress_total", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   166  	{Name: "uncompress_current", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBBufferPoolStatsName},
   167  }
   168  
   169  var innoDBCachedIndexesSchema = Schema{
   170  	{Name: "space_id", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBCachedIndexesName},
   171  	{Name: "index_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBCachedIndexesName},
   172  	{Name: "n_cached_pages", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBCachedIndexesName},
   173  }
   174  
   175  var innoDBCmpSchema = Schema{
   176  	{Name: "page_size", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   177  	{Name: "compress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   178  	{Name: "compress_ops_ok", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   179  	{Name: "compress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   180  	{Name: "uncompress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   181  	{Name: "uncompress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpName},
   182  }
   183  
   184  var innoDBCmpResetSchema = Schema{
   185  	{Name: "page_size", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   186  	{Name: "compress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   187  	{Name: "compress_ops_ok", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   188  	{Name: "compress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   189  	{Name: "uncompress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   190  	{Name: "uncompress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpResetName},
   191  }
   192  
   193  var innoDBCmpmemSchema = Schema{
   194  	{Name: "page_size", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemName},
   195  	{Name: "buffer_pool_instance", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemName},
   196  	{Name: "pages_used", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemName},
   197  	{Name: "pages_free", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemName},
   198  	{Name: "relocation_ops", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBCmpmemName},
   199  	{Name: "relocation_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemName},
   200  }
   201  
   202  var innoDBCmpmemResetSchema = Schema{
   203  	{Name: "page_size", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemResetName},
   204  	{Name: "buffer_pool_instance", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemResetName},
   205  	{Name: "pages_used", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemResetName},
   206  	{Name: "pages_free", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemResetName},
   207  	{Name: "relocation_ops", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBCmpmemResetName},
   208  	{Name: "relocation_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpmemResetName},
   209  }
   210  
   211  var innoDBCmpPerIndexSchema = Schema{
   212  	{Name: "database_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexName},
   213  	{Name: "table_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexName},
   214  	{Name: "index_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexName},
   215  	{Name: "compress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexName},
   216  	{Name: "compress_ops_ok", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexName},
   217  	{Name: "compress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexName},
   218  	{Name: "uncompress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexName},
   219  	{Name: "uncompress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexName},
   220  }
   221  
   222  var innoDBCmpPerIndexResetSchema = Schema{
   223  	{Name: "database_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   224  	{Name: "table_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   225  	{Name: "index_name", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   226  	{Name: "compress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   227  	{Name: "compress_ops_ok", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   228  	{Name: "compress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   229  	{Name: "uncompress_ops", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   230  	{Name: "uncompress_time", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBCmpPerIndexResetName},
   231  }
   232  
   233  var innoDBColumnsSchema = Schema{
   234  	{Name: "table_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBColumnsName},
   235  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBColumnsName},
   236  	{Name: "pos", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBColumnsName},
   237  	{Name: "mtype", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBColumnsName},
   238  	{Name: "prtype", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBColumnsName},
   239  	{Name: "len", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBColumnsName},
   240  	{Name: "has_default", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBColumnsName},
   241  	{Name: "default_value", Type: types.Text, Default: nil, Nullable: true, Source: InnoDBColumnsName},
   242  }
   243  
   244  var innoDBDatafilesSchema = Schema{
   245  	{Name: "space_id", Type: types.MustCreateBinary(sqltypes.VarBinary, 256), Default: nil, Nullable: true, Source: InnoDBDatafilesName},
   246  	{Name: "path", Type: types.MustCreateString(sqltypes.VarChar, 512, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBDatafilesName},
   247  }
   248  
   249  var innoDBFieldsSchema = Schema{
   250  	{Name: "index_id", Type: types.MustCreateBinary(sqltypes.VarBinary, 256), Default: nil, Nullable: true, Source: InnoDBFieldsName},
   251  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBFieldsName},
   252  	{Name: "pos", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFieldsName},
   253  }
   254  
   255  var innoDBForeignSchema = Schema{
   256  	{Name: "id", Type: types.MustCreateString(sqltypes.VarChar, 129, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBForeignName},
   257  	{Name: "for_name", Type: types.MustCreateString(sqltypes.VarChar, 129, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBForeignName},
   258  	{Name: "ref_name", Type: types.MustCreateString(sqltypes.VarChar, 129, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBForeignName},
   259  	{Name: "n_cols", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBForeignName},
   260  	{Name: "type", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBForeignName},
   261  }
   262  
   263  var innoDBForeignColsSchema = Schema{
   264  	{Name: "id", Type: types.MustCreateString(sqltypes.VarChar, 129, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBForeignColsName},
   265  	{Name: "for_col_name", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBForeignColsName},
   266  	{Name: "ref_col_name", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBForeignColsName},
   267  	{Name: "pos", Type: types.Uint32, Default: nil, Nullable: false, Source: InnoDBForeignColsName},
   268  }
   269  
   270  var innoDBFtBeingDeletedSchema = Schema{
   271  	{Name: "type", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtBeingDeletedName},
   272  }
   273  
   274  var innoDBFtConfigSchema = Schema{
   275  	{Name: "key", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBFtConfigName},
   276  	{Name: "value", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBFtConfigName},
   277  }
   278  
   279  var innoDBFtDefaultStopwordSchema = Schema{
   280  	{Name: "value", Type: types.MustCreateString(sqltypes.VarChar, 18, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 18, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBFtDefaultStopwordName},
   281  }
   282  
   283  var innoDBFtDeletedSchema = Schema{
   284  	{Name: "doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtDeletedName},
   285  }
   286  
   287  var innoDBFtIndexCacheSchema = Schema{
   288  	{Name: "word", Type: types.MustCreateString(sqltypes.VarChar, 337, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 337, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBFtIndexCacheName},
   289  	{Name: "first_doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexCacheName},
   290  	{Name: "last_doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexCacheName},
   291  	{Name: "doc_count", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexCacheName},
   292  	{Name: "doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexCacheName},
   293  	{Name: "position", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexCacheName},
   294  }
   295  
   296  var innoDBFtIndexTableSchema = Schema{
   297  	{Name: "word", Type: types.MustCreateString(sqltypes.VarChar, 337, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 337, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBFtIndexTableName},
   298  	{Name: "first_doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexTableName},
   299  	{Name: "last_doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexTableName},
   300  	{Name: "doc_count", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexTableName},
   301  	{Name: "doc_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexTableName},
   302  	{Name: "position", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBFtIndexTableName},
   303  }
   304  
   305  var innoDBIndexesSchema = Schema{
   306  	{Name: "index_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBIndexesName},
   307  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBIndexesName},
   308  	{Name: "table_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBIndexesName},
   309  	{Name: "type", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBIndexesName},
   310  	{Name: "n_fields", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBIndexesName},
   311  	{Name: "page_no", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBIndexesName},
   312  	{Name: "space", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBIndexesName},
   313  	{Name: "merge_threshold", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBIndexesName},
   314  }
   315  
   316  var innoDBMetricsSchema = Schema{
   317  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBMetricsName},
   318  	{Name: "subsystem", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBMetricsName},
   319  	{Name: "count", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBMetricsName},
   320  	{Name: "max_count", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: true, Source: InnoDBMetricsName},
   321  	{Name: "min_count", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: true, Source: InnoDBMetricsName},
   322  	{Name: "avg_count", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: true, Source: InnoDBMetricsName},
   323  	{Name: "count_reset", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBMetricsName},
   324  	{Name: "max_count_reset", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: true, Source: InnoDBMetricsName},
   325  	{Name: "min_count_reset", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: true, Source: InnoDBMetricsName},
   326  	{Name: "avg_count_reset", Type: types.Float32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Float32, false), Nullable: true, Source: InnoDBMetricsName},
   327  	{Name: "time_enabled", Type: types.Datetime, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Datetime, false), Nullable: true, Source: InnoDBMetricsName},
   328  	{Name: "time_disabled", Type: types.Datetime, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Datetime, false), Nullable: true, Source: InnoDBMetricsName},
   329  	{Name: "time_elapsed", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: true, Source: InnoDBMetricsName},
   330  	{Name: "time_reset", Type: types.Datetime, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Datetime, false), Nullable: true, Source: InnoDBMetricsName},
   331  	{Name: "status", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBMetricsName},
   332  	{Name: "type", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBMetricsName},
   333  	{Name: "comment", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBMetricsName},
   334  }
   335  
   336  var innoDBSessionTempTablespacesSchema = Schema{
   337  	{Name: "id", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   338  	{Name: "space", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   339  	{Name: "path", Type: types.MustCreateString(sqltypes.VarChar, 4001, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 4001, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   340  	{Name: "size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   341  	{Name: "state", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   342  	{Name: "purpose", Type: types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBSessionTempTablespacesName},
   343  }
   344  
   345  var innoDBTablesSchema = Schema{
   346  	{Name: "table_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablesName},
   347  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 655, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 655, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTablesName},
   348  	{Name: "flag", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTablesName},
   349  	{Name: "n_cols", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTablesName},
   350  	{Name: "space", Type: types.Int64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int64, false), Nullable: false, Source: InnoDBTablesName},
   351  	{Name: "row_format", Type: types.MustCreateString(sqltypes.VarChar, 12, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablesName},
   352  	{Name: "zip_page_size", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablesName},
   353  	{Name: "space_type", Type: types.MustCreateString(sqltypes.VarChar, 12, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablesName},
   354  	{Name: "instant_cols", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTablesName},
   355  }
   356  
   357  var innoDBTablespacesSchema = Schema{
   358  	{Name: "space", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   359  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 655, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 655, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTablespacesName},
   360  	{Name: "flag", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   361  	{Name: "row_format", Type: types.MustCreateString(sqltypes.VarChar, 22, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesName},
   362  	{Name: "page_size", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   363  	{Name: "zip_page_size", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   364  	{Name: "space_type", Type: types.MustCreateString(sqltypes.VarChar, 10, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesName},
   365  	{Name: "fs_block_size", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   366  	{Name: "file_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablespacesName},
   367  	{Name: "allocated_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablespacesName},
   368  	{Name: "autoextend_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablespacesName},
   369  	{Name: "server_version", Type: types.MustCreateString(sqltypes.VarChar, 10, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesName},
   370  	{Name: "space_version", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBTablespacesName},
   371  	{Name: "encryption", Type: types.MustCreateString(sqltypes.VarChar, 1, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesName},
   372  	{Name: "state", Type: types.MustCreateString(sqltypes.VarChar, 10, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesName},
   373  }
   374  
   375  var innoDBTablespacesBriefSchema = Schema{
   376  	{Name: "space", Type: types.MustCreateString(sqltypes.VarChar, 256, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesBriefName},
   377  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 268, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBTablespacesBriefName},
   378  	{Name: "path", Type: types.MustCreateString(sqltypes.VarChar, 512, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBTablespacesBriefName},
   379  	{Name: "flag", Type: types.MustCreateString(sqltypes.VarChar, 256, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTablespacesBriefName},
   380  	{Name: "space_type", Type: types.MustCreateString(sqltypes.VarChar, 7, Collation_Information_Schema_Default), Default: nil, Nullable: false, Source: InnoDBTablespacesBriefName},
   381  }
   382  
   383  var innoDBTablestatsSchema = Schema{
   384  	{Name: "table_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   385  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTablestatsName},
   386  	{Name: "stats_initialized", Type: types.MustCreateString(sqltypes.VarChar, 193, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 192, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTablestatsName},
   387  	{Name: "num_rows", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   388  	{Name: "clust_index_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   389  	{Name: "other_index_size", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   390  	{Name: "modified_counter", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   391  	{Name: "autoinc", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTablestatsName},
   392  	{Name: "ref_count", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTablestatsName},
   393  }
   394  
   395  var innoDBTempTableSchema = Schema{
   396  	{Name: "table_id", Type: types.Int64, Default: nil, Nullable: false, Source: InnoDBTempTableInfoName},
   397  	{Name: "name", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTempTableInfoName},
   398  	{Name: "n_cols", Type: types.Uint64, Default: nil, Nullable: false, Source: InnoDBTempTableInfoName},
   399  	{Name: "space", Type: types.Uint64, Default: nil, Nullable: false, Source: InnoDBTempTableInfoName},
   400  }
   401  
   402  var innoDBTrxSchema = Schema{
   403  	{Name: "trx_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   404  	{Name: "trx_state", Type: types.MustCreateString(sqltypes.VarChar, 13, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 13, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTrxName},
   405  	{Name: "trx_started", Type: types.Datetime, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `"0000-00-00 00:00:00"`, types.Datetime, false), Nullable: false, Source: InnoDBTrxName},
   406  	{Name: "trx_requested_lock_id", Type: types.MustCreateString(sqltypes.VarChar, 105, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTrxName},
   407  	{Name: "trx_wait_started", Type: types.Datetime, Default: nil, Nullable: true, Source: InnoDBTrxName},
   408  	{Name: "trx_weight", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   409  	{Name: "trx_mysql_thread_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   410  	{Name: "trx_query", Type: types.MustCreateString(sqltypes.VarChar, 1024, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTrxName},
   411  	{Name: "trx_operation_state", Type: types.MustCreateString(sqltypes.VarChar, 64, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTrxName},
   412  	{Name: "trx_tables_in_use", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   413  	{Name: "trx_tables_locked", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   414  	{Name: "trx_lock_structs", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   415  	{Name: "trx_lock_memory_bytes", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   416  	{Name: "trx_rows_locked", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   417  	{Name: "trx_rows_modified", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   418  	{Name: "trx_concurrency_tickets", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   419  	{Name: "trx_isolation_level", Type: types.MustCreateString(sqltypes.VarChar, 16, Collation_Information_Schema_Default), Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), `""`, types.MustCreateString(sqltypes.VarChar, 16, Collation_Information_Schema_Default), false), Nullable: false, Source: InnoDBTrxName},
   420  	{Name: "trx_unique_checks", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTrxName},
   421  	{Name: "trx_foreign_key_checks", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTrxName},
   422  	{Name: "trx_last_foreign_key_error", Type: types.MustCreateString(sqltypes.VarChar, 256, Collation_Information_Schema_Default), Default: nil, Nullable: true, Source: InnoDBTrxName},
   423  	{Name: "trx_adaptive_hash_latched", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTrxName},
   424  	{Name: "trx_adaptive_hash_timeout", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBTrxName},
   425  	{Name: "trx_is_read_only", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTrxName},
   426  	{Name: "trx_autocommit_non_locking", Type: types.Int32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Int32, false), Nullable: false, Source: InnoDBTrxName},
   427  	{Name: "trx_schedule_weight", Type: types.Uint64, Default: nil, Nullable: true, Source: InnoDBTrxName},
   428  }
   429  
   430  var innoDBVirtualSchema = Schema{
   431  	{Name: "table_id", Type: types.Uint64, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint64, false), Nullable: false, Source: InnoDBVirtualName},
   432  	{Name: "pos", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBVirtualName},
   433  	{Name: "base_pos", Type: types.Uint32, Default: planbuilder.MustStringToColumnDefaultValue(NewEmptyContext(), "0", types.Uint32, false), Nullable: false, Source: InnoDBVirtualName},
   434  }
   435  
   436  // innoDBTempTableRowIter returns info on the temporary tables stored in the session.
   437  // TODO: Since Table ids and Space are not yet supported this table is not completely accurate yet.
   438  func innoDBTempTableRowIter(ctx *Context, c Catalog) (RowIter, error) {
   439  	var rows []Row
   440  	for _, db := range c.AllDatabases(ctx) {
   441  		tb, ok := db.(TemporaryTableDatabase)
   442  		if !ok {
   443  			continue
   444  		}
   445  
   446  		tables, err := tb.GetAllTemporaryTables(ctx)
   447  		if err != nil {
   448  			return nil, err
   449  		}
   450  
   451  		for i, table := range tables {
   452  			rows = append(rows, Row{i, table.String(), len(table.Schema()), 0})
   453  		}
   454  	}
   455  
   456  	return RowsToRowIter(rows...), nil
   457  }