Commit 54baac55 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 897849e5 155cfb39
...@@ -6,7 +6,7 @@ NO_FIELD_OPTIONS,MYSQL40,HIGH_NOT_PRECEDENCE ...@@ -6,7 +6,7 @@ NO_FIELD_OPTIONS,MYSQL40,HIGH_NOT_PRECEDENCE
set @@sql_mode="ANSI"; set @@sql_mode="ANSI";
select @@sql_mode; select @@sql_mode;
@@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'; SELECT 'A' || 'B';
'A' || 'B' 'A' || 'B'
AB AB
...@@ -14,6 +14,6 @@ CREATE TABLE t1 (id INT, id2 int); ...@@ -14,6 +14,6 @@ CREATE TABLE t1 (id INT, id2 int);
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id; SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
id NULL 1 1.1 a id NULL 1 1.1 a
SELECT id FROM t1 GROUP BY id2; SELECT id FROM t1 GROUP BY id2;
ERROR 42000: 'test.t1.id' isn't in GROUP BY id
drop table t1; drop table t1;
SET @@SQL_MODE=""; SET @@SQL_MODE="";
...@@ -19,7 +19,8 @@ SELECT 'A' || 'B'; ...@@ -19,7 +19,8 @@ SELECT 'A' || 'B';
CREATE TABLE t1 (id INT, id2 int); CREATE TABLE t1 (id INT, id2 int);
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id; 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; SELECT id FROM t1 GROUP BY id2;
drop table t1; drop table t1;
......
...@@ -3282,8 +3282,14 @@ ulong fix_sql_mode(ulong sql_mode) ...@@ -3282,8 +3282,14 @@ ulong fix_sql_mode(ulong sql_mode)
*/ */
if (sql_mode & MODE_ANSI) if (sql_mode & MODE_ANSI)
{
sql_mode|= (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES | 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) if (sql_mode & MODE_ORACLE)
sql_mode|= (MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES | sql_mode|= (MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
MODE_IGNORE_SPACE | 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