Re: [sqlite] values containing dash - not evaluated

2010-04-28 Thread jason d
On Mon, Apr 26, 2010 at 7:59 PM, Black, Michael (IS) wrote: > > First off confirm it's not a bug with sqlite2: > Michael , thank you for this checklist.  Here is what I have. > > sqlite> create table Groups (name varchar(10)); > sqlite> insert into Groups values('bob'); >

Re: [sqlite] values containing dash - not evaluated

2010-04-28 Thread jason d
On Mon, Apr 26, 2010 at 8:23 PM, Simon Slavin wrote: > > On 26 Apr 2010, at 1:04pm, Michal Seliga wrote: > > > i had similar problems and it was caused by microsoft office > > it didn't used ordinary dash but some strange character with different > > ascii code - so search

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Richard Hipp
On Wed, Apr 28, 2010 at 5:22 PM, Toby Ferguson wrote: > Guillame, > > If you have a highly concurrent application then Oracle's latest release of > BDB might be what you're looking for. It has a SQLite integration (version > 3.6.23, to be precise) and combines the best

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Toby Ferguson
Guillame, If you have a highly concurrent application then Oracle's latest release of BDB might be what you're looking for. It has a SQLite integration (version 3.6.23, to be precise) and combines the best of SQLite (API, SQL support etc.) with the best of BDB (concurrency, scaling and

Re: [sqlite] SQLite Wrapper

2010-04-28 Thread Toby
Java is written in C (at least, the JVM is). You can connect from Java to C using the Java Native Interface (JNI) - docs here: http://java.sun.com/docs/books/jni/ Here at Oracle we use it all the time - it is slower than writing directly in C, but allows one to extend Java to use the facilities

Re: [sqlite] SQLite Wrapper

2010-04-28 Thread Toby
Navaneeth - Java wrappers for SQLite3 are available from Christian Werner's site, including a JDBC wrapper. http://www.ch-werner.de/javasqlite/ This is the wrapper that is being shipped with Berkeley DB 11GR2. Toby On Apr 13, 10:17 pm, Navaneeth Sen B wrote: > Hi

Re: [sqlite] 1000 insert statements into empty table taking 20 seconds... very odd!

2010-04-28 Thread P Kishor
On Wed, Apr 28, 2010 at 4:08 PM, Ian Hardingham wrote: > Hey guys - this is my first post here, apologies if I violate any etiquette. > > I have a table I create with: > > CREATE TABLE IF NOT EXISTS globalRankingTable (id INTEGER PRIMARY KEY > AUTOINCREMENT, name TEXT NOT NULL

[sqlite] 1000 insert statements into empty table taking 20 seconds... very odd!

2010-04-28 Thread Ian Hardingham
Hey guys - this is my first post here, apologies if I violate any etiquette. I have a table I create with: CREATE TABLE IF NOT EXISTS globalRankingTable (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL UNIQUE, ranking TEXT, score REAL, record TEXT); I run a loop from a scripting

Re: [sqlite] Searching with like for a specific start letter

2010-04-28 Thread Tim Romano
A practical situation? Lexicographical applications and full-text applications against text corpora require indexed substring searches, including ends-with searches. (The FTS extension is not always a good fit.) I am glad that only the LIKE operator has been overridden in Adobe's version and in

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Jay A. Kreibich
On Wed, Apr 28, 2010 at 07:00:39PM +0100, Simon Slavin scratched on the wall: > > On 28 Apr 2010, at 6:53pm, Jay A. Kreibich wrote: > > > Once (some) pages are written to disk, you have uncommitted changes > > in the database file. Allowing readers could "leak" those > > uncommitted changes

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Simon Slavin
On 28 Apr 2010, at 6:53pm, Jay A. Kreibich wrote: > Once (some) pages are written to disk, you have uncommitted changes > in the database file. Allowing readers could "leak" those > uncommitted changes to other database connections, which is not > allowed under the ACID transaction model. >

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Jay A. Kreibich
On Wed, Apr 28, 2010 at 05:20:26PM +0200, Guillaume Duranceau scratched on the wall: > Hello all, > > While running a SQLite transaction writing into the DB (thus holding the > RESERVED lock), in case the memory cache becomes full, SQLite will try to > write the content of a dirty page into

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Dan Kennedy
On Apr 28, 2010, at 10:20 PM, Guillaume Duranceau wrote: > Hello all, > > While running a SQLite transaction writing into the DB (thus holding > the > RESERVED lock), in case the memory cache becomes full, SQLite will > try to > write the content of a dirty page into the DB. To do so, it

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Richard Hipp
On Wed, Apr 28, 2010 at 11:20 AM, Guillaume Duranceau < guillaume.duranc...@amadeus.com> wrote: > Hello all, > > I'm wondering why the EXCLUSIVE lock is not downgraded to a RESERVED lock > right after writing the dirty page into the DB. This doesn't seem to me as > an undoable task (the

[sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Guillaume Duranceau
Hello all, While running a SQLite transaction writing into the DB (thus holding the RESERVED lock), in case the memory cache becomes full, SQLite will try to write the content of a dirty page into the DB. To do so, it promotes the RESERVED lock to EXCLUSIVE. This can be annoying because

Re: [sqlite] Searching with like for a specific start letter

2010-04-28 Thread Jean-Christophe Deschamps
Tim, >But did I say that GLOB uses an index if it has been overloaded? No. I >wrote that if LIKE has been overloaded, queries that contain LIKE >won't use >the index. Typically, GLOB won't have been overridden too just >because LIKE >has been overridden: the rationale for overriding the

Re: [sqlite] Searching with like for a specific start letter

2010-04-28 Thread Tim Romano
Jean-Christophe, But did I say that GLOB uses an index if it has been overloaded? No. I wrote that if LIKE has been overloaded, queries that contain LIKE won't use the index. Typically, GLOB won't have been overridden too just because LIKE has been overridden: the rationale for overriding the

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Manoj M
Thanks for all help. Yes, its an application issue. We fixed it. Regards, Manoj Marathayil On Wed, Apr 28, 2010 at 5:16 PM, Richard Hipp wrote: > On Wed, Apr 28, 2010 at 7:30 AM, Alexey Pechnikov > wrote: > >> 2010/4/28 Manoj M

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Richard Hipp
On Wed, Apr 28, 2010 at 7:30 AM, Alexey Pechnikov wrote: > 2010/4/28 Manoj M : > > I am getting error message "near "?": syntax error" randomly while > > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > > 3". > > The SQL

Re: [sqlite] Hypothetical memory consumption question

2010-04-28 Thread Radcon Entec
I tried this, using plain ordinary Windows applications instead of services. One ran through ten insertions, and the other performed one insertion per second overnight. This morning, the 10-insertion application was taking 4.9 megabytes of memory, while the all-night version took 5.6

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Igor Tandetnik
Manoj M wrote: > I am getting error message "near "?": syntax error" randomly while > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > 3". I don't see how this error may arise from this query, seeing as it doesn't contain '?' anywhere. How exactly do you "execute" the

Re: [sqlite] Exclusive transactions over network

2010-04-28 Thread Max Vlasov
Jean-Christophe, from my experience it depends. We have several clients accessing a database shared on a 2003 server and no corruption took place so far, but sometimes freezing of a client was possible. Also when I did some artificial tests, when several clients tried to write on a constant basis

Re: [sqlite] CHECK constraints and type affinity

2010-04-28 Thread Igor Tandetnik
Black, Michael (IS) wrote: > Hmmm...when I get rid of the "+'" > CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); > the constraint works > > Seems to me that "+N" is the same as "abs(N)". I'm not even sure of what the > intent of "+N" would be??? A unary plus in SQLite is a no-op, but it suppresses

Re: [sqlite] CHECK constraints and type affinity

2010-04-28 Thread Black, Michael (IS)
Hmmm...when I get rid of the "+'" CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); the constraint works Seems to me that "+N" is the same as "abs(N)". I'm not even sure of what the intent of "+N" would be??? Michael D. Black Senior Scientist Northrop Grumman Mission Systems

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Igor Tandetnik
Alexey Pechnikov wrote: > 2010/4/28 Manoj M : >> I am getting error message "near "?": syntax error" randomly while >> executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, >> 3". > > The SQL "LIMIT 0, 3" is incorrect. Use "LIMIT 3 OFFSET 0" instead.

Re: [sqlite] CHECK constraints and type affinity

2010-04-28 Thread Igor Tandetnik
Dan Bishop wrote: > If I write > > sqlite> CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); > > the constraint is applied AFTER converting N to an integer. > > sqlite> INSERT INTO T1 VALUES('42'); > sqlite> INSERT INTO T1 VALUES('-5'); > SQL error: constraint failed A curious thing seems to happen.

Re: [sqlite] CHECK constraints and type affinity

2010-04-28 Thread Igor Tandetnik
Dan Bishop wrote: > sqlite> CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); > > the constraint is applied AFTER converting N to an integer. > > sqlite> INSERT INTO T1 VALUES('42'); > sqlite> INSERT INTO T1 VALUES('-5'); > SQL error: constraint failed How do you know? Both expressions below are true:

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Alexey Pechnikov
2010/4/28 Manoj M : > I am getting error message "near "?": syntax error" randomly while > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > 3". The SQL "LIMIT 0, 3" is incorrect. Use "LIMIT 3 OFFSET 0" instead. -- Best regards, Alexey

[sqlite] for LINQ-to-sql from C# which interface/drivers are the most solid to use?

2010-04-28 Thread Greg Hauptmann
Hi, Re using LINQ-to-sql from C# to Sqlite, which interface/drivers are the most solid to use? I'm come up with the following list so far however would appreciate some feedback re which are the most solid. http://www.devart.com/linqconnect/ http://code.google.com/p/dblinq2007/

[sqlite] Problems building on Tru64

2010-04-28 Thread Daniel Richard G.
Reporting issues against 3.6.23.1 after encountering one building Subversion 1.6.11 on Tru64 V4.0G: * -D_POSIX_C_SOURCE=199506L was needed in order to enable the necessary pthread functionality on this system. The Unix configure script should at least check that this is available. *

[sqlite] near "?": syntax error

2010-04-28 Thread Manoj M
I am getting error message "near "?": syntax error" randomly while executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, 3". Table schema: CREATE TABLE IF NOT EXISTS [ac_contacts_cache] ( [record] TEXT NOT NULL ) Any help here is appreciated. Regards, Manoj Marathayil

Re: [sqlite] SQLITE .import

2010-04-28 Thread Jens Miltner
Am 19.04.2010 um 20:11 schrieb P Kishor: >> 3) From a linux box whats the easiest way of backing up the db in perl or >> shell? >> >> Can I lock the $sqlitedb first (how?) and then cp $sqlitedb >> /usr/local/db/backup >> > > There is no concept of locking a db in sqlite. A sqlite db is

[sqlite] CHECK constraints and type affinity

2010-04-28 Thread Dan Bishop
If I write sqlite> CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); the constraint is applied AFTER converting N to an integer. sqlite> INSERT INTO T1 VALUES('42'); sqlite> INSERT INTO T1 VALUES('-5'); SQL error: constraint failed But if I write sqlite> CREATE TABLE T2 (N INTEGER CHECK(TYPEOF(N) =