On Mon, 2007-04-09 at 13:02 -0700, Scott Hess wrote:
> Thanks for the concise report.  I'm going to take a look at this
> today, to see if it's an fts1/2 problem.  If it's _not_, I'll still
> look at it, but perhaps with less eventual success :-).

I checked the code and conflict handling mechanisms (OR ERROR, 
OR ABORT, OR REPLACE) do not apply to virtual tables.

I'm not sure if this is documented anywhere or not. At the moment
if the vtable implementation decides a constraint has failed (in
an xUpdate()) it just returns an error code and the statement
transaction (if there is one) on the database is rolled back.

If the xUpdate() implementation also knew the current conflict
handling mechanism, it could implement OR REPLACE (but not OR
ABORT). By rights we would have to add xStmtBegin() etc. to 
the virtual module interface (although this would not be required
for FTS, only for modules that used external storage).

Something to think about anyhow... Do we want conflict handling 
for FTS (and other virtual modules)?

Dan.

> -scott
> 
> 
> On 4/9/07, Paul Quinn <[EMAIL PROTECTED]> wrote:
> > Very simple to replicate:
> >
> >
> >
> > CREATE VIRTUAL TABLE fts_table USING fts2(text);
> >
> > INSERT OR REPLACE INTO fts_table (rowid, text) VALUES (1, 'text1');
> >
> > INSERT OR REAPLCE INTO fts_table (rowid, text) VALUES (1, 'text2');
> >
> >
> >
> > The first insert succeeds, the second fails.
> >
> > Is FTS not supposed to support REPLACE, or is this a bug?
> >
> >
> >
> > -PQ
> >
> >
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to