Re: [sqlite] Proof that a line has been modified

2017-09-07 Thread Michael Stephenson
In the past, I've used the pager to secure data. This involved encrypting the data before writing the data to disk and decrypting when loading from disk but also optionally hashing the page and storing the hash in extra data reserved for each page. If anyone tampered with the data, the hash

[sqlite] In the case of ZIPVFS

2015-12-23 Thread Michael Stephenson
Having just glanced at the documentation for ZIPVFS (didn't even know it existed)... 1) Perhaps using a real-time compression algorithm, something like lz4. It's not clear to me which algorithm ZIPVFS uses by default. 2) Perhaps increasing the cache settings to cache more pages in memory. 3)

[sqlite] Destroy all evidence of a database

2015-04-22 Thread Michael Stephenson
Simon, if the data in the database is sensitive, could you encrypt the database (ala something like That way if the file is left around for some reason, it's much less of a concern. Your app could generate a new (random) key each time it creates a new

[sqlite] Did A Recent Windows & Update Affect SQLite???

2015-04-02 Thread Michael Stephenson
Some suggestions: 1) Check your temp folder and remove chaff. 2) Download CCleaner and check your registry integrity. 3) Review updates that have been applied and try removing them one at a time or in a targeted fashion. You should be able to see what updates were applied around the time you

Re: [sqlite] SQL Logic error or missing database

2013-04-05 Thread Michael Stephenson
As Dan said, the console app needs the read/write flag. The other app appears to be using CStringW, but the api takes a const char *, not a wide char pointer. I'd try CStringA and explicitly cast to LPCSTR. Michael Stephenson On Apr 5, 2013, at 11:01 AM, Dan Kennedy <danielk1...@gmail.

Re: [sqlite] About new ticket "Per page/region checksums"

2012-02-07 Thread Michael Stephenson
It's almost trivial to add per-page checksums at the page level. Here are basic steps: 1) Define SQLITE_HAS_CODEC when building. This will cause 5 unresolved externals (functions declared but not defined/implemented). You need to provide implementations of these 5 functions: a.

Re: [sqlite] 3.7.9 amalgamation file in VS2005

2011-12-29 Thread Michael Stephenson
The Visual Studio debugger has a limitation of 64K lines in a source file for code stepping. Well, actually the debugger is fine, it's a limitation of Visual Studio itself that has been reported to Microsoft (maybe a decade ago) but never fixed. WinDbg is almost as good. Another solution is

Re: [sqlite] library routine called out of sequence

2011-12-23 Thread Michael Stephenson
Assuming that you are calling reset after each use of a prepared statement and/or that the error occurs on the very first bind... This sounds like in the working case the statements are prepared, bound, and then reset by the same thread each time these steps are done, but perhaps in the

Re: [sqlite] SQLite reading old data

2011-12-16 Thread Michael Stephenson
und no documentation about implementing the crypting api. Kind Regards Fabrizio > -Ursprüngliche Nachricht- > Von: [mailto:sqlite-users- >] Im Auftrag von Michael Stephenson > Gesendet: Donnerstag, 15. Dezember 2011 20:40 >

Re: [sqlite] SQLite reading old data

2011-12-15 Thread Michael Stephenson
A couple more questions: 1) Does "without encryption" mean still using System.Data.SQLite, just without using a key? 2) Are you using WAL? 3) Do you also see the problem with a single process with two connections? 4) Any chance you could provide a small demo project that demonstrates the

Re: [sqlite] How to : encrypt the data of database table.

2011-09-14 Thread Michael Stephenson
Have a look at: -Original Message- From: [] On Behalf Of Ashokkumar Gupta Sent: Wednesday, September 14, 2011 1:53 PM To: Subject: [sqlite] How to : encrypt the data of

Re: [sqlite] help to get the value of file change counter

2011-09-13 Thread Michael Stephenson
Just a guess, but you may have to use one of the Pager functions to examine the buffer for database page 1, which is always pinned in memory and which represents the first bytes of the database file. -Original Message- From:

Re: [sqlite] Sqlite+ICU library and usage of LIKE

2011-09-06 Thread Michael Stephenson
"It's rather pointless to use a LIKE operator with no wildcards." Except that it performs a case-insensitive comparison, so a quick-and-dirty way to accomplish that. -Original Message- From: [] On Behalf Of Igor

Re: [sqlite] Totalview Debugger & MemoryScape showing leak in my SQLite code?

2011-09-06 Thread Michael Stephenson
Well, in the first code example, yes you need to free your peekText pointer. Since you passed SQLITE_STATIC for the destructor parameter to sqlite3_bind_text, you should free it before you exit the function and not before. If you use SQLITE_TRANSIENT, you can free it immediately after the bind

Re: [sqlite] Custom Collation comparing only firt character?

2011-08-25 Thread Michael Stephenson
Most likely, since you say only the first character is being compared, is that you have an ANSI/Unicode issue. Specifically, it sounds like a Unicode string is being passed to your collation function, which is expecting ANSI and then finding a 0 at the second byte is determining that that is the

Re: [sqlite] Split Function for SQLite?

2011-08-24 Thread Michael Stephenson
If your programming language is C or C++, it's trivial to register a function with SQLite at runtime that can then be used in your queries. This does not require hacking SQLite itself. As noted, you can't return multiple rows per database row via a function. That's not how SQL works; it is "set"

Re: [sqlite] Use of VACUUM

2011-08-11 Thread Michael Stephenson
If you use INTEGER PRIMARY KEY, that column becomes your rowids; this does not create a new, separate column in addition to the rowid column. -Original Message- From: [] On Behalf Of Abhinav Upadhyay Sent: Thursday,

Re: [sqlite] Minimize sqlite3.o size

2011-07-12 Thread Michael Stephenson
Add #include or #include "SomeHeader.h" to the top of the amalgamation, then define them in SomeHeader.h? -Original Message- From: [] On Behalf Of Baruch Burstein Sent: Tuesday, July 12, 2011 10:48 AM To: General

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread Michael Stephenson
What if you put a semicolon at the end of the query text? -Original Message- From: [] On Behalf Of James_21th Sent: Thursday, July 07, 2011 3:32 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Insert

Re: [sqlite] Insert not working for sqlite3

2011-07-06 Thread Michael Stephenson
I don't see something like a "create table tbl1(one, two);" statement. -Original Message- From: [] On Behalf Of James_21th Sent: Thursday, July 07, 2011 1:52 AM To: General Discussion of SQLite Database Subject:

Re: [sqlite] Minimal SQLite

2011-07-05 Thread Michael Stephenson
You might want to check out various compilation options at: -Original Message- From: [] On Behalf Of Simon Slavin Sent: Monday, July 04, 2011 7:28 AM To: General Discussion of SQLite

Re: [sqlite] How to recover the SQLITE_CORRUPT error in C programming ?

2011-06-27 Thread Michael Stephenson
Perhaps you could look at the code in shell.c and see how it does the .dump, then copy paste or something similar into your own app. I'm not sure if there might be issues with functions declared SQLITE_API vs SQLITE_INTERNAL, which may require some additional working around, but hopefully not.

Re: [sqlite] Critical issue

2011-06-21 Thread Michael Stephenson
, on the end-user machine, to an error like "System.DllNotFoundException: Impossible to load the DLL '_SQLite.Interop.DLL_'"? (i.e. an error linked to a different DLL than the one mentioned by Depends) Thanks again very much :) Best regards, Cyrille Le 19/06/2011 20:10, Michael

Re: [sqlite] Critical issue

2011-06-19 Thread Michael Stephenson
for their IE version to see if there is a link with the issue. Regards, Cyrille Le 19/06/2011 05:20, Michael Stephenson a écrit : > If the IE folder is not on the path, yes, you have to either copy it > somewhere on the path, copy it to your application folder, or add the >

Re: [sqlite] Critical issue

2011-06-18 Thread Michael Stephenson
If the IE folder is not on the path, yes, you have to either copy it somewhere on the path, copy it to your application folder, or add the IE folder to the path. I believe that not having the IE folder on the path is a mistake in the installer for the newer versions of IE. Back in the day, I

Re: [sqlite] Breaking a string into two

2011-06-15 Thread Michael Stephenson
Well, it's pretty easy to add regex functionality, for example via PCRE. You can add this to your custom build of SQLite, or you can add it to your client application and register a regex function with SQLite after the database is opened, then use it in your queries. I can provide an example if

[sqlite] Anyway to order query results by "in" list?

2011-06-15 Thread Michael Stephenson
Wondering if anyone has a way to execute a query that selects rows based on a list of rowids and returns the results in the order of the rowids passed in. Thanks, ~Mike ___ sqlite-users mailing list

Re: [sqlite] Trigger help needed

2011-06-01 Thread Michael Stephenson
NEW.timestamp < OLD.timestamp (less than)? -Original Message- From: [] On Behalf Of Jim Mellander Sent: Wednesday, June 01, 2011 3:31 PM To: General Discussion of SQLite Database Subject: [sqlite] Trigger help needed

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Michael Stephenson
I don't see anywhere a "sqlCmd.Execute()" or whatever the method is to execute the command. -Original Message- From: [] On Behalf Of Don Ireland Sent: Tuesday, May 31, 2011 11:21 PM To: General Discussion of SQLite

Re: [sqlite] Is it possible to optimize the readperformanceofa C++ app using sqlite pragma journal_mode = wal

2011-05-29 Thread Michael Stephenson
If you change the page size after the database has been created and written to, yes, you need to a vacuum to have SQLite reorganize the database pages. Note that even this does not work if WAL is in use (if WAL is turned on, then you can't change the database page size after the database has been

Re: [sqlite] Is it possible to optimize the readperformanceof a C++ app using sqlite pragma journal_mode = wal

2011-05-28 Thread Michael Stephenson
journal_mode = wal Michael Stephenson, We want to thank you again for your excellent suggestions regarding how to improve the speed of our Sqlite WAL reads and our deduper prototype. We looked at the SQlite documentation for increasing the Sqlite page size to 4K and an excerpt of our code is shown

Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal

2011-05-27 Thread Michael Stephenson
Not an expert, but I doubt that WAL will have much of anything to do with your read performance after you've populated the database and committed the last insert transaction. WAL mostly deals with inserts ( Once the last transaction is written and you are

Re: [sqlite] Incorrect left join behavior?

2011-05-25 Thread Michael Stephenson
chine = 'machine2' where a.machine = 'machine1'; or select * from test a left join test b on a.component = b.component where a.machine = 'machine1' and (b.machine is null or b.machine = 'machine2'); I think the first syntax is preferable. Pavel On Wed, May 25, 2011 at 9:09 AM, Mich

[sqlite] Incorrect left join behavior?

2011-05-25 Thread Michael Stephenson
Hi, I have a table as below. Note that machine1 has 3 components (1-3), while machine2 has only 1 components (1). Machine Component Version machine1 component1 1 machine1 component2 1 machine1 component3 1 machine2 component1 1 create table test(Machine, Component,