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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ecb5e92a
Commit
ecb5e92a
authored
Dec 21, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
parents
a13fa8f6
acf0636e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/r/udf.result
mysql-test/r/udf.result
+11
-0
mysql-test/t/udf.test
mysql-test/t/udf.test
+17
-0
sql/sql_udf.cc
sql/sql_udf.cc
+1
-1
No files found.
mysql-test/r/udf.result
View file @
ecb5e92a
...
...
@@ -194,6 +194,17 @@ DROP FUNCTION sequence;
DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
DROP FUNCTION avgcost;
select * from mysql.func;
name ret dl type
CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
select IS_const(3);
IS_const(3)
const
drop function IS_const;
select * from mysql.func;
name ret dl type
select is_const(3);
ERROR 42000: FUNCTION test.is_const does not exist
CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
select
is_const(3) as const,
...
...
mysql-test/t/udf.test
View file @
ecb5e92a
...
...
@@ -187,6 +187,23 @@ DROP FUNCTION lookup;
DROP
FUNCTION
reverse_lookup
;
DROP
FUNCTION
avgcost
;
#
# Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
# the UDF
#
select
*
from
mysql
.
func
;
--
replace_result
$UDF_EXAMPLE_LIB
UDF_EXAMPLE_LIB
eval
CREATE
FUNCTION
is_const
RETURNS
STRING
SONAME
"
$UDF_EXAMPLE_LIB
"
;
select
IS_const
(
3
);
drop
function
IS_const
;
select
*
from
mysql
.
func
;
--
error
1305
select
is_const
(
3
);
#
# Bug#18761: constant expression as UDF parameters not passed in as constant
#
...
...
sql/sql_udf.cc
View file @
ecb5e92a
...
...
@@ -536,7 +536,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
tables
.
table_name
=
tables
.
alias
=
(
char
*
)
"func"
;
if
(
!
(
table
=
open_ltable
(
thd
,
&
tables
,
TL_WRITE
)))
goto
err
;
table
->
field
[
0
]
->
store
(
udf
_name
->
str
,
udf_name
->
length
,
system_charset_info
);
table
->
field
[
0
]
->
store
(
udf
->
name
.
str
,
udf
->
name
.
length
,
&
my_charset_bin
);
table
->
file
->
extra
(
HA_EXTRA_RETRIEVE_ALL_COLS
);
if
(
!
table
->
file
->
index_read_idx
(
table
->
record
[
0
],
0
,
(
byte
*
)
table
->
field
[
0
]
->
ptr
,
...
...
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