#9833: create_test_db doesn't respect caching parameters for db backend
-------------------------------+--------------------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Testing framework | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-------------------------------+--------------------------------------------
line 318 in django.db.backends.creation.py (create_test_db) just takes
everything after `'db://'` as the cache table name.
{{{
if settings.CACHE_BACKEND.startswith('db://'):
cache_name = settings.CACHE_BACKEND[len('db://'):]
call_command('createcachetable', cache_name)
}}}
This results a table name of `cache?timeout=15&max_entries=100` if
CACHE_BACKEND is `'db://cache?timeout=15&max_entries=100'`
{{{
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/var/lib/python-
support/python2.5/django/core/management/__init__.py", line 340, in
execute_manager
utility.execute()
File "/var/lib/python-
support/python2.5/django/core/management/__init__.py", line 295, in
execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/python-support/python2.5/django/core/management/base.py",
line 192, in run_from_argv
self.execute(*args, **options.__dict__)
File "/var/lib/python-support/python2.5/django/core/management/base.py",
line 219, in execute
output = self.handle(*args, **options)
File "/var/lib/python-
support/python2.5/django/core/management/commands/test.py", line 33, in
handle
failures = test_runner(test_labels, verbosity=verbosity,
interactive=interactive)
File "/var/lib/python-support/python2.5/django/test/simple.py", line
142, in run_tests
connection.creation.create_test_db(verbosity, autoclobber=not
interactive)
File "/var/lib/python-support/python2.5/django/db/backends/creation.py",
line 319, in create_test_db
call_command('createcachetable', cache_name)
File "/var/lib/python-
support/python2.5/django/core/management/__init__.py", line 158, in
call_command
return klass.execute(*args, **options)
File "/var/lib/python-support/python2.5/django/core/management/base.py",
line 219, in execute
output = self.handle(*args, **options)
File "/var/lib/python-support/python2.5/django/core/management/base.py",
line 319, in handle
label_output = self.handle_label(label, **options)
File "/var/lib/python-
support/python2.5/django/core/management/commands/createcachetable.py",
line 41, in handle_label
curs.execute(statement)
File "/var/lib/python-
support/python2.5/django/db/backends/mysql/base.py", line 83, in execute
return self.cursor.execute(query, args)
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166,
in execute
self.errorhandler(self, exc, value)
File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line
35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near '?timeout=15&max_entries=100_expires ON
`cache?timeout=15&max_entries=100` (`expi' at line 1")
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9833>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---