8000 Fixed #23144 -- Dropped support for MySQL 5.0, 5.1. · alex-python/django@d28396f · GitHub
[go: up one dir, main page]

Skip to content

Commit d28396f

Browse files
committed
Fixed #23144 -- Dropped support for MySQL 5.0, 5.1.
1 parent fb4f3e0 commit d28396f

File tree

5 files changed

+9
-42
lines changed

5 files changed

+9
-42
lines changed

django/db/backends/mysql/base.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -341,22 +341,6 @@ def sql_flush(self, style, tables, sequences, allow_cascade=False):
341341
else:
342342
return []
343343

344-
def sequence_reset_by_name_sql(self, style, sequences):
345-
# Truncate already resets the AUTO_INCREMENT field from
346-
# MySQL version 5.0.13 onwards. Refs #16961.
347-
if self.connection.mysql_version < (5, 0, 13):
348-
return [
349-
"%s %s %s %s %s;" % (
350-
style.SQL_KEYWORD('ALTER'),
351-
style.SQL_KEYWORD('TABLE'),
352-
style.SQL_TABLE(self.quote_name(sequence['table'])),
353-
style.SQL_KEYWORD('AUTO_INCREMENT'),
354-
style.SQL_FIELD('= 1'),
355-
) for sequence in sequences
356-
]
357-
else:
358-
return []
359-
360344
def validate_autopk_value(self, value):
361345
# MySQLism: zero in AUTO_INCREMENT field does not work. Refs #17653.
362346
if value == 0:

docs/ref/contrib/gis/install/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ supported versions, and any notes for each of the supported database backends:
6262
Database Library Requirements Supported Versions Notes
6363
================== ============================== ================== =========================================
6464
PostgreSQL GEOS, PROJ.4, PostGIS 9.0+ Requires PostGIS.
65-
MySQL GEOS 5.x Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
65+
MySQL GEOS 5.5+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
6666
Oracle GEOS 11.1+ XE not supported.
6767
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 2.3+, pysqlite2 2.5+
6868
================== ============================== ================== =========================================

docs/ref/databases.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ MySQL notes
169169
Version support
170170
---------------
171171

172-
Django supports MySQL 5.0.3 and higher.
172+
Django supports MySQL 5.5 and higher.
173173

174174
Django's ``inspectdb`` feature uses the ``information_schema`` database, which
175175
contains detailed data on all database schemas.

docs/releases/1.8.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,13 @@ officially supports.
407407
This also includes dropping support for PostGIS 1.3 and 1.4 as these versions
408408
are not supported on versions of PostgreSQL later than 8.4.
409409

410+
Support for MySQL versions older than 5.5
411+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412+
413+
The end of upstream support periods was reached in January 2012 for MySQL 5.0
414+
and December 2013 for MySQL 5.1. As a consequence, Django 1.8 sets 5.5 as the
415+
minimum MySQL version it officially supports.
416+
410417
Support for Oracle versions older than 11.1
411418
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412419

tests/backends/tests.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -259,30 +259,6 @@ def test_lookup_cast(self):
259259
self.assertIn('::text', do.lookup_cast(lookup))
260260

261261

262-
@unittest.skipUnless(connection.vendor == 'mysql', "Test only for MySQL")
263-
class MySQLTests(TestCase):
264-
265-
def test_autoincrement(self):
266-
"""
267-
Check that auto_increment fields are reset correctly by sql_flush().
268-
Before MySQL version 5.0.13 TRUNCATE did not do auto_increment reset.
269-
Refs #16961.
270-
"""
271-
statements = connection.ops.sql_flush(no_style(),
272-
tables=['test'],
273-
sequences=[{
274-
'table': 'test',
275-
'col': 'somecol',
276-
}])
277-
found_reset = False
278-
for sql in statements:
279-
found_reset = found_reset or 'ALTER TABLE' in sql
280-
if connection.mysql_version < (5, 0, 13):
281-
self.assertTrue(found_reset)
282-
else:
283-
self.assertFalse(found_reset)
284-
285-
286262
class DateQuotingTest(TestCase):
287263

288264
def test_django_date_trunc(self):

0 commit comments

Comments
 (0)
0