[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#42898: libc6: db_dump185 links to libdb not libdb1



On Thu, Aug 12, 1999 at 07:08:13PM +0200, Andreas Jaeger wrote:
> >>>>> Paul Martin writes:
> 
>  > db_dump185 cannot handle db1.85 databases as it links thus:
> 
>  > # ldd /usr/bin/db_dump185
>  >         libdb.so.3 => /lib/libdb.so.3 (0x40006000)
>  >         libc.so.6 => /lib/libc.so.6 (0x40041000)
>  >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
> db_dump185 comes with db2 (it's build in the db2 subdirectory!) - and
> therefore it has to be linked with db2 (aka libdb.so.3).  glibc is
> just following the recommend way of the db2 authors.
> 
>  > This looks like -ldb was used in the makefile rather than -ldb1
> 
>  > This is a grave bug as it prevents users migrating their databases as
>  > recommended by the output of the postinst script of perl-5.005, and could
>  > cause data loss -- Perl doesn't notify as an error that it's clobbering a
>  > database of the wrong type by default. 
> Did you actually try running db_dump185?  It should work.

Yes, I did. That's why I'm raising this bug. It might be an upstream bug. 
The following is a session I've just had. 

$ cd /tmp
$ cat >dbmtest.pl
#!/usr/bin/perl-5.004
use DB_File;

tie %hash, 'DB_File', '/tmp/database', O_RDWR|O_CREAT, 0600, $DB_HASH;
$hash{'foo'}='bar';
untie %hash;
^D
$ chmod +x dbmtest.pl
$ dbmtest.pl
$ file database
database: Berkeley DB 1.85 Hash/Little Endian (Version 2, Bucket Size
4096, Bucket Shift 12, Directory Size 256, Segment Size 256, Segment Shift
8, Overflow Point 1, Last Freed 2, Max Bucket 1, High Mask 0x3, Low Mask
0x1, Fill Factor 65536, Number of Keys 1)
$ db_dump185 database
db_dump185: database: Invalid argument
$ cat >dbmtest.pl
#!/usr/bin/perl-5.005
use DB_File;

tie %hash, 'DB_File', '/tmp/database', O_RDWR|O_CREAT, 0600, $DB_HASH;
$hash{'foo'}='bar';
untie %hash;
^D
$ rm database
$ dbmtest.pl
$ file database 
database: Berkeley DB 2.X Hash/Little Endian (Version 5)
$ db_dump185 database
format=bytevalue
type=hash
h_ffactor=0
db_pagesize=134520824
HEADER=END
666f6f
626172
$


-- 
Paul Martin <pm@zetnet.net> (work)
  <pm@nowster.zetnet.co.uk> (home)


Reply to: