On Jun 3, 2010, at 1:15 PM, King Simon-NFHD78 wrote:

> Hi,
> 
> According to sqlalchemy/dialects/mysql/base.py, MySQL v3.23 should be
> supported in some form. However, with SA 0.6.1 and MySQL 3.23.58, I get
> the following error:
> 
>    raise errorclass, errorvalue
> _mysql_exceptions.ProgrammingError: (1064, "You have an error in your
> SQL syntax near '('test unicode returns' AS CHAR(60)) AS anon_1' at line
> 1")
> 
> 
> According to http://dev.mysql.com/doc/refman/4.1/en/cast-functions.html,
> the CAST function was added in 4.0.2.
> 
> Is there any way that I can avoid this error? Perhaps with some engine
> or dialect option that configures the returns_unicode_strings attribute
> without running the test?
> 


heh wow, that little test we've added is proving to be quite a PITA.    OK so 
in this case its the CAST thats barfing ?     the options we could do here are:

1. have cast() do nothing with the MySQL dialect if the MySQL version < 4.0.2  
(is there some MySQL-specific syntax that works maybe ?)
2. have the MySQL dialect not run _check_unicode_returns if the version < 4.0.2
3. put the unicode checks in a try/except and default the returns to False if 
something didn't work

since i dont have an old MySQL installed here, do you need me to give you 
patches for these so you can test ?   


-- 
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