You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Nick Kew <ni...@webthing.com> on 2007/09/04 15:12:01 UTC
New DBD drivers
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/
Re: New DBD drivers
Posted by Nick Kew <ni...@webthing.com>.
On Wed, 05 Sep 2007 11:48:33 +1000
Bojan Smojver <bo...@rexursive.com> wrote:
> On Wed, 2007-09-05 at 10:52 +1000, Bojan Smojver wrote:
> > At the same time, if
> > there is support for this, I can backport similarly cleaned (just
> > in the opposite direction) driver to 1.2.x.
>
> Ready to commit, just say the word :-)
Sounds good to me. I say, go ahead unless someone screams!
Thanks:-)
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
Re: New DBD drivers
Posted by Bojan Smojver <bo...@rexursive.com>.
On Wed, 2007-09-05 at 10:52 +1000, Bojan Smojver wrote:
> At the same time, if
> there is support for this, I can backport similarly cleaned (just in the
> opposite direction) driver to 1.2.x.
Ready to commit, just say the word :-)
--
Bojan
Re: New DBD drivers
Posted by Bojan Smojver <bo...@rexursive.com>.
On Tue, 2007-09-04 at 14:12 +0100, Nick Kew wrote:
> apr_dbd_mysql is the familiar MySQL driver.
Wonderful! Thanks Nick!
I'm working on cleaning up the checked in driver (trunk) from all that
stuff (i.e. #ifdef's etc.) that is 1.2.x specific. At the same time, if
there is support for this, I can backport similarly cleaned (just in the
opposite direction) driver to 1.2.x.
--
Bojan