-
gluh@eagle.intranet.mysql.r18.ru authored
Bug#18282 "INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views" This bug caused crashes or resulted in wrong data being returned when one tried to obtain information from I_S tables about views using stored functions. It was caused by the fact that we were using LEX representing statement which were doing select from I_S tables as active LEX when contents of I_S table were built. So state of this LEX both affected and was affected by open_tables() calls which happened during this process. This resulted in wrong behavior and in violations of some of invariants which caused crashes. This fix tries to solve this problem by properly saving/resetting and restoring part of LEX which affects and is affected by the process of opening tables and views in get_all_tables() routine. To simplify things we separated this part of LEX in a new class and made LEX its descendant.
ae72df07