On Jul 13, 2012, at 6:36 PM, James wrote:

> Yeah, I kind of suspected MySQLdb might have problems here.  You need to file 
> a bug report with the DBAPI's bug tracker:
> http://sourceforge.net/tracker/?group_id=22307&atid=374932
> 
> I didn't see anything on the subject of fractional second support but I ended 
> up getting the insert working by the format_TIME function in 
> /MySQLdb/times.py to process microseconds:
> 
> def format_TIMEDELTA(v):
> 
>     microseconds = v.microseconds
>     seconds = float(v.seconds) % 60
>     minutes = int(v.seconds / 60) % 60
>     hours = int(v.seconds / 3600) % 24
> 
>     return '%d %d:%d:%d.%d' % (v.days, hours, minutes, seconds, microseconds)
> 
> Thank you for your help with the SQLalchemy side of things, redefining how 
> the DDL is emitted for the type and whatnot. Hopefully we can see these 
> changes in future releases of the 0.7 series.

are you saying you patched mysqldb/times.py directly?   yeah, MySQLdb would 
need to implement this change properly for the SQLAlchemy side of things to be 
of any use.  We can't just tell our users to patch their MySQLdb clients. 
harmless enough for us to look for the "microseconds" portion on our end, 
anyway.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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