Re: [sqlite] sqlite Commit C API

2012-05-21 Thread Simon Slavin
On 21 May 2012, at 12:22pm, "Black, Michael (IS)" wrote: > I'll have to check the BIOS settings on my box and see if turning off write > caching makes more sense on that particular test. That won't do any harm, but you should be aware that your hardware lies. Some

Re: [sqlite] sqlite Commit C API

2012-05-21 Thread Black, Michael (IS)
Tandetnik [itandet...@mvps.org] Sent: Sunday, May 20, 2012 8:47 AM To: sqlite-users@sqlite.org Subject: EXT :Re: [sqlite] sqlite Commit C API Black, Michael (IS) <michael.bla...@ngc.com> wrote: > Hmmm...our math is a bit different... > > A 1,000 RPM disk would take 1ms to s

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Jay A. Kreibich
On Sun, May 20, 2012 at 01:26:48PM +, Black, Michael (IS) scratched on the wall: > Hmmm...our math is a bit different... Yeah, your math is wrong... 8-) > A 1,000 RPM disk would take 1ms to spin around once A 1,000 RPS disk would, but not a 1,000 RPM disk. > I believe my original

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Igor Tandetnik
Black, Michael (IS) wrote: > Hmmm...our math is a bit different... > > A 1,000 RPM disk would take 1ms to spin around once No it wouldn't. > (there are 1000ms in a second, correct?) Yes, but RPM stands for a revolution-per-*minute*. You are off by a factor of 60. --

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Black, Michael (IS)
of Jay A. Kreibich [j...@kreibi.ch] Sent: Sunday, May 20, 2012 7:53 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] sqlite Commit C API On Sun, May 20, 2012 at 12:04:33PM +, Black, Michael (IS) scratched on the wall: > Another more indirect way to test is this util

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Jay A. Kreibich
On Sun, May 20, 2012 at 12:04:33PM +, Black, Michael (IS) scratched on the wall: > Another more indirect way to test is this utility: > > http://kerneltrap.org/mailarchive/linux-ext4/2009/3/22/5215824 > > Which...if your fsync doesn't work at all will return something really > close to

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Black, Michael (IS)
If you can run perl on your ARM host try this utility to see if fsync() actually works -- this is a real end-to-end test that you pull the plug on and it will let you know if your disk file is where it's supposed to be and how many errors you had. http://brad.livejournal.com/2116715.html

Re: [sqlite] sqlite Commit C API

2012-05-20 Thread Baruch Burstein
> On Thu, May 17, 2012 at 7:04 PM, Rajesh Kumar wrote: > int fsync( int fd ) { return 0; } > > fsync will expect an Integer pointer right. But sqlite pointer is of type > sqlite3*. So how can fsync works on sqlite. What should I pass to fsync??? > > You don't need to call

Re: [sqlite] sqlite Commit C API

2012-05-18 Thread Christian Smith
On Thu, May 17, 2012 at 04:47:29PM +0100, Simon Slavin wrote: > > On 17 May 2012, at 4:34pm, Rajesh Kumar wrote: > > > No am not using any PRAGMAs. I just cross compiled sqlite source to > > ARM architecture. Can't I forcefully do commit on my transaction > > If you

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Marc L. Allen
Subject: Re: [sqlite] sqlite Commit C API On 17 May 2012, at 4:49pm, Jay A. Kreibich <j...@kreibi.ch> wrote: > I wouldn't be all that shocked to find out an embedded system has an > fsync() call that looks like this: > > int fsync( int fd ) { return 0; } We are best soft

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 5:04pm, Rajesh Kumar wrote: > int fsync( int fd ) { return 0; } > > fsync will expect an Integer pointer right. But sqlite pointer is of type > sqlite3*. So how can fsync works on sqlite. What should I pass to fsync??? Sorry Rajesh. It was a

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
int fsync( int fd ) { return 0; } fsync will expect an Integer pointer right. But sqlite pointer is of type sqlite3*. So how can fsync works on sqlite. What should I pass to fsync??? On Thu, May 17, 2012 at 9:19 PM, Jay A. Kreibich wrote: > int fsync( int fd ) { return 0; }

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:49pm, Jay A. Kreibich wrote: > I wouldn't be all that shocked to find out an embedded system has an > fsync() call that looks like this: > > int fsync( int fd ) { return 0; } We are best software circle ! Our programmers write many functions a day !

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Jay A. Kreibich
On Thu, May 17, 2012 at 08:58:39PM +0530, Rajesh Kumar scratched on the wall: > Hi Richard, > > Thanks for the reply. fsync() is related to system call, which is > working fine. I believe you're missing Richard's point. I'm sure fsync() is returning a success error code. That doesn't

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:34pm, Rajesh Kumar wrote: > No am not using any PRAGMAs. I just cross compiled sqlite source to > ARM architecture. Can't I forcefully do commit on my transaction If you are correctly using _open() and _close(), and haven't disabled synchrony with

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
So if I use _exec() after sqlit3_exec() API, what ever the I did on database will be saved, right?? On Thu, May 17, 2012 at 9:03 PM, Simon Slavin wrote: > > On 17 May 2012, at 4:28pm, Rajesh Kumar wrote: > > >Thanks for the reply. fsync() is

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
No am not using any PRAGMAs. I just cross compiled sqlite source to ARM architecture. Can't I forcefully do commit on my transaction On Thu, May 17, 2012 at 8:55 PM, Simon Slavin wrote: > > On 17 May 2012, at 4:18pm, Rajesh Kumar wrote: > > > Am

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:28pm, Rajesh Kumar wrote: >Thanks for the reply. fsync() is related to system call, which is > working fine. But I am looking for a C API that can do the commit thing, > which is same as commit on command promt. The COMMIT; on a command prompt

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
Hi Richard, Thanks for the reply. fsync() is related to system call, which is working fine. But I am looking for a C API that can do the commit thing, which is same as commit on command promt. On Thu, May 17, 2012 at 8:52 PM, Richard Hipp wrote: > On Thu, May 17, 2012 at

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Jay A. Kreibich
On Thu, May 17, 2012 at 11:22:44AM -0400, Richard Hipp scratched on the wall: > On Thu, May 17, 2012 at 11:18 AM, Rajesh Kumar wrote: > > > Hi all, > > > >Am using sqlite database on my ARM processor based Embedded system . > > Whenever power failures or due to uneven

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:18pm, Rajesh Kumar wrote: > Am using sqlite database on my ARM processor based Embedded system . > Whenever power failures or due to uneven shutdown of device, my database > is being corrupted which leading to data lost. Am using C API interface for >

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Richard Hipp
On Thu, May 17, 2012 at 11:18 AM, Rajesh Kumar wrote: > Hi all, > >Am using sqlite database on my ARM processor based Embedded system . > Whenever power failures or due to uneven shutdown of device, my database > is being corrupted which leading to data lost. That

[sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
Hi all, Am using sqlite database on my ARM processor based Embedded system . Whenever power failures or due to uneven shutdown of device, my database is being corrupted which leading to data lost. Am using C API interface for accessing database. Is there any C API that I can use to commit my