[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Tim Streater
On 10 May 2016 at 22:29, Steve Schow wrote: > I would like to understand this issue a little bit better? > On May 10, 2016, at 2:31 PM, Richard Hipp wrote: >> >> In unix, SQLite has to use global variables to work around the >> well-known design bugs in posix advisory locks. And so if you

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Roger Binns
-- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20160510/8d7552f7/attachment.pgp>

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
sorry that is LISTDLLS no ' or space ... and not singular. On Tue, May 10, 2016 at 7:02 PM, J Decker wrote: > In general... > > while sqlite tool in question is running one could run listdll's in an > admin console window and see... listdll takes a executable name to > filter its list... > >

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
In general... while sqlite tool in question is running one could run listdll's in an admin console window and see... listdll takes a executable name to filter its list... maybe you have another compatible one in the path it's finding? Because it's not Any CPU.

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Andrey Gorbachev
Hi, Microsoft Excel allows custom "Addins", which are all run in the same process space. We use Bloomberg Excel Addin, which uses SQLite 3.7.x and we have no control over what version of SQLite they use. We have our own Addin which uses SQLite 3.11.x and we do not want to use the same version

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Richard Hipp
On Tue, 10 May 2016 22:47 +0100, Tim Streater wrote: > > I read it as two different *copies*. It doesn't sound to me as if the > versions have anything to do with it. > Correct. Two different *copies*of the library. They can both have the same version number - that doesn't matter. -- D.

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Simon Slavin
On 10 May 2016, at 4:56pm, Jeremy Nicoll wrote: > That suggests to me that sqldiff & sqlite3 only use a small fraction of > the code present in > a DLL, and the link only includes those functions in the resulting .exe. Correct. The SQLite tools do not use a DLL. They have the SQLite

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Jeremy Nicoll
On Tue, 10 May 2016, at 16:26, Scott Robison wrote: > I believe the tools provided by the site statically like SQLite so no DLL > is required. The DLL is provided as a courtesy to those who do not want > to link their own apps statically. > > Not near a computer to confirm this, but I know for a

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Richard Hipp
On 5/10/16, Andrey Gorbachev wrote: > Hi, > > Microsoft Excel allows custom "Addins", which are all run in the same > process space. We use Bloomberg Excel Addin, which uses SQLite 3.7.x and we > have no control over what version of SQLite they use. We have our own Addin > which uses SQLite

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Jeremy Nicoll
On Tue, 10 May 2016, at 14:45, J Decker wrote: > On Tue, May 10, 2016 at 2:23 AM, Jeremy Nicoll > > I was under the impression that I'm using the 64-bit DLL on a W8.1 > > 64-bit system, with the 32-bit tools. Does that mean that there's > > some clever trick in the tools to make that work? >

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Steve Schow
I would like to understand this issue a little bit better? On May 10, 2016, at 2:31 PM, Richard Hipp wrote: > > In unix, SQLite has to use global variables to work around the > well-known design bugs in posix advisory locks. And so if you have > two different instances of SQLite running on

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
Thanks. That's helpful. "Last visited" would explain that query. But now a new puzzle: > select col1, col2 from table group by col2 > is identical to select col1, distinct col2 from table The SELECT railroad diagram does not allow DISTINCT in that position, only right after SELECT? Should that

[sqlite] 2 different SQLite versions inside the same process space

2016-05-10 Thread Scott Hess
IF you have two different versions of SQLite linked into the same executable, both accessing the same database, then the problem that the globals work around can happen. It won't happen if different processes use different versions of SQLite (say two versions of the sqlite3 binary, or sqlite3

[sqlite] Count connections

2016-05-10 Thread Marco Silva
Hi, How do we know how many connections a database has ? Is it possible to query it using SQL ? Is there a simple command from the sqlite3 shell client ? -- Marco Arthur @ (M)arco Creatives

[sqlite] Count connections

2016-05-10 Thread Richard Hipp
On 5/10/16, Marco Silva wrote: > Hi, > > How do we know how many connections a database has ? Is it possible > to query it using SQL ? Is there a simple command from the sqlite3 > shell client ? > A "connection" to a database is an open file descriptor. Some operating systems have

[sqlite] Good way for CEIL, or is there a better way

2016-05-10 Thread Darren Duncan
On 2016-05-10 12:03 AM, Cecil Westerhof wrote: > But it looks like that the following is also acceptable: > ? > CAST(ROUND(100.0 * rank / outOf + 0.499) AS int) AS percentage > and it is a lot simpler. So probably I will go for this. That might seem simpler but on edge cases it would

[sqlite] Good way for CEIL, or is there a better way

2016-05-10 Thread Rowan Worth
On 10 May 2016 at 08:31, Darren Duncan wrote: > The Ceiling function is not that simple, unless you know that your rank > and outOf are always non-negative numbers. If they might be negative, you > would -1 rather than +1 when the result is negative. -- Darren Duncan > Yeah you can't always

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
> bounces at mailinglists.sqlite.org] On Behalf Of Keith Medcalf > Why are you using BOTH distinct and group by on the same column? You only > need one or the other. If you are redundantly redundant I would hope that > the optimizer makes redundant (as in gets rid of, for those that are not >

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
Can you point me to something in the docs? It actually isn't quite the same. Yes, I have discovered the Sqlite behaviour with aggregate functions. In Postgres and standard SQL it's an error -- the rule is that every column has to be in the GROUP BY if not used in the SELECT list or as input to

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Jeremy Nicoll
On Mon, 9 May 2016, at 15:48, jicman at barrioinvi.net wrote: > Well, I can not use the SQLite 64bit DLL in a 64bit environment with a > 32bit application. I was under the impression that I'm using the 64-bit DLL on a W8.1 64-bit system, with the 32-bit tools. Does that mean that there's soe

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
The interesting thing about this query is that you can drop any of DISTINCT, GROUP BY or ORDER BY and get the same result. But my question was not "how can I rewrite my query?". It was: how does Sqlite interpret this SQL, given that it's probably invalid? Andl generates code for both Sqlite and

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Scott Robison
On Tue, May 10, 2016 at 9:56 AM, Jeremy Nicoll < jn.ml.sqlu.725 at letterboxes.org> wrote: > On Tue, 10 May 2016, at 16:26, Scott Robison wrote: > > > I believe the tools provided by the site statically like SQLite so no DLL > > is required. The DLL is provided as a courtesy to those who do not

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread Scott Robison
On May 10, 2016 8:48 AM, "Jeremy Nicoll" wrote: > > On Tue, 10 May 2016, at 14:45, J Decker wrote: > > On Tue, May 10, 2016 at 2:23 AM, Jeremy Nicoll > > > > I was under the impression that I'm using the 64-bit DLL on a W8.1 > > > 64-bit system, with the 32-bit tools. Does that mean that there's

[sqlite] Good way for CEIL, or is there a better way

2016-05-10 Thread Cecil Westerhof
2016-05-10 2:31 GMT+02:00 Darren Duncan : > On 2016-05-09 4:24 AM, Cecil Westerhof wrote: > >> I need to have a CEIL function in SQLite. This is the way I implemented >> it: >> WITH percentage AS ( >> SELECT date >> , 100.0 * rank / outOf AS percentage >> , >> ??

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
On Tue, May 10, 2016 at 2:23 AM, Jeremy Nicoll wrote: > On Mon, 9 May 2016, at 15:48, jicman at barrioinvi.net wrote: > >> Well, I can not use the SQLite 64bit DLL in a 64bit environment with a >> 32bit application. > > I was under the impression that I'm using the 64-bit DLL on a W8.1 > 64-bit