mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
WL#1972 "Evaluate HAVING before SELECT select-list"
- Changed name resolution for GROUP BY so that derived columns do not shadow table columns from the FROM clause. As a result GROUP BY now is handled as a true ANSI extentsion. - Issue a warning when HAVING is resolved into ambiguous columns, and prefer the columns from the GROUP BY clause over SELECT columns.
This commit is contained in:
@@ -88,7 +88,7 @@ static bool init_fields(THD *thd, TABLE_LIST *tables,
|
||||
Item_field *field= new Item_field("mysql", find_fields->table_name,
|
||||
find_fields->field_name);
|
||||
if (!(find_fields->field= find_field_in_tables(thd, field, tables,
|
||||
0, TRUE, 1)))
|
||||
0, REPORT_ALL_ERRORS, 1)))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
|
||||
Reference in New Issue
Block a user