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
6da9cf09
Commit
6da9cf09
authored
Jul 13, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a fix (bug #11808: Test case 'mysql_client_test' fails in assert 'double_data == o_double_data')
parent
30b76e5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
tests/mysql_client_test.c
tests/mysql_client_test.c
+14
-4
No files found.
tests/mysql_client_test.c
View file @
6da9cf09
...
@@ -173,6 +173,14 @@ DIE_UNLESS(stmt == 0);\
...
@@ -173,6 +173,14 @@ DIE_UNLESS(stmt == 0);\
#define mytest_r(x) if (x) {myerror(NULL);DIE_UNLESS(FALSE);}
#define mytest_r(x) if (x) {myerror(NULL);DIE_UNLESS(FALSE);}
/* A workaround for Sun Forte 5.6 on Solaris x86 */
static
int
cmp_double
(
double
*
a
,
double
*
b
)
{
return
*
a
==
*
b
;
}
/* Print the error message */
/* Print the error message */
static
void
print_error
(
const
char
*
msg
)
static
void
print_error
(
const
char
*
msg
)
...
@@ -1645,7 +1653,7 @@ static void test_prepare()
...
@@ -1645,7 +1653,7 @@ static void test_prepare()
DIE_UNLESS
(
real_data
==
o_real_data
);
DIE_UNLESS
(
real_data
==
o_real_data
);
DIE_UNLESS
(
length
[
5
]
==
4
);
DIE_UNLESS
(
length
[
5
]
==
4
);
DIE_UNLESS
(
double_data
==
o_double_data
);
DIE_UNLESS
(
cmp_double
(
&
double_data
,
&
o_double_data
)
);
DIE_UNLESS
(
length
[
6
]
==
8
);
DIE_UNLESS
(
length
[
6
]
==
8
);
DIE_UNLESS
(
strcmp
(
data
,
str_data
)
==
0
);
DIE_UNLESS
(
strcmp
(
data
,
str_data
)
==
0
);
...
@@ -9858,7 +9866,7 @@ static void test_bug3035()
...
@@ -9858,7 +9866,7 @@ static void test_bug3035()
uint32
uint32_val
;
uint32
uint32_val
;
longlong
int64_val
;
longlong
int64_val
;
ulonglong
uint64_val
;
ulonglong
uint64_val
;
double
double_val
,
udouble_val
;
double
double_val
,
udouble_val
,
double_tmp
;
char
longlong_as_string
[
22
],
ulonglong_as_string
[
22
];
char
longlong_as_string
[
22
],
ulonglong_as_string
[
22
];
/* mins and maxes */
/* mins and maxes */
...
@@ -10005,7 +10013,8 @@ static void test_bug3035()
...
@@ -10005,7 +10013,8 @@ static void test_bug3035()
DIE_UNLESS
(
int64_val
==
int64_min
);
DIE_UNLESS
(
int64_val
==
int64_min
);
DIE_UNLESS
(
uint64_val
==
uint64_min
);
DIE_UNLESS
(
uint64_val
==
uint64_min
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_min
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_min
);
DIE_UNLESS
(
udouble_val
==
ulonglong2double
(
uint64_val
));
double_tmp
=
ulonglong2double
(
uint64_val
);
DIE_UNLESS
(
cmp_double
(
&
udouble_val
,
&
double_tmp
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"0"
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"0"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"0"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"0"
));
...
@@ -10029,7 +10038,8 @@ static void test_bug3035()
...
@@ -10029,7 +10038,8 @@ static void test_bug3035()
DIE_UNLESS
(
int64_val
==
int64_max
);
DIE_UNLESS
(
int64_val
==
int64_max
);
DIE_UNLESS
(
uint64_val
==
uint64_max
);
DIE_UNLESS
(
uint64_val
==
uint64_max
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_val
);
DIE_UNLESS
(
double_val
==
(
longlong
)
uint64_val
);
DIE_UNLESS
(
udouble_val
==
ulonglong2double
(
uint64_val
));
double_tmp
=
ulonglong2double
(
uint64_val
);
DIE_UNLESS
(
cmp_double
(
&
udouble_val
,
&
double_tmp
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"-1"
));
DIE_UNLESS
(
!
strcmp
(
longlong_as_string
,
"-1"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"18446744073709551615"
));
DIE_UNLESS
(
!
strcmp
(
ulonglong_as_string
,
"18446744073709551615"
));
...
...
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