-
unknown authored
The columns in HAVING can reference the GROUP BY and SELECT columns. There can be "table" prefixes when referencing these columns. And these "table" prefixes in HAVING use the table alias if available. This means that table aliases are subject to the same storage rules as table names and are dependent on lower_case_table_names in the same way as the table names are. Fixed by : 1. Treating table aliases as table names and make them lowercase when printing out the SQL statement for view persistence. 2. Using case insensitive comparison for table aliases when requested by lower_case_table_names mysql-test/r/lowercase_view.result: Bug #31562: test case mysql-test/t/lowercase_view.test: Bug #31562: test case sql/item.cc: Bug #31562: lower_case_table_name contious comparison when searching in GROUP BY sql/sql_base.cc: Bug #31562: lower_case_table_name contious comparison when searching in SELECT sql/sql_select.cc: Bug #31562: treat table aliases as table names and make them lowercase when printing
170ae2d2