summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-08-01 11:09:28 -0400
committerTim Graham <timograham@gmail.com>2014-08-02 10:28:40 -0400
commitd28396f5268f1974ef1e84d13bcf1ac107005ced (patch)
tree9a4d4dd7aaf3b59198813d5c4112caec22fb5d46
parentfb4f3e04b13681c5ec4cbf37d280ffebc887d620 (diff)
Fixed #23144 -- Dropped support for MySQL 5.0, 5.1.
-rw-r--r--django/db/backends/mysql/base.py16
-rw-r--r--docs/ref/contrib/gis/install/index.txt2
-rw-r--r--docs/ref/databases.txt2
-rw-r--r--docs/releases/1.8.txt7
-rw-r--r--tests/backends/tests.py24
5 files changed, 9 insertions, 42 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 5aa17466ac..393af224e4 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -341,22 +341,6 @@ class DatabaseOperations(BaseDatabaseOperations):
else:
return []
- def sequence_reset_by_name_sql(self, style, sequences):
- # Truncate already resets the AUTO_INCREMENT field from
- # MySQL version 5.0.13 onwards. Refs #16961.
- if self.connection.mysql_version < (5, 0, 13):
- return [
- "%s %s %s %s %s;" % (
- style.SQL_KEYWORD('ALTER'),
- style.SQL_KEYWORD('TABLE'),
- style.SQL_TABLE(self.quote_name(sequence['table'])),
- style.SQL_KEYWORD('AUTO_INCREMENT'),
- style.SQL_FIELD('= 1'),
- ) for sequence in sequences
- ]
- else:
- return []
-
def validate_autopk_value(self, value):
# MySQLism: zero in AUTO_INCREMENT field does not work. Refs #17653.
if value == 0:
diff --git a/docs/ref/contrib/gis/install/index.txt b/docs/ref/contrib/gis/install/index.txt
index 8b7f9a0cf4..46e85914c6 100644
--- a/docs/ref/contrib/gis/install/index.txt
+++ b/docs/ref/contrib/gis/install/index.txt
@@ -62,7 +62,7 @@ supported versions, and any notes for each of the supported database backends:
Database Library Requirements Supported Versions Notes
================== ============================== ================== =========================================
PostgreSQL GEOS, PROJ.4, PostGIS 9.0+ Requires PostGIS.
-MySQL GEOS 5.x Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
+MySQL GEOS 5.5+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
Oracle GEOS 11.1+ XE not supported.
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 2.3+, pysqlite2 2.5+
================== ============================== ================== =========================================
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index cea54c361f..c53d29309c 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -169,7 +169,7 @@ MySQL notes
Version support
---------------
-Django supports MySQL 5.0.3 and higher.
+Django supports MySQL 5.5 and higher.
Django's ``inspectdb`` feature uses the ``information_schema`` database, which
contains detailed data on all database schemas.
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index b3b44637b6..a03b37c505 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -407,6 +407,13 @@ officially supports.
This also includes dropping support for PostGIS 1.3 and 1.4 as these versions
are not supported on versions of PostgreSQL later than 8.4.
+Support for MySQL versions older than 5.5
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The end of upstream support periods was reached in January 2012 for MySQL 5.0
+and December 2013 for MySQL 5.1. As a consequence, Django 1.8 sets 5.5 as the
+minimum MySQL version it officially supports.
+
Support for Oracle versions older than 11.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index f217ea504a..a059c76b9d 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -259,30 +259,6 @@ class PostgreSQLTests(TestCase):
self.assertIn('::text', do.lookup_cast(lookup))
-@unittest.skipUnless(connection.vendor == 'mysql', "Test only for MySQL")
-class MySQLTests(TestCase):
-
- def test_autoincrement(self):
- """
- Check that auto_increment fields are reset correctly by sql_flush().
- Before MySQL version 5.0.13 TRUNCATE did not do auto_increment reset.
- Refs #16961.
- """
- statements = connection.ops.sql_flush(no_style(),
- tables=['test'],
- sequences=[{
- 'table': 'test',
- 'col': 'somecol',
- }])
- found_reset = False
- for sql in statements:
- found_reset = found_reset or 'ALTER TABLE' in sql
- if connection.mysql_version < (5, 0, 13):
- self.assertTrue(found_reset)
- else:
- self.assertFalse(found_reset)
-
-
class DateQuotingTest(TestCase):
def test_django_date_trunc(self):