1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

More test for MDEV-10134 Add full support for DEFAULT

UDF
This commit is contained in:
Alexander Barkov
2016-06-09 16:42:49 +04:00
committed by Sergei Golubchik
parent 582ee3973e
commit 778a1a4aac
2 changed files with 29 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;