Re: [sqlite] How to find out which row had been modified by an UPDATE statement?

2009-12-18 Thread Robert Citek
On Thu, Dec 17, 2009 at 12:05 PM, Martin Kirsche wrote: > is it possible in SQLite to find out which row had been modified by an > UPDATE statement? Not automatically. You would have to track it yourself with some code like this: sqlite> create temporary table

Re: [sqlite] How to find out which row had been modified by an UPDATE statement?

2009-12-18 Thread Robert Citek
On Thu, Dec 17, 2009 at 1:43 PM, P Kishor wrote: > On Thu, Dec 17, 2009 at 11:05 AM, Martin Kirsche > wrote: >> Hi, >> is it possible in SQLite to find out which row had been modified by an >> UPDATE statement? > > just SELECT with the same params

Re: [sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Igor Tandetnik
Alexey Pechnikov wrote: > On Friday 18 December 2009 16:22:47 Igor Tandetnik wrote: >> From http://www.sqlite.org/c3ref/get_auxdata.html : >> >> "SQLite is free to call the destructor and drop metadata on any parameter of >> any function at any time. The only guarantee is >> that the destructor

Re: [sqlite] is this a bug?

2009-12-18 Thread Jay A. Kreibich
On Fri, Dec 18, 2009 at 07:23:24PM -0700, Valerio Aimale scratched on the wall: > Hello all, > > I've run into an interesting situation; when duplicating parenthesis > around a 'in ()' subquery, only the first row is returned. > Why only one value returned when parenthesis are duplicated?

Re: [sqlite] is this a bug?

2009-12-18 Thread Virgilio Alexandre Fornazin
It´s good to try to reproduce all conditions that this problem happens, to help with creating test-cases and with bug fix. []'s -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of P Kishor Sent: sábado, 19 de dezembro de 2009

Re: [sqlite] is this a bug?

2009-12-18 Thread P Kishor
On Fri, Dec 18, 2009 at 8:23 PM, Valerio Aimale wrote: > Hello all, > > I've run into an interesting situation; when duplicating parenthesis > around a 'in ()' subquery, only the first row is returned. > > This is not my real-life query, but a test that replicates the problem.

Re: [sqlite] is this a bug?

2009-12-18 Thread Virgilio Alexandre Fornazin
This is probably a bug in SQL parser, that doesn't reduced to one parenthesis, causing the side effect in VDBE engine, that doesn't returned all ID´s to IN evaluator in first select. This should be easily reproduced, but the fix you must wait for Richard or other that have knowledge on VDBE

[sqlite] is this a bug?

2009-12-18 Thread Valerio Aimale
Hello all, I've run into an interesting situation; when duplicating parenthesis around a 'in ()' subquery, only the first row is returned. This is not my real-life query, but a test that replicates the problem. Thanks, Valerio $ sqlite3 --version 3.6.16 prepare some dummy data: create

Re: [sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Alexey Pechnikov
Hello! Ok, I did realize this. Is my variant the best solution or I can enhance it? static void distinctonFunc( sqlite3_context *pCtx, /* Function context */ int nArg,/* Number of function arguments */ sqlite3_value **argv /* Values for all function arguments */ ){

Re: [sqlite] Corrupted database (image is malformed): always the same size

2009-12-18 Thread Max Vlasov
On Fri, Dec 18, 2009 at 6:27 PM, Gianandrea Gobbo wrote: > I'm using sqlite (2.8) on an embedded product, running a Linux kernel. > I'm experiencing sometimes a database corruption, and listing some > tables contents gets me a "SQL error: database disk image is malformed". > Ok,

Re: [sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Alexey Pechnikov
Hello! On Friday 18 December 2009 16:22:47 Igor Tandetnik wrote: > From http://www.sqlite.org/c3ref/get_auxdata.html : > > "SQLite is free to call the destructor and drop metadata on any parameter of > any function at any time. The only guarantee is that the destructor will be > called before

Re: [sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Alexey Pechnikov
Hello! On Friday 18 December 2009 16:22:47 Igor Tandetnik wrote: > From http://www.sqlite.org/c3ref/get_auxdata.html : > > "SQLite is free to call the destructor and drop metadata on any parameter of > any function at any time. The only guarantee is that the destructor will be > called before

[sqlite] Sqliteconnection.close() bug

2009-12-18 Thread Zafer Ergül
i develop an app with c# i have a 81 database file. I can connect easly all off them and search but i want to check the path so i put a button this is check db paths and it is just connect and close. There is no problem but in the folder when the connection closed , created a file which is

Re: [sqlite] Corrupted database (image is malformed): always the same size

2009-12-18 Thread Simon Slavin
On 18 Dec 2009, at 3:27pm, Gianandrea Gobbo wrote: > I'm using sqlite (2.8) on an embedded product, running a Linux kernel. > I'm experiencing sometimes a database corruption, and listing some > tables contents gets me a "SQL error: database disk image is malformed". > Ok, there can be many

[sqlite] FTS3 performance rowid vs docid

2009-12-18 Thread Eric Grange
Hello All, Using 3.6.21 and FTS3, I've noticed than when doing search queries, using docid as in select fts.docid from fts where fts.content match "la" the search is much slower than when using rowid as in select fts.rowid from fts where fts.content match "la" Isn't docid supposed to

[sqlite] Corrupted database (image is malformed): always the same size

2009-12-18 Thread Gianandrea Gobbo
I'm using sqlite (2.8) on an embedded product, running a Linux kernel. I'm experiencing sometimes a database corruption, and listing some tables contents gets me a "SQL error: database disk image is malformed". Ok, there can be many reasons for this, but the strange thing that puzzles me is that

Re: [sqlite] usage of indexes - query performance

2009-12-18 Thread Pavel Ivanov
As you said because of your LEFT JOIN SQLite (or any other DBMS in its place) is forced to use t2 as a base table. You have no conditions on t2, so SQLite will make full scan on it and for each row it will need to pick up a corresponding rows from t1 which it does using primary index. And FYI, by

Re: [sqlite] valgrind report (uninitialized byte) while committing large transaction

2009-12-18 Thread Dan Kennedy
On Dec 17, 2009, at 2:35 AM, Vincent Cridlig wrote: > Hi, > > > > I am seeing the valgrind error below using sqlite 3.6.18. It seems > to always > happens while committing a transaction having 100 INSERT(s). all > INSERT are > done in one single table. > > Is this a known issue? At first

Re: [sqlite] custom fts3 tokenizer, used in read-only?

2009-12-18 Thread Dan Kennedy
On Dec 17, 2009, at 3:08 AM, Nick Hodapp wrote: > > Ah, Thanks. That makes sense. > > My tokenizer extracts text-node values from XHTML content and > delegates the > tokenizing of each node value to the Porter tokenizer. Since the > RHS of the > MATCH operator will never be XHTML, I should

Re: [sqlite] BUG: FTS3 in 3.6.21

2009-12-18 Thread Dan Kennedy
My apologies to the list if this is a dup. I think this message was dropped the first time I sent it. > >> Hello! >> > > >> sqlite> select count(*) from file_text where file_text match >> 'content:мтс-коннект'; >> 162 >> sqlite> select count(*) from file_text where file_text match >>

Re: [sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Igor Tandetnik
Alexey Pechnikov wrote: > But the result is strange: > > sqlite> select value=0,counter(0),counter(value=0) from state; > 0|0|0 > 0|1|0 > 0|2|0 > 0|3|0 > > Of course I need to get the result of counter(value==0) equal to counter(0). > The result of "value=0" is always 0 and so counter(value=0)

[sqlite] Problem with sqlite3_get_auxdata

2009-12-18 Thread Alexey Pechnikov
Hello! I'm using the function from SQLite tests: static void counterFunc( sqlite3_context *pCtx, /* Function context */ int nArg,/* Number of function arguments */ sqlite3_value **argv /* Values for all function arguments */ ){ int i; int *pCounter; pCounter =

[sqlite] pragma database_list

2009-12-18 Thread Angelo
Pavel and Jay, I did as you suggested and it works perfectly. THANK YOU VERY MUCH for the usefull help ! Bye Angelo ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error in retreiving DATETIME('NOW')

2009-12-18 Thread greensparker
k thanks expertz Pavel Ivanov-2 wrote: > >> but i want to use my localtime as default time in sqlite(without giving >> 'localtime'). is it possible? > > No. And documentation clearly says about that. > > > Pavel > > On Thu, Dec 17, 2009 at 11:08 AM, greensparker >

[sqlite] usage of indexes - query performance

2009-12-18 Thread Jens Miltner
Hi everybody, consider the following database schema: CREATE TABLE t1 ( id INTEGER PRIMARY KEY, uid, x ); CREATE INDEX t1_idx ON t1(uid); CREATE TABLE t2 ( id INTEGER PRIMARY KEY, t1_id INTEGER, y ); CREATE INDEX t2_idx ON t2(t1_id); Shouldn't