content_image/725884.jpg
The MySQL server uses an internal API that is accessed during DDL operations to create and maintain SDI records. 

The IMPORT TABLE  statement imports MyISAM  tables based on information contained in .sdi  files. For more information, see Section 13.2.5, “IMPORT TABLE Statement” . 

## 14.7 Data Dictionary Usage Differences 

Use of a data dictionary-enabled MySQL server entails some operational differences compared to a server that does not have a data dictionary: 

•Previously, enabling the innodb_read_only  system variable prevented creating and dropping tables only for the InnoDB  storage engine. As of MySQL 8.0, enabling innodb_read_only  prevents these operations for all storage engines. Table creation and drop operations for any storage engine modify data dictionary tables in the mysql  system database, but those tables use the InnoDB  storage engine and cannot be modified when innodb_read_only  is enabled. The same principle applies to other table operations that require modifying data dictionary tables. Examples: 

• ANALYZE TABLE  fails because it updates table statistics, which are stored in the data dictionary. 

• ALTER TABLE tbl_name  ENGINE= engine_name  fails because it updates the storage engine designation, which is stored in the data dictionary. 

<img src='content_image/725884.jpg'>

## Note 

Enabling innodb_read_only  also has important implications for non-data dictionary tables in the mysql  system database. For details, see the description of innodb_read_only  in Section 15.14, “InnoDB Startup Options and System Variables” 

•Previously, tables in the mysql  system database were visible to DML and DDL statements. As of MySQL 8.0, data dictionary tables are invisible and cannot be modified or queried directly. However, in most cases there are corresponding INFORMATION_SCHEMA  tables that can be queried instead. This enables the underlying data dictionary tables to be changed as server development proceeds, while maintaining a stable INFORMATION_SCHEMA  interface for application use. 

• INFORMATION_SCHEMA  tables in MySQL 8.0 are closely tied to the data dictionary, resulting in several usage differences: 

•Previously, INFORMATION_SCHEMA  queries for table statistics in the STATISTICS  and TABLES tables retrieved statistics directly from storage engines. As of MySQL 8.0, cached table statistics are used by default. The information_schema_stats_expiry  system variable defines the period of time before cached table statistics expire. The default is 86400 seconds (24 hours). (To update the cached values at any time for a given table, use ANALYZE TABLE .) If there are no cached statistics or statistics have expired, statistics are retrieved from storage engines when querying table statistics columns. To always retrieve the latest statistics directly from storage engines, set information_schema_stats_expiry  to 0 . For more information, see Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries” . 

•Several INFORMATION_SCHEMA  tables are views on data dictionary tables, which enables the optimizer to use indexes on those underlying tables. Consequently, depending on optimizer choices, the row order of results for INFORMATION_SCHEMA  queries might differ from previous results. If a query result must have specific row ordering characteristics, include an ORDER BY  clause. 

•Queries on INFORMATION_SCHEMA  tables may return column names in a different lettercase than in earlier MySQL series. Applications should test result set column names in case-insensitive fashion. If 

