diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/ansi.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/ansi.test')
-rw-r--r-- | mysql-test/main/ansi.test | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/main/ansi.test b/mysql-test/main/ansi.test new file mode 100644 index 00000000000..fa7f999954e --- /dev/null +++ b/mysql-test/main/ansi.test @@ -0,0 +1,41 @@ +# +# Test of ansi mode +# + +--disable_warnings +drop table if exists t1; +--enable_warnings + +set sql_mode="MySQL40"; +select @@sql_mode; +set @@sql_mode="ANSI"; +select @@sql_mode; + +# 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; +#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; + +SET @@SQL_MODE=""; + +# Bug#14515 + +CREATE TABLE t1 (i int auto_increment NOT NULL, PRIMARY KEY (i)); +SHOW CREATE TABLE t1; +SET @@SQL_MODE="MYSQL323"; +SHOW CREATE TABLE t1; +SET @@SQL_MODE="MYSQL40"; +SHOW CREATE TABLE t1; +SET @@SQL_MODE="NO_FIELD_OPTIONS"; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# End of 4.1 tests |