[sqlite] Segfault on sqlite3_reset

2007-01-08 Thread Ken
I'm getting a segfault and sigabort (sporadic) when calling sqlite3_reset. Version 3.3.9 and using sqlite3_prepare_v2... I'll retest using sqlite3_prepare. Ken

Re: [sqlite] Segfault on sqlite3_reset

2007-01-08 Thread Ken
prepared the statement. Why can't it be reset of finalized if a sqlite busy is encountered ??? Ken Ken <[EMAIL PROTECTED]> wrote: I'm getting a segfault and sigabort (sporadic) when calling sqlite3_reset. Version 3.3.9 and using sqlite3_prepare_v2... I'll retest

Re: [sqlite] Segfault on sqlite3_reset

2007-01-08 Thread Ken
f you get a SQLITE_BUSY on finalizing [EMAIL PROTECTED] wrote: Ken wrote: > Found the issue: > > > Called sqlite3_finalize after recieving a SQLITE_BUSY on on sqlite3_step, > then you get a segfault

Re: [sqlite] Segfault on sqlite3_reset

2007-01-08 Thread Ken
If sqlite3_finalize is the destructor, then what happens when it returns sqlite3_busy ? Should finalize be called again? Thanks [EMAIL PROTECTED] wrote: Ken wrote: > sqlite3_step > sqlite3_finalize > sqlite3_reset > > Ok I think I know.. the reset should not h

Re: [sqlite] Shared cache mode issue

2007-01-08 Thread Ken
Here is a code snipet from my version if the server thread code I found that it was doing an enable/disable on the shared cache with the original logic. You could always implement a sqlite3_open call and store it in the g variable, and close it when the server quits. void

[sqlite] Sqlite Preprocessor

2007-01-10 Thread Ken
ing sqlStr; SQLITE_EXEC at :loginhndl bind x (not sure about this one) SQLITE_EXEC at :loginhndl fetch c1 into :hostvars ; SQLITE_EXEC at :loginhndl close cursor c1; SQLITE_EXEC at :loginhndl close database . The list would go on and on, but you get the idea. Regards, Ke

[sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
ing sqlStr; SQLITE_EXEC at :loginhndl bind x (not sure about this one) SQLITE_EXEC at :loginhndl fetch c1 into :hostvars ; SQLITE_EXEC at :loginhndl close cursor c1; SQLITE_EXEC at :loginhndl close database . The list would go on and on, but you get the idea. Ken

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
official one > within the database itself. > > There are, however, dozens of bindings to computer languages > in addition to the Tcl wrapper that ships with sqlite: > > http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers > http://www.sqlite.org/tclsqlite.html > > --- Ken

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
that bit. There's no real need to connect to a sqlitedb just to verify the table exists. Ken Joe Wilson <[EMAIL PROTECTED]> wrote: > Yes, a pre processor, but not a wrapper. A wrapper as I've seen from the sqlite.org site is > simply a layer on top of the sqlite3 api. I've wr

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
Yes, but probably simpler and more in the tradition of sqlite. Make it simple and easy to use. John Stanton <[EMAIL PROTECTED]> wrote: Are you proposing an implementation of the existing Embedded SQL standard? Ken wrote: > Yes, a pre processor, but not a wrapper. A wrapper as I've

[sqlite] Pager modification question

2007-01-11 Thread Ken
of tokenize is very interesting, what an excelent technique to embedd the tokens using overlapping strings. Can you send me an email address, I have some code that you might find intersting to utilze in the pager.c for the checksums. Ken

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
de you mentioned. Either you have to supply the column type info, or the tool has to obtain it somehow. And considering that SQLite is typeless, you have your work cut out for you. But don't let my contempt of SQL code generators disuade you. --- Ken wrote: > yes thats what I'm thinking..

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread Ken
>From the standpoint of data insertions you wouldn't reall need to deal with >datatype correctness since sqlite is typeless. John Stanton <[EMAIL PROTECTED]> wrote: Why would it be a benefit? You would have to be doing type conversions all the time. Ken wrote: > I

Re: [sqlite] How to handle dual-field Primary Key - only one is Autoincrement

2007-01-12 Thread Ken
Besides the trigger issue with sqlite. I think you have a design issue with your tables. You are using a composite key. Why not have a master table of customer I'ds that you maintain, whith only the customer_id as the PK and autoincrement. The the table you refer to would then be a child

Re: [sqlite] Pager modification question

2007-01-12 Thread Ken
Regarding the Journal: I was thinking that this would be useful in the context of a single process multiple threads and shared cache. All that would be required is an additional thread to handle the logging. Christian Smith <[EMAIL PROTECTED]> wrote: Ken uttered: > Would it be

Re: [sqlite] Pager modification question

2007-01-12 Thread Ken
multiple thread with a higher concurrency level by using page level locking (or row level for that matter). Either way I think its a great piece of software. Thanks DRH. Christian Smith <[EMAIL PROTECTED]> wrote: Ken uttered: > Would it be possible to implement a Page leve

Re: [sqlite] Pager modification question

2007-01-12 Thread Ken
If it is a replacement for fopen, then why does it perform locking at all? Since sqlite has implemented threading and multiple connections, then the next logical step in its evoloution is to enable advanced locking techniques for even greater degrees of improved concurrency. Ken John

Re: [sqlite] Pager modification question

2007-01-12 Thread Ken
. But a bit more concurrent access. Ken John Stanton <[EMAIL PROTECTED]> wrote: If you want to share a file you have to be able to synchronize access in some way. The POSIX type file locks permit you to do it quite well by giving read and write locks. If you want shared

RE: [sqlite] DROP INDEX not freeing up memory

2007-01-18 Thread Ken
If you are using the OS to determine if memory is freed then perhaps that is where the problem lies. Many operating systems do not return memory back to the OS after a call to free. Instead the process will retain that in a "free pool" for later re-allocation. Ken Dave Gier

RE: RE: [sqlite] DROP INDEX not freeing up memory

2007-01-18 Thread Ken
Do you have to drop the index? Why not just keep it around, its obviously useful if you need to create it in the first place right? Dave Gierok <[EMAIL PROTECTED]> wrote: It does in fact look like the memory isn't being freed up entirely. I am properly tracking xMalloc, xRealloc, and

Re: [sqlite] Re: Shared Lock Transactions

2007-01-25 Thread Ken
>From os_unix.h:... After reading this, locking makes more sense! Although the Lock may physically be an exclusive lock, the implementation is actually a logcially "SHARED" lock. /* The following describes the implementation of the various locks and ** lock transitions in terms

Re: [sqlite] Segfault when querying deeply nested view

2007-01-26 Thread Ken
I reproduced this as well on Suse 10 and 3.3.7 Using the following data: insert into records values ( date('NOW'), 'D/D', 'NPOWER','20','test acc','123456') ; insert into records values(date('2006-01-12'), 'D/D', 'NPOWER','20','test acc','123456') ; insert into records

Re: [sqlite] How to specify collating sequences in an expression.

2007-02-01 Thread Ken
of an "alter session" command (Similar to a sqlite PRAGMA). Regards, Ken [EMAIL PROTECTED] wrote: SQLite has supported collating sequences since version 3.0.0. A collating sequence is really a specification on how comparison operators work on strings. You can have

Re: [sqlite] How to specify collating sequences in an expression.

2007-02-01 Thread Ken
If you are dealing with say a chinese char set then wouldn't you want to handle this at a "global" level by modifying the database characteristics, then maybe a Pragma command would be the way to go. [EMAIL PROTECTED] wrote: Ken wrote: > DRH and Sqlite Community, > &

Re: [sqlite] How to specify collating sequences in an expression.

2007-02-01 Thread Ken
ult" attribute. Ken

Re: [sqlite] How to specify collating sequences in an expression.

2007-02-01 Thread Ken
the function is applied to the join attributes that match... IMHO the cast is the way to go to assign a collating sequence. Maybe you need an additional index type ? One where the index is specified with a function. Ken [EMAIL PROTECTED] wrote: "Igor Tandetnik" wrote: &

Re: [sqlite] How to specify collating sequences in an expression.

2007-02-01 Thread Ken
select x, y, z from t1 where collate binary x = y ; collating_expr ::= [collate ] expr ; The collating expression would apply to both x and y. [EMAIL PROTECTED] wrote: Dennis Cote wrote: > > In the standard character strings have a couple of attributes, a > character

Re: [sqlite] Auto-detection of database change in multi-process environment

2007-02-02 Thread Ken
As I see it you have only 3 options. 1. Polling. Polling on a table in sqlite or depending upon your app. You could simply check the file access modifiers to see when the last modifaction time was. 2. Set up an IPC semaphore 3. Set up a socket. David GIGUET <[EMAIL PROTECTED]>

Re: [sqlite] database is locked (my solution)

2007-02-05 Thread Ken
Andrew, Nice modification.. Did you buy any chance post this into the sqlite ticketing system? It would be nice if sqlite would let you acquire a shared lock via the BEGIN statement. Andrew Teirney <[EMAIL PROTECTED]> wrote: > I have multiple thread reading the database and a

Re: [sqlite] database is locked (my solution)

2007-02-06 Thread Ken
at the beginning of a transaction instead of during the middle. You can open a ticket by going into http://www.sqlite.org/cvstrac/wiki and clicking on ticket. Ken Andrew Teirney <[EMAIL PROTECTED]> wrote: > Andrew, > > Nice modification.. Did you buy

Re: Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Ken
Try without the pragma and wrap the inserts with a begin transaction and a commit... The performance will be almost as good as with the pragma, with the added benefit of consistent data and no corruption in the event of a crash or power failure. DragonK <[EMAIL PROTECTED]> wrote:

Re: [sqlite] Atomically creating a database and bootstrapping its tables

2007-02-12 Thread Ken
To bootstrap my db's I create a database template. Then make a physical copy of that. Locking and access is done via flock. So the first process to gain the lock wins and is respoonsible for making the copy, the other just waits until the lock is released and then connects. I make lots of

Re: [sqlite] (newbie) pictures in tables, what's the best way ?

2007-02-23 Thread Ken
This is a design question really so here are my recomendations. Persons - ID( an integer primary key ) - Name - Birthday - Picture Type ( your two digit type). Picture - ID (An integer Primary Key that matches the ID of persons). - image (blob)

Re: [sqlite] use of sqlite in a multithread C application

2007-03-01 Thread Ken
I found that although sqlite claims thread safeness it is actually in your hands to implement a thread safe access pattern. Here is how I implemented my sqlite thread saftey. Each thread opens its on connection. All operations begin with a do { BEGIN EXCLUSIVE

[sqlite] not sqlite question, but design ? for IoMethod & os_????.c

2007-03-05 Thread Ken
building an interface into os system calls such as open/fopen read/fread and i'd like to be able to have the calling code dynamically set up which interace to use, so I'm trying to get a handle on the above code as a roadmap... Thanks, Ken

Re: [sqlite] database is locked error with 3.3.13

2007-03-08 Thread Ken
I have the following sources which one would you like? sqlite-2.8.16.tag.gz sqlite-3.3.8.tar.gz sqlite-3.2.2.tar.gz sqlite-3.3.9.tar.gz sqlite-3.2.8.tar.gz sqlite-3.3.10.tar.gz sqlite-3.3.12.tar.gz sqlite-3.3.13.tar.gz sqlite-3.3.5.tar.gz sqlite-3.3.7.tar.gz Ken T <[EM

[sqlite] Link error with -DSQLITE_OMIT_TRIGGER

2007-03-14 Thread Ken
Compile error with -DSQLITE_OMIT_TRIGGER I get a link error when using: -DSQLITE_OMIT_TRIGGER === gcc -g -DSQLITE_DEFAULT_PAGE_SIZE=8192 -DSQLITE_DEFAULT_CACHE_SIZE=4000 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_VIRTUAL_TABLE

[sqlite] API enhancement

2007-03-14 Thread Ken
, int *, void(*)(void*)); Concept of SQLITE_STATIC vs SQLITE_TRANSIENT is implied that all data is SQLITE_STATIC. Regards, Ken

[sqlite] sqlite Performance

2007-03-15 Thread Ken
default_synchronous=FULL PRAGMA temp_store=memory PRAGMA page_size=4096 PRAGMA cache_size=2000 Any ideas how to get the sqlite output timings to a more respectable level would be appreciated. Thanks Ken

Re: [sqlite] sqlite Performance

2007-03-15 Thread Ken
is around .75 seconds (no write i/o).. So using a flat file output costs about .7 seconds. Using sqlite to do the output costs about 2.25 seconds. My question is why? And what can be done to improve this performance? John Stanton <[EMAIL PROTECTED]> wrote: Ken wrote: > I'

RE: [sqlite] sqlite Performance

2007-03-15 Thread Ken
ok my bad for poor wording... I'll try with Synchronous off. I may also try disabling the journal file since I can easily recreate the data if it is not successful. Thanks, Ken "Griggs, Donald" <[EMAIL PROTECTED]> wrote: Regarding: Creation of flat file takes 1.5 s

Re: [sqlite] sqlite Performance

2007-03-15 Thread Ken
Scott, The whole job is wrapped in an explicit transaction. Variables are bound and statements prepared only once, using reset. This is a write only app. 100% insert. Ken Scott Hess <[EMAIL PROTECTED]> wrote: Are you using explicit transactions at all? If not, as a quic

RE: [sqlite] sqlite Performance

2007-03-15 Thread Ken
0m2.276s sys 0m0.136s Running with synchronous=off is 43% faster !!! Running with Synchrounous=normal is 33 % faster. I should be able to run with synchronous=off. Since the application maintains state in a seperate DB elsewhere. Thanks for you valuable Input. Ken

[sqlite] How to set pragma page_size

2007-03-15 Thread Ken
How does one set the page_size ? according to the documentation "The page-size may only be set if the database has not yet been created. " So how do you execute the pragma prior to creating the DB? without calling sqlite3_open to get a DB handle that is needed to call prepare/step ?

Re: [sqlite] sqlite Performance

2007-03-15 Thread Ken
. This was definately an I/O issue and related to the code path vs say a select where the optimizer picked an incorrect plan. Regards, Ken Tito Ciuro <[EMAIL PROTECTED]> wrote: Hello, IIRC (it was a while ago), one way to speed up insertion for large data sets is to drop the index

Re: [sqlite] sqlite Performance

2007-03-15 Thread Ken
Tito, Its even better now! Synchronous=normal and No primary keys (except 1 table) for auto increment. real0m1.975s user0m1.436s sys 0m0.140s Vs flat file test case: real0m0.862s user0m0.228s sys 0m0.188s This is now very respectable. Thanks, Ken

Re: [sqlite] How to set pragma page_size

2007-03-15 Thread Ken
Thanks DRH... That worked. Ken [EMAIL PROTECTED] wrote: Ken wrote: > How does one set the page_size ? > > according to the documentation > "The page-size may only be set if the database has not yet been created. > " > > So how do you execute the

Re: [sqlite] sqlite Performance

2007-03-15 Thread Ken
DRH, Thanks for your valuable insite. When the DB is closed when in synchrounous mode, is it then persistent at the OS level even from power failures etc? [EMAIL PROTECTED] wrote: Ken wrote: > > I should be able to run with synchronous=off. Since > the application

Re: [sqlite] sqlite Performance

2007-03-16 Thread Ken
b5 to purge is a simple detach and operating system unlink for the underlying datafile. Which I suspect will be infinately faster than a sql delete command. Thanks, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > > This is a write only app. 100% insert. >

Re: [sqlite] Strange performance behavior

2007-03-19 Thread Ken
Looks like it is going to do a full scan of the entire database to complete that querry based upon your where clause. Are you always accessing the data by campID? What is the cardinality of campId data? Depending upon that it might be worth while putting and index on CampID. Hubertus

Re: [sqlite] Strange performance behavior

2007-03-19 Thread Ken
Did you ever determine the cardinality of the campID field? I'm guessing its pretty good since your query is now .6 seconds. Lets say your cardinality was low, ie say less than .3 (arbitrary number). Then using the index to perform you data lookups would probably be slower than just reading

Re: [sqlite] API enhancement

2007-03-19 Thread Ken
Anyone Ken <[EMAIL PROTECTED]> wrote: Question for the list, I'd like to optimize my code, using the following pseudo code as an example. === int i = 0 ; char str[20]; sqlite3_prepare_v2( "insert into t1 values (?,?)" ) sqli

Re: [sqlite] API enhancement

2007-03-19 Thread Ken
You've superficially lifted some code out of the loop, but sqlite3_step() is going to have to go through and bind all of the "pointer bound" variables in your suggested API, so it won't save you anything in the end. -scott On 3/19/07, ken-33 wrote: > > Anyone thoughts? > > >

Re: [sqlite] API enhancement

2007-03-20 Thread Ken
Denis, Thanks for the great explanation !!! Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > It should save some time. How much is questionable. > > Why would sqlite have to bind the Pointer bound variables? Isn't the strategy > of bi

Re: [sqlite] Finding linked peers

2007-03-20 Thread Ken
Sample recusrive SQL from another database engine... level is a built in field. This is very useful and powerful syntax allowing one to build tree's (ie parent child relationships) inside of a table. SELECT level,chld FROM tbl1 START WITH value = 'some value'

Re: [sqlite] Use of bind variable in sqlite

2007-03-28 Thread Ken
concurrency you'd better stick with oracle. Sqlite is designed for embedded single users systems. Regards, Ken "Amarjeet Kumar (RBIN/ECM4)" <[EMAIL PROTECTED]> wrote: Hi, Can we use the bind variable in sqlite query, if so how? Thanks in advance. Regards, Amar

Re: [sqlite] Difference in these indices?

2007-03-28 Thread Ken
storage-clause := store as (fileName, pageSize, initialAlocation) Ken Joe Wilson <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > If you insert records in order of ascending integer primary > key, then the inserts will be very fast. If you insert rec

Re: [sqlite] PLSQL

2007-03-30 Thread Ken
John, I've used PL/SQL on Oracle. I think it was derived from another language, maybe PL/1. I think its an excellent language, my main usage was geared at PL/SQL for DBA usage that managed internal oracle objects. Pros: Packages / Procedures/ Functions have a really nice hierarchy.

Re: [sqlite] in-memory database bound to a named buffer

2007-03-30 Thread Ken
short answer is no. The memory structures are not identical to disk structures. Ryan Underwood <[EMAIL PROTECTED]> wrote: Is it possible to bind an in-memory sqlite database (in read-only mode, naturally) to an existing named memory buffer that contains exactly the contents of a sqlite

Re: [sqlite] SQL language issue, ticket #2282

2007-04-03 Thread Ken
Oracle does not allow a when clause on an instead of trigger. when new.key=old.key * ERROR at line 3: ORA-25004: WHEN clause is not allowed in INSTEAD OF triggers [EMAIL PROTECTED] wrote: Ticket #2282 against SQLite http://www.sqlite.org/cvstrac/tktview?tn=2282 complains

Re: [sqlite] SQL help

2007-04-03 Thread Ken
sum(is_complete) is only the same as "where is_complete = 1" when there is a check constraint guaranteeing that is complete will either be a 0 or 1. Dennis Cote <[EMAIL PROTECTED]> wrote: Clark Christensen wrote: > I have a table, as described below, where I need to find out if the tech_id

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

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

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

[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

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

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

[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

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

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

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

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

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

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

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 trying to

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 sqlite3_fil

Re: [sqlite] Planner choosing wrong index

2008-04-08 Thread Ken
ts 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] Update

2008-04-09 Thread Ken
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 ,AlbumTrac

Re: [sqlite] Addition extension function failed!

2008-04-09 Thread Ken
/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. My progr

<    1   2   3   4   5   6   >