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
0e6f9484
Commit
0e6f9484
authored
Mar 10, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test results for udf
Remove STANDARD define when compile udf_example.so
parent
31804060
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
mysql-test/r/udf.result
mysql-test/r/udf.result
+8
-7
mysql-test/t/udf.test
mysql-test/t/udf.test
+9
-3
sql/Makefile.am
sql/Makefile.am
+0
-1
No files found.
mysql-test/r/udf.result
View file @
0e6f9484
drop table if exists t1;
drop table if exists t1;
CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so';
ERROR HY000: Can't find function 'myfunc_nonexist' in library
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
ERROR HY000: Can't find function 'myfunc_int_init' in library
CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
CREATE FUNCTION reverse_lookup
CREATE FUNCTION reverse_lookup
...
@@ -17,8 +18,11 @@ myfunc_double(1)
...
@@ -17,8 +18,11 @@ myfunc_double(1)
select myfunc_double(78654);
select myfunc_double(78654);
myfunc_double(78654)
myfunc_double(78654)
54.00
54.00
select myfunc_nonexist();
ERROR 42000: FUNCTION test.myfunc_nonexist does not exist
select myfunc_int();
select myfunc_int();
ERROR 42000: FUNCTION test.myfunc_int does not exist
myfunc_int()
0
select lookup();
select lookup();
ERROR HY000: Wrong arguments to lookup; Use the source
ERROR HY000: Wrong arguments to lookup; Use the source
select lookup("127.0.0.1");
select lookup("127.0.0.1");
...
@@ -32,11 +36,7 @@ lookup("localhost")
...
@@ -32,11 +36,7 @@ lookup("localhost")
select reverse_lookup();
select reverse_lookup();
ERROR HY000: Wrong number of arguments to reverse_lookup; Use the source
ERROR HY000: Wrong number of arguments to reverse_lookup; Use the source
select reverse_lookup("127.0.0.1");
select reverse_lookup("127.0.0.1");
reverse_lookup("127.0.0.1")
localhost
select reverse_lookup(127,0,0,1);
select reverse_lookup(127,0,0,1);
reverse_lookup(127,0,0,1)
localhost
select reverse_lookup("localhost");
select reverse_lookup("localhost");
reverse_lookup("localhost")
reverse_lookup("localhost")
NULL
NULL
...
@@ -78,8 +78,9 @@ HL
...
@@ -78,8 +78,9 @@ HL
drop procedure xxx2;
drop procedure xxx2;
DROP FUNCTION metaphon;
DROP FUNCTION metaphon;
DROP FUNCTION myfunc_double;
DROP FUNCTION myfunc_double;
DROP FUNCTION myfunc_nonexist;
ERROR 42000: FUNCTION test.myfunc_nonexist does not exist
DROP FUNCTION myfunc_int;
DROP FUNCTION myfunc_int;
ERROR 42000: FUNCTION test.myfunc_int does not exist
DROP FUNCTION sequence;
DROP FUNCTION sequence;
DROP FUNCTION lookup;
DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
DROP FUNCTION reverse_lookup;
...
...
mysql-test/t/udf.test
View file @
0e6f9484
...
@@ -17,9 +17,8 @@ drop table if exists t1;
...
@@ -17,9 +17,8 @@ drop table if exists t1;
CREATE
FUNCTION
metaphon
RETURNS
STRING
SONAME
'udf_example.so'
;
CREATE
FUNCTION
metaphon
RETURNS
STRING
SONAME
'udf_example.so'
;
CREATE
FUNCTION
myfunc_double
RETURNS
REAL
SONAME
'udf_example.so'
;
CREATE
FUNCTION
myfunc_double
RETURNS
REAL
SONAME
'udf_example.so'
;
# myfunc_int does not have a myfunc_int_init function and can
# not be loaded unless server is started with --allow-suspicious-udfs
--
error
ER_CANT_FIND_DL_ENTRY
--
error
ER_CANT_FIND_DL_ENTRY
CREATE
FUNCTION
myfunc_nonexist
RETURNS
INTEGER
SONAME
'udf_example.so'
;
CREATE
FUNCTION
myfunc_int
RETURNS
INTEGER
SONAME
'udf_example.so'
;
CREATE
FUNCTION
myfunc_int
RETURNS
INTEGER
SONAME
'udf_example.so'
;
CREATE
FUNCTION
sequence
RETURNS
INTEGER
SONAME
"udf_example.so"
;
CREATE
FUNCTION
sequence
RETURNS
INTEGER
SONAME
"udf_example.so"
;
CREATE
FUNCTION
lookup
RETURNS
STRING
SONAME
'udf_example.so'
;
CREATE
FUNCTION
lookup
RETURNS
STRING
SONAME
'udf_example.so'
;
...
@@ -33,6 +32,7 @@ select myfunc_double();
...
@@ -33,6 +32,7 @@ select myfunc_double();
select
myfunc_double
(
1
);
select
myfunc_double
(
1
);
select
myfunc_double
(
78654
);
select
myfunc_double
(
78654
);
--
error
1305
--
error
1305
select
myfunc_nonexist
();
select
myfunc_int
();
select
myfunc_int
();
--
error
0
--
error
0
select
lookup
();
select
lookup
();
...
@@ -42,9 +42,14 @@ select lookup(127,0,0,1);
...
@@ -42,9 +42,14 @@ select lookup(127,0,0,1);
select
lookup
(
"localhost"
);
select
lookup
(
"localhost"
);
--
error
0
--
error
0
select
reverse_lookup
();
select
reverse_lookup
();
# These two functions should return "localhost", but it's
# depending on configuration, so just call them and don't log the result
--
disable_result_log
select
reverse_lookup
(
"127.0.0.1"
);
select
reverse_lookup
(
"127.0.0.1"
);
--
error
0
select
reverse_lookup
(
127
,
0
,
0
,
1
);
select
reverse_lookup
(
127
,
0
,
0
,
1
);
--
enable_result_log
select
reverse_lookup
(
"localhost"
);
select
reverse_lookup
(
"localhost"
);
--
error
0
--
error
0
select
avgcost
();
select
avgcost
();
...
@@ -94,6 +99,7 @@ drop procedure xxx2;
...
@@ -94,6 +99,7 @@ drop procedure xxx2;
DROP
FUNCTION
metaphon
;
DROP
FUNCTION
metaphon
;
DROP
FUNCTION
myfunc_double
;
DROP
FUNCTION
myfunc_double
;
--
error
ER_SP_DOES_NOT_EXIST
--
error
ER_SP_DOES_NOT_EXIST
DROP
FUNCTION
myfunc_nonexist
;
DROP
FUNCTION
myfunc_int
;
DROP
FUNCTION
myfunc_int
;
DROP
FUNCTION
sequence
;
DROP
FUNCTION
sequence
;
DROP
FUNCTION
lookup
;
DROP
FUNCTION
lookup
;
...
...
sql/Makefile.am
View file @
0e6f9484
...
@@ -156,7 +156,6 @@ lex_hash.h: gen_lex_hash$(EXEEXT)
...
@@ -156,7 +156,6 @@ lex_hash.h: gen_lex_hash$(EXEEXT)
# For testing of udf_example.so
# For testing of udf_example.so
noinst_LTLIBRARIES
=
udf_example.la
noinst_LTLIBRARIES
=
udf_example.la
udf_example_la_SOURCES
=
udf_example.cc
udf_example_la_SOURCES
=
udf_example.cc
udf_example_la_CXXFLAGS
=
-DSTANDARD
udf_example_la_LDFLAGS
=
-module
-rpath
$(pkglibdir)
udf_example_la_LDFLAGS
=
-module
-rpath
$(pkglibdir)
...
...
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