NetBSD Problem Report #39254

From www@NetBSD.org  Thu Jul 31 11:07:39 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 658F363B9AA
	for <gnats-bugs@gnats.netbsd.org>; Thu, 31 Jul 2008 11:07:39 +0000 (UTC)
Message-Id: <20080731110739.2BDAA63B99A@narn.NetBSD.org>
Date: Thu, 31 Jul 2008 11:07:39 +0000 (UTC)
From: netbsd@mavetju.org
Reply-To: netbsd@mavetju.org
To: gnats-bugs@NetBSD.org
Subject: db(1) doesn't work properly anymore since the upgrade to 1.15
X-Send-Pr-Version: www-1.0

>Number:         39254
>Category:       bin
>Synopsis:       db(1) doesn't work properly anymore since the upgrade to 1.15
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 31 11:10:00 +0000 2008
>Originator:     Edwin Groothuis
>Release:        4.0
>Organization:
-
>Environment:
>Description:
With the commit of revision 1.15, the db(1) command is broken when selecting a single key:

$ db/db -N hash hash.db localhost
db: Error reading key `localhost': Invalid argument

The invalid argument comes from hash_seq() in src/lib/libc/db/hash/hash.c, which checks for the flags being R_FIRST or R_NEXT. db_get() calls it with R_CURSOR, which works fine for a BTree database but not for hash-database.

>How-To-Repeat:

>Fix:
Backout of 1.14.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.