#26541: Table 'ROLLBACK_TEST' already exists
----------------------------------------------+--------------------
Reporter: marcinn | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
When something goes wrong during checking database features, the state of
db stays affected:
{{{
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/test/testcases.py",
line 182, in __call__
self._pre_setup()
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/test/testcases.py",
line 787, in _pre_setup
self._fixture_setup()
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/test/testcases.py",
line 986, in _fixture_setup
if not connections_support_transactions():
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/test/testcases.py",
line 911, in connections_support_transactions
for conn in connections.all())
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/test/testcases.py",
line 911, in <genexpr>
for conn in connections.all())
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/utils/functional.py",
line 59, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/db/backends/base/features.py",
line 217, in supports_transactions
cursor.execute('CREATE TABLE ROLLBACK_TEST (X INT)')
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/db/backends/utils.py",
line 64, in execute
return self.cursor.execute(sql, params)
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/db/utils.py",
line 97, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/db/backends/utils.py",
line 62, in execute
return self.cursor.execute(sql)
File
"/home/marcin/myproject/eggs/Django-1.8.6-py2.7.egg/django/db/backends/mysql/base.py",
line 124, in execute
return self.cursor.execute(query, args)
File "/home/marcin/myproject/eggs/MySQL_python-1.2.3-py2.7-linux-
x86_64.egg/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/home/marcin/myproject/eggs/MySQL_python-1.2.3-py2.7-linux-
x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1050, "Table 'ROLLBACK_TEST' already exists")
}}}
1. Django should not create any table during startup - there may be
readonly or sensitive databases connected
2. Let the Django do some cleanups, if it must "dig" databases.
--
Ticket URL: <https://code.djangoproject.com/ticket/26541>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.2a694e43bf14b19b2765065a7110cfd3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.