Re: [sqlite] Data structure

2007-04-12 Thread Ken
is an excellent tool. Ken Lloyd <[EMAIL PROTECTED]> wrote: Would anybody suggest a good tool for performance measurement (on Linux) ? On Wed, 2007-04-11 at 10:35 -0500, John Stanton wrote: > You might discover that you can craft a very effective memory > resident > stora

Re: [sqlite] Data structure

2007-04-12 Thread Ken
You might want to check out kazlib for your data structure lookups. It cantains code to implement Linked List, Hast, and Dictionary access data structures. The hashing code is really quite fast for in memory retrievals plus it is dynamic so that you don't have to preconfigure your

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Ken
us far are not very compelling for savepoints. But savepoints are usefull in special situations. Instead of Nested Transactions, What about the concept of an autonomous transaction? Regards, Ken

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Ken
and really requires the concept of a transaction ID. Maybe this is specific to the DB vendor (ORA$$) I totally agree, in more than 20 years of commercial db development and DBA work, I've only encounterd the use of savepoints 1 time. Dennis Cote <[EMAIL PROTECTED]> wrote: Ken

Re: [sqlite] what do I compile with -dthreadsafe=1

2007-04-17 Thread Ken
configure --enable-threadsafe should do it. Rafi Cohen <[EMAIL PROTECTED]> wrote: Hi, when I read the article about sqlite and multithread in cvstrac, I understood that I need to compile my source files using sqlite functions with -DTHREADSAFE=1. Now, due to a pproblem I had in my project I

Re: [sqlite] 2 Threads - lock after Commit:

2007-04-22 Thread Ken
Matthew Veenstra <[EMAIL PROTECTED]> wrote: Hello, I was wondering if someone can shed a bit of light on a problem I am having. I am using SQLite in a client setting on Mac and Windows. I have two threads. That I use SQLite in. The main thread uses this to get data and display it to screen.

[sqlite] Makefile

2007-05-02 Thread Ken
? If not this would be really nice. Can the Make that is provided build a libsqlite3.a and libsqlite3.so from the amalgamated sqlite3.c ??? Thanks Ken

Re: [sqlite] Makefile

2007-05-02 Thread Ken
Thanks Tom, That was just what I was looking for Regards, Ken Tomash Brechko <[EMAIL PROTECTED]> wrote: On Wed, May 02, 2007 at 11:43:04 -0700, Ken wrote: > Is there a way to disable the -g flag for the library? Assuming you are using configure, ./configure CF

Re: [sqlite] May I ask why the source distribution mechanism was changed starting with 3.3.14?

2007-05-04 Thread Ken
100% concur with Dennis. Thanks again for a great product! Dennis Cote <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > > Can somebody please explain to my how 2 files is less manageable > than 60? > > > Richard, I think part of the problem is simple inertia. Some people have

Re: [sqlite] May I ask why the source distribution mechanism was changed starting with 3.3.14?

2007-05-04 Thread Ken
time gcc -m32 -O2 -I. -I../sqliteSrc/sqlite-3.3.17/src -DNDEBUG -DTHREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c sqlite3.c -fPIC -DPIC -o .libs/sqlite3.o real0m20.266s user0m19.773s sys 0m0.444s time gcc -m32 -O2 -I.

Re: [sqlite] Starving for New User Information

2007-05-07 Thread Ken
The .a file is for static linking. The .sl file is for dynamic linking (shared library) The .lib file is hidden because you were supposed to do a "make install" after make which would install the .libs into whatever "prefix" you gave to configure... Static linking makes it easier for

Re: [sqlite] reseting primary key

2007-05-07 Thread Ken
DRH SAID: [EMAIL PROTECTED] wrote:The details of the UPDATE or DELETE are left as an exercise for the reader. Excellent, it reminds me of High School integral proofs. Q.E.D.

Re: [sqlite] perfomance degradation for expr "foo = X or bar =X"

2007-05-09 Thread Ken
. -- D. Richard Hipp I think that is a good thing that sqlite isn't that clever! I've seen too many cases of advanced optimizers such as Oracle totally mess up the execution plans for complex query operations. There are simply too many choices for the optimizer to pick the best plan. Ken

[sqlite] sql stack using sqlite

2007-05-09 Thread Ken
using sql. thanks for any ideas. Ken

Re: [sqlite] sql stack using sqlite

2007-05-10 Thread Ken
tbl = 'c'); Any ideas of a better way? Thanks, Ken Ken <[EMAIL PROTECTED]> wrote: Id like to get your ideas on implementing a stack using sql tables. table a, contains references to b table b contains refernce to a table c contains delete entries for A (but b

[sqlite] Database locked version 3.3.17

2007-05-10 Thread Ken
more details to reproduce a simple test case. Ken

Re: [sqlite] Database locked version 3.3.17

2007-05-10 Thread Ken
Resolved the issue. My issue on the app side. I think the newer version is much faster. So much so that it changed timing characteristics and reveald a logic bug in my code. Appologies, Ken Ken <[EMAIL PROTECTED]> wrote: Hi all, Think I may have hit some form of

RE: [sqlite] One more SQLite threading question

2007-05-18 Thread Ken
r Multiple readers, but not both concurrently. I'm not trying to pick on sqlite, just pointing out that it really doesn't perform multi threading or even conncurrent access very well in a read/write environment. Read Only, its great. Single threaded Read/Write ... Very good as well. Reg

RE: [sqlite] One more SQLite threading question

2007-05-18 Thread Ken
don't see how it could improve concurrency given that a single thread is used to perform db access. And all clients are queued and blocked upon the single threads message queue. Thanks, Ken Dan Kennedy <[EMAIL PROTECTED]> wrote: > Which in that case whats the point of a sha

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-31 Thread Ken
One needs to make use of CAS or LL/SC hardware instructions. These can be used to implement lock-free synchronization. Nuno Lucas <[EMAIL PROTECTED]> wrote: On 5/31/07, Eduardo Morras wrote: > At 23:25 30/05/2007, you wrote: > >Setting and reading individual bytes (u8 in sqlite-speak) are

Re: [sqlite] db design mixing different entities in the same table

2007-05-31 Thread Ken
Does a person ever belong to more than one organization? If so then use the following: Create table orgs ( org_id integer, org stuff); Create table Persons(person_id, person stuff); Create table persons_orgs(person_id, orig_id); The persons_orgs is a mapping table that allows one

Re: [sqlite] Concurrency

2007-06-01 Thread Ken
[EMAIL PROTECTED] wrote: Hi, I am having a scenario where I have one reader/writer and many writer threads. All writers are pretty basic (single INSERT INTO; some sort of a logging info what a thread has done). I believe I will receive many BUSY return codes and I don't like these

[sqlite] MMap On Solaris

2007-06-13 Thread Ken
might give better performance especially if the OS would just provide the written buffers performed by Process A to Process B's address space that is MMAPed. Thanks for any guidance. Ken John Stanton <[EMAIL PROTECTED]> wrote: MMAP just lets you avoid one or two layers of buffering an

Re: [sqlite] Database malformed with SQLite3.3.17 on WindowsXP

2007-06-15 Thread Ken
this problem? Thanks Ken

[sqlite] 3.4.0 make

2007-06-18 Thread Ken
make distclean does not seem to clear off the sqlite3.c no tsrc directories. My current build script: configure make distclean configure --enable-threadsafe --disable-tcl --enable-tempstore make sqlite3.c make How does one now build libraries static and shared based

[sqlite] Re: 3.4.0 make

2007-06-18 Thread Ken
he .a, .so an sqlite3 (exe) from the amalgamated sources. Regards and Thanks for a great product, Ken Ken <[EMAIL PROTECTED]> wrote: make distclean does not seem to clear off the sqlite3.c no tsrc directories. My current build script: configure make dist

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Ken
Can you consolidate your multiple binaries to a Single Binary? Then Use threading and sqlite's shared caching to perform the Lookups and updates. That way the cache wouldn't get invalidated??? Someone else here correct me if this is a bad idea!!! pompomJuice <[EMAIL PROTECTED]> wrote:

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Ken
1. Review your oracle 10g db and fix the "HUGE I/O" issues. 2. Why not do the lookups using oracle? Allocate the extra 5 gig to the oracle buffer cache. 3. If you want good lookup performance, try to use the Array level interface so that you don't need to take multiple trips (context switch)

Re: [sqlite] Cache invalidation after insert statements.

2007-06-20 Thread Ken
ere. I hope it works. ken-33 wrote: > > Can you consolidate your multiple binaries to a Single Binary? > Then Use threading and sqlite's shared caching to perform the Lookups and > updates. > That way the cache wouldn't get invalidated??? > > Someone else here corre

Re: Re[2]: [sqlite] The problem with index

2007-06-20 Thread Ken
Joe Wilson <[EMAIL PROTECTED]> wrote: --- "Sergey M. Brytsko" wrote: > But what about the following values: > > 1 1 2 2 100 100 100 100 100 100 100 100 100 100 100 111 111 I guess SQLite's query optimizer could take the cardinality of the column into account via its ANALYZE statistics for

Re: [sqlite] Cache invalidation after insert statements.

2007-06-20 Thread Ken
which takes like 2-3 runs ) sqlite can do lookups at about 5 per second. With the file uncached this value falls as low as 500. Now I need to get the system administrators to make me that ram drive. ken-33 wrote: > > The Ram drive is unlikely to work. It will still have th

[sqlite] Pragma busy

2007-06-22 Thread Ken
Hi all, The following errors are generated in a multi threaded program where each thread has its own independent Connection to sqlite. The command sql=[PRAGMA synchronous=FULL] Results in a rc=[5] and errorr msg=[database is locked] How can this can be avoided? I've tried

[sqlite] API enhancement proposal

2007-06-26 Thread Ken
I'd like to propose the following simple piece of code be added to sqlite. I believe it has some benefits for those who've wrapped the sqlite api's keeping copies in memory of the sql statement being executed. Add an api call that will return the saved SQL if using sqlite3_prepare_v2 or

Re: [sqlite] thread concurrency, inserts using transactions, bug?

2007-06-26 Thread Ken
Brad, Here are my results after modifying the "begin transaction" to a "begin exclusive" Begin transaction is a bit Lazy in that the lock escalation doesnt occur until the pager escalates the lock due to a write. You'll see that the begin exclusive acquires a lock immediately and avoids

Re: [sqlite] thread concurrency, inserts using transactions, bug?

2007-06-26 Thread Ken
Begin transaction is a bit Lazy in that the lock escalation doesnt occur > until the pager escalates the lock due to a write. > > You'll see that the begin exclusive acquires a lock immediately and avoids > the behavoir. Hi Ken, thanks for the reply. Begin exclusive is not a s

Re: [sqlite] Order of operations to recycle setting records

2007-06-29 Thread Ken
Try: // initialization once sqlite3_prepare_v2 // for each bit of data I must write: do { sqlite3_bind_XXX for each param result = sqlite3_step sqlite3_reset } while result is SQLITE_ROW Ben Supnik <[EMAIL PROTECTED]> wrote: Hi Y'all, I am using a loop to insert multiple

Re: [sqlite] Re: Multi-column "in" clause supported?

2007-06-29 Thread Ken
You can also do: select count(*) from guid_version_map where guid||version not in (select guid||version from latest_version) Its not exactly the same, typically only good for small results. Igor Tandetnik <[EMAIL PROTECTED]> wrote: Andrew Finkenstadt wrote: > I'm attempting

Re: [sqlite] Seg Fault when using sqlite3_bind_blob

2007-07-02 Thread Ken
Rich, just a performance note, try the following logic: sqlite3_exec(db, "BEGIN IMMEDIATE", NULL, NULL, NULL); sqlite3_prepare(db, "INSERT INTO table1 (blobData) VALUES (?1)", -1, , NULL); -For each blob... sqlite3_bind_blob(stmt, 1, blobData, blobSize, SQLITE_TRANSIENT);

Re: [sqlite] Re: In Mem Query Performance

2007-07-02 Thread Ken
Timings: Calling Test Now TIME_ms=1210 start=1183394494 end=1183394496 Calling Test Now TIME_ms=1164 start=1183394504 end=1183394505 (time in Ms is 1.2 and 1.1 ... ) Data generated using: #include #include #include #include using namespace std; int main() {

Re: AW: [sqlite] Re: In Mem Query Performance

2007-07-03 Thread Ken
sqlite] Re: In Mem Query Performance Hi Ken, Thanks a lot. But this would require the key to be short. Will Check if this is acceptable to all as we may not be able to port old db data if the key format is changed. regards

Re: [sqlite] Re: In Mem Query Performance

2007-07-03 Thread Ken
Just a thought regarding this key issue. enhancement for sqlite, enable a "reverse Key" indexing method. Would this be a simple change? Ken "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Hi >Hi Ken, > >Thanks a lot. >But this would r

Re: [sqlite] sqlite3_bind_text

2007-07-09 Thread Ken
You can not provide in list items using bind as you described However you can do this: Query = sqlite3_mprintf("select name from foo where id in (%s, %s, %s, %s, %s)", str1, str2, str3, str4, str5); rc = sqlite3_prepare_v2(DB,Query ,-1,,NULL); Then step through the query results...

Re: [sqlite] sqlite3_bind_text

2007-07-09 Thread Ken
You could also do this Query = sqlite3_mprintf("select name from foo where id = ?"); rc = sqlite3_prepare_v2(DB,Query ,-1,,NULL); char str[20][5] = {"32","2","66","3","88"} ; for (i=1;str[i]; i ++) { sqlite3_reset() ; sqlite3_bind_text(Statement,1,str[i],-1,NULL); do {

[sqlite] Inconsistent PRAGMA locking_mode command output

2007-07-16 Thread Ken
Why does the command: Pragma locking_mode = EXCLUSIVE; generate output of "exclusive" where other pragmas such as Pragma synchrous = off; do not generate any output whatsoever? Thanks, Ken

[sqlite] SQL Challenge: select stack

2007-07-19 Thread Ken
that will return the stackpop and stack I'ds paired as follows: 12 | 9 14 | 6 18 | 2 Thanks for your help! ken

Re: [sqlite] Duplicate Row check

2007-07-19 Thread Ken
You can put a Primary Key (unique index) on the table. Then when inserting a duplicate, an error will be generated. Then test for the error. Or if you want the new row to overwrite the original use insert or replace If you goal is to keep the existing use insert or ignore. see:

[sqlite] SQL Challenge, select stack

2007-07-20 Thread Ken
any ideas for a select that will return the stackpop and stack id's paired as follows: 12 | 9 14 | 6 18 | 2 Thanks for your help! ken

Re: [sqlite] Re: SQL Challenge, select stack

2007-07-20 Thread Ken
sql to implement a stack is pretty bad and maybe the best solution is to do this programatically. Igor Tandetnik <[EMAIL PROTECTED]> wrote: Ken wrote: > Does anyone have ideas on how to implement a stack using sql > Given the following tables and data: > > create table stac

[sqlite] shared cache/ test_server.c

2007-07-20 Thread Ken
that started the transaction it moved the message to the end of the queue. Your welcome to call email me directly if you need more info or call if you'd like to discuss my experiences with the server/thread approach. Regards, Ken Richard Klein <[EMAIL PROTECTED]> wrote: Richard Klein

Re: [sqlite] Re: SQL Challenge, select stack

2007-07-20 Thread Ken
s2.value=s.value ...> and s2.id > s.id ...> and s2.id < p.id ); 0|0|TABLE stack AS s 1|1|TABLE stackpop AS p USING PRIMARY KEY 0|0|TABLE stackpop AS p2 USING PRIMARY KEY 0|0|TABLE stack AS s2 USING PRIMARY KEY Results: 2|18 6|14 9|12 Thanks again for such a clean

[sqlite] invalid subselect is not detected ?

2007-07-20 Thread Ken
in ( select id from ss); returns 1 2 3 Shouldn't the subselect fail since the id is not in the SS table ? select s.id from s where s.id in ( select ss.id from ss ); returns: SQL error: no such column: ss.id Thanks, Ken

Re: [sqlite] shared cache/ test_server.c

2007-07-20 Thread Ken
intiated a read request or another transaction request when a transaction was already in progress. Hope that helps. John Stanton <[EMAIL PROTECTED]> wrote: Ken wrote: > Richard, > > You might want to look at src/test_server.c for an example of the > shared_cache if you haven'

Re: [sqlite] shared cache/ test_server.c

2007-07-23 Thread Ken
keeps the client requests enqueued until it can service them some time later. John Stanton <[EMAIL PROTECTED]> wrote: Why not just bloock on the transation. That will queue waiting threads, serializing the access to the transaction. Ken wrote: > My assumption for the serv

Re: [sqlite] invalid subselect is not detected ?

2007-07-23 Thread Ken
Joe, Indeed you are correct its a correlated subquery! Thanks again. Ken Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken wrote: > Is this an error or by design? > create table ss( ssid, ss_value); > create table s(id, s_value); ... > select id from s where id in (

Re: [sqlite] Re: Re: SQL Challenge, select stack

2007-07-23 Thread Ken
Yes that is much better. Thanks again! Ken Igor Tandetnik <[EMAIL PROTECTED]> wrote: Ken wrote: > The 22 is kind of like a time stamp.. (or you could just as easily > add another column indicative of a timestamp. > > insert into stack values (1, 1234); > insert into

Re: [sqlite] shared cache/ test_server.c

2007-07-23 Thread Ken
thout sending a close command into the server thread, resulting in a permanently blocked server queue. You can test this behavouir using the src/test_server.c code and some client connections into the test_server thread. Or I may just be totally off my rocker.. and thats ok too. Ken John Sta

Re: [sqlite] shared cache/ test_server.c

2007-07-24 Thread Ken
avoid these inefficiencies by using the more efficient synchronization features. As you would appreciate a few percent better efficiency on your server means a corresponding increase in the number of possible users. Ken wrote: > John, > The server can maintaine a "

Re: [sqlite] Re: Re: SQL Challenge, select stack

2007-07-25 Thread Ken
in a loop is better than a singleton sql statement. Thanks again, Ken Ken <[EMAIL PROTECTED]> wrote: Yes that is much better. Thanks again! Ken Igor Tandetnik wrote: Ken wrote: > The 22 is kind of like a time stamp.. (or you could just as easily > add another colum

Re: [sqlite] Parser information

2007-07-31 Thread Ken
You should be using the external API calls not the internal sqlite calls and types. See: http://www.sqlite.org/capi3ref.html Rohit Mordani <[EMAIL PROTECTED]> wrote: Hi, This is my program... #include "sqliteInt.h" int main(int argc, char **argv){ Parse parse; Select sel;

RE: [sqlite] File Permission and Busy Handler Issue in SQLite

2007-08-08 Thread Ken
What is the goal of changing permissions? Kiran <[EMAIL PROTECTED]> wrote: The interesting part of the scenario is, when you change the file permission using chmod 000 bulk.db, there is no effect on the process of writing (with sqlite3_exec and busy handler combo) however the same does not work

RE: [sqlite] File Permission and Busy Handler Issue in SQLite

2007-08-09 Thread Ken
r some sort of issue with DB. So my (might I say holistic view) question is if sqlite3_exec is unable to differentiate a busy_handler trigger due to permission other related issues and DB lock, won't we get ourselves into some mis-leading (ambiguity) scenario. Regards, Kiran -Original M

Re: [sqlite] Proposed incompatible change to SQLite

2007-08-09 Thread Ken
Does this mean that the "shared_cached" connections in two threads can access the same DB cache and database in parallel? I'm all for it, either way it should be an improvement. Thanks DRH for a great product. Ken [EMAIL PROTECTED] wrote: We are considering a change to the SQLite

[sqlite] Extra sqlite DB file

2007-08-09 Thread Ken
134 2007-08-09 18:40 bat_412.db-mj514651E0 Thanks, Ken

[sqlite] Help with performance...

2007-08-10 Thread Ken
. Cache size is 4000. locking_mode = exclusive. Synchronous off Is there any way to disable journaling? I can always re-create the DB should anything fail. Any other ideas on how to make this run quicker? Thanks, Ken

Re: [sqlite] Help with performance...

2007-08-12 Thread Ken
: insert into x commit; Could the overhead of memory allocation acount for the variances? Is there any way to pin the sqlite allocated pages into the Master DB's cache? Sort of a sub cached allocation so that attached DB's do not require malloc/free for memory pages? Ken Joe

Re: [sqlite] Help with performance...

2007-08-15 Thread Ken
in 2 places, actually creating the original and for the copy component. Thanks for your patience and allowing me to bounce ideas. Ken Joe Wilson <[EMAIL PROTECTED]> wrote: Forget about the alternate insert statements I suggested. Assuming "id" is declared INTEGER PRIMARY K

RE: [sqlite] SQLITE_BUSY error in multi-threaded environment

2007-08-15 Thread Ken
It should not. As long as those two connections are not used across threads and point to truely different databases. They wouldn't be a soft link would they? I Mark Brown <[EMAIL PROTECTED]> wrote: Hi John- There is a .lock file for each database. From my understanding, that should

RE: [sqlite] SQLITE_BUSY error in multi-threaded environment

2007-08-15 Thread Ken
thread synchronization and see if that improves our results. I'm still thinking our problems may be low-level file i/o bugs with our OS, so perhaps taking out the file-based .lock scheme will help. Thanks, Mark > -Original Message- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Wednesday, Aug

RE: [sqlite] SQLITE_BUSY error in multi-threaded environment

2007-08-16 Thread Ken
y errors during your inserts or commit operations. But the thread wrting thread should eventually be able to acquire the lock and continue as long as the reading threads close off their locks before the writer times out. HTH. Ken

Re: [sqlite] To increase search speed

2007-08-18 Thread Ken
I think method 3 shows the best promise: Obviously M4 is out since it is in memory only. Besides caching should help improve the performance. The qustion that begs to be asked is: What are your performance goals? And what are your performance numbers ie timings for each of the

Re: [sqlite] Towards SQLite version 3.5.0

2007-08-27 Thread Ken
ranlib .libs/libsqlite3.a creating libsqlite3.la (cd .libs && rm -f libsqlite3.la && ln -s ../libsqlite3.la libsqlite3.la) ./libtool --mode=link gcc -g -O2 -I. -I../src -DNDEBUG -DTHREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DHAVE_READLINE=1

[sqlite] version 3.5.0 - Segv

2007-08-29 Thread Ken
- Error Here releasePage(pOldPage); pCur->pPage = pNewPage; pCur->idx = 0; pCur->info.nSize = 0; Ken

[sqlite] version 3.5.0 - Segv

2007-08-29 Thread Ken
:3304 (gdb) if( rc ) return rc; pNewPage->idxParent = pCur->idx; pOldPage = pCur->pPage; pOldPage->idxShift = 0; < Error Here releasePage(pOldPage); pCur->pPage = pNewPage; pCur->idx = 0; pCur->info.nSize = 0; Ken

Re: [sqlite] version 3.5.0 - Segv

2007-08-29 Thread Ken
40c413 in sqlite3OsWrite (id=0x55aaa0, pBuf=0x401ffc30, amt=24, offset=0) at os.c:38 (gdb) Quit (gdb) Ken <[EMAIL PROTECTED]> wrote: 4 threads, shared_Cache enabled LOOP 100 BEGIN LOOP 50 times INSERT end LOOP COMMIT SELECT COUNT(*) ... end LOOP program received si

Re: [sqlite] version 3.5.0 - Segv

2007-08-30 Thread Ken
wrote: Hi Ken, Probably a bug in the new threading stuff. Can you share source code for this test or is it part of some large app? Either way, thanks for the report. Dan. On Wed, 2007-08-29 at 22:15 -0700, Ken wrote: > Also erros out here, sporadically. > int sqlite3OsWrite(sqlite3_fil

Re: [sqlite] sqlite3 Database Pointer multithreading / concurrency

2007-08-30 Thread Ken
http://www.sqlite.org/lockingv3.html where A3 means the processes 3rd connection. A1 - Shared (select) B2 - Pending (insert) A3 - Shared (select) Looks like a deadlock at A3. B2 has a pending Lock and can not make further progress until A1 completes. But A3 is now waiting on B2.

Re: [sqlite] version 3.5.0 - Segv

2007-08-30 Thread Ken
** $Id: btree.c,v 1.420 2007/08/30 01:19:59 drh Exp $ Compilation: ../configure --enable-threadsafe --disable-tcl --enable-tempstore make gcc -g -O2 -I. -I../src -DNDEBUG -DTHREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c ../src/alter.c -o alter.o >/dev/null

Re: [sqlite] version 3.5.0 - Segv

2007-08-30 Thread Ken
Recompiled with: gcc -DSQLITE_THREADSAFE -I. -I../src -DSQLITE_DEBUG=1 -DTHREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DHAVE_READLINE=1 Ran code (hardware is a dual core x86_64 amd cpu). sqlitetest_thrd35: ../src/btree.c:1816: sqlite3BtreeBeginTrans:

Re: [sqlite] version 3.5.0 - Segv

2007-08-30 Thread Ken
And the sqliteInt.h file is id as: ** @(#) $Id: sqliteInt.h,v 1.605 2007/08/29 12:31:28 danielk1977 Exp $ Let me know if you need anything else.. Thanks, Ken [EMAIL PROTECTED] wrote: Joe Wilson wrote: > > latest CVS: > > #if SQLITE_THREADSAFE > # include > # define SQL

Re: [sqlite] Table locked - why?

2007-08-30 Thread Ken
BEGIN TRANSACTION; CREATE TEMPORARY TABLE attached_db.temp_table (...); INSERT INTO attached_db.temp_table SELECT * FROM attached_db.table1; /* Add a comit */ COMMIT; DROP TABLE attached_db.table1; -- Error: Table is locked Yves Goergen <[EMAIL PROTECTED]> wrote: Hi, I want to modify the

Re: [sqlite] version 3.5.0 - Segv

2007-08-31 Thread Ken
The segv seems to be resolved. At least no more issues with this version of the code. $Id: sqliteInt.h,v 1.606 2007/08/30 14:10:30 drh Exp $ Thanks for a great product. Ken

[sqlite] 3.5.0 error

2007-08-31 Thread Ken
Running the same code (sqlitetest_thrd35.c) using shared_cache, occasionally generates the following output: Where did the table go? 0 => Executing: COMMIT 3 => Executing: INSERT INTO test_table VALUES(3, 0, 'test3_0') 0 => Executing: select count(*) from test_Table 3 => Executing: INSERT INTO

Re: [sqlite] version 3.5.0 - Segv

2007-08-31 Thread Ken
I did do an update this morning to pick up the latest code base. I guess the prior version that I had check out earlier in the week was not the most current. [EMAIL PROTECTED] wrote: Ken wrote: > The segv seems to be resolved. At least no more issues > with this version of th

Re: [sqlite] HELP! DDD & SQLite

2007-09-08 Thread Ken
breakpoints prior to execution. Ken Uma Krishnan <[EMAIL PROTECTED]> wrote: Hello I'm trying to debug SQLite (to understand the code). But e when I attach the process sqlite3, the sqlite3 terminal hangs (ie would not accept any user inputs) till I detach. Can someone please tell me wh

[sqlite] built in function hex

2007-10-08 Thread Ken
is there a built in function to display numeric values as hexidecibmal strings? to_hexstr (40)would display 0x28 Thanks, Ken

Re: [sqlite] Reading error outside the while

2007-10-09 Thread Ken
You need to make a copy of the str instead of just capturing a pointer reference. try: my_array[i] = strdup(sqlite3_column_text(pStat, 0)); "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Hello, I got an error when I try to read some data outside the while{}, inside the while{} it's

[sqlite] auto library function loading

2007-10-09 Thread Ken
Is there a way for SQLITE to automatically load user defined functions at database instantiation or upon database connection? Can it test for a .so/.dll and perform a call to load user functions? If the .dll does not exist maybe issue a warning? Just a thought as a way to allow users

Re: [sqlite] auto library function loading

2007-10-10 Thread Ken
4.1/src -shared user_ext.c -o user_ext.so Thanks, Ken Ken <[EMAIL PROTECTED]> wrote: John very eloquently stated. I completely agree with you regarding the ant-bloatware philosophy. OK, I found the answer: http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions Which I'll be tryin

Re: [sqlite] Making BEGIN IMMEDIATE the default.

2007-10-10 Thread Ken
the default begin "deffered/immediate/exclusive" would be nice :) Ken Scott Hess <[EMAIL PROTECTED]> wrote: To clarify, this is for Google Gears, a JavaScript library which includes a Database component which is implemented using SQLite. If we were simply building an app

[sqlite] loadext bug

2007-10-11 Thread Ken
oad into sqlite. Thanks, Ken

Re: [sqlite] Re: Behavior of SELECT queries during transaction

2007-10-17 Thread Ken
Thomas, if i understand you correctly: 1. Place the writing of multiple rows of data inside a transaction. 2. Querry performance will not be affected by the transaction. So, If you have multiple rows and are doing something like the following: 1. Begin Transaction 2. Read data from

Re: [sqlite] Re: Behavior of SELECT queries during transaction

2007-10-17 Thread Ken
Thomas DILIGENT <[EMAIL PROTECTED]> wrote: Hi Ken, Ken wrote: > Thomas, if i understand you correctly: > > 1. Place the writing of multiple rows of data inside a transaction. > 2. Querry performance will not be affected by the transaction. > > So, If you have mul

Re: [sqlite] PATCH: compound (multi-row) INSERT statements

2007-10-23 Thread Ken
good to explore from a performance standpoint. Regards, Ken Joe Wilson <[EMAIL PROTECTED]> wrote: FYI: When this multi-row-insert patch is combined with today's CVS OP_Real and OP_Int64 fix for Tickets #2733 and #2731 (Check-in [4507]), the multi-row ASCII INSERT statements are as much as 25% f

Re: [sqlite] PATCH: compound (multi-row) INSERT statements

2007-10-23 Thread Ken
imple data unload and reload Vs the sqlite .dump Regards, Ken Joe Wilson <[EMAIL PROTECTED]> wrote: You're solving a different problem. Better to stick with the existing API for what you're proposing. I just want a faster, more compact and flexible SQL INSERT command from the comm

Re: [sqlite] PATCH: compound (multi-row) INSERT statements

2007-10-24 Thread Ken
I see now, thanks for the clarification. Sorry for the ramblings. And there is a .mode csv so that should take care of data loading. Regards, Ken Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken wrote: >A new command ".imp" command could be made to use my proposed array

Re: [sqlite] Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-24 Thread Ken
Lee, 1. Qualified Yes, depending on your definition of concurrency. 2. Connections may remain open. 3. Mutexes are not required for protection. Read the following: http://sqlite.org/lockingv3.html Lee Crain <[EMAIL PROTECTED]> wrote: I loosely follow this forum so I am almost certain this

RE: [sqlite] Re: Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-26 Thread Ken
to allocate a process wide mutex. Then a semaphor would be simpler. So in general a mutex is not process capable. Its only when its created in shared memory that its can be made process wide. Thanks for raising this point. I've learned something new. Regards, Ken James Dennett <[EMAIL PROTEC

Re: [sqlite] Race condition -- fixed?

2007-10-26 Thread Ken
Richard Klein <[EMAIL PROTECTED]> wrote: Dan Kennedy wrote: > On Wed, 2007-10-24 at 21:38 -0700, Richard Klein wrote: >> As I was thinking about the locking mechanism in SQLite 3, >> it occurred to me that the following race condition could >> occur. >> >> Imagine a joint bank account with a

Re: [sqlite] Very poor performance on an INSERT command

2007-10-26 Thread Ken
(journaled/ordered), etc.. Maybe you have different filesystems. What about raid devices? Ken Fabio Durieux Lopes <[EMAIL PROTECTED]> wrote: Hmm, GW0 (RHE3, the fast one) does 190-300 inserts/second. GW2 does around 15 inserts/second. I'm gonna try to commit every 1000 records and I'll b

Re: [sqlite] Race condition -- fixed?

2007-10-26 Thread Ken
. But you may set a transaction to serailazable as well. Sorry for my confusion and thanks for the clarification. Ken Ken wrote: > > BEGIN TRANSACTION; > SELECT balance FROM accounts WHERE accountId = '123-45-6789'; > UPDATE accounts SET balance = > WHERE acco

  1   2   3   4   5   6   >