Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Dominique Devienne
On Thu, Feb 12, 2015 at 2:04 AM, Richard Hipp wrote: > On 2/11/15, Igor Tandetnik wrote: > > On 2/11/2015 5:46 PM, Jono Poff wrote: > >> I wonder if anybody could give me a simple example in C to bind an array > >> of values to a prepared statement? > >>> >

Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Scott Robison
On Feb 12, 2015 1:26 AM, "Dominique Devienne" wrote: > > We fill the collection client-side, bind it, execute that 1 statement, and > get back many rows, all in a single round-trip to the server (thanks to > prefetching on the select side). Mind you, this is not nearly as

Re: [sqlite] binding multiple values in a query

2015-02-12 Thread Paul
I just want to inject my $.05. As for me, binding an array or table is very well aligns with a syntax of WITH clause. So example query might look like: WITH array(x) AS ?001 SELECT x FROM array Or WITH my_table(x, y, z) AS ?001 SELECT * FROM my_table

Re: [sqlite] CEROD in System.Data.SQLite

2015-02-12 Thread E. Timothy Uy
I have confirmed that the unencrypted version works fine. Perhaps this is the issue, that it is trying to ExpandFilename on a string that is prepended by ":cerod:". On Wed, Feb 11, 2015 at 7:37 PM, E. Timothy Uy wrote: > I'm working on switching our custom build of

Re: [sqlite] CEROD in System.Data.SQLite

2015-02-12 Thread E. Timothy Uy
http://system.data.sqlite.org/index.html/artifact/9a65aebbcf2379f3 Hmm, yes, I think that this is the issue. Need to have handling of the :cerod:pwd: tag near if (!fullUri) { if (isMemory) fileName = MemoryFileName; else { #if PLATFORM_COMPACTFRAMEWORK

Re: [sqlite] CEROD in System.Data.SQLite

2015-02-12 Thread E. Timothy Uy
I tried conn = new SQLiteConnection(String.Format("Data Source={0};ToFullPath=False", ":memory:")); but unfortunately still no love On Thu, Feb 12, 2015 at 3:45 AM, E. Timothy Uy wrote: > http://system.data.sqlite.org/index.html/artifact/9a65aebbcf2379f3 > > Hmm, yes, I

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread Richard Hipp
Tnx for email. I'm in a meeting. Reply later. On 2/12/15, Cal Leeming wrote: > Thanks for the quick reply, appreciated. > > I've been having a problem where iterdump() is exporting in a format > which is unsuitable for MySQL, although it previously appeared to be > corruption

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread justin
On 2015-02-12 13:40, Richard Hipp wrote: On 2/12/15, Cal Leeming wrote: Also, I'd like to +1 having this project on some sort of social collab platform, be it github, bitbucket etc. It would make external contributions much easier, as I nearly gave up trying to report this issue

[sqlite] sqlite shell .import drops last cell if too less columns

2015-02-12 Thread udo . liess
Hi, here comes a bug report with fix proposal. If a CSV file contains a row with missing column, the previous cell will not be imported. Tested version: sqlite-shell-win32-x86-3080802.zip, sqlite-autoconf-3080802.tar.gz Steps to reproduce: - A file named data.csv with following content:

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread Cal Leeming
Thanks for the quick reply, appreciated. I've been having a problem where iterdump() is exporting in a format which is unsuitable for MySQL, although it previously appeared to be corruption (hence the previous comment of seriousness), it does actually appear to be documented incompatibility.

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread Stephan Beal
On Thu, Feb 12, 2015 at 2:45 PM, wrote: > And yeah, I'm aware of fossil, but (to my thinking ;>) that shouldn't hold > back _this_ bit of software. ;) > FWIW, fossil was/is designed _specifically_ for sqlite's hosting (that's neither a joke nor an exaggeration), so it's

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread justin
On 2015-02-12 14:00, Stephan Beal wrote: On Thu, Feb 12, 2015 at 2:45 PM, wrote: And yeah, I'm aware of fossil, but (to my thinking ;>) that shouldn't hold back _this_ bit of software. ;) FWIW, fossil was/is designed _specifically_ for sqlite's hosting (that's

[sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Jens Miltner
Hi, I'm getting the following two warnings when compiling sqlite3.c with the latest clang tools: > sqlite3.c:116769:39: warning: code will never be executed [-Wunreachable-code] > if( pTerm->wtFlags & TERM_VNULL ) continue; > ^~~~ >

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Dan Kennedy
On 02/12/2015 09:02 PM, Jens Miltner wrote: Hi, I'm getting the following two warnings when compiling sqlite3.c with the latest clang tools: sqlite3.c:116769:39: warning: code will never be executed [-Wunreachable-code] if( pTerm->wtFlags & TERM_VNULL ) continue;

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Richard Hipp
Dan is right. I think I'd calling this a clang bug. On Feb 12, 2015 9:06 AM, "Dan Kennedy" wrote: > On 02/12/2015 09:02 PM, Jens Miltner wrote: > >> Hi, >> >> I'm getting the following two warnings when compiling sqlite3.c with the >> latest clang tools: >> >>

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Doug Currie
Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't call it a compiler bug. e On Thu, Feb 12, 2015 at 9:26 AM, Richard Hipp wrote: > Dan is right. I think I'd calling this a clang bug. > On Feb 12, 2015 9:06 AM, "Dan Kennedy"

Re: [sqlite] sqlite3 mailing list broken

2015-02-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/12/2015 05:15 AM, Cal Leeming wrote: > I've been having a problem where iterdump() is exporting in a > format which is unsuitable for MySQL, iterdump is part of pysqlite, and has no code from the official SQLite project. iterdump itself is

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread R.Smith
On 2/12/2015 4:58 PM, Doug Currie wrote: Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't call it a compiler bug. e The point is that TERM_VNULL is controlled by a compiler pre-processor switch and is only unreachable for specific values of that switch - hence if

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Doug Currie
On Thu, Feb 12, 2015 at 1:35 PM, R.Smith wrote: > > Now one could argue the warning should not be issued for it, or some > warnings are fine as information. Personally I prefer zero unneeded > warnings/clutter but that's just my pedantism. > My pedantism is to prefer the

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread R.Smith
On 2/12/2015 8:50 PM, Doug Currie wrote: On Thu, Feb 12, 2015 at 1:35 PM, R.Smith wrote: Now one could argue the warning should not be issued for it, or some warnings are fine as information. Personally I prefer zero unneeded warnings/clutter but that's just my pedantism.

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Tim Streater
On 12 Feb 2015 at 19:14, R.Smith wrote: > On 2/12/2015 8:50 PM, Doug Currie wrote: >> It's easy enough to fix if you want 0 to be a valid value for TERM_VNULL: >> >> #if TERM_VNULL >> if( pTerm->wtFlags & TERM_VNULL ) continue; >> #endif > > Agreed, but how easy it is to

Re: [sqlite] Porting SQLite to another operating system (not supported out of the box)

2015-02-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/10/2015 07:03 PM, Jay Kreibich wrote: > ... VFS is unlikely to make the cut. ... similar things about the > xBestIndex() and xFilter() functions I haven't read the book, but one thing that may help is not using C for these. I think it is

[sqlite] sqlite journal file question

2015-02-12 Thread Mayank Kumar (mayankum)
Hi All We have two systems which are running in active/standby configuration. The active machine, is actively writing sqlite transactions to a file abcd.db. The standby is syncing the abcd.db file from the active machine on a communication channel and writing the delta records to the

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Paul Sanderson
I would say no. The journal file stores pages referenced by page no and when replayed will write those pages back to the main DB at the appropriate physical offset. Although the content of your DB's at a logical level may be the same, it is unlikely that they will be exact copies at a binary level

Re: [sqlite] sqlite journal file question

2015-02-12 Thread R.Smith
I don't think it can be done, and if it could be done, it would not be wise. The journal is owned and specific to a connection. a hot Journal for connection A on DB 1 cannot ever be used to roll back or affect in any way connection B on DB 2. However, when you say the "standby is syncing", I

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Eric Minbiole
> If the statement will never be executed the compiler should simply optimise > it away. No warning is necessary unless you turn on some flag that highlights > such optimisations. Per the original post, I believe that the warning was expressly enabled using the [-Wunreachable-code] compiler

Re: [sqlite] sqlite journal file question

2015-02-12 Thread Richard Hipp
On 2/12/15, Mayank Kumar (mayankum) wrote: > Hi All > > We have two systems which are running in active/standby configuration. The > active machine, is actively writing sqlite transactions to a file abcd.db. > The standby is syncing the abcd.db file from the active machine

Re: [sqlite] Porting SQLite to another operating system (not supported out of the box)

2015-02-12 Thread J Decker
this contains a very basic vfs implementation; kinda uses internal file abstraction stuff so a lot can be stripped out and replaced with fopen/fread/etc... https://code.google.com/p/c-system-abstraction-component-gui/source/browse/src/sqlite/sqlite_interface.c maybe it's more cryptic than I

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Dominique Devienne
On Thu, Feb 12, 2015 at 8:39 PM, Tim Streater wrote: > On 12 Feb 2015 at 19:14, R.Smith wrote: > > On 2/12/2015 8:50 PM, Doug Currie wrote: > >> It's easy enough to fix if you want 0 to be a valid value for > TERM_VNULL: > >> > >> #if TERM_VNULL > >>