To: | undisclosed-recipients:; |
Date: | Sat, 23 Jun 2007 01:24:18 +0200 (CEST) |
From: | anon02450983453 [...] mail.dk |
The table definition:
CREATE TABLE ch_msg (iseq INTEGER PRIMARY KEY AUTOINCREMENT, ch, seq
ique (ch,seq,sig));
A one-liner-demonstration of violated unique constraints:
perl -MDBI -e 'my $dbh = DBI->connect("dbi:SQLite:dbname=phrankoi.db
my $seq = $dbh->selectall_arrayref("SELECT ch, seq, sig FROM ch_msg"
print join "\n", map join (", ", @$_), @$seq';
--OUTPUT--
Music, 0, Muchu
Music, 1, Muchu
Music, 15, anonymous
Music, 16, phrankoi
Music, 17, phrankoi
uEDCS dev., 60, phrankoi
uEDCS dev., 61, phrankoi
uEDCS dev., 62, Muchu
uEDCS dev., 62, anonymous
uEDCS dev., 63, Muchu
uEDCS dev., 64, Phrankoi
uEDCS dev., 64, Phrankoi
uEDCS dev., 65, Muchu
uEDCS dev., 66, Muchu
uEDCS dev., 67, Phrankoi
uEDCS dev., 67, Phrankoi
uEDCS dev., 68, Muchu
uEDCS dev., 69, Phrankoi
uEDCS dev., 69, Phrankoi
uEDCS dev., 70, Muchu
uEDCS dev., 71, Phrankoi
uEDCS dev., 72, Phrankoi
uEDCS dev., 72, Phranko
As you can see there're several unique constraint voilations....
uname -a: Linux OLDLAPTOP 2.4.27-3-386 #1 Wed Dec 6 00:38:33 UTC 200
inux
perl -v: This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
perl -MDBI -e 'my $dbh =:DBI->connect("dbi:SQLite:dbname=phrankoi.db
print $dbh->{sqlite_version}': 3.3.8
How I managed to make them:
When using multiple SQLite database handles simultaneously, violated
unique constraints "caused" by threads/processes inserting the same
thing are simply ignored. Maybe it's not the DBD but sqlite itself.
At least I have to execute the checks manually when not being able t
only have one dbh open at a time.
Cheers!
/PhrankoiX