diff options
author | Keryn Knight <keryn@kerynknight.com> | 2021-08-14 15:30:54 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-08-19 13:28:59 +0200 |
commit | bf5abf1bdcedb15e949db419c61eeec7c88414ea (patch) | |
tree | ad3354a181a6a2d8cb75cab7e9dc4087ce72990f /django/db/backends/mysql/schema.py | |
parent | faf6d48590386987a08178ca0d7154b1500560b8 (diff) | |
download | django-bf5abf1bdcedb15e949db419c61eeec7c88414ea.tar.gz |
Fixed #33025 -- Avoided accessing the database connections in Query.build_lookup() when not necessary.
Of the built-in backends, only Oracle treats empty strings and nulls as
equal, so avoid testing the default connection backend for
interprets_empty_strings_as_nulls if it can be established from the
lookup that it wouldn't affect the lookup instance returned. This
improves performance a small amount for most lookups being built,
because accessing the connections requires touching the thread critical
`Local` which is an expensive operation.
Diffstat (limited to 'django/db/backends/mysql/schema.py')
0 files changed, 0 insertions, 0 deletions