Re: [sqlite] Unsigned

2018-08-21 Thread D Burgess
I currently store them as blobs. A lot of them, 16 bytes (versus numeric 8 per item). And not optimal for indexes. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unsigned

2018-08-21 Thread D Burgess
> You can just store binary blobs and interpret then in the client, no? Or do you need to do arithmetic on them? Not arithmetic, but &, |, <<, >> ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Unsigned

2018-08-21 Thread Wout Mertens
You can just store binary blobs and interpret then in the client, no? Or do you need to do arithmetic on them? On Tue, Aug 21, 2018, 6:55 PM Randall Smith wrote: > >>> Date: Tue, 21 Aug 2018 16:46:48 +1000 > >>> From: D Burgess > >>> > >>> Is there a historical

Re: [sqlite] Possible NULL DEREFERENCES and DEAD STORES found by static analysis tools

2018-08-21 Thread Wout Mertens
I was curious so I looked it up, the 2015 one is here http://sqlite.1065341.n5.nabble.com/Security-issues-in-SQLite-td81339.html but the 2014 one didn't get any replies. The gist of it is that these static analysis tools generate a lot of false positives, so unless you can come up with a test

Re: [sqlite] Possible NULL DEREFERENCES and DEAD STORES found by static analysis tools

2018-08-21 Thread Niall O'Reilly
On 21 Aug 2018, at 10:14, Patricia Monteiro wrote: > I have been analyzing the latest version of SQLite (3.24.0) with several > static analysis tools (Infer, Clang Static Analyzer, Cppcheck and Predator) > and after manually reviewing the code I have identified the following > errors: Variants

Re: [sqlite] Unsigned

2018-08-21 Thread Randall Smith
>>> Date: Tue, 21 Aug 2018 16:46:48 +1000 >>> From: D Burgess >>> >>> Is there a historical reason why sqlite does not have a UNSIGNED type to go >>> with INTEGER? I would like to enthusiastically second not only this as a feature request, but also request

Re: [sqlite] After upgrade from sqlite3 3.8.7.4 to anything after 3.14.1, I get "Error: destination database is in use"

2018-08-21 Thread Richard Hipp
O it looks to me like the > 'exclusive' command just needs to be removed ... the threadsafe option that > sqlite3 was built with looks like it is internally handling the locking. That would be my guess too. -- D. Richard Hipp d...@sqlite.org ___

Re: [sqlite] After upgrade from sqlite3 3.8.7.4 to anything after 3.14.1, I get "Error: destination database is in use"

2018-08-21 Thread Brian Hutchinson
Is this question better suited for the development list? No response at all. Thanks, Brian ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS - IF NOT EXISTS missing from sqlite_master

2018-08-21 Thread Richard Hipp
On 8/19/18, Daniel Santiago wrote: > Hi, > > It seems that when creating a virtual table the 'IF NOT EXISTS' part is > missing from the sql column in sqlite_master for the recently created table > entry. > > For example: > sqlite> CREATE VIRTUAL TABLE IF NOT EXISTS `Mail` USING FTS4(`subject`, >

Re: [sqlite] Variable value vs Static inside the Sqlite datetime function.

2018-08-21 Thread Richard Hipp
On 8/19/18, Misfer Al-Shamrani wrote: > Hi everyone, > > I’m looking for the proper presentation (syntax) that will use a dynamic > value from the table instead of a fixed value as given in the common example > below: > > SELECT date('now','+1 month’); > > = 2018-09-18 > > I want to replace the (

[sqlite] Possible NULL DEREFERENCES and DEAD STORES found by static analysis tools

2018-08-21 Thread Patricia Monteiro
I have been analyzing the latest version of SQLite (3.24.0) with several static analysis tools (Infer, Clang Static Analyzer, Cppcheck and Predator) and after manually reviewing the code I have identified the following errors: 1) Location: sqlite3.c: 91920 Error: NULL DEREFERENCE Found by: Clang

[sqlite] FTS - IF NOT EXISTS missing from sqlite_master

2018-08-21 Thread Daniel Santiago
Hi, It seems that when creating a virtual table the 'IF NOT EXISTS' part is missing from the sql column in sqlite_master for the recently created table entry. For example: sqlite> CREATE VIRTUAL TABLE IF NOT EXISTS `Mail` USING FTS4(`subject`, `body`); sqlite> SELECT `sql` FROM `sqlite_master`

[sqlite] Variable value vs Static inside the Sqlite datetime function.

2018-08-21 Thread Misfer Al-Shamrani
Hi everyone, I’m looking for the proper presentation (syntax) that will use a dynamic value from the table instead of a fixed value as given in the common example below: SELECT date('now','+1 month’); = 2018-09-18 I want to replace the ( “+1” ….. months) with a dynamic value from my table

Re: [sqlite] Unsigned

2018-08-21 Thread Rowan Worth
What version is that? I have 3.8.1 handy (ancient I know), which doesn't support hex literals but: sqlite> select cast(9223372036854775808 as integer); -9223372036854775808 Which is different to your result... -Rowan On 21 August 2018 at 17:19, D Burgess wrote: > My problem is getting

Re: [sqlite] Unsigned

2018-08-21 Thread D Burgess
My problem is getting handling unsigned integers that have the high bit set (i.e. negative) (assume 64bit) if I insert 0x8000 (i.e. 9223372036854775808), I would like to be able to select and get the same unsigned decimal number back. select 0x8000,cast(9223372036854775808

Re: [sqlite] Unsigned

2018-08-21 Thread Rowan Worth
sqlite is pretty loose about types. The column definitions don't constrain what is stored in the rows at all: sqlite> CREATE TABLE a(c INTEGER); sqlite> INSERT INTO a VALUES ("fourty-two"); sqlite> SELECT * FROM a; fourty-two So "UNSIGNED" seems kind of pointless as it's implies a further

[sqlite] Unsigned

2018-08-21 Thread D Burgess
Is there a historical reason why sqlite does not have a UNSIGNED type to go with INTEGER? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users