On Jun 4, 2010, at 6:54 AM, King Simon-NFHD78 wrote:

> 
> I'll happily try any suggestions you've got :-)
> 
> I couldn't see anything in the MySQL docs that suggested an alternative
> to the CAST function, so it seems reasonable to just omit it for older
> MySQL servers. I applied the attached patch, and it at least allowed me
> to connect to the server and issue basic queries, but I haven't done any
> more testing than that.
> 
> Option 1 sounded best to me just because I didn't know if there would be
> any other places that SA might implicitly run a query that included a
> CAST. I suppose it changes the semantics of the query though...
> 
> I've tried to run the unit tests, but I get lots of errors and failures
> that I assume are expected on such an old version of MySQL.

its not entirely my usual style to have an operator emit nothing on a given 
platform instead of failing, but because this is such an old MySQL version and 
"cast" is a little bit of a crossover operator it isn't bothering me much here. 
  I can commit your patch with an extra "artificial" compiler test in 
dialect/test_mysql.py to ensure it does what's expected; if you want to tool 
around with it a bit this week, let me know that we're good with it.

 


> 
> Cheers,
> 
> Simon
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 
> <mysql_no_cast.patch>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to