Re: [sqlite] Trying to use in-memory database

2014-02-20 Thread Yuriy Kaminskiy
Richard Hipp wrote: > On Wed, Feb 19, 2014 at 5:25 PM, Jeff Archer < > jsarc...@nanotronicsimaging.com> wrote: > >> Long time SQLite user but I don't think I have ever tried to do an >> in-memory database before. >> Just upgraded to 3.8.3.1 but I am not having any other failures with >> existing

[sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Hello, I'm coming back with my EXIF database. I have a TEXT column, ExposureTime, where I store the EXIF representation of photograph's exposure time. Sample values: "1/6000", "1/250", "0.5", "1", "6"... I need to retain this representation, because it's how photographers deal with exposure

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Kevin Martin
On 20 Feb 2014, at 12:54, Patrick Proniewski wrote: > My problem is that my database holds too many different values for > ExposureTime, so the resulting plot is unreadable. I want to be able to "bin" > those values to create a proper histogram. It's not possible to "bin"

[sqlite] Wrong filename handling in sqlite3_load_extension() for Cygwin

2014-02-20 Thread Jan Nijtmans
The function sqlite3_load_extension() on Cygwin expects a win32 path, even though it is compiled for Cygwin. How to reproduce? First create some extension, e.g.: gcc -shared -o wholenumber.dll ext/misc/wholenumber.c Then compile the following little program: == main.c

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
hi Kevin, On 20 févr. 2014, at 14:11, Kevin Martin wrote: > > On 20 Feb 2014, at 12:54, Patrick Proniewski wrote: > >> My problem is that my database holds too many different values for >> ExposureTime, so the resulting plot is unreadable. I want to be able to >> "bin"

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Simon Slavin
On 20 Feb 2014, at 1:56pm, Patrick Proniewski wrote: > Thanks for you reply. In fact I would like the script to remain portable. I'm > running all this on Mac OS X 10.6.8 (sqlite3 3.6.12) but I plan to share it > and use it on FreeBSD too. And developing a extension is

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Donald Griggs
Hi Patrick, Am I right that fractional exposures will always have one as the numerator? I.e., you might record an exposure as "1.5" seconds, but never as "3/2" seconds? If so, then that might simplify things. The example below creates a column named "canon" to hold the canonical exposure

Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-20 Thread Akintoye Olorode (BLOOMBERG/ 731 LEXIN)
Our client got the following print-out. First hint of failure is the line "TRUNCATE 48 32768 failed". Any insights into what the root cause might be ? OPEN 40 D:\blp\wintrv\smartclient\applications\appinfo.db 0xc000 ok READ 40 lock=0 LOCK 40 1 was 0(0) READ 40 lock=1 OPEN 44

[sqlite] Problem with .mode line

2014-02-20 Thread pelek
Hello, I am using sqlite3's shell command program to update my DB. Now something really funny is happening. I am using code to create table: CREATE TABLE asd ( [blah] INTEGER NULL, [blah2] INTEGER NULL ); Then I am doing: .mode line .out stdout .schema asd Result is: CREATE TABLE asd ( [blah]

Re: [sqlite] Lack of "decimal" support

2014-02-20 Thread indraneel_in
I too faced a similar situation.. the following thing worked set the Column type to Double and insert rows using Double data type for java.. -- View this message in context: http://sqlite.1065341.n5.nabble.com/Lack-of-decimal-support-tp57530p74046.html Sent from the SQLite mailing list

Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-20 Thread Simon Slavin
On 20 Feb 2014, at 2:29pm, Akintoye Olorode (BLOOMBERG/ 731 LEXIN) wrote: > Our client got the following print-out. First hint of failure is the line > "TRUNCATE 48 32768 failed". Any insights into what the root cause might be ? Have you checked the media for faults

Re: [sqlite] Problem with .mode line

2014-02-20 Thread Clemens Ladisch
pelek wrote: > CREATE TABLE asd ( > [blah] INTEGER NULL, > [blah2] INTEGER NULL > ); > > .mode line > .out file.txt > .schema asd > > Result is: > CREATE TABLE asd ([blah] INTEGER NULL,[blah2] INTEGER NULL); Works for me. (In an editor that understands Unix line endings). I don't know why the

Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-20 Thread Dan Kennedy
On 02/20/2014 09:29 PM, Akintoye Olorode (BLOOMBERG/ 731 LEXIN) wrote: Our client got the following print-out. First hint of failure is the line "TRUNCATE 48 32768 failed". Any insights into what the root cause might be ? The operation that is failing is (probaby) an attempt to use

Re: [sqlite] Virtual Memory Size used looks too large

2014-02-20 Thread Clemens Ladisch
Woody Wu wrote: > What I used is sqlite 3.7.5, but the doc says that memory-mapped io > only started from 3.7.17. > > So, what are used for the huge VSZ in my sqlite application? Some other data. The page cache doesn't get that big by default, so probably some temporary data. > I am afraid,

[sqlite] Syntax diagram missing in sqlite3 docs

2014-02-20 Thread Zsbán Ambrus
Hi, The page "http://sqlite.org/lang_transaction.html; should show the syntax diagrams for commit-stmt and rollback-stmt. Similarly, the page "http://sqlite.org/lang_savepoint.html; should show the diagram for rollback-stmt. These missing diagrams show up correctly in

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Donald, On 20 févr. 2014, at 15:16, Donald Griggs wrote: > Am I right that fractional exposures will always have one as the numerator? > I.e., you might record an exposure as "1.5" seconds, but never as "3/2" > seconds? If so, then that might simplify things. Yes, no 3/2, only 1/x and

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Simon, > Date: Thu, 20 Feb 2014 14:04:59 + > From: Simon Slavin > > On 20 Feb 2014, at 1:56pm, Patrick Proniewski wrote: > >> Thanks for you reply. In fact I would like the script to remain portable. >> I'm running all this on Mac OS X 10.6.8 (sqlite3 3.6.12) but I

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread RSmith
Ensure you store the string representation of the reals (floats w/e) of precise numerical format and length, such that: 0.3, 12 and 1.456 all look alike and sorts correct ex: "000.30" and "001.456000" and "012.00" etc. or whatever similar format you may choose as Simon (I think)

[sqlite] Still trying to track down loadable extensions

2014-02-20 Thread Peter Haworth
I'm still hunting for loadable extensions. The SQLite web site makes reference to extensions being part of the source code in the contrib folder but when I browser around there, I can only see 2 files dlmalloc and sqlcon. I know nothing about git so can someone please point me in the right

Re: [sqlite] Still trying to track down loadable extensions

2014-02-20 Thread Richard Hipp
On Thu, Feb 20, 2014 at 6:19 PM, Peter Haworth wrote: > I'm still hunting for loadable extensions. > In the ext/ folder, and especially in ext/misc/ http://www.sqlite.org/src/tree?name=ext/misc=trunk -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Still trying to track down loadable extensions

2014-02-20 Thread Nico Williams
On Thu, Feb 20, 2014 at 5:19 PM, Peter Haworth wrote: > I know nothing about git so can someone please point me in the right > direction to find these loadable extensions. SQLite3 is version controlled with Fossil anyways, not git... Besides the ones that SQLite3 comes with (see

[sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread veeresh kumar
Hi,  I am using "PRAGMA journal_mode=WAL;" with "PRAGMA synchronous=NORMAL;",with default auto check point and page size = 1024 bytes.  Since checkpoint occurs automatically after every 1 MB, how much time it checkpoint operation would take to complete as the database size grows large (range 1GB - 

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread Richard Hipp
On Thu, Feb 20, 2014 at 7:08 PM, veeresh kumar wrote: > Hi, > I am using "PRAGMA > journal_mode=WAL;" with "PRAGMA synchronous=NORMAL;",with > default auto check point and page size = 1024 bytes. Since checkpoint > occurs automatically after every 1 MB, how much time it

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread veeresh kumar
Haven't measured the time, but I have seen a pause before commit happens. As stated during my earlier discussion, my service cannot pause for more than 10 sec as it would be result in time out for the clients that are connected to this service.   What my understanding towards the checkpoint is

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread Richard Hipp
On Thu, Feb 20, 2014 at 7:41 PM, veeresh kumar wrote: > Haven't measured the time, but I have seen a pause before commit > happens. As stated during my earlier discussion, my service cannot pause > for more than 10 sec as it would be result in time out for the clients that >

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread Simon Slavin
On 21 Feb 2014, at 12:45am, Richard Hipp wrote: > Long-running or overlapping readers can prevent the checkpoint from > occurring. The checkpoint will be retried again and again, but if there is > always a read transaction open on a transaction other than the most recent >