Re: [sqlite] Error 11 after doing a lot of simple insert/update operations!

2014-01-01 Thread Woody Wu
Does anyone have a clue? BTW, happy new year :) On Tuesday, 31 December 2013, Woody Wu wrote: > Hi, Simon > > I upload the source code onto my dropbox: > https://www.dropbox.com/s/9shhshi0wn3e717/downloadfile.c Please have a > look at it. > > The same test program run without a problem on my p

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread Simon Slavin
On 1 Jan 2014, at 9:55pm, James K. Lowden wrote: > sqlite> update i set i = random(); Yeah. You have to do it properly. Mark the rows which will be obsoleted, make up the new rows, and check the resulting union for consistency. Which means that you need to temporarily have enough mem

Re: [sqlite] SQLite 2013 retrospective

2014-01-01 Thread Nico Williams
On Tue, Dec 31, 2013 at 10:37 AM, Richard Hipp wrote: > New tested and supported extensions added to the source tree: > >2. The transitive_closure virtual table: > www.sqlite.org/src/artifact/6360243 Funny you should mention this. I've written transitive closure computations using pure SQL

Re: [sqlite] SQLite 2013 retrospective

2014-01-01 Thread Constantine Yannakopoulos
If I may: On Thu, Jan 2, 2014 at 12:59 AM, Petite Abeille wrote: > Wish list for the new year :)) > > - information schema [1] > - merge statement [2] > - with clause [3][4] > - analytic functions [5][6] > - More informative error messages for FK violations. I consider this the only unworkaround

Re: [sqlite] SQLite 2013 retrospective

2014-01-01 Thread Petite Abeille
On Dec 31, 2013, at 5:37 PM, Richard Hipp wrote: > In addition to the above, there are countless new test cases and minor > feature and performance enhancements. Thank you so much for for all the hard work :) > Our goal is to maintain this aggressive pace of innovation and enhancement > in SQL

Re: [sqlite] Hook / Trigger for Primary Key / Unique Error

2014-01-01 Thread Petite Abeille
On Dec 30, 2013, at 1:48 PM, Richard Hipp wrote: > One example: > > sqlite3_exec("INSERT OR IGNORE INTO ;"); > if( sqlite3_changes()==0 ){ > sqlite3_exec("UPDATE ..."); > } This is rather error prone and may results in, well, unexpected results. How to lose your data in two easy

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread Petite Abeille
On Jan 1, 2014, at 10:55 PM, James K. Lowden wrote: >> CTE ... bring capabilities to the users, by simplifying >> the use of the underlying tool. > > CTEs would add complexity, not simplify. Nonsense, dear Sir :) Yes, a ‘with’ clause is just syntax sugar providing named subqueries. But this

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread James K. Lowden
On Wed, 1 Jan 2014 11:04:57 +0100 big stone wrote: > You're right : > *"*CTEs ... add exactly zero to SQLite's capability." > > This is also right : > "C Language ... add exactly zero to Intel X86 processor capability". Dennis Ritchie said C is an idealized assembler over an idealized machine.

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread James K. Lowden
On Tue, 31 Dec 2013 22:20:15 + Simon Slavin wrote: > > Meanwhile, here's a much more important failing that cannot be > > worked around within SQL without a temporary table: > > > > sqlite> create table i ( i int primary key ); > > sqlite> insert into i values (1); > > sqlite> in

Re: [sqlite] explain me EXPLAIN and EXPLAIN QUERY PLAN

2014-01-01 Thread Simon Slavin
On 1 Jan 2014, at 4:58pm, Giuseppe Costanzi wrote: > where I can find a good documentation, of keywords in object? > I would want to learn well meaning and use of opcode, p1, p2, pn ,comment > and order,from,detail... > > I don't succeed in understanding the output of these two keywordses. > wi

Re: [sqlite] explain me EXPLAIN and EXPLAIN QUERY PLAN

2014-01-01 Thread Igor Tandetnik
On 1/1/2014 11:58 AM, Giuseppe Costanzi wrote: where I can find a good documentation, of keywords in object? I would want to learn well meaning and use of opcode, p1, p2, pn ,comment and order,from,detail... For EXPLAIN, see http://sqlite.org/vdbe.html http://sqlite.org/opcode.html The outp

[sqlite] explain me EXPLAIN and EXPLAIN QUERY PLAN

2014-01-01 Thread Giuseppe Costanzi
hi, where I can find a good documentation, of keywords in object? I would want to learn well meaning and use of opcode, p1, p2, pn ,comment and order,from,detail... I don't succeed in understanding the output of these two keywordses. wishes and good year to everybody. beppe _

Re: [sqlite] SQLite3 temporary filename collision in worker processes

2014-01-01 Thread Dan Kennedy
On 12/31/2013 09:25 PM, Török Edwin wrote: Hi, I am using SQLite 3.8.1 compiled from the amalgamation on Debian GNU/Linux "wheezy", amd64. I have set a logging callback with sqlite3_config(SQLITE_CONFIG_LOG, qlog, NULL), and I see the following error sometimes: Query "INSERT INTO topush (bloc

Re: [sqlite] SQLite disk I/O error

2014-01-01 Thread Richard Hipp
On Wed, Jan 1, 2014 at 10:06 AM, Tal Tabakman wrote: > Hi Richard, > > per your reply (attached below) > > we are printing the last error message using sqlite_errmsg ... is it > enough ? > > anyway, the errors varies > > for example once I got an error when inserting to a table and then I > got th

Re: [sqlite] SQLite disk I/O error

2014-01-01 Thread Tal Tabakman
Hi Richard, per your reply (attached below) we are printing the last error message using sqlite_errmsg ... is it enough ? anyway, the errors varies for example once I got an error when inserting to a table and then I got this for example: "Could no execute SQL statement: PRAGMA synchronous = 0

Re: [sqlite] Android SQLite 3.8.2 issue with triggers & constraints

2014-01-01 Thread Dan Kennedy
On 12/31/2013 10:03 PM, Douglas Orr wrote: Hi, I have run into an issue when trying to use triggers with column constraints on Android (using our build of SQLite 3.8.2, not Android's built-in version from native code.) Executing the following on a file-backed database fails: CREATE TABLE thin

Re: [sqlite] SQLite disk I/O error

2014-01-01 Thread Richard Hipp
On Wed, Jan 1, 2014 at 8:19 AM, Tal Tabakman wrote: > Hi guys > what is the reason for getting errors of type "SQLite disk I/O error" when > doing operation like insert on sqlite DB. > Could be a lot of things. Depends on what you are doing, what system you are running on, etc. Can you enable

[sqlite] SQLite disk I/O error

2014-01-01 Thread Tal Tabakman
Hi guys what is the reason for getting errors of type "SQLite disk I/O error" when doing operation like insert on sqlite DB. seems like that the work dir in which I generate the DB has more space in it. any advice will be appreciated, ___ sqlite-users m

[sqlite] Android SQLite 3.8.2 issue with triggers & constraints

2014-01-01 Thread Douglas Orr
Hi, I have run into an issue when trying to use triggers with column constraints on Android (using our build of SQLite 3.8.2, not Android's built-in version from native code.) Executing the following on a file-backed database fails: CREATE TABLE things (number INTEGER NOT NULL); CREATE TRIGGER

Re: [sqlite] SQLite 2013 retrospective

2014-01-01 Thread Niall O'Reilly
At Tue, 31 Dec 2013 11:37:05 -0500, Richard Hipp wrote: > > In addition to the above, there are countless new test cases and minor > feature and performance enhancements. > > Our goal is to maintain this aggressive pace of innovation and enhancement > in SQLite throughout 2014 and beyond.

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread RSmith
You're right : *"*CTEs ... add exactly zero to SQLite's capability." This is also right : "C Language ... add exactly zero to Intel X86 processor capability". In both case : - "adding zero capability" to the underlying tool is a physical constraint, - CTE (or C Language) bring capabilities to

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread Constantine Yannakopoulos
On Tue, Dec 31, 2013 at 8:59 PM, James K. Lowden wrote: > Recursive queries are a unique feature of CTEs. They are not supported > in SQLite. If and when they are, CTEs will be required. > Not necessarily. Oracle has had the START WITH CONNECT BY syntax for recursive queries since the eighties:

Re: [sqlite] [sqlite-dev] sqlite3 db is locked

2014-01-01 Thread Simon Slavin
On 1 Jan 2014, at 7:43am, Alexander Syvak wrote: > The code in function from the 1st e-mail is used before exiting, so the > sqlite3_close is called in fact. Please do not cross-post between sqlite-dev@ and sqlite@. If you need to move from one to the other, start a new thread. I can't find

Re: [sqlite] "Common Table Expression"

2014-01-01 Thread big stone
Hi James K. Lowden, You're right : *"*CTEs ... add exactly zero to SQLite's capability." This is also right : "C Language ... add exactly zero to Intel X86 processor capability". In both case : - "adding zero capability" to the underlying tool is a physical constraint, - CTE (or C Language) brin

Re: [sqlite] Happy New Year

2014-01-01 Thread Mohit Sindhwani
On 1/1/2014 8:46 AM, Igor Korot wrote: Hi, ALL, I want to wish everybody who is reading and involved with the list Happy and oyful New Year! Let's have a great time in it and lets make a lot of good products and new releases with the software that everybody involve with. Thank you. Indeed! Ha