Re: [sqlite] VACUUM'ing

2008-04-05 Thread Ken
running vacuum. The developers of sqlite have gone to great lengths to resolve the vacuum corruption issues, but I tend to error on the side of safety for production data. HTH, Ken Bambero <[EMAIL PROTECTED]> wrote: Hi, I have a small problem with database size. I wrote

[sqlite] ticket 3007

2008-04-04 Thread Ken
Any thoughts on ticket 3007, to disable journalling by passing an omit journal flag to the sqlite3_open_v2 interface? This would have the I/O load for writes and probably double the througput. http://www.sqlite.org/cvstrac/tktview?tn=3007 Thanks, Ken

Re: [sqlite] Count(1)

2008-04-03 Thread Ken
You could use a trigger to keep the running total in a seperate table. "Mahalakshmi.m" <[EMAIL PROTECTED]> wrote: Hi, I am having 4 records in my Harddisk. My Processor speed is 400 Mhz. For "SELECT COUNT(1) FROM MUSIC ;" its getting more time to display the count. I have also tried with

Re: [sqlite] BCD representation of floats

2008-03-26 Thread Ken
ype. Then apply your conversion function to it! HTH, Ken Liam Healy <[EMAIL PROTECTED]> wrote: I am porting a numerical application from Oracle to SQLite. For the most part, I have been successful, but there are slight disagreements in the floating point number results. I have traced thi

Re: [sqlite] SQL error: SQL logic error or missing database

2008-03-26 Thread Ken
do you have write permissions on mdiadb and the directory??? BanuPrakash G <[EMAIL PROTECTED]> wrote: Database or disk is full is the Error message i get from the sqlite :root> ./sqlite3 mediadb.sql SQLite version 3.5.7 Enter ".help" for instructions sqlite> CREATE TABLE t1(a INTEGER, b

Re: [sqlite] Multithreads access the same database resultingin database is locked error

2008-03-26 Thread Ken
There can be only one thread that has an exclusive write lock on the database. Most likely this is a bug in your application. Heres what I do for my multi threaded app: 1. All transactions use "begin immediate" (that way I don't do a bunch of work only to find the db locked later). 2. The

Re: [sqlite] Multithreads access the same database resulting in database is locked error

2008-03-25 Thread Ken
I don't see any error handling in your code for SQLITE_BUSY... Also, Depending upon the odbc driver your using, you might want to change the begin to a "begin immediate" causing the lock to be taken out at the begin vs later on... Xuanvinh Vu <[EMAIL PROTECTED]> wrote: I did check and I

Re: [sqlite] SQL error: SQL logic error or missing database

2008-03-25 Thread Ken
Try ./sqlite3 BanuPrakash G <[EMAIL PROTECTED]> wrote: Hi, I have used the latest verision of sqlite i.e. sqlite-3.5.7 Amalgamation release for PPC Arch. I was able to cross compile it successfull and when i use the db to create tables I see on the SQLITE shell the ERROR message as

Re: [sqlite] fprintf(stderr,...) wrote over my database.........

2008-03-24 Thread Ken
se freopen. (why are you re-opening a STDERR in the first place?) 3. Rebuild your logging routines. to open a specific log file. 4. Use syslog ? (if your on a *nix). HTH, Ken Mark Gilbert <[EMAIL PROTECTED]> wrote: Anyone seen this ? - My app is running happily like

Re: [sqlite] Shared cache benefit question

2008-03-22 Thread Ken
Just give it a try and see what happens. You just need to enable the shared cache once. I'd think the blocking would not be any different with the shared cache enabled. But you should get reduced I/O load since the cache will be larger and accessible to all threads. HTH, Ken

[sqlite] added ticket 3007 as a feature request

2008-03-21 Thread Ken
, I have many small db files that have data. These are "batched" into a db file. If the process fails the in progress batch will simply be overwritten and re-created. Hence it is an all or none approach and does not need any recoverability. Thanks for considering

Re: [sqlite] endless loop example

2008-03-21 Thread Ken
Just to quantify a cartisian join is a join operation that returns the product of the rows. So in the example given episodes 8 foods100 food_episodes 800 episodes e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 Result rows = 8*800*100*8*800 = 4,096,000,000 rows...

Re: [sqlite] Major memory leak

2008-03-20 Thread Ken
It might be helpful to include the version of sqlite. Have you run your code through a memory analysis routine such as valgrind, to validate that the leak is not occuring in your application code? HTH, Ken Rob Richardson <[EMAIL PROTECTED]> wrote: Greetings! I must be doing something

[sqlite] Slow List

2008-03-19 Thread Ken
Is there something wrong with the sqlite list? I sent emails to the list over an hour ago and still nothing is posted? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] 3.5.7 compile failure, with SQLITE_OMIT_VIEW

2008-03-19 Thread Ken
directory than the makefile.in resulted in a cp failure while creating the amalgamated source. Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Feature request, Prevent Master Journal file.

2008-03-18 Thread Ken
nd re-created. Hence it is an all or none approach and does not need any recoverability. Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Preventing Master Journal Files

2008-03-18 Thread Ken
in the event of a crash. Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Preventing Master Journal Files.

2008-03-18 Thread Ken
How do I prevent the creation of a journal file and a master journal file? The process does not need recovery as it is an all or none. And is restarted from the beginning in the event of a crash. Thanks, Ken ___ sqlite-users mailing list sqlite

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Ken
Do you test for SQLITE_BUSY, when you perform BEGIN IMMEDIATE ? Yes a process that is reading will continue to read. Once it completes if anothre process is waiting to write then the additional read locks will not be granted. This is to prevent writer starvation. How do you know that the

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Ken
problem. HTH, Ken Bharath Booshan L <[EMAIL PROTECTED]> wrote: Hello List, Here I am stuck with some Database Table corrupt problem and I would request the people on this list to help me out as I am unable to figure out the cause for this problem. Previously I was using SQLite 3.1.3 a

Re: [sqlite] Efficiency Question - Value Or Liability for Indexingof This Table?

2008-03-14 Thread Ken
additional read, to get that data. So in the end its really your call, Space vs time. Regards, Ken Lee Crain <[EMAIL PROTECTED]> wrote: Understood. I will be writing our software to search this table by values, so it sounds like indexing to improve read access is desirable. The re

Re: [sqlite] Two Phase commit using sqlite (Ken)

2008-03-12 Thread Ken
succeeds on both systems you may purge the undo data. Or if it fails you'll need to apply the undo data back on the db's tables. You could base the undo/redo on: http://www.sqlite.org/cvstrac/wiki?p=UndoRedo Good luck. Ken Shailesh Madhukar Birari <[EMAIL PROTECTED]> wrote: Hello, K

Re: [sqlite] SQLite and (high) concurrency

2008-03-11 Thread Ken
or handler. rollback. etc. hth, Ken Tore Austraatt <[EMAIL PROTECTED]> wrote: Ken, sorry, it didn't make a difference, including _LOCKED in my test. None of the dropped records are involved in lock situations. an example... _exec("BEGIN IMMEDIATE..." sqlite3

Re: [sqlite] SQLite and (high) concurrency

2008-03-11 Thread Ken
database at the same time! Sqlite will return a sqlite_busy error. Check out the following: http://sqlite.org/lockingv3.html HTH, Ken Tore Austraatt <[EMAIL PROTECTED]> wrote: Thanks, but I'm afraid this don't add up. I have tested this in numerous examples. Concurrent INSERT's disappears

Re: [sqlite] Database Journal File

2008-03-10 Thread Ken
not committing at exit then a journal file will be left. HTH, Ken Ovidiu Anghelidi <[EMAIL PROTECTED]> wrote: Hi there, I have a small issue and I was hoping that someone might be able to point me in the right direction. I am trying to build a C/C++ application using the amalgamation v

Re: [sqlite] SQLite and (high) concurrency

2008-03-10 Thread Ken
1. Inserts are not ignored. You can ignore inserts in your app if the db is busy/locked etc.. 2. Test the return code for success/failure. Tore Austraatt <[EMAIL PROTECTED]> wrote: I find sqlite3 as the perfect choice for our embedded application - if it hasn't been for the issues concering

Re: [sqlite] Two Phase commit using sqlite

2008-03-10 Thread Ken
his stage since B.db is involved in a transaction, but the journal file is not available for a recovery. Hope that helps. Ken Shailesh Madhukar Birari <[EMAIL PROTECTED]> wrote: Hello, I want to implement a distributed database using sqlite. Can some one give me information of whether SQLite

Re: [sqlite] Cross DB triggers?

2008-03-03 Thread Ken
I don't believe that this type of trigger is allowed. Jeff Hamilton <[EMAIL PROTECTED]> wrote: Hi all, I have a setup with two databases that have tables which refer to each other. I'd like to create triggers to handle cleanup when items are deleted from one database that are referred to from

[sqlite] Nested calls to prepare/step/prepare

2008-02-28 Thread Ken
a prior prepared statement is still open? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Request for Return SQLITE_NOTFOUND on select.

2008-02-24 Thread Ken
Running a querry "select count(*) tbl " returned a generic error SQLITE_ERROR. and an error message of "no such table: tbl" It would be beneficial If the prepare returned an error code such as SQLITE_NOTFOUND instead of a generic SQLITE_

Re: [sqlite] Read/write loops

2008-02-22 Thread Ken
ake a look at "BEGIN IMMEDIATE" as it will attempt to lock at that point. The "begin" does not lock until 1. a cache spill to disk or 2 a commit. Colin Darcey <[EMAIL PROTECTED]> wrote: Ken, I am not sure how to use this facility, looks like one responds by sending another emai

Re: [sqlite] Read/write loop

2008-02-21 Thread Ken
at the beginning of a transaction. Ken Colin Darcey <[EMAIL PROTECTED]> wrote: I get an error "database is locked" or "database read only" when attempting to update a table in the database. I have been reading various articles about this but cannot get

Re: [sqlite] bit operations in select statements

2008-02-20 Thread Ken
select key where value & '01011'; Try: select key where (value&176) you need to convert the bit string to an integer number. Also be aware that sqlite interperts numbers as signed 64 bit integer and this can cause some issues with your bit mask number. HTH. Jos van

[sqlite] expose sqlite3_put_Varint & sqlite3_get_varint

2008-02-15 Thread Ken
Any reason why the functions above could not be exposed as part of the sqlite3 api suite? They sure are handy when writing platform portable code, addressing endian conversions. Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLite Like Query Optimization

2008-02-15 Thread Ken
I'm not 100% sure but Try splitting your query out into 6 different selects, I think the OR clause is the problem... select ID from TableA where column2 like '%test%' union select ID from TableA where column4 like '%test%' HTH Kalyani Phadke <[EMAIL PROTECTED]> wrote: I am using

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Ken
In addition to what Igor mentions: If you want this array to be cross platform portable from Big endian to Little endian you either need to store some type of endianness flag. If you dig into the sqlite source you'll find a function like sqlite3_put_varint. It will convert 32 bit or 64 bit

[sqlite] sqlite in memory DB: hashing

2008-02-15 Thread Ken
I'm curious if the authors of sqlite have given any consideration to the merits of using a Hash index to retrieve data for In memory Databases ? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] Selecting last item in a unique index

2008-02-15 Thread Ken
ORDER BY Would the above be faster due to the use of the PRIMARY key access ? Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: John Elrick wrote: > I have a question for the SQLite experts here as to the most efficient > way to retrieve the following: > > Say we have a

Re: [sqlite] SQL error: unrecognized token: "#"

2008-02-14 Thread Ken
Dennis, Thanks for the info. Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > The following errors out: > > CREATE TABLE users ( > user# INTEGER NOT NULL, > name VARCHAR(30) NOT NULL,

[sqlite] SQL error: unrecognized token: "#"

2008-02-14 Thread Ken
tted from valid tokens? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Function hex

2008-02-14 Thread Ken
The output of the native sqlite function "hex" is not really a hex value of a number. Its a hex representation of a string. select 5629701397680549, hex(5629701397680549) ; 5629701397680549|35363239373031333937363830353439 Where to_hex outputs: select 5629701397680549, to_hex(5629701397680549)

Re: [sqlite] Function hex

2008-02-14 Thread Ken
Try using the attached hex.c function. You'll need to compile this as a .so and call sqlite3_create_function to register it. Hth Mau Liste <[EMAIL PROTECTED]> wrote: Hello all, I am trying to print some table values in hexadecimal. I've seen in the docs that there is a function called 'hex' but

Re: [sqlite] How to select Strict Affinity or No Affinity modes?

2008-02-08 Thread Ken
Yes choice is good, Either way I'm greatful for an Excellent Tool, I can workaround and Live without strict Affinity. But the option to enable it would be a welcome feature. Would there be any performance implications of Strict Affinity, either positive or negative? Samuel Neff <[EMAIL

Re: [sqlite] How to select Strict Affinity or No Affinity modes? Attention: DRH

2008-02-08 Thread Ken
have been simpler to debug, if there had been a type conversion warning or a failure. Regards, Ken Lee Crain <[EMAIL PROTECTED]> wrote: DRH, ">> Can you explain why you think strict affinity mode >> might be beneficial to you? If somebody can provide a good >&g

Re: [sqlite] open statements upon close

2008-02-04 Thread Ken
I wrote a function to traverse the linked list and print the zSql to stderr. There was indeed a sql statement being left open by my code! Thats a really usefull debugging technique. I might write an extension to implement this in a more formally. Thanks, Ken [EMAIL PROTECTED] wrote: Ken

[sqlite] sqlite3_db_handle

2008-02-04 Thread Ken
The sqlite3_db_handle returns a different address for my statements than the database session address. (using sqlite3_open) Should it return the .aDb field instead of the pVfs ? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] open statements upon close

2008-02-04 Thread Ken
and close each statement that has been opened. Thanks For any help. Ken ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] 3.5.5 Compilation failure / Bug

2008-02-04 Thread Ken
': ../sqliteSrc/sqlite-3.5.5/sqlite3.c:64663: error: syntax error before numeric constant ../sqliteSrc/sqlite-3.5.5/sqlite3.c:64700: error: invalid lvalue in assignment make: *** [sqlite3.lo] Error 1 int isView ; delcaration is wrapped in SQLITE_OMIT_TRIGGER instead of SQLITE_OMIT_VIEW. Thanks, Ken

Re: [sqlite] Vacuum

2008-02-04 Thread Ken
as the return code from the Step command. Thanks, Ken sqlite-users@sqlite.org wrote: sqlite-users@sqlite.org wrote: > Hi all, > > Hopefully you can help, while running sqlite version 3.5.5 > > Two seperate threads each attempt to run a vacuum command against the same > d

[sqlite] 3.5.5. Bus error on HPUX

2008-02-01 Thread Ken
I think this is probably a very simiilar issue as found on the solaris. The error occurred during asyn3.test. Here is the gdb output analyze-99.1... Ok async3-1.0... Ok async3-1.1...make: *** [test] Bus error (core dumped) hermes:herm10:/home/ixion/LIB/sqliteSrc/tst>> ls core core

Re: [sqlite] Solaris bus error

2008-02-01 Thread Ken
, ppOpen=0x1345a9) at ../sqliteSrc/sqlite-3.5.5/src/os_unix.c:670 Let me know if you need anything else. Dan <[EMAIL PROTECTED]> wrote: On Feb 1, 2008, at 6:37 AM, Ken wrote: > Recompiled without the -O2 flags: > > #0 0x00049750 in findLockInfo (fd=4, ppLock=0x1345ad, &g

[sqlite] unfinalized statements upon close question.

2008-01-31 Thread Ken
In my code I'm getting an SQLITE_BUSY returned from sqlite3_close. Is there a way to get sqite to tell me which statements it thinks are not finalized? Thanks, Ken

Re: [sqlite] Solaris bus error

2008-01-31 Thread Ken
. Regards, Ken Nicolas Williams <[EMAIL PROTECTED]> wrote: I didn't get any core dumps in Solaris Nevada, but seven tests failed: Failures on these tests: vtab6-2.2 vtab6-2.4 vtab6-2.5 vtab6-2.6 vtab6-7.1 vtab6-9.1.1 vtab6-9.2

[sqlite] solaris test suite errors, 3.5.5

2008-01-31 Thread Ken
Removed asyn3.test...Since it was core dumping. tcl version is 8.5.0 gcc is 3.4.2 sqlite 3.5.5 Solairs 8 (5.8) Test suite errors: 13 errors out of 38318 tests Failures on these tests: bind-4.4 bind-4.5 printf-1.7.6 printf-1.8.6 printf-1.9.7 tcl-1.6 vtab6-2.2 vtab6-2.4 vtab6-2.5 vtab6-2.6

RE: [sqlite] Solaris bus error

2008-01-31 Thread Ken
Recompiled without the -O2 flags: #0 0x00049750 in findLockInfo (fd=4, ppLock=0x1345ad, ppOpen=0x1345a9) at ../sqliteSrc/sqlite-3.5.5/src/os_unix.c:670 670 *ppLock = pLock; *ppLock is Null Ken <[EMAIL PROTECTED]> wrote: Core/backtrace info: (gdb) core-file cor

RE: [sqlite] Solaris bus error

2008-01-31 Thread Ken
not !=0 but *ppOpen is 0... James Dennett <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 31, 2008 2:55 PM > To: sqlite > Subject: [sqlite] Solaris bus error > > > After addressing the -l

[sqlite] Solaris bus error

2008-01-31 Thread Ken
After addressing the -lrt sched yield on solaris. make test resulted in: async3-1.0... Ok async3-1.1...make: *** [test] Bus Error (core dumped) Any ideas? Regards, Ken

[sqlite] Solaris make test compilation error

2008-01-31 Thread Ken
Solaris 5.8 (solars 8) make test Undefined first referenced symbol in file sched_yield /var/tmp//cckDMcyL.o ld: fatal: Symbol referencing errors. No output written to .libs/testfixture collect2: ld returned 1 exit status

Re: [sqlite] csv files with unquoted data containing comma's

2008-01-30 Thread Ken
unsigned char*)z)[i]] ){ i = 0; break; } } Maybe your runtime library id different than the source code? HTH, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Frank van Vugt wrote: > > I'll look into it tomorrow, but was under the impression that: > > * w

Re: [sqlite] question regarding integer and

2008-01-24 Thread Ken
Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > > I think the issue however was that sqlite uses Signed integers And my Number > although a valid 64bit hex number was to large to fit into a 64 bit signed > value. Yes, that's what I said. :-) > Sqlite simply co

Re: [sqlite] question regarding integer and

2008-01-24 Thread Ken
ll proceed with your workaround. In the mean time I wonder if it would be possible as an enhancement to add 64bit unsigned integer storage into sqlite? And also the capability to convert strings such as '0x' as this would make writing this type of bit based logic so much easier. Regards, Ken D

[sqlite] question regarding integer and

2008-01-24 Thread Ken
d number? Thanks, Ken

[sqlite] order by issue?

2008-01-23 Thread Ken
I'm not sure if this a bug or if working as intended: the order by b,a seems to cause B to use asc.. Instead of the desc as written in the order by statement. create table tst (a integer, b integer ); sqlite> insert into tst values(1,1); sqlite> insert into tst values(1,2); sqlite> insert

Re: [sqlite] How to truncate the hour fraction

2008-01-23 Thread Ken
assuming your time is in seconds. try t1: 201561222 -> 2008-01-28 15:00:22 and you want t2: 1201561200 -> 2008-01-28 15:00:00 t1 = t2 - (t2 mod 3600) Joanne Pham <[EMAIL PROTECTED]> wrote: Hi All, I have a hour table which has the startTime are stored at GMT time. The

Re: [sqlite] Program is crahed on sqlite3_bind_int

2008-01-22 Thread Ken
Library out of sequence indicates the application is making a call to sqlite in the wrong order. Recheck your application code and make sure the bind is against a valid statement handle. HTH. Joanne Pham <[EMAIL PROTECTED]> wrote: If I deleted all the database files and run the program again

Re: [sqlite] sql optimization question

2008-01-20 Thread Ken
Jay I've used a trigger to do this with good success. You'll need one trigger per table to cause the delete to cascade through the tree. Or if you know that you will always delete from the top level tree"parent" then just one trigger would probably suffice.

Re: [sqlite] sqlite3 performace

2008-01-18 Thread Ken
his allows for a much simpler sqlite_busy/sqlite_locked error handling. Regards, Ken Philip Nick <[EMAIL PROTECTED]> wrote: I tracked down the problem. I was linking an old version of sqlite3 (3.0.8). That was the old version we used. I apparently doesn't cache between calls. My code now performs

Re: [sqlite] SQLite as a IPC mechanism

2008-01-15 Thread Ken
or delete) data. IPC, is best done as either Message Queues depending upon your data volumes. Shared memory with appropriate semaphores/ Mutexes. Or even as one person posted Mmap files. You'll stilll need a mutex or a semaphore to write. Ken "Joshua D. Boyd" <[EMAIL PROTECTED]&g

[sqlite] Test suite

2008-01-15 Thread Ken
Sorry if this has been asked, but I'd like to know how to run the test suite. I could not find any documentation on this on the sqlite website. Thanks for your help. Ken

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Ken
Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken wrote: > Doing this in oracle results in an error: > > SQL> select max(addr_id), emp_id from z_address; > select max(addr_id), emp_id from z_address > * > ERROR at line 1: > ORA-00937: not

Re: [sqlite] Storing / Archiving of SQLite database in vcs

2008-01-15 Thread Ken
of sqlite to the next. Although backwards compatiblity is generally maintained, there have been instances when this is broken. I would also maintain in cvs the create sql commands (.schema) seperate from the data. Just my opinion, I'm sure others here will differ. Regards, Ken Rich

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Ken
use. But as a developer I know better, and write aggregated sql with a group by. select max(addr_id), emp_id from z_address group by null; Does not return an error nor does it return data. Ken Joe Wilson <[EMAIL PROTECTED]> wrote: --- Darren Duncan wrote: > At 10:17 PM -0500 1/14/08, Gr

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-14 Thread Ken
Depending upon your needs an alternative would be to store the numbers list as a blob. Then the list can be retrieved as a single select. Just an idea. Ken Mike McGonagle <[EMAIL PROTECTED]> wrote: Hello all, This isn't s question specific to SQLite, so I hope that you don't mind... but

Re: [sqlite] Using sqlite3 from multiple threads

2008-01-11 Thread Ken
g pthreads and its detached) then no harm to the process. But the other threads will never be signalled either, then they will be stuck. HTH, Ken Andreas Volz <[EMAIL PROTECTED]> wrote: Am Wed, 9 Jan 2008 10:20:31 -0800 (PST) schrieb Ken: > Definately use 3.5.4. > > Not sure ho

Re: [sqlite] updating based on JOIN

2008-01-11 Thread Ken
Try: update zip set city_id = ( select city_id from city where name = zip.city); HTH Ken P Kishor <[EMAIL PROTECTED]> wrote: CREATE TABLE zip (zip_code, city); CREATE TABLE city (city_id, name); INSERT a

Re: [sqlite] Proposed change to sqlite3_trace()

2008-01-10 Thread Ken
ing useful or not but just a thought. 0x00 NO_TRACE 0x01 SQL_BEGIN 0x02 SQL_END 0x04 TRIGGER_BEGIN 0x08 TRIGGER_END Etc... Regards, Ken [EMAIL PROTECTED] wrote: The current interface definition for sqlite3_trace() is as follows: void *sqlite3_trace( s

Re: [sqlite] Optimized way of export/import of the sqlite database through C API Interface

2008-01-10 Thread Ken
t, p->db, "SELECT sql FROM sqlite_master " "WHERE sql NOT NULL" " AND type IN ('index','trigger','view')" " AND tbl_name LIKE shellstatic()" That should just about take care of it You might need a few others, to prop

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
-strip parameter for the .configure as in "-Os" to make smaller libs a default ??? Thanks, Ken [EMAIL PROTECTED] wrote: Ken wrote: > Dan and DRH, > > The amalgamated version as packaged in the link was really nice indeed. Much > preferred over the full source code

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
of the make so that loadable extensions are automatically enabled. Will future release be of available as almagamated autoconf ? Thanks, Ken Dan <[EMAIL PROTECTED]> wrote: Hi, Experimenting with distributing an autoconf configure script with the amalgamation package. So that it can do the

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
of the make so that loadable extensions are automatically enabled. Will future release be of available as almagamated autoconf ? Thanks, Ken Dan <[EMAIL PROTECTED]> wrote: Hi, Experimenting with distributing an autoconf configure script with the amalgamation package. So that it can do the

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
(pTemp, db->nextAutovac>=0 ? db->nextAutovac : sqlite3BtreeGetAutoVacuum(pMain)); #endif Setting the nextAutovac to a signed char as well resolved this Regards, Ken [EMAIL PROTECTED] wrote: Ken wrote: > > AIX had issues. See below. &g

Re: [sqlite] Using sqlite3 from multiple threads

2008-01-09 Thread Ken
handle the return codes suche as SQLITE_BUSY, SQLITE_LOCKED etc. I don't have any simple examples available, sorry. Ken Andreas Volz <[EMAIL PROTECTED]> wrote: Am Wed, 9 Jan 2008 09:03:35 -0800 (PST) schrieb Ken: > Andears, > > SQLITE 3.5.x is thread safe when configured and compiled

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
tment. So only way to exit was cntrl-c (this may be an issue with my system libraries) If you want me to check anything else please let me know. Regards, Ken Dan <[EMAIL PROTECTED]> wrote: Hi, Experimenting with distributing an autoconf configure script with the amalgamat

Re: [sqlite] Using sqlite3 from multiple threads

2008-01-09 Thread Ken
Andears, SQLITE 3.5.x is thread safe when configured and compiled with --enable-threadsafe. You can create multiple db connections to a single database. But only one connection will be allowed to write to the Database at a time. Take a look at http://www.sqlite.org/lockingv3.html

Re: [sqlite] "always-trim" - feature suggestion

2008-01-09 Thread Ken
ar. Since SQLITE source code is freely available, you can always create a patch to the code for the pragma your interested in. And maintain your own version. Ken

Re: [sqlite] 4invalid UTF-8 sequence

2008-01-08 Thread Ken
The only occurence of the string "bs" in your code is at the table name LSOpenJobs Maybe the DBI layer is not passing everything since there is a carriage return after the SET? HTH Ken jose isaias cabrera <[EMAIL PROTECTED]> wrote: Greetings! I have developed an appli

Re: [sqlite] Re: "always-trim" - feature suggestion

2008-01-07 Thread Ken
e space. Triggers are another route, but I recommend letting the DB do its job of storage. Don't add the overhead of adding data scrubbing as well. Do the scrubbing at the application side where it belongs. Regards, Ken Igor Tandetnik <[EMAIL PROTECTED]> wrote: Ken wrote: > Some c

Re: [sqlite] "always-trim" - feature suggestion

2008-01-07 Thread Ken
lite supports column level check contstraints. The database is intended for data storage. Not data cleanup. This goes pretty much for every commercial database out there as well. Ken Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: On Sun, Jan 06, 2008 at 07:39:55PM -0800, Darre

Re: [sqlite] Commit fails due to "database is locked" in active transaction

2008-01-02 Thread Ken
Try your test using a "begin Immediate" instead of begin. A write lock is not taken out until the very last moment (ie a spill to disk or commit). Lior Okman <[EMAIL PROTECTED]> wrote: Hi, I'm using SQLite3 version 3.4.2 (latest in Debian testing and unstable), and I have a scenario

Re: [sqlite] EXISTS and NULLs

2008-01-02 Thread Ken
t meaning. SQL> select count(*) from t1 where exists (select x from t1 where x is not null); COUNT(*) -- 0 Hope that helps. Ken [EMAIL PROTECTED] wrote: The current behavior of SQLite is to not do anything special with NULLs in an EXISTS operator. For example:

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ken
writing by any other connections. The dual locking model (prior to the resolution) is ambiguous and could possibly lead application to deadlocks. These are just my thoughts on the matter, and are probably not 100% correct. Ken Ed Pasma <[EMAIL PROTECTED]> wrote: No, you did not confuse

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ken
t prevents other access to the DB. Ken Ed Pasma <[EMAIL PROTECTED]> wrote: The ticket has already been resolved, I see. So it has been considered a bug. In my earlier reply I tried to defend the current behavour to be in line with the document, http://sqlite.org/ sharedcache.html. I'm

Re: [sqlite] suggestion for an optimized sql

2007-12-20 Thread Ken
It may be the case where the index will cause more harm than good in this instance depending upon the percentage matching. In other words if only 10% of the records match using the index great... But if say 90% match the index this would be Very Bad and A Full scan would be quicker. I full

Re: [sqlite] shared cache mode locking

2007-12-20 Thread Ken
existing? And What happens during a crash with two journals ? This gets complicated very quickly. Ken Ed Pasma <[EMAIL PROTECTED]> wrote: Hello,` Empirically I found that it is exactly true. Must admit I'm confused but may it is in line with the Shared-Cache locking model. This does not m

RE: [sqlite] suggestion for an optimized sql

2007-12-20 Thread Ken
Continuing with Sams thought process, Create another table that only contains record id's where value01=value02 Then just query table01_a The use of an index is probably not going to help and your better off most likely performing the full table scan especially if you are getting a

Re: [sqlite] shared cache mode locking

2007-12-19 Thread Ken
Some additional info: when the sqlite_lock is returned there is another thread that appears to be reading the same table. Does the sqlite3 step return sqlite_locked in this case? Thanks, Ken Ken <[EMAIL PROTECTED]> wrote: While using the new 3.5.4 sqlite3_enable_shared_cache

[sqlite] shared cache mode locking

2007-12-19 Thread Ken
into table... ---> returns SQLITE_LOCKED Is it possible for both connections to begin exclusive transactions whilst having the shared cache anabled? Thanks, ken

Re: Re[2]: [sqlite] Improving performance of SQLite. Anyone heard of DeviceSQL?

2007-12-17 Thread Ken
. Then you might be taken more seriously. As my father was fond of saying; "Money talks and BS walks." Regards, Ken Ion Silvestru <[EMAIL PROTECTED]> wrote: >SW: Richard, We have written to you directly before to ask you to stop the >FUD and incorrect statements, and you h

Re: [sqlite] sqlite locking mechanism with threads

2007-12-04 Thread Ken
99.9% certain this is not a sqlite issue. But a script language issue. It depends on how the script language implements threads. Try writing this in C and using posix threads. You'll also need to have multiple cpu's to really take advantage of threading as well. yahalome

Re: [sqlite] Allocating Memory For A Pool Of Database Connections

2007-12-04 Thread Ken
David, You have some pointer issues going on! Maybe something like this struct db_cache_type { sqlite3 *db; /* database file pointer */ char *key; /* key identifies the database that was opened */ int mode; /* database open mode */ }; struct db_cache_type **db_cache_list; /* list

<    1   2   3   4   5   6   >