Commit c6225d95 authored by unknown's avatar unknown

Merge mysql.com:/home/psergey/mysql-4.1-bug8510

into mysql.com:/home/psergey/mysql-5.0-bug8510


mysql-test/r/ansi.result:
  Auto merged
sql/set_var.cc:
  Auto merged
parents 97816c1f 76caf793
......@@ -6,7 +6,7 @@ NO_FIELD_OPTIONS,MYSQL40,HIGH_NOT_PRECEDENCE
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;
......
......@@ -3282,8 +3282,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