﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1500	[patch] MySQL AutoField should be int, not mediumint	ejf-django@…	Adrian Holovaty	"I believe that the !AutoField mapping in core/db/backends/mysql.py DATA_TYPES should be changed from:

'AutoField':         'mediumint(9) unsigned auto_increment'

to:

'AutoField':         'int(10) unsigned auto_increment'

However, currently MySQL !ForeignKey references go to 'int(11)', or signed integers.  I'm not really clear where in the code that is happening, but !ForeignKey references should be changed to unsigned ints.

There are several reasons for this:

 * We are arbitrarily limiting the table size, with the only benefit being one byte saved per row (mediumint storage is 3 bytes, int is 4)

 * INT is the canonical primary key for MySQL

 * PostgreSQL serial defaults to an INT, and is used as such in Django.  Therefore MySQL Django created tables are limited compared to the equivalant Django code run against PostgreSQL.  We should strive for equivalency.
"	defect	closed	Core (Other)		normal	fixed			Unreviewed	1	0	0	0	0	0
