[Commits] 68929287c4a: more tests
revision-id: 68929287c4a3fe063fe25cb69bed5b97db904f04 (mariadb-10.2.18-67-g68929287c4a) parent(s): ba3e46ebe7ea2221026bf5ad52e2260d21d5e811 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2018-11-07 14:28:08 +0100 message: more tests --- mysql-test/r/func_default.result | 8 ++++++++ mysql-test/t/func_default.test | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/mysql-test/r/func_default.result b/mysql-test/r/func_default.result index 3927c387680..9699f0795e3 100644 --- a/mysql-test/r/func_default.result +++ b/mysql-test/r/func_default.result @@ -15,6 +15,14 @@ str strnull intg rel 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 +create view v1 as select default(str), default(strnull), default(intg), default(rel) from t1; +select * from v1; +default(str) default(strnull) default(intg) default(rel) +def NULL 10 3.14 +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select default(`t1`.`str`) AS `default(str)`,default(`t1`.`strnull`) AS `default(strnull)`,default(`t1`.`intg`) AS `default(intg)`,default(`t1`.`rel`) AS `default(rel)` from `t1` latin1 latin1_swedish_ci +drop view v1; drop table t1; CREATE TABLE t1 (id int(11), s varchar(20)); INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); diff --git a/mysql-test/t/func_default.test b/mysql-test/t/func_default.test index fbd73990297..332bfca021f 100644 --- a/mysql-test/t/func_default.test +++ b/mysql-test/t/func_default.test @@ -11,6 +11,11 @@ explain extended select default(str), default(strnull), default(intg), default(r select * from t1 where str <> default(str); explain select * from t1 where str <> default(str); +create view v1 as select default(str), default(strnull), default(intg), default(rel) from t1; +select * from v1; +show create view v1; +drop view v1; + #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;
participants (1)
-
Oleksandr Byelkin