| From | Sent On | Attachments |
|---|---|---|
| David Wheeler | Jan 31, 2005 10:28 pm | |
| Tim Bunce | Feb 1, 2005 2:43 am | |
| David Wheeler | Feb 1, 2005 9:16 am | |
| Tim Bunce | Feb 2, 2005 2:58 am | |
| David Wheeler | Feb 2, 2005 10:49 am | |
| David Wheeler | Feb 2, 2005 10:57 am | |
| Tim Bunce | Feb 3, 2005 7:44 am | |
| David Wheeler | Feb 3, 2005 8:40 am | |
| Tim Bunce | Feb 3, 2005 3:30 pm | |
| David Wheeler | Feb 3, 2005 3:48 pm | |
| Tim Bunce | Feb 4, 2005 2:07 am | |
| David Wheeler | Feb 4, 2005 10:38 am | |
| Sheikin Sergei | Feb 4, 2005 11:31 am | |
| Michael A Chase | Feb 4, 2005 12:22 pm | |
| David Wheeler | Feb 11, 2005 11:18 am | |
| Tim Bunce | Feb 12, 2005 10:11 am | |
| David Wheeler | Feb 12, 2005 4:35 pm | |
| Tim Bunce | Feb 13, 2005 2:44 pm | |
| David Wheeler | Feb 13, 2005 5:54 pm | |
| Tim Bunce | Feb 14, 2005 3:09 am | |
| David Wheeler | Feb 15, 2005 10:37 am | |
| Tim Bunce | Feb 15, 2005 2:21 pm | |
| David Wheeler | Feb 15, 2005 9:01 pm |
| Subject: | AutoCommit and connect_cached() | |
|---|---|---|
| From: | David Wheeler (dav...@kineticode.com) | |
| Date: | Jan 31, 2005 10:28:08 pm | |
| List: | org.perl.dbi-dev | |
Fellow DBIers,
This script reveals two issues, one with DBD::SQLite and one with the DBI itself:
#!/usr/bin/perl
use strict;
use DBI; my $dbh = DBI->connect_cached('dbi:SQLite:dbname=test.db', {RaiseError => 1 }); $dbh->begin_work; print "SQLite $dbh: $dbh->{AutoCommit}\n"; $dbh = DBI->connect_cached('dbi:SQLite:dbname=test.db', {RaiseError => 1 }); print "SQLite $dbh: $dbh->{AutoCommit}\n";
$dbh = DBI->connect_cached('dbi:Pg:dbname=testing', 'postgres', 'postgres', {RaiseError => 1 }); $dbh->begin_work; print "Pg $dbh: $dbh->{AutoCommit}\n"; $dbh = DBI->connect_cached('dbi:Pg:dbname=testing', 'postgres', 'postgres', {RaiseError => 1 }); print "Pg $dbh: $dbh->{AutoCommit}\n";
The output is:
SQLite DBI::db=HASH(0x80a44c): SQLite DBI::db=HASH(0x80843c): 1 Pg DBI::db=HASH(0x85cc3c): Pg DBI::db=HASH(0x85cc3c): 1
The first two lines tell me that DBD::SQLite doesn't work properly with connect_cached().
The second two lines tell me that, somehow, connect_cached() is resetting AutoCommit. I wouldn't think that this should happen, but perhaps I'm wrong.
Am I wrong?
Many TIA,
David





