Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 27702
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: anon234509723057 [...] mail.dk
Cc:
AdminCc:

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



To: undisclosed-recipients:;
Date: Sat, 23 Jun 2007 01:38:11 +0200 (CEST)
From: anon234509723057 [...] mail.dk
The table definition: CREATE TABLE ch_msg (iseq INTEGER PRIMARY KEY AUTOINCREMENT, ch, seq,sig,msg, unique (ch,s eq,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 2006 i686 GNU/Linux 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 to only have one dbh open at a time. Cheers! /PhrankoiX
Duplicate, resolving.