[Django] #29194: Saving entry into db fails when value of a textfield type parameter is too big (more than 6000 char)

2 views
Skip to first unread message

Django

unread,
Mar 6, 2018, 7:17:25 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto | Owner: nobody
Misail |
Type: Bug | Status: new
Component: Database | Version: 1.11
layer (models, ORM) |
Severity: Normal | Keywords: TextField
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When a model has a textfield type parameter, the value of this parameter
should be a string of any size.
Nonetheless, when trying to insert a new entry where this string is longer
than 6000 chars it fails throwing an invalid precision value.
Note that when trying with small sizes it works
I am using a MS SQL database, Django 1.11.9 and Python 3.5.2
Find attached the models file and the test cases that show the issue

--
Ticket URL: <https://code.djangoproject.com/ticket/29194>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 6, 2018, 7:17:54 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alberto Misail):

* Attachment "tests.py" added.

Tests file

Django

unread,
Mar 6, 2018, 7:18:08 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: nobody
Type: Bug | Status: new

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alberto Misail):

* Attachment "models.py" added.

Models file

Django

unread,
Mar 6, 2018, 7:20:05 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: Alberto
| Misail
Type: Bug | Status: assigned

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alberto Misail):

* status: new => assigned
* owner: nobody => Alberto Misail


--
Ticket URL: <https://code.djangoproject.com/ticket/29194#comment:1>

Django

unread,
Mar 6, 2018, 7:20:28 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: Alberto
| Misail
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alberto Misail):

* Attachment "tests.py" added.

Tests file

--

Django

unread,
Mar 6, 2018, 7:21:57 PM3/6/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: Alberto
| Misail
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alberto Misail):

* Attachment "tests.py" added.

Tests file

--

Django

unread,
Mar 7, 2018, 12:01:20 AM3/7/18
to django-...@googlegroups.com
#29194: Saving entry into db fails when value of a textfield type parameter is too
big (more than 6000 char)
-------------------------------------+-------------------------------------
Reporter: Alberto Misail | Owner: Alberto
| Misail
Type: Bug | Status: closed

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: invalid

Keywords: TextField | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* status: assigned => closed
* resolution: => invalid


Comment:

Hello Alberto!

Thank you for your report but unfortunately Django doesn't ship with a
MSSQL backend.

Since it's unlikely any of the default backends (SQLite, PostgreSQL,
MySQL, Oracle) exhibit such behavior you should report this issue to the
third-party app providing the database backend you are using instead.

--
Ticket URL: <https://code.djangoproject.com/ticket/29194#comment:2>

Reply all
Reply to author
Forward
0 new messages