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
3a01face
Commit
3a01face
authored
May 02, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
2ffbb801
d0ed411f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
sql/item_func.cc
sql/item_func.cc
+10
-5
sql/udf_example.cc
sql/udf_example.cc
+1
-1
No files found.
mysql-test/t/disabled.def
View file @
3a01face
...
...
@@ -11,4 +11,3 @@
##############################################################################
ndb_load : Bug#17233
udf : Not yet
sql/item_func.cc
View file @
3a01face
...
...
@@ -2734,9 +2734,10 @@ String *udf_handler::val_str(String *str,String *save_str)
{
uchar
is_null_tmp
=
0
;
ulong
res_length
;
DBUG_ENTER
(
"udf_handler::val_str"
);
if
(
get_arguments
())
return
0
;
DBUG_RETURN
(
0
)
;
char
*
(
*
func
)(
UDF_INIT
*
,
UDF_ARGS
*
,
char
*
,
ulong
*
,
uchar
*
,
uchar
*
)
=
(
char
*
(
*
)(
UDF_INIT
*
,
UDF_ARGS
*
,
char
*
,
ulong
*
,
uchar
*
,
uchar
*
))
u_d
->
func
;
...
...
@@ -2746,22 +2747,26 @@ String *udf_handler::val_str(String *str,String *save_str)
if
(
str
->
alloc
(
MAX_FIELD_WIDTH
))
{
error
=
1
;
return
0
;
DBUG_RETURN
(
0
)
;
}
}
char
*
res
=
func
(
&
initid
,
&
f_args
,
(
char
*
)
str
->
ptr
(),
&
res_length
,
&
is_null_tmp
,
&
error
);
DBUG_PRINT
(
"info"
,
(
"udf func returned, res_length: %lu"
,
res_length
));
if
(
is_null_tmp
||
!
res
||
error
)
// The !res is for safety
{
return
0
;
DBUG_PRINT
(
"info"
,
(
"Null or error"
));
DBUG_RETURN
(
0
);
}
if
(
res
==
str
->
ptr
())
{
str
->
length
(
res_length
);
return
str
;
DBUG_PRINT
(
"exit"
,
(
"str: %s"
,
str
->
ptr
()));
DBUG_RETURN
(
str
);
}
save_str
->
set
(
res
,
res_length
,
str
->
charset
());
return
save_str
;
DBUG_PRINT
(
"exit"
,
(
"save_str: %s"
,
save_str
->
ptr
()));
DBUG_RETURN
(
save_str
);
}
...
...
sql/udf_example.cc
View file @
3a01face
...
...
@@ -344,7 +344,7 @@ char *metaphon(UDF_INIT *initid, UDF_ARGS *args, char *result,
KSflag
=
0
;
/* state flag for KS translation */
for
(
metaph_end
=
result
+
MAXMETAPH
,
n_start
=
n
;
n
<
=
n_end
&&
result
<
metaph_end
;
n
++
)
n
<
n_end
&&
result
<
metaph_end
;
n
++
)
{
if
(
KSflag
)
...
...
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