MySQLdb error for sql >64K

J

JZ

I cannot execute insert data into TEXT field if that data is bigger than
64KB. :(

Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 95, in
execute
return self._execute(query, args)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 114, in
_execute
self.errorhandler(self, exc, value)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
Warning: Rows matched: 1 Changed: 0 Warnings: 1

The same sql query executed using MySQLFront client works without any
problems. So, I think the problem must be with MySQLdb 0.9.2 module.

Any suggestions?
 
W

wes weston

JZ said:
I cannot execute insert data into TEXT field if that data is bigger than
64KB. :(




Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 95, in
execute
return self._execute(query, args)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 114, in
_execute
self.errorhandler(self, exc, value)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
Warning: Rows matched: 1 Changed: 0 Warnings: 1

The same sql query executed using MySQLFront client works without any
problems. So, I think the problem must be with MySQLdb 0.9.2 module.

Any suggestions?

jz,
A MYSQL "text" type can be 0 to 65535 bytes; a "mediumtext"
type 2**8 times as big. Just a guess but maybe the failing
insert checks the sizes and the 'working' one just chops off
the excess. You could alter the column and try it fairly
easily.
wes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top