summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_default.test
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/t/func_default.test
parentd6aacb9e22a202ecb65679d7af17174664917a45 (diff)
downloadmariadb-git-ed49917e8c9ea60797772ca8db638a3ae8580c3e.tar.gz
new test
Diffstat (limited to 'mysql-test/t/func_default.test')
-rw-r--r--mysql-test/t/func_default.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/func_default.test b/mysql-test/t/func_default.test
new file mode 100644
index 00000000000..6ae9f088f92
--- /dev/null
+++ b/mysql-test/t/func_default.test
@@ -0,0 +1,19 @@
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+
+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;
+explain extended select default(str), default(strnull), default(intg), default(rel) from t1;
+select * from t1 where str <> default(str);
+explain select * from t1 where str <> default(str);
+
+#TODO: uncomment when bug will be fixed
+#create table t2 select default(str), default(strnull), default(intg), default(rel) from t1;
+#show create table from t1;
+#insert into t2 select select default(str), default(strnull), default(intg), default(rel) from t1;
+
+drop table t1; \ No newline at end of file