Hi all,

I'm having problems with BLOBCol on MySQLdb 1.2.1+.  I use UTF-8
as the charset for connection, and consequently I cannot save binary
data to the BLOB column. I tracked this down to sqlobject/mysql/mysqlconnection.py,
line 78:

                    # For MysqlDB 1.2.1 and later, we go
                    # encoding->unicode->charset (in the mysql db)
                    myquery = unicode(query, self.encoding)
                    return cursor.execute(myquery)

However, the query (the generated SQL query) contain's binary data, so unicode
function fails.

It seems that this conversion to unicode should be done while still building
the query, i.e. convert only string column values, not blobs or column names.

While I could possibly dig into this and fix it, I wonder maybe anyone else has
solution for this?