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
3f4c176c
Commit
3f4c176c
authored
Feb 13, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into mysql.com:/extern/mysql/5.0/bug16896/mysql-5.0
parents
4794ec97
23440922
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
0 deletions
+36
-0
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+3
-0
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+12
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+10
-0
sql/udf_example.cc
sql/udf_example.cc
+9
-0
No files found.
mysql-test/r/sp-error.result
View file @
3f4c176c
...
...
@@ -1176,3 +1176,6 @@ end|
call bug15091();
ERROR 42S02: Unknown table 'c' in field list
drop procedure bug15091;
drop function if exists bug16896;
create aggregate function bug16896() returns int return 1;
ERROR 42000: AGGREGATE is not supported for stored functions
mysql-test/t/sp-error.test
View file @
3f4c176c
...
...
@@ -1703,6 +1703,17 @@ call bug15091();
drop
procedure
bug15091
;
#
# BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION
#
--
disable_warnings
drop
function
if
exists
bug16896
;
--
enable_warnings
--
error
ER_SP_NO_AGGREGATE
create
aggregate
function
bug16896
()
returns
int
return
1
;
#
# BUG#NNNN: New bug synopsis
#
...
...
@@ -1710,3 +1721,4 @@ drop procedure bug15091;
#drop procedure if exists bugNNNN|
#--enable_warnings
#create procedure bugNNNN...
sql/share/errmsg.txt
View file @
3f4c176c
...
...
@@ -5607,3 +5607,5 @@ ER_SP_PROC_TABLE_CORRUPT
eng "Failed to load routine %s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
ER_SP_WRONG_NAME 42000
eng "Incorrect routine name '%-.64s'"
ER_SP_NO_AGGREGATE 42000
eng "AGGREGATE is not supported for stored functions"
sql/sql_yacc.yy
View file @
3f4c176c
...
...
@@ -1326,6 +1326,16 @@ create_function_tail:
LEX *lex= Lex;
sp_head *sp;
/*
First check if AGGREGATE was used, in that case it's a
syntax error.
*/
if (lex->udf.type == UDFTYPE_AGGREGATE)
{
my_error(ER_SP_NO_AGGREGATE, MYF(0));
YYABORT;
}
if (lex->sphead)
{
my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "FUNCTION");
...
...
sql/udf_example.cc
View file @
3f4c176c
...
...
@@ -144,6 +144,7 @@ char *metaphon(UDF_INIT *initid, UDF_ARGS *args, char *result,
my_bool
myfunc_double_init
(
UDF_INIT
*
,
UDF_ARGS
*
args
,
char
*
message
);
double
myfunc_double
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
is_null
,
char
*
error
);
my_bool
myfunc_int_init
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
message
);
longlong
myfunc_int
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
is_null
,
char
*
error
);
my_bool
sequence_init
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
message
);
...
...
@@ -597,6 +598,14 @@ longlong myfunc_int(UDF_INIT *initid, UDF_ARGS *args, char *is_null,
return
val
;
}
/*
At least one of _init/_deinit is needed unless the server is started
with --allow_suspicious_udfs.
*/
my_bool
myfunc_int_init
(
UDF_INIT
*
initid
,
UDF_ARGS
*
args
,
char
*
message
)
{
return
0
;
}
/*
Simple example of how to get a sequences starting from the first argument
...
...
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