Commit c0828488 authored by unknown's avatar unknown

A "fix" for problem discovered in BUG#8510: remove ONLY_FULL_GROUP_BY mode...

A "fix" for problem discovered in BUG#8510: remove ONLY_FULL_GROUP_BY mode from ANSI mode, as currently
ONLY_FULL_GROUP_BY mode is overly restrictive.


mysql-test/r/ansi.result:
  A "fix" for problem discovered in BUG#8510: remove ONLY_FULL_GROUP_BY mode from ANSI mode.
mysql-test/t/ansi.test:
  A "fix" for problem discovered in BUG#8510: remove ONLY_FULL_GROUP_BY mode from ANSI mode.
sql/set_var.cc:
  A "fix" for problem discovered in BUG#8510: remove ONLY_FULL_GROUP_BY mode from ANSI mode.
parent 968e06a8
......@@ -6,7 +6,7 @@ NO_FIELD_OPTIONS,MYSQL40
set @@sql_mode="ANSI";
select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
SELECT 'A' || 'B';
'A' || 'B'
AB
......@@ -14,6 +14,6 @@ CREATE TABLE t1 (id INT, id2 int);
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
id NULL 1 1.1 a
SELECT id FROM t1 GROUP BY id2;
ERROR 42000: 'test.t1.id' isn't in GROUP BY
id
drop table t1;
SET @@SQL_MODE="";
......@@ -19,7 +19,8 @@ SELECT 'A' || 'B';
CREATE TABLE t1 (id INT, id2 int);
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
--error 1055
#No --error 1055 error due to temporary fix for BUG#8510:
#ONLY_FULL_GROUP_BY is overly restrictive, so remove it from ANSI mode.
SELECT id FROM t1 GROUP BY id2;
drop table t1;
......
......@@ -3089,8 +3089,14 @@ ulong fix_sql_mode(ulong sql_mode)
*/
if (sql_mode & MODE_ANSI)
{
sql_mode|= (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
MODE_IGNORE_SPACE | MODE_ONLY_FULL_GROUP_BY);
MODE_IGNORE_SPACE);
/*
MODE_ONLY_FULL_GROUP_BY removed from ANSI mode because it is currently
overly restrictive (see BUG#8510).
*/
}
if (sql_mode & MODE_ORACLE)
sql_mode|= (MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
MODE_IGNORE_SPACE |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment