Skip to content
  • Karthik Kamath's avatar
    758d7162
    BUG#29957361: TABLE NOT IN THE SHOW TABLES WITH · 758d7162
    Karthik Kamath authored
                  LOWER_CASE_TABLE_NAMES=2
    
    ANALYSIS:
    =========
    Consider a server started with lower_case_table_names=2 and
    a table with table name in uppercase is created. Certain
    privileges on the table are assigned to an user. Connecting
    to the server using that user and executing SHOW TABLES
    does not display the table with uppercase table name.
    
    With lower_case_table_names set to 2, table and database
    names are stored on disk using the lettercase specified in
    the CREATE TABLE or CREATE DATABASE statement, but are
    converted to lowercase on lookup.
    
    With lower_case_table_names set to 2, GRANT on a table
    with uppercase table name will store the user name and
    table name information in lowercase in the grant tables.
    While executing SHOW TABLES, we fetch table names from
    the .frm files in file system.
    
    As the table name is in uppercase and the table name
    stored in grant tables is in lowercase, the access check
    fails and the table name is not displayed in the result set.
    
    FIX:
    ====
    Use lowercase table name to perform ACL check when
    SHOW TABLES is run with lower_case_table_names=2.
    
    Change-Id: Iad60d07aa8222670220be4c22deeba7027966909
    758d7162
    BUG#29957361: TABLE NOT IN THE SHOW TABLES WITH
    Karthik Kamath authored
                  LOWER_CASE_TABLE_NAMES=2
    
    ANALYSIS:
    =========
    Consider a server started with lower_case_table_names=2 and
    a table with table name in uppercase is created. Certain
    privileges on the table are assigned to an user. Connecting
    to the server using that user and executing SHOW TABLES
    does not display the table with uppercase table name.
    
    With lower_case_table_names set to 2, table and database
    names are stored on disk using the lettercase specified in
    the CREATE TABLE or CREATE DATABASE statement, but are
    converted to lowercase on lookup.
    
    With lower_case_table_names set to 2, GRANT on a table
    with uppercase table name will store the user name and
    table name information in lowercase in the grant tables.
    While executing SHOW TABLES, we fetch table names from
    the .frm files in file system.
    
    As the table name is in uppercase and the table name
    stored in grant tables is in lowercase, the access check
    fails and the table name is not displayed in the result set.
    
    FIX:
    ====
    Use lowercase table name to perform ACL check when
    SHOW TABLES is run with lower_case_table_names=2.
    
    Change-Id: Iad60d07aa8222670220be4c22deeba7027966909
Loading