Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 26375 invoked from network); 4 Sep 2007 13:12:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 13:12:38 -0000 Received: (qmail 69458 invoked by uid 500); 4 Sep 2007 13:12:31 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 69409 invoked by uid 500); 4 Sep 2007 13:12:31 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 69398 invoked by uid 99); 4 Sep 2007 13:12:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 06:12:31 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [80.229.52.226] (HELO grimnir.webthing.com) (80.229.52.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 13:13:39 +0000 Received: from grimnir.webthing.com (localhost [127.0.0.1]) by grimnir.webthing.com (Postfix) with ESMTP id D5CAB2137 for ; Tue, 4 Sep 2007 14:12:01 +0100 (BST) Date: Tue, 4 Sep 2007 14:12:01 +0100 From: Nick Kew To: dev@apr.apache.org Subject: New DBD drivers Message-ID: <20070904141201.6993c36b@grimnir> Organization: WebThing X-Mailer: Sylpheed-Claws 2.5.0-rc3 (GTK+ 2.10.6; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I've just committed two new DBD drivers: * apr_dbd_mysql * apr_dbd_freetds apr_dbd_mysql is the familiar MySQL driver. Following the recent thread on the subject[1], I've gone ahead and relicensed it, and dropped it in to our SVN. apr_dbd_freetds is a driver using FreeTDS[2] to access a MSSQL or Sybase database. It was developed and tested with a MSSQL backend, and has not been tested with Sybase. On advice from someone on the FreeTDS developer list, I used db-lib API, which is one of three provided by FreeTDS. I don't claim to understand the implications of this choice, and presumably other drivers could use the other FreeTDS APIs. It is only a partial implementation in several ways: * Returning random-access results from SELECT doesn't work. * Only the 1.2 DBD API is implemented. Stubs are provided for the extensions in trunk/1.3. * The db-lib API used doesn't support prepared statements, so the driver emulates them. * Only string variables (%s) are supported in prepared statements. A consequence of not supporting prepared statements is that security becomes an issue, and I've adopted Perl-like taint checking to deal with it. This is something we might consider moving to the apr_dbd level for use by other drivers. Maintaining the FreeTDS driver may be an issue unless and until a windows-based development environment materialises. But publishing it may help us get input from the FreeTDS folks. [1] http://marc.info/?t=118582567400005&r=1&w=2 [2] http://www.freetds.org/ -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/