Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
E_DELETE_LIMIT. > > Any ideas? I tried putting a > > #define SQLITE_ENABLE_UPDATE_DELETE_LIMIT 1 > > into sqlite3.h, but that didn't work. :( The makefiles in the full source tarball support a target "sqlite3.c". Build this target with SQLITE_UPDATE_DELETE_LIMIT d

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
led version. :-) You will need to build from the source tarball (the one with the unsupported configure script), not the amalgamation package for this to work. Dan. > Can anyone help me? > > Thanks, > > Andy > > > > > ___

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Dan
On Jul 4, 2009, at 8:12 PM, Wenton Thomas wrote: > I use prepare statements, and I am sure I finalize all of them. You may be mistaken. sqlite3_next_stmt() will return 0 if all statements really are finalized. assert( sqlite3_next_stmt(db, 0)==0 );

Re: [sqlite] Database triggers

2009-06-29 Thread Dan
On Jun 29, 2009, at 2:44 PM, Kris Groves wrote: > Given the trigger creation statement : > CREATE TRIGGER triggername DELETE ON tablename BEGIN statements; END > > When does it happen ? BEFORE or AFTER ? > > I've read http://sqlite.org/lang_createtrigger.html, but it is > unclear to me. If I

Re: [sqlite] unable to write the string "1.0" into a database table

2009-06-27 Thread Dan
fprintf(stderr, "sqlite3_stmt: %s", sqlite3_errmsg(db)); >goto out2; >} > >ret = sqlite3_bind_text(stmt, 1, "1.1", strlen("1.1") + 1, >SQLITE_TRANSIENT); >if (ret != SQLITE_OK) { >fprintf(stderr, "sqlite3_bi

Re: [sqlite] ROWID of 0

2009-06-26 Thread Dan
On Jun 26, 2009, at 11:13 PM, Shaun Seckman (Firaxis) wrote: > I have a column ("ID") in a table that is the primary key integer so > it > should be an alias for ROWID. Is it safe to have a ROWID of 0? Yes. > > > > > -Shaun > > > > > > ___ >

Re: [sqlite] Interrupting sqlite

2009-06-22 Thread Dan
handle should be sqlite3_reset() or sqlite3_finalize(). Dan. > This > way I could try to interrupt the statement many times so I can > continue to process the main loop to get the UI going. > > Thanks. > ___ > sqlite-users mailin

Re: [sqlite] async io and locks

2009-06-19 Thread Dan
On Jun 20, 2009, at 6:22 AM, Robert Lehr wrote: > Once again, I am forced to reply to the top-level, outside the thread > b/c I am not receiving individual replies. I apologize for the > inconvenience. > > On Jun 20, 2009, at 12:30 AM, Dan wrote: >> On Jun 20, 2009, at

Re: [sqlite] async io and locks

2009-06-19 Thread Dan
nlocked and modify table t2, changing the set of rows selects. Of course, if the asynchronous thread manages to commit the first transaction to disk before the user has time to execute the second, the database file will be unlocked between transactions. Dan. __

Re: [sqlite] Asynchronous I/O Module For SQLite

2009-06-18 Thread Dan
nd seem to > stand apart from the core sqlite3, I was curious if I could use them > with sqlite3 version 3.5.9 since that version is already in use in > my organization. Might very well work on unix systems. I think there were some incompatibilities with the windows OS layer that were fixed

Re: [sqlite] Questions from a new user

2009-06-18 Thread Dan
reset() or sqlite3_finalize() on the statement handle. You can also invalidate it by calling sqlite3_column_text16(), or bytes16(). In this case the buffer that contains the utf-8 representation (a pointer to which is returned by sqlite3_column_text()) is discarded to make room for the utf-16 representa

Re: [sqlite] Compite with DSQLITE_THREADSAFE=1 but application has mulitple threads using the same connection

2009-06-09 Thread Dan
On Jun 10, 2009, at 5:23 AM, Joanne Pham wrote: > Sorry Couldn't locate the email about Compite with > DSQLITE_THREADSAFE=1 bu the application has multiple threads using > the same connection? > Would you pleas direct me to any document that has this info. > Thanks, > JP >

Re: [sqlite] Some index questions

2009-05-27 Thread Dan
On May 27, 2009, at 10:13 PM, Marcus Grimm wrote: > Hi Dan, > > thanks for your answers: this was exactly what I was looking for. > > Dan wrote: >> On May 27, 2009, at 9:08 PM, Marcus Grimm wrote: >>> >>> The difference, I guess, to a "real"

Re: [sqlite] Some index questions

2009-05-27 Thread Dan
t; is the benefit or application of a compound index compared to two > single indexes ? Such a query can use the compound index T1Idx above. It can do the following too: WHERE b = 3 AND c = 4; WHERE b = 3 AND c > 4; but cannot be used to optimize: WHERE c = 4; Dan. _

Re: [sqlite] Alignment bug in SQLIte 3.6.14.2

2009-05-27 Thread Dan
Looks like the same issue as reported here: http://www.sqlite.org/cvstrac/tktview?tn=3869 Fix will be included in 3.6.15. Or just grab the patch here if you're in a hurry: http://www.sqlite.org/cvstrac/chngview?cn= Dan. On May 27, 2009, at 12:12 PM, Brian Dantes wrote: > We

Re: [sqlite] suggested changes to file format document

2009-05-27 Thread Dan
> Thanks very much for catching these. Document is now updated with the fixes in the fossil docsrc repository. Dan. > 1. In the following, s/less than/less than or equal to/ > > """ > 2.3.3.4 Index B-Tree Cell Format > [snip 2 paragraphs] > > If t

Re: [sqlite] database file header: "schema layer file format" anomaly

2009-05-26 Thread Dan
gt; documents and reality should always be reported, so here it is. As you say, probably not important in practice but still worth getting right. Thanks for reporting this. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [sqlite-dev] How to install sqlite3-3.6.14.1.bin.gz

2009-05-25 Thread Dan
On May 25, 2009, at 2:52 PM, Manasi Save wrote: > Hi, > > Can anyone help me on how to run sqlite3-3.6.14.1.bin.gz on Linux > machine. > I am working on Fedora 10. Please if anyone can provide any input on > this. Like this: d...@computer2:~/tmp$ wget

Re: [sqlite] read_uncommitted=on; question

2009-05-25 Thread Dan
at table until connection A either COMMITs or ROLLBACKs its open transaction. Trying to do so returns SQLITE_LOCKED. However, when in read_uncommitted=1 mode, the second connection reads the modified contents of the table, even though that data has not yet been (and indeed may never be) committe

Re: [sqlite] about sqlite on line back up API

2009-05-22 Thread Dan
> finished. Did you open the flash database with "PRAGMA locking_mode=exclusive", or some other option that would turn on persistent journals? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] about insert into select

2009-05-20 Thread Dan
ble A; > (2) select a row from B ,then insert the row into table A > immediately, repeat the precess. Usually strategy 2. Falls back to 1 if A and B are the same table, or if there are triggers that imply inserting rows into B may modify A. Dan. > > > > > > ___

Re: [sqlite] How to install the latest version of sqlite3 on Ubuntu?

2009-05-18 Thread Dan
:/usr/ > games > So I think the executable file sqlite3 is seen by PATH. > Could you please tell me any more suggestions? $ ldd /usr/local/bin/sqlite3 Check it's linking to the correct libsqlite3.so. Dan. > > > > > > >

Re: [sqlite] SQLITE_ENABLE_MEMORY_MANAGEMENT still single threaded?

2009-05-18 Thread Dan
ads to do both writes and reads - bad > for > performance. Using the same thread/connection-handle for reading and writing a database might improve performance. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] seg fault in sqlite3MemFree

2009-05-14 Thread Dan
re out why the pointer is decremented, but it seems this > is causing core dumps only with virtual tables. > > Did anybody else see this? Am I doing something wrong? Do you have a stack trace for the crash? On linux, open the core with [gdb ] and type "where". Dan. > Tha

Re: [sqlite] Bad UPDATE performance

2009-05-14 Thread Dan
On May 14, 2009, at 2:33 PM, Ofir Neuman wrote: > Dan, > > Before I got your reply I checked it with Pcache1RemoveFromHash() > and it > fixed the problem. > > I will re-check this issue with pCache->nPage-- but I guess that it > will fix > the problem as

Re: [sqlite] Bad UPDATE performance

2009-05-13 Thread Dan
On May 14, 2009, at 4:08 AM, Ofir Neuman wrote: > Thanks Dan this was very helpful it seems that I have a similar > problem. > > Didn't try the patch yet but I find out a scenario to reproduce the > problem. > > 1. Process A perform UPDATE on bunch of records (wi

Re: [sqlite] Bad UPDATE performance

2009-05-12 Thread Dan
me > operation on the DB multiple times, after a while everything will > become > slow. Maybe try this patch: http://www.sqlite.org/cvstrac/chngview?cn=6619 Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.6.14

2009-05-08 Thread Dan
ower failure or OS crash. When using asynchronous IO this should not be possible (assuming the hardware is not being untruthful - just as when using regular "PRAGMA synchronous=full" mode without the async IO VFS). Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_open_v2 and SQLITE_BUSY

2009-05-08 Thread Dan
xSectorSize() and xDeviceCharacteristics(). But that's all, nothing is read, written or locked until later on. So you won't get SQLITE_BUSY back from sqlite3_open_v2(). You might manage an SQLITE_CANTOPEN if you tried to open a directory or, depending on the flags passed to open_v2(), a file that

Re: [sqlite] SQLite version 3.6.14 and async vfs

2009-05-07 Thread Dan
h. > And another question just to be sure that I understand it correctly: > async vfs holds only one queue for all opened database files, right? True statement. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Performance of in-memory database and memory journal

2009-05-06 Thread Dan
;> ... SELECT statement. > > So, if I always do INSERT ... VALUES (), i.e. always insert only one > row by one statement, then this insert will be able to rollback > harmlessly even without journal? Assuming it's a constraint failure that causes the rollback that is true (what e

Re: [sqlite] Performance of in-memory database and memory journal

2009-05-06 Thread Dan
if you have statements that affect more than one row that could hit a constraint. i.e. an UPDATE or an INSERT INTO ... SELECT statement. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] OT: how best to convert sqlite3_int64 to and from string in a cross platform fashion?

2009-05-04 Thread Dan
rm bit shifting and will be much faster than the > string conversions. You're thinking of the varint format used in the file-format: http://www.sqlite.org/fileformat.html#varint_format sqlite3_int64 is just a typdef of int64_t on most platforms. Dan. > > > HTH, > K

Re: [sqlite] sqlite3_mutex_enter(db->mutex) problem

2009-04-30 Thread Dan
e3Step(v))==SQLITE_SCHEMA There is something wrong with the statement handle that you are passing to sqlite3_step(). Possibly the handle has already been passed to sqlite3_finalize() already. Dan. > > > > > > ___ > sqlite-users mailing

Re: [sqlite] Sporadic freezes of sqlite

2009-04-23 Thread Dan
On Apr 23, 2009, at 10:05 PM, Pavel Ivanov wrote: > I think, this will be an awesome option for me, thanks! > I believe you are talking about sacrificing consistency not only over > power outage but over SIGKILL too, right? It's a bit worse to have > though I think it will be acceptable in my

Re: [sqlite] index optimization

2009-04-20 Thread Dan
On Apr 20, 2009, at 4:20 PM, galea...@korg.it wrote: > Hi, > if I've got a lot of queries as follows: > SELECT id,title FROM Song WHERE title >= 'last_title' AND > (title>'last_title' OR id>last_id) ORDER BY title ASC, id ASC > what's the best index should be created? (id is the key); > I red

Re: [sqlite] How to minimize or remove need for dirty bitmap memory size?

2009-04-14 Thread Dan
its rollback journal. [...] > > Aside from a larger page size, what remedies are suggested for > removing (or minimizing) this requirement? That statement is out of date. Since it was written the bitmap has been replaced with a better data structure that does not require the big per-transactio

Re: [sqlite] PRAGMA doesn't support parameter binds?

2009-04-13 Thread Dan
d for a printf- > style API to sqlite3) so can anyone confirm or deny that parameter > binds do in fact not work for PRAGMA statements? Bound parameters do not work with pragma statements. Dan. > > > Thanks! > > ___ > sqlite-

Re: [sqlite] SQLITE_CORRUPT - database disk image is malformed

2009-04-10 Thread Dan
e. Call the sqlite3_threadsafe() API at runtime if you are not sure. If you have example code that can reproduce this, please file a bug here: http://www.sqlite.org/cvstrac/tktnew It sounds like this could use looking into. Dan. > Cheers, > Dave. > _

Re: [sqlite] Possible bug

2009-04-09 Thread Dan
On Apr 9, 2009, at 3:18 PM, Arthur Skowronek wrote: > Griggs, Donald wrote: >> This mailing list, like many, will automatically strip attachments. >> Posting onto your own webspace is a great way, as you have >> discovered, > to reference files. > Thank you for your advice :). > >> >> I'm

Re: [sqlite] heap corruption?

2009-04-06 Thread Dan
(heap, 1024*1024, 32); If it is not SQLite corrupting the heap (it could be other parts of the app), then the crash will likely occur in some other sub-system when SQLite is configured this way. Dan. > thanks > tom > >

Re: [sqlite] crash on sqlite3 mutex

2009-04-06 Thread Dan
On Apr 7, 2009, at 1:11 AM, Joanne Pham wrote: > Hi all, > I have the application is used sqlite 3.5.9 and the program is > crashed with the following strack trace: > #0 0x46b35300 in pthread_mutex_lock () from /lib/libpthread.so.0 > #1 0xb6def162 in sqlite3_mutex_enter (p=0x9aca00b6) at

Re: [sqlite] busy_timeout() doesn't work

2009-04-06 Thread Dan
ile in order to read the database schema. Because there is a transaction open, the SHARED lock is not released when sqlite3_prepare() returns. At this point db2 has a SHARED lock and db1 has RESERVED. When sqlite3_step() is called, db2 attempts to upgrade to a RESERVED lock. You then have the situatio

Re: [sqlite] sqlite3_step() returning SQLITE_OK

2009-04-06 Thread Dan
right to me. What SQLite version? Can you post code that reproduces this? Thanks, Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Using the static lib of sqlite3 under 64 bit ubuntu

2009-03-29 Thread Dan
On Mar 29, 2009, at 10:01 PM, Danny De Keuleneire wrote: > Settings: > > Gcc 4.3.3 > Added usr/lib64/libsqlite3.a > > Error: > > Undefined reference to 'pthread_mutex_trylock' > > What I am missing? -lpthread -ldl ___ sqlite-users mailing list

Re: [sqlite] Sqlite3 crashes when using the where command

2009-03-25 Thread Dan
er compile > options would > be appreciated. Could be the same as this: http://www.sqlite.org/cvstrac/tktview?tn=3613 Fixed here: http://www.sqlite.org/cvstrac/chngview?cn=6364 Dan. > > -- > View this message in context: > http://www.nabble.com/Sqlite3-crashes-when-using-th

Re: [sqlite] question about shared cache

2009-03-24 Thread Dan
> files. That is correct. SQLite will serialize calls on a single file-handle (sqlite3_file*). You do not need a mutex for each file-handle in the OS layer. Dan. > > > > > Cheers, > > Dave. > > > > ___ > sqlit

Re: [sqlite] problems with shared cache?

2009-03-20 Thread Dan
>> Yep - but only the three listed on this page: >> >> http://www.sqlite.org/cvstrac/wiki?p=UndoRedo >> >> So they shouldn't be modifying anything in the main DB, only the >> temporary DB. >> >> On Fri, Mar 20, 2009 at 3:13 PM, Dan <daniel

Re: [sqlite] problems with shared cache?

2009-03-20 Thread Dan
On Mar 20, 2009, at 8:10 AM, Damien Elmes wrote: > Unfortunately, a user has just reported the same primary key error > message with shared cache disabled, although the freezing appears to > have been fixed. > > However, when I ask the user to send me their deck, I find that: > > sqlite> pragma

Re: [sqlite] Compiling 3.6.11 on Solaris results in runtime segmentation fault

2009-03-14 Thread Dan
ght is an unsigned 64-bit integer. But aligned to a 4-byte boundary, not an 8-byte one. I guess that's a problem. Could be similar to this one: http://www.sqlite.org/cvstrac/tktview/tn=3553 Is this a 32-bit build? Can you post a ticket for this crash? It's not going to get fixed today...

Re: [sqlite] WHERE clause doesn't seem to work right

2009-03-13 Thread Dan
ection 3 of the datatype3.html document. Check out the examples in datatype3.html. They should make everything clear. Dan. > -- > View this message in context: > http://www.nabble.com/WHERE-clause-doesn%27t-seem-to-work-right-tp22497543p22498479.html > Sent from the

Re: [sqlite] How to interrupt a running query in SQLite?

2009-03-13 Thread Dan
tion returns SQLITE_ERROR? What does sqlite3_errcode() return? Dan. > > > I am testing with SQLite 3.6.11. > > Regards, > Manohar.S > > On Thu, Mar 12, 2009 at 4:10 PM, Dan <danielk1...@gmail.com> wrote: > >> >> On Mar 12, 2009, at 4:54 PM, manohar s

Re: [sqlite] sqlite3_extended_result_codes() return value

2009-03-12 Thread Dan
f their head, I'll do some code spelunking. I'm not sure what it means. Right now it always returns SQLITE_OK. Dan. > > > http://sqlite.org/c3ref/extended_result_codes.html > > RW > > --Tyco Electronics-- > Ron Wilson, S/W Systems Engineer III &g

Re: [sqlite] Thread-safety and sqlite3_stmt objects

2009-03-06 Thread Dan
bjects". Why do you want to use a single sqlite3_stmt* from multiple threads at the same time? Dan. > Could someone please clarify this (and maybe add some documentation)? > > Cheers, > > Shawn Wilsher > Mozilla Developer > ___ > s

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-05 Thread Dan
iling list... :-) The website could be much improved by including examples. Feel free to create a wiki page or two if you have any ideas for them. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-05 Thread Dan
On Mar 6, 2009, at 2:53 AM, Hynes, Tom wrote: > Dan, > > I am a little confused now about how to treat a SQLITE_LOCKED > error. Is this to be treated the same as SQLITE_BUSY (i.e. can > retry, unless an explicit transaction is in effect and the statement > is not a COM

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-05 Thread Dan
On Mar 6, 2009, at 12:22 AM, Marcus Grimm wrote: > Dan, > > I'm not sure what you mean by technically the SQLITE_BUSY is > also wrong. In the test program I get the SQLITE_BUSY quite > often and by retrying the sqlite3_step() it will sooner or > later succeed. Huh. My mi

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-05 Thread Dan
On Mar 5, 2009, at 11:14 PM, Marcus Grimm wrote: > Hi Dan, > > thank you! > > Yes! I was not aware that it is wrong to redo a step > when it previously returned the LOCKED state. > That was the reason for the (correct) MISSUSE return on > the 2nd attempt. > > I thi

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-05 Thread Dan
if( (rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED) ) { Sleep(SQLTM_TIME); n++; } }while( (n < SQLTM_COUNT) && ((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED))); If sqlite3_step() returns SQLITE_BUSY or SQLITE_LOCKED, you need to reset the stateme

Re: [sqlite] Foreign key support

2009-03-04 Thread Dan
rac/getfile?f=sqlite/src/shell.c=1.205 Compile it with the amalgamation source: gcc -O2 sqlite3.c shell.c -o sqlite3 Or you could get the full 3.6.11 tarball and compile the standalone version of genfkey it includes: http://www.sqlite.org/sqlite-3.6.11.tar.gz Dan. > Thanks, > T

Re: [sqlite] sqlite3 datbase disk image malformed

2009-03-04 Thread Dan
hat the database is valid when there is really a hot-journal file that requires rollback in the file-system. If there are multiple clients all trying to access the database at once then a few operations might return SQLITE_BUSY, but eventually one of the clients will successfully obtain the EXCLUSIVE

Re: [sqlite] Bug in SQLITE? "Joins + Order By" Changing row count!?!

2009-03-04 Thread Dan
e need to fix it. But it's much more difficult to figure out if it is still present or not without a database to run your queries against. Thanks, Dan. On Mar 4, 2009, at 9:17 PM, Jonathon wrote: > Thanks Dan for the reply, > > How would I go about creating a sql dump? > > As f

[sqlite] Installing SQLite

2009-03-03 Thread Dan M. Wall
. Please forgive my Mac OSX ignorance! Any help you can provide would be greatly appreciated! Dan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sqlite write ( HELP )

2009-03-02 Thread Dan
On Mar 2, 2009, at 1:12 PM, Rajesh Nair wrote: > Hi all > > When I use INSERT INTO stmt how fast sqlite writes it in to the > database. Is it depends up on the OS. Will the record be written to > the database on returning from the exec of INSERT stmt? Results should be in the db when the

Re: [sqlite] View - What happens internally

2009-02-28 Thread Dan
QL compiler (the thing that runs when you call sqlite3_prepare_v2()) converts the select statement to "SELECT * FROM (SELECT * FROM t1)" before compiling a prepared statement to implement the query. So adding a view doesn't require a huge

Re: [sqlite] SAVEPOINT : Seems don't work

2009-02-24 Thread Dan
On Feb 25, 2009, at 2:31 AM, REPKA_Maxime_NeufBox wrote: > I try for test as follow : > > on DOS : sqlite3.exe Database > > then type : SAVEPOINT spoint; > Error message is : 'SQL error :near "savepoint": syntax error' Probably you need to upgrade. SAVEPOINT f

Re: [sqlite] SAVEPOINT : Seems don't work

2009-02-23 Thread Dan
the SAVEPOINT command malfunction? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite caching

2009-02-23 Thread Dan
subsequent runs retrieve data from the OS cache. Much faster. Dan. > Regards, > Manohar.S > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Is there any way to avoid cache invalidation between transactions?

2009-02-22 Thread Dan
d. Otherwise, the cache contents may be retained and used by the next transaction. So in your situation you probably have nothing to worry about. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Attached database atomic-ness

2009-02-20 Thread Dan
y considered a safe thing to do (whereas a multi-file transaction where the main database is in-memory is not). Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] turning off index during insert?

2009-02-20 Thread Dan
ith re-index speed. These are both good suggestions and should help. But it is not literally true that indexes are not updated during a transaction. Dan. > It is possible you could just do this from sqlite3 by attaching both > DBs and running something like: > > INSERT INTO newdb.table

Re: [sqlite] Little SQL help please..

2009-02-17 Thread Dan
On Feb 18, 2009, at 1:27 AM, johnny depp (really!) wrote: > > I didn't run it yet, the idea of using min(col1) = max(col1) was all I > needed. > I assumed it was incorrect because I thought > referring to an ungrouped column in a group by was incorrect, > because the > ungrouped col would

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-13 Thread Dan
_____ > From: Dan <danielk1...@gmail.com> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Sent: Thursday, February 12, 2009 9:03:12 PM > Subject: Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/ > vdbeapi.c:204 > > > On Feb

Re: [sqlite] sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204

2009-02-12 Thread Dan
On Feb 13, 2009, at 11:49 AM, Joanne Pham wrote: > Hi All, > We have an application is used SQLite 3.5.9 and our program is > crashed on > "sqlite3_finalize (pStmt=0x28) at ../src/vdbeapi.c:204" and I don't > know why it crashed on this line. > Do you have any information about why it is

Re: [sqlite] Error code 21 ( SQLITE_MISUSE ) when binding variables

2009-02-11 Thread Dan
> > * Loop through values, calling sqlite3_bind_text on each of then: > rc = sqlite3_bind_text( my_db_stuff->stmt, my_db_stuff- > >current_position > + 1, local_buff, len, SQLITE_STATIC ); > > On the 1st call to the above, I get the return code 21, which I assume > is 'SQLITE_MISUSE' from

[sqlite] need partial index

2009-02-11 Thread Dan Leshchiner
trick that i am missing? thanks in advance, dan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Insertion and Updation using sqlite3_prepare()

2009-02-07 Thread Dan
programmatically and set the permissions on the file to > allow write > access. This did resolve my problem. Could be a bug. Operating system? Exactly how do we set the permissions on the database file to cause the problem? Dan. > Regards, > -Tom > > On Thu, Feb 5, 2009 at 4:42

Re: [sqlite] Saving and loading SQLite pages from a buffer

2009-02-07 Thread Dan
online backup code commentary > about only 1k pages... Yes. The backup code should work with all page sizes. There is some example code up on the draft website now. This is meant to complement the existing API documentation. http://www.sqlite.org/draft/

Re: [sqlite] journal_mode = off crash in 3.6.10

2009-02-04 Thread Dan
I think this may be a new one. See here: http://www.sqlite.org/cvstrac/tktview?tn=3636 Dan. On Feb 4, 2009, at 4:27 PM, Vivien Malerba wrote: > This has already been fixed, see > http://www.sqlite.org/cvstrac/tktview?tn=3603 > > Regards, > > Vivien > > 2009/2/4 B

Re: [sqlite] checking database file

2009-02-01 Thread Dan
On Feb 2, 2009, at 2:34 PM, Zaphod wrote: > Hi All, > > Let's say every time before my system starts to run, i would like to > check the > database for any kind of errors/mistakes. > Is there any API or utility for such purpose? See "PRAGMA integrity_check" here:

Re: [sqlite] Foreign key support

2009-01-30 Thread Dan
On Jan 31, 2009, at 12:25 AM, Adam DeVita wrote: > Good day, > > If I write into the sqlite3 using the analyzer: > > create table mysns (SN int primary key, desc text); > insert into mysns (SN, desc) values (1,2); > create table t2 (mynum int, desc2 text, SN references mysns(SN) ); > > insert

Re: [sqlite] Do all db's in a connection need same level of lock?

2009-01-29 Thread Dan
def|exclusive sqlite> commit; sqlite> begin exclusive; sqlite> pragma lock_status; main|exclusive temp|closed def|exclusive sqlite> commit; Dan. On Jan 30, 2009, at 1:54 AM, Chris Eich wrote: > I can't get it this (undocumented <http://www.s

Re: [sqlite] Do all db's in a connection need same level of lock?

2009-01-29 Thread Dan
; makes sense when all the files are being changed, but I have a use > case > where I am only modifying one of the attached databases and would > like to > leave the main database unlocked. That should happen automatically. You can use "PRAGMA lock_status" to query the l

Re: [sqlite] Am I understanding Blobs correctly?

2009-01-26 Thread Dan
On Jan 27, 2009, at 8:56 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mike McGonagle wrote: >> From what I am understanding, I get the >> impression that a Blob is no more than the binary data > > Binary large object. I came across this the other day:

Re: [sqlite] Ticket #3602

2009-01-23 Thread Dan
ut on the severity of this assertion. Initially it looks like the ALWAYS(pExpr->pList) can be replaced with just pExpr->pList. The assert() is wrong. Dan. > > > Thanks, > -jens > > > ___ > sqlite-users mailing list > sq

Re: [sqlite] Effective way to use RTree to find the neighborhood ???

2009-01-22 Thread Dan
On Jan 22, 2009, at 6:48 PM, Sergej Schwarz wrote: > Dear all, > > I'm using RTree to have FAST possibility to extract all the > polygons, which intersect a specified window, overlap this specified > window or are completely in this window. Please see the picture at >

Re: [sqlite] FTS3 - operator

2009-01-21 Thread Dan
d syntax that is enabled by defining SQLITE_ENABLE_FTS3_PARENTHESIS at compile time. The enhanced syntax does not support the '-' operator at all. Instead, it uses the binary operator NOT. When using the enhanced syntax, you can do: MATCH 'router NOT "ip address"' and things will work

Re: [sqlite] fulltest *malloc* test failures

2009-01-16 Thread Dan
On Jan 17, 2009, at 12:58 AM, Nicolas Williams wrote: > Failures on these tests: malloc-1.transient.40 malloc-10.transient.40 >malloc-14.transient.40 malloc-17.transient.41 > malloc-20.transi ent.40 malloc-26.transient.40 > >

Re: [sqlite] SQLite version 3.6.10

2009-01-15 Thread Dan
pected: [1 1] > Got: [0 {}] > savepoint3-2.transient.4819... > Expected: [1 1] > Got: [1 {unable to open database file}] > savepoint6-smallcache.294.2... > Error: no such table: t1 > savepoint6-smallcache.295.1... > Error: no such table: t1 Do you enable FTS3? I think that may

Re: [sqlite] Multithreaded vs. serialized

2009-01-14 Thread Dan
On Jan 15, 2009, at 6:07 AM, John Belli wrote: > Assuming I've decided to use evil threads, and am opening a new > connection in each thread, does it matter whether I use multithreaded > (-DSQLITE_THREADSAFE=2) or serialized (-DSQLITE_THREADSAFE=1)? Any > idea if one is faster than the other? I

Re: [sqlite] Question about concurrency

2009-01-12 Thread Dan
ement handles yourself. If you make calls on a single database handle from two or more threads simultaneously the application will likely crash or malfunction. The degree of concurrency provided is the same in either case, just that in CONFIG_MULTITHREAD mode you are responsible for

Re: [sqlite] Collation not used

2009-01-09 Thread Dan
On Jan 9, 2009, at 9:43 PM, Martin.Engelschalk wrote: > Hello list, > > I definied a collation and used it in the order by - clauses of > queries. > In one query, sqlite calls the collation function, and in the other > query, it does not (i checked by inserting a printf inside the >

Re: [sqlite] sqlite3_get_table question

2008-12-29 Thread Dan
On Dec 30, 2008, at 1:29 AM, schachtobi wrote: > >> Date: Mon, 29 Dec 2008 11:20:58 +0700 >> From: Dan <danielk1...@gmail.com> >> Subject: Re: [sqlite] sqlite3_get_table question >> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>

Re: [sqlite] sqlite3_get_table question

2008-12-28 Thread Dan
On Dec 29, 2008, at 7:57 AM, schachtobi wrote: > Hi, > > I retrieve data (1 row only) via the handy getTable function. Inside > this row is one blob object with pixeldata. > > The size is: > 256*256 Pixels with 3 bytes each > -> 256*256*3 = 196608 Bytes > > select length(data) from ch; > > gives

Re: [sqlite] Big performance regressions since 3.4.0?

2008-12-24 Thread Dan
cvs before - is there an easy way to checkout the code for some > kind of "label" that represents an official release, or is there a > depot > somewhere that I can just download earlier distros? If you post the performance test program I'll take a look at it. Dan.

Re: [sqlite] rtree segfault on Linux X86_64

2008-12-22 Thread Dan
On Dec 22, 2008, at 12:46 PM, Josh Purinton wrote: > I get a segfault using a particular rtree query. Here's the simplest > way I > could find to reproduce it. Thanks for doing that. The patch linked from this page (click "Patchset" toward the top-left of the page) fixes things:

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:18 PM, flakpit wrote: > > > > Dan Kennedy-4 wrote: >> >> >>> Is there any way to fetch the very first record in the database and >>> find the > id number? >> >> The 'first record' is a malleable concept. Yo

Re: [sqlite] SQLite under windows

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:10 PM, Dancsa wrote: > Good Morning > I have some problem with sqlite. > I can't use it. I googled a lot after examples but i just found how > to use it under linux with gcc. > Where can I find static library to link in or how sould I use the dll? Easiest way to use

Re: [sqlite] Atomicity with triggers.

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:08 PM, Srinivas Nayak wrote: > Hi All, > > I am executing a SQL query DELETE using the function > sqlite3_exec( ). I have > a AFTER trigger that will be activated by my SQL query DELETE that > is being > executed. I have a doubt on the execution of sqlite3_exec( ). > >

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread Dan
On Dec 22, 2008, at 5:43 PM, flakpit wrote: > > Good evening. > > Due to many deletions, my database is non sequential anymore. > > Is there any way to fetch the very first record in the database and > find the > id number? Or for that matter, a function to select the last record? > > I've

<    9   10   11   12   13   14   15   16   17   18   >