-
Karthik Kamath authored
TABLE COMMENTS "... IS NOT BASE TABLE" PROBLEM: ======== With DERIVED_MERGE disabled using the OPTIMIZER_SWITCH, the INFORMATION_SCHEMA(I_S).TABLES.TABLE_COMMENT column shows a strange comment stating that the view is not a BASE TABLE. ANALYSIS: ========= With DERIVED_MERGE disabled, the optimizer ends-up invoking functions which request values for dynamic columns like TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT, UPDATE_TIME, CHECK_TIME and CHECKSUM from storage engine. This causes I_S module to try and open the view treating it as a base table, which is incorrect. FIX: ==== Modifies the INFORMATION_SCHEMA.TABLES dynamic column definitions to return NULL, if it finds a view. Note: ===== BUG#26203731 introduced time based caching by introducing a new session variable "information_schema_stats_expiry". This patch made INFORMATION_SCHEMA.TABLES dynamic columns to return 0 instead of NULL. Change-Id: Idaf62684f0dbfa065aa89486ef1be57e07ab46c2
Karthik Kamath authoredTABLE COMMENTS "... IS NOT BASE TABLE" PROBLEM: ======== With DERIVED_MERGE disabled using the OPTIMIZER_SWITCH, the INFORMATION_SCHEMA(I_S).TABLES.TABLE_COMMENT column shows a strange comment stating that the view is not a BASE TABLE. ANALYSIS: ========= With DERIVED_MERGE disabled, the optimizer ends-up invoking functions which request values for dynamic columns like TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT, UPDATE_TIME, CHECK_TIME and CHECKSUM from storage engine. This causes I_S module to try and open the view treating it as a base table, which is incorrect. FIX: ==== Modifies the INFORMATION_SCHEMA.TABLES dynamic column definitions to return NULL, if it finds a view. Note: ===== BUG#26203731 introduced time based caching by introducing a new session variable "information_schema_stats_expiry". This patch made INFORMATION_SCHEMA.TABLES dynamic columns to return 0 instead of NULL. Change-Id: Idaf62684f0dbfa065aa89486ef1be57e07ab46c2
Loading