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
9b88d252
Commit
9b88d252
authored
Sep 27, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional fix to the bug #13372 (decimal union)
parent
7f3e2dc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+1
-1
sql/item.cc
sql/item.cc
+2
-2
No files found.
mysql-test/r/type_float.result
View file @
9b88d252
...
@@ -247,6 +247,6 @@ d
...
@@ -247,6 +247,6 @@ d
show create table t3;
show create table t3;
Table Create Table
Table Create Table
t3 CREATE TABLE `t3` (
t3 CREATE TABLE `t3` (
`d` double(
61
,9) default NULL
`d` double(
22
,9) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
drop table t1, t2, t3;
sql/item.cc
View file @
9b88d252
...
@@ -3230,12 +3230,12 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
...
@@ -3230,12 +3230,12 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
}
}
case
REAL_RESULT
:
case
REAL_RESULT
:
{
{
decimals
=
max
(
decimals
,
item
->
decimals
);
if
(
decimals
!=
NOT_FIXED_DEC
)
if
(
decimals
!=
NOT_FIXED_DEC
)
{
{
int
delta1
=
max_length_orig
-
decimals_orig
;
int
delta1
=
max_length_orig
-
decimals_orig
;
int
delta2
=
item
->
max_length
-
item
->
decimals
;
int
delta2
=
item
->
max_length
-
item
->
decimals
;
max_length
=
max
(
delta1
,
delta2
)
+
decimals
;
max_length
=
min
(
max
(
delta1
,
delta2
)
+
decimals
,
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
);
}
}
else
else
max_length
=
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
;
max_length
=
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
;
...
...
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