Loading django/db/backends/mysql/base.py +0 −16 Original line number Diff line number Diff line Loading @@ -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: Loading docs/ref/contrib/gis/install/index.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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+ ================== ============================== ================== ========================================= Loading docs/ref/databases.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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. Loading docs/releases/1.8.txt +7 −0 Original line number Diff line number Diff line Loading @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading tests/backends/tests.py +0 −24 Original line number Diff line number Diff line Loading @@ -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): Loading Loading
django/db/backends/mysql/base.py +0 −16 Original line number Diff line number Diff line Loading @@ -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: Loading
docs/ref/contrib/gis/install/index.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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+ ================== ============================== ================== ========================================= Loading
docs/ref/databases.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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. Loading
docs/releases/1.8.txt +7 −0 Original line number Diff line number Diff line Loading @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading
tests/backends/tests.py +0 −24 Original line number Diff line number Diff line Loading @@ -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): Loading