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
2be7a2b9
Commit
2be7a2b9
authored
Apr 13, 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:/home/pem/work/mysql-5.0
parents
9cfa9b91
7a4f495f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
9 deletions
+137
-9
mysql-test/r/sp.result
mysql-test/r/sp.result
+58
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+76
-0
sql/item.cc
sql/item.cc
+1
-1
sql/sp_pcontext.h
sql/sp_pcontext.h
+1
-7
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/sp.result
View file @
2be7a2b9
...
...
@@ -2850,4 +2850,62 @@ begin
end|
call avg ()|
drop procedure avg|
drop procedure if exists bug6129|
set @@sql_mode = 'traditional'|
create procedure bug6129(mode text)
select @@sql_mode = mode|
call bug6129(@@sql_mode)|
@@sql_mode = mode
1
set @@sql_mode = ''|
call bug6129(@@sql_mode)|
@@sql_mode = mode
0
drop procedure bug6129|
drop procedure if exists bug9856|
create procedure bug9856()
begin
declare v int;
declare c cursor for select data from t1;
declare exit handler for sqlexception, not found select '16';
open c;
fetch c into v;
select v;
end|
delete from t1|
call bug9856()|
16
16
call bug9856()|
16
16
drop procedure bug9856|
drop procedure if exists bug9674_1|
drop procedure if exists bug9674_2|
create procedure bug9674_1(out arg int)
begin
declare temp_in1 int default 0;
declare temp_fl1 int default 0;
set temp_in1 = 100;
set temp_fl1 = temp_in1/10;
set arg = temp_fl1;
end|
create procedure bug9674_2()
begin
declare v int default 100;
select v/10;
end|
call bug9674_1(@sptmp)|
call bug9674_1(@sptmp)|
select @sptmp|
@sptmp
10
call bug9674_2()|
v/10
10.00000
call bug9674_2()|
v/10
10.00000
drop procedure bug9674_1|
drop procedure bug9674_2|
drop table t1,t2;
mysql-test/t/sp.test
View file @
2be7a2b9
...
...
@@ -3495,6 +3495,82 @@ call avg ()|
drop
procedure
avg
|
#
# BUG#6129: Stored procedure won't display @@sql_mode value
#
--
disable_warnings
drop
procedure
if
exists
bug6129
|
--
enable_warnings
set
@@
sql_mode
=
'traditional'
|
create
procedure
bug6129
(
mode
text
)
select
@@
sql_mode
=
mode
|
# 1
call
bug6129
(
@@
sql_mode
)
|
set
@@
sql_mode
=
''
|
# 0
call
bug6129
(
@@
sql_mode
)
|
drop
procedure
bug6129
|
#
# BUG#9856: Stored procedures: crash if handler for sqlexception, not found
#
--
disable_warnings
drop
procedure
if
exists
bug9856
|
--
enable_warnings
create
procedure
bug9856
()
begin
declare
v
int
;
declare
c
cursor
for
select
data
from
t1
;
declare
exit
handler
for
sqlexception
,
not
found
select
'16'
;
open
c
;
fetch
c
into
v
;
select
v
;
end
|
delete
from
t1
|
call
bug9856
()
|
call
bug9856
()
|
drop
procedure
bug9856
|
#
# BUG##9674: Stored Procs: Using declared vars in algebric operation causes
# system crash.
#
--
disable_warnings
drop
procedure
if
exists
bug9674_1
|
drop
procedure
if
exists
bug9674_2
|
--
enable_warnings
create
procedure
bug9674_1
(
out
arg
int
)
begin
declare
temp_in1
int
default
0
;
declare
temp_fl1
int
default
0
;
set
temp_in1
=
100
;
set
temp_fl1
=
temp_in1
/
10
;
set
arg
=
temp_fl1
;
end
|
create
procedure
bug9674_2
()
begin
declare
v
int
default
100
;
select
v
/
10
;
end
|
call
bug9674_1
(
@
sptmp
)
|
call
bug9674_1
(
@
sptmp
)
|
select
@
sptmp
|
call
bug9674_2
()
|
call
bug9674_2
()
|
drop
procedure
bug9674_1
|
drop
procedure
bug9674_2
|
#
# BUG#NNNN: New bug synopsis
#
...
...
sql/item.cc
View file @
2be7a2b9
...
...
@@ -700,7 +700,7 @@ my_decimal *Item_splocal::val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT
(
fixed
);
Item
*
it
=
this_item
();
my_decimal
value
,
*
val
=
it
->
val_decimal
(
&
value
);
my_decimal
*
val
=
it
->
val_decimal
(
decimal_
value
);
Item
::
null_value
=
it
->
null_value
;
return
val
;
}
...
...
sql/sp_pcontext.h
View file @
2be7a2b9
...
...
@@ -235,12 +235,6 @@ class sp_pcontext : public Sql_alloc
// Handlers
//
inline
void
add_handler
()
{
m_handlers
+=
1
;
}
inline
void
push_handler
(
sp_cond_type_t
*
cond
)
{
...
...
@@ -257,7 +251,7 @@ class sp_pcontext : public Sql_alloc
}
inline
void
push
_handlers
(
uint
n
)
add
_handlers
(
uint
n
)
{
m_handlers
+=
n
;
}
...
...
sql/sql_yacc.yy
View file @
2be7a2b9
...
...
@@ -1681,7 +1681,6 @@ sp_decl:
sp->add_instr(i);
sp->push_backpatch(i, ctx->push_label((char *)"", 0));
ctx->add_handler();
sp->m_in_handler= TRUE;
}
sp_hcond_list sp_proc_stmt
...
...
@@ -1709,6 +1708,7 @@ sp_decl:
sp->m_in_handler= FALSE;
$$.vars= $$.conds= $$.curs= 0;
$$.hndlrs= $6;
ctx->add_handlers($6);
}
| DECLARE_SYM ident CURSOR_SYM FOR_SYM sp_cursor_stmt
{
...
...
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