Skip to content
  • Gopal Shankar's avatar
    1e0d41f6
    Bug#24786075 FIND A WAY TO LIST #SQL... TABLE LEFT IN DATA DICTIONARY IN CASE ALTER FAILS. · 1e0d41f6
    Gopal Shankar authored
    This patch adds a new keyword EXTENDED to SHOW TABLES syntax
    enabling users to list hidden tables that are created by ALTER
    TABLE command. In rare situations ALTER TABLE command might fail
    by leaving metadata of '#sql' temporary tables in DD table.
    
    The patch does following changes,
    
    - Change syntax of SHOW TABLES to add EXTENDED command.
      The new syntax would look like,
    
      SHOW [EXTENDED] [FULL] TABLES ....
    
    - Introduces new native function IS_VISIBLE_DD_OBJECT(). Which
      skips hidden tables, columns, indexes and index elements by
      default.  And show them if EXTENDED keyword is provided in SHOW
      command.
    
    - Change CAN_ACCESS_TABLE()/CAN_ACCESS_COLUMN() native function
      to avoid handling hidden DD object checks. Move the
      responsibility to IS_VISIBLE_DD_OBJECT() native function.
    
    - Enable DROP TABLE command to drop temporary tables left by
      ALTER TABLE.
    
    - Add new test case to verify SHOW EXTENDED and the possibility
      of DROP TABLE to clean left-over temporary tables by ALTER TABLE.
    1e0d41f6
    Bug#24786075 FIND A WAY TO LIST #SQL... TABLE LEFT IN DATA DICTIONARY IN CASE ALTER FAILS.
    Gopal Shankar authored
    This patch adds a new keyword EXTENDED to SHOW TABLES syntax
    enabling users to list hidden tables that are created by ALTER
    TABLE command. In rare situations ALTER TABLE command might fail
    by leaving metadata of '#sql' temporary tables in DD table.
    
    The patch does following changes,
    
    - Change syntax of SHOW TABLES to add EXTENDED command.
      The new syntax would look like,
    
      SHOW [EXTENDED] [FULL] TABLES ....
    
    - Introduces new native function IS_VISIBLE_DD_OBJECT(). Which
      skips hidden tables, columns, indexes and index elements by
      default.  And show them if EXTENDED keyword is provided in SHOW
      command.
    
    - Change CAN_ACCESS_TABLE()/CAN_ACCESS_COLUMN() native function
      to avoid handling hidden DD object checks. Move the
      responsibility to IS_VISIBLE_DD_OBJECT() native function.
    
    - Enable DROP TABLE command to drop temporary tables left by
      ALTER TABLE.
    
    - Add new test case to verify SHOW EXTENDED and the possibility
      of DROP TABLE to clean left-over temporary tables by ALTER TABLE.
Loading