Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
778a1a4a
Commit
778a1a4a
authored
Jun 09, 2016
by
Alexander Barkov
Committed by
Sergei Golubchik
Jun 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More test for MDEV-10134 Add full support for DEFAULT
UDF
parent
582ee397
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/r/udf.result
mysql-test/r/udf.result
+14
-0
mysql-test/t/udf.test
mysql-test/t/udf.test
+15
-0
No files found.
mysql-test/r/udf.result
View file @
778a1a4a
...
...
@@ -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;
mysql-test/t/udf.test
View file @
778a1a4a
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment