Commit 778a1a4a authored by Alexander Barkov's avatar Alexander Barkov Committed by Sergei Golubchik

More test for MDEV-10134 Add full support for DEFAULT

UDF
parent 582ee397
......@@ -445,3 +445,17 @@ DROP FUNCTION myfunc_double;
DROP TABLE t1;
#
End of 5.1 tests.
#
# MDEV-10134 Add full support for DEFAULT
#
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
SELECT METAPHON('Hello');
METAPHON('Hello')
HL
CREATE TABLE t1 (a VARCHAR(10), b VARCHAR(10) DEFAULT METAPHON(a));
INSERT INTO t1 (a) VALUES ('Hello');
SELECT * FROM t1;
a b
Hello HL
DROP FUNCTION METAPHON;
DROP TABLE t1;
......@@ -512,3 +512,18 @@ DROP TABLE t1;
--echo #
--echo End of 5.1 tests.
--echo #
--echo # MDEV-10134 Add full support for DEFAULT
--echo #
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
SELECT METAPHON('Hello');
CREATE TABLE t1 (a VARCHAR(10), b VARCHAR(10) DEFAULT METAPHON(a));
INSERT INTO t1 (a) VALUES ('Hello');
SELECT * FROM t1;
DROP FUNCTION METAPHON;
# QQ: this should return an error
#INSERT INTO t1 (a) VALUES ('Hello');
#SELECT * FROM t1;
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment