mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Added new optino --sql-mode to mysqld.
This commit is contained in:
@@ -5937,7 +5937,7 @@ setup_group(THD *thd,TABLE_LIST *tables,List<Item> &fields,
|
||||
if (!order)
|
||||
return 0; /* Everything is ok */
|
||||
|
||||
if (thd->options & OPTION_ANSI_MODE)
|
||||
if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY)
|
||||
{
|
||||
Item *item;
|
||||
List_iterator<Item> li(fields);
|
||||
@@ -5959,7 +5959,7 @@ setup_group(THD *thd,TABLE_LIST *tables,List<Item> &fields,
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (thd->options & OPTION_ANSI_MODE)
|
||||
if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY)
|
||||
{
|
||||
/* Don't allow one to use fields that is not used in GROUP BY */
|
||||
Item *item;
|
||||
|
||||
Reference in New Issue
Block a user