Re: [sqlite] Round-tripping SQLite back and forth between text representation.

2018-07-11 Thread Richard Hipp
On 7/11/18, Randall Smith  wrote:
>
> My wishlist is:
>
> (o) Allow humans to view the contents of a DB without custom tools.

SQLite database file are binary.  That is a necessity in any format
that needs to store binary data.  On the other hand, the SQLite
database file format is carefully and fully documented
(https://www.sqlite.org/fileformat2.html) and there have been
multiple, independent implementations of readers and writers for that
file format.  SQLite databases are one of only three formats (the
others being JSON and CSV) recommended by the US Library of Congress
for archival storage of datasets.
(https://www.sqlite.org/locrsf.html).  The SQLite database library is
the second mostly widely deployed bit of software in the world -
second only to zlib - so the tools needed to read SQLite are probably
already available on your system.  SQLite is baked into every Mac and
Windows machine.  SQLite is not a thoroughly baked into Linux
machines, but it is still pretty common.

Text files are also opaque binaries in the sense that they are stored
using a binary encoding on a disk drive or SSD.  They seem less opaque
because you have tools easily at hand (a filesystem and "cat") to
access them.  The point is this: Tools to access SQLite are also
widely available.  Perhaps not quite as widely as "cat", but nearly
so.

"Opaque" vs. "non-opaque" is not a binary property of data files.  It
is a question of degree.  A text file might seem less opaque than a
database, but that depends to some extent on the text that it
contains.  Try reading the HTML for a typical website.  Or trying
reading the XML that is at the core of a Word document or Power-Point
presentation.  Those files are all text, but they seem pretty opaque
to me.

> (o) Have a way to see what has changed between V1 and V2 of a database,
> e.g., for a "change review."

The "sqldiff" utility program will do this for you.  Just as with the
unix "diff" command, the "sqldiff" shows you (in human-readable form)
the difference between two SQLite database files.  The output takes
the form of SQL statements that will transform the first file into the
second.

> (o) Have a way to merge two independent sets of database changes into a
> single result in an understandable way.

The sqldiff command will do this.  If you have a baseline database B,
and two separate derivative databases D1 and D2, you can merge those
changes together by computing the differences in B->D1 and applying
those changes to D2.  Or compute the differences from B->D2 and apply
those changes to D1.  As with "patch" or "diff3", there is the
possibility of merge conflicts, but you a clean merge surprisingly
often.

> (o) Have a way to make changes (update, insert, delete) to the DB data in a
> pinch without specialized tools.

I guess it all comes down to how you define "specialized".  At some
point, tools become sufficiently ubiquitous and common-place that they
cease to be specialized.  The SQLite command-line shell may have
reached that threshold.  If not, it is certainly close.  SQLite is
certainly not obscure or esoteric.  It comes installed by default on
just about every computer you can purchase today.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Round-tripping SQLite back and forth between text representation.

2018-07-11 Thread Simon Slavin
On 11 Jul 2018, at 6:01pm, Randall Smith  wrote:

> (o) Allow humans to view the contents of a DB without custom tools.
> (o) Have a way to see what has changed between V1 and V2 of a database, e.g., 
> for a "change review."

SQL is based around Ted Codd's view of relational databases.  One of the 
fundamentals of this view is that a table of rows has no inherent order.  Rows 
of data in one table are like pebbles in a bag, not dots on a line.  Or, if you 
prefer computing terms, they're a set, not an array.

However a text file does have an inherent order.  So any tool that coverts a 
SQL database to a text file must do something arbitrary: pick an order.  The 
conclusion is that if you're comparing two databases you need to compare them 
while they're databases, not when you're looking at them as text files.

So if your first point above comes down to "view the database as text" then the 
above two points conflict with one-another.  You need to do that first point 
and the second point as two separate procedures, not do step 1 then use the 
output of that for step 2.

As a more direct answer to an earlier question, the ".dump" command of the CLI 
does dump the data in a predictable and consistent order.  But it is not 
documented to do so.  So a future version can change that.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Minimum Delta Time

2018-07-11 Thread Stephen Chrzanowski
Paul;

I can't use a trigger without having to create it, do the update, then
destroy the trigger.  There are form elements that can change these times
(I submit at time start at 3pm, but I actually started at 2pm).  If the
time spent is less than 5 minutes, then

David;

I like that.  Didn't think of max.

On Wed, Jul 11, 2018 at 12:21 PM, Paul Sanderson <
sandersonforens...@gmail.com> wrote:

> How about just using a trigger to check if endtime is < starttime+10 and
> updating if it fires
>
> Paul
> www.sandersonforensics.com
> SQLite Forensics Book 
>
> On 11 July 2018 at 17:09, David Raymond  wrote:
>
> > For a minimum of 10 minutes it'd be something like
> >
> > update TimeEvents
> > set EndTime = max(
> > current_timestamp,
> > datetime(StartTime, '+10 minutes')
> > )
> > where
> > EventID = ?
> > and (EndTime is null or EndTime = '');
> >
> >
> > -Original Message-
> > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > On Behalf Of Stephen Chrzanowski
> > Sent: Wednesday, July 11, 2018 10:25 AM
> > To: General Discussion of SQLite Database
> > Subject: [sqlite] Minimum Delta Time
> >
> > I've got an application that I've written that keeps track of time spent
> on
> > particular tasks.  I do many things throughout the day, going between
> > different tasks, and tasks I've already worked on for today, so this tool
> > is incredibly helpful to help justify my warming a chair.
> >
> > I'd prefer the SQL code to handle this particular procedure I'm about to
> > describe.  Obviously, in the application, I can make an additional trip
> to
> > the database to yank out the start time, add the 10 minutes, then do the
> > update, but I'd rather the database deal with this particular business
> rule
> > since the handling of the actual values is done at the database level.
> >
> > At the bottom of this email is the Delphi code and the table schema I'm
> > interested in.
> >
> > What I have is a button on the UI that toggles start/stop work times on a
> > particular task.  The Delphi Code below shows the toggling methodology.
> My
> > interest is modifying the Stop part so that at a minimum, there is a 10
> > minute delta between the start and end time.  So if I start a timer at
> > 11:00, then stop at 11:01, I want the database to update the end time to
> > 11:10.
> >
> > I suspect a SQLite CASE statement may be of help, but I'm not sure how to
> > check for the 10 minute delta then update the row with the altered time
> or
> > the real time.
> >
> >
> >
> > *Delphi Code:*
> > tbl:=db.GetTable('select EndTime from TimeEvents where EventID=? order by
> > StartTime desc',[EventID]);
> > // If this task doesn't have a previous timer, or, this task has no
> > currently running timers, make a new timer
> > // otherwise, stop the currently running timer
> > if (tbl.RowCount=0)or(tbl.FieldByName['EndTime']<>'') then begin
> >   db.ExecSQL('insert into TimeEvents (EventID) values (?)',[EventID]);
> > end else begin
> >   db.ExecSQL('update TimeEvents set EndTime=current_timestamp where
> > EventID=? and (EndTime is null or EndTime="")',[EventID]);
> > end;
> >
> > *Table Schema*
> > CREATE TABLE [TimeEvents](
> >   [EventNumber] INTEGER PRIMARY KEY AUTOINCREMENT,
> >   [EventID] integer NOT NULL REFERENCES [tEvents]([EventID]) ON DELETE
> > CASCADE,
> >   [StartTime] DATETIME(10) NOT NULL DEFAULT CURRENT_TIMESTAMP,
> >   [EndTime] DATETIME);
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Round-tripping SQLite back and forth between text representation.

2018-07-11 Thread Randall Smith
On 2018/07/10 8:27 PM, Randall Smith wrote:

> One follow-up: Do you know if the dump output is "deterministic" over

> time? That is, if I diff two dumps taken at different times, will the

> unchanged material be in the same order and so on? Or is the ordering

> effectively random?

> My underlying question is "can text-comparing two DB dumps be used to 
> determine what has changed?"





On 2018/07/11 Simon wrote:

I am not sure if it is 100% deterministic - it probably is, however, I would 
like to point out that while parsing a dump (supposing it IS deterministic) is 
possible, writing some code to check congruence between two DBs at the business 
end of the SQLite API is significantly better, much easier and always 100% 
deterministic.



Not only that, but the sqldiff command-line utility (download page) does it 
already (though you may require a more specific result, but at a minimum its a 
good start).



Is there perhaps a specific difficulty which makes you think that parsing the 
dump would provide a better/easier insight into which data changed?



Fundamental problems with SQLite or other binary representations are (a) the 
information represented is opaque unless one spends time and money creating 
bespoke tools to allow viewing and technical reviews of the content, and (b) 
there is no simple way to allow concurrent development of info by several 
people and to reconcile independent changes into a coherent whole ("merging").  
These are both mission critical for a team effort of any size (even size=2!). 
The software industry has historically avoided these problems by storing 
everything in the form of text files, and has developed elaborate tools and 
procedures for viewing, reviewing, storing, and merging information in this 
form and as a result large teams can collaborate on a rapidly evolving body of 
digital information easily and well.

Binary file formats like SQLite, while having many compelling advantages, have 
a hard time penetrating into areas where multiple people need to collaborate on 
an evolving body of information because of the limitations described above.  
IMO this is an urgent problem and one that has not been solved very well for 
SQLite.  I don't have the wherewithal to solve it generally, but I am trying to 
see if there are ways to bridge the gap between SQLite DBs and existing 
team-capable workflows built around text files.

My wishlist is:

(o) Allow humans to view the contents of a DB without custom tools.
(o) Have a way to see what has changed between V1 and V2 of a database, e.g., 
for a "change review."
(o) Have a way to merge two independent sets of database changes into a single 
result in an understandable way.
(o) Have a way to make changes (update, insert, delete) to the DB data in a 
pinch without specialized tools.

I'm thinking the dump approach you described previously has promise provided 
certain criteria are met.  Interestingly, the text representation produced by 
dump is about the same size as the "normal" binary form, and it will compress 
to about 1/8 the size of the binary form.  So it's not a bad archival format.

Randall.



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Minimum Delta Time

2018-07-11 Thread Paul Sanderson
How about just using a trigger to check if endtime is < starttime+10 and
updating if it fires

Paul
www.sandersonforensics.com
SQLite Forensics Book 

On 11 July 2018 at 17:09, David Raymond  wrote:

> For a minimum of 10 minutes it'd be something like
>
> update TimeEvents
> set EndTime = max(
> current_timestamp,
> datetime(StartTime, '+10 minutes')
> )
> where
> EventID = ?
> and (EndTime is null or EndTime = '');
>
>
> -Original Message-
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of Stephen Chrzanowski
> Sent: Wednesday, July 11, 2018 10:25 AM
> To: General Discussion of SQLite Database
> Subject: [sqlite] Minimum Delta Time
>
> I've got an application that I've written that keeps track of time spent on
> particular tasks.  I do many things throughout the day, going between
> different tasks, and tasks I've already worked on for today, so this tool
> is incredibly helpful to help justify my warming a chair.
>
> I'd prefer the SQL code to handle this particular procedure I'm about to
> describe.  Obviously, in the application, I can make an additional trip to
> the database to yank out the start time, add the 10 minutes, then do the
> update, but I'd rather the database deal with this particular business rule
> since the handling of the actual values is done at the database level.
>
> At the bottom of this email is the Delphi code and the table schema I'm
> interested in.
>
> What I have is a button on the UI that toggles start/stop work times on a
> particular task.  The Delphi Code below shows the toggling methodology.  My
> interest is modifying the Stop part so that at a minimum, there is a 10
> minute delta between the start and end time.  So if I start a timer at
> 11:00, then stop at 11:01, I want the database to update the end time to
> 11:10.
>
> I suspect a SQLite CASE statement may be of help, but I'm not sure how to
> check for the 10 minute delta then update the row with the altered time or
> the real time.
>
>
>
> *Delphi Code:*
> tbl:=db.GetTable('select EndTime from TimeEvents where EventID=? order by
> StartTime desc',[EventID]);
> // If this task doesn't have a previous timer, or, this task has no
> currently running timers, make a new timer
> // otherwise, stop the currently running timer
> if (tbl.RowCount=0)or(tbl.FieldByName['EndTime']<>'') then begin
>   db.ExecSQL('insert into TimeEvents (EventID) values (?)',[EventID]);
> end else begin
>   db.ExecSQL('update TimeEvents set EndTime=current_timestamp where
> EventID=? and (EndTime is null or EndTime="")',[EventID]);
> end;
>
> *Table Schema*
> CREATE TABLE [TimeEvents](
>   [EventNumber] INTEGER PRIMARY KEY AUTOINCREMENT,
>   [EventID] integer NOT NULL REFERENCES [tEvents]([EventID]) ON DELETE
> CASCADE,
>   [StartTime] DATETIME(10) NOT NULL DEFAULT CURRENT_TIMESTAMP,
>   [EndTime] DATETIME);
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Minimum Delta Time

2018-07-11 Thread David Raymond
For a minimum of 10 minutes it'd be something like

update TimeEvents
set EndTime = max(
current_timestamp,
datetime(StartTime, '+10 minutes')
)
where
EventID = ?
and (EndTime is null or EndTime = '');


-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Stephen Chrzanowski
Sent: Wednesday, July 11, 2018 10:25 AM
To: General Discussion of SQLite Database
Subject: [sqlite] Minimum Delta Time

I've got an application that I've written that keeps track of time spent on
particular tasks.  I do many things throughout the day, going between
different tasks, and tasks I've already worked on for today, so this tool
is incredibly helpful to help justify my warming a chair.

I'd prefer the SQL code to handle this particular procedure I'm about to
describe.  Obviously, in the application, I can make an additional trip to
the database to yank out the start time, add the 10 minutes, then do the
update, but I'd rather the database deal with this particular business rule
since the handling of the actual values is done at the database level.

At the bottom of this email is the Delphi code and the table schema I'm
interested in.

What I have is a button on the UI that toggles start/stop work times on a
particular task.  The Delphi Code below shows the toggling methodology.  My
interest is modifying the Stop part so that at a minimum, there is a 10
minute delta between the start and end time.  So if I start a timer at
11:00, then stop at 11:01, I want the database to update the end time to
11:10.

I suspect a SQLite CASE statement may be of help, but I'm not sure how to
check for the 10 minute delta then update the row with the altered time or
the real time.



*Delphi Code:*
tbl:=db.GetTable('select EndTime from TimeEvents where EventID=? order by
StartTime desc',[EventID]);
// If this task doesn't have a previous timer, or, this task has no
currently running timers, make a new timer
// otherwise, stop the currently running timer
if (tbl.RowCount=0)or(tbl.FieldByName['EndTime']<>'') then begin
  db.ExecSQL('insert into TimeEvents (EventID) values (?)',[EventID]);
end else begin
  db.ExecSQL('update TimeEvents set EndTime=current_timestamp where
EventID=? and (EndTime is null or EndTime="")',[EventID]);
end;

*Table Schema*
CREATE TABLE [TimeEvents](
  [EventNumber] INTEGER PRIMARY KEY AUTOINCREMENT,
  [EventID] integer NOT NULL REFERENCES [tEvents]([EventID]) ON DELETE
CASCADE,
  [StartTime] DATETIME(10) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  [EndTime] DATETIME);
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Minimum Delta Time

2018-07-11 Thread Simon Slavin
On 11 Jul 2018, at 3:25pm, Stephen Chrzanowski  wrote:

> interest is modifying the Stop part so that at a minimum, there is a 10
> minute delta between the start and end time.  So if I start a timer at
> 11:00, then stop at 11:01, I want the database to update the end time to
> 11:10.

To round a timestamp to ten minutes ...

Get the timestamp as a string using datetime(now)
--> "-MM-DD HH:MM:SS"

Get the first 15 characters of it using substr(X,1,15)
--> "-MM-DD HH:M"

Append "0:00" using the || operator
--> "-MM-DD HH:M0:00"

All together now:

substr(datetime(now),1,15) || "0:00"

Then convert the string back into whatever form you want to store your dates in.

If you do this to two times close together, you may end up with two results 
which are the same.  In other words, your timestamp field cannot have a UNIQUE 
requirement.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Minimum Delta Time

2018-07-11 Thread Stephen Chrzanowski
I've got an application that I've written that keeps track of time spent on
particular tasks.  I do many things throughout the day, going between
different tasks, and tasks I've already worked on for today, so this tool
is incredibly helpful to help justify my warming a chair.

I'd prefer the SQL code to handle this particular procedure I'm about to
describe.  Obviously, in the application, I can make an additional trip to
the database to yank out the start time, add the 10 minutes, then do the
update, but I'd rather the database deal with this particular business rule
since the handling of the actual values is done at the database level.

At the bottom of this email is the Delphi code and the table schema I'm
interested in.

What I have is a button on the UI that toggles start/stop work times on a
particular task.  The Delphi Code below shows the toggling methodology.  My
interest is modifying the Stop part so that at a minimum, there is a 10
minute delta between the start and end time.  So if I start a timer at
11:00, then stop at 11:01, I want the database to update the end time to
11:10.

I suspect a SQLite CASE statement may be of help, but I'm not sure how to
check for the 10 minute delta then update the row with the altered time or
the real time.



*Delphi Code:*
tbl:=db.GetTable('select EndTime from TimeEvents where EventID=? order by
StartTime desc',[EventID]);
// If this task doesn't have a previous timer, or, this task has no
currently running timers, make a new timer
// otherwise, stop the currently running timer
if (tbl.RowCount=0)or(tbl.FieldByName['EndTime']<>'') then begin
  db.ExecSQL('insert into TimeEvents (EventID) values (?)',[EventID]);
end else begin
  db.ExecSQL('update TimeEvents set EndTime=current_timestamp where
EventID=? and (EndTime is null or EndTime="")',[EventID]);
end;

*Table Schema*
CREATE TABLE [TimeEvents](
  [EventNumber] INTEGER PRIMARY KEY AUTOINCREMENT,
  [EventID] integer NOT NULL REFERENCES [tEvents]([EventID]) ON DELETE
CASCADE,
  [StartTime] DATETIME(10) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  [EndTime] DATETIME);
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Corrupted FTS5 index? disk image is malformed

2018-07-11 Thread Nick
 
 
 
>  
> On 11 Jul 2018 at 9:28 am,wrote:
>  
>  
>  Yours is not a contentless table. It is an "external content" table. Dan. 

 
>  
>  
>
>  
>  
>Noted. Thanks for the clarification.
> Regards  
 
> Nick
 
 
 
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Round-tripping SQLite back and forth between text representation.

2018-07-11 Thread Will Parsons
On Tuesday, 10 Jul 2018  2:27 PM -0400, Randall Smith wrote:


> My underlying question is "can text-comparing two DB dumps be used
> to determine what has changed?"

I don't know if it will meet your needs, but I've written a script for
my own purposes to compare DB changes.  Since it's fairly short, I
include it here.

--8<---cut here---start->8---
#!/bin/sh
# Compare two SQLite3 databases.
# If invoked under the name "tksql3diff", the diff is displayed graphically
# using tkdiff to display the differences.
#
# Last modified:  10-Jul-2018  Wm. Parsons

if [ $# -ne 2 ]
then
   echo "Usage: `basename $0`  "
   exit
fi

if [ `basename $0` = "tksql3diff" ]
then
   diff=tkdiff
else
   diff=diff
fi

file1=$1
file2=$2

dump()
{
   file=$1

   # check that the file is readable
   if [ ! -r $file ]
   then
  echo "cannot read $file" >&2
  exit 1
   fi

   sql="select 'Application ID:'; pragma application_id;
select 'User version:'; pragma user_version;"
   tables=`sqlite3 $file < $file.dump
}

dump $file1
dump $file2

$diff $file1.dump $file2.dump

rm $file1.dump $file2.dump
--8<---cut here---end--->8---

Note:  This *probably* doesn't play well if you have BLOB fields in
your database.

-- 
Will

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] auto_vacuum resets after '.dump'

2018-07-11 Thread Sergiy Ivanov
I have two databases: original.db and backup.db. backup.db is created via:
sqlite3 original.db '.dump' | sqlite3 backup.db

Original DB had 'auto_vacuum' set to 'FULL' . Backup DB has it set to 'None'.


sqlite3 --version
3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f
under ubuntu 16.04


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Corrupted FTS5 index? disk image is malformed

2018-07-11 Thread Dan Kennedy

On 07/11/2018 04:04 AM, Nick wrote:

On 10 Jul 2018, at 21:17, Dan Kennedy wrote:

Try running the FTS5 integrity-check command with the 3.24.0 command line to 
ensure it really is corrupt:

  https://www.sqlite.org/fts5.html#the_integrity_check_command

The index can be rebuilt using the rebuild command:

  https://www.sqlite.org/fts5.html#the_rebuild_command

3.13.0 was about 2 years ago. There have been a couple of fixes for fts5 
corruption bugs since then. This one, for example:

  https://www.sqlite.org/src/info/9a2de4f05fabf7e7

So you may have hit a known issue. Hard to say.

Dan.


Thanks Dan.

Reading the webpage it says it doesn't work for contentless FTS5 but ran the 
commands anyway


Yours is not a contentless table. It is an "external content" table.

Dan.





sqlite> INSERT INTO [i_epg]([i_epg]) VALUES('integrity-check');
Error: database disk image is malformed
sqlite> INSERT INTO [i_epg]([i_epg]) VALUES('rebuild');
sqlite> INSERT INTO [i_epg]([i_epg]) VALUES('integrity-check');
sqlite>

Running previous commands also seem to show its been fixed

sqlite> SELECT * FROM [i_epg] WHERE [i_epg] MATCH '{ mangled_title } : big + 
ban';
sqlite> SELECT * FROM [i_epg] WHERE [i_epg] MATCH '{ mangled_title } : big + 
ban*';

sqlite> SELECT [mangled_title] FROM [i_epg] WHERE [i_epg] MATCH '{ 
mangled_title } : black + adder';
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
The Black Adder
sqlite>

Thanks again Dan.

Regards
Nick

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users