MySQLdb: UPDATE borked?
nobody
root at [127.0.0.1]
Thu Apr 18 06:57:57 EDT 2002
When trying to UPDATE a blob field with more than 64k, I get this:
Traceback (most recent call last):
File "e:\code\projects\bbs\tix\work\test.py", line 18, in ?
main()
File "e:\code\projects\bbs\tix\work\test.py", line 14, in main
cursor.execute("UPDATE cache SET filedata=%s WHERE id=1", buff)
File "C:\PROGRA~1\Python22\Lib\site-packages\MySQLdb\cursors.py", line 66,
in
execute
r = self._query(query % self.__conn.literal(args))
File "C:\PROGRA~1\Python22\Lib\site-packages\MySQLdb\cursors.py", line
168, in
_query
rowcount = self._BaseCursor__do_query(q)
File "C:\PROGRA~1\Python22\Lib\site-packages\MySQLdb\cursors.py", line
118, in
__do_query
self._check_for_warnings()
File "C:\PROGRA~1\Python22\Lib\site-packages\MySQLdb\cursors.py", line
150, in
_check_for_warnings
raise Warning, self._info
_mysql_exceptions.Warning: Rows matched: 1 Changed: 1 Warnings: 1
Updates under 64k, and any sized INSERT works just fine though (yes, I set
the max packet size to 16M for MySQL).
The same update also works just fine using the mysql client (dumped it to
file from the python script, and piped it straight in to mysql, no problem).
More information about the Python-list
mailing list