On 05.06.2008, at 16:15, David Abrahams wrote:
>  Exception: invalid sql:
>  sql='SELECT name FROM tracforge_projects WHERE env_path=%s'
>  escaped sql='SELECT name FROM tracforge_projects WHERE env_path=%s'
>  args=('/usr/local/share/trac/projects/master',)
>
> So, there are a number of issues here.  The code is apparently  
> trying to
> execute:
>
>  SELECT name FROM tracforge_projects WHERE env_path=/usr/local/share/ 
> trac/projects/master

No, the database or the database connector (psyco or whatever) is  
responsible for somehow applying the args to the SQL statement. Either  
by created a prepared statement and binding the values to it, or by  
string interpolation using whatever is needed to quote/escape the  
values.

The way TracForge uses the DB API is absolutely correct AFAICT. Do you  
have any modifications to trac.db.util that might be doing the wrong  
thing here?

Cheers,
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to