Full_Name: Jochen Wiedmann Version: 1.2.1 OS: Linux 2.2.5 (Red Hat 6.0) URL: ftp://ftp.openldap.org/incoming/ldbmsort.pl Submission from: (NULL) (195.143.94.56) When exporting an LDBM database of more than 255 objects, the object order is not 1, 2, 3, ... as expected, but 256, 1, 257, 2, 258, 3, ... Problem is, that the database becomes corrupt when reimporting this file via ldif2ldbm. To show the problem, I have uploaded a small Perl script (ldbmsort.pl) to the OpenLDAP incoming directory, that creates a tree of 400 objects: # Run "ldbmsort" for the first time and let it create an LDIF tree [root@gate joe]# ./ldbmsort.pl --create >/tmp/myldif # Import this tree [root@gate joe]# /usr/sbin/ldif2ldbm -i /tmp/myldif # Export it with ldbmcat and compare it to the original. # cmp shows immediate differences (object number not 1) [root@gate joe]# /usr/sbin/ldbmcat /var/ldap/id2entry.dbb | cmp - /tmp/myldif - /tmp/myldif differ: char 1, line 1 Broken pipe # Export again, but this time use ldbmsort again for sorting # the entries: Cmp shows no differences [root@gate joe]# /usr/sbin/ldbmcat /var/ldap/id2entry.dbb | ./ldbmsort.pl | cmp - /tmp/myldif
Jochen, On second thought, I don't think this is a bug. The test should be: ./ldbmsort.pl --create > initial.ldif ldif2ldbm -i initial.ldif ldbmcat /var/ldap-db > db.ldif rm -f /var/ldap-db/* ldif2ldbm -i db.ldif ldbmcat /var/ldap-db > verify.ldif cmp db.ldif verify.ldif That is, even though the entry are provided out of order each does have it's correct index. Kurt At 06:37 AM 5/25/99 GMT, joe@ispsoft.de wrote: >Full_Name: Jochen Wiedmann >Version: 1.2.1 >OS: Linux 2.2.5 (Red Hat 6.0) >URL: ftp://ftp.openldap.org/incoming/ldbmsort.pl >Submission from: (NULL) (195.143.94.56) > > > >When exporting an LDBM database of more than 255 objects, the object order is >not 1, 2, 3, ... as expected, but 256, 1, 257, 2, 258, 3, ... > >Problem is, that the database becomes corrupt when reimporting this file via >ldif2ldbm. > >To show the problem, I have uploaded a small Perl script (ldbmsort.pl) to the >OpenLDAP incoming directory, that creates a tree of 400 objects: > > # Run "ldbmsort" for the first time and let it create an LDIF tree > [root@gate joe]# ./ldbmsort.pl --create >/tmp/myldif > > # Import this tree > [root@gate joe]# /usr/sbin/ldif2ldbm -i /tmp/myldif > > # Export it with ldbmcat and compare it to the original. > # cmp shows immediate differences (object number not 1) > [root@gate joe]# /usr/sbin/ldbmcat /var/ldap/id2entry.dbb | cmp - /tmp/myldif > - /tmp/myldif differ: char 1, line 1 > Broken pipe > > # Export again, but this time use ldbmsort again for sorting > # the entries: Cmp shows no differences > [root@gate joe]# /usr/sbin/ldbmcat /var/ldap/id2entry.dbb | ./ldbmsort.pl | cmp >- /tmp/myldif > > >
changed notes changed state Open to Closed
Behavior not a bug.