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
d5f51a00
Commit
d5f51a00
authored
Dec 07, 2008
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.0-bugteam to mysql-5.1-bugteam.
parents
9e91c8d6
5f7869a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
0 deletions
+42
-0
include/config-win.h
include/config-win.h
+9
-0
include/my_global.h
include/my_global.h
+3
-0
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+13
-0
mysql-test/t/type_float.test
mysql-test/t/type_float.test
+17
-0
No files found.
include/config-win.h
View file @
d5f51a00
...
@@ -250,6 +250,15 @@ inline double ulonglong2double(ulonglong value)
...
@@ -250,6 +250,15 @@ inline double ulonglong2double(ulonglong value)
#define my_off_t2double(A) ulonglong2double(A)
#define my_off_t2double(A) ulonglong2double(A)
#endif
/* _WIN64 */
#endif
/* _WIN64 */
inline
ulonglong
double2ulonglong
(
double
d
)
{
double
t
=
d
-
(
double
)
0x8000000000000000ULL
;
if
(
t
>=
0
)
return
((
ulonglong
)
t
)
+
0x8000000000000000ULL
;
return
(
ulonglong
)
d
;
}
#if SIZEOF_OFF_T > 4
#if SIZEOF_OFF_T > 4
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
#define tell(A) _telli64(A)
#define tell(A) _telli64(A)
...
...
include/my_global.h
View file @
d5f51a00
...
@@ -789,6 +789,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
...
@@ -789,6 +789,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define ulonglong2double(A) ((double) (ulonglong) (A))
#define ulonglong2double(A) ((double) (ulonglong) (A))
#define my_off_t2double(A) ((double) (my_off_t) (A))
#define my_off_t2double(A) ((double) (my_off_t) (A))
#endif
#endif
#ifndef double2ulonglong
#define double2ulonglong(A) ((ulonglong) (double) (A))
#endif
#endif
#endif
#ifndef offsetof
#ifndef offsetof
...
...
mysql-test/r/type_float.result
View file @
d5f51a00
...
@@ -392,4 +392,17 @@ f1 + 0e0
...
@@ -392,4 +392,17 @@ f1 + 0e0
1.0000000150475e+30
1.0000000150475e+30
-1.0000000150475e+30
-1.0000000150475e+30
drop table t1;
drop table t1;
create table t1(d double, u bigint unsigned);
insert into t1(d) values (9.2233720368547777e+18),
(9.223372036854779e18),
(9.22337203685479e18),
(1.84e19);
update t1 set u = d;
select * from t1;
d u
9.22337203685478e+18 9223372036854775808
9.22337203685478e+18 9223372036854779904
9.22337203685479e+18 9223372036854790144
1.84e+19 18400000000000000000
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/type_float.test
View file @
d5f51a00
...
@@ -252,4 +252,21 @@ insert into t1 values (2e30), (-2e30);
...
@@ -252,4 +252,21 @@ insert into t1 values (2e30), (-2e30);
select
f1
+
0
e0
from
t1
;
select
f1
+
0
e0
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #27483: Casting 'scientific notation type' to 'unsigned bigint' fails on
# windows.
#
create
table
t1
(
d
double
,
u
bigint
unsigned
);
insert
into
t1
(
d
)
values
(
9.2233720368547777e+18
),
(
9.223372036854779e18
),
(
9.22337203685479e18
),
(
1.84e19
);
update
t1
set
u
=
d
;
select
*
from
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
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