NetBSD Problem Report #46322

From khorben@defora.org  Wed Apr 11 00:12:22 2012
Return-Path: <khorben@defora.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 08FA563B9FE
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Apr 2012 00:12:22 +0000 (UTC)
Message-Id: <20120410225450.474B71A474@syn.defora.rom>
Date: Wed, 11 Apr 2012 00:54:50 +0200 (CEST)
From: Pierre Pronchery <khorben@defora.org>
Reply-To:
To: gnats-bugs@gnats.NetBSD.org
Subject: SQLite from base does not include useful functions
X-Send-Pr-Version: 3.95


>Number:         46322
>Category:       lib
>Synopsis:       SQLite from base is compiled without SQLITE_ENABLE_COLUMN_METADATA
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 11 00:15:00 +0000 2012
>Last-Modified:  Mon Jun 11 17:55:01 +0000 2012
>Originator:     Pierre Pronchery <khorben@defora.org>
>Release:        NetBSD 6.0_BETA
>Organization:
>Environment:
System: NetBSD syn.defora.rom 6.0_BETA NetBSD 6.0_BETA (GENERIC) #7: Tue Apr 10 02:09:40 CEST 2012 khorben@syn.defora.rom:/home/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
A number of functions from SQLite 3 are only available when the
libsqlite3 library is built with particular values defined. One such
setting is SQLITE_ENABLE_COLUMN_METADATA, which includes the following
functions when enabled:


- sqlite3_column_database_name()
- sqlite3_column_database_name16()
- sqlite3_column_table_name()
- sqlite3_column_table_name16()
- sqlite3_column_origin_name()
- sqlite3_column_origin_name16()
- sqlite3_table_column_metadata()


These functions may be essential for completeness (including matching
the documentation), as well as for programmers relying on SQLite 3 as
available from base to be fully functional. At least to me :)


FWIW, I am currently relying on the sqlite3_column_origin_name()
function while analyzing results from prepared statements, passing the
column names along with the resulting rows of data to my respective
callbacks. The other functions are returning the respective databases
and tables associated to each column.


If this change is accepted, a pull-up to the netbsd-6 branch would also
be much appreciated.


>How-To-Repeat:
Use any of the functions listed above in a C/C++ program linked with
libsqlite3 from base.
>Fix:
As follows:


Index: external/public-domain/sqlite/Makefile.inc
===================================================================
RCS file: /cvsroot/src/external/public-domain/sqlite/Makefile.inc,v
retrieving revision 1.3
diff -p -u -r1.3 Makefile.inc
--- external/public-domain/sqlite/Makefile.inc	11 Nov 2011 01:34:18 -0000	1.3
+++ external/public-domain/sqlite/Makefile.inc	10 Apr 2012 22:16:11 -0000
@@ -10,6 +10,7 @@ CPPFLAGS+=	-DHAVE_READLINE=1 -DHAVE_LOCA
 		-DSQLITE_HAVE_ISNAN -DSQLITE_ENABLE_FTS4 \
 		-DSQLITE_ENABLE_FTS3_PARENTHESIS \
 		-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-		-DSQLITE_ENABLE_LOAD_EXTENSION
+		-DSQLITE_ENABLE_LOAD_EXTENSION \
+		-DSQLITE_ENABLE_COLUMN_METADATA

 
 CWARNFLAGS+=	-Wno-shadow -Wno-unused


>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46322 CVS commit: src/external/public-domain/sqlite
Date: Tue, 10 Apr 2012 20:41:41 -0400


 Module Name:	src
 Committed By:	christos
 Date:		Wed Apr 11 00:41:41 UTC 2012

 
 Modified Files:
 	src/external/public-domain/sqlite: Makefile.inc

 
 Log Message:
 PR/46322: Pierre Pronchery: SQLite from base is compiled without
 SQLITE_ENABLE_COLUMN_METADATA
 XXX: Pullup for 6

 

 
 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/sqlite/Makefile.inc

 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

 
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46322 CVS commit: [netbsd-6] src/external/public-domain/sqlite
Date: Mon, 11 Jun 2012 17:51:42 +0000


 Module Name:	src
 Committed By:	riz
 Date:		Mon Jun 11 17:51:42 UTC 2012

 
 Modified Files:
 	src/external/public-domain/sqlite [netbsd-6]: Makefile.inc

 
 Log Message:
 Pull up following revision(s) (requested by khorben in ticket #294):
 	external/public-domain/sqlite/Makefile.inc: revision 1.4
 PR/46322: Pierre Pronchery: SQLite from base is compiled without
 SQLITE_ENABLE_COLUMN_METADATA
 XXX: Pullup for 6

 

 
 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.3.2.1 src/external/public-domain/sqlite/Makefile.inc

 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

 
>Unformatted:
 Wed Apr 11 00:14:47 CEST 2012



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.36 2007/11/24 03:27:39 kano 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.