[sqlite] Pragma integrity_check

2019-02-21 Thread Voronin, Konstantin
Hi, I have few questions regarding "Pragma integrity_check" 1. I have test table: PRAGMA ignore_check_constraints = true; CREATE TABLE dtest1(the_key INTEGER NOT NULL, versionId INTEGER , primary key (the_key), check( versionId <> 0 ) ) WITHOUT ROWID INSERT into dtest1 values (0,0); PRA

[sqlite] pragma integrity_check throwing exception

2017-10-03 Thread Roberts, Barry (FINTL)
Hi, Assume I have a database which is "malformed" due to rowid xxx missing from a table index. In the System.Data.SQLite.dll 1.0.80.0 C# driver the following code would return the reason, I would get a list of the rowid problems allowing me to log them. private static IEnumerable Integ

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread Ben Newberg
To be clear, my question about all bets being off sounded more rhetorical in my head than it came out. I'm perfectly content with the outcome, just wanted to share an example of something I accidently learned the hard way when messing with schemas. And thanks to you all I know more about why it hap

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread R Smith
On 2016/10/17 10:40 PM, Ben Newberg wrote: First off, my apologies for hijacking this thread. But I've seen some strange things when messing with pragma writable_schema. It appears all bets are off? example: create a table of columns (x, y, z), and fill it with values. then, modify sqlite_mast

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread Kees Nuyt
On Mon, 17 Oct 2016 15:40:44 -0500, Ben Newberg wrote: > But I've seen some strange things when messing with pragma writable_schema. > It appears all bets are off? Yes. that's why there's a warning: "Warning: misuse of this pragma can easily result in a corrupt database file." When changing an

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread David Raymond
e-users-boun...@mailinglists.sqlite.org] On Behalf Of Ben Newberg Sent: Monday, October 17, 2016 4:41 PM To: SQLite mailing list Subject: Re: [sqlite] pragma integrity_check doesn't check constraints without indices First off, my apologies for hijacking this thread. But I've seen som

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread Ben Newberg
First off, my apologies for hijacking this thread. But I've seen some strange things when messing with pragma writable_schema. It appears all bets are off? example: create a table of columns (x, y, z), and fill it with values. then, modify sqlite_master to take out column z. let's say later on dow

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread Simon Slavin
On 17 Oct 2016, at 8:17am, Torsten Landschoff wrote: > So much about my attempt to report a bug. If you don't want to believe my > report, then don't. Sorry, just to make it clear, I'm just a fellow-user of SQLite. I'm not on the development team. And I totally believe what you wrote. One

[sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-17 Thread Torsten Landschoff
: NOT NULL constraint failed: foo.name === snip > I'm betting that the integrity check works after that. Fine. Let's say $100? As above I already did that in the original email. But here it is again: === snip (loco2-precise)torsten.landschoff@horatio:~$ /op

Re: [sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-14 Thread Simon Slavin
On 13 Oct 2016, at 3:46pm, Torsten Landschoff wrote: > while working on a database upgrade on our application I found a bug in > SQLite. I was adding a not null constraint by updating the sqlite_master > table and to see the check fail used pragma integrity_check to find the > offending rows th

[sqlite] pragma integrity_check doesn't check constraints without indices

2016-10-14 Thread Torsten Landschoff
Hi *, while working on a database upgrade on our application I found a bug in SQLite. I was adding a not null constraint by updating the sqlite_master table and to see the check fail used pragma integrity_check to find the offending rows that I know are there. However, the integrity check just pa

[sqlite] PRAGMA integrity_check says row 2 missing from index

2015-11-05 Thread Zsbán Ambrus
356282677878746339.0); sqlite> INSERT INTO tb(k, v) VALUES (6, 356282677878746340); sqlite> DELETE FROM tb WHERE k = 7; sqlite> SELECT k, v, typeof(v) FROM tb ORDER BY v, k; 6|356282677878746340|integer 8|356282677878746339|integer sqlite> PRAGMA integrity_check; row 2 missing from i

[sqlite] PRAGMA integrity_check

2015-09-11 Thread Simon Slavin
On 11 Sep 2015, at 12:32am, Roman Fleysher wrote: > Meanwhile, I tested if PRAGMA integrity_check checks column constraints. You > can bump up 90% of being sure it does not to 100%. It does not. Is there a > way to do it, other than export the data out and try to re-insert it? I can't think

[sqlite] PRAGMA integrity_check

2015-09-11 Thread Simon Slavin
On 11 Sep 2015, at 12:04am, Roman Fleysher wrote: > I wanted to check the behavior and set up a test database. I use (for now) > SQLite 3.8.8.3 and discovered that setting ignore_check_constraints = 'yes' > did not disable INT PRIMARY KEY NOT NULL constraint on a column. Is that > expected?

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
Database Subject: Re: [sqlite] PRAGMA integrity_check On 9/10/15, Roman Fleysher wrote: > Dear SQLiters, > > PRAGMA integrity_check is described to check UNIQUE and NOT NULL > constraints. Does it check other CHECK constraints specified in the column > definition? > Apparently it do

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
on behalf of Simon Slavin [slav...@bigfraud.org] Sent: Thursday, September 10, 2015 7:35 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] PRAGMA integrity_check On 11 Sep 2015, at 12:32am, Roman Fleysher wrote: > Meanwhile, I tested if PRAGMA integrity_check checks colum

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Simon Slavin
On 10 Sep 2015, at 11:06pm, Roman Fleysher wrote: > PRAGMA integrity_check is described to check UNIQUE and NOT NULL constraints. > Does it check other CHECK constraints specified in the column definition? I'm 90% sure it does not. You should see this one though:

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
: sqlite-users-bounces at mailinglists.sqlite.org [sqlite-users-bounces at mailinglists.sqlite.org] on behalf of Simon Slavin [slav...@bigfraud.org] Sent: Thursday, September 10, 2015 7:28 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] PRAGMA integrity_check On 11 Sep 2015, at 12

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
of SQLite Database Subject: Re: [sqlite] PRAGMA integrity_check On 10 Sep 2015, at 11:06pm, Roman Fleysher wrote: > PRAGMA integrity_check is described to check UNIQUE and NOT NULL constraints. > Does it check other CHECK constraints specified in the column definition? I'm 90% s

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
Dear SQLiters, PRAGMA integrity_check is described to check UNIQUE and NOT NULL constraints. Does it check other CHECK constraints specified in the column definition? Thank you, Roman

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Richard Hipp
On 9/10/15, Roman Fleysher wrote: > Dear SQLiters, > > PRAGMA integrity_check is described to check UNIQUE and NOT NULL > constraints. Does it check other CHECK constraints specified in the column > definition? > Apparently it does not. I thought it did. I'll add that to my list of things to do

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-17 Thread Richard Hipp
On Fri, Dec 17, 2010 at 2:17 AM, Max Vlasov wrote: > On Fri, Dec 17, 2010 at 2:47 AM, Richard Hipp wrote: > > > On Thu, Dec 16, 2010 at 4:12 PM, Marc wrote: > > > > > application. > > > > > > And another is it recommended to do a pragma integrity check every time > > > that > > > our applicatio

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
On Fri, Dec 17, 2010 at 2:47 AM, Richard Hipp wrote: > On Thu, Dec 16, 2010 at 4:12 PM, Marc wrote: > > > application. > > > > And another is it recommended to do a pragma integrity check every time > > that > > our applications is launched? > > > > PRAGMA integrity_check is only recommended aft

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Richard Hipp
On Thu, Dec 16, 2010 at 4:12 PM, Marc wrote: > Hello, > > We have an application that runs under windows that use sqlite to store > data. Our application do a pragma integrity_check every time It's launched. > > One of our users have our application with a database of 180 Mb and It > takes > abou

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
On Fri, Dec 17, 2010 at 12:12 AM, Marc wrote: > > > And another is it recommended to do a pragma integrity check every time > that > our applications is launched? > > to the things Simon wrote I'd add another variant for you. Your program can detect presence of journal file during the start (for

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Simon Slavin
On 16 Dec 2010, at 9:12pm, Marc wrote: > We have an application that runs under windows that use sqlite to store > data. Our application do a pragma integrity_check every time It's launched. Why ? If you distrust your platform that much, you probably shouldn't use it at all. > One of our user

[sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Marc
Hello, We have an application that runs under windows that use sqlite to store data. Our application do a pragma integrity_check every time It's launched. One of our users have our application with a database of 180 Mb and It takes about 6 minutes to complete a Pragma integrity_check the first ti

Re: [sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/17/2010 01:50 PM, Simon Slavin wrote: > Sometimes it's best to use the command-line tool to dump the data to a file > of SQL commands, The command line tool needs its code fixing first: http://www.sqlite.org/src/tktview?name=2466653295 In p

Re: [sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Simon Slavin
On 17 Jun 2010, at 9:45pm, Jim Terman wrote: > Does the integrity_check PRAGMA fix any problems that it encounters or > does it just report them? Report. > Are there anyway of recovering from these errors or is the database > unfixable? Sometimes VACUUM fixes them. It can conceivably make t

[sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Jim Terman
Does the integrity_check PRAGMA fix any problems that it encounters or does it just report them? Are there anyway of recovering from these errors or is the database unfixable? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:808

Re: [sqlite] PRAGMA integrity_check(integer)

2009-08-24 Thread Chang Im (chim)
Hi Simon, > > I have SQLite 2.x database and sometimes it takes a long time to run > > "integrity_check" on the database. > > How long ? Minutes ? Hours ? > > Simon. I have one database file which "pragma integrity_check" never comes back from. I am using "sqlitebrowser 1.1". -chang

Re: [sqlite] PRAGMA integrity_check(integer)

2009-08-21 Thread Simon Slavin
On 21 Aug 2009, at 10:44pm, Chang Im (chim) wrote: > I have SQLite 2.x database and sometimes it takes a long time to run > "integrity_check" on the database. How long ? Minutes ? Hours ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] PRAGMA integrity_check(integer)

2009-08-21 Thread Chang Im (chim)
Hi, I have SQLite 2.x database and sometimes it takes a long time to run "integrity_check" on the database. Looking at the integrity_check option "(integer), we could control how many errors to return from the check. I tried the option, but it generated a syntax error. Is the option supported?

[sqlite] Pragma integrity_check and attached ddatabases

2008-11-03 Thread BR-Software
Hello, Will "pragma integrity_check" also check attached databases? Best regards Baard Riiber ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] PRAGMA integrity_check

2006-09-04 Thread Marco Bambini
From the manual: PRAGMA integrity_check: The command does an integrity check of the entire database. It looks for out-of-order records, missing pages, malformed records, and corrupt indices. If any problems are found, then a single string is returned which is a description of all problems.