Login | Register
My pages Projects Community openCollabNet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Catacomb] OK, got it



Thanks for this patch. It looks good to me.

- Sung

> -----Original Message-----
> From: catacomb-bounces@webdav.org [mailto:catacomb-bounces@webdav.org] On
> Behalf Of Ivan Todoroski
> Sent: Thursday, February 19, 2004 3:25 PM
> To: catacomb@webdav.org
> Subject: [Catacomb] OK, got it
> 
> 
> I fixed this, patch is attached.
> 
> 
> Ivan Todoroski wrote:
> 
> >
> > Using cadaver, this command fails with internal server error:
> >
> > search someprop = "value1" or someprop = "value2"
> >
> > (while this one works ok: search someprop1 = "value1" or someprop2 =
> > "value2")
> >
> >
> > The error in the log file is:
> >
> > Error Number: 1066
> > ErrorMessage:Not unique table/alias: 'someprop_t'
> >
> >
> > For the above search, the following SQL query is generated inside
> catacomb:
> >
> > SELECT distinct [..columns..] FROM dasl_resource left join dasl_property
> > someprop_t USING (serialno) left join dasl_property someprop_t USING
> > (serialno) WHERE [..bla..] ((someprop_t.name = 'someprop' AND
> > someprop_t.value = 'value1' ) OR (someprop_t.name = 'someprop' AND
> > someprop_t.value = 'value2' ))
> >
> > As you can see, the same temporary table name is being used for both
> > conditions. I was thinking of fixing this by appending some unique
> > suffix to all the temporary table names (maybe some increasing integer),
> > but I'm not sure how to implement it yet, because the same suffix will
> > need to be used accross several functions inside search.c. If anybody
> > has any idea how to solve this please send mail. If I manage to fix this
> > I'll post the patch.
> >
> > _______________________________________________
> > Catacomb mailing list
> > Catacomb@webdav.org
> > http://mailman.webdav.org/mailman/listinfo/catacomb
> >
> >