InnoDB数据字典详解-系统表

MySQL源码分析
yzs87

1、简介

InnoDB中,实际上看不到系统表。有4个最基本的系统表来存储表的元数据:表、列、索引、索引列等信息。这4个表分别是SYS_TABLES、SYS_COLUMNS、SYS_INDEXES、SYS_FIELDS。下面分别介绍

2、SYS_TABLES

存储所有以InnoDB为存储引擎的表,每条记录对应一个表。该表的列分别是:

    NAME:表名

    ID:表的ID号

    N_COLS:表的列数

    TYPE:表的存储类型,包括记录的格式、压缩等信息

    MIX_ID、MIX_LEN、CLUSTER_NAME:暂时未用

    SPACE:这个表所在的表空间ID。

这个表在NAME上有聚集索引,ID上有唯一二级索引。

3、SYS_COLUMNS

存储列信息,每一列对应一条记录。表列:

    TABLE_ID:该列所属表的ID

    POS:该列在表中第几列

    NAME:列名

    MTYPE:列的主数据类型

    PRTYPE:列的精确数据类型

    LEN:列数据长度,不包括varchar类型,因为该类型在记录里面已经存储了

    PREC:列数据的精度。

该表的主键列是(TABLE_ID,POS)

4、SYS_INDEXES

存储索引信息,每条记录对应一个索引。

    TABLE_ID:该列所属表的ID

    ID&

已标记关键词 清除标记
数据库是之前从另外的linux服务器拷过来的,当时拷了ibdata和数据库文件,经过加权,改路径,当时启动成功了。 用了一段时间,中间重启过几次,也没有问题,就没有去看mysql.err文件。 但是昨晚,重启后报错the server quit without updating pid, 这个问题之前遇到过,按着之前的方法试了,但是不行。 看错误日志 mysql.err,结果 好多一样的这个错误: 2015-09-10 15:36:29 5590 [Note] InnoDB: Memory barrier is not used 2015-09-10 15:36:29 5590 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-09-10 15:36:29 5590 [Note] InnoDB: Using Linux native AIO 2015-09-10 15:36:29 5590 [Note] InnoDB: Using CPU crc32 instructions 2015-09-10 15:36:29 5590 [Note] InnoDB: Initializing buffer pool, size = 6.0G 2015-09-10 15:36:29 5590 [Note] InnoDB: Completed initialization of buffer pool 2015-09-10 15:36:29 5590 [ERROR] InnoDB: ./ib_logfile0 can't be opened in read-write mode 2015-09-10 15:36:29 5590 [ERROR] Plugin 'InnoDB' init function returned error. 2015-09-10 15:36:29 5590 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2015-09-10 15:36:29 5590 [ERROR] Unknown/unsupported storage engine: InnoDB 2015-09-10 15:36:29 5590 [ERROR] Aborting 2015-09-10 15:36:29 5590 [Note] Binlog end 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'partition' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_DELETED' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_METRICS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMPMEM' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMP_RESET' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_CMP' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_LOCKS' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'INNODB_TRX' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'BLACKHOLE' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'ARCHIVE' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'CSV' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'MEMORY' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'MRG_MYISAM' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'MyISAM' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'sha256_password' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'mysql_old_password' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'mysql_native_password' 2015-09-10 15:36:29 5590 [Note] Shutting down plugin 'binlog' 2015-09-10 15:36:29 5590 [Note] /usr/sbin/mysqld: Shutdown complete 150910 15:36:29 mysqld_safe mysqld from pid file /var/c/mysql/MySQLSlave.pid ended
©️2020 CSDN 皮肤主题: 博客之星2020 设计师:CY__ 返回首页
实付 9.90元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值