Subject: | DB related bugs |
A few bugs here, one major and two minor:
* The major bug is that because complex structures are serialized as
binary data and SQLite is the default data source things break. This is
because SQLite doesn't handle binary data very well (at least as of
version 2.8.16 and probably up to version 3.0). My solution was to
switch to MySQL but I imagine some kind of binary twiddling function
would do the job too as the only problem is with the embedded NULLs in
the binary data strings.
* Whenever a new data source object is instantiated a table creation
attempt is made so spurious errors are spewed after the first
(successful) call.
* When fetching an id from new_id it can break if nothing is returned
from the fetchrow_arrayref.
I've supplied a patch for the two minor bugs.
Cheers,
Dan Brook
Subject: | DBI.pm.patch |
53c53,55
< $self->dbh->do("CREATE TABLE $table (
---
> my $dbh = $self->dbh;
> local $dbh->{PrintError};
> $dbh->do("CREATE TABLE $table (
61c63
< $self->dbh->do("CREATE INDEX lookup ON $table ( namespace(10), store_key(10) )");
---
> $dbh->do("CREATE INDEX lookup ON $table ( namespace(10), store_key(10) )");
92c94
< my $id = $sth->fetchrow_arrayref->[0] || "0";
---
> my $id = eval { $sth->fetchrow_arrayref->[0] } || "0";