Re: [sqlite] [EXTERNAL] sqlite as 'streaming mode' query engine?

2018-01-25 Thread Hick Gunter
If your stream mode virtual table stalls in it's xNext method until the next row from the stream is available (or the stream is closed, in which case it needs to set an EOF flag for the xEof method to return), then each row will be aggregated as it becomes available. The result will not be avail

[sqlite] UTF8 and NUL

2018-01-25 Thread J Decker
NUL is a valid utf8 character but FF is never valid. (would be like a 36 bit length specification) and practically anthing more than F8 is invalid utf8 character. Other than BOM https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8 EF BB BF 239 187 191 // EF - 80 | 3b - 80 | 3f ( 0xfeff ) Many W

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Cezary H. Noweta
Hello, On 2018-01-26 00:54, petern wrote: I am interested to see your solution where NUMERIC CAST has sensible interpretation between MAX_INT and MAX_REAL. The patch focuses on problems with TEXT=>NUM conversions. The sole exception is INT=>FLOAT, when a value could lose an information. IM

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread petern
Cezary. Your short form fix for the spurious NUMERIC CAST due to trailing space was definitely received in your original posting. I am interested to see your solution where NUMERIC CAST has sensible interpretation between MAX_INT and MAX_REAL. IMO, simple INT saturation is not convenient for easy

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Cezary H. Noweta
Hello, On 2018-01-25 22:58, petern wrote: Thank you for expanding on your detailed observations. If you can, please post the long patch at your customary patch site http://sqlite.chncc.eu/ I was convinced that I had publicized my patch already. For the people who are interested in the patch, pl

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Cezary H. Noweta
Hello, On 2018-01-25 22:08, Stephen Chrzanowski wrote: According to https://www.sqlite.org/datatype3.html *2. Storage Classes and DatatypesEach value stored in an SQLite database (or manipulated by the database engine) has one of the following storage classes:NULL. The value is a NULL value

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread petern
Thank you for expanding on your detailed observations. If you can, please post the long patch at your customary patch site http://sqlite.chncc.eu/ Also, in the link text, please make note of the exact SQLite version the patch is for. The lesson I draw is that unconditionally correct queries must c

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Stephen Chrzanowski
According to https://www.sqlite.org/datatype3.html *2. Storage Classes and DatatypesEach value stored in an SQLite database (or manipulated by the database engine) has one of the following storage classes:NULL. The value is a NULL value.INTEGER. The value is a signed integer, stor

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Cezary H. Noweta
Hello, On 2018-01-25 19:54, petern wrote: CREATE TABLE IF NOT EXISTS a (a INTEGER); INTEGER == NUMERIC in case of column declarations. -- Note however, the constant table expression works fine... SELECT CAST(column1 AS INTEGER) FROM (VALUES ('901'),('901 '));

[sqlite] sqlite as 'streaming mode' query engine?

2018-01-25 Thread Nelson, Erik - 2
Sqlite aggregation functions receive one call for each row in the underlying results set. Has anyone on the list done a virtual table that's a based on a stream? Something conceptually along the lines of Insert row a Insert row b begin aggregation on rows a, b insert row c insert row d update

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread petern
Confirmed. sqlite> .version SQLite 3.22.0 2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2alt1 zlib version 1.2.8 gcc-4.8.4 --FYI some background: -- --min 64b signed int: SELECT CAST(0x8000 AS INTEGER); -- "CAST(0x80

Re: [sqlite] Atoi64 bug(s)

2018-01-25 Thread Stephen Chrzanowski
RE the first question, the largest positive 64-bit number is 18446744073709551615, or, 18,446,744,073,709,551,615. Your number is overloading that value. 12,345,678,901,234,567,890,123 vs 18,446,744,073,709,551,615 AFAIK, SQLite uses max of 64-bit integer math, not 128. On Thu, Jan 25, 2018 at

Re: [sqlite] SQLite DELUXE Re: sqlite command line tool NUL support

2018-01-25 Thread Luke Amery
https://www.sqlite.org/privatebranch.html This command both creates the new repository and populates it with all the latest SQLite could -> This command both creates the new repository and populates it with all the latest SQLite code On Wed, Jan 24, 2018 at 10:44 PM Richard Hipp wrote: > On 1/2

[sqlite] Atoi64 bug(s)

2018-01-25 Thread Cezary H. Noweta
Hello, About year age I reported some strange behavior: 1. https://www.sqlite.org/lang_expr.html#castexpr: INTEGER: ``When casting a TEXT value to INTEGER, the longest possible prefix of the value that can be interpreted as an integer number is extracted from the TEXT value and the remainder

[sqlite] Small sqlite3_analyzer doc link issue

2018-01-25 Thread Dominique Devienne
FYI: The "additional explanation" link (of target https://www.sqlite.org/'#defs') in https://www.sqlite.org/sqlanalyze.html is not working properly. Thanks, --DD ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite

Re: [sqlite] Make some changes to the source code

2018-01-25 Thread Nick
Thank you Simon, I totally understand you. And still hope for someone to give me some advice about my wal+mmap (Map file when opening it and do not truncate the file) . Thanks. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mail

Re: [sqlite] Make some changes to the source code

2018-01-25 Thread Simon Slavin
On 25 Jan 2018, at 5:55am, Nick wrote: > The one thing that bothers me the most is that I have no way to check my > code, as there is a testvfs in sqlite test. So could you please review my > train of thought about my wal+mmap? (Map file when opening it and do not > truncate the file) That is wa