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/r/func_default.result | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/r/func_default.result')
-rw-r--r-- | mysql-test/r/func_default.result | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/mysql-test/r/func_default.result b/mysql-test/r/func_default.result deleted file mode 100644 index 535be10da86..00000000000 --- a/mysql-test/r/func_default.result +++ /dev/null @@ -1,34 +0,0 @@ -drop table if exists t1,t2; -create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14'); -insert into t1 values ('','',0,0.0); -select default(str), default(strnull), default(intg), default(rel) from t1; -default(str) default(strnull) default(intg) default(rel) -def NULL 10 3.14 -explain extended select default(str), default(strnull), default(intg), default(rel) from t1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 -Warnings: -Note 1003 select default('') AS `default(str)`,default('') AS `default(strnull)`,default(0) AS `default(intg)`,default(0) AS `default(rel)` from dual -select * from t1 where str <> default(str); -str strnull intg rel - 0 0 -explain select * from t1 where str <> default(str); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 -drop table t1; -CREATE TABLE t1 (id int(11), s varchar(20)); -INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); -SELECT s, 32 AS mi FROM t1 GROUP BY s HAVING DEFAULT(mi) IS NULL; -ERROR HY000: Field 'mi' doesn't have a default value -DROP TABLE t1; -set timestamp=unix_timestamp('2001-01-01 10:20:30.123456'); -create table t1 (a int default 1, b int default (a+1), -c varchar(100) default 'foo', d text default 'bar', -e timestamp default now(), f timestamp(6) default now(2)); -insert t1 () values (); -insert t1 (a) values (10); -select default(a),default(b),default(c),default(d),default(e),default(f) from t1; -default(a) default(b) default(c) default(d) default(e) default(f) -1 2 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000 -1 11 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000 -drop table t1; |