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
7b6a467c
Commit
7b6a467c
authored
May 11, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/hf/work/27957/my50-27957
into mysql.com:/home/hf/work/27957/my51-27957
parents
76336751
17265468
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
sql/item_func.cc
sql/item_func.cc
+6
-3
No files found.
sql/item_func.cc
View file @
7b6a467c
...
@@ -1049,6 +1049,8 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
...
@@ -1049,6 +1049,8 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
{
{
my_decimal
tmp_buf
,
*
tmp
=
args
[
0
]
->
val_decimal
(
&
tmp_buf
);
my_decimal
tmp_buf
,
*
tmp
=
args
[
0
]
->
val_decimal
(
&
tmp_buf
);
bool
sign
;
bool
sign
;
uint
precision
;
if
((
null_value
=
args
[
0
]
->
null_value
))
if
((
null_value
=
args
[
0
]
->
null_value
))
return
NULL
;
return
NULL
;
my_decimal_round
(
E_DEC_FATAL_ERROR
,
tmp
,
decimals
,
FALSE
,
dec
);
my_decimal_round
(
E_DEC_FATAL_ERROR
,
tmp
,
decimals
,
FALSE
,
dec
);
...
@@ -1061,9 +1063,11 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
...
@@ -1061,9 +1063,11 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
goto
err
;
goto
err
;
}
}
}
}
if
(
max_length
-
2
-
decimals
<
(
uint
)
my_decimal_intg
(
dec
))
precision
=
my_decimal_length_to_precision
(
max_length
,
decimals
,
unsigned_flag
);
if
(
precision
-
decimals
<
(
uint
)
my_decimal_intg
(
dec
))
{
{
max_my_decimal
(
dec
,
max_length
-
2
,
decimals
);
max_my_decimal
(
dec
,
precision
,
decimals
);
dec
->
sign
(
sign
);
dec
->
sign
(
sign
);
goto
err
;
goto
err
;
}
}
...
@@ -1082,7 +1086,6 @@ void Item_decimal_typecast::print(String *str)
...
@@ -1082,7 +1086,6 @@ void Item_decimal_typecast::print(String *str)
{
{
char
len_buf
[
20
*
3
+
1
];
char
len_buf
[
20
*
3
+
1
];
char
*
end
;
char
*
end
;
CHARSET_INFO
*
cs
=
str
->
charset
();
uint
precision
=
my_decimal_length_to_precision
(
max_length
,
decimals
,
uint
precision
=
my_decimal_length_to_precision
(
max_length
,
decimals
,
unsigned_flag
);
unsigned_flag
);
...
...
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