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
b607fdb0
Commit
b607fdb0
authored
Nov 11, 2005
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/bug14723/mysql-5.0
parents
13260ea8
7d134961
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
11 deletions
+77
-11
mysql-test/r/sp.result
mysql-test/r/sp.result
+31
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+32
-0
sql/sp_head.cc
sql/sp_head.cc
+14
-11
No files found.
mysql-test/r/sp.result
View file @
b607fdb0
...
@@ -3617,4 +3617,35 @@ count(*)
...
@@ -3617,4 +3617,35 @@ count(*)
drop table t3, t4|
drop table t3, t4|
drop procedure bug14210|
drop procedure bug14210|
set @@session.max_heap_table_size=default|
set @@session.max_heap_table_size=default|
drop function if exists bug14723|
drop procedure if exists bug14723|
/*!50003 create function bug14723()
returns bigint(20)
main_loop: begin
return 42;
end */;;
show create function bug14723;;
Function sql_mode Create Function
bug14723 CREATE FUNCTION `bug14723`() RETURNS bigint(20)
main_loop: begin
return 42;
end
select bug14723();;
bug14723()
42
/*!50003 create procedure bug14723()
main_loop: begin
select 42;
end */;;
show create procedure bug14723;;
Procedure sql_mode Create Procedure
bug14723 CREATE PROCEDURE `bug14723`()
main_loop: begin
select 42;
end
call bug14723();;
42
42
drop function bug14723|
drop procedure bug14723|
drop table t1,t2;
drop table t1,t2;
mysql-test/t/sp.test
View file @
b607fdb0
...
@@ -4541,6 +4541,38 @@ drop table t3, t4|
...
@@ -4541,6 +4541,38 @@ drop table t3, t4|
drop
procedure
bug14210
|
drop
procedure
bug14210
|
set
@@
session
.
max_heap_table_size
=
default
|
set
@@
session
.
max_heap_table_size
=
default
|
#
# BUG#1473: Dumping of stored functions seems to cause corruption in
# the function body
#
--
disable_warnings
drop
function
if
exists
bug14723
|
drop
procedure
if
exists
bug14723
|
--
enable_warnings
delimiter
;;
|
/*!50003 create function bug14723()
returns bigint(20)
main_loop: begin
return 42;
end */
;;
show
create
function
bug14723
;;
select
bug14723
();;
/*!50003 create procedure bug14723()
main_loop: begin
select 42;
end */
;;
show
create
procedure
bug14723
;;
call
bug14723
();;
delimiter
|
;;
drop
function
bug14723
|
drop
procedure
bug14723
|
#
#
# BUG#NNNN: New bug synopsis
# BUG#NNNN: New bug synopsis
#
#
...
...
sql/sp_head.cc
View file @
b607fdb0
...
@@ -476,7 +476,7 @@ void
...
@@ -476,7 +476,7 @@ void
sp_head
::
init_strings
(
THD
*
thd
,
LEX
*
lex
,
sp_name
*
name
)
sp_head
::
init_strings
(
THD
*
thd
,
LEX
*
lex
,
sp_name
*
name
)
{
{
DBUG_ENTER
(
"sp_head::init_strings"
);
DBUG_ENTER
(
"sp_head::init_strings"
);
u
int
n
;
/* Counter for nul trimming */
u
char
*
endp
;
/* Used to trim the end */
/* During parsing, we must use thd->mem_root */
/* During parsing, we must use thd->mem_root */
MEM_ROOT
*
root
=
thd
->
mem_root
;
MEM_ROOT
*
root
=
thd
->
mem_root
;
...
@@ -509,17 +509,20 @@ sp_head::init_strings(THD *thd, LEX *lex, sp_name *name)
...
@@ -509,17 +509,20 @@ sp_head::init_strings(THD *thd, LEX *lex, sp_name *name)
(
char
*
)
m_param_begin
,
m_params
.
length
);
(
char
*
)
m_param_begin
,
m_params
.
length
);
}
}
m_body
.
length
=
lex
->
ptr
-
m_body_begin
;
/* If ptr has overrun end_of_query then end_of_query is the end */
/* Trim nuls at the end */
endp
=
(
lex
->
ptr
>
lex
->
end_of_query
?
lex
->
end_of_query
:
lex
->
ptr
);
n
=
0
;
/*
while
(
m_body
.
length
&&
m_body_begin
[
m_body
.
length
-
1
]
==
'\0'
)
Trim "garbage" at the end. This is sometimes needed with the
{
"/ * ! VERSION... * /" wrapper in dump files.
m_body
.
length
-=
1
;
*/
n
+=
1
;
while
(
m_body_begin
<
endp
&&
}
(
endp
[
-
1
]
<=
' '
||
endp
[
-
1
]
==
'*'
||
endp
[
-
1
]
==
'/'
||
endp
[
-
1
]
==
';'
))
endp
-=
1
;
m_body
.
length
=
endp
-
m_body_begin
;
m_body
.
str
=
strmake_root
(
root
,
(
char
*
)
m_body_begin
,
m_body
.
length
);
m_body
.
str
=
strmake_root
(
root
,
(
char
*
)
m_body_begin
,
m_body
.
length
);
m_defstr
.
length
=
lex
->
ptr
-
lex
->
buf
;
m_defstr
.
length
=
endp
-
lex
->
buf
;
m_defstr
.
length
-=
n
;
m_defstr
.
str
=
strmake_root
(
root
,
(
char
*
)
lex
->
buf
,
m_defstr
.
length
);
m_defstr
.
str
=
strmake_root
(
root
,
(
char
*
)
lex
->
buf
,
m_defstr
.
length
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
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