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
9a325ac7
Commit
9a325ac7
authored
Aug 09, 2006
by
andrey@lmy004
Browse files
Options
Browse Files
Download
Plain Diff
Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into lmy004.:/work/mysql-5.1-runtime
parents
e7987636
76ff7fb7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
14 deletions
+67
-14
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+5
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+3
-4
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+18
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+15
-4
sql/sp.cc
sql/sp.cc
+15
-6
sql/sql_yacc.yy
sql/sql_yacc.yy
+11
-0
No files found.
mysql-test/r/sp-error.result
View file @
9a325ac7
...
...
@@ -1181,3 +1181,8 @@ show authors;
return 42;
end|
ERROR 0A000: Not allowed to return a result set from a function
drop function if exists bug20701|
create function bug20701() returns varchar(25) binary return "test"|
ERROR 42000: This version of MySQL doesn't yet support 'return value collation'
create function bug20701() returns varchar(25) return "test"|
drop function bug20701|
mysql-test/r/sp.result
View file @
9a325ac7
...
...
@@ -3625,7 +3625,6 @@ begin
set f1= concat( 'hello', f1 );
return f1;
end|
drop function bug9048|
drop procedure if exists bug12849_1|
create procedure bug12849_1(inout x char) select x into x|
set @var='a'|
...
...
@@ -4074,7 +4073,7 @@ select res;
end|
create table t3 (a int)|
insert into t3 values (0)|
create view v1 as select a from t3
;
create view v1 as select a from t3
|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
...
...
@@ -4095,7 +4094,7 @@ else
select * from v1;
end if;
end|
prepare stmt2 from "select * from t3;"
;
prepare stmt2 from "select * from t3;"
|
create procedure bug10100pd(level int, lim int)
begin
if level < lim then
...
...
@@ -4465,7 +4464,7 @@ Error 1347 'test.v1' is not BASE TABLE
Error 1347 'test.v1' is not BASE TABLE
Error 1347 'test.v1' is not BASE TABLE
drop procedure bug13012|
drop view v1
;
drop view v1
|
select * from t1 order by data|
id data
aa 0
...
...
mysql-test/t/sp-error.test
View file @
9a325ac7
...
...
@@ -1728,10 +1728,28 @@ begin
return
42
;
end
|
#
# BUG#20701: BINARY keyword should be forbidden in stored routines
#
--
disable_warnings
drop
function
if
exists
bug20701
|
--
enable_warnings
#
# This was disabled in 5.1.12. See bug #20701
# When collation support in SP is implemented, then this test should
# be removed.
#
--
error
ER_NOT_SUPPORTED_YET
create
function
bug20701
()
returns
varchar
(
25
)
binary
return
"test"
|
create
function
bug20701
()
returns
varchar
(
25
)
return
"test"
|
drop
function
bug20701
|
#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
#drop procedure if exists bugNNNN|
#drop function if exists bugNNNN|
#--enable_warnings
#create procedure bugNNNN...
#create function bugNNNN...
mysql-test/t/sp.test
View file @
9a325ac7
...
...
@@ -4381,12 +4381,23 @@ drop table t3|
--disable_warnings
drop function if exists bug9048|
--enable_warnings
create function bug9048(f1 char binary) returns char
binary
create function bug9048(f1 char binary) returns char
begin
set f1= concat( 'hello', f1 );
return f1;
end|
drop function bug9048|
#
# This was disabled in 5.1.12. See bug #20701
# When collation support in SP is implemented, then this test should
# be removed.
#
--error ER_NOT_SUPPORTED_YET
create function bug9048(f1 char binary) returns char binary
begin
set f1= concat( 'hello', f1 );
return f1;
end|
# Bug #12849 Stored Procedure: Crash on procedure call with CHAR type
# 'INOUT' parameter
...
...
@@ -4940,7 +4951,7 @@ end|
# a procedure which use tables and recursion
create
table
t3
(
a
int
)
|
insert
into
t3
values
(
0
)
|
create
view
v1
as
select
a
from
t3
;
create
view
v1
as
select
a
from
t3
|
create
procedure
bug10100pt
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
...
...
@@ -4963,7 +4974,7 @@ begin
end
if
;
end
|
# dynamic sql & recursion
prepare
stmt2
from
"select * from t3;"
;
prepare
stmt2
from
"select * from t3;"
|
create
procedure
bug10100pd
(
level
int
,
lim
int
)
begin
if
level
<
lim
then
...
...
@@ -5258,7 +5269,7 @@ call bug13012()|
call
bug13012
()
|
call
bug13012
()
|
drop
procedure
bug13012
|
drop
view
v1
;
drop
view
v1
|
select
*
from
t1
order
by
data
|
#
...
...
sql/sp.cc
View file @
9a325ac7
...
...
@@ -992,6 +992,12 @@ sp_find_routine(THD *thd, int type, sp_name *name, sp_cache **cp,
}
DBUG_RETURN
(
sp
->
m_first_free_instance
);
}
/*
Actually depth could be +1 than the actual value in case a SP calls
SHOW CREATE PROCEDURE. Hence, the linked list could hold up to one more
instance.
*/
level
=
sp
->
m_last_cached_sp
->
m_recursion_level
+
1
;
if
(
level
>
depth
)
{
...
...
@@ -1161,19 +1167,22 @@ sp_update_procedure(THD *thd, sp_name *name, st_sp_chistics *chistics)
int
sp_show_create_procedure
(
THD
*
thd
,
sp_name
*
name
)
{
int
ret
=
SP_KEY_NOT_FOUND
;
sp_head
*
sp
;
DBUG_ENTER
(
"sp_show_create_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %.*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
/*
Increase the recursion limit for this statement. SHOW CREATE PROCEDURE
does not do actual recursion.
*/
thd
->
variables
.
max_sp_recursion_depth
++
;
if
((
sp
=
sp_find_routine
(
thd
,
TYPE_ENUM_PROCEDURE
,
name
,
&
thd
->
sp_proc_cache
,
FALSE
)))
{
int
ret
=
sp
->
show_create_procedure
(
thd
);
ret
=
sp
->
show_create_procedure
(
thd
);
DBUG_RETURN
(
ret
);
}
DBUG_RETURN
(
SP_KEY_NOT_FOUND
);
thd
->
variables
.
max_sp_recursion_depth
--
;
DBUG_RETURN
(
ret
);
}
...
...
sql/sql_yacc.yy
View file @
9a325ac7
...
...
@@ -1672,6 +1672,17 @@ create_function_tail:
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
/*
This was disabled in 5.1.12. See bug #20701
When collation support in SP is implemented, then this test
should be removed.
*/
if (($8 == FIELD_TYPE_STRING || $8 == MYSQL_TYPE_VARCHAR)
&& (lex->type & BINCMP_FLAG))
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "return value collation");
YYABORT;
}
if (sp->fill_field_definition(YYTHD, lex,
(enum enum_field_types) $8,
...
...
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