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
4aea839b
Commit
4aea839b
authored
Nov 23, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postmerge fix
parent
ffc506e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
78 deletions
+76
-78
mysql-test/r/sp.result
mysql-test/r/sp.result
+67
-67
sql/item.cc
sql/item.cc
+0
-1
sql/sp.cc
sql/sp.cc
+4
-8
sql/sql_parse.cc
sql/sql_parse.cc
+4
-2
sql/sql_trigger.cc
sql/sql_trigger.cc
+1
-0
No files found.
mysql-test/r/sp.result
View file @
4aea839b
...
...
@@ -3417,6 +3417,9 @@ Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop procedure bug12589_1|
drop procedure bug12589_2|
drop procedure bug12589_3|
drop table if exists t3|
drop procedure if exists bug7049_1|
drop procedure if exists bug7049_2|
...
...
@@ -3617,6 +3620,70 @@ count(*)
drop table t3, t4|
drop procedure bug14210|
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|
create procedure bug14845()
begin
declare a char(255);
declare done int default 0;
declare c cursor for select count(*) from t1 where 1 = 0;
declare continue handler for sqlstate '02000' set done = 1;
open c;
repeat
fetch c into a;
if not done then
select a;
end if;
until done end repeat;
close c;
end|
call bug14845()|
a
0
drop procedure bug14845|
drop procedure if exists bug13549_1|
drop procedure if exists bug13549_2|
CREATE PROCEDURE `bug13549_2`()
begin
call bug13549_1();
end|
CREATE PROCEDURE `bug13549_1`()
begin
declare done int default 0;
set done= not done;
end|
CALL bug13549_2()|
drop procedure bug13549_2|
drop procedure bug13549_1|
drop function if exists bug10100f|
drop procedure if exists bug10100p|
drop procedure if exists bug10100t|
...
...
@@ -3802,71 +3869,4 @@ drop procedure bug10100pd|
drop procedure bug10100pc|
drop view v1|
drop table t3|
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|
create procedure bug14845()
begin
declare a char(255);
declare done int default 0;
declare c cursor for select count(*) from t1 where 1 = 0;
declare continue handler for sqlstate '02000' set done = 1;
open c;
repeat
fetch c into a;
if not done then
select a;
end if;
until done end repeat;
close c;
end|
call bug14845()|
a
0
drop procedure bug14845|
drop procedure bug12589_1|
drop procedure bug12589_2|
drop procedure bug12589_3|
drop procedure if exists bug13549_1|
drop procedure if exists bug13549_2|
CREATE PROCEDURE `bug13549_2`()
begin
call bug13549_1();
end|
CREATE PROCEDURE `bug13549_1`()
begin
declare done int default 0;
set done= not done;
end|
CALL bug13549_2()|
drop procedure bug13549_2|
drop procedure bug13549_1|
drop table t1,t2;
sql/item.cc
View file @
4aea839b
...
...
@@ -921,7 +921,6 @@ Item_splocal::type() const
DBUG_ASSERT
(
owner
==
thd
->
spcont
->
owner
);
return
thd
->
spcont
->
get_item
(
m_offset
)
->
type
();
}
}
return
NULL_ITEM
;
// Anything but SUBSELECT_ITEM
}
...
...
sql/sp.cc
View file @
4aea839b
...
...
@@ -400,7 +400,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
const
char
*
definer
,
longlong
created
,
longlong
modified
)
{
LEX
*
oldlex
=
thd
->
lex
,
newlex
;
sp_rcontext
*
save_spcont
=
;
thd
->
spcont
;
sp_rcontext
*
save_spcont
=
thd
->
spcont
;
String
defstr
;
char
olddb
[
128
];
bool
dbchanged
;
...
...
@@ -431,8 +431,6 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
lex_start
(
thd
,
(
uchar
*
)
defstr
.
c_ptr
(),
defstr
.
length
());
(
*
sphp
)
->
set_definer
((
char
*
)
definer
,
(
uint
)
strlen
(
definer
));
(
*
sphp
)
->
set_info
(
created
,
modified
,
&
chistics
,
sql_mode
);
thd
->
spcont
=
0
;
if
(
yyparse
(
thd
)
||
thd
->
is_fatal_error
||
newlex
.
sphead
==
NULL
)
{
...
...
@@ -446,18 +444,16 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
else
{
if
(
dbchanged
&&
(
ret
=
mysql_change_db
(
thd
,
olddb
,
1
)))
goto
db_
end
;
goto
end
;
*
sphp
=
newlex
.
sphead
;
(
*
sphp
)
->
set_definer
((
char
*
)
definer
,
(
uint
)
strlen
(
definer
));
(
*
sphp
)
->
set_info
((
char
*
)
definer
,
(
uint
)
strlen
(
definer
),
created
,
modified
,
&
chistics
,
sql_mode
);
(
*
sphp
)
->
set_info
(
created
,
modified
,
&
chistics
,
sql_mode
);
(
*
sphp
)
->
optimize
();
}
db_
end:
end:
thd
->
spcont
=
save_spcont
;
thd
->
variables
.
sql_mode
=
old_sql_mode
;
thd
->
variables
.
select_limit
=
select_limit
;
end:
thd
->
lex
=
oldlex
;
return
ret
;
}
...
...
sql/sql_parse.cc
View file @
4aea839b
...
...
@@ -4566,9 +4566,11 @@ mysql_execute_command(THD *thd)
goto
error
;
}
if
(
lex
->
sql_command
==
SQLCOM_SHOW_PROC_CODE
)
sp
=
sp_find_procedure
(
thd
,
lex
->
spname
);
sp
=
sp_find_routine
(
thd
,
TYPE_ENUM_PROCEDURE
,
lex
->
spname
,
&
thd
->
sp_proc_cache
,
FALSE
);
else
sp
=
sp_find_function
(
thd
,
lex
->
spname
);
sp
=
sp_find_routine
(
thd
,
TYPE_ENUM_FUNCTION
,
lex
->
spname
,
&
thd
->
sp_func_cache
,
FALSE
);
if
(
!
sp
||
!
sp
->
show_routine_code
(
thd
))
{
/* We don't distinguish between errors for now */
...
...
sql/sql_trigger.cc
View file @
4aea839b
...
...
@@ -913,6 +913,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
thd
->
db
=
save_db
.
str
;
thd
->
db_length
=
save_db
.
length
;
thd
->
lex
=
old_lex
;
thd
->
spcont
=
save_spcont
;
thd
->
variables
.
sql_mode
=
save_sql_mode
;
DBUG_RETURN
(
0
);
...
...
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