Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
fee47850
Commit
fee47850
authored
Aug 23, 2002
by
Howard Chu
Browse files
Import ITS#2039 fix from HEAD - index corruption splitting indirect blocks
parent
3811614a
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-ldbm/idl.c
View file @
fee47850
...
...
@@ -48,17 +48,29 @@ static void cont_free( Datum *cont )
#ifdef LDBM_DEBUG_IDL
static
void
idl_check
(
ID_BLOCK
*
idl
)
{
int
i
;
int
i
,
max
;
ID_BLOCK
last
;
if
(
ID_BLOCK_INDIRECT
(
idl
)
||
ID_BLOCK_ALLIDS
(
idl
)
||
ID_BLOCK_NIDS
(
idl
)
<=
1
)
if
(
ID_BLOCK_ALLIDS
(
idl
)
)
{
return
;
}
#ifndef USE_INDIRECT_NIDS
if
(
ID_BLOCK_INDIRECT
(
idl
)
)
{
for
(
max
=
0
;
!
ID_BLOCK_NOID
(
idl
,
max
);
max
++
)
;
}
else
#endif
{
max
=
ID_BLOCK_NIDS
(
idl
);
}
if
(
max
<=
1
)
{
return
;
}
for
(
last
=
ID_BLOCK_ID
(
idl
,
0
),
i
=
1
;
i
<
ID_BLOCK_NIDS
(
idl
)
;
i
<
max
;
last
=
ID_BLOCK_ID
(
idl
,
i
),
i
++
)
{
assert
(
last
<
ID_BLOCK_ID
(
idl
,
i
)
);
...
...
@@ -628,7 +640,7 @@ idl_insert_key(
#endif
/* read it in */
cont_alloc
(
&
k2
,
&
key
);
cont_id
(
&
k2
,
ID_BLOCK_ID
(
idl
,
i
)
);
cont_id
(
&
k2
,
ID_BLOCK_ID
(
idl
,
i
+
1
)
);
if
(
(
tmp2
=
idl_fetch_one
(
be
,
db
,
k2
))
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
INDEX
,
ERR
,
...
...
Write
Preview
Supports
Markdown
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