Skip Menu |

This queue is for tickets about the DBIx-TextIndex CPAN distribution.

Report information
The Basics
Id: 7440
Status: rejected
Priority: 0/
Queue: DBIx-TextIndex

People
Owner: dkoch [...] cpan.org
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: attempt to quote binary null without sqlite_handle_binary_nulls on
You have to sqlite_handle_binary_nulls => 1 in lib/DBIx/TextIndex/DBD/SQLite.pm
[guest - Sun Aug 22 18:10:50 2004]: Show quoted text
> You have to > sqlite_handle_binary_nulls => 1 > in lib/DBIx/TextIndex/DBD/SQLite.pm
or more precisely, add $self->{INDEX_DBH}{sqlite_handle_binary_nulls}=1; to sub db_inverted_replace_execute {
From: Dan Koch
What version of DBD::SQLite? I've just started using SQLite, so I may be missing something, but in DBD::SQLite v1.03, sqlite_handle_binary_nulls is undocumented, and appears broken: use strict; use DBI; use DBD::SQLite; print "DBD::SQLite version: ", DBD::SQLite->VERSION, "\n"; my $dbh = DBI->connect('dbi:SQLite:dbname=testnull', '', '', { RaiseError => 1, PrintError => 0, AutoCommit => 1, sqlite_handle_binary_nulls => 1 }); $dbh->{sqlite_handle_binary_nulls} = 1; # Just in case $dbh->do(qq(CREATE TABLE test (test_blob BLOB))); my $string = "foo\0bar\0foo"; $dbh->do(qq(INSERT INTO test (test_blob) VALUES (?)), undef, $string); my ($length, $return) = $dbh->selectrow_array( qq(SELECT LENGTH(test_blob), test_blob FROM test)); print "Return value: $return\n"; print "Length: $length\n"; print "Length: $length\n"; __END__ $ ./test_case.pl DBD::SQLite version: 1.03 Return value: foo Length: 3 As you can see, the nulls in the string are not quoted properly. In any case, I have quoted the nulls manually in my code for the docweights table. The inverted tables that you mention should never have a null character in the strings. Do you have a test case where DBIx::TextIndex breaks?
Closing stale ticket