[sqlite] Lemon-generated parser gives an assertion failure

2017-04-16 Thread Guy Harris
If you use the version of lemon.c and lempar.c in the Fossil repository for SQLite as of 2017-04-16 20:54:23 UTC, take the following Lemon parser, compile it, and run it, it fails with Assertion failed: (yyruleno!=116), function yy_reduce, file mate_grammar.c, line 2165. (It's a

Re: [sqlite] Database corruption, and PRAGMA fullfsync on macOS

2017-04-16 Thread Richard Hipp
I cannot seem to find the implementation for COLLATE JSON anywhere in your source code. Can you give me a hint as to which source file I should be looking in? On 4/16/17, Brendan Duddridge wrote: > Hi, > > I know this is an old thread, but I just found it now when I was

Re: [sqlite] Database corruption, and PRAGMA fullfsync on macOS

2017-04-16 Thread Richard Hipp
On 4/16/17, Richard Hipp wrote: > I cannot seem to find the implementation for COLLATE JSON anywhere in > your source code. Can you give me a hint as to which source file I > should be looking in? I worked around the "COLLATE JSON" problem (by writing my own JSON collation).

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Richard Hipp
On 4/16/17, Simon Slavin wrote: > > On 16 Apr 2017, at 10:57pm, Timothy Stack > wrote: > >> UPDATE foo SET col0 = 'bar' WHERE hidden_field = 'baz' >> >> Having the real syntax, like the following, would be nice though: >> >> UPDATE foo('baz')

[sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Timothy Stack
The current table-valued function feature seems to only work for SELECT statements. Was any thought given to whether updates would be supported for table-valued functions? It seems like it's technically possible and could be made to work right now with this awkward syntax: UPDATE foo SET col0

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Simon Slavin
On 16 Apr 2017, at 10:57pm, Timothy Stack wrote: > UPDATE foo SET col0 = 'bar' WHERE hidden_field = 'baz' > > Having the real syntax, like the following, would be nice though: > > UPDATE foo('baz') SET col0 = 'bar' How would it know that 'baz' is a value for

Re: [sqlite] performing an UPDATE on a table-valued function

2017-04-16 Thread Timothy Stack
On Sun, Apr 16, 2017 at 3:40 PM, Richard Hipp wrote: > On 4/16/17, Simon Slavin wrote: > > > > On 16 Apr 2017, at 10:57pm, Timothy Stack > > wrote: > > > >> UPDATE foo SET col0 = 'bar' WHERE hidden_field = 'baz' > >> > >>

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

2017-04-16 Thread Tim Streater
On 15 Apr 2017 at 22:17, Simon Slavin wrote: > On 15 Apr 2017, at 9:14pm, petern wrote: > >> Yes, please include it in the FAQ > > It’s not a FAQ. Not on this list, at least. I would argue against it. Well he meant on the sqlite website.

Re: [sqlite] can not get data

2017-04-16 Thread Tony Papadimitriou
LIKE is case insensitive, while = is not. -Original Message- From: lizhu...@whaty.com when I query : select * from downloadVideo_table where sectionId = '402814a34b823b23014bfc228fe9588c' then I query the length of 'sectionId', it is 32.that is right. select length(sectionId) from

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

2017-04-16 Thread Darko Volaric
If you really wanted to have stored procedures and did not mind calling them using a function syntax, you could write your own stored procedure extension. You'd store them in their own table, write a custom function that evaluates them and call them something like this: sp("name", param1,

[sqlite] can not get data

2017-04-16 Thread lizhu...@whaty.com
hi,Dear development I got a problem with sqlite3 in IOS10.2 when I query : select * from downloadVideo_table where sectionId = '402814a34b823b23014bfc228fe9588c' but there is nothing. then I query the length of 'sectionId', it is 32.that is right. select length(sectionId) from

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

2017-04-16 Thread Jens Alfke
> On Apr 15, 2017, at 2:17 PM, Simon Slavin wrote: > > I do agree that DRH’s explanation of why it’s not as important in SQLite as > in client/server engines is well written. We can point to it when we need it. Is this list archived anywhere convenient? Last time I

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

2017-04-16 Thread Simon Slavin
On 16 Apr 2017, at 5:27pm, Jens Alfke wrote: > Is this list archived anywhere convenient? I just google for posts I remember and google usually turns up an archive of this list. googling "sqlite stored procedure latency" turns up

[sqlite] HAVE_USLEEP compile option not correctly reported by pragma

2017-04-16 Thread Kali Kaneko
The HAVE_USLEEP option is passed to sqlite at compilation time, but not reported by the pragma: $ ~/src/sqlite-amalgamation-318 10104 ✫ : gcc -DHAVE_USLEEP=1 -DSQLITE_ENABLE_JSON1 -DTHREADSAFE=0 shell.c sqlite3.c -lpthread -ldl -o sqlite $ ~/src/sqlite-amalgamation-318 10129 ✫

Re: [sqlite] Database corruption, and PRAGMA fullfsync on macOS

2017-04-16 Thread Brendan Duddridge
Hi, I know this is an old thread, but I just found it now when I was doing some research on this topic. Thanks Jens for starting this thread. When Jens said he knew a developer who could create a corrupted database by turning off the power, I'm pretty sure he was talking about me. This has been