Re: [sqlite] SQLite with Entity Framework problem

2014-05-06 Thread Joe Mistachkin
Christiano Borchardt wrote: > > My SQL server has a table with a primary key of type smallint which is an > identity column. This is the AUTOINCREMENT equivalent on SQLite. However > AUTOINCREMENT in SQlite only allows the Integer type. > When the entity framework loads the entity for this table

Re: [sqlite] transactions do not respect delete

2014-05-06 Thread Jim Carroll
> Date: Tue, 6 May 2014 14:57:30 +0200 > From: Mark Lawrence > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] transactions do not respect delete > Message-ID: <20140506125730.ga23...@rekudos.net> > Content-Type: text/plain; charset=us-ascii > > > It would appear the DELETE

[sqlite] SQLite with Entity Framework problem

2014-05-06 Thread Christiano Borchardt
Hi there, We have a system which uses SQL server as a primary database. We are thinking about replacing the entity framework provider so we can use SQLite in-memory for integration tests. I have done few tests and generally System.Data.SQlite works fine. The only exception I have so far is: My

Re: [sqlite] Bug in division?

2014-05-06 Thread Jay Kreibich
On May 6, 2014, at 5:26 PM, Gene Connor wrote: > Subject: Re: [sqlite] Bug in division? > From: j...@kreibi.ch > Date: Tue, 6 May 2014 17:02:02 -0500 > CC: neothreeei...@hotmail.com > To: sqlite-users@sqlite.org > > > The system does not return 0 any time you divide

Re: [sqlite] Bug in division?

2014-05-06 Thread Jay Kreibich
On May 6, 2014, at 4:29 PM, John Drescher wrote: >> Interesting. It makes NO sense to return 0 when dividing two integers. >> > > Never took a C/C++ class? The system does not return 0 any time you divide two integers, but it does return zero for 2 / 4. After all,

Re: [sqlite] Is there a single file version of System.Data.SQLite?

2014-05-06 Thread Joe Mistachkin
Drago, William @ MWG - NARDAEAST wrote: > > Is there a way to use the "System.Data.SQLite.dll" mixed-mode assembly outside > of the GAC? Or is there a 32 bit only single file version of SQLite? > Sure, you should be able to load the mixed-mode assembly from an arbitrary location using the

[sqlite] LSM Leaks memory

2014-05-06 Thread sqlite
I have this trivial program: int main(int argc, char **argv) { lsm_db* db; lsm_new(lsm_default_env(), ); lsm_open(db, "lsm"); lsm_cursor *csr; lsm_csr_open(db, ); lsm_csr_seek(csr, "a", 1, LSM_SEEK_GE); lsm_csr_seek(csr, "a", 1,

Re: [sqlite] FW: Bug in division?

2014-05-06 Thread John Drescher
> Interesting. It makes NO sense to return 0 when dividing two integers. > Never took a C/C++ class? John ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Foreign Key errors

2014-05-06 Thread Stephan Beal
On Tue, May 6, 2014 at 11:24 PM, Petite Abeille wrote: > On May 6, 2014, at 11:17 PM, Richard Hipp wrote: > > > It is theoretically possible to keep track of which constraints are > failing > > so that the particular constraint can be identified in the

Re: [sqlite] Foreign Key errors

2014-05-06 Thread Petite Abeille
On May 6, 2014, at 11:17 PM, Richard Hipp wrote: > It is theoretically possible to keep track of which constraints are failing > so that the particular constraint can be identified in the error message. > But that woudl require more memory and CPU cycles. That would be

Re: [sqlite] Foreign Key errors

2014-05-06 Thread Richard Hipp
On Tue, May 6, 2014 at 5:12 PM, Peter Haworth wrote: > It seems that foreign key errors on columns where the foreign key > definition has a constraint name don't include the constraint name in the > error message. This is using sqlite version 3.8.3.1. > > Is this under the

[sqlite] Is there a single file version of System.Data.SQLite?

2014-05-06 Thread Drago, William @ MWG - NARDAEAST
All, Is there a way to use the "System.Data.SQLite.dll" mixed-mode assembly outside of the GAC? Or is there a 32 bit only single file version of SQLite? I'm running a 32 bit, non-managed code interpreted language that can't find the SQLite.Interop.dll files if I start my program from a

[sqlite] Foreign Key errors

2014-05-06 Thread Peter Haworth
It seems that foreign key errors on columns where the foreign key definition has a constraint name don't include the constraint name in the error message. This is using sqlite version 3.8.3.1. Is this under the control of a compile switch or PRAGMA or am I stuck with the way it is? Pete

[sqlite] group_concat(distinct) with empty strings

2014-05-06 Thread Hinrichsen, John
Are the results below expected? $ sqlite3 SQLite version 3.8.4.3 2014-04-03 16:53:12 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE z AS SELECT NULL AS a; sqlite> SELECT (SELECT DISTINCT

Re: [sqlite] NOP INSERT still writes to the DB/journal

2014-05-06 Thread Christian Smith
On Mon, May 05, 2014 at 05:00:08PM -0400, Richard Hipp wrote: > On Mon, May 5, 2014 at 4:53 PM, Patrick Donnelly wrote: > > > Hi, > > > > I have an INSERT that looks like > > > > INSERT INTO T > > SELECT ... > > > > which I'm running numerous times a second that

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-06 Thread Igor Tandetnik
On 5/6/2014 10:19 AM, Woody Wu wrote: I observed a strange behavior. I was operating on a big table, there are 200,000 records in it. The table has a primary key or unique index, (time, id1, id2), all of these indexed columns are integers. The following query statement executed very slow, it

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-06 Thread Clemens Ladisch
Woody Wu wrote: > The following query statement executed very slow, it took 15 secs on my ARM > device, > > 1. select max(time) from mytable where time < and id1 = k1 and id2 = > n. > > However, if I replace k1with another value that can be found in the table and > keep everything

[sqlite] Graphic User Interface to browse Sqlite, written in pure Python

2014-05-06 Thread big stone
Hello, I failed to find a basic but correct Graphic User Interface program for Sqlite in pure Python 3, with a liberal licence. ==> Did anyone know of something I may have missed ? As I don't have great goals, I started to build a small one. I'm posting it there in hope : - it can be of

[sqlite] Very slow when query max(col) on empty set?

2014-05-06 Thread Woody Wu
I observed a strange behavior. I was operating on a big table, there are 200,000 records in it. The table has a primary key or unique index, (time, id1, id2), all of these indexed columns are integers. The following query statement executed very slow, it took 15 secs on my ARM device, 1.

Re: [sqlite] Bug in division?

2014-05-06 Thread Simon Slavin
On 6 May 2014, at 1:52pm, RSmith wrote: > I think the OP might be seeing the list via one of those connected sites and > not getting the feedback. Maybe send a direct mail to him. I'll send a personal email to him. Simon. ___

Re: [sqlite] transactions do not respect delete

2014-05-06 Thread Dominique Devienne
On Tue, May 6, 2014 at 2:59 PM, Clemens Ladisch wrote: > With the COMMIT, you told the database that the transaction succeeded > (which means that the effects of all successful statements are saved > permanently.) If you want the transaction to fail, execute ROLLBACK >

Re: [sqlite] transactions do not respect delete

2014-05-06 Thread Clemens Ladisch
Jim Carroll wrote: > BEGIN; > DELETE FROM A; > INSERT INTO A VALUES(1, "goodbye"); > INSERT INTO A VALUES(1, "world");-- fails > COMMIT; > > It would appear the DELETE was successful, and the first INSERT was > successful. But when the second INSERT failed (as it was intended

Re: [sqlite] transactions do not respect delete

2014-05-06 Thread Mark Lawrence
> It would appear the DELETE was successful, and the first INSERT was > successful. But when the second INSERT failed (as it was intended to)..it > did not ROLLBACK the database. Even though the second INSERT fails, your script still calls COMMIT on an open transaction in which the DELETE and

Re: [sqlite] transactions do not respect delete

2014-05-06 Thread Dominique Devienne
On Tue, May 6, 2014 at 2:31 PM, Jim Carroll wrote: > > CREATE TABLE A(id INT PRIMARY KEY, val TEXT); > INSERT INTO A VALUES(1, "hello"); > BEGIN; > DELETE FROM A; > INSERT INTO A VALUES(1, "goodbye"); > INSERT INTO A VALUES(1, "world"); > COMMIT; Sounds like you

Re: [sqlite] FW: Bug in division?

2014-05-06 Thread RSmith
I think the OP might be seeing the list via one of those connected sites and not getting the feedback. Maybe send a direct mail to him. On 2014/05/06 14:48, John Drescher wrote: Any reason I haven't heard back about this bug? You did not get the rest of the discussion on your post? It is not

Re: [sqlite] FW: Bug in division?

2014-05-06 Thread John Drescher
> Any reason I haven't heard back about this bug? You did not get the rest of the discussion on your post? It is not a bug but an implementation allowed behavior and has to do with integer division. John ___ sqlite-users mailing list

Re: [sqlite] Bug in division?

2014-05-06 Thread Simon Slavin
On 6 May 2014, at 2:06am, Gene Connor wrote: > SELECT DISTINCT 2/4 AS RESULT FROM TABLE; > returns 0 Not a bug. By providing two integer operands you have asked for integer arithmetic, and will get an integer answer. It's something that happens in several

[sqlite] FW: Bug in division?

2014-05-06 Thread Gene Connor
Any reason I haven't heard back about this bug? Thanks _ From: Gene Connor [mailto:neothreeei...@hotmail.com] Sent: Wednesday, April 30, 2014 12:21 AM To: sqlite-users@sqlite.org Subject: Bug in division? SELECT DISTINCT 2/4 AS RESULT FROM TABLE; returns 0 SELECT DISTINCT 2/4.0 AS

[sqlite] transactions do not respect delete

2014-05-06 Thread Jim Carroll
I need to modify all the content in a table. So I wrap the modifications inside a transaction to ensure either all the operations succeed, or none do. I start the modifications with a DELETE statement, followed by INSERTs. What I've discovered is even if an INSERT fails, the DELETE has still