In the long run I think we should try to add support for as many as of
them as possible but since this will likely require and some time and
discussion we should at least document the limitation.
For context, we spent a good amount of trying to figure out why `SELECT
@@TX_ISOLATION` was returning a `REPEATABLE-READ` while we had set
`isolation_level = 'read committed'` in our `OPTIONS`.
I think it might be more discoverable if the a note was added beside
`DATABASES['OPTIONS']` instead of `dbshell`` as that's where we initially
looked but that's just anecdotal evidence.
--
Ticket URL: <https://code.djangoproject.com/ticket/30865>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:1>
* owner: nobody => Farhaan Bukhsh
* status: new => assigned
Comment:
Hey, I would like to work on this issue. I might need some clarification
since I am a new contributor. Let me know if I am doing this right, adding
documentation saying some options might not be available around
`DATABASES['OPTIONS']` instead near `dbshell` will make it better, right?
Thanks for the help in advance. :joy:
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:2>
Comment (by Simon Charette):
Hello Farhaan, thanks for giving a shot at this ticket!
I'm not sure where of the best place is for the documentation to live but
I have a slight preference for `dbshell` since I can't think of another
place where we special case ''connection'' creation and that was I looked
for when trying to figure out what was happening.
I guess a `..note` pointing to `DATABASE_OPTIONS` mentioning some options
will be ignored because should do.
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:3>
Comment (by Farhaan Bukhsh):
Hey Simon, thanks for replying :) I was thinking something similar may be
a list of all options which is not passed near the dbshell documentation.
What do you think?
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:4>
Comment (by Simon Charette):
> I was thinking something similar may be a list of all options which is
not passed near the dbshell documentation. What do you think?
I think it will be hard to come up with this list for all backends and
maintain it over time as some of them are directly passed to the
underlying connector.
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:5>
Comment (by Farhaan Bukhsh):
Replying to [comment:5 Simon Charette]:
> > I was thinking something similar may be a list of all options which is
not passed near the dbshell documentation. What do you think?
>
> I think it will be hard to come up with this list for all backends and
maintain it over time as some of them are directly passed to the
underlying connector.
So I can just link dbshell with DATABASE_OPTIONS pointing out that some
options might be ignored
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:6>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:7>
Comment (by Farhaan Bukhsh):
Hey Simon according to the documentation
https://docs.djangoproject.com/en/2.2/ref/databases/#isolation-
level%20isolation_level the default is `READ COMMITTED` so the behaviour
you should have got by default in dbshell should be `READ COMMITTED`, do
you think this is another bug or am I missing something?
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:8>
Comment (by Simon Charette):
The MySQL server we were connecting to doesn't default to `READ COMMITTED`
hence why we used `DATABASES['OPTIONS']['isolation_level'] = 'read
committed'` to make sure connections managed by Django have their
isolation level set to the right value.
This option is ignored by `dbshell` which is the reason for this ticket's
existence.
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"cc5622ec8c260535c63279cf6eb293f2b5a742f0" cc5622ec]:
{{{
#!CommitTicketReference repository=""
revision="cc5622ec8c260535c63279cf6eb293f2b5a742f0"
Fixed #30865 -- Doc'd that not all DATABASES['OPTIONS'] are passed to
command-line client.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:10>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"64b01e38f9e2ac0362659968ddb8b65c6e0667a4" 64b01e38]:
{{{
#!CommitTicketReference repository=""
revision="64b01e38f9e2ac0362659968ddb8b65c6e0667a4"
[3.0.x] Fixed #30865 -- Doc'd that not all DATABASES['OPTIONS'] are passed
to command-line client.
Backport of cc5622ec8c260535c63279cf6eb293f2b5a742f0 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:11>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"398a9f42097ce2cbfc05de04d50c1ca18b68d542" 398a9f42]:
{{{
#!CommitTicketReference repository=""
revision="398a9f42097ce2cbfc05de04d50c1ca18b68d542"
[2.2.x] Fixed #30865 -- Doc'd that not all DATABASES['OPTIONS'] are passed
to command-line client.
Backport of cc5622ec8c260535c63279cf6eb293f2b5a742f0 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30865#comment:12>