﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9833	create_test_db doesn't respect caching parameters for db backend	muhuk@…	nobody	"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"")
}}}"		closed	Testing framework	1.0		fixed			Accepted	0	0	0	0	0	0
