On Fri, Apr 27, 2007 at 08:52:21AM -0700, Alex Teslik wrote:
> as requested by the DBI man page:
>
>
> [root]/home/alex# perl perl_dbi_nulls_test.pl
> Using connect arguments, db version: 3.3.16
> => Drop table 'dbi__null_test_tmp', if it already exists...
> DBD::SQLite::db do failed: no such table: dbi__null_test_tmp(1) at dbdimp.c
> line 271 at perl_dbi_nulls_test.pl line 92.
> => Create table 'dbi__null_test_tmp'...
> => Insert 4 rows into the table...
> Values 1 Homer
> Values 2
> Values 3 Marge
> Values 4
> => Testing clause style 6: WHERE mycol = ? OR (mycol IS NULL AND ? = 1)
> => WHERE clause style 6 returned incorrect results.
> Non-Null test rows returned: 3
> Null test rows returned:
It's unfortunate and surprising that style 6 isn't supported as that's
the only style that every other database supports.
Could you look into that some more. Perhaps there's a bug somewhere.
> closing dbh with active statement handles at perl_dbi_nulls_test.pl line 167.
Looks like a bug in DBD::SQLite. Executing a prepared NON-select statement
(like a CREATE TABLE or INSERT) should not leave $sth->{Active} true.
> 1 styles are supported
> 4: WHERE mycol = ? OR (mycol IS NULL AND ? IS NULL)
I've updated the docs. Thanks.
Tim.