[sqlite] Trouble debugging a user's SQLITE_LOCKED

2011-07-08 Thread Dustin J. Mitchell
I'm trying to crack
  http://trac.buildbot.net/ticket/2005
wherein a Buildbot user is seeing SQLITE_LOCKED in sqlite-3.6.23.1.
>From my read of
  http://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked
that's basically not possible anymore, aside from filesystem errors.
Is that wiki page accurate, or are there funny things I might be doing
in Buildbot that could lead to this error?  The worst I can think of
is that one of my queries creates a temporary table (it's an update
operation with a long list of id's, so I put the id's in a temporary
table and then use "where id in (select id from temporary_table)").

Any pointers are appreciated.

Dustin
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert not working for sqlite3

2011-07-08 Thread Stephan Beal
On Fri, Jul 8, 2011 at 3:50 AM, James_21th  wrote:

> The $result always return false, it don't allow me to create a simple
> table, the
> table name surely not exist, I change tbl3, 4, 5, all not able to create.
> (that
> could be the same reason why insert is not working, if not even able to
> create
> table, let alone insert.)
>

Are you running this over the web or the command line? If you are running
over the web, make sure that the web server's user has access to write the
db file AND to the write to the directory containing the db file (it needs
this in order to write the journal).


>
>  $dbh = new PDO('sqlite:db1.db');
> $result=$dbh->query("create table tbl2 (one varchar(10),two
> varchar(10));");
> var_dump($result);
> ?>
>

Can you show us the OUTPUT of that command?

And i highly recommend reading:

http://www.catb.org/~esr/faqs/smart-questions.html


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert not working for sqlite3

2011-07-08 Thread Black, Michael (IS)
I downloaded 5.3.6 from here -- I used the Thread Safe version Installer.

http://windows.php.net/download/



And you're script ran just fine and created this:

sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE tbl2 (one varchar(10),two varchar(10));
COMMIT;



I the modified your script to run a bit better as you will see "false" the 2nd 
time your script is run as the table already exists.

query("drop table if exists tbl2");
$result=$dbh->query("create table tbl2 (one varchar(10),two varchar(10));");
var_dump($result);
}
catch(PDOException $e)
{
  print "Oops!\n";
  print 'Exception : '.$e->getMessage()."\n";
}
?>



So now every time I run it we get this:

D:\php>php 
  string(52) "create table tbl2 (one varchar(10),two varchar(10));"
}



Michael D. Black

Senior Scientist

NG Information Systems

Advanced Analytics Directorate




From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of James_21th [james_2...@yahoo.com]
Sent: Thursday, July 07, 2011 8:50 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Insert not working for sqlite3

Dear all,

Thank you for all your valuable suggestion, it's good idea to put the whole
script here, also good idea everytime to check the result, so I put the whole
script here:
The $result always return false, it don't allow me to create a simple table, the
table name surely not exist, I change tbl3, 4, 5, all not able to create. (that
could be the same reason why insert is not working, if not even able to create
table, let alone insert.)

query("create table tbl2 (one varchar(10),two varchar(10));");
var_dump($result);
?>



- Original Message 
From: Stephan Beal 
To: General Discussion of SQLite Database 
Sent: Thu, 7 July, 2011 9:18:07 PM
Subject: Re: [sqlite] Insert not working for sqlite3

On Thu, Jul 7, 2011 at 2:17 PM, Simon Slavin  wrote:

> For each operation you should test the $result and check to see it's
> SQLITE_OK.
>

Or enable exceptions and you don't have to check for errors (because they
will cause an exception).

--
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Sqlite on SCO OpenServer 5.0.6

2011-07-08 Thread Frank Zipper
Hello - has anybody ever successfully compiled and installed Sqlite on 
SCO OpenServer 5.0.6?
If yes - how? Which are the prerequisites?

Thank's, Frank.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users