Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5007 closed (duplicate)

Data truncated for column 'message' at row 1

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

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 Changed 8 years ago by Simon G. <dev@…>

  • Keywords u'INSERT INTO `auth_message` removed
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

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 Changed 8 years ago by p.patruno@…

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 Changed 8 years ago by Simon G. <dev@…>

yeah, that sounds like the bug in #4336.

comment:4 Changed 8 years ago by Pedro Lima

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

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