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
6a6f7234
Commit
6a6f7234
authored
Jun 22, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B28400-5.0-opt
parents
287f3485
f45601ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
libmysql/libmysql.c
libmysql/libmysql.c
+16
-11
No files found.
libmysql/libmysql.c
View file @
6a6f7234
...
...
@@ -3663,33 +3663,38 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
case
MYSQL_TYPE_FLOAT
:
{
/*
We need to
store data in the buffer before the truncation check
to
We need to
mark the local variable volatile
to
workaround Intel FPU executive precision feature.
(See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details)
AFAIU it does not guarantee to work.
*/
float
data
;
volatile
float
data
;
if
(
is_unsigned
)
{
data
=
(
float
)
ulonglong2double
(
value
);
*
param
->
error
=
((
ulonglong
)
value
)
!=
((
ulonglong
)
data
);
}
else
data
=
(
float
)
value
;
{
data
=
(
float
)
value
;
*
param
->
error
=
value
!=
((
longlong
)
data
);
}
floatstore
(
buffer
,
data
);
*
param
->
error
=
is_unsigned
?
((
ulonglong
)
value
)
!=
((
ulonglong
)
(
*
(
float
*
)
buffer
))
:
((
longlong
)
value
)
!=
((
longlong
)
(
*
(
float
*
)
buffer
));
break
;
}
case
MYSQL_TYPE_DOUBLE
:
{
double
data
;
volatile
double
data
;
if
(
is_unsigned
)
{
data
=
ulonglong2double
(
value
);
*
param
->
error
=
((
ulonglong
)
value
)
!=
((
ulonglong
)
data
);
}
else
{
data
=
(
double
)
value
;
*
param
->
error
=
value
!=
((
longlong
)
data
);
}
doublestore
(
buffer
,
data
);
*
param
->
error
=
is_unsigned
?
((
ulonglong
)
value
)
!=
((
ulonglong
)
(
*
(
double
*
)
buffer
))
:
((
longlong
)
value
)
!=
((
longlong
)
(
*
(
double
*
)
buffer
));
break
;
}
case
MYSQL_TYPE_TIME
:
...
...
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