[Django] #27676: MariaDB 10.2 supports defaults for text columns

18 vues
Accéder directement au premier message non lu

Django

non lue,
2 janv. 2017, 13:32:2702/01/2017
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: Adam Chainz
Chainz |
Type: Bug | Status: assigned
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django has workaround code for MySQL's deficiency not supporting DEFAULT
for TEXT, BLOB, and JSON columns, but MariaDB 10.2 fixes this ( see
https://mariadb.com/kb/en/mariadb/what-is-mariadb-102/: "BLOB and TEXT
fields can now have a DEFAULT value." ).

Django should allow DEFAULT for these columns when on MariaDB 10.2+.

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

Django

non lue,
2 janv. 2017, 15:10:5502/01/2017
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Chainz | Owner: Adam
| Chainz
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0

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

* type: Bug => New feature
* stage: Unreviewed => Someday/Maybe


Comment:

First some consensus is needed about whether Django
[https://groups.google.com/d/topic/django-
developers/31j1dNOZ7zc/discussion should officially support MariaDB].

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

Django

non lue,
2 janv. 2017, 17:48:1102/01/2017
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Chainz | Owner: Adam
| Chainz
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Adam Chainz):

Thanks, I missed that thread, commented

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

Django

non lue,
9 janv. 2017, 19:14:3909/01/2017
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Chainz | Owner: Adam
| Chainz
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1
* stage: Someday/Maybe => Ready for checkin


Comment:

[https://github.com/django/django/pull/7778 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:3>

Django

non lue,
10 mai 2017, 08:04:0810/05/2017
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: Adam
Johnson | (Chainz) Johnson

Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

On the PR, Adam said, "I was thinking of forming a better plan around
MariaDB first."

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:4>

Django

non lue,
19 juil. 2019, 10:39:4419/07/2019
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: Adam
Johnson | (Chainz) Johnson
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by felixxm):

Django 3.0 will officially support MariaDB 10.1+. I think it's time to
change this feature flag. Adam, can you resubmit your patch?

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:5>

Django

non lue,
15 août 2019, 10:20:1815/08/2019
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: Adam
Johnson | (Chainz) Johnson
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam (Chainz) Johnson):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:6>

Django

non lue,
16 août 2019, 06:05:2116/08/2019
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: Adam
Johnson | (Chainz) Johnson
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"7da6a28a447dc0db2a2c6ef31894094eb968f408" 7da6a28a]:
{{{
#!CommitTicketReference repository=""
revision="7da6a28a447dc0db2a2c6ef31894094eb968f408"
Fixed #27676 -- Allowed BLOB/TEXT defaults on MariaDB 10.2.1+.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:7>

Django

non lue,
28 nov. 2023, 05:57:4628/11/2023
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam

| Johnson
Type: New feature | Status: closed
Component: Database layer | Version: dev

(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tobias Krönke):

Could we skip the default if it's the empty string for MySQL? Explicitly
setting the empty string prevents the `ALGORITHM=INSTANT` magic from
adding the column without table copying. This would be a huge performance
improvement for many users. I have seen so many issues where people would
like to add new columns to very large tables efficiently. MySQL has this
now built-in, but django prevents it by redudantly specifying the empty
string as default. This is enough and makes the instant algorithm work:

{{{
ALTER TABLE `<table name>` ADD COLUMN `<column name>` longtext NOT NULL;
}}}


Same for CHAR and VARCHAR.

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:8>

Django

non lue,
28 nov. 2023, 09:13:1528/11/2023
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam
| Johnson
Type: New feature | Status: new

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tobias Krönke):

* status: closed => new
* resolution: fixed =>


Comment:

PR added: https://github.com/django/django/pull/17539

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:9>

Django

non lue,
28 nov. 2023, 09:33:4428/11/2023
à django-...@googlegroups.com
#27676: MariaDB 10.2 supports defaults for text columns
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam
| Johnson
Type: New feature | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* status: new => closed
* resolution: => fixed


Comment:

Please open a new ticket rather than reopening an old one.

--
Ticket URL: <https://code.djangoproject.com/ticket/27676#comment:10>

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message