Re: [sqlite] FTS4 compress/uncompress functions

2011-04-13 Thread Dan Kennedy
On 04/13/2011 02:49 PM, Alexey Pechnikov wrote: > What type of value return _uncompress_? The original content may be > blob or text, so uncompress may return blob I think... Or we need to > store in compressed field the type of this. I guess that is correct. uncompress() should return the same ty

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-14 Thread Dan Kennedy
ring compilation are > -DUSE_PREAD > -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 Could easily be the ENABLE_UNLOCK_NOTIFY. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-14 Thread Dan Kennedy
On 04/15/2011 01:32 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 01:20:11PM +0700, Dan Kennedy wrote: >> Can you post the stack-trace from the core file? With debugging >> symbols if possible. > > Sorry, the backtrace is unusable: > (gdb) bt > #0 __nanosleep50

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-15 Thread Dan Kennedy
On 04/15/2011 04:08 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 01:42:00PM +0700, Dan Kennedy wrote: >> Are there any other threads in the process? > > My program is not using threads. > sqlite3 is linked against libpthread. I don't think it's using threa

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-15 Thread Dan Kennedy
On 04/15/2011 05:35 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 04:32:08PM +0700, Dan Kennedy wrote: >> How are you building sqlite3? Using configure/make from the >> sqlite-autoconf-3070601.tar.gz package on the website? > > Yes, using pkgsrc. What happens if

Re: [sqlite] Problems while upgrading to 3.7.3

2011-04-21 Thread Dan Kennedy
On 04/21/2011 05:42 PM, Gaurav Srivastava wrote: > Hi > > I have recently upgraded my sqlite version from 3.5.1 to 3.7.3. With the > update I have been seeing some issues with sqlite3_prepare_v2() API. > The workflow here is: > sqlite3VdbeSetSql(pVDbe, zSql, saveSqlflag) > ^ > | >

Re: [sqlite] No journal vs WAL journal

2011-04-25 Thread Dan Kennedy
On 04/26/2011 08:13 AM, Nikolaus Rath wrote: > Nikolaus Rath writes: > [ WAL Performance ] >> Really no one an idea of why this is happening? > > I tried to investigate this further myself and created a small example > program (attached). It fills a table with 500,000 entries without using > expli

Re: [sqlite] select * on empty virtual table

2011-04-29 Thread Dan Kennedy
On 04/29/2011 11:15 PM, Joseph Stockman wrote: > > We have tried a null pointer, a zero-length static, a dummy static and > strings created on the heap via sqlite3_mprintf. > All cause the same segmentation fault. Run your app under valgrind. Post the errors it finds if they don't make the proble

Re: [sqlite] Virtual tables and OR clause

2011-05-04 Thread Dan Kennedy
On 05/04/2011 08:58 PM, Schrum, Allan wrote: > Hi Folks, > > Using virtual tables the WHERE clause is broken up and sent to the "best > index" function to determine the best index. Then the "filter" function is > called to perform the actual work. I've noticed that the SQLITE engine seems > to p

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
s the nature of shared-cache mode. Dan. > > So in pseudo code the database access looks like this: > > first thread: > > sqlite3_open_v2("log.sqlite", SQLITE_OPEN_READONLY | > SQLITE_OPEN_NOMUTEX, NULL); > sqlite3_exec(log_database_local, "PRAGMA read_un

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
On 05/06/2011 05:53 PM, Ole Reinhardt wrote: > Hi Dan, > >>> I have to correct myself a little... the hanging sqlite3_open_v2() does >>> not happe while the prepare of the first query but during the first >>> sqlite3_step() of the first query... >> >>

Re: [sqlite] Row count after prepare

2005-03-15 Thread Dan Kennedy
;t actually read any data from the database file (except maybe the schema from sqlite_master). Dan. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/

Re: [sqlite] Proposal: limit the number of columns in a table to 2000.

2005-03-17 Thread Dan Keeley
It's rarely a good idea to use binary numbers for limits such as that - you're exposing yourself to more corner case bugs. Interesting issue... I thing that we may use 2048 instead 2000. It´s an number more "binary". I think that it´s sufficient to 99.99% of the possible applications. That´s a go

Re: [sqlite] Do source updates effect DB file compatiblity?

2005-03-19 Thread Dan Kennedy
The policy so far has been that file formats within a major version (i.e 3) are forwards compatible - files created by older versions can be read/written by newer versions. Sometimes features are added that mean newer versions can create files that may not be used by older versions. If you don't

Re: [sqlite] error query???

2005-03-21 Thread Dan Kennedy
This is just a guess. SQLite has no implicit transaction like Oracle and some other systems. So to do the 'commit', you have to first do 'begin'. Otherwise each SQL command is in it's own little transaction, automatically committed. Dan. --- SKORPIO-INFO <[E

Re: [sqlite] Newbe question on collations

2005-03-22 Thread Dan Kennedy
> I can't seem to find any information on the web site. Would any person > have some information on how to change the default collation, this would > be extremely useful. Unfortunately you can't change the default collation. You can set an individual column to compare using a case insensitive

Re: [sqlite] NULL representation/empty value in query results?

2005-03-23 Thread Dan Kennedy
command to set the "null string". * Store the "null string" as part of the SqliteDb struct in tclsqlite.c. * Add a case to the switch statement "switch( sqlite3_column_type(pStmt, i) ){" that is on line 956 of tclsqlite.c in the 3.2.0 source. Dan. --- Stefan Finze

Re: [sqlite]AutoVacuum in version 3

2005-03-24 Thread Dan Kennedy
contain all these extra pages. Dan. --- RexChan <[EMAIL PROTECTED]> wrote: > Hi all, > > In version 3.x, there is an autovacuum for free used space. What is the > maximum space for the autovacuum consumed? For example, if one record > is deleted from 1000 records a

Re: [sqlite]AutoVacuum in version 3

2005-03-24 Thread Dan Kennedy
> * The database file itself contains one extra page for every > (/5) pages of data. > * The worst case scenario for a database transaction is that > all of these extra pages need to be journalled. So the journal > file could contain all these extra pages. Should also have mentioned that th

Re: [sqlite] Transactions and in-memory databases

2005-03-31 Thread Dan Kennedy
n the other handle until the transaction finishes? > > -- > Cory Nelson > http://www.int64.org No. This will open two completely seperate in-memory databases. Just as if you had opened two handles on two different files. Dan. __ Do you

Re: [sqlite] Transactions and in-memory databases

2005-03-31 Thread Dan Kennedy
--- Dan Kennedy <[EMAIL PROTECTED]> wrote: > > --- Cory Nelson <[EMAIL PROTECTED]> wrote: > > If I open two handles to "sqlite.db", and attach a :memory: database > > to one of them, then start a transaction on the handle without the > > :memory:

Re: [sqlite] Sqlite causes exit error under symbian!

2005-04-04 Thread Dan Kennedy
--- StevenLiu <[EMAIL PROTECTED]> wrote: > here is my code : > > sqlite *db; > char *zErrMsg = 0; > db = sqlite_open("test.db", 0, &zErrMsg); > sqlite_close(db); > db = NULL; > delete db; ^ Maybe leave that bit out. That's for deleting objects allocated with 'new', not SQLite ha

Re: ´ð¸´: [sqlite] Sqlite causes exit error under symbian!

2005-04-04 Thread Dan Kennedy
> I do have try your suggestion, but it seems to no effect :( > For Symbian OS it is very strict with the memory assignation, u must call > closeSTDLIB() after using some stdlib functions otherwise u will got the > exit error. > So I guess my issue like that But I have no idea about what to deal

Re: [sqlite] Access Violations in sqlite3_step when in DLL

2005-04-06 Thread Dan Kennedy
Exactly what are you calling sqlite3_free() on? --- Chris Schirlinger <[EMAIL PROTECTED]> wrote: > Sadly, I have narrowed down the issue to some sort of memory clash > between the SQLite3 DLL and the EXE that is calling our plugin > > I can change the code to retrieve data from almost *anythin

Re: [sqlite] Access Violations in sqlite3_step when in DLL

2005-04-06 Thread Dan Kennedy
--- Chris Schirlinger <[EMAIL PROTECTED]> wrote: > On 6 Apr 2005 at 3:13, Dan Kennedy wrote: > > Date sent:Wed, 6 Apr 2005 03:13:58 -0700 (PDT) > From: Dan Kennedy <[EMAIL PROTECTED]> > Subject: Re: [sqlite] Access Violati

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Dan Kennedy
Random thought: You might squeeze some more performance out by trying a couple different filesystems. i.e. if you're using ext3, try some different journaling options, or try ext2. --- Al Danial <[EMAIL PROTECTED]> wrote: > A scientific application I work with has clumsy data retrieval > option

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Dan Nuffer
serts to ./a.db in 1.146 s = 87230.96 inserts/s $ ./sqlite_insert 200 5 200 inserts to ./a.db in 20.287 s = 98584.18 inserts/s -- Dan Nuffer

Re: Fwd: [sqlite] assertion failing in pager.c :(

2005-04-12 Thread Dan Kennedy
The comment that was added at the same time as the assertion was commented out explains it pretty well. If behaviour when the system fails to allocate memory is important to you, I recommend upgrading to version 3. Version 3 handles this condition much more reliably than version 2 does. It do

RE: [sqlite] Copying a table between databases

2005-04-13 Thread Dan Kennedy
There's always "CREATE TABLE ... AS ...", but not everybody is happy with the column names and types it creates. --- Dennis Volodomanov <[EMAIL PROTECTED]> wrote: > Just wondering, is there any mechanism to help me achieve that > functionality or should I go the DROP, CREATE, SELECT and INSERT pat

Re: [sqlite] Cross compiling SQLite for Power PC

2005-04-13 Thread Dan Kennedy
To cross-compile, you need to create the config.h file by hand. The following excerpt is from "main.mk": # The config.h file will contain a single #define that tells us how # many bytes are in a pointer. This only works if a pointer is the # same size on the host as it is on the target. If you a

Re: [sqlite] db not writable

2005-04-13 Thread Dan Kennedy
SQLite needs write permission to the directory as well. It could be that. --- tom <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'm trying to use sqlite as the database for punbb. I've created the > database, and changed it's user and permissions (even to 777 for > testing purposes). Still, punbb

Re: [sqlite] Create Table Programatically

2005-04-16 Thread Dan Kennedy
lly overwritten 'database' with garbage data. Dan. --- "Kiel W." <[EMAIL PROTECTED]> wrote: > I've been trying to create a table programatically though C++ without > luck. Here is what I have: > > /* > * The function that acts as a wrapper aroun

Re: [sqlite] NFS Query Performance

2005-04-19 Thread Dan Kennedy
What happens if you wrap the SELECT statements in a transaction in the same way as you have the INSERTs? --- William Hachfeld <[EMAIL PROTECTED]> wrote: > > Heh everyone! > > Can anyone explain to me why SQLite shows such poor query performance when the > database is located on an NFS-mounted

[sqlite] OT: General SQL Question

2005-04-30 Thread Dan Keeley
way join. Is this possible? Thanks! Dan

Re: [sqlite] OT: General SQL Question

2005-04-30 Thread Dan Keeley
pr 2005 07:16:55 -0400 It is possible depending on the make up of the tables. post the table structures and index / keys and I'll help - Original Message - From: "Dan Keeley" <[EMAIL PROTECTED]> To: Sent: Saturday, April 30, 2005 6:38 AM Subject: [sqlite] OT: General SQL

Re: [sqlite] OT: General SQL Question

2005-05-01 Thread Dan Keeley
Excellent worked a treat. I tried that - it didnt work, however i think i must have had a typo as it works now!!! Cheers, Dan From: "Patrick Dunnigan" <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To: Subject: Re: [sqlite] OT: General SQL Question Date: Sat, 30 Apr 200

Re: [sqlite] DEFAULT datetime

2005-05-05 Thread Dan Kennedy
In version 2 you have to do that with a trigger. Versions 3.1 and onwards have "DEFAULT CURRENT_TIME" and friends. http://www.sqlite.org/lang_createtable.html Dan. --- Gabor Szabo <[EMAIL PROTECTED]> wrote: > Is it possible to set datetime('now') as the default v

Re: [sqlite] PRAGMA user_version

2005-05-06 Thread Dan Kennedy
>From memory I think it went into version 3.1. --- Randall Fox <[EMAIL PROTECTED]> wrote: > I am trying to use "PRAGMA user_version;", but it doesn't seem to work > with my version of Sqlite, 3.08. > > What version is this feature in? > > I also checked the pragma.c file, from the website CVS,

RE: [sqlite] database table is locked

2005-05-13 Thread Dan Kennedy
is calling the functions in the expected order. Dan. --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > On Fri, 2005-05-13 at 15:16 +0100, Brandon, Nicholas wrote: > > I think I might be getting confused on this subject as well. Does this mean > > that SQLite 3.x c

Re: [sqlite] Sqlite2 vs Sqlite3 benchmark

2005-05-15 Thread Dan Kennedy
> 1) Why is sqlite2 faster than sqlite3 per transaction? For SQLite 3, the default value of the 'synchronous' pragma changed from "NORMAL" to "FULL". IIRC this means the disk is synced 3 times instead of 2 for a small transaction. So this might be what you're seeing. (Note that the documentati

Re: [sqlite] InnoDB Transactions

2005-05-15 Thread Dan Kennedy
y of InnoDB algorithm for comparison? I suspect whatever trick they use won't work with SQLite because there is no server process, but it could be interesting anyway. Dan. __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your

Re: [sqlite] Sqlite2 vs Sqlite3 benchmark

2005-05-16 Thread Dan Kennedy
--- Ludvig Strigeus <[EMAIL PROTECTED]> wrote: > Dan Kennedy <[EMAIL PROTECTED]> wrote: > > For SQLite 3, the default value of the 'synchronous' pragma > > changed from "NORMAL" to "FULL". IIRC this means the disk is > > synced 3 t

RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Dan Kennedy
> There's a former Nigeria dictator Charles Taylor that is even > worse. Liberia! Not that I could tell one from the other :) Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html

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 present

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 VALUES('i1'

Re: [sqlite] What does this code do?

2005-05-21 Thread Dan Kennedy
--- Ludvig Strigeus <[EMAIL PROTECTED]> wrote: > In sqlite3VdbeRecordCompare() > > /* Read the serial types for the next element in each key. */ > idx1 += sqlite3GetVarint32(&aKey1[idx1], &serial_type1);f > if( d1>=nKey1 && sqlite3VdbeSerialTypeLen(serial_type1)>0 ) break; > idx2

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

2005-05-31 Thread Dan Kennedy
ny clues? > > thanks, > > --nickg > > I don't there exists such an option. If you're desperate to change it, modify the value function sqlite3pager_open() sets variable pPager->fullSync to. For "NORMAL", you want it initialized to 0. Dan.

Re: [sqlite] database schema has changed

2005-06-02 Thread Dan Kennedy
should handle the SQLITE_SCHEMA error. Dan. --- Demitri Muna <[EMAIL PROTECTED]> wrote: > On the subject of "database schema has changed" error messages > I'm getting the same whenever I try to use precompiled queries in > 3.2.1. Is anyone else seeing the

Re: [sqlite] How to create an empty sqlite3 database?

2005-06-06 Thread Dan Kennedy
I don't seem to get that. Maybe you're using an old version. [EMAIL PROTECTED]:~> ls db ls: db: No such file or directory [EMAIL PROTECTED]:~> touch db [EMAIL PROTECTED]:~> ls -s db 0 db [EMAIL PROTECTED]:~> sqlite3 db SQLite version 3.2.1 Enter ".help" for instructions sqlite> select * from sqlit

Re: [sqlite] ON_DELETE_CASCADE constraint is not working

2005-06-06 Thread Dan Kennedy
--- Ajay <[EMAIL PROTECTED]> wrote: > Hello there, > > I have two tables and used constraint ON_DELETE_CASCADE in one of the table > to delete records from second table if records from first table are deleted > which foreign key points to first table. I'm using SQLiteExplorer to > manipulate ta

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, &statement, 0 ); > sqlite3_bind_text(statement, 1, "Fullman", 7, SQLITE_STATIC ); > rc = sqlite3_step(statement); As other

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] Multithreading with same sqlite struct

2005-06-10 Thread Dan Kennedy
It's not recommended. Some operating systems (notably linux), have problems releasing file-locks established by other threads. You might be Ok on Windows, I'm not sure. But be careful, the database locking might not work. --- Cory Nelson <[EMAIL PROTECTED]> wrote: > Yep, that's how I do it. Wo

Re: [sqlite] Problem with SQL Statement

2005-06-11 Thread Dan Kennedy
The two wildcards for LIKE are '%' and '_'. http://www.sqlite.org/lang_expr.html --- [EMAIL PROTECTED] wrote: > Hello :) > > I've got a problem with a SQL Statement in which I use a string comparsion. > > I'd like to execute this: > > SELECT * FROM PLZOrt WHERE PLZ LIKE "4153*"; But when I

Re: [sqlite] Seeking optimal way of UNION-ing

2005-06-12 Thread Dan Kennedy
> If I do have UNIQUE in a col declaration, will creating another index > on that column slow things down? Before I knew what you write above, I > had gone ahead and create a UNIQUE INDEX on col b. I am not sure if > that was slowing the operations, so I just want to confirm that. Slows down w

Re: [sqlite] Seeking optimal way of UNION-ing

2005-06-12 Thread Dan Kennedy
> thanks for all the valuable clarification. However, the above seems > contradictory. After all, if more than one row can be NULL, then they > won't be UNIQUE! what gives? SQL NULLs are weird. The expression NULL==NULL evaluates to NULL. It's and SQL thing, not particular to SQLite.

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 SQLi

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 em

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 t

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 knows

[sqlite] Problem when binding with like

2005-07-01 Thread Dan Wellisch
alue as 60089, it works fine. Is there a bug here, or am I binding incorrectly to ? when I want to use "like"? Thanks, Dan

Re: [sqlite] Problem when binding with like

2005-07-01 Thread Dan Wellisch
Richard: Are you saying that the statement should be.: wxString::Format(wxT("%s%s"),zipCodeValue.c_str(), "%"); ? Thanks, Dan D. Richard Hipp wrote: On Fri, 2005-07-01 at 14:51 -0500, Dan Wellisch wrote: zipCodeValue = wxString::Format(wxT("%s%s%s%s

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 kno

RE: [sqlite] Binding a column name?

2005-07-09 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 column

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 A

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

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 i

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 res

Re: [sqlite] ORDER BY question

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

[sqlite] import function

2005-08-03 Thread Dan Wellisch
Hello: I understand there is the .import function for the sqlite3 command interface, but I need to execute this function from within the C API. What do I use to do this? I need to execute this type of function from within my C++ program, not the command line. Thanks, Dan

Re: [sqlite] import function

2005-08-03 Thread Dan Wellisch
Jens: Thanks. I did see that suggested elsewhere in this list and I am proceeding that way in order to use any of the shell functionality. Thanks, Dan Jens Miltner wrote: Am 03.08.2005 um 20:50 schrieb Dan Wellisch: Hello: I understand there is the .import function for the sqlite3

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 only

[sqlite] International Language Support

2005-08-04 Thread Dan Wellisch
question concerning that OS. Thanks, Dan

Re: [sqlite] International Language Support

2005-08-04 Thread Dan Wellisch
dispute what Austin is saying? I would like some more feedback before I start doing more investigation. Thanks, Dan Austin Ziegler wrote: On 8/4/05, Dan Wellisch <[EMAIL PROTECTED]> wrote: We just put a SQLlite application in production. It handles the display of ISO 8859-1character

Re: [sqlite] International Language Support

2005-08-06 Thread Dan Wellisch
attention. Dan Wellisch

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 gen

Re: [sqlite] Null values in Primary Key

2005-09-02 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 can'

[sqlite] questions from a new user

2005-09-10 Thread dan greene
e3_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 columns contain variable-length binary data? Thanks for any help! Cheers Dan Greene

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

RE: [sqlite] Installer Question ?

2005-09-13 Thread Dan Cardamore
Run 'sqlite3' instead of 'sqlite'. And if that doesn't work then type '/usr/local/bin/sqlite3' Dan -Original Message- From: Richard Nagle [mailto:[EMAIL PROTECTED] Sent: September 13, 2005 5:03 PM To: sqlite-users@sqlite.org Subject: [sqlite] Instal

[sqlite] weird problem with windows 2000

2005-09-15 Thread dan greene
what is happening on the WIN2000 NTFS machine to slow down the single inserts so drastically? Cheers Dan Greene

Re: [sqlite] weird problem with windows 2000 PLEASE HELP!!!

2005-09-16 Thread dan greene
So, if I'm reading your message right, the 25 seconds for inserting 200 (that is only 200 messsages) into a database under win 2000 is correct??? Perhaps it's just my uneducated opinion but your explanation sounds bogus... Why would the folks who wrote SQLITE show it off as being so fast if,

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 wher

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 is

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 whe

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

2005-10-05 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 id_allocator(0)

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 create

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" <[EMAI

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 membe

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

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