#31019: The database backend specific checks could be bypassed when using
multiple
databases with one empty default database.
------------------------------------------------+------------------------
Reporter: Shipeng Feng | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Here is the settings:
{{{
#!python
DATABASES = {
'default': {},
'users': {
'NAME': 'user_data',
'ENGINE': 'django.db.backends.mysql',
'USER': 'mysql_user',
'PASSWORD': 'superS3cret'
},
'customers': {
'NAME': 'customer_data',
'ENGINE': 'django.db.backends.mysql',
'USER': 'mysql_cust',
'PASSWORD': 'veryPriv@ate'
}
}
}}}
Here is the related source code:
https://github.com/django/django/blob/f97a6123c07de5099fdf8b7d00ef7d20ed354e07/django/db/models/fields/__init__.py#L340
We only run checks for the first db, and the behavior of the first is
undetermined (the first entry of a dictionary),
if the first db is `default`, then we would only run dummy backend checks,
mysql checks are bypassed.
--
Ticket URL: <https://code.djangoproject.com/ticket/31019>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.63a10a89cbac7c0ed029286a65d41417%40djangoproject.com.