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
5fa3b162
Commit
5fa3b162
authored
Dec 30, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 32 bit arch addresses #223
git-svn-id:
file:///svn/tokudb@1422
c7de825b-a66e-492c-adef-691d508d4ae1
parent
3296a92f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/tests/test_cachesize.c
src/tests/test_cachesize.c
+6
-1
src/ydb.c
src/ydb.c
+6
-2
No files found.
src/tests/test_cachesize.c
View file @
5fa3b162
...
...
@@ -44,7 +44,12 @@ void test_cachesize() {
u_int64_t
s
=
1
;
size_to
(
s
,
&
gbytes
,
&
bytes
);
while
(
gbytes
<=
32
)
{
r
=
env
->
set_cachesize
(
env
,
gbytes
,
bytes
,
ncache
);
assert
(
r
==
0
);
r
=
env
->
set_cachesize
(
env
,
gbytes
,
bytes
,
ncache
);
if
(
r
!=
0
)
{
if
(
verbose
)
printf
(
"max %u %u
\n
"
,
gbytes
,
bytes
);
break
;
}
assert
(
r
==
0
);
r
=
env
->
get_cachesize
(
env
,
&
gbytes
,
&
bytes
,
&
ncache
);
assert
(
r
==
0
);
assert
(
ncache
==
1
);
if
(
s
<=
minsize
)
...
...
src/ydb.c
View file @
5fa3b162
...
...
@@ -57,7 +57,7 @@ struct __toku_db_env_internal {
char
**
data_dirs
;
u_int32_t
n_data_dirs
;
//void (*noticecall)(DB_ENV *, db_notices);
long
cachetable_size
;
unsigned
long
cachetable_size
;
CACHETABLE
cachetable
;
TOKULOGGER
logger
;
};
...
...
@@ -377,7 +377,11 @@ static int toku_db_env_log_flush(DB_ENV * env, const DB_LSN * lsn) {
}
static
int
toku_db_env_set_cachesize
(
DB_ENV
*
env
,
u_int32_t
gbytes
,
u_int32_t
bytes
,
int
ncache
__attribute__
((
__unused__
)))
{
env
->
i
->
cachetable_size
=
((
long
)
gbytes
<<
30
)
+
bytes
;
u_int64_t
cs64
=
((
u_int64_t
)
gbytes
<<
30
)
+
bytes
;
unsigned
long
cs
=
cs64
;
if
(
cs64
>
cs
)
return
EINVAL
;
env
->
i
->
cachetable_size
=
cs
;
return
0
;
}
...
...
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