[sqlite] What is the preferred way to create SQLite databases?

2007-11-29 Thread Mark Brown
Hi- What is the preferred way to create SQLite databases? Ideally, I would like to have the entire schema in a file, and then generate the DB from that, as we make changes to the schema often. We're currently using something called SQLite Database Browser, but I am becoming concerned that the

RE: [sqlite] RE: Doubtful code in os_unix.c

2007-11-29 Thread Mark Brown
My fix is to REMOVE the lines of code I mentioned. The malloc is done outside of this method already. Thanks, Mark > -Original Message- > From: Alexandre Balaban [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 29, 2007 11:13 AM > To: sqlite-users@sqlite.org > Subject: [sqlite]

[sqlite] ftruncate() for values greater than file size

2007-11-29 Thread Mark Brown
Hi- I have finally tracked down a bug that has plagued by vxWorks port. It appears that our file system's implementation of ftruncate() does not like to "truncate" a file larger than its current size, and returns EINVAL for this operation. My question...assuming that I can't get ftruncate to

[sqlite] Running SQLite tests

2007-11-26 Thread Mark Brown
Hi- Is there any documentation on how one would run the SQLite tests? I'm thinking it would be an excellent test for my particular platform port. I'm seeing the test directory in CVS, but not exactly sure what to do with the test files. Thanks, Mark

RE: [sqlite] SQLite 3.5.2 - Unix - Memory issue?

2007-11-26 Thread Mark Brown
Ah, yes. My mistake. Thanks. > > The locking style has absolutely nothing to do with > threads. Locking style is what kind of file locks > are used to prevent separate processes from updating > the same database as the same time. SQLite uses > posix advisory locks by default. Not all

RE: [sqlite] SQLite 3.5.2 - Unix - Memory issue?

2007-11-21 Thread Mark Brown
I was using the noLocking style. Is that essentially what you get with SQLITE_THREADSAFE = 0? Thanks, Mark > > I recommend that you *not* use LOCKING_STYLE. It is > disabled by default. Dan and I have a note to go back > and get the LOCKING_STYLE stuff working, but we have not > gotten

[sqlite] SQLite 3.5.2 - Unix - Memory issue?

2007-11-21 Thread Mark Brown
Hi- I am currently migrating over from 3.4 to 3.5.2. I am creating a custom VFS, but it is essentially the same as unix. As I was going through the code, there was a particular section that made me think that it may not have been migrated correctly. In the fillInUnixFile() method (and assuming

RE: [sqlite] How to get 3.4.2 code

2007-11-12 Thread Mark Brown
Ah, that makes sense. Thanks! > > Mark, > > I was talking about using the sqlite download page at > http://www.sqlite.org/download.html. > > If you right click on a link (like the one for > sqlite3-3_5_2.zip under > Precompiled Binaries For Windows) and select "copy the link location" >

RE: [sqlite] How to get 3.4.2 code

2007-11-09 Thread Mark Brown
Ahh...I think I figured it out. Clicking the "Show Milestones" button was very helpful! - To unsubscribe, send email to [EMAIL PROTECTED] -

RE: [sqlite] How to get 3.4.2 code

2007-11-09 Thread Mark Brown
Hi Dennis- Thanks for the reply. How do I know what version of the file was part of 3.4.2 and what is part of 3.5? I'm seeing version numbers of 1.171, for example. Thanks, Mark > Mark, > > Go to the download page, copy the link for the file you want > (with the > current 3..5.2 version

[sqlite] How to get 3.4.2 code

2007-11-09 Thread Mark Brown
Hi- Could someone please remind me how I can download SQLite code for version 3.4.2 from CVS? Was there some sort of tag made that I can use? I'm hesitant to upgrade to 3.5.x just because I'm not sure how much it has been test driven and we are close to release. Maybe I am being overly

[sqlite] Soft Heap Limit

2007-11-09 Thread Mark Brown
Hi- I'm currently using SQLite 3.4.1 and have been reading with interest the large database thread. I learned about the soft heap limit feature and was considering using it. While reading about the bug fixes for 3.4.2 and soft heap limit, I came across a sample of setting the soft heap limit to

RE: [sqlite] Moving database connections across threads

2007-09-20 Thread Mark Brown
Thanks, John, for your reply. We also had the same idea about wanting to avoid the SQLITE_BUSY possibilities, and just have callers wait. So, I think if I understand your response correctly, by having THREADSAFE=0 we have effectively commented out any code that would be trying to use fcntrl(),

[sqlite] Moving database connections across threads

2007-09-19 Thread Mark Brown
Hi- We have an application that wraps SQLite 3.4.1. Due to some vxWorks platform issues with non-standard posix behavior, we are considering compiling SQLite with THREADSAFE = 0, and then having our application make sure that only one thread can access SQLite at a time. I was wondering about

[sqlite] SQLite Database Browser for creating databases

2007-08-23 Thread Mark Brown
Hi- We are currently creating databases using this open source tool. According to the documentation, it is using version 3.3.5 of SQLite. I was wondering if there are any problems with creating a database with the tool, but then using the database with an application that is using SQLite

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

2007-08-15 Thread Mark Brown
No, not a soft link. :) Based on other posts I have read about threading performance and SQLite, it seems like most people like to use a single thread. I'm going to change our application to use a system-wide mutex for thread synchronization and see if that improves our results. I'm still

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

2007-08-15 Thread Mark Brown
Hi John- There is a .lock file for each database. From my understanding, that should prohibit 2 connections from using the same database at the same time. However, that is not the situation I am wondering about. I am specifically wondering if database activity on a connection to DB 1 would have

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

2007-08-15 Thread Mark Brown
Hi Andre- After rereading your post, I wanted to confirm something. In your example below, are thread1 and thread2 connected to the same database, or different databases? In my scenario, the threads are connected to different databases, so I'm not sure if it is the same situation. Thanks, Mark

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

2007-08-15 Thread Mark Brown
Hi Andre- Thank you for your insight. Looks like we have some redesign scheduled for today. :) Thanks, Mark > -Original Message- > From: Andre du Plessis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 15, 2007 5:05 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite]

[sqlite] SQLITE_BUSY error in multi-threaded environment

2007-08-14 Thread Mark Brown
Hi- I've got an application that has many different SQLite databases. Each database connection is opened in its own thread. Each database has only one connection. I created some test cases that create a database and schema on the fly and perform various SELECT, INSERTS, UPDATES on it. The

RE: [sqlite] SELECT ORDER BY failure

2007-07-19 Thread Mark Brown
No, we are actually filling in the parameter with a valid integer value. I was just trying to say it was a parameter. > > Are you actually searching for records where F is the string "?" > > If so, why don't you try WHERE F="?" instead of leaving it with the > ? unquoted.

RE: [sqlite] Multiple connections - stale cache?

2007-07-10 Thread Mark Brown
My final post on this issue...vxWorks has confirmed a bug in their fstat() implementation. I'm hoping for a quick resolution. Thanks for the help. Mark > > Just a follow-up for the group... > > Richard was able to determine that my platform is having > trouble with an > fstat() call to get

RE: [sqlite] Multiple connections - stale cache?

2007-06-28 Thread Mark Brown
Just a follow-up for the group... Richard was able to determine that my platform is having trouble with an fstat() call to get the size of files on my file system. Specifically, the call is returning a size of 0 when it should be 11K. I am investigating the vxWorks platform and have found that

RE: [sqlite] Multiple connections - stale cache?

2007-06-27 Thread Mark Brown
Hi- No, I am not confident that my file locking code is working. For vxWorks, I needed to alter the .lock functionality, as it wouldn't compile. Pretty much changes such as calling stat() instead of lstat(), etc. However, for this example, I do know that the two threads operate serially (ie,

RE: [sqlite] Multiple connections - stale cache?

2007-06-26 Thread Mark Brown
I have some odd results to report on the db counter. I put some diagnostic code in our database wrapper class to write out the db counter whenever a statement is executed. It will print out for every statement executed whether the statement is a SELECT or UPDATE or BEGIN TRANSACTION. Richard

RE: [sqlite] Multiple connections - stale cache?

2007-06-26 Thread Mark Brown
Hi Richard and Joe- It probably is some application error in our code. What puzzles me is that calling sqlite3_enable_shared_cache(1) appears to fix (or at least change) the behavior. Not sure if that triggers any ideas as to what our problem might be. Your suggestion of looking at the

RE: [sqlite] Multiple connections - stale cache?

2007-06-26 Thread Mark Brown
Thanks for the quick reply. Unfortunately, we are developing code on the vxWorks platform, so I don't think sample code would be of use. We have seen the problem for some time now...at least from 3.3.12. The submitter of the ticket appears to have the exact same scenario as us. Hopefully he

[sqlite] Multiple connections - stale cache?

2007-06-26 Thread Mark Brown
Hi- We have a scenario where we have two different database connections to the same database. Each database connection is running on a separate thread, but in this situation, we are only using one connection at a time. We are finding that sometimes one database connection will do a "select" on