Bug 471998 - dbverify: support integer type index
dbverify: support integer type index
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Command Line Utilities (Show other bugs)
1.1.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Noriko Hosoi
Chandrasekar Kannan
:
Depends On:
Blocks: 249650 FDS1.2.0
  Show dependency treegraph
 
Reported: 2008-11-17 22:29 EST by Noriko Hosoi
Modified: 2015-01-04 18:34 EST (History)
3 users (show)

See Also:
Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-29 19:07:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cvs diff back-ldbm/{proto-back-ldbm.h, dblayer.c, dbverify.c} (5.87 KB, patch)
2008-11-18 01:51 EST, Noriko Hosoi
no flags Details | Diff
sample ldif file (1.51 MB, application/octet-stream)
2008-11-18 02:20 EST, Noriko Hosoi
no flags Details
cvs commit message (1.24 KB, text/plain)
2008-11-18 21:54 EST, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2008-11-17 22:29:07 EST
Description of problem:
When an index has a configuration parameter: "nsMatchingRule: integerOrderingMatch", the index is sorted by the numeric order instead of the alphabetical order.  It's not implemented in the dbverify.
Comment 1 Noriko Hosoi 2008-11-18 01:51:43 EST
Created attachment 323854 [details]
cvs diff back-ldbm/{proto-back-ldbm.h, dblayer.c, dbverify.c}

Change Description:
1) changed dblayer_bt_compare to public (proto-back-ldbm.h, dblayer.c)
2) set dblayer_bt_compare by dbp->set_bt_compare if the attribute has a comparison function set in ai->ai_key_cmp_fn (dbverify.c)
3) cleaned up the function dbverify_ext; set the right page size based upon the idl type (new idl or old idl), also set dup compare function only when the idl type is new. (dbverify.c)
Comment 2 Noriko Hosoi 2008-11-18 02:20:04 EST
Created attachment 323855 [details]
sample ldif file

Test case:
1. create an equality, integer-ordered index on uidNumber.
dn: cn=uidNumber, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=conf
 ig
objectClass: top
objectClass: nsIndex
cn: uidNumber
nsSystemIndex: false
nsIndexType: eq
nsMatchingRule: integerOrderingMatch
2. import the attached ldif file
3. run verify-db.pl.  The result should be "Good".
# ./verify-db.pl
*****************************************************************
verify-db: This tool should only be run if recovery start fails
and the server is down.  If you run this tool while the server is
running, you may get false reports of corrupted files or other
false errors.
*****************************************************************
Verify log files in /var/lib/dirsrv/slapd-kiki2/db ... Good
Verify db files ... Good
Comment 3 Noriko Hosoi 2008-11-18 21:54:00 EST
Created attachment 323993 [details]
cvs commit message

Reviewed by Nathan (Thank you!!)

Checked in into CVS HEAD.
Comment 4 Jenny Galipeau 2009-03-20 15:27:57 EDT
fix verified DS 8.1 RHEL 4

created index
imported attached ldif

bash-3.00# ./dbverify
DB verify: Passed

-bash-3.00# ./dbverify -n userRoot
DB verify: Passed
-bash-3.00# ./dbverify -n NetscapeRoot
DB verify: Passed
Comment 5 Chandrasekar Kannan 2009-04-29 19:07:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html

Note You need to log in before you can comment on or make changes to this bug.