summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_default.result
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-10-31 11:52:46 +0200
committerunknown <bell@sanja.is.com.ua>2003-10-31 11:52:46 +0200
commited49917e8c9ea60797772ca8db638a3ae8580c3e (patch)
tree1af1657e7b607989a48f2b3518e71ec3e2c0885f /mysql-test/r/func_default.result
parentd6aacb9e22a202ecb65679d7af17174664917a45 (diff)
downloadmariadb-git-ed49917e8c9ea60797772ca8db638a3ae8580c3e.tar.gz
new test
Diffstat (limited to 'mysql-test/r/func_default.result')
-rw-r--r--mysql-test/r/func_default.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/func_default.result b/mysql-test/r/func_default.result
new file mode 100644
index 00000000000..fe3f5b9473a
--- /dev/null
+++ b/mysql-test/r/func_default.result
@@ -0,0 +1,18 @@
+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 Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1
+Warnings:
+Note 1003 select high_priority default(test.t1.str) AS `default(str)`,default(test.t1.strnull) AS `default(strnull)`,default(test.t1.intg) AS `default(intg)`,default(test.t1.rel) AS `default(rel)` from test.t1
+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;