Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Norman Dunbar
Are you on Windows? Can you install a compiler? If so then there's gcc for windows at http://tdm-gcc.tdragon.net/download or what used to be Borland C++, is now Embarcadero and much updated to version 10 at https://www.embarcadero.com/free-tools/ccompiler/start-for-free - you will need to

[sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-09 Thread Simon Slavin
Tangential to SQLite, but there’s little on the list at the moment so perhaps some of you might like this. Several of his points don’t apply to SQLite, which works differently from most SQL engines, but it’s

Re: [sqlite] SQLiteBlob.Create failing "No RowId is available"

2017-06-09 Thread Joe Mistachkin
Sergio Capozzi wrote: > > It seems the KeyInfo calculation is doing something wrong. > Is there a workaround or is a known bug? > Version 1.0.105.1 > Thanks for the report. This should now be fixed on trunk. -- Joe Mistachkin @ https://urn.to/r/mistachkin

Re: [sqlite] SQLiteBlob.Create failing "No RowId is available"

2017-06-09 Thread Joe Mistachkin
Another note: The GUID column will need to be marked as UNIQUE or PRIMARY KEY in the CREATE TABLE statement in order for the BLOB lookup to work properly. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list

Re: [sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread Eric Grange
> Isn't it all just obfuscation? Not really, the encryption protects the file, wherever it is, as long as the attacker does not have access to the application keys or application memory. > If the adversary is another process on the same host, encrypting the db > just adds obfuscation, which is

[sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread wout.mertens
Aha, that does make sense, thinking of each risk in terms in likelihoods. So encrypting the db as well as the disk seems the safest route here. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] SQLiteBlob.Create failing "No RowId is available"

2017-06-09 Thread Sergio Capozzi
Hi all, I'm not able to create a Blob from thaat table schema CREATE TABLE "DataBlobs" ( `DataBlobGUID` GUID NOT NULL, `Data` BLOB NOT NULL, FOREIGN KEY(`DataBlobGUID`) REFERENCES `DataStream`(`DataStreamGUID`) ) This is my query: ("SELECT rowid, Data FROM DataBlobs WHERE DataBlobGuid =

Re: [sqlite] 3.11.0: Tcl sqlite3 extension can't do variable interpolation _and_ json_extract

2017-06-09 Thread Richard Hipp
On 6/9/17, Zach C. wrote: > I realize it's not the latest version, but I'm having an issue where the > moment I want the sqlite3 extension to do variable interpolation, it will > break json_extract() > > See this tclsh output: > > % mydb eval "SELECT json_extract(json, '$.hash')

[sqlite] 3.11.0: Tcl sqlite3 extension can't do variable interpolation _and_ json_extract

2017-06-09 Thread Zach C.
I realize it's not the latest version, but I'm having an issue where the moment I want the sqlite3 extension to do variable interpolation, it will break json_extract() See this tclsh output: % mydb eval "SELECT json_extract(json, '$.hash') FROM NotImportant WHERE json_extract(json, '$.hash') =

Re: [sqlite] SQLiteBlob.Create failing "No RowId is available"

2017-06-09 Thread Richard Hipp
On 6/9/17, Sergio Capozzi wrote: > Hi all, > > > I'm not able to create a Blob from thaat table schema > > > CREATE TABLE "DataBlobs" ( `DataBlobGUID` GUID NOT NULL, `Data` BLOB NOT > NULL, FOREIGN KEY(`DataBlobGUID`) REFERENCES `DataStream`(`DataStreamGUID`) > ) > > >

Re: [sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread Yuriy M. Kaminskiy
Eric Grange writes: >> Isn't it all just obfuscation? > > Not really, the encryption protects the file, wherever it is, as long as > the attacker does not have access to the application keys or application > memory. > >> If the adversary is another process on the same host,

Re: [sqlite] Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers

2017-06-09 Thread Mark Brand
For non-TEMP triggers, the table to be modified or queried must exist in the same database as the table or view to which the trigger is attached. TEMP triggers are not subject to the same-database rule. A TEMP trigger is allowed to query or modify any table in any ATTACH

Re: [sqlite] 3.11.0: Tcl sqlite3 extension can't do variable interpolation _and_ json_extract

2017-06-09 Thread Andreas Kupries
> On 6/9/17, Zach C. wrote: > > I was partially unclear with using a constant table name here; what I > > actually need as well is the table name as effectively a const that I > > control as well. So more like > > > > mydb eval {$SELECT json FROM $table WHERE json_extract(json,

Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Martin Lowry
Hi All, Problem now understood. (BTW same problem occurs in 3.19.3) I made a descendant of TSQLite3Connectionto allow my application to define field value types by providing an OnFieldDefInit handler. In preparation for calling that handler I call sqlite3_column_database_name,

Re: [sqlite] Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers

2017-06-09 Thread Mark Brand
On 09/06/17 14:47, Richard Hipp wrote: The documentation has been updated to clarify the ambiguity and to hopefully make it easier to understand. Thanks. The exception for non-TEMP triggers is something I was hoping for too: For non-TEMP triggers, the table to be modified or queried must

Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Martin Lowry
Hi Richard, thanks for the quick reply. Unfortunately compiling the library myself is not an option since I have no C/C++ compiler available. Looks like I'll have to live with my workaround. Cheers, Martin On 09/06/2017 12:40, Richard Hipp wrote: > On 6/9/17, Martin Lowry

Re: [sqlite] Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers

2017-06-09 Thread Richard Hipp
The documentation has been updated to clarify the ambiguity and to hopefully make it easier to understand. On 6/9/17, Mark Brand wrote: > According to the documentation: > > The name of the table to be modified in an UPDATE, DELETE, or INSERT > statement must be an

Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Richard Hipp
On 6/9/17, Martin Lowry wrote: > In version 3.11.1 sqlite3_table_column_metadata > failed with a non-zero exit code which was easier to deal with. If you compile with -DSQLITE_ENABLE_API_ARMOR, then invoking sqlite3_table_column_metadata() with a NULL zTableName value will

Re: [sqlite] Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers

2017-06-09 Thread Richard Hipp
On 6/9/17, Mark Brand wrote: > > > On 09/06/17 14:47, Richard Hipp wrote: >> The documentation has been updated to clarify the ambiguity and to >> hopefully make it easier to understand. > > Thanks. The exception for non-TEMP triggers is something I was hoping > for too: > >>

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-09 Thread Jens Alfke
> On Jun 9, 2017, at 3:05 PM, Simon Slavin wrote: > > Tangential to SQLite, but there’s little on the list at the moment so perhaps > some of you might like this. > >

[sqlite] Syntax Restrictions On UPDATE, DELETE, and INSERT Statements Within Triggers

2017-06-09 Thread Mark Brand
According to the documentation: The name of the table to be modified in an UPDATE, DELETE, or INSERT statement must be an unqualified table name. In other words, one must use just "tablename" not "database.tablename" when specifying the table. *The table to be modified must exist in

Re: [sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread Matthias-Christian Ott
On 2017-06-09 00:13, Wout Mertens wrote: > Isn't it all just obfuscation? Any root user can read your key, if not from > disk then from memory. Any normal user can't read your key, nor from disk, > nor from memory; and they can't read your db file either. > > So if the adversary is someone with

Re: [sqlite] 3.11.0: Tcl sqlite3 extension can't do variable interpolation _and_ json_extract

2017-06-09 Thread Richard Hipp
On 6/9/17, Zach C. wrote: > I was partially unclear with using a constant table name here; what I > actually need as well is the table name as effectively a const that I > control as well. So more like > > mydb eval {$SELECT json FROM $table WHERE json_extract(json, '$.hash') =

Re: [sqlite] [SPAM] Fwd: How to correctly display unicode characters in Windows 10 / cmd.exe / sqlite3.exe?

2017-06-09 Thread David Raymond
Non C programmer question: In your patch there, does sout have to be freed or anything, or am I missing something? -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Olivier Mascia Sent: Monday, June 05, 2017 6:20 PM To: SQLite

Re: [sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread Jens Alfke
> On Jun 9, 2017, at 7:30 AM, Yuriy M. Kaminskiy wrote: > > On other hand, application-level encryption should be used with great > caution; it is a way too often designed and implemented by > non-cryptographers, does not use optimized or hardware-assisted crypto > primitives

Re: [sqlite] Questions about SQLite Encryption Extension (SEE)

2017-06-09 Thread Jens Alfke
> On Jun 8, 2017, at 3:13 PM, Wout Mertens wrote: > > Isn't it all just obfuscation? Any root user can read your key, if not from > disk then from memory. Keys on disk are [or should be!] generally stored by special OS subsystems (like the Keychain on Apple platforms)

Re: [sqlite] [SPAM] Fwd: How to correctly display unicode characters in Windows 10 / cmd.exe / sqlite3.exe?

2017-06-09 Thread Wenbo Zhao
David Raymond 于2017年6月10日 周六05:55写道: > Non C programmer question: In your patch there, does sout have to be freed > or anything, or am I missing something? No. The 4th arg of WriteConsoleW is lpNumberOfCharsWritten. > > > > -Original Message- > From:

Re: [sqlite] [SPAM] Fwd: How to correctly display unicode characters in Windows 10 / cmd.exe / sqlite3.exe?

2017-06-09 Thread Olivier Mascia
> Le 9 juin 2017 à 21:38, Wenbo Zhao a écrit : > > David Raymond >于2017年6月10日 周六05:55写道: > >> Non C programmer question: In your patch there, does sout have to be freed >> or anything, or am I missing something? >

Re: [sqlite] [SPAM] Fwd: How to correctly display unicode characters in Windows 10 / cmd.exe / sqlite3.exe?

2017-06-09 Thread Olivier Mascia
> Le 9 juin 2017 à 21:38, Wenbo Zhao a écrit : > > David Raymond >于2017年6月10日 周六05:55写道: > >> Non C programmer question: In your patch there, does sout have to be freed >> or anything, or am I missing something? >