Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
380806ee
Commit
380806ee
authored
23 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
ITS#1726, always use bdb_db_hash().
parent
1353ded3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-bdb/dbcache.c
+12
-6
12 additions, 6 deletions
servers/slapd/back-bdb/dbcache.c
with
12 additions
and
6 deletions
servers/slapd/back-bdb/dbcache.c
+
12
−
6
View file @
380806ee
...
...
@@ -22,7 +22,6 @@
/* Pass-thru hash function. Since the indexer is already giving us hash
* values as keys, we don't need BDB to re-hash them.
*/
#if LUTIL_HASH_BYTES == 4
static
u_int32_t
bdb_db_hash
(
DB
*
db
,
...
...
@@ -30,10 +29,19 @@ bdb_db_hash(
u_int32_t
length
)
{
u_int32_t
*
ret
=
(
u_int32_t
*
)
bytes
;
return
*
ret
;
u_int32_t
ret
=
0
;
unsigned
char
*
dst
=
(
unsigned
char
*
)
&
ret
;
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
bytes
;
if
(
length
>
sizeof
(
u_int32_t
)
)
length
=
sizeof
(
u_int32_t
);
while
(
length
)
{
*
dst
++
=
*
src
++
;
length
--
;
}
return
ret
;
}
#endif
int
bdb_db_cache
(
...
...
@@ -90,9 +98,7 @@ bdb_db_cache(
}
rc
=
db
->
bdi_db
->
set_pagesize
(
db
->
bdi_db
,
BDB_PAGESIZE
);
#if LUTIL_HASH_BYTES == 4
rc
=
db
->
bdi_db
->
set_h_hash
(
db
->
bdi_db
,
bdb_db_hash
);
#endif
#ifdef BDB_IDL_MULTI
rc
=
db
->
bdi_db
->
set_flags
(
db
->
bdi_db
,
DB_DUP
|
DB_DUPSORT
);
rc
=
db
->
bdi_db
->
set_dup_compare
(
db
->
bdi_db
,
bdb_bt_compare
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment