[sqlite] Sql.Data.Sqlite BLOB Type Mismatch

2017-02-27 Thread Steven M. McNeese
I have a table called Media with an Media column of type BLOB and a Annotation column of type BLOB. The Annotation column can be null. In my Winform application, I have a dataset for this table and the Media and Annotation columns are defined as System.Byte[]. When I fill the dataset, I am

[sqlite] Sql.Data.Sqlite BLOB Type Mismatch

2017-02-27 Thread Steven M. McNeese
I have a table called Media with an Media column of type BLOB and a Annotation column of type BLOB. The Annotation column can be null. In my Winform application, I have a dataset for this table and the Media and Annotation columns are defined as System.Byte[]. When I fill the dataset, I am

Re: [sqlite] Beginning of release testing for version 3.17.0

2017-02-27 Thread Keith Medcalf
You can always write your own SHA-224/SHA-256/SHA-512/RIPEMD160/WHIRLPOOL or other hash function extension. I wrote an extension that provides MD4/MD5/SHA1/SHA256/SHA512 on Windows using the built-in Windows Crypto API functions. Once you can call something that computes the hash, making it

Re: [sqlite] Beginning of release testing for version 3.17.0

2017-02-27 Thread Jens Alfke
> On Feb 27, 2017, at 3:51 PM, Bob Friesenhahn > wrote: > > Are you somehow depending on sqlite3 for a SHA-1 implementation? That would > be strange. I’m genuinely mystified by this statement. Why would the extension be included if not for people to use it?

Re: [sqlite] foreign key cardinality

2017-02-27 Thread Simon Slavin
On 28 Feb 2017, at 12:19am, James K. Lowden wrote: > sqlite> create table A(a, b, primary key (a,b)); > sqlite> create table C(c references A(a)); The reference column(s) (the column(s) in the 'parent' table) must be UNIQUE otherwise you may have two rows in that

Re: [sqlite] foreign key cardinality

2017-02-27 Thread James K. Lowden
On Mon, 27 Feb 2017 16:07:48 -0500 Richard Hipp wrote: > On 2/27/17, James K. Lowden wrote: > > SQLite requires that foreign keys refer to primary > > keys. > > No it doesn't. Where did you get that impression? sqlite> create table A(a, b, primary

Re: [sqlite] foreign key cardinality

2017-02-27 Thread Ben Newberg
The column can be unique as well, correct? SQLite version 3.17.0 2017-02-13 16:02:40 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> pragma foreign_keys = 1; sqlite> create table x (a integer primary key,

Re: [sqlite] Beginning of release testing for version 3.17.0

2017-02-27 Thread Bob Friesenhahn
On Mon, 27 Feb 2017, Jens Alfke wrote: SHA-1 is now definitely too weak, so it would be good for SQLite to offer an alternative that’s still safe(r).) Are you somehow depending on sqlite3 for a SHA-1 implementation? That would be strange. The SHA-1 implementation in SQLite is surely

Re: [sqlite] Crash on Android

2017-02-27 Thread Daniel Anderson
looks like a race condition! but it could also be uninitialized variable, but this is rarer these day as most compiler flag uninitialized var. unless your uninitialized var happen to be in a struct, this is why constructor are so important for struct/class 2017-02-27 11:28 GMT-05:00 Jeff

Re: [sqlite] No way to check for CHECK constraint violations a posteriori

2017-02-27 Thread Bob Friesenhahn
On Wed, 22 Feb 2017, Richard Hipp wrote: CHECK constraint failures are suppose to be exceedingly rare. Elaborate error messages that pinpoint the problem are possible, but they increase the library complexity and footprint unnecessarily. In the rare event that you encounter a CHECK constraint

Re: [sqlite] foreign key cardinality

2017-02-27 Thread Richard Hipp
On 2/27/17, James K. Lowden wrote: > SQLite requires that foreign keys refer to primary > keys. No it doesn't. Where did you get that impression? -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

[sqlite] foreign key cardinality

2017-02-27 Thread James K. Lowden
I would like to illustrate a problem with SQLite's foreign key enforcement policy. SQLite requires that foreign keys refer to primary keys. That rule has no relational foundation, and prevents the use of foreign keys that are perfectly valid. I have these tables (non-key columns omitted for

Re: [sqlite] Beginning of release testing for version 3.17.0

2017-02-27 Thread Jens Alfke
> On Feb 7, 2017, at 7:39 AM, no...@null.net wrote: > > Nice to see a sha1 extension included with SQLite now. … Just in time for SHA-1 to be declared officially broken: there’s now an effective mechanism to generate collisions (it only takes 100 GPU-years), and at least two colliding files

Re: [sqlite] last_insert_rowid() returns wrong value after insert in a fts5 virtual table.

2017-02-27 Thread Dan Kennedy
On 02/28/2017 12:15 AM, Cezary H. Noweta wrote: Hello, On 2017-02-27 11:41, Dan Kennedy wrote: CREATE VIRTUAL TABLE f USING fts3(x); BEGIN; INSERT INTO f VALUES('one'); INSERT INTO f VALUES('two'); INSERT INTO f VALUES('three'); INSERT INTO f VALUES('four'); COMMIT;

Re: [sqlite] last_insert_rowid() returns wrong value after insert in a fts5 virtual table.

2017-02-27 Thread Cezary H. Noweta
Hello, On 2017-02-27 11:41, Dan Kennedy wrote: CREATE VIRTUAL TABLE f USING fts3(x); BEGIN; INSERT INTO f VALUES('one'); INSERT INTO f VALUES('two'); INSERT INTO f VALUES('three'); INSERT INTO f VALUES('four'); COMMIT; INSERT INTO f VALUES('five'); SELECT

[sqlite] Crash on Android

2017-02-27 Thread Jeff Archer
Hi All, Any thoughts on this will be greatly appreciated. I am having an issue only on a specific tablet when it is running Android 4.2.2. When Android is upgraded to 4.4.2 problems appears to be gone. I still want to understand root cause to know if problem is really gone. My environment is a

[sqlite] not able to read SQLite.NET.chm

2017-02-27 Thread Mickey Feldman
That did the trick. I have never encountered "unblock" before - completely new to me after all these years of working with Windows. There was no security or other warning - Windows simply did not allow me to see the entire file. Deep sigh, roll eyes at Microsoft, and carry on. Thanks! On

Re: [sqlite] last_insert_rowid() returns wrong value after insert in a fts5 virtual table.

2017-02-27 Thread Dan Kennedy
On 02/27/2017 05:03 AM, Cezary H. Noweta wrote: Hello, While working on the Perl DBD:SQLite driver, I found the following bug in sqlite : the last_insert_rowid() method (or SQL function) returns the constant value 10 after any insert into a fts5 virtual table. This bug is new in fts5 :