Re: [sqlite] Addition extension function failed!

2008-04-09 Thread Ken
/home/user/lib/labsinf.so'); 3. Remove the "main from your code" and Compile using -shared flag to create a .so file that can be loaded at runtime. HTH, Ken dark0s dark0s <[EMAIL PROTECTED]> wrote: I have a new problem, I am attempting add extension function to sqlite3

Re: [sqlite] Update

2008-04-09 Thread Ken
e does the work, right? So dig in make an attempt and if that fails ask "whats wrong with my attempt"? HTH, Ken "Mahalakshmi.m" <[EMAIL PROTECTED]> wrote: Hi, "CREATE TABLE ALBUM(AlbumId INTEGER PRIMARY KEY NOT NULL,AlbumName TEXT NOT NULL COLLATE NOCASE

Re: [sqlite] Planner choosing wrong index

2008-04-08 Thread Ken
how it performs its access. The order by is then done internally on the resulting data! HTH, Ken Steve Krulewitz <[EMAIL PROTECTED]> wrote: Hey all -- I am having a problem with sqlite choosing the wrong index. This is with sqlite 3.5.7, but I believe this has been happening for a while as

Re: [sqlite] default sqlite3 IO methods for VFS

2008-04-07 Thread Ken
I understand now... Thanks Dan!!! Dan <[EMAIL PROTECTED]> wrote: On Apr 8, 2008, at 2:16 AM, Ken wrote: > Dan, > > Doesn't that just return the VFS part ??? I'm looking for the > sqlite3_io_methods part for the default vfs ( or is this really > the s

Re: [sqlite] default sqlite3 IO methods for VFS

2008-04-07 Thread Ken
Dan, Doesn't that just return the VFS part ??? I'm looking for the sqlite3_io_methods part for the default vfs ( or is this really the sqlite3_file )? Thanks, Ken Dan <[EMAIL PROTECTED]> wrote: On Apr 8, 2008, at 2:03 AM, Ken wrote: > Hi all, > > I'm tryin

[sqlite] default sqlite3 IO methods for VFS

2008-04-07 Thread Ken
Hi all, I'm trying to implement a vfs that will disable journalling. But i've hit a little stumbling block / learning curve. In the vfs implementation I need to implement a sqlite3_io_methods type. Basically I'd like to get the default sqlite3_io_methods and use those as part of my code as fo

Re: [sqlite] VACUUM'ing

2008-04-05 Thread Ken
when 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 w

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

Re: [sqlite] BCD representation of floats

2008-03-26 Thread Ken
datatype. 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 trace

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 INTEGER

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 have

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 "S

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

2008-03-24 Thread Ken
ont use 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

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,

[sqlite] added ticket 3007 as a feature request

2008-03-21 Thread Ken
cular case, 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 c

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... (ov

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
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
n 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 dat

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 reason

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

2008-03-12 Thread Ken
ate that once the commit 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

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
the 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 INSE

Re: [sqlite] Database Journal File

2008-03-10 Thread Ken
r 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 amalgamat

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 c

Re: [sqlite] Two Phase commit using sqlite

2008-03-10 Thread Ken
rm at this 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 whet

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 t

[sqlite] Nested calls to prepare/step/prepare

2008-02-28 Thread Ken
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
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 a

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 d

[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 Sqli

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 uns

[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/cg

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 PROTE

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
ite3_close 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
.5/sqlite3.c: In function 'sqlite3Update': ../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_T

Re: [sqlite] Vacuum

2008-02-04 Thread Ken
same 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 &

[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 hermes:herm10:

Re: [sqlite] Solaris bus error

2008-02-01 Thread Ken
345ad, 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, > pp

[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
bus error. 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-

[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 vtab6

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 core Co

RE: [sqlite] Solaris bus error

2008-01-31 Thread Ken
is 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

[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 ma

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

sqlite-users@mailinglists.sqlite.org

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 simp

sqlite-users@mailinglists.sqlite.org

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. R

sqlite-users@mailinglists.sqlite.org

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

sqlite-users@mailinglists.sqlite.org

2008-01-24 Thread Ken
at least a function so that the sql code is more readable. Example follows: Thanks, Ken Sqlite version is 3.5.4 create table x (val integer ); insert into x values (10083463462913); select to_hex(val) from x;(note to_hex is my own function). to_hex(val) 0x92bbd420001 I want to strip off

RE: [sqlite] order by issue?

2008-01-23 Thread Ken
James thats indeed the result expected. I'll add the additional desc. I errantly assumed the desc applied to both columns and the the entire result would be ordered desc. But I see now the error of my ways. Thanks, Ken James Dennett <[EMAIL PROTECTED]> wrote: > -Or

[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 into

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 startTim

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 I

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 suf

Re: [sqlite] sqlite3 performace

2008-01-18 Thread Ken
ows 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 per

Re: [sqlite] SQLite as a IPC mechanism

2008-01-15 Thread Ken
te 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 PROT

[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 a s

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

2008-01-15 Thread Ken
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

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Ken
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 m

Re: [sqlite] Using sqlite3 from multiple threads

2008-01-11 Thread Ken
hreads 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 bu

Re: [sqlite] Proposed change to sqlite3_trace()

2008-01-10 Thread Ken
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
L", 0); run_table_dump_query(p->out, p->db, "SELECT sql FROM sqlite_master " "WHERE sql NOT NULL" " AND type IN ('index','trigger','view')" " AND tbl_name LIKE shellstatic()"

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
le a --LIB-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 sourc

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
f 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 d

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
f 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 d

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
AutoVacuum(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

Re: [sqlite] Using sqlite3 from multiple threads

2008-01-09 Thread Ken
st 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 an

Re: [sqlite] configure script for amalgamation

2008-01-09 Thread Ken
d enter did not seem to terminate the sql statment. 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

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 http://www.

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

2008-01-09 Thread Ken
t you far. 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 applica

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

2008-01-07 Thread Ken
de to strip white 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

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

2008-01-07 Thread Ken
nk sqlite 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, Darren Dun

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 usin

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 me.

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&#

<    1   2   3   4   5   6   >