summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/client.py
AgeCommit message (Collapse)Author
2022-05-20Fixed #33715 -- Allowed keyboard interrupt to abort queries in MySQL dbshell.Hasan Ramezani
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-05-12Fixed #32732 -- Removed usage of deprecated 'db' and 'passwd' connection ↵Nick Pope
options in MySQL backend. The 'db' and 'passwd' connection options have been deprecated, use 'database' and 'password' instead (available since mysqlclient >= 1.3.8). This also allows the 'database' option in DATABASES['OPTIONS'] on MySQL.
2020-10-30Refs #32061 -- Prevented password leak on MySQL dbshell crash.Simon Charette
The usage of the --password flag when invoking the mysql CLI has the potential of exposing the password in plain text if the command happens to crash due to the inclusion of args provided to subprocess.run(check=True) in the string representation of the subprocess.CalledProcessError exception raised on non-zero return code. Since this has the potential of leaking the password to logging facilities configured to capture crashes (e.g. sys.excepthook, Sentry) it's safer to rely on the MYSQL_PWD environment variable instead even if its usage is discouraged due to potential leak through the ps command on old flavors of Unix. Thanks Charlie Denton for reporting the issue to the security team. Refs #24999.
2020-10-29Refs #32061 -- Unified DatabaseClient.runshell() in db backends.Simon Charette
2020-10-17Fixed #6517 -- Made dbshell use charset option on MySQL.manav014
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-06-12Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on MySQL.Hasan Ramezani
2020-04-14Fixed #29501 -- Allowed dbshell to pass options to underlying tool.Adam Johnson
2019-08-23Replaced subprocess commands by run() wherever possible.Claude Paroz
2017-06-19Fixed #28322 -- Added dbshell support for MySQL client TLS certs.Paul Tiplady
2016-06-27Fixed #26751 -- Made dbshell exit with the shell's error code.Étienne BERSAC
2015-01-14Fixed #22603 -- Reorganized classes in django.db.backends.Tim Graham
2014-08-13Fixed #22646: Added support for the MySQL ssl-ca option to dbshell.zsoldosp
2014-08-04Fixed #22234 -- Replaced OS-specific code with subprocess.call() in dbshell.Mihail Milushev
This fixes escaping of special characters on Windows.
2013-07-08A large number of stylistic cleanups across django/db/Alex Gaynor
2011-01-03Fixed #15006 -- Removed some stray tabs in python code. Thanks to ↵Russell Keith-Magee
vanschelven for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-28Fixed #12343 -- Added support for connection-by-socket to MySQL using the ↵Russell Keith-Magee
dbshell management command. Thanks to elyon001@gmail.com for the report, and sfllaw for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11Fixed #10357 -- Fixed the "dbshell" command for Windows users.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11Fixed #10459 -- Refactored the internals of database connection objects so ↵Adrian Holovaty
that connections know their own settings and pass around settings as dictionaries instead of passing around the Django settings module itself. This will make it easier for multiple database support. Thanks to Alex Gaynor for the initial patch. This is backwards-compatible but will likely break third-party database backends. Specific API changes are: * BaseDatabaseWrapper.__init__() now takes a settings_dict instead of a settings module. It's called settings_dict to disambiguate, and for easy grepability. This should be a dictionary containing DATABASE_NAME, etc. * BaseDatabaseWrapper has a settings_dict attribute instead of an options attribute. BaseDatabaseWrapper.options is now BaseDatabaseWrapper['DATABASE_OPTIONS'] * BaseDatabaseWrapper._cursor() no longer takes a settings argument. * BaseDatabaseClient.__init__() now takes a connection argument (a DatabaseWrapper instance) instead of no arguments. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10026 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-09db: Gave each DatabaseClient class an 'executable_name' attribute (e.g., ↵Adrian Holovaty
'psql' or 'mysql'), so that we can use it to make a more helpful error message. Refs #8978 git-svn-id: http://code.djangoproject.com/svn/django/trunk@8989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed #5461 -- Refactored the database backend code to use classes for the ↵Russell Keith-Magee
creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-14Fixed #2635 -- Added improved MySQL backend support from Andy Dustman. AlsoMalcolm Tredinnick
added database.txt documentation; currently only describing Django-related features of MySQL versions. As of this commit, there are four known test failures due to (a) no transaction support with MyISAM storage engine and (b) MySQLdb automatically creating decimal types for Django's "float" field. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37