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
fbbb58c6
Commit
fbbb58c6
authored
Mar 07, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #8935 CAST(time AS DECIMAL) crashes
parent
e5a2d037
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
mysql-test/r/cast.result
mysql-test/r/cast.result
+6
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+0
-1
mysql-test/t/cast.test
mysql-test/t/cast.test
+5
-0
sql/field.cc
sql/field.cc
+0
-1
No files found.
mysql-test/r/cast.result
View file @
fbbb58c6
...
...
@@ -203,3 +203,9 @@ cast(@v1 as decimal(22, 2))
select cast(-1e18 as decimal(22,2));
cast(-1e18 as decimal(22,2))
-1000000000000000000.00
create table t1(s1 time);
insert into t1 values ('11:11:11');
select cast(s1 as decimal(7,2)) from t1;
cast(s1 as decimal(7,2))
111111.00
drop table t1;
mysql-test/r/func_group.result
View file @
fbbb58c6
...
...
@@ -855,7 +855,6 @@ select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
col1 sum(col1) max(col1) min(col1)
5.000000000010 10.000000000020 5.000000000010 5.000000000010
DROP TABLE t1;
CREATE TABLE t1(
id int PRIMARY KEY,
a int,
...
...
mysql-test/t/cast.test
View file @
fbbb58c6
...
...
@@ -126,3 +126,8 @@ select cast(cast('1.2' as decimal(3,2)) as signed);
set
@
v1
=
1
e18
;
select
cast
(
@
v1
as
decimal
(
22
,
2
));
select
cast
(
-
1
e18
as
decimal
(
22
,
2
));
create
table
t1
(
s1
time
);
insert
into
t1
values
(
'11:11:11'
);
select
cast
(
s1
as
decimal
(
7
,
2
))
from
t1
;
drop
table
t1
;
sql/field.cc
View file @
fbbb58c6
...
...
@@ -626,7 +626,6 @@ int Field_str::store_decimal(const my_decimal *d)
my_decimal
*
Field_str
::
val_decimal
(
my_decimal
*
decimal_value
)
{
DBUG_ASSERT
(
result_type
()
==
INT_RESULT
);
longlong
nr
=
val_int
();
int2my_decimal
(
E_DEC_FATAL_ERROR
,
nr
,
0
,
decimal_value
);
return
decimal_value
;
...
...
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