-
Gopal Shankar authored
This WL defines INFORMATION_SCHEMA (I_S) system view over DD tables, representing a I_S table. This will eliminate the need of preparing a temporary table for each I_S table during execution and enable faster execution of I_S queries. A. Functional changes introduced: --------------------------------- A.1) Implements following I_S tables as a system view. CHARACTER_SETS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY SCHEMATA TABLE_NAMES TABLES VIEWS COLUMNS STATISTICS KEY_COLUMN_USAGE TABLE_CONSTRAINTS A.2) Implements following SHOW commands to use A.1). SHOW CHARSET SHOW COLLATION SHOW DATABASES SHOW TABLES SHOW TABLE STATUS SHOW COLUMNS SHOW KEYS/INDEXES SHOW STATISTICS DESCRIBE A.3) Introduces a session variable 'information_schema_stats' that enables use to decide how to get the table/index dynamic statistics. Setting it to 'latest' would get latest statistics from storage engine. And setting it to 'cached' would get statistics stored in mysql.table_stats/index_stats. These are two new DD tables introduced by this WL. These tables are updated when user runs ANALYZE TABLE on a table. For more details see HLS 2.1.4) and 2.1.12). A.4) Introduced following new DD columns, see HLS 2.1.8) for more details. COLUMNS.COLUMN_KEY COLUMNS.COLUMN_TYPE COLUMNS.DEFAULT_VALUE_UTF8 TABLES.ROW_FORMAT A.5) Implements special handling for SHOW COLUMNS/KEYS for temporary tables as the meta data of temporary tables are not stored in DD. A.6) I_S tables are temporary tables on 5.7. This make them possible to access under LOCK TABLE mode with explicitly locking I_S tables. Now with this WL, the query execution procedure fails to process I_S system view as the under laying DD table are not locked. So, this WL makes the SQL server to open the DD tables used by a I_S system view without requiring them to be locked explicitly. B. Performance improvements: ---------------------------- See mysql wiki page WL6599_I_S_performance_with_data_dictionary for more details. (HLS section 5) C. Compatibility issues: ------------------------ There are few differences in the way mysql server would behave after this WL. The detailed list of these change in behavior is listed under HLS section 6). D. Source files: ---------------- Most of code changes are placed in sql/dd/info_schema folder. * Refer code in sql/dd/info_schema/show.* to know how SHOW commands are implemented. * Refer code in sql/dd/info_schema/stats.* to know how the retrieval of dynamic statistics are implemented. E. Related WL's and Bugs: ------------------------- * WL#7167 Change DDL to update rows for view columns in DD.COLUMNS and other dependent values. I_S.COLUMNS will get column meta data for views from mysql.columns. The view's column meta data are stored in mysql.columns by this WL. The WL takes care of enabling several test cases that is disabled by this WL#6599. So WL#6599 and WL#7167 would be pushed together. They are QA'ed together. * WL#7464 - InnoDB: provide a way to do non-locking reads. This WL enables execution of I_S queries do to non-locking reads. * WL#8232 - New data-dictionary: change approach to table row_format and index algorithm validation/handling Upcoming WL: * WL#9494 Implement INFORMATION_SCHEMA system views for SP/TRIGGERS/EVENTS/REFERENTIAL_CONSTRAINTS * WL#9495 Update schema tables of dynamic plugins into data dictionary. The following bugs would be fixed by this WL: Bug#11748044 Bug#13878164 F. Disabled tests: ------------------ thread_pool.thread_pool_i_s : Would be fixed by WL#9495. i_innodb.innodb_bug14150372 : WL6599_INNODB_SPORADIC
Gopal Shankar authoredThis WL defines INFORMATION_SCHEMA (I_S) system view over DD tables, representing a I_S table. This will eliminate the need of preparing a temporary table for each I_S table during execution and enable faster execution of I_S queries. A. Functional changes introduced: --------------------------------- A.1) Implements following I_S tables as a system view. CHARACTER_SETS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY SCHEMATA TABLE_NAMES TABLES VIEWS COLUMNS STATISTICS KEY_COLUMN_USAGE TABLE_CONSTRAINTS A.2) Implements following SHOW commands to use A.1). SHOW CHARSET SHOW COLLATION SHOW DATABASES SHOW TABLES SHOW TABLE STATUS SHOW COLUMNS SHOW KEYS/INDEXES SHOW STATISTICS DESCRIBE A.3) Introduces a session variable 'information_schema_stats' that enables use to decide how to get the table/index dynamic statistics. Setting it to 'latest' would get latest statistics from storage engine. And setting it to 'cached' would get statistics stored in mysql.table_stats/index_stats. These are two new DD tables introduced by this WL. These tables are updated when user runs ANALYZE TABLE on a table. For more details see HLS 2.1.4) and 2.1.12). A.4) Introduced following new DD columns, see HLS 2.1.8) for more details. COLUMNS.COLUMN_KEY COLUMNS.COLUMN_TYPE COLUMNS.DEFAULT_VALUE_UTF8 TABLES.ROW_FORMAT A.5) Implements special handling for SHOW COLUMNS/KEYS for temporary tables as the meta data of temporary tables are not stored in DD. A.6) I_S tables are temporary tables on 5.7. This make them possible to access under LOCK TABLE mode with explicitly locking I_S tables. Now with this WL, the query execution procedure fails to process I_S system view as the under laying DD table are not locked. So, this WL makes the SQL server to open the DD tables used by a I_S system view without requiring them to be locked explicitly. B. Performance improvements: ---------------------------- See mysql wiki page WL6599_I_S_performance_with_data_dictionary for more details. (HLS section 5) C. Compatibility issues: ------------------------ There are few differences in the way mysql server would behave after this WL. The detailed list of these change in behavior is listed under HLS section 6). D. Source files: ---------------- Most of code changes are placed in sql/dd/info_schema folder. * Refer code in sql/dd/info_schema/show.* to know how SHOW commands are implemented. * Refer code in sql/dd/info_schema/stats.* to know how the retrieval of dynamic statistics are implemented. E. Related WL's and Bugs: ------------------------- * WL#7167 Change DDL to update rows for view columns in DD.COLUMNS and other dependent values. I_S.COLUMNS will get column meta data for views from mysql.columns. The view's column meta data are stored in mysql.columns by this WL. The WL takes care of enabling several test cases that is disabled by this WL#6599. So WL#6599 and WL#7167 would be pushed together. They are QA'ed together. * WL#7464 - InnoDB: provide a way to do non-locking reads. This WL enables execution of I_S queries do to non-locking reads. * WL#8232 - New data-dictionary: change approach to table row_format and index algorithm validation/handling Upcoming WL: * WL#9494 Implement INFORMATION_SCHEMA system views for SP/TRIGGERS/EVENTS/REFERENTIAL_CONSTRAINTS * WL#9495 Update schema tables of dynamic plugins into data dictionary. The following bugs would be fixed by this WL: Bug#11748044 Bug#13878164 F. Disabled tests: ------------------ thread_pool.thread_pool_i_s : Would be fixed by WL#9495. i_innodb.innodb_bug14150372 : WL6599_INNODB_SPORADIC
Loading