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
a9c6ed46
Commit
a9c6ed46
authored
Oct 16, 2007
by
malff@lambda.hsd1.co.comcast.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing code review comments
parent
99a270ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+15
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+29
-0
sql/sql_udf.cc
sql/sql_udf.cc
+2
-2
No files found.
mysql-test/r/sp.result
View file @
a9c6ed46
...
@@ -6563,6 +6563,21 @@ f1()
...
@@ -6563,6 +6563,21 @@ f1()
DROP TABLE t1;
DROP TABLE t1;
DROP FUNCTION f1;
DROP FUNCTION f1;
DROP PROCEDURE IF EXISTS db28318_a.t1;
DROP PROCEDURE IF EXISTS db28318_b.t2;
DROP DATABASE IF EXISTS db28318_a;
DROP DATABASE IF EXISTS db28318_b;
CREATE DATABASE db28318_a;
CREATE DATABASE db28318_b;
CREATE PROCEDURE db28318_a.t1() SELECT "db28318_a.t1";
CREATE PROCEDURE db28318_b.t2() CALL t1();
use db28318_a;
CALL db28318_b.t2();
ERROR 42000: PROCEDURE db28318_b.t1 does not exist
DROP PROCEDURE db28318_a.t1;
DROP PROCEDURE db28318_b.t2;
DROP DATABASE db28318_a;
DROP DATABASE db28318_b;
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# -- End of 5.0 tests
# -- End of 5.0 tests
# ------------------------------------------------------------------
# ------------------------------------------------------------------
mysql-test/t/sp.test
View file @
a9c6ed46
...
@@ -7671,6 +7671,35 @@ DROP FUNCTION f1;
...
@@ -7671,6 +7671,35 @@ DROP FUNCTION f1;
###########################################################################
###########################################################################
#
# Bug#28318 (CREATE FUNCTION (UDF) requires a schema)
#
--
disable_warnings
DROP
PROCEDURE
IF
EXISTS
db28318_a
.
t1
;
DROP
PROCEDURE
IF
EXISTS
db28318_b
.
t2
;
DROP
DATABASE
IF
EXISTS
db28318_a
;
DROP
DATABASE
IF
EXISTS
db28318_b
;
--
enable_warnings
CREATE
DATABASE
db28318_a
;
CREATE
DATABASE
db28318_b
;
CREATE
PROCEDURE
db28318_a
.
t1
()
SELECT
"db28318_a.t1"
;
CREATE
PROCEDURE
db28318_b
.
t2
()
CALL
t1
();
use
db28318_a
;
# In db28318_b.t2, t1 refers to db28318_b.t1
--
error
ER_SP_DOES_NOT_EXIST
CALL
db28318_b
.
t2
();
DROP
PROCEDURE
db28318_a
.
t1
;
DROP
PROCEDURE
db28318_b
.
t2
;
DROP
DATABASE
db28318_a
;
DROP
DATABASE
db28318_b
;
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
--
echo
# -- End of 5.0 tests
--
echo
# -- End of 5.0 tests
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
sql/sql_udf.cc
View file @
a9c6ed46
...
@@ -426,14 +426,14 @@ int mysql_create_function(THD *thd,udf_func *udf)
...
@@ -426,14 +426,14 @@ int mysql_create_function(THD *thd,udf_func *udf)
}
}
if
(
udf
->
name
.
length
>
NAME_LEN
)
if
(
udf
->
name
.
length
>
NAME_LEN
)
{
{
my_error
(
ER_TOO_LONG_IDENT
,
MYF
(
0
),
udf
->
name
);
my_error
(
ER_TOO_LONG_IDENT
,
MYF
(
0
),
udf
->
name
.
str
);
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
rw_wrlock
(
&
THR_LOCK_udf
);
rw_wrlock
(
&
THR_LOCK_udf
);
if
((
hash_search
(
&
udf_hash
,(
byte
*
)
udf
->
name
.
str
,
udf
->
name
.
length
)))
if
((
hash_search
(
&
udf_hash
,(
byte
*
)
udf
->
name
.
str
,
udf
->
name
.
length
)))
{
{
my_error
(
ER_UDF_EXISTS
,
MYF
(
0
),
udf
->
name
);
my_error
(
ER_UDF_EXISTS
,
MYF
(
0
),
udf
->
name
.
str
);
goto
err
;
goto
err
;
}
}
if
(
!
(
dl
=
find_udf_dl
(
udf
->
dl
)))
if
(
!
(
dl
=
find_udf_dl
(
udf
->
dl
)))
...
...
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