Re: [sqlite] Issue on Windows 10 app

2017-04-20 Thread Rowan Worth
There's not enough information here to determine what the problem might be.
STOWED_EXCEPTION seems to be a microsoft crash dump artifact; I suspect
you'll need to somehow extract further exception details from that.

I'm not sure how to go about that exactly but here's some links to start
you off:

http://stackoverflow.com/questions/28412334/trying-to-
debug-windows-store-app-from-dump-files
https://blogs.msdn.microsoft.com/ntdebugging/2014/05/28/debugging-a-windows-8-1-store-app-crash-dump-part-2/

-Rowan


On 19 April 2017 at 15:53, Alejandro Vicente Milán <
alejandro.meteo...@gmail.com> wrote:

> Hello,
>
> I have an issue related to an app published on the Windows Store. The app
> which I'm talking about is Weather 14 days.
>
> What occurs is the following. We published some days ago an update of our
> app in the Windows Store, version 3.2.8.0, on 6th April. Since that, the
> problem we have is that, inside Developer Dashboard, on Weather 14 days ->
> Analytics -> Health, we're receiving a lot of weird errors related to
> SQLite, with an average of 300.000-400.000 errors/day.
>
> The SQLite which we're using is "SQLite for Universal Windows Platform"
> version 3.17.0.
>
> The error is the following:
>
> STOWED_EXCEPTION_SQLite.Net.SQLiteException_80131500_
> tiempocom.dll!$26_SQLite::Net::Platform::WinRT::SQLiteApiWinRT.Prepare2
>
> Since the update, the error appears 3.800.864 times in the moment that i'm
> writing this email.
>
> We have no idea about the error, also we couldn't find any information
> about it, so please if you could tell us what it's happening, we'll very
> grateful.
>
> Also I attach on the email some pictures where the error can be seen.
>
> Alejandro
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How difficult for bindings to support API 14 or below?

2017-04-20 Thread Philip Warner

On 21/04/2017 1:43 AM, Dan Kennedy wrote:

Are you fossil-literate? 


Primarily git literate (cvs years ago). Happy to work my way through it.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] gnu gcc address sanitizer finds stack-use-after-scope in sqlite3VdbeExec

2017-04-20 Thread Cezary H. Noweta

Hello,

On 2017-04-19 19:31, Dan Kennedy wrote:


If you compile the code below with gcc 7.0.1:

   gcc code.c -fsantitize=address -o tst

and then run:

  ./tst 2

Does the sanitizer make the same complaint?



[...]



/**/
[...]
   switch( a ){
 case 1: {
   int res;
   b = 1;

 case 2:
   res = b;
   c = res;
   break;
 }
   }
[...]
/**/
IMHO, ``res'' will not be even protruded to the sanitizer. ``vdbe.c''s 
code is using a pointer to ``res'', passing it as a parameter -- thus 
SQLite's ``res'' is handled by use-after-scope sanitizer, while ``pC'' 
and ``pCrsr'' are not.


It looks that GCC forgets to unpoison ``res'' for some reason. Looking 
at the GCC's test cases I would suggest: (a) to place label 
``OP_SeekRowid'' just after declarations (i.e. after ``u64 iKey;'', 
and/or (b) to enclose ``case OP_NotExists:''...``break;'' into a nested, 
inner block, and/or (c) to open the block _before_ ``case OP_SeekRowid:''.


Unfortunately, ``gcc-7-branch'' still is decompressing on my hardware, 
so I cannot check which one(s) of above (a), (b), (c) will help. 
Regardless of all, the original problem concerns GCC rather then SQLite 
itself.


-- best regards

Cezary H. Noweta
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-20 Thread Jonathan Gaillard
Here is the db https://ufile.io/q0314

If you do:

select rowid, name from filesfts where filesfts match '"upload 
file漢_5"*';

you get back:


141| upload file漢_5
142| upload file漢_6
152| upload file漢_5
153| upload file漢_6
163| upload file漢_5
164| upload file漢_6
174| upload file漢_5
175| upload file漢_6
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


and then if you run:

INSERT INTO FilesFTS(FilesFTS, rank) VALUES('merge', -1);

and the select again, you get:


141| upload file漢_5
152| upload file漢_5
163| upload file漢_5
174| upload file漢_5
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


I'm using:
sqlite> .version
SQLite 3.15.2 2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8

But i've confirmed it also happens on 3.17.0 and 3.18.0



From: Jonathan Gaillard 
Sent: Monday, April 17, 2017 12:00:09 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: FTS5 query results different before/after MERGE command.


I have a db where I have a query returning results from something I believe is 
deleted already from a FTS5 table. This is a normal FTS5 table, not a 
contentless one so I used the normal DELETE.


Only after I run:

INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('automerge', 0);


INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('merge', 500);

Does the query then start returning the results without the deleted items.

Is this normal fts behavior?

Thanks!!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increasing performance of query

2017-04-20 Thread R Smith


On 2017/04/19 8:50 PM, Gabriele Lanaro wrote:

Dear SQLite communiy,

I’m trying to increase the performance of a query to its maximum possible
speed.

The schema is roughly constituted of two tables, one is a full text index,
fts5_table, while the other is called datatable.

The query in question is a full text query on the full text index joined
with the other table.

*SELECT* fts5.column, datatable.column2 *FROM* fts5_table, datatable *WHERE*
fts5_table *MATCH* ‘term’ *AND* datatable.id = fts5_column.rowid *ORDER BY*
rank *ASC* *LIMIT* 10;

Another query looks for counts of the same kind:

*SELECT* count(datatable.id) *FROM* fts5_table, datatable *WHERE*
fts5_table *MATCH* ‘term’ *AND* datatable.id = fts5_column.rowid

On a database of about the size of 1 GB of text (evenly distributed amount
100 000 rows). To give an idea of the speeds obtained I achieve a speed of
about 40 ms for the first and 80 ms for the second query.


Do you really mean "ms" as in milli-seconds? getting a result on an 
aggregated or sorted query in under a 100 milliseconds from a Gigabyte+ 
table with 100K+ rows is what we would call: Very Fast.




Things I tried:

1) ANALYZE

Decreased the speed by orders of magnitude.


Do you really mean "Decreased the speed" as in made it much much slower?

I'm going to assume for the sake of brevity that you meant "seconds" and 
"Increased" so that there is real opportunity for improvement.


One strategy I would employ, if you always do those two queries 
together, is to query to a temp table like this:


CREATE TEMP TABLE IF NOT EXISTS tmp_aq(
  id INTEGER PRIMARY KEY,
  col1 TEXT,
  iRank INT
);

-- In case there's already values:
DELETE * FROM tmp_aq;

INSERT INTO tmp_aq(id, col1, iRank)
  SELECT rowid, column, rank
FROM fts5_table
   WHERE fts5_table MATCH 'term';

-- The first query then becomes:
SELECT col1, datatable.column2
  FROM tmp_aq
  JOIN datatable ON datatable.id = tmp_aq.id
 ORDER BY tmp_aq.iRank ASC
 LIMIT 10;


-- If datatable has a 1-to-1 relationship with the fts table,
-- then this is enough for the second query:
SELECT count(*) FROM tmp_aq;

-- else you will still need the join:
SELECT count(*) FROM tmp_aq JOIN datatable ON datatable.id = tmp_aq.id;


An Index on iRank may or may not improve things - you need to test it.


Cheers,
Ryan

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How difficult for bindings to support API 14 or below?

2017-04-20 Thread Dan Kennedy

On 04/20/2017 10:31 PM, Philip Warner wrote:
I've managed to get a version that runs down to API 9 by duplicating 
some more classes from the Android sources and changing the cursor 
window creation to use the old constructor with a boolean parameter 
(rather than a name). Going below API 9 is probably going to involve 
diminishing returns in terms of number of devices that are live.


If I tidy up the code, do you have any interest in incorporating it, 
perhaps as another branch?



Sure, that sounds great! I don't think there are any license issues, as 
all that code inherits the Apache 2.0 license from Android.


Are you fossil-literate?

Dan.







On 20/04/2017 3:38 AM, Dan Kennedy wrote:

On 04/19/2017 06:28 PM, Philip Warner wrote:
FWIW, it compiles and builds with API set to 14...I'm just worried 
I'll get some esoteric breakage.


Any insights from someone who understands NDK/API level interactions?



Looking at old chat logs, I don't think we have tried to use that 
code with API level 14. It might work. Or it might not.


Google rewrote the code that the sqlite.org/android code is based on 
for the release associated with API level 15. So the official API 
level 14 stuff is quite different. I think that's the only reason we 
thought it would only work on level 15 or greater.


Dan.







On 18/04/2017 11:49 PM, Philip Warner wrote:
I notice that the Android bindings support API 16 by default, with 
a custom branch for API 15. Naively, it looks like API 15 support 
has a small number of changes relating to a missing/changed(?) 
exception.


Can anyone offer insight into how difficult it would be to support 
API 14 or below? It does not need to be source code compatible with 
the old android salute API from my point off view it just needs 
to work/run.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How difficult for bindings to support API 14 or below?

2017-04-20 Thread Philip Warner
I've managed to get a version that runs down to API 9 by duplicating some more 
classes from the Android sources and changing the cursor window creation to use 
the old constructor with a boolean parameter (rather than a name). Going below 
API 9 is probably going to involve diminishing returns in terms of number of 
devices that are live.


If I tidy up the code, do you have any interest in incorporating it, perhaps as 
another branch?



On 20/04/2017 3:38 AM, Dan Kennedy wrote:

On 04/19/2017 06:28 PM, Philip Warner wrote:
FWIW, it compiles and builds with API set to 14...I'm just worried I'll get 
some esoteric breakage.


Any insights from someone who understands NDK/API level interactions?



Looking at old chat logs, I don't think we have tried to use that code with 
API level 14. It might work. Or it might not.


Google rewrote the code that the sqlite.org/android code is based on for the 
release associated with API level 15. So the official API level 14 stuff is 
quite different. I think that's the only reason we thought it would only work 
on level 15 or greater.


Dan.







On 18/04/2017 11:49 PM, Philip Warner wrote:
I notice that the Android bindings support API 16 by default, with a custom 
branch for API 15. Naively, it looks like API 15 support has a small number 
of changes relating to a missing/changed(?) exception.


Can anyone offer insight into how difficult it would be to support API 14 or 
below? It does not need to be source code compatible with the old android 
salute API from my point off view it just needs to work/run.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-20 Thread Dan Kennedy

On 04/20/2017 07:11 AM, Jonathan Gaillard wrote:


If you do:

select rowid, name from filesfts where filesfts match '"upload 
file漢_5"*';


This certainly seems like a bug. Are you able to share the database that 
exhibits the problem?


Thanks,
Dan.






you get back:


141| upload file漢_5
142| upload file漢_6
152| upload file漢_5
153| upload file漢_6
163| upload file漢_5
164| upload file漢_6
174| upload file漢_5
175| upload file漢_6
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


and then if you run:

INSERT INTO FilesFTS(FilesFTS, rank) VALUES('merge', -1);

and the select again, you get:


141| upload file漢_5
152| upload file漢_5
163| upload file漢_5
174| upload file漢_5
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


I'm using:
sqlite> .version
SQLite 3.15.2 2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8

But i've confirmed it also happens on 3.17.0 and 3.18.0



From: Jonathan Gaillard 
Sent: Monday, April 17, 2017 12:00:09 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: FTS5 query results different before/after MERGE command.


I have a db where I have a query returning results from something I believe is 
deleted already from a FTS5 table. This is a normal FTS5 table, not a 
contentless one so I used the normal DELETE.


Only after I run:

INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('automerge', 0);


INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('merge', 500);

Does the query then start returning the results without the deleted items.

Is this normal fts behavior?

Thanks!!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] gnu gcc address sanitizer finds stack-use-after-scope in sqlite3VdbeExec

2017-04-20 Thread Cezary H. Noweta

On 2017-04-19 19:31, Dan Kennedy wrote:

On 04/18/2017 07:12 PM, Vitti wrote:

In my opinion this is probably due to erroneous usage of variable res
in the branches
of the huge switch in sqlite3VdbeExec


What's wrong with ``{ int res; res = 0; }''? The sanitizer should alert 
in the following code: ``int *p; { int res; p =  } p[0] = 0;''.



Does it not like us using a
switch() to jump into the middle of a block that contains variable
declarations?


If it had been true in general, then it would have tripped on earlier 
``pC = p->apCsr[pOp->p1];'' or ``pCrsr = pC->uc.pCursor;'' (both ``pC'' 
and ``pCrsr'' are local to the block). It is too simple to be not 
detected. I would bet on a bug in the sanitizer triggered by a 
composition of (a) successive blocks conataining ``res'', (b) switch 
into the place just after a declaration in the middle of a block, (c) an 
using of a pointer to ``res'', and (d) a huge size of ``switch(...)''.


- best regards

Cezary H. Noweta
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increasing performance of query

2017-04-20 Thread Simon Slavin

On 19 Apr 2017, at 7:50pm, Gabriele Lanaro  wrote:

> *SELECT* count(datatable.id) *FROM* fts5_table, datatable *WHERE*
> fts5_table *MATCH* ‘term’ *AND* datatable.id = fts5_column.rowid

If datatable.id is never NULL, then "count(*)" should do the same thing and be 
faster.

> 1) ANALYZE
> 
> Decreased the speed by orders of magnitude.


That’s never supposed to happen.  Just to make sure I understand this … Are you 
saying that you have a situation where ANALYZE made something slower ?  If so, 
have you kept a copy of the database before you executed ANALYZE ?  There are 
some commands which will reveal what happened.

Given the efforts you’ve been to with other commands, you might want to try 
VACUUM.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-20 Thread Jonathan Gaillard


If you do:

select rowid, name from filesfts where filesfts match '"upload 
file漢_5"*';

you get back:


141| upload file漢_5
142| upload file漢_6
152| upload file漢_5
153| upload file漢_6
163| upload file漢_5
164| upload file漢_6
174| upload file漢_5
175| upload file漢_6
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


and then if you run:

INSERT INTO FilesFTS(FilesFTS, rank) VALUES('merge', -1);

and the select again, you get:


141| upload file漢_5
152| upload file漢_5
163| upload file漢_5
174| upload file漢_5
185| upload file漢_5
196| upload file漢_5
207| upload file漢_5
218| upload file漢_5
229| upload file漢_5
240| upload file漢_5


I'm using:
sqlite> .version
SQLite 3.15.2 2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8

But i've confirmed it also happens on 3.17.0 and 3.18.0



From: Jonathan Gaillard 
Sent: Monday, April 17, 2017 12:00:09 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: FTS5 query results different before/after MERGE command.


I have a db where I have a query returning results from something I believe is 
deleted already from a FTS5 table. This is a normal FTS5 table, not a 
contentless one so I used the normal DELETE.


Only after I run:

INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('automerge', 0);


INSERT INTO MyFTSTable(MyFTSTable, rank) VALUES('merge', 500);

Does the query then start returning the results without the deleted items.

Is this normal fts behavior?

Thanks!!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Increasing performance of query

2017-04-20 Thread Gabriele Lanaro
Dear SQLite communiy,

I’m trying to increase the performance of a query to its maximum possible
speed.

The schema is roughly constituted of two tables, one is a full text index,
fts5_table, while the other is called datatable.

The query in question is a full text query on the full text index joined
with the other table.

*SELECT* fts5.column, datatable.column2 *FROM* fts5_table, datatable *WHERE*
fts5_table *MATCH* ‘term’ *AND* datatable.id = fts5_column.rowid *ORDER BY*
rank *ASC* *LIMIT* 10;

Another query looks for counts of the same kind:

*SELECT* count(datatable.id) *FROM* fts5_table, datatable *WHERE*
fts5_table *MATCH* ‘term’ *AND* datatable.id = fts5_column.rowid

On a database of about the size of 1 GB of text (evenly distributed amount
100 000 rows). To give an idea of the speeds obtained I achieve a speed of
about 40 ms for the first and 80 ms for the second query.

Things I tried:

1) ANALYZE

Decreased the speed by orders of magnitude.

2) pragma cache_size=-256000;

Improved the performance considerably, increasing further than this value
has no effect

3) pragma mmap_size

I didn’t see an improvement

4) putting the database in a ramdisk

No improvement

I was wondering which other strategies could be effecting in increasing the
query speed.

I also noticed that the *ORDER BY* statement in the first query slows down
the query quite a bit (and this is probably due to calculating the bm25
score on all the results to get a ranking) I was wondering if there’s other
ways to prevent that.

Thanks,

Gabriele
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Bug: Text compare doesn't work, if column name matches text literal enclosed in double quotes

2017-04-20 Thread Andreas Martin
Hello,

this is apparently not a bug. I have just read, that double quoted strings
are identifiers and no string literals...
(https://sqlite.org/lang_keywords.html)

Kindly Regards,
Andreas Martin

2017-04-19 13:46 GMT+02:00 Andreas Martin :

> Hello,
>
> I'll report a bug tested on SQLite 1.18.0, Windows 7/64bit:
>
> (You can reproduce this issue by using the attached SQL text file
> "bug.sql").
>
> The bug appears, when querying from a table with text compare, where a
> column is named as like the text pattern:
> SELECT * FROM tbl WHERE col_1="col_2";
>
> The result is empty, if there exists a column named "col_2".
> Using single quotes fixes this:
> SELECT * FROM tbl WHERE col_1='col_2';
>
>
> Kindly regards,
> Andreas Martin
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Bug: Text compare doesn't work, if column name matches text literal enclosed in double quotes

2017-04-20 Thread Andreas Martin
Hello,

I'll report a bug tested on SQLite 1.18.0, Windows 7/64bit:

(You can reproduce this issue by using the attached SQL text file
"bug.sql").

The bug appears, when querying from a table with text compare, where a
column is named as like the text pattern:
SELECT * FROM tbl WHERE col_1="col_2";

The result is empty, if there exists a column named "col_2".
Using single quotes fixes this:
SELECT * FROM tbl WHERE col_1='col_2';


Kindly regards,
Andreas Martin
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Hick Gunter
Maybe Prakash Premkumar  or Sairam Gaddam 
, who seemed hell bent on implementing stored 
procedures (or at least storing generated bytecode) about two years ago, have 
made progress in the meantime?

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Clemens Ladisch
Gesendet: Donnerstag, 20. April 2017 09:38
An: sqlite-users@mailinglists.sqlite.org
Betreff: Re: [sqlite] Is it possible to create the Stored Procedure (SP) in 
Sqlite?

Olivier Mascia wrote:
> As far as I understood, SQLite will parse and compile the trigger text
> as part of each statement using them.  No bytecode compilation
> upfront, nor storage of it.

SQLite parses all triggers (and all other schema objects) when it reads the 
schema (see "struct Trigger" and "struct TriggerStep" in the source).
However, the bytecode for them is generated only when the actual query is 
prepared (see "struct TriggerPrg" and "struct SubProgram").


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Clemens Ladisch
Olivier Mascia wrote:
> As far as I understood, SQLite will parse and compile the trigger text
> as part of each statement using them.  No bytecode compilation upfront,
> nor storage of it.

SQLite parses all triggers (and all other schema objects) when it reads
the schema (see "struct Trigger" and "struct TriggerStep" in the source).
However, the bytecode for them is generated only when the actual query
is prepared (see "struct TriggerPrg" and "struct SubProgram").


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-20 Thread Olivier Mascia
> Le 20 avr. 2017 à 01:13, petern  a écrit :
> 
> 2. Here is a question.  It would be helpful to know if TRIGGERs are stored
> as prepared SQLite byte code or not.  What does the SQLite engine do
> exactly?  Anybody?

I'm answering to test my understanding, confronting it to more knowledgeable 
people here on this list.  As far as I understood, SQLite will parse and 
compile the trigger text as part of each statement using them.  No bytecode 
compilation upfront, nor storage of it.  And that is fine by me, well in line 
with the design goals of SQLite.

Please correct me as needed.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users