Re: [sqlite] A sqlite c++ wrapper, sqlite3x

2012-02-06 Thread ayck2008
Thank you for your reply, I will contact the author. - 原文 - 发件人: Truls Haaland 主 题: Re: [sqlite] A sqlite c++ wrapper, sqlite3x时 间: 2012年2月7日 14:53:36> Hello everyone,    My project used sqlite3x, a sqlite c++ wrapper. Now for some reason, I wanna upgrade sqlite3 to version 3.7.10.>  I

Re: [sqlite] A sqlite c++ wrapper, sqlite3x

2012-02-06 Thread Truls Haaland
> Hello everyone,    My project used sqlite3x, a sqlite c++ wrapper. Now for > some reason, I wanna upgrade sqlite3 to version 3.7.10. >  I search the Internet hours, but I don't find the sqlite3x that support 3.7. >Have someone used sqlite3x? I need some advice. sqlite3x web site is at: http://

[sqlite] A sqlite c++ wrapper, sqlite3x

2012-02-06 Thread ayck2008
Hello everyone, My project used sqlite3x, a sqlite c++ wrapper. Now for some reason, I wanna upgrade sqlite3 to version 3.7.10. I search the Internet hours, but I don't find the sqlite3x that support 3.7. Have someone used sqlite3x? I need some advice. ___

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

2012-02-06 Thread Simon Slavin
On 6 Feb 2012, at 11:31pm, Roger Binns wrote: > [nicely rebuffed my earlier post] Okay, you convinced me. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Why does an RTREE leave its statement handles open after access?

2012-02-06 Thread Peter Aronson
I added some code before my call to sqlite3_close recently, like so: hstmt = NULL; while (hstmt = sqlite3_next_stmt (db,hstmt)) {   sql = sqlite3_sql (hstmt);   if (!sql) sql = "-"   fprintf (log,"Unfinalized statement handle found on database close for [%s]\n",sql);   sqlite3_finalize (hstmt);

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

2012-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/02/12 14:38, Simon Slavin wrote: > File systems (FAT, NTFS, HTFS) already have block checksums. Huh? FAT has a checksum on the super block but not on datablocks. NTFS does not have block checksums. That is why they are introducing ReFS. What

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

2012-02-06 Thread Nico Williams
On Mon, Feb 6, 2012 at 4:38 PM, Simon Slavin wrote: > On 6 Feb 2012, at 9:49pm, Nico Williams wrote: >> Encryption is not enough.  You really need block pointers to carry the >> block checksum/hash/MAC/integrity tag. > > File systems (FAT, NTFS, HTFS) already have block checksums.  So do network

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

2012-02-06 Thread Simon Slavin
On 6 Feb 2012, at 9:49pm, Nico Williams wrote: > On Mon, Feb 6, 2012 at 2:27 PM, Roger Binns wrote: >> Approximately zero percent of SQLite databases will be on btrfs for the >> foreseeable future, even if you and I start using btrfs. Android 3 and >> above do support encrypting the filesystem

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

2012-02-06 Thread Nico Williams
On Mon, Feb 6, 2012 at 2:27 PM, Roger Binns wrote: > On 06/02/12 11:35, Nico Williams wrote: >> Indeed, but if you'd do integrity protection at the application layer >> then surely you'd have have a backup/restore strategy to deal with >> lower-layer corruption. > > Only if you know about that cor

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/02/12 12:50, Tim Streater wrote: > Can that [pragma user_version] be relied upon, though? It is used by both Firefox and Android. The actual value is stored in the SQLite header. It would be astonishing and unprecedented for the SQLite team to

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Nico Williams
I'm pretty sure that the user_version pragma is considered stable. That said, if your application is in full control of the DB then you could just check the exact create statements logged in sqlite_master (this is probably less stable, ironically enough). __

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 19:31, Ryan Johnson wrote: > On 06/02/2012 1:59 PM, Bill McCormick wrote: >> The order is not important. What is important is that I come up with >> some way to manage version updates. I've tried doing something similar >> in the past using an "alter tables" script (using a di

Re: [sqlite] Relations in sqlite and checking consistency of existing data base

2012-02-06 Thread Agrawal, Manish
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kees Nuyt Sent: Monday, February 06, 2012 3:29 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Relations in sqlite and checking consistency of existing data base On Sun, 5

Re: [sqlite] Relations in sqlite and checking consistency of existing data base

2012-02-06 Thread Kees Nuyt
On Sun, 5 Feb 2012 18:39:40 +0100, Marek Staniewski wrote: >Hello > >I am a kind of newbie in sqlite world. >I have several questions about sqlite data base: > >1. Is there any way to read relations inside > some sqlite data base (some way of deduction from data base contents) Not in the engine

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

2012-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/02/12 11:35, Nico Williams wrote: > Indeed, but if you'd do integrity protection at the application layer > then surely you'd have have a backup/restore strategy to deal with > lower-layer corruption. Only if you know about that corruption! It

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

2012-02-06 Thread Nico Williams
On Mon, Feb 6, 2012 at 1:20 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/02/12 09:11, Nico Williams wrote: >> A checksum per-row is certainly a valuable thing at the layer above the >> RDBMS since it allows for integrity checking above the RBDMS, and in an >>

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Ryan Johnson
On 06/02/2012 1:59 PM, Bill McCormick wrote: Nico Williams wrote, On 2/6/2012 12:44 PM: On Mon, Feb 6, 2012 at 9:36 AM, Bill McCormick wrote: Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to sav

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

2012-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/02/12 09:11, Nico Williams wrote: > A checksum per-row is certainly a valuable thing at the layer above the > RDBMS since it allows for integrity checking above the RBDMS, and in an > RBDMS-independent manner. It doesn't actually help that much

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Bill McCormick
Nico Williams wrote, On 2/6/2012 12:44 PM: On Mon, Feb 6, 2012 at 9:36 AM, Bill McCormick wrote: Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to save the data in an existing table; drop the table

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Nico Williams
On Mon, Feb 6, 2012 at 9:36 AM, Bill McCormick wrote: > Is there no way to force columns added to a table with alter table to be > added at certain column positions? > > Alternatively, if there is some way to save the data in an existing table; > drop the table; re-create the table with the desire

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Black, Michael (IS)
Hmmmcould .dump also have the ability to put out the column names for the inserts? That would solve this problem without having to write a special program to do it yourself. I suppose somebody might already have made a utility to do this? Michael D. Black Senior Scientist Advanced

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

2012-02-06 Thread Nico Williams
A checksum per-row is certainly a valuable thing at the layer above the RDBMS since it allows for integrity checking above the RBDMS, and in an RBDMS-independent manner. Of course, this approach is easiest to graft into SQLite3 simply because you'd be adding a hidden column and the machinery for m

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Gerry Snyder
On 2/6/2012 9:22 AM, Bill McCormick wrote: Sorry, I should have mentioned that I did see that, but it doesn't quite fit my application. I need a script that doesn't care what the existing table looks like. In my situation, I may have dozens of databases among different locations, perhaps not al

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Bill McCormick
Gerry Snyder wrote, On 2/6/2012 9:48 AM: On 2/6/2012 8:36 AM, Bill McCormick wrote: Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to save the data in an existing table; drop the table; re-create

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Gerry Snyder
On 2/6/2012 8:36 AM, Bill McCormick wrote: Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to save the data in an existing table; drop the table; re-create the table with the desired schema; and th

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Puneet Kishor
On Feb 6, 2012, at 9:36 AM, Bill McCormick wrote: > Is there no way to force columns added to a table with alter table to be > added at certain column positions? > > Alternatively, if there is some way to save the data in an existing table; > drop the table; re-create the table with the desire

[sqlite] ALTER TABLE

2012-02-06 Thread Bill McCormick
Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to save the data in an existing table; drop the table; re-create the table with the desired schema; and then reload the data, this would be useful as

Re: [sqlite] Efficiency of concatenation on UPDATE

2012-02-06 Thread Hamish Allan
On 6 February 2012 05:20, Dan Kennedy wrote: > I think when two doclists are merged both are loaded into memory. > Some types of queries load the entire doclist for a term into > memory too. Hmm, sounds like I definitely need to stick with rows representing document pages rather than whole docum

Re: [sqlite] Nested transaction

2012-02-06 Thread Jay A. Kreibich
On Mon, Feb 06, 2012 at 08:20:48PM +0530, Sreekumar TP scratched on the wall: > so if stmt1 & stmt2 are executed on different threads , but on the same > connection, they would not block each other? They would not block each other due to database access locks. They may or may not block each o

Re: [sqlite] Nested transaction

2012-02-06 Thread Sreekumar TP
so if stmt1 & stmt2 are executed on different threads , but on the same connection, they would not block each other? Sreekumar On Feb 6, 2012 8:08 PM, "Igor Tandetnik" wrote: > Sreekumar TP wrote: > > well, if stmt1 is a write transaction, it would aquire an exclusive lock. > > if stmt2 is a re

Re: [sqlite] Nested transaction

2012-02-06 Thread Igor Tandetnik
Sreekumar TP wrote: > well, if stmt1 is a write transaction, it would aquire an exclusive lock. > if stmt2 is a read transaction, it would fail acquiring a shared lock The concept of a transaction exists on a per-connection basis, not per-statement. Transaction isolation applies to statements ru

Re: [sqlite] Nested transaction

2012-02-06 Thread Jay A. Kreibich
On Mon, Feb 06, 2012 at 07:46:18PM +0530, Sreekumar TP scratched on the wall: > well, if stmt1 is a write transaction, it would aquire an exclusive lock. > if stmt2 is a read transaction, it would fail acquiring a shared lock since > the exclusive lock is not released. . unless sqlite decides to 'd

Re: [sqlite] Nested transaction

2012-02-06 Thread Sreekumar TP
well, if stmt1 is a write transaction, it would aquire an exclusive lock. if stmt2 is a read transaction, it would fail acquiring a shared lock since the exclusive lock is not released. . unless sqlite decides to 'downgrade' the exclusive lock to a 'shared' lock. Sreekumar On Feb 6, 2012 7:07 PM,

Re: [sqlite] Nested transaction

2012-02-06 Thread Igor Tandetnik
Sreekumar TP wrote: > Why is this treated as a a single transaction? Well, because that's how SQLite works. Why shouldn't it be? -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sq

Re: [sqlite] Nested transaction

2012-02-06 Thread Sreekumar TP
Why is this treated as a a single transaction? Sreekumar On Feb 6, 2012 6:27 PM, "Igor Tandetnik" wrote: > Sreekumar TP wrote: > > I have a nested transaction as follows - > > > > sqlite3_prepare_v2(db, stmt1..) > > sqlite3_prepare_v2(db, stmt2..) > > > > sqlite3_step(stmt1) > > sqlite3_step(

[sqlite] Relations in sqlite and checking consistency of existing data base

2012-02-06 Thread Marek Staniewski
Hello I am a kind of newbie in sqlite world. I have several questions about sqlite data base: 1. Is there any way to read relations inside some sqlite data base (some way of deduction from data base contents) 2. Let say I would like to check consistency/errors of my sqlite data bas

Re: [sqlite] Nested transaction

2012-02-06 Thread Richard Hipp
On Mon, Feb 6, 2012 at 7:57 AM, Igor Tandetnik wrote: > Sreekumar TP wrote: > > I have a nested transaction as follows - > > > > sqlite3_prepare_v2(db, stmt1..) > > sqlite3_prepare_v2(db, stmt2..) > > > > sqlite3_step(stmt1) > > sqlite3_step(stmt2) > > sqlite3_reset(stmt2) > > sqlite3_step(st

Re: [sqlite] Nested transaction

2012-02-06 Thread Igor Tandetnik
Sreekumar TP wrote: > I have a nested transaction as follows - > > sqlite3_prepare_v2(db, stmt1..) > sqlite3_prepare_v2(db, stmt2..) > > sqlite3_step(stmt1) > sqlite3_step(stmt2) > sqlite3_reset(stmt2) > sqlite3_step(stmt1) There is only one transaction here - an implicit one, started by sq

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

2012-02-06 Thread Andy Gibbs
On 4th February 2012 12:51pm, Alexey Pechnikov wrote: > It's very important but there are some questions about > http://www.sqlite.org/src/info/72b01a982a > Some times ago DRH wrote that checksum calculation don't slow down > SQLite significantly. > But can be this realized in current SQLite 3.x b

Re: [sqlite] Problem of using amalgamation with Visual C++ 2005

2012-02-06 Thread Richard Hipp
On Mon, Feb 6, 2012 at 2:35 AM, ASURADA wrote: > I was test about insert sqlite library to mfc project. > I used amalgamaion files of version 3.7.10. > > It was fail with Visual C++ 2005. but success with Visual C++ 2010. > > The error occured on 35393 line of sqlite3.c when It call the > sqlite3

[sqlite] Nested transaction

2012-02-06 Thread Sreekumar TP
Hi, I have a nested transaction as follows - sqlite3_prepare_v2(db, stmt1..) sqlite3_prepare_v2(db, stmt2..) sqlite3_step(stmt1) sqlite3_step(stmt2) sqlite3_reset(stmt2) sqlite3_step(stmt1) (1) SQLITE , as I understand does not support nested transaction, hence the the above statement sh