Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#489 closed defect (fixed)

[patch] MySQL: TextField => longtext

Reported by: eugene@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django maps 'TextField' to MySQL's 'text', which cannot be longer than 64k. I already hit this limit with SQL-based cache. I think that 'longtext' is the better mapping choice. It can be as long as 4G. IMHO, 2 byte size difference is justified in this case.

Index: mysql.py
===================================================================
--- mysql.py	(revision 635)
+++ mysql.py	(working copy)
@@ -129,7 +178,7 @@
     'PositiveSmallIntegerField': 'smallint UNSIGNED',
     'SlugField':         'varchar(50)',
     'SmallIntegerField': 'smallint',
-    'TextField':         'text',
+    'TextField':         'longtext',
     'TimeField':         'time',
     'URLField':          'varchar(200)',
     'USStateField':      'varchar(2)',

Attachments (1)

mysql-2.patch (487 bytes ) - added by anonymous 19 years ago.
patch in the file

Download all attachments as: .zip

Change History (4)

by anonymous, 19 years ago

Attachment: mysql-2.patch added

patch in the file

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

Fixed in [680].

comment:2 by eugene@…, 19 years ago

Resolution: fixed
Severity: normaltrivial
Status: closedreopened

Sorry I missed it before: 'XMLField' in mysql.py should be 'longtext' too.

comment:3 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: reopenedclosed

(In [694]) Fixed #489 -- Changed MySQL backend to use longtext for XMLField

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