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
251239af
Commit
251239af
authored
Oct 02, 2014
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Windows compiler error 'log2f': identifier not found
parent
f13cf621
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+8
-1
storage/xtradb/row/row0merge.cc
storage/xtradb/row/row0merge.cc
+8
-1
No files found.
storage/innobase/row/row0merge.cc
View file @
251239af
...
@@ -39,6 +39,13 @@ Completed by Sunny Bains and Marko Makela
...
@@ -39,6 +39,13 @@ Completed by Sunny Bains and Marko Makela
#include "row0import.h"
#include "row0import.h"
#include "handler0alter.h"
#include "handler0alter.h"
#include "ha_prototypes.h"
#include "ha_prototypes.h"
#include "math.h"
/* log() */
float
my_log2f
(
float
n
)
{
/* log(n) / log(2) is log2. */
return
(
float
)(
log
((
double
)
n
)
/
log
((
double
)
2
));
}
/* Ignore posix_fadvise() on those platforms where it does not exist */
/* Ignore posix_fadvise() on those platforms where it does not exist */
#if defined __WIN__
#if defined __WIN__
...
@@ -2222,7 +2229,7 @@ row_merge_sort(
...
@@ -2222,7 +2229,7 @@ row_merge_sort(
/* Find the number N which 2^N is greater or equal than num_runs */
/* Find the number N which 2^N is greater or equal than num_runs */
/* N is merge sort running count */
/* N is merge sort running count */
total_merge_sort_count
=
ceil
(
log2f
(
num_runs
));
total_merge_sort_count
=
ceil
(
my_
log2f
(
num_runs
));
if
(
total_merge_sort_count
<=
0
)
{
if
(
total_merge_sort_count
<=
0
)
{
total_merge_sort_count
=
1
;
total_merge_sort_count
=
1
;
}
}
...
...
storage/xtradb/row/row0merge.cc
View file @
251239af
...
@@ -39,6 +39,13 @@ Completed by Sunny Bains and Marko Makela
...
@@ -39,6 +39,13 @@ Completed by Sunny Bains and Marko Makela
#include "row0import.h"
#include "row0import.h"
#include "handler0alter.h"
#include "handler0alter.h"
#include "ha_prototypes.h"
#include "ha_prototypes.h"
#include "math.h"
/* log2() */
float
my_log2f
(
float
n
)
{
/* log(n) / log(2) is log2. */
return
(
float
)(
log
((
double
)
n
)
/
log
((
double
)
2
));
}
/* Ignore posix_fadvise() on those platforms where it does not exist */
/* Ignore posix_fadvise() on those platforms where it does not exist */
#if defined __WIN__
#if defined __WIN__
...
@@ -2228,7 +2235,7 @@ row_merge_sort(
...
@@ -2228,7 +2235,7 @@ row_merge_sort(
/* Find the number N which 2^N is greater or equal than num_runs */
/* Find the number N which 2^N is greater or equal than num_runs */
/* N is merge sort running count */
/* N is merge sort running count */
total_merge_sort_count
=
ceil
(
log2f
(
num_runs
));
total_merge_sort_count
=
ceil
(
my_
log2f
(
num_runs
));
if
(
total_merge_sort_count
<=
0
)
{
if
(
total_merge_sort_count
<=
0
)
{
total_merge_sort_count
=
1
;
total_merge_sort_count
=
1
;
}
}
...
...
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