summaryrefslogtreecommitdiff
path: root/mysql-test/t/ansi.test
blob: f4aef5c3f8e3e9f2bddd25b5e939cccd1cb00df8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# Test of ansi mode
#

--disable_warnings
drop table if exists t1;
--enable_warnings

# 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;

set sql_mode="MySQL40";
select @@sql_mode;
set sql_mode="ANSI";
select @@sql_mode;