Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: django/django
head fork: jpichon/django
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Jul 07, 2012
@jpichon jpichon Fixed #6517. ./ dbshell doesn't get charset db option (MySQL)
Thanks tvrg for report and patch. (Slightly updated to match current
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/db/backends/mysql/
4 django/db/backends/mysql/
@@ -15,6 +15,7 @@ def runshell(self):
host = settings_dict['OPTIONS'].get('host', settings_dict['HOST'])
port = settings_dict['OPTIONS'].get('port', settings_dict['PORT'])
defaults_file = settings_dict['OPTIONS'].get('read_default_file')
+ charset = settings_dict['OPTIONS'].get('charset', '')
# Seems to be no good way to set sql_mode with CLI.
if defaults_file:
@@ -32,9 +33,10 @@ def runshell(self):
args += ["--port=%s" % port]
if db:
args += [db]
+ if charset:
+ args += ["--default-character-set=%s" % charset]
if == 'nt':
sys.exit(os.system(" ".join(args)))
os.execvp(self.executable_name, args)

No commit comments for this range

Something went wrong with that request. Please try again.