Django

Code

Ticket #489 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] MySQL: TextField => longtext

Reported by: eugene@lazutkin.com Assigned to: adrian
Milestone: Component: Database layer (models, ORM)
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

mysql-2.patch (487 bytes) - added by anonymous on 09/11/05 21:57:45.
patch in the file

Change History

09/11/05 21:57:45 changed by anonymous

  • attachment mysql-2.patch added.

patch in the file

09/24/05 12:37:45 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [680].

09/25/05 21:35:19 changed by eugene@lazutkin.com

  • status changed from closed to reopened.
  • resolution deleted.
  • severity changed from normal to trivial.

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

09/25/05 21:36:53 changed by adrian

  • status changed from reopened to closed.
  • resolution set to fixed.

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


Add/Change #489 ([patch] MySQL: TextField => longtext)




Change Properties
Action