[Bug 1315631] [NEW] 12.04 LTS SQLite 3.7.9 on PHP not concurrent
octopocky
1315631 at bugs.launchpad.net
Sat May 3 09:28:43 UTC 2014
Public bug reported:
I'm writing a program that pings each node on my network, storing the IP
addresses to ping in an SQLite database. Here's a few snippets to help.
function SqlOpen( $name){
$db = FALSE;
$name = trim($name);
if( $name != ""){
$name = sprintf("sqlite:%s.sqlite",$name);
$db = new PDO($name);
if( $db != FALSE) $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
}
return $db;
}
$dbi = SqlOpen("dbPing");
$sql = "BEGIN TRANSACTION";
if( SqlQuery($dbi,$sql) === FALSE) $ERR .= SqlError( $dbi, $sql);
$sql = "SELECT * FROM IpPing";
$ping = FALSE;
$pong = FALSE;
$scanMe = SqlQuery($dbi,$sql);
if( $scanMe === FALSE) fputs(STDERR,SqlError( $dbi, $sql));
else {
$ping = SqlFetch( $scanMe);
$sql = "END TRANSACTION";
if( SqlJsSafeQuery($dbi,$sql) === FALSE) $ERR .= SqlError( $dbi, $sql);
$dbi = SqlClose($dbi);
while( $ping){
<Then we do our processing on every IP address we got from the fetch>
The program works. The problem is, while the programming is running, I
am unable to update or insert any thing in dbPing.sqlite. I keep getting
a "database is locked" error. If I kill my pinger program, then it
works. SQLite is suppose to support concurrency but it's not working in
this version.
** Affects: sqlite3 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sqlite3 in Ubuntu.
https://bugs.launchpad.net/bugs/1315631
Title:
12.04 LTS SQLite 3.7.9 on PHP not concurrent
Status in “sqlite3” package in Ubuntu:
New
Bug description:
I'm writing a program that pings each node on my network, storing the
IP addresses to ping in an SQLite database. Here's a few snippets to
help.
function SqlOpen( $name){
$db = FALSE;
$name = trim($name);
if( $name != ""){
$name = sprintf("sqlite:%s.sqlite",$name);
$db = new PDO($name);
if( $db != FALSE) $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
}
return $db;
}
$dbi = SqlOpen("dbPing");
$sql = "BEGIN TRANSACTION";
if( SqlQuery($dbi,$sql) === FALSE) $ERR .= SqlError( $dbi, $sql);
$sql = "SELECT * FROM IpPing";
$ping = FALSE;
$pong = FALSE;
$scanMe = SqlQuery($dbi,$sql);
if( $scanMe === FALSE) fputs(STDERR,SqlError( $dbi, $sql));
else {
$ping = SqlFetch( $scanMe);
$sql = "END TRANSACTION";
if( SqlJsSafeQuery($dbi,$sql) === FALSE) $ERR .= SqlError( $dbi, $sql);
$dbi = SqlClose($dbi);
while( $ping){
<Then we do our processing on every IP address we got from the fetch>
The program works. The problem is, while the programming is running, I
am unable to update or insert any thing in dbPing.sqlite. I keep
getting a "database is locked" error. If I kill my pinger program,
then it works. SQLite is suppose to support concurrency but it's not
working in this version.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1315631/+subscriptions
More information about the foundations-bugs
mailing list