-
Aditya A authored
FOR SCHEMA WITH CAPITAL LETTERS PROBLEM ------- 1. When using lower_case_table_names = 2 (only used in case insensitive file system) innodb stores database name in lower case in SYS_TABLES, where as in the disk the database name is stored in the format specified in create statement.In this case we use capital letters in create statement. 2. During crash recovery fil_load_single_table_tablespace() function is called which populates fil_space_t structure with capital database name found in the disk and stores it in two hash tables,one based on name and another based on tablespace id. 3. When opening the tablespace with fil_open_single_table_tablespace() we first check whether the fil_space_t structure is present in hash based on database name obtained from the SYS_TABLES. Since the database name is in small letters it cannot find the fil_space_t object in the hash ,then it tries to get the fil_space_t object using tablespace id and is successful in getting it. 4. This is seen as a conflict and the table's ibd file is set as missing and we cannot access the table. FIX --- 1. While doing crash recovery for case insensitive systems we convert the database names to lower case . Approved bt Kevin [#rb 6737 ]
Aditya A authoredFOR SCHEMA WITH CAPITAL LETTERS PROBLEM ------- 1. When using lower_case_table_names = 2 (only used in case insensitive file system) innodb stores database name in lower case in SYS_TABLES, where as in the disk the database name is stored in the format specified in create statement.In this case we use capital letters in create statement. 2. During crash recovery fil_load_single_table_tablespace() function is called which populates fil_space_t structure with capital database name found in the disk and stores it in two hash tables,one based on name and another based on tablespace id. 3. When opening the tablespace with fil_open_single_table_tablespace() we first check whether the fil_space_t structure is present in hash based on database name obtained from the SYS_TABLES. Since the database name is in small letters it cannot find the fil_space_t object in the hash ,then it tries to get the fil_space_t object using tablespace id and is successful in getting it. 4. This is seen as a conflict and the table's ibd file is set as missing and we cannot access the table. FIX --- 1. While doing crash recovery for case insensitive systems we convert the database names to lower case . Approved bt Kevin [#rb 6737 ]
Loading