[rt-devel] Long time no... Oracle talk!

Jesse Vincent jesse at bestpractical.com
Mon Jul 14 21:17:12 EDT 2003



On Tue, Jul 15, 2003 at 03:32:29AM +1000, Brook Schofield wrote:

> The current issue seems to be around the distinct queries. The SQL 
> generated is:
> 
> 	SELECT main.* FROM (
> 		SELECT DISTINCT main.id FROM Queues main
> 	) distinctquery, Queues main
> 	WHERE (main.id = distinctquery.id)
> 	WHERE ((main.Disabled = '0'))
> 	ORDER BY main.Name ASC
> 
> when it should be:
> 
> 	SELECT main.* FROM (
> 		SELECT DISTINCT main.id FROM Queues main
> 	) distinctquery, Queues main
> 	WHERE (main.id = distinctquery.id)
> 		AND ((main.Disabled = '0'))
>          ^^^
> 	ORDER BY main.Name ASC
> 
> the double WHERE is inserted because to code in SearchBuilder doesn't 
> know that another WHERE has already been inserted as part of the 
> DISTINCT query code. Any tips on correcting this?


First up, come up to 0.88. Some of this logic was wrong and got cleaned
up, which _might_ make your problem go away. Otherwise, we may need to
change how  the "extra" WHERE (main.id = distinctquery.id) gets
populated in the first place.
 
> With my rough hacks in place Oracle support appears to work. The only 
> issue that I am having now is Apache::Session not working and I'm 
> required to Re-Authenticate for each page. But I could have broken 
> something in my tinkering.

You may want to switch to Apache::Session::File. or have a look at the
docs for Apache::Session::Oracle.

But all in all, this is great news. can you send me a diff relative to
3.0.4?

> 
> -Brook
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 

-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the Rt-devel mailing list