Re: [sqlite] Custom collate - on field or index or both?

2007-03-01 Thread Dan Kennedy
On Thu, 2007-03-01 at 15:13 -0800, jp wrote: > Hi, I have a custom collation sequence (e.g. > mycollate). Are there any advantages in terms of > performance of declaring this collation at the table > level, instead of just at the index level? > > For example, if I have: > > CREATE TABLE peopl

Re: [sqlite] Last ID from Primary Key through ODBC

2007-03-03 Thread Dan Kennedy
On Sat, 2007-03-03 at 19:18 -0500, Mitchell Vincent wrote: > I found the nifty ODBC driver for SQLite and have been trying to use > it to replace a 2.8 SQlite implementation in some desktop software. > It's working very well except for a rather large problem of not being > able to call the last_id

Re: [sqlite] Question about shared cache and read_uncommitted

2007-03-09 Thread Dan Kennedy
On Sat, 2007-03-10 at 14:11 +0900, Brownie wrote: > Hi, > > I have two questions about shared cache mode of SQLite. > > 1. When is shared cache of SQLite deallocated? > A last call of sqlite3_close()? Or end of thread procedure? The former. The shared cache (and shared schema) are reference cou

Re: [sqlite] Question about shared cache and read_uncommitted

2007-03-10 Thread Dan Kennedy
ase of each connections are irrelevant ? Shared cache mode does not apply to :memory: databases. It is not currently possible for more than one database handle to access a single in-memory database. Dan. > Regards, > > 2007/3/10, Dan Kennedy <[EMAIL PROTECTED]>: > > On Sat, 20

Re: [sqlite] sqlite3_update_hook and transactions

2007-03-12 Thread Dan Kennedy
On Mon, 2007-03-12 at 10:51 +0100, Jef Driesen wrote: > I was planning to use the sqlite3_update_hook function to notify my GUI > about changes. The idea was that every part of the GUI can update itself > when a database change is detected. But during testing, I encountered > some problems with thi

Re: [sqlite] SQLite v/s SQLite3 Performance Assay

2007-03-12 Thread Dan Kennedy
> My Intentions are towards exploring the reason behind these differences; and > what can be > done to counter these performance differences. I'm seeking some pointers > from the Community. Version 3 has a different default safety-level (default FULL) to version 3 (default NORMAL). So if you did

Re: [sqlite] a problem trying to invoke sqlite3 commands from a C application

2007-03-19 Thread Dan Kennedy
On Tue, 2007-03-20 at 02:44 +0200, Rafi Cohen wrote: > Hi, I'm calling system from a C application in order to invoke sqlite3 > database, then continue with commands: .separator "," and .import file > table, all in a single string as argument to system. > sqlite3 is indeed invoked with the correct

Re: [sqlite] strict affinity mode

2007-03-23 Thread Dan Kennedy
On Fri, 2007-03-23 at 18:53 +0100, stephan nies wrote: > Hi I read about a "strict affinity mode" > on http://www.sqlite.org/datatype3.html. > > But from searching the net, i get the impression > that this mode is not yet implemented. > > I think it seems to be a FAQ since it is even listed > in

Re: [sqlite] CREATE TRIGGER IF NOT EXISTS throws error

2007-03-25 Thread Dan Kennedy
I think you need 3.3.8 or greater. On Mon, 2007-03-26 at 07:39 +0200, stephan nies wrote: > I am using sqlite 3.3.5 . > > On 3/25/07, Eric Pankoke <[EMAIL PROTECTED]> wrote: > > > > What version of SQLite are you using? I'm not sure the IF EXISTS option > > was present until a certain version o

Re: [sqlite] Error reporting problem

2007-03-26 Thread Dan Kennedy
On Mon, 2007-03-26 at 17:08 +0200, Vivien Malerba wrote: > On 3/26/07, Martin Jenkins <[EMAIL PROTECTED]> wrote: > > Vivien Malerba wrote: > > > Hi! > > > > > > I've got an error reporting problem when trying to insert a row which > > > breaks a UNIQUE constraint in a table in a C program, I get th

Re: [sqlite] matching only part of a string

2007-03-27 Thread Dan Kennedy
On Wed, 2007-03-28 at 12:27 +0530, Lloyd K L wrote: > Hi, > My table contains a text field called Name. Let the data be > > Name > --- > Abc > abcd > AB > cab > def > > I want to selcct all the rows which contains the term ab (not case > sensitive). How can I do this? SELECT name FROM "My

Re: [sqlite] The IN keyword

2007-03-28 Thread Dan Kennedy
> I am trying to use this query: > > SELECT * FROM Files WHERE extension IN ('mp3','avi','ogg'); > > I am not getting any row back though. > > SELECT * FROM Files WHERE extension='mp3' works though. If this is literally the case, it's probably a bug. > I am using sqlite3_step to execute a pre

Re: [sqlite] The IN keyword

2007-03-28 Thread Dan Kennedy
On Wed, 2007-03-28 at 11:11 +0200, Jonas Sandman wrote: > Yes, it seems so. > > Still, can this be done without knowing how many extensions there are on > beforehand? > what happens if I make a > > SELECT * FROM Files WHERE extension IN (:ext1, :ext2, :ext3, :ext4) and only > bind :ext1 but not t

Re: [sqlite] exclusive2.test failures

2007-04-03 Thread Dan Kennedy
> exclusive2-1.7... > Expected: [1] > Got: [2] > exclusive2-1.9... > Expected: [1] > Got: [0] > exclusive2-1.10... Ok > exclusive2-1.11... Ok > exclusive2-2.1... Ok > exclusive2-2.2... Ok > exclusive2-2.3... Ok > exclusive2-2.4... Ok > exclusive2-2.5... > Expected: [5] > Got: [3] >

Re: [sqlite] Re: Default sqlite memory management policy

2007-04-04 Thread Dan Kennedy
On Wed, 2007-04-04 at 23:36 -0400, Rich Rattanni wrote: > On 4/3/07, Rich Rattanni <[EMAIL PROTECTED]> wrote: > > All: > >I was wondering exactly how SQLite handles freeing memory used > > from the heap when compiled without SQLITE_ENABLE_MEMORY_MANAGEMENT? > > > >Will absolutely no memory

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread Dan Kennedy
On Thu, 2007-04-05 at 04:04 -0700, pompomJuice wrote: > Ok. > > I went and re-prepared the statement anyway even though the documentation > says it won't work. This trick only works if you finalize the failed > statement after the step command. Otherwhise you keep on getting > SQLITE_SCHEMA errors

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread Dan Kennedy
failing for? And are there any other SQL statements from the same handle active at the time? Definition of active: have called step() but not finalize() or reset(). Thanks, Dan. > Regards, > Werner > > > > > Dan Kennedy-4 wrote: > > > > On Thu, 2007-04-05 at

Re: [sqlite] in memory databases

2007-04-07 Thread Dan Kennedy
On Fri, 2007-04-06 at 13:22 -0700, Mike Johnston wrote: > Hi, > Is it possible to have memory databases located at a specific memory > address? I have a battery backed memory I'd like to store specific > information apart from the main database. Not really possible at the moment. An in-memory d

Re: [sqlite] Re: FTS does not support REPLACE

2007-04-10 Thread Dan Kennedy
On Mon, 2007-04-09 at 13:02 -0700, Scott Hess wrote: > Thanks for the concise report. I'm going to take a look at this > today, to see if it's an fts1/2 problem. If it's _not_, I'll still > look at it, but perhaps with less eventual success :-). I checked the code and conflict handling mechanism

Re: [sqlite] Re: FTS does not support REPLACE

2007-04-11 Thread Dan Kennedy
On Tue, 2007-04-10 at 09:26 -0700, Scott Hess wrote: > On 4/10/07, Dan Kennedy <[EMAIL PROTECTED]> wrote: > > I checked the code and conflict handling mechanisms (OR ERROR, > > OR ABORT, OR REPLACE) do not apply to virtual tables. > > > Something to think about

Re: [sqlite] SQLite Performance

2007-04-17 Thread Dan Kennedy
On Tue, 2007-04-17 at 11:53 +0100, Alberto Simões wrote: > Hi > > I've found SQLite faster than MySQL and Postgres for small/medium > databases. Now I have big ones and I really do not want to change, but > I have some performance issues. > > Consider the following database schema: > CREATE TABLE

Re: [sqlite] Still getting "Insertion failed because database is full." errors

2007-04-17 Thread Dan Kennedy
> At first I thought this had solved the problem, because all in house testing > runs beautifully. However, as soon as the device is sent to the field, the > error starts again. Unfortunately, it means that I have never been able to > catch this in debug. I did, however, change the error reporti

Re: [sqlite] SQLite Performance

2007-04-18 Thread Dan Kennedy
On Wed, 2007-04-18 at 11:06 +0100, Alberto Simões wrote: > On 4/17/07, Alberto Simões <[EMAIL PROTECTED]> wrote: > > On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > "=?ISO-8859-1?Q?Alberto_Sim=F5es?=" <[EMAIL PROTECTED]> wrote: > > > > > > > > Consider the following database schema:

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Dan Kennedy
On Wed, 2007-04-18 at 10:06 -0400, Joel Cochran wrote: > OK, then I won't be worrying about Transactions for SELECT statements, it > doesn't really apply to our application. > > And some additionaly confirmation that Christian seems to have been right on > key: according to the problems reported a

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-19 Thread Dan Kennedy
On Thu, 2007-04-19 at 13:29 -0500, David A O L wrote: > I have a very basic sql statement, mainly Im printing it... > > static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char > **azColName){ > int i; > char *nombre, *ok, *ko, *actividad; > nombre = ok = ko = activi

Re: [sqlite] testing with single source file

2007-04-20 Thread Dan Kennedy
On Fri, 2007-04-20 at 10:13 +0200, Jens Miltner wrote: > Am 20.04.2007 um 09:13 schrieb Jens Miltner: > > > > > Am 01.04.2007 um 20:05 schrieb Iulian Musat: > > > >> > >> [EMAIL PROTECTED] wrote: > >>> [...] > >>> In past releases of SQLite, we have made available a ZIP archive > >>> with preproce

Re: [sqlite] another test suite failure under Windows

2007-04-25 Thread Dan Kennedy
> It seems like the use_up_files command must work sometimes, since > several iterations of the test worked (i.e. 6.1.1 and 6.1.2). I'm not > sure what to make of the sequence of test failures and successes before > it finally hangs. > > Since the comment indicates that this test is designed f

Re: [sqlite] Conditional table select

2007-05-04 Thread Dan Kennedy
On Fri, 2007-05-04 at 18:22 -0400, Vitali Lovich wrote: > Hi, > > I was wondering what would be the optimal way to select 1 matching row > from multiple tables. Here is the scenario. > > Multiple tables contain a primary key KEY. If Table1 contains a > matching KEY, then I want that row from

Re: [sqlite] unicode like UPPER and LOWER ?

2007-05-08 Thread Dan Kennedy
On Tue, 2007-05-08 at 10:45 +0700, Kirill wrote: > Good day, > > SQLite version 3.3.17 > Enter ".help" for instructions > sqlite> create table tbl1(t1 varchar(10)); > sqlite> insert into tbl1 values('софт'); - lowChar > sqlite> insert into tbl1 values('СОФТ'); - upChar > sqlite> select * from tbl1

Re: [sqlite] My HPUX Notes

2007-05-08 Thread Dan Kennedy
On Mon, 2007-05-07 at 12:28 -0700, km4hr wrote: > Notes on how I got sqlite running on hpux 11.0 > > To install sqlite on hpux: > * download sqlite-3.3.17.tar.gz from web site. > (I unzipped the file on linux using gunzip I think. Then copied >the tar file to /opt on the unix box. I guess gu

Re: [sqlite] ATTACH and sqlite3_open()

2007-05-10 Thread Dan Kennedy
On Wed, 2007-05-09 at 16:18 -0700, Jon Scully wrote: > Simpler than that. I merely want to attach to two databases (files). > flash.db contains a set of tables that hold non-volatile data; ram.db > contains a set of tables that is re-built (volatile) on re-boot -- but > offers fast, read-only acce

Re: [sqlite] Column order in resultset

2007-05-12 Thread Dan Kennedy
On Sat, 2007-05-12 at 08:02 -0700, Mike Johnston wrote: > When doing a "select * from foo" and using sqlite3_step() with > the associated sqlite3_column_xx funcs, is the order of the > columns in the resultset deterministic? > > What is the rule that defines what the order? > it seems to be th

Re: [sqlite] SQLITE_ERROR in sqlite3_prepare

2007-05-15 Thread Dan Kennedy
On Tue, 2007-05-15 at 13:47 +0530, B V, Phanisekhar wrote: > Hello all, > > When I try to prepare the stmt for the query "PRAGMA > cache_size = ?" I am getting an SQLITE_ERROR. You can only use '?' in place of an SQL expression. PRAGMA commands take a literal string, identifier or nu

Re: [sqlite] Re: sqlite3_column_xxx question

2007-05-15 Thread Dan Kennedy
On Tue, 2007-05-15 at 17:24 -0700, Mike Johnston wrote: > Absolutely but it seems like duplicate effort if sqlite already has the info. > Any guess if this is a big deal to put into the source? Not a big deal at all. But there's no real advantage to putting this in the core. And it would add a f

RE: [sqlite] Re: Re: Order of result of a query?

2007-05-16 Thread Dan Kennedy
On Wed, 2007-05-16 at 11:39 +0530, B V, Phanisekhar wrote: > Igor, > > Assume I have a database of the files/folders. > > Let it be > > Rowid puid > 1 1 > 2 2 > 3 3 > 4 5 > 5 7 > 6 8 > 7 10 > > Assume I have a relation table showing which file is in which folder > >

Re: [sqlite] Re: Problem with Unicode surrogates

2007-05-17 Thread Dan Kennedy
On Thu, 2007-05-17 at 16:54 +0200, Jiri Hajek wrote: > > The Unicode standard is beside the point. There is lots of code > > that does not handle charsets and encodings correctly, which can > > open vulnerabilities to metacharacter injection. (Examples of > > this class of problem are SQL injection

Re: [sqlite] One more SQLite threading question

2007-05-17 Thread Dan Kennedy
On Thu, 2007-05-17 at 18:26 -0400, Martin Gentry wrote: > Can you be a bit more specific? :-) I ask because this is immediately > relevant to some code I'm writing today, and have been operating on the > understanding that I should honour the restriction. I'm fine with honouring > the restrict

RE: [sqlite] One more SQLite threading question

2007-05-18 Thread Dan Kennedy
> Which in that case whats the point of a shared cache? > What is it shared against, since all threads must send > data to the shared server anyways and none may access > it concurrently. The idea is to have a single cache shared accessed by more than one logical connection (read: more than one

RE: [sqlite] One more SQLite threading question

2007-05-18 Thread Dan Kennedy
erform db access. And all clients are queued and blocked upon the > single threads message queue. > > Thanks, > Ken > > > > > Dan Kennedy <[EMAIL PROTECTED]> wrote: > > Which in that case whats the point of a shared cache? > > What

Re: [sqlite] --prefix

2007-05-29 Thread Dan Kennedy
On Tue, 2007-05-29 at 13:11 -0700, Smith1, Robert E wrote: > Hi, > > I am trying to install sqlite3 on Sun Solaris 2.8. I am not root so I > cannot install to /usr/local. I start configure with > --prefix=/ptmp/usr/localto try to get it to install to a different > directory. But I get the sa

Re: [sqlite] Sqlite 3 Crash on OSX

2007-06-02 Thread Dan Kennedy
On Fri, 2007-06-01 at 10:51 +0100, Mark Gilbert wrote: > Folks. > > My app just crashed in the field randomly after some time running fine. > > Thread 12 Crashed: > 0 libsqlite3.0.dylib0x9406e587 sqlite3pager_get + 390 > 1 libsqlite3.0.dylib0x94054275 sqlite3Bt

Re: [sqlite] Stack usage

2007-06-06 Thread Dan Kennedy
On Tue, 2007-06-05 at 13:35 +0200, [EMAIL PROTECTED] wrote: > I'v read in change log that some stack allocted memory were moved to the > heap, but I think that there is still to much allocated memory on the stack. > After creating a table with 2000 columns, jdbc driver created a query that > run

Re: [sqlite] Stack usage

2007-06-06 Thread Dan Kennedy
On Wed, 2007-06-06 at 13:38 +0200, [EMAIL PROTECTED] wrote: > > There have been some recent changes to try to address this > > by placing various limits on number of columns, length of > > SQL expressions, length of SQL statements etc. See: > > > > http://www.sqlite.org/cvstrac/fileview?f=sqlite

Re: [sqlite] Truncate Issue

2007-06-08 Thread Dan Kennedy
On Fri, 2007-06-08 at 09:50 +0530, Jimmy Mathew Ambalathuruthel wrote: > Hi all, > > I am working in a porting project of SQLite from windows. > > I Could not port the Truncate () function (For Eg: WinTruncate () in > windows code in the file os_win.c ) as the same logic cannot be applied > t

RE: [sqlite] Amalgamation questions

2007-06-10 Thread Dan Kennedy
On Sun, 2007-06-10 at 16:08 -0700, Brett Keating wrote: > Well I basically did the following, but not sure it's optimal: > > 1) Took 3.3.17 amalgamation > 2) Took shell.c from 3.3.17 full distribution, and made a target that > just uses sqlite3.c and shell.c to get the command line tool > 3) Took

Re: [sqlite] Re: sqlite_omit_xx build failure

2007-06-12 Thread Dan Kennedy
On Tue, 2007-06-12 at 09:56 +0200, weiyang wang wrote: > Hi Dr.H, > Yes, I did a clean build in a clean directory( (top)/bld ). and i had run > 'make clean' before i run the 'make'. > > i am wondering whether the lemon tool configuration in my environment is > well done or not. > > thanks in adva

Re: [sqlite] PRAGMA cache_size = 0

2007-06-14 Thread Dan Kennedy
> What exactly happens when I change the cache_size (both increase and > decrease size)? A variable is set. > What happens to the data that's there in the result cache at the time > when the instruction PRAGMA cache_size = 0 is executed? Nothing. The aforementioned variable is set to 10 inste

Re: [sqlite] SQLite 3.X Database File Format ?

2007-06-15 Thread Dan Kennedy
On Thu, 2007-06-14 at 15:08 -0700, Joe Wilson wrote: > Is there an SQLite 3.x equivalent document for this? > > SQLite 2.X Database File Format > http://sqlite.org/fileformat.html > > If not, is this 2.x document worth reading as a background to > the general structure of the sqlite 3.x file

Re: [sqlite] Journal File Optimization

2007-06-18 Thread Dan Kennedy
On Mon, 2007-06-18 at 06:04 -0500, John Stanton wrote: > Andre du Plessis wrote: > > How can one optimize the creation of the journal file. The problem is > > this, for our system which is an event based one each message needs to > > be insterted and committed to the database (guaranteed), this res

Re: [sqlite] Proper way to transfer a live sqlite database

2007-06-18 Thread Dan Kennedy
On Tue, 2007-06-19 at 00:46 +0100, Michael Hooker wrote: > Christian wrote: > > >>Best way of doing this is to execute a 'BEGIN IMMEDIATE', copying the > database file, then executing a 'ROLLBACK' to end the transaction.<< > > >>and can be safely copied at the OS level<< > > I also have a need t

Re: [sqlite] Step Query

2007-06-18 Thread Dan Kennedy
On Tue, 2007-06-19 at 10:58 +0530, anand chugh wrote: > Hi > > I am having code like this: > >rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); >if( rc!=SQLITE_OK ){ > return rc; >} >sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); >sqlite3_bind_blob(pStmt, 2, zBlob, nB

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Dan Kennedy
On Tue, 2007-06-19 at 01:06 -0700, pompomJuice wrote: > Hello there. > > I need some insight into how SQLite's caching works. I have a database that > is quite large (5Gb) sitting on a production server that's IO is severely > taxed. This causes my SQLite db to perform very poorly. Most of the tim

Re: [sqlite] problems with .dump procedure

2007-06-19 Thread Dan Kennedy
On Tue, 2007-06-19 at 09:42 +0200, Roberto Davico wrote: > Hi all, > >I am Roberto and I find a problem using sqlite3 (version: SQLite > version 3.3.8). > >I make a sample db to explain the situation: > >1) Create the sample database using command line tool: > > sqlite> .schema > C

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Dan Kennedy
> My question is then, if any one connection makes any change to the database > ( not neccesarily to the huge lookup table ) will all the other connections > invalidate their entire cache? Yes. The entire cache, regardless of what table was modified etc. Dan.

Re: [sqlite] Re: How to use pragmas from code?

2007-06-19 Thread Dan Kennedy
On Tue, 2007-06-19 at 15:39 -0400, Igor Tandetnik wrote: > Shane Harrelson > <[EMAIL PROTECTED]> wrote: > > To use pragmas from code, do I simply prepare them as a regular SQL > > statement and then execute them? > > Yes. Another thing to note: Some pragmas take effect during sqlite3_prepare(),

Re: [sqlite] Proper way to transfer a live sqlite database

2007-06-19 Thread Dan Kennedy
On Tue, 2007-06-19 at 11:51 -0700, Gerry Snyder wrote: > Michael Hooker wrote: > > Many thanks for the explanation Dan. > Ditto the thanks. > > I suspected the purpose of ROLLBACK was as you say, but couldn't see > > why it was used here. You point out the "under the hood" difference > > betwe

RE: [sqlite] More SQLite Misuse, sorted i think

2007-06-20 Thread Dan Kennedy
On Wed, 2007-06-20 at 11:05 +0200, Andre du Plessis wrote: > Sorry if I created any confusion there were some code that seemed to > have called > Sqlite_reset simultaneously from more than one thread, even though the > statements were unique for each thread the call to the library was not > locked.

RE: [sqlite] More SQLite Misuse, sorted i think

2007-06-20 Thread Dan Kennedy
> Hope that is more clear. Perfectly. I get it now. As you say in the other post, every sqlite call needs to be inside the critical section, including sqlite3_finalize(). Dan. - To unsubscribe, send email to [EMAIL P

Re: [sqlite] The problem with index

2007-06-20 Thread Dan Kennedy
> Another question: Is it correct that virtual tables can be created using > Perl but not Tcl? I don't have a current need (with the possible > exception of FTS1/2, which are already accessible from Tcl), but the > situation seemed curious. Wondering whether there was an undocumented > capabil

Re: [sqlite] Trigger on Attached Database

2007-06-21 Thread Dan Kennedy
On Thu, 2007-06-21 at 11:57 +0200, Andre du Plessis wrote: > Is it possible to do this: > > > >Open DB1 > >Attatch DB2 > > > > > > In DB1 have a trigger that does > > Insert into DB2. ? > > > > > > Theoretically it seems possible but we couldn't get it to work. Before I

Re: [sqlite] Unicode collation

2007-06-22 Thread Dan Kennedy
On Fri, 2007-06-22 at 18:57 +0200, Jiri Hajek wrote: > Hello, > > I wonder whether there are any plans to include internally proper > Unicode comparisons? Don't get me wrong, I think that it's great that > SQLite supports custom collations, there's absolutely no problem to > handle it in internall

Re: [sqlite] Unicode collation

2007-06-23 Thread Dan Kennedy
On Sat, 2007-06-23 at 10:56 +0200, Jiri Hajek wrote: > > The reason is as you've surmised. Not all systems have full unicode > > support (I'm not sure, but if I had to guess, I would say very few > > systems do). Including an implementation with SQLite would bloat > > the library to at least severa

Re: [sqlite] pragma page_count

2007-06-25 Thread Dan Kennedy
On Mon, 2007-06-25 at 17:08 -0500, Andrew Finkenstadt wrote: > How easy would it be for me to implement a "pragma page_count;" statement > which returns the CURRENT page count of the database, and is much more > cross-platform than my attempt to just "check the file size". Not difficult I would th

Re: [sqlite] colname=22 vs colname='22'

2007-06-26 Thread Dan Kennedy
On Tue, 2007-06-26 at 17:50 -0400, jose isaias cabrera wrote: > Greetings. > > I have the following db declarations: > > SQLite version 3.3.8 > Enter ".help" for instructions > sqlite> .schema > CREATE TABLE LSOpenJobs > ( > id integer primary key, ProjID integer, subProjID, pare

Re: [sqlite] Statements that return a result set?

2009-07-30 Thread Dan Kennedy
On Jul 30, 2009, at 5:12 PM, Robert Villanoa wrote: > Hi folk, > > I am new to SQLite, and I have a question: In SQLite, is there a > statement apart from SELECT statement that can return a result set? > Or the SELECT statement is the only statement that can return a > result set? As well

Re: [sqlite] SQL error: database disk image is malformed - other possibility than dump/load

2009-07-31 Thread Dan Kennedy
On Jul 31, 2009, at 12:00 AM, rupert.thurner wrote: > is there another possibility but exporting and importing the data to > get rid of: > SQL error: database disk image is malformed > ? > > here the details of the error and the commands we used. but we are not > sure why exporting works and va

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-02 Thread Dan Kennedy
On Aug 2, 2009, at 6:25 PM, Kosenko Max wrote: > > 9/30054 means 99.97% tests are working. > That's a great achievement anyway. > Performance problems can be profiled and optimized simpler than with > native > version. > > That isn't a nature of managed code to be slow. i.e. Perst DB which is >

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-03 Thread Dan Kennedy
On Aug 3, 2009, at 2:06 PM, Kosenko Max wrote: > > > Dan Kennedy-4 wrote: >> McObject CEO Steve Graves points out that because of limits of the >> API >> they were using, SQLite performs each INSERT and DELETE in the test >> in a >> separate transaction

Re: [sqlite] help with inconsistent results and segfault

2009-08-03 Thread Dan Kennedy
On Aug 4, 2009, at 4:58 AM, Pavlos Christoforou wrote: > Hello all, > > We are currently evaluating sqlite for using it as the > base engine for a financial reporting module. We have some > fairly complex queries which yield strange results. We have > tried to isolate the problem below. Please se

Re: [sqlite] Disk I/O error on AIX

2009-08-03 Thread Dan Kennedy
On Aug 4, 2009, at 5:11 AM, Ken wrote: > > Hi, > > I'm getting a Disk I/O error when committing a transaction on an AIX > system. > The file system is JFS. > > > The extended result code is 1290. Which i believe means that the > extended code is a SQLITE_IOERR_DIR_FSYNC error. > > Any ideas w

Re: [sqlite] Disk IO ERROR on AIX

2009-08-07 Thread Dan Kennedy
On Aug 4, 2009, at 5:07 AM, Kenneth Long wrote: > > Hi, > > I'm getting a Disk I/O error when committing a transaction on an AIX > system. > > The extended result code is 1290. Which i believe means that the > extended code is a SQLITE_IOERR_DIR_FSYNC error. > > Any ideas why this is happenin

Re: [sqlite] SQLite version 3.6.17

2009-08-13 Thread Dan Kennedy
On Aug 13, 2009, at 4:58 PM, Hugh Sasse wrote: > On Thu, 13 Aug 2009, Mike Frysinger wrote: > >> On Thursday 13 August 2009 05:04:26 Hugh Sasse wrote: >>> On Wed, 12 Aug 2009, Mike Frysinger wrote: On Monday 10 August 2009 11:51:40 Hugh Sasse wrote: > Make check doesn't do anything. My r

Re: [sqlite] SQLite version 3.6.17

2009-08-14 Thread Dan Kennedy
On Aug 14, 2009, at 5:14 PM, Hugh Sasse wrote: > The upshot of my tests on Solaris9 was: > > WARNING: Multi-threaded tests skipped: Linked against a non- > threadsafe Tcl build > All memory allocations freed - no leaks > Memory used: now 0 max5727984 max-size > 1717987

Re: [sqlite] FTS3 and negation operator

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 9:32 AM, cscs-sql...@usa.net wrote: > > Did an FTS3 update change how many negation operators (dash/-) can > be used in > a > match statement? > > For example, in sqlite3.dll version 3.5.7: > > colname match 'tetons -bend -jackson -oxbow* -parks' works as > expected; bend,

Re: [sqlite] 3.6.17 test failure

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 2:14 AM, Ken wrote: > I'm not sure if this an issue or not. make test failed with the > following: > > 2 errors out of 40872 tests > Failures on these tests: rollback-2.3 tkt3457-1.4 > All memory allocations freed - no leaks > Memory used: now 0 max 1

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 1:08 PM, His Nerdship wrote: > > Good day, > We have a puzzling problem with a large (1GB+) database. > Most of our queries are based on 3 columns, say X, Y and Z. > X is always the first in the index. However, sometimes the query > involves a > small range of Y and a large

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 1:34 PM, Jim Showalter wrote: > How will that help him fix this problem, if the problem is that > SQLite's query optimizer is selecting a suboptimal index to use, and > there is no way to specify which index to use? The statistics collected by the ANALYZE command will be used

Re: [sqlite] debugging sqlite with gdb

2009-08-15 Thread Dan Kennedy
On Aug 15, 2009, at 6:45 AM, udd...@cs.ucr.edu wrote: > Hey, > I am running sqlite-3.6.16. I am getting segmentation fault and so > trying > to run sqlite with gdb. But I am getting following error- > > /sqlite-3.6.16/sqlite3": not in executable format: File format not > recognized Could be

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Dan Kennedy
On Aug 17, 2009, at 11:05 AM, John Machin wrote: > On 17/08/2009 11:41 AM, Shane Harrelson wrote: >> INDEXED BY doesn't allow you to specify which index to use. It >> just causes >> the query to fail if SQLite thinks it should use an index different >> then the >> one specified by the INDEXE

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-17 Thread Dan Kennedy
>> The INDEXED BY feature was introduced to address concerns that SQLite >> might >> suddenly start using a different plan for a query in the field than >> it >> did >> in the office during testing. Either because somebody ran ANALYZE, or >> because >> the SQLite version was upgraded. In this sit

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote: > You can always do > > insert into table (id, count) values (?1, (select count(*) + 1 from > table where id = ?1)) > > Though I'd be cautious about race condition that seems like possible > here when after select returned some value and before in

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 12:54 AM, Dan Kennedy wrote: > > On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote: > >> You can always do >> >> insert into table (id, count) values (?1, (select count(*) + 1 from >> table where id = ?1)) >> >> Though I'

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 1:01 AM, Pavel Ivanov wrote: >> Cannot happen. If not executed within an implicit transaction, each >> SQL statement is effectively wrapped in a transaction all of its own. > > So executing the insert/update/delete statement places RESERVED lock > right from the start before e

Re: [sqlite] Huge numbers of savepoints.

2009-08-19 Thread Dan Kennedy
On Aug 19, 2009, at 3:07 PM, Chris Dew wrote: > http://www.sqlite.org/lang_savepoint.html > I'm looking for a datastore with the following properties: > * I need to 'mark' the state frequently (sub second interval). > * I need to be able to revert the datastore to a previous mark (with > no > a

Re: [sqlite] about journal file

2009-08-27 Thread Dan Kennedy
On Aug 28, 2009, at 11:30 AM, Zhanjun You wrote: > Date: Thu, 27 Aug 2009 21:50:15 -0400 > From: "Igor Tandetnik" > Subject: Re: [sqlite] about journal file > To: sqlite-users@sqlite.org > Message-ID: > > Zhanjun You wrote: >> I can not find how to implement the method to deal with journal >> f

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-29 Thread Dan Kennedy
On Aug 30, 2009, at 12:08 AM, carlos.tas...@farmerswife.com wrote: > Hi Gerry, > > That's the first thing I tested. I downloaded this file: > http://sqlite.org/tclsqlite-3.6.17.so.gz > > Does anyone else have the same problem? I'm using ActiveTcl 8.5.4. Does [puts $tcl_patchLevel] confirm that y

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-29 Thread Dan Kennedy
On Aug 30, 2009, at 12:23 AM, carlos.tas...@farmerswife.com wrote: > Hi Dan, > > Yes I can confirm it. As more info here is the size of the so > > 407348 2009-08-29 19:03 tclsqlite-3.6.17.so Are you using 64-bit linux? Dan. ___ sqlite-users mailing l

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE TA

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE TA

Re: [sqlite] Importing data into SQLite

2009-09-07 Thread Dan Kennedy
On Sep 7, 2009, at 9:32 AM, Kavita Raghunathan wrote: > Timothy and all, > When I try to import a .csv, I get a segmentation fault: > 1) First I set .seperator to , > 2) Then I type .import > 3) I see "Segmentation fault" Which version of SQLite is this happening with? ___

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 1:58 PM, gprand wrote: > > Hi Richard, > > First, thanks for replying to my problem. > > Definitely answer to your assumptions ist no. I can see the correct > sql > statement into the debugger, nothing is malformed. Checking > sizeof(char) > delivers 1. Processing the firs

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 4:32 PM, rishabh wrote: > > i have a stream of data coming in with constant table names and data. > one of the table names contains a '-' (minus sign). it gives error > while > creating the table. > > SQL error: near "-": syntax error > something like Create table "t-t" ( a

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Dan Kennedy
On Sep 12, 2009, at 12:01 AM, Simon Slavin wrote: > > On 11 Sep 2009, at 5:45pm, D. Richard Hipp wrote: > >> The second major enhancement is that SQLite now support recursive >> triggers. The older non-recursive behavior of triggers is still the >> default behavior. Recursive triggers are activat

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
xa025b858, zSql=0xa01a893c "select > * from > user", nBytes=-1, ppStmt=0xa0252d78, pzTail=0xa0252d7c) > (SQLite\prepare.c:765) > > #24 A003BF98 sqlite3_exec(db=0xa025b858, zSql=0xa01a893c "select * > from > user", xCallback=0xa003fcd0 , pArg=0x0, pzErrMs

Re: [sqlite] First "SELECT" query fails

2009-09-13 Thread Dan Kennedy
On Sep 14, 2009, at 1:35 PM, wrote: > Hi, > Any help to the below problem is of great help. Please check if this happens with 3.6.18. I think these issues may be fixed now. Dan. > Regards, > Reddy > > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-bo

Re: [sqlite] Force the use of a specified index?

2009-09-17 Thread Dan Kennedy
On Sep 17, 2009, at 5:02 AM, Bart Smissaert wrote: > Is it possible to tell SQLite to use a specified index? > I know you can use the + to excludes fields being used in an index, > but this doesn't help me in this particular case. I remember a > discussion about this and that this option might be

Re: [sqlite] List of active savepoints names

2009-09-22 Thread Dan Kennedy
On Sep 22, 2009, at 2:38 PM, Lukas Gebauer wrote: >> A simple rule of thumb is to look at how useful features would be to >> other SQLite users. Note that you are the only one to have asked for >> this feature and not one other person has agreed with you on its >> need! >> The responses have g

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-24 Thread Dan Kennedy
On Sep 24, 2009, at 7:04 PM, CityDev wrote: > > Thanks for that Sebastian. > > It does however surprise me. I believe Access Jet handles simultaneous > activities. Indeed I've got a feeling it does row-locking rather than > page-locking. It's odd that SQLite has such a limitation. Anyway, > you

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: > My memory manager reports that the SQL below results in memory being > reused after it has already been freed when it is RUN FOR A SECOND > TIME on the same database connection. Hi Ralf, Thanks for this report. I'm unable to reproduce the pr

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:09 AM, Ralf Junker wrote: > At 14:04 29.09.2009, Dan Kennedy wrote: > >> On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: >> >>> My memory manager reports that the SQL below results in memory being >>> reused after it has already be

<    1   2   3   4   5   6   7   8   9   10   >