Re: [sqlite] Database locked after crash

2005-05-17 Thread Dan Kennedy
Can you post code? --- Jaap Krabbendam <[EMAIL PROTECTED]> wrote: > > Hi, > > I have been simulating a crash during a transaction. After BEGIN, at some > point > I do exit(-1) instead of COMMIT or ROLLBACK in order to simulate a crash. > > After that, I can see that a -journal file is

Re: [sqlite] Problem with memory using Tcl-defined SQL functions

2005-05-20 Thread Dan Kennedy
> The problem is that, when I send a query that uses a Tcl-defined SQL > function to the database, it starts allocating memory that is not freed > afterwards, until I close the Tcl interpreter. Memory leak in Tcl interface code. Fixed in cvs now.

Re: [sqlite] novice sql generation

2005-05-20 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > I am trying to write my first application using sqlite in perl. > The perl part is no problem, but I have not used sql before and > am having some difficulty. > > I have three tables: > > CREATE TABLE i2u(i UNIQUE, u); > INSERT INTO i2u

Re: [sqlite] Changing default PRAGMA SYNCHRONOUS at compile time

2005-05-31 Thread Dan Kennedy
--- nickg <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm on a Mac, OX 10.4.1, and Sqlite works great, except it seems > to be defaulting to PRAGMA SYNCHRONOUS=FULL (3) instead of > "NORMAL" (2). This is painfully slow. > While I can send 'set pragma synchronous=normal' at every write,

Re: [sqlite] Basic Text Bind Question

2005-06-07 Thread Dan Kennedy
> size = sprintf( buf, "SELECT * FROM People WHERE lname = '?'" ); ^^^ > rc = sqlite3_prepare( database, buf, -1, , 0 ); > sqlite3_bind_text(statement, 1, "Fullman", 7, SQLITE_STATIC ); > rc = sqlite3_step(statement); As others have

Re: [sqlite] Problem with ORDER BY involving ROUND

2005-06-09 Thread Dan Kennedy
> Is there any reason why ROUND doesn't return a double? Because the IEEE storage format most (all?) computers use to store floating point numbers is binary based, many values that can be stored exactly in a base 10 system are rounded slightly to fit into the binary system. This is similar to

Re: [sqlite] Reads and Writes

2005-06-14 Thread Dan Kennedy
> I can imagine a protocol that will improve performance by keeping track > of whether the database was updated, which would allow a quick > determination whether a program's cache was still valid. The idea is to > increment a 'version number' in the database file as soon as a program > obtains a

Re: [sqlite] stored procedures

2005-06-14 Thread Dan Kennedy
One reason might be that SQLite does not usually include anything that can be just as well implemented externally. I could be missing something, because I'm not really sure of the advantages of stored procedures, but it seems to me that an implementation could be created without modifying

Re: [sqlite] New SQLite 3.x C++ Wrapper

2005-06-17 Thread Dan Kennedy
> I have updated my SQLite 3.x C++ wrapper (at > http://dev.int64.org/sqlite.html). What do you think of the idea of handling SQLITE_SCHEMA internally instead of throwing an exception? __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check

Re: [sqlite] sqlite3_column_blob(...) and finalize

2005-06-24 Thread Dan Kennedy
> When I finalize the select statement, the memory pointed to > by the pointer returned by > > const void * sqlite3_column_blob(...) > > is cleared. > > Is this the expected behaviour? The pointers returned by column_blob(), column_text() and column_text16() are only valid until the next call

Re: [sqlite] UNIQUE Constraint but case sensitive

2005-06-24 Thread Dan Kennedy
> Hi, > > I need to create a unique constraint on a column of type varchar, but it is > not case sensitive by default. > Does any one know how to make a unique constraint case sensitive? > CREATE TABLE abc(a UNIQUE COLLATE NOCASE); Bear in mind that the "NOCASE" collation sequence only

Re: [sqlite] What happens to unused space?

2005-07-04 Thread Dan Kennedy
> Hi, > > Before I go diving into the SQLite source code, can anyone tell me what > happens to unused space? (i.e. from deleted data in the db) > > Specifically, I'm interested in whether it gets over-written by zeroes, > or something. I'm storing information in a database (in a blob field),

Re: [sqlite] difference between sqlite3_reset() and sqlite3_clear_bindings()

2005-07-07 Thread Dan Kennedy
--- Patrick Dunnigan <[EMAIL PROTECTED]> wrote: > Can someone please explain the difference between sqlite3_reset() and > sqlite3_clear_bindings() > and when would I use one over the other. _clear_bindings() sets the bound values of all SQL variables in a compiled statement to NULL. I don't

RE: [sqlite] Binding a column name?

2005-07-10 Thread Dan Kennedy
> Actually I doubt it can - since without the column name it can't create the > prepared statement byte code, right? Right. It can't be done. > > Is it possible for a bind variable to be a column name? I'd like to make a > query which is: > > select from MyTable; > > and I'd like the

Re: [sqlite] Possible enhancement to SQL logic

2005-07-11 Thread Dan Kennedy
Won't work unfortunately. Currently indices are never used if the WHERE clause has an OR expression in it. --- Aaron Burghardt <[EMAIL PROTECTED]> wrote: > Try adding another index: > > CREATE INDEX a_f1_f2 ON a (f1, f2); > > Does that help? > > Aaron Burghardt > > On Jul 11, 2005, at 6:07

Re: [sqlite] update statements inside select...case inside triggers

2005-07-12 Thread Dan Kennedy
> CREATE TRIGGER trigger_name AFTER UPDATE ON table > BEGIN > SELECT CASE > WHEN a_condition THEN > UPDATE another_table SET a_field=a_value WHERE yet_another_condition > WHEN another_conditon THEN > UPDATE another_table SET a_field=another_value WHERE >

Re: [sqlite] make fails on Solaris

2005-07-15 Thread Dan Kennedy
See if your installation has "nawk" or "gawk". Then search through Makefile.in and change the "awk" invocations to "nawk" or "gawk" (three changes). It might work then. --- H S <[EMAIL PROTECTED]> wrote: > You are right. opcodes.h is corrupted. It has 0 byte.. > > I have all other files:

Re: [sqlite] sqlite3_set_authorizer

2005-07-26 Thread Dan Kennedy
--- Marco Bambini <[EMAIL PROTECTED]> wrote: > From the official documentation of the sqlite3_set_authorizer routine: > "This routine registers a callback with the SQLite library. The > callback is invoked (at compile-time, not at run-time) for each > attempt to access a column of a table

Re: [sqlite] ORDER BY question

2005-07-26 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > > Hello, > > I'm using sqlite3 and have a list of numbers I'd like returned sorted in > increasing order: > 1 1.1 1.10 1.11 1.9 10 11 9 12 > > However, if their column is defined as numeric, the 1.10 gets converted to > 1.1 (which is not what I want) and the

Re: [sqlite] ORDER BY question

2005-07-27 Thread Dan Kennedy
that but got: "no such collation sequence: NUMERIC" > > > > > > > > >

Re: [sqlite] Qn on Transaction across 2 DBs

2005-08-04 Thread Dan Kennedy
--- R S <[EMAIL PROTECTED]> wrote: > Hi, >I have a requirement where I need to update 2 tables in 2 separate > DBs within a transaction. Do I need to attach the second table to the > first at the start of the transaction? As I understand SQLite commits > a transaction across a single DB

Re: [sqlite] ORDER BY Does not work

2005-08-12 Thread Dan Kennedy
In the file where.c, near the bottom of the function isSortingIndex there is a line: if( j>=nTerm || (i>=pIdx->nColumn && pIdx->onError!=OE_None) ){ Comment out the second part of the expression as follows: if( j>=nTerm /* || (i>=pIdx->nColumn && pIdx->onError!=OE_None) */){ At the moment I'm

Re: [sqlite] LIKE faster than =

2005-09-02 Thread Dan Kennedy
This could be because '=' can use an index but LIKE cannot. If the column that is part of the '=' expression ("columnname" in your example) has an index, and contains many rows with the same value (i.e 'abcd'), then using the index will be slower than the linear table scan forced by LIKE. In

Re: [sqlite] Null values in Primary Key

2005-09-03 Thread Dan Kennedy
NULL = NULL is false. It's an SQL thing - go figure. Try: SELECT * FROM test WHERE b IS NULL; http://www.sqlite.org/nulls.html --- Matt Froncek <[EMAIL PROTECTED]> wrote: > I am using SQLCrypt and it returns SQLite Library number 3002002. I have > tried with Encryption on and off. > > Why

Re: [sqlite] questions from a new user

2005-09-10 Thread Dan Kennedy
> > 2. Could someone give me a brief overview on how to insert and retrieve > BLOB data in SQLITE? It seems to me that sqlite3_exec is fine for > selecting and inserting rows when the column data being used is a > 0-terminated string. But what is the general approach if one or more >

Re: [sqlite] Problem with floating point fields, and a feature request

2005-09-20 Thread Dan Kennedy
> two floats A and B should be compared with this algorithm : > > diff=A-B > if (diff>tolerance) then A>B > else if (diff<-tolerance) then A else A = B You could define a new collation sequence to do all that. However, it's difficult to say what will happen when you have three numbers A, B and

RE: [sqlite] Problem with floating point fields, and a feature request

2005-09-21 Thread Dan Kennedy
--- Cariotoglou Mike <[EMAIL PROTECTED]> wrote: > collating sequences do not apply to floating point comparisons, do they? Hmmm, excellent point. Guess I didn't think too hard about that one. But the other point is the real show-stopper, how should the software deal with the circumstances

Re: [sqlite] Function to find the size returned data size from a SELECT??

2005-09-21 Thread Dan Kennedy
> I was wondering if there was a way to find the size of data that will be > returned before actually making the call to sqlite3_get_table which will > return a pointer to a malloc'd memory location. My question is really: can I > find the required memory size before the call? The short answer

Re: [sqlite] Rewriting a query

2005-09-28 Thread Dan Kennedy
What happens if you create the index on sCommunityID only? Does it still do the full table scan? Also, don't overlook using UNION or UNION ALL, ugly as they can be. Maybe something like this could be used to avoid creating a very small temporary table: SELECT ... FROM (SELECT ... UNION SELECT

Re: [sqlite] Rewriting a query

2005-09-30 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > Robin Breathe <[EMAIL PROTECTED]> wrote: > > Hugh Gibson wrote: > > >> I'm intrigued. How do you get SQLite to use a multi-column index as it's > > >> primary key (i.e. B-tree hash)? Please elaborate. > > > > > > Simply > > > > > > CREATE TABLE TransactionList

Re: [sqlite] Newbie coherency questions ... poor man's replication? Proper replication approaches?

2005-10-03 Thread Dan Kennedy
> We're building a multi-master, peer-to-peer network service, > so we need a way to replicate changes between systems. Unsolicited advice: Of course I don't understand your problem domain, but I'm a big fan of a technology called "virtual synchrony" for this kind of thing. Very successful

Re: [sqlite] Maintaining a sequence that's not rowid

2005-10-06 Thread Dan Kennedy
I think what you propose will work fine, but you could just do it all yourself with some SQL. Arguably clearer, and no messing about with complex, possibly non-portable, triggers + auto-increments. /* Initialize system */ BEGIN; CREATE TABLE id_allocator(id INTEGER); INSERT INTO

RE: [sqlite] Maintaining a sequence that's not rowid

2005-10-06 Thread Dan Kennedy
> > /* Retrieve next id in sequence: */ > > BEGIN; > > SELECT id FROM id_allocator; /* This is the id to use */ > > UPDATE id_allocator SET id = id + 1; > > COMMIT; /* Can't use the id until the transaction successfully commits! > > */ > > Just a side note; Traditionally this is

Re: [sqlite] Upcoming Conferences

2005-10-10 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > "Gerald Dachs" <[EMAIL PROTECTED]> wrote: > > > 2005-11-08 Frankfort, Germany > > > > I guess you mean Frankfurt ;). Be aware that the are two cities in Germany > > that are named Frankfurt. I expect that the Conference will be in Frankfurt > > am Main and not in

Re: [sqlite] Compile Problem - 'sqlite_compile' : undeclared identifier

2005-10-13 Thread Dan Kennedy
The missing symbols are from sqlite version 2, not 3. --- Mark Anderson <[EMAIL PROTECTED]> wrote: > Hello All - > > I'm trying to incorporate sqlite3 into a Visual C++ project but am > having some problems > compiling the project. I'm made sure to include the sqlite3.h header and > I

Re: [sqlite] Question about automatic schema creation from custom data-strucutre for persistence storage

2005-10-17 Thread Dan Kennedy
As far as I know C++ has no introspection capability so the answer is probably no. Unless you want to parse your header file yourself, or something like that. With Java or another high-level programming language that supports introspection it would be possible I think. "Rajan, Vivek K"

Re: [sqlite] To 'sqlite3_step' or not to 'sqlite3_step' as is the case...

2005-10-17 Thread Dan Kennedy
My hunch is that you need to change the while() line to: while ( (rc = sqlite3_step(pStmt)) != SQLITE_DONE ) But I could be wrong, and I don't have a computer with a C compiler to test this right now. Terence MacDonald <[EMAIL PROTECTED]> wrote: The following code is part of a class

Re: [sqlite] question about instead of delete triggers

2005-10-30 Thread Dan Kennedy
When you execute this SQL: "delete from v_items where item='me'", SQLite essentially does: FOR EACH ROW IN "select FROM v_items where item='me'" { Execute trigger program } --- Mark de Vries <[EMAIL PROTECTED]> wrote: > Hi, > > I guess my question is: are conditions in the where clause >

Re: [sqlite] basic question about sqlite

2005-11-01 Thread Dan Kennedy
> If I designed a sqlite database to be used by a bunch of independent > applications, for example a bunch of CGI scripts each of which > opened the database, did some processing, and exited, would > that be (a) safe (b) effecient ? I think lots of people have used that pattern successfully.

Re: [sqlite] Request for comment: Proposed SQLite API changes

2005-11-03 Thread Dan Kennedy
> Another proposal: Suppose that when creating an > sqlite3_stmt using sqlite3_prepare, the original SQL > text was stored in the sqlite3_stmt. Then when a > schema change occurred, the statement was automatically > recompiled and rebound. This seems pretty handy, but it can be done in a

Re: [sqlite] Book recommendation

2005-11-09 Thread Dan Kennedy
I'm 99% certain this book covers the sqlite v2 C/C++ API. Which is similar, but not exactly the same as v3 (the current). The other APIs it covers, TCL and PHP, I think are still pretty much the same. That said the book is pretty readable. --- Joe Halpin <[EMAIL PROTECTED]> wrote: > I'm

Re: [sqlite] Compiling SQLite and MAX_ATTACHED databases

2005-11-10 Thread Dan Kennedy
> #define MAX_ATTACHED 10 > > Is this a per-process limit, or a per-sqlite3 handle limit? It's per-handle. Also, if you haven't found it already, this page has some of the compilation options you can set: http://www.sqlite.org/compile.html

Re: [sqlite] SQL For Producing Subtotaled Rows

2005-11-14 Thread Dan Kennedy
How about something like: SELECT rc_cd, rp_cd, votes FROM results UNION ALL SELECT rc_cd, 'TOTAL' AS rp_cd, sum(votes) AS votes FROM results GROUP BY rc_cd ORDER BY rc_cd ASC, rp_cd ASC; But this kind of thing might be better done outside of SQL. --- Robert L Cochran <[EMAIL PROTECTED]>

Re: [sqlite] adding a value to integer field

2005-11-26 Thread Dan Kennedy
--- Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: > Hello, > > Is it possible to increment or decrement an integer field without first > select then do it in code and then update ? > > --- > Mvg, Wilfried > http://www.mestdagh.biz > > update tbl set field = field + 1 where

Re: [sqlite] The correct way to use the utf encoding?

2005-12-01 Thread Dan Kennedy
If I understand what you mean by 'ansi', UTF8 is a superset of it. So just go ahead and use the UTF8 interface with your strings as they are, things will probably work fine. --- hubdog <[EMAIL PROTECTED]> wrote: > Now I want to use store and read utf string in sqlite3. > Now , I need encode my

Re: [sqlite] sluggish performance in MacOS 10.4

2005-12-02 Thread Dan Kennedy
Same filesystem used by both operating system versions? Output of 'top' or whatever the MacOS analogue is doesn't show any extra processes working as well as the sqlite program? Any supervisory frameworks like SE Linux or a win32 virus checker turned on in 10.4 that are not on in 10.2? ---

Re: [sqlite] Probably not simple question

2005-12-08 Thread Dan Kennedy
TED]> wrote: > On Wed, Dec 07, 2005 at 08:34:46PM -0800, Dan Kennedy wrote: > > > To make it work in more than a superficial manner, you probably will > > > need a good understanding of how structures are internally represented > > > in C++ or C. You pass sqlite a p

Re: [sqlite] DELETE Statements

2005-12-10 Thread Dan Kennedy
It sounds to me like your DELETE statement contains a bug. You are correct to pass NULL as the callback function. Your best bet might be to try to get the DELETE working in the sqlite shell first. Or you could just post the table schema, text of the statement and the contents of the row you are

Re: [sqlite] Can I have access to in-memory DB from different threads?

2005-12-16 Thread Dan Kennedy
Both thread would have to use the same sqlite3* handle. And access would have to be protected externally by a mutex or similar. With in-memory databases I don't think there are any problems with using a single handle from multiple threads. With regular databases you can run into trouble doing

Re: [sqlite] Building sqlite 3.2.8 on redhat 9

2006-01-01 Thread Dan Kennedy
If possible, the easiest way around this is to install Active-tcl. Or compile the tcl library yourself. For a long time the stock tcl install in redhat was problematic. http://www.activestate.com/Products/ActiveTcl/ --- Lloyd Thomas <[EMAIL PROTECTED]> wrote: > I am having a problem

Re: [sqlite] proposal for improving concurrency in SQLite

2006-01-09 Thread Dan Kennedy
--- "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > On Mon, Jan 09, 2006 at 06:47:04PM +0100, Eduardo wrote: > > of transactions per second. But because each transaction requires at > > least two revolutions of the disk platter, SQLite is limited to about > > Why does a transaction commit require

Re: [sqlite] Optimizing for space and speed

2006-01-14 Thread Dan Kennedy
--- Martin O'Leary <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a table like the following: > > CREATE TABLE user_actions ( > uid INTEGER NOT NULL, > actionid INTEGER NOT NULL, > time INTEGER NOT NULL, > status INTEGER NOT NULL, > PRIMARY KEY (uid, actionid, time,

Re: [sqlite] error compiling with GCC 3.2.3 on Red Hat Linux

2006-01-15 Thread Dan Kennedy
--- Mike Miller <[EMAIL PROTECTED]> wrote: > Would any of you know what has gone wrong here? The Tcl package shipped with older redhat linux distros is compiled with options incompatible with SQLite (and lots of other packages too). Easiest way to overcome this is to install ActiveTcl or

Re: [sqlite] Page 2 is never used

2006-01-17 Thread Dan Kennedy
--- Andrea Federico <[EMAIL PROTECTED]> wrote: > Hi sqliteUsers, > > I have a simple question: > > can you tell me why I obtain an error creating a simple table > in a new database ? > > if I insert this simple command: > > sqlite> create table tbl1(one varchar(10), two smallint); >

Re: [sqlite] Two problems

2006-01-22 Thread Dan Kennedy
> - insert the value "0E9" (and other variables that would look like numbers > if they were in numeric fields) into a varchar(10) field, and it gets > converted to the numeric equivalent. I think it might the perl wrapper doing the conversion. SQLite shouldn't do this. SQLite version 3.3.0

Re: [sqlite] testfixture link error in 3.3.3

2006-02-03 Thread Dan Kennedy
It looks like the same fix went into cvs as part of checkin 3051 - just after version 3.3.3. The autoconf system lagging behind the configure-by-hand makefile again. As you say, adding os.c to TESTSRC is the right thing to do to fix the problem. --- Adam Swift <[EMAIL PROTECTED]> wrote: > I'm

Re: [sqlite] Fedora Core 4 RPM Version of SQLite And A Sad Tale of PHP Configure Error In v3.3.3

2006-02-04 Thread Dan Kennedy
> configure:79872: checking for sqlite_open in -lsqlite It might be looking for sqlite version 2, not 3. Grep the configure script for the string "sqlite3_open", and then "sqlite_open". If you find the latter and not the former, it's version 2 you need to install.

Re: [sqlite] about deletion

2006-04-07 Thread Dan Kennedy
In general, a journal is created when executing a DELETE statement. Guarantees of atomicity etc. (ACID) are the same as for an INSERT. Dan. --- chetana bhargav <[EMAIL PROTECTED]> wrote: > Hi, > > I just want to know how rows are deleted, its same like insertion where we > create

Re: [sqlite] www.sqlite.org Server setup

2006-04-07 Thread Dan Kennedy
> The same virtual server hosts multiple websites. Besides > SQLite it hosts: > >http://www.cvstrac.org/ >http://canvas3d.tcl.tk/ >http://tkhtml.tcl.tk/ http://3dcanvas.tcl.tk :) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the

Re: [sqlite] Sqlite inside MySQL as one of the pluggable "storage mechanisms" ?

2006-04-22 Thread Dan Kennedy
> > I had a musing while reading: > > > http://news.com.com/2100-7344_3-6063599.html?part=rss=6063599=news > > > where it reminded me of one of MySQL's features: > > MySQL's database is built so that it can use a range of different > storage mechanisms, tuned for different

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

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
=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, pzErrMsg=0xa0252dbc) &

Re: [sqlite] First "SELECT" query fails

2009-09-14 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:

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

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

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, >

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

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

Re: [sqlite] Use of .TIMER within sqlite3 commandline utility: was RE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:41 AM, Griggs, Donald wrote: > > > I believe one must enable the .TIMER option when compiling > sqlite3. I > think the pre-compiled versions have this disabled by default (at > least > for the Windows binaries). The .timer command is only available on unix and

Re: [sqlite] Inconsistency in mutex.h and mutex.c

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 5:29 AM, Schrum, Allan wrote: > At the bottom of mutex.h there is an: > > #ifdef SQLITE_MUTEX_OMIT > ... > #endif /* defined(SQLITE_OMIT_MUTEX) > > Either the comments or the define should be changed. This occurs in > mutex.c as well. > > The pattern for all other "OMIT"

Re: [sqlite] SQLite crashes when trying to INSERT into table with wrong default value

2009-10-01 Thread Dan Kennedy
On Sep 30, 2009, at 1:33 PM, ste...@schallerl.com wrote: > Hi all, > > i've got a table: > CREATE TABLE [usr_user] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, > [name] TEXT, [email] TEXT, [password] TEXT, [createDate] DATETIME > DEFAULT (NOW())) Looks like the same problem as this one:

Re: [sqlite] Error in type-def syntax diagram notation??

2009-10-02 Thread Dan Kennedy
On Oct 2, 2009, at 12:33 PM, Keith Roberts wrote: > I'm trying to learn the syntax for SQLite, and I'm getting > stuck with the type-def production in: > > http://www.sqlite.org/lang_createtable.html > > I read it as a type-def production is a sequence of one or > more instances of a terminal

Re: [sqlite] Need help To Get Started with SQLITE

2009-10-03 Thread Dan Kennedy
On Oct 4, 2009, at 12:01 AM, jack wrote: > I just setting out to learn how to use sqlite3 (3.6.18). Obviouly > I'm missing some very important points. > > The very simple test app below is to open (and create) an sql > datbase then close it > > Using windows XP. Using a precompiled .LIB. I

Re: [sqlite] How do I get context in collation function?

2009-10-03 Thread Dan Kennedy
> BTW while wandering in the 3.6.18 amalgamation source looking at how > allocation failures are handled, I found a number of sqlite3_malloc > whose return values are used (written to) head first without prior > checking against 0. We know there are still some of these cases in the fts3 code. If

Re: [sqlite] Tedious CSV import question

2009-10-06 Thread Dan Kennedy
On Oct 6, 2009, at 4:40 PM, Emyr Thomas wrote: > On Oct 5, 8:09 pm, Nuno Lucas wrote: >> Emyr Thomas wrote: >>> Could you please provide some info as to how you would build this as >>> an extension module on Linux? >> >> "make" ? >> >> It would be easier if you stated why

Re: [sqlite] BUG: Async IO module works incorrectly with large database files

2009-10-07 Thread Dan Kennedy
On Oct 7, 2009, at 6:42 PM, Pavel Ivanov wrote: > Hi! > > As anonymous users are not allowed to file bug reports on SQLite site > anymore so I'm sending it here. > > I've encountered segmentation fault at sqlite3async.c:715. The problem > is on sqlite3async.c:712: > > nCopy =

Re: [sqlite] BUG: wrong type casting for constants in tcl interface

2009-10-08 Thread Dan Kennedy
On Oct 7, 2009, at 10:41 PM, Alexey Pechnikov wrote: > Hello! > > I find some incorrect types casting for constants in all SQLite > versions. The behaviour is actually correct, assuming that SQLite is using sqlite3_bind_text() to bind the value of $i to the SQL statement executed by [db

Re: [sqlite] BUG: Async IO module works incorrectly with large database files

2009-10-08 Thread Dan Kennedy
n because file doesn't exist > yet. And this error is already goes as a return code from > sqlite3_step(). > > > Pavel > > On Wed, Oct 7, 2009 at 9:57 AM, Dan Kennedy <danielk1...@gmail.com> > wrote: >> >> On Oct 7, 2009, at 6:42 PM, Pavel Ivanov wrote: >> >

Re: [sqlite] Corrupted database

2009-10-12 Thread Dan Kennedy
On Oct 13, 2009, at 1:56 AM, McClellen, Chris wrote: > What is your synchronous set to? Full? FYI If you are using .NET > data > providers, it is set to "Normal" by default. > > If it is not set to full, I have seen corruption when an application > crashes, or exits when a thread is in the

Re: [sqlite] Corrupted database

2009-10-14 Thread Dan Kennedy
ped everything up > and moved to synch=full, no transaction was even close to the grace > period, and such, terminatethread() is never called.. and we get no > corruption. > > Just a thought. > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqli

Re: [sqlite] Foreign keys question

2009-10-15 Thread Dan Kennedy
On Oct 15, 2009, at 10:30 AM, Dennis Volodomanov wrote: > Hello all, > > I'm implementing the new FOREIGN KEY support in our database and I > have this small problem/question. > > Before I had triggers to take care of maintaining deletion of data > that's not referenced by any records, but I

Re: [sqlite] Foreign keys question

2009-10-15 Thread Dan Kennedy
On Oct 16, 2009, at 3:08 AM, Dennis Volodomanov wrote: > Dan Kennedy wrote: >> I don't think the triggers you are using can be implemented using >> foreign keys. Your triggers are basically reference counting (or >> garbage collecting, whatever you want to call it)

Re: [sqlite] sqlite-3.6.18: Segmentation fault on SQL INSERT.

2009-10-16 Thread Dan Kennedy
On Oct 16, 2009, at 2:53 PM, Vladimir Looze wrote: > Sqlite causes Segmentation fault on SQL insert. > > Steps to reproduce: > 1. create database with following schema (table/column names dosen't > matter) > > - BEGIN OF SQL LISTING > create table tname ( id integer not null primary key

Re: [sqlite] "x NATURAL JOIN x" BUG

2009-10-19 Thread Dan Kennedy
On Oct 19, 2009, at 2:05 PM, Kristoffer Danielsson wrote: > > I did provide a sample with test data in my original post. However, > I posted it here too: > > http://www.sqlite.org/cvstrac/tktview?tn=4043 > > > > The tracker is obviously closed, but still, there it is :P. Don't > know where

Re: [sqlite] searching sqlite tickets?

2009-10-19 Thread Dan Kennedy
On Oct 19, 2009, at 2:36 PM, Jens Miltner wrote: > Before the timeline was migrated to fossil, I was able to search for > tickets. > In the current sqlite.org website, I can no longer search for tickets > - I can only show all tickets, all closed tickets or all open tickets, > but I can't search

Re: [sqlite] Does single thread SQLite have bugs?

2009-10-20 Thread Dan Kennedy
On Oct 20, 2009, at 12:49 PM, TEZ wrote: > Hi > > When I ran "make test", some errors were shown. > Is it meaning that SQLite has bugs? In this case it means the test script is buggy. Not SQLite itself. Dan. > $ uname -a > Linux localhost.localdomain 2.6.27-43vl5 #1 SMP Sat Aug 15 22:17:55

Re: [sqlite] commit time

2009-10-21 Thread Dan Kennedy
On Oct 22, 2009, at 5:21 AM, Tom Broadbent wrote: > if thread 1 opens a read cursor in read uncommitted mode it can > block a write lock? i thought the read happens w/o a lock? If using read-uncommitted mode, a reader thread will not block a writer thread that is using the same shared-cache.

Re: [sqlite] commit time

2009-10-21 Thread Dan Kennedy
Dan. > > John > > -Original Message----- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy > Sent: Thursday, October 22, 2009 12:06 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] commit time

Re: [sqlite] Order of operations when using TRIGGERs

2009-10-22 Thread Dan Kennedy
On Oct 23, 2009, at 5:05 AM, Simon Slavin wrote: > I'm looking for assurance that things work the way I think they do, > and will continue to do so in future versions. > > I'm using a TRIGGER that is triggered AFTER INSERT. The INSERT > commands do not know or set the value for the ROWID

Re: [sqlite] Some clarification needed about Unicode

2009-10-29 Thread Dan Kennedy
On Oct 29, 2009, at 4:41 PM, Jean-Christophe Deschamps wrote: > >> [1] Supposing some textual data already inserted as UTF-8 (default >> mode) in >> a dBase, and a connection opened with sqlite3_open(): Does a >> sqlite3_column_text16 retrieves a correct UTF-16 content? Is to >> say, do >>

Re: [sqlite] Does has FTS3 external tokenizers ability now?

2009-10-30 Thread Dan Kennedy
On Oct 30, 2009, at 10:07 PM, Alexey Pechnikov wrote: > Hello! > > The feature was planning some times ago. Is this released now? Yes. See the README.tokenizers file in the full source (tar.gz) distribution for docs. Dan. ___ sqlite-users mailing

Re: [sqlite] How do I output multi-word strings without braces?

2009-11-10 Thread Dan Kennedy
On Nov 10, 2009, at 3:06 PM, Walter Dnes wrote: > Given the following code fragment... > > set xname [db eval { select name from elements where e_mtid = > $element }] > puts [format "Requested element ==> %s ==> %s" $element $xname] > > The "business rules" are such that I know I'll only get

Re: [sqlite] Is the dbFileVers written to journal files?

2009-11-10 Thread Dan Kennedy
On Nov 11, 2009, at 1:24 AM, Scott Hess wrote: > Someone was asking me a question about what happens if the wrong > journal file gets applied to a database. My answer was that terrible > things happen. > > I found myself wondering if the "File change counter" value is stored > in the journal

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-10 Thread Dan Kennedy
On Nov 11, 2009, at 4:07 AM, Peter Haworth wrote: > sqlite3 is rejecting a SELECT statement that includes the group_concat > function saying it's an unknown function, yet the same SELECT > statement works fine in the Firefox SQLite Manager extension. > > The version of sqlite3 on my Mac is 3.4.0

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-11 Thread Dan Kennedy
On Nov 11, 2009, at 12:13 PM, Jay A. Kreibich wrote: > On Wed, Nov 11, 2009 at 11:23:18AM +0700, Dan Kennedy scratched on > the wall: >> >> On Nov 11, 2009, at 4:07 AM, Peter Haworth wrote: >> >>> sqlite3 is rejecting a SELECT statement that includes the >

Re: [sqlite] Bug candidate: virtual tables vs. external db connections

2009-11-11 Thread Dan Kennedy
On Nov 12, 2009, at 11:31 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Grzegorz Wierzchowski wrote: >> That was my first suspicion that there is some memmove with cursor >> object or so. >> This would mean that sqlite* or maybe other sensitive pointers can >>

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 3:01 PM, Jens Miltner wrote: > > Am 11.11.2009 um 17:45 schrieb D. Richard Hipp: > >> >> On Nov 11, 2009, at 11:24 AM, Jens Miltner wrote: >>> >>> Is sqlite3_analyzer supposed to work in 3.6.19? >>> >> >> >> No. sqlite3_analyzer has been busted for a long time. But the

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 4:36 PM, Artur Reilin wrote: > I also wonder, why the analyzer isn't working. I doesn't work for me. In what respect is it malfunctioning? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] BUG (?) foreign_keys=on/off within a transaction

2009-11-14 Thread Dan Kennedy
On Nov 14, 2009, at 11:34 PM, Uwe Sander wrote: > Hi, > the documentation states that ALTER TABLE ... RENAME ops do not > update the > name of a referenced table if foreign_keys=off has been set > previously. This > is only true if no enclosing transaction exists, otherwise >

<    3   4   5   6   7   8   9   10   11   12   >