Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#5007 closed (duplicate)

Data truncated for column 'message' at row 1

Reported by: p.patruno@… Owned by: Malcolm Tredinnick
Component: Internationalization Version: dev
Severity: Keywords: Data truncated sql
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

if I set LANGUAGE_CODE = it_it in settings.py and use admin interface to change some data in my tables the result is:

Exception Type: Warning
Exception Value: Data truncated for column 'message' at row 1
Exception Location: /usr/lib/python2.5/warnings.py in warn_explicit, line 102

  1. if not self._defer_warnings: self._warning_check() ...

▼ Local vars
Variable Value
ListType <type 'list'>
TupleType <type 'tuple'>
args [1L, u'program "mandami" \xe8 stato modificato correttamente.']
charset u'utf8'
db <weakproxy at 0x8755c5c to Connection at 0x87a7634>
exc_info <built-in function exc_info>
query u'INSERT INTO auth_message (user_id,message) VALUES (1,\'program
"mandami
" \xe8 stato modificato correttamente.\')'
r 1L
self <MySQLdb.cursors.Cursor object at 0x87648ec>

All is right with LANGUAGE_CODE = en_us

I use mysql and if I execute this sql
INSERT INTO auth_message (user_id,message) VALUES (1,\'program
"mandami
" \xe8 stato modificato correttamente.\')
I get an error

If I execute this sql all works right:
INSERT INTO auth_message (user_id,message) VALUES (1,'program
"mandami
" \xe8 stato modificato correttamente.')

thanks

Paolo Patruno

Change History (4)

comment:1 by Simon G. <dev@…>, 17 years ago

Keywords: u'INSERT INTO `auth_message` removed
Resolution: duplicate
Status: newclosed

Paolo, what version of Django are you using? these things should all be fixed since the unicode merge (this looks like a duplicate of #4336 too).

comment:2 by p.patruno@…, 17 years ago

I use Fedora 7 but Django is svn trunk version of Sat Jul 21 repackaged in rpm with the same spec file.

Paolo Patruno

comment:3 by Simon G. <dev@…>, 17 years ago

yeah, that sounds like the bug in #4336.

comment:4 by Pedro Lima, 17 years ago

Could it be an old connector? Try changing to mysql_old (see here)

Note: See TracTickets for help on using tickets.
Back to Top