[sqlite] Null pointer exception in shell.c(process_sqliterc)

2013-03-18 Thread Yongil Jang
Dear all, I've found a small fix point in shell.c In process_sqliterc() function, zBuf from sqlite3_mprintf() is used as parameters of fopen() without any null value check. if (sqliterc == NULL) { home_dir = find_home_dir(); if( home_dir==0 ){ #if !defined(__RTP__) &&

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Simon Slavin
On 19 Mar 2013, at 4:05am, Alykhan Jetha wrote: > What's actually happening is I'm getting a SQLITE_NOMEM when I run the > queries in Process A (after Process B finished and checkpoints). Once again the tactic pays off: check every single result code SQLite returns,

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Ok, so upon further investigation, I'm not losing file handles (Thanks Simon!). What's actually happening is I'm getting a SQLITE_NOMEM when I run the queries in Process A (after Process B finished and checkpoints). In Process A (the desktop app), I have 2 connections. This error is only

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Simon Slavin
On 19 Mar 2013, at 2:36am, Alykhan Jetha wrote: > Just to be clear. > Is it true that I can have one and only one connection per thread? I don't think so. There are plenty of single-process single-thread apps which open multiple SQLite connections. I thought it was

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Richard Hipp
On Mon, Mar 18, 2013 at 10:36 PM, Alykhan Jetha wrote: > Just to be clear. > Is it true that I can have one and only one connection per thread? > No. You can have as many connections per thread as you want (subject to your operating system's ability to give you new file

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Just to be clear. Is it true that I can have one and only one connection per thread? Thanks! -- AJ On Monday, 18 March, 2013 at 9:07 PM, Alykhan Jetha wrote: > Hi Simon, > > On Monday, 18 March, 2013 at 8:43 PM, Simon Slavin wrote: > > > > > On 18 Mar 2013, at 11:47pm, Alykhan Jetha

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Hi Simon, On Monday, 18 March, 2013 at 8:43 PM, Simon Slavin wrote: > > On 18 Mar 2013, at 11:47pm, Alykhan Jetha (mailto:alykhanje...@gmail.com)> wrote: > > > I have 2 processes (process A and process B) opening a connection to the a > > database. > > Just to be

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Simon Slavin
On 18 Mar 2013, at 11:47pm, Alykhan Jetha wrote: > I have 2 processes (process A and process B) opening a connection to the a > database. Just to be sure, you mean that the two processes are totally independent, right ?our processes open one connection to the database

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Two independent processes. Process A is a desktop app. Process B is a background sync tool (a headless app). -- AJ On Monday, 18 March, 2013 at 8:28 PM, Richard Hipp wrote: > On Mon, Mar 18, 2013 at 8:09 PM, Alykhan Jetha (mailto:alykhanje...@gmail.com)>wrote: >

Re: [sqlite] Journal mode

2013-03-18 Thread Richard Hipp
On Mon, Mar 18, 2013 at 8:29 PM, Jeff Archer < jsarc...@nanotronicsimaging.com> wrote: > Documentation doesn't make this clear. Does PRAGMA journal_mode = OFF; > affect a single connection or will it affect all connections in my process? > Single connection. -- D. Richard Hipp d...@sqlite.org

[sqlite] Journal mode

2013-03-18 Thread Jeff Archer
Documentation doesn't make this clear. Does PRAGMA journal_mode = OFF; affect a single connection or will it affect all connections in my process? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Richard Hipp
On Mon, Mar 18, 2013 at 8:09 PM, Alykhan Jetha wrote: > Hi Richard, > > I can certainly send you a build of the app To be clear, are you talking about two threads within the same process, or two independent processes? > and the steps to reproduce the problem (not too

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Hi Richard, I can certainly send you a build of the app and the steps to reproduce the problem (not too complicated). I'm not sure how I would make some sample code that exhibits the problem... Let me know. Thanks!!!-- AJ On Monday, 18 March, 2013 at 8:00 PM, Richard Hipp wrote: > On

Re: [sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Richard Hipp
On Mon, Mar 18, 2013 at 7:47 PM, Alykhan Jetha wrote: > Hi Gang, > > I have a weird issue that has me believing I've missed something… > > I have 2 processes (process A and process B) opening a connection to the a > database. After process B is done its work, we call

[sqlite] Other process loses handles when in WAL mode on OS X

2013-03-18 Thread Alykhan Jetha
Hi Gang, I have a weird issue that has me believing I've missed something… I have 2 processes (process A and process B) opening a connection to the a database. After process B is done its work, we call checkpoint(restart), process A seems to lose its file handles (unknown IO error). If we

Re: [sqlite] TCL Test failures on ARM

2013-03-18 Thread Drake Wilson
Quoth Bk , on 2013-03-17 21:25:21 -0700: > can some one point out what went wrong here ? Community lists do not provide guaranteed responses, and repeatedly hassling the list with requests for one is unlikely to make you any friends. Certainly I haven't responded because

Re: [sqlite] sqlite and Mac App Store sandbox

2013-03-18 Thread Simon Slavin
On 18 Mar 2013, at 7:02pm, Marco Bambini wrote: > The main issue is that sqlite uses temporary files (next to the database > file) to store wal, shm or journal information. > > Apple simply does not grant read/write privileges on non user specifically > selected files… so

Re: [sqlite] sqlite and Mac App Store sandbox

2013-03-18 Thread Petite Abeille
On Mar 18, 2013, at 8:02 PM, Marco Bambini wrote: > Anyone have another solution? You may have better luck at . In the meantime:

[sqlite] sqlite and Mac App Store sandbox

2013-03-18 Thread Marco Bambini
Seems like new sqlite based applications will have a lot of troubles to be accepted in the Mac App Store thanks to strictly sandbox policies. The main issue is that sqlite uses temporary files (next to the database file) to store wal, shm or journal information. Apple simply does not grant

Re: [sqlite] sqlite3 and sqlite4 disk I/O

2013-03-18 Thread Rob Turpin
I understand it's still under development, but was curious about the difference. I have commented out all of the debug defines and enabled -DNDEBUG=1 for the sqlite4 build. On Mon, Mar 18, 2013 at 12:00 PM, Simon Slavin wrote: > > On 18 Mar 2013, at 5:28pm, Rob Turpin

Re: [sqlite] sqlite3 and sqlite4 disk I/O

2013-03-18 Thread Rob Turpin
It's a simple table, primary key is an integer, with another column which is integer. Although I do begin a transaction, do 1000 updates and then commit. On Mon, Mar 18, 2013 at 11:36 AM, Dan Kennedy wrote: > On 03/19/2013 12:28 AM, Rob Turpin wrote: > >> I was running

Re: [sqlite] sqlite3 and sqlite4 disk I/O

2013-03-18 Thread Simon Slavin
On 18 Mar 2013, at 5:28pm, Rob Turpin wrote: > With sqlite3 there's a large difference between the CPU time and wall clock > time. No big deal, that's the I/O to disk. But then I'm wondering why the > difference with sqlite4 is so small? You know that SQLite4 is Not Ready

Re: [sqlite] sqlite3 and sqlite4 disk I/O

2013-03-18 Thread Dan Kennedy
On 03/19/2013 12:28 AM, Rob Turpin wrote: I was running some performance tests for both sqlite3 and sqlite4 and have a question about a difference in my numbers. I'm running these on a Linux machine, so I enabled fdatasync for the sqlite3 build. I'm measuring the number of updates I can

[sqlite] sqlite3 and sqlite4 disk I/O

2013-03-18 Thread Rob Turpin
I was running some performance tests for both sqlite3 and sqlite4 and have a question about a difference in my numbers. I'm running these on a Linux machine, so I enabled fdatasync for the sqlite3 build. I'm measuring the number of updates I can perform (updates per second), here are the

[sqlite] configure file is missing from sqlite-autoconf-3071600/tea directory

2013-03-18 Thread Gerry Snyder
Probably why the file is a bit smaller than other recent ones. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with alter table add column

2013-03-18 Thread Neil Bowers
Hi, > I don't understand the sqlite command "alter table add column". Please help > me! > > I have the following 2 tables: > > TABLEONE(columnA INTEGER PRIMARY KEY, columnB TEXT); > > TABLETWO(columnX INTEGER PRIMARY KEY, columnY TEXT); > > I want to add a new column "cloumnZ" to TABLETWO.

[sqlite] Problem with alter table add column

2013-03-18 Thread bob_sqlite
Hello I don't understand the sqlite command "alter table add column". Please help me! I have the following 2 tables: TABLEONE(columnA INTEGER PRIMARY KEY, columnB TEXT); TABLETWO(columnX INTEGER PRIMARY KEY, columnY TEXT); I want to add a new column "cloumnZ" to TABLETWO. The new column must

Re: [sqlite] Query optimizer suboptimal planning with virtual tables

2013-03-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/03/13 05:25, Clemens Ladisch wrote: > If you had no xBestIndex implementation, SQLite would crash. He is using APSW (a Python wrapper). It provides a default implementation if the developer does not. Here is the documentation: