2003-05-13 18:26:07 +02:00
|
|
|
#
|
|
|
|
# Test of ansi mode
|
|
|
|
#
|
|
|
|
|
2003-05-21 20:39:58 +02:00
|
|
|
--disable_warnings
|
2003-05-13 18:26:07 +02:00
|
|
|
drop table if exists t1;
|
2003-05-21 20:39:58 +02:00
|
|
|
--enable_warnings
|
2003-05-13 18:26:07 +02:00
|
|
|
|
2003-10-08 17:53:31 +02:00
|
|
|
set sql_mode="MySQL40";
|
|
|
|
select @@sql_mode;
|
|
|
|
set @@sql_mode="ANSI";
|
|
|
|
select @@sql_mode;
|
|
|
|
|
2003-05-13 18:26:07 +02:00
|
|
|
# Test some functions that works different in ansi mode
|
|
|
|
|
|
|
|
SELECT 'A' || 'B';
|
|
|
|
|
|
|
|
# Test GROUP BY behaviour
|
|
|
|
|
|
|
|
CREATE TABLE t1 (id INT, id2 int);
|
|
|
|
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
|
|
|
|
--error 1055
|
|
|
|
SELECT id FROM t1 GROUP BY id2;
|
|
|
|
drop table t1;
|
2003-06-04 17:28:51 +02:00
|
|
|
|
2003-10-08 17:53:31 +02:00
|
|
|
SET @@SQL_MODE="";
|