Re: Help needed with the MySQL max index length problem for Django 1.10

2016-01-04 Thread Adam Johnson
This has always been an error on MySQL afaik, it would allow broken data integrity if it were just a warning. Moving the length below 191 does seem to be the safest fix. On Wednesday, December 30, 2015 at 1:52:27 PM UTC, Collin Anderson wrote: > > I think mysql used to just give a warning and ma

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-30 Thread Collin Anderson
I think mysql used to just give a warning and maybe now it's an error? It can currently be reproduced with just a blank project (using django master, mysql 5.5.46-0ubuntu0.14.04.2): mysql -e'create database mb4test charset utf8mb4' django-admin startproject mb4test cd mb4test vi mb4test/settings.p

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-30 Thread Florian Apolloner
On Monday, December 21, 2015 at 5:32:43 PM UTC+1, Tim Graham wrote: > > "This patch breaks on MySQL installations using the utf8mb4 charset, > because it breaks the index length limit - it comes out at a maximum of 254 > * 4 = 1016 bytes whilst by default InnoDB can only index 767 bytes. I foun

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-29 Thread Collin Anderson
Though wouldn't mind 180 either. On Tue, Dec 29, 2015 at 2:55 PM, Collin Anderson wrote: > I propose 150 to err on the longer side: > https://github.com/django/django/pull/5891 > > On Tuesday, December 29, 2015 at 5:28:01 AM UTC-5, Aymeric Augustin wrote: >> >> At that point, I'd prefer picking

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-29 Thread Collin Anderson
I propose 150 to err on the longer side: https://github.com/django/django/pull/5891 On Tuesday, December 29, 2015 at 5:28:01 AM UTC-5, Aymeric Augustin wrote: > > At that point, I'd prefer picking an arbitrary length that makes sense for > the underlying data rather than one based on MySQL's cur

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-29 Thread Aymeric Augustin
At that point, I'd prefer picking an arbitrary length that makes sense for the underlying data rather than one based on MySQL's current limitations. Name length sounds like an reasonable proxy for username length. A quick Google search turns up http://www.historyrundown.com/top-5-people-with-the-l

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-28 Thread Tim Graham
Ugh, I guess I'm in favor of max_length=191. It'll just be awkward to explain that one in the docs. On Monday, December 28, 2015 at 3:27:23 PM UTC-5, Collin Anderson wrote: > > Hi All, > > I finally looked at this more today. I started working on the INDEX > (col1(191)) solution from #18392, but

Re: Help needed with the MySQL max index length problem for Django 1.10

2015-12-28 Thread Collin Anderson
Hi All, I finally looked at this more today. I started working on the INDEX (col1(191)) solution from #18392, but unfortunately I don't think we can use that solution in this case because it's a UNIQUE index. (I still think it's best solution for non-unique indexes.) I think these are our options

Help needed with the MySQL max index length problem for Django 1.10

2015-12-21 Thread Tim Graham
I merged the often requested increase of User.username max_length to 254 characters [1] a few weeks ago, however, the ticket was reopened pointing out this issue: "This patch breaks on MySQL installations using the utf8mb4 charset, because it breaks the index length limit - it comes out at a m