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
7a4f495f
Commit
7a4f495f
authored
Apr 13, 2005
by
pem@mysql.comhem.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed BUG#9674: Stored Procs: Using declared vars in algebric operation
causes system crash.
parent
387afb3d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
1 deletion
+63
-1
mysql-test/r/sp.result
mysql-test/r/sp.result
+28
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+34
-0
sql/item.cc
sql/item.cc
+1
-1
No files found.
mysql-test/r/sp.result
View file @
7a4f495f
...
...
@@ -2880,4 +2880,32 @@ 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 @
7a4f495f
...
...
@@ -3537,6 +3537,40 @@ 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 @
7a4f495f
...
...
@@ -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
;
}
...
...
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