summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2013-07-27[1.5.x] Optimisation in prefetch_related_objectsLuke Plant
Backport of 17559e6eb0 from master
2013-07-27[1.5.x] Fixed #19607 - prefetch_related crashLuke Plant
Thanks to av@rdf.ru and flarno11@yahoo.de for the report. Backport of 4fd94969d8 from master
2013-05-21[1.5.x] Fixed prefetch_related + pickle regressionsAnssi Kääriäinen
There were a couple of regressions related to field pickling. The regressions were introduced by QuerySet._known_related_objects caching. The regressions aren't present in master, the fix was likely in f403653cf146384946e5c879ad2a351768ebc226. Fixed #20157, fixed #20257. Also made QuerySets with model=None picklable.
2013-05-20[1.5.x] Fixed #20278 -- ensured .get() exceptions do not recurse infinitelyAnssi Kääriäinen
A regression caused by d5b93d3281fe93cbef5de84a52 made .get() error reporting recurse infinitely on certain rare conditions. Fixed this by not trying to print the given lookup kwargs. Backpatch of 266c0bb23e9d64c47ace4d162e582febd5a1e336
2013-05-10[1.5.x] Fixed #20025 -- Pointed to a MySQLdb fork for Python 3.Aymeric Augustin
Made a few minor compatibility adjustments. Backport of e81e319f from master.
2013-05-10[1.5.x] [py3] Stopped iterating on exceptions. Refs #20025.Aymeric Augustin
Backport of 86b4ac66 from master.
2013-04-05[1.5.x] Fixed #20207 -- Handle ManyToManyField with a unicode name correctly.Simon Charette
Backport of 216580e034.
2013-03-29[1.5.x] Fixed spelling errorsGavin Wahl
Backport of ec04fd1344 from master
2013-03-26[1.5.x] Fixed #20091 -- Oracle null promotion for empty stringsAnssi Kääriäinen
Backpatch of e17fa9e877e84e93b699c2bd13ea48dbbb86e451
2013-03-22[1.5.x] Fixed #20094 - Be more careful when checking for IteratorMarc Tamlyn
Python 2.6 has some different behaviour when checking isinstance(foo, collections.Iterator). Backport of 829dc3c5 from master.
2013-03-20[1.5.x] Revert "Fixed #19895 -- Made second iteration over invalid queryset ↵Claude Paroz
raise an exception too" This reverts commit d1e87eb3baf75b1b6a0ada46a9b77f7e347cdb60. This commit was the cause of a memory leak. See ticket for more details. Thanks Anssi Kääriäinen for identifying the source of the bug.
2013-02-25[1.5.x] Fixed #19634 -- Added proper __hash__ methods.Aymeric Augustin
Classes overriding __eq__ need a __hash__ such that equal objects have the same hash. Thanks akaariai for the report and regebro for the patch. Backport of e76147a from master.
2013-02-24[1.5.x] Fixed #19688 -- Allow model subclassing with a custom metaclass ↵Simon Charette
using six.with_metaclass Backport of 6b03179e126d4df01623dccc162c1579f349e41e from master. Although we're post RC 2, I'm backporting this because it's arguably a major bug in a new feauture that will prevent several well-known third-party apps from being ported to Python 3.
2013-02-23[1.5.x] Fixed #19895 -- Made second iteration over invalid queryset raise an ↵Grzegorz Nosek
exception too When iteration over a queryset raised an exception, the result cache remained initialized with an empty list, so subsequent iterations returned an empty list instead of raising an exception Backport of 2cd0edaa477b327024e4007c8eaf46646dcd0f21 from master.
2013-02-23[1.5.x] Fixed Oracle regression in last_executed_query() with unicode stringsAnssi Kääriäinen
The regression was likely caused by the fix in #19606 which adjusted Oracle's unicode detection, though it seems this would have been an issue in some configurations even before. Backpatch of ce094e570e0ff085b88b2303e25124331f558e45
2013-02-23[1.5.x] Fixed empty strings + to_field regression on OracleAnssi Kääriäinen
Querying the reverse side of nullable to_field relation, where both sides can contain null values resulted in incorrect results. The reason was not detecting '' as NULL. Refs #17541, backpatch of 09fcb70c804b76fccc8fc0ac545873e5ab30c00a.
2013-02-20[1.5.x] Fixed #19672 -- Error in negated Q() filteringAnssi Kääriäinen
There was a variable overwrite error in negated join filtering. This happened when add_filter() was adding the IS NULL condition to the WHERE clause. This is not a backport from master as there have been some other refactorings which made this patch irrelevant. The patch is from Ian Kelly.
2013-02-13[1.5.x] Removed try-except in django.db.close_connection()Anssi Kääriäinen
The reason was that the except clause needed to remove a connection from the django.db.connections dict, but other parts of Django do not expect this to happen. In addition the except clause was silently swallowing the exception messages. Refs #19707, special thanks to Carl Meyer for pointing out that this approach should be taken.
2013-02-10[1.5.x] Made custom m2m fields without through easier to useAnssi Kääriäinen
The change in f105fbe52b21da206bfbaedf0e92326667d7b2d4 made through=None m2m fields fail in cases where they worked before. It isn't possible to create such fields using public APIs. The fix is trivial, so it seems worth adding it. This is not a backport from master. Master has gotten enough other changes to related fields internal API that this fix alone isn't enough to do any good.
2013-02-10[1.5.x] Fixed #19720 -- Oracle ordering related delete regressionAnssi Kääriäinen
When a query had a complex where condition (a condition targeting more than the base table) a subquery was used for deletion. However, the query had default ordering from the model's meta and Oracle doesn't work with ordered subqueries. The regression was caused by fast-path deletion code introduced in 1cd6e04cd4f768bcd4385b75de433d497d938f82 for fixing #18676. Thanks to Dylan Klomparens for the report. Backpatch of 8ef3235034a1a7616714a5d61486dc68536f74ee
2013-02-10[1.5.x] Fixed #19638 -- Skipped tx support testing for some DBsAnssi Kääriäinen
PostgreSQL and Oracle always support transactions, so the create table and rollback test is non-necessary on those DBs. Thanks to shai for report. Backpatch of 0478780b8efdfcbc0d2c17f1459cac45701e1d86
2013-02-10[1.5.x] Fixed #19707 -- Reset transaction state after requestsAnssi Kääriäinen
Backpatch of a4e97cf315142e61bb4bc3ed8259b95d8586d09c
2013-01-29[1.5.x] Fixed typos in docs and commentsTim Graham
Backport of ee26797cff from master
2013-01-23[1.5.x] Fixed #19652 -- Fixed .none() regression in related fieldsAnssi Kääriäinen
The regression was caused by using .none() when querying for related models, and the origin field's value was None. This resulted in missing custom related manager subclass as .none() returns plain QuerySet. This isn't backport from master, in master .none() correctly preserves the queryset's class. Patch provided by Simon Charette, with some minor polish by committer.
2013-01-19[1.5.x] Fixed #19606 -- Adjusted cx_Oracle unicode detection.Jani Tiainen
Backpatch of d194f290571f7e9dda7d2fd7a6f2b171120f2f14
2013-01-08[1.5.x] Fixed #19576 -- Use `six.with_metaclass` uniformously accross code base.Simon Charette
Backport of f58efd07f from master.
2013-01-08[1.5.x] Fixed #17541 -- Fixed non-saved/nullable fk queryingAnssi Kääriäinen
Backpatch of 55da775ce1bfba20db33b56c29957faa63917980
2013-01-07[1.5.x] Created special PostgreSQL text indexes when unique is TrueClaude Paroz
Refs #19441. Backport of c698c55966 from master.
2013-01-04[1.5.x] Fixed #19192 -- Allowed running tests with dummy db backendClaude Paroz
Thanks Simon Charette for the initial patch, and Jan Bednařík for his work on the ticket. Backport of b740da3504 from master.
2013-01-03Fixed #19426 -- Adapted EmptyQuerySet.distinct signatureClaude Paroz
1.5-only change, as EmptyQuerySet will be refactored in 1.6. Thanks hongshuning@gmail.com for the patch.
2013-01-02[1.5.x] Fixed #19547 -- Caching of related instances.Aymeric Augustin
When &'ing or |'ing querysets, wrong values could be cached, and crashes could happen. Thanks Marc Tamlyn for figuring out the problem and writing the patch. Backport of 07fbc6a.
2012-12-28[1.5.x] Fix #19524 -- Incorrect caching of parents of unsaved model instances.Aymeric Augustin
Thanks qcwxezdas for the report. Refs #13839. Backport of e9c24be.
2012-12-27[1.5.x] Fixed #19525 -- Reverted dcd4383107 and 05d333ba3b.Aymeric Augustin
Refs #9893, #18515. Thanks Russell for the report. Backport of db278c3 from master.
2012-12-21[1.5.x] Refactored proxy model skipping in get_default_columns()Anssi Kääriäinen
The refactoring allows custom subclasses to use different default columns than the base model.
2012-12-20[1.5.x] Fixed #19401 -- Ensure that swappable model references are case ↵Russell Keith-Magee
insensitive. This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the swappable logic gets tied up in knots with models that are partially swapped out. Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch. Backport of c04c03d from trunk.
2012-12-18[1.5.x] Fixed #19441 -- Created PostgreSQL varchar index when unique=TrueClaude Paroz
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the review. Backport of 55972ee5c from master.
2012-12-17[1.5.x] Fixed #19197 -- fixed convert_values() for nullable numeric fieldsAnssi Kääriäinen
Cleaned up the implementation of base convert_values() a little, and made sure it accepts None as a value for numeric fields. There are no tests attached. The reason is that not all of the convert_values() accept None as a value for numeric fields (for example sqlite3.convert_values()). The reason the base convert_values() needs to accept None is that this situation might arise in custom compilers for 3rd party backends. It is easy to keep the convert_values() working, so lets do that. Backpatch of 12a96bfa263d514884ef11009913b2f8bb163472
2012-12-14[1.5.x] Fixed #2304 -- Documented TRANSACTIONS_MANAGED.Aymeric Augustin
Backport of a001f3c.
2012-12-08[1.5.x] Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz
Thanks kujiu for the report and Aymeric Augustin for the review. Backport of c91667338 from master.
2012-11-28[1.5.x] Fixed #14694 again -- Made defer() works with reverse relationsAnssi Kääriäinen
Master and stable/1.5.x had diverged in models/query.py.
2012-11-28[1.5.x] Fixed #14694 -- Made ``defer()`` work with reverse relationsTai Lee
Reverse o2o fields are now usable with defer. Backpatch of [6ebf115206289bce8f3d86318871faac13d6e835]
2012-11-27[1.5.x] Removed duplicate opts.pk_index() methodAnssi Kääriäinen
Backpatch of [d37483c533868e78afd0ca3faf993fee97097f9f]
2012-11-27[1.5.x] Fixed #19362 -- Detected invalid use of @python_2_unicode_compatible.Aymeric Augustin
Thanks m3wolf for the report and akaariai for reproducing the problem. Backport of 2ea80b9.
2012-11-24[1.5.x] Fixed #19806 -- Ensure that content types and permissions aren't ↵Russell Keith-Magee
created for swapped models. Thanks to rizumu for the report. Backport of c8985a8a7317042a641e870cb75b3005cc5d67b1.
2012-11-24[1.5.x] Fixed #19351 -- SQLite bulk_insert of more than 500 single-field objsAnssi Kääriäinen
Backpatch of 0a0a0d66b316598f7c296e8bf75749a14ce3ac49
2012-11-24[1.5.x] Fixed SQLite's collapsing of same-valued instances in bulk_createAnssi Kääriäinen
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem was that there should have been UNION ALL instead of UNION. Refs #19351 Backpatch of a27582484cf814554907d2d1ad077852de36963f
2012-11-23[1.5.x] Fixed #18375 -- Removed dict-ordering dependency for F-expressionsAnssi Kääriäinen
F() expressions reuse joins like any lookup in a .filter() call - reuse multijoins generated in the same .filter() call else generate new joins. Also, lookups can now reuse joins generated by F(). This change is backwards incompatible, but it is required to prevent dict randomization from generating different queries depending on .filter() kwarg ordering. The new way is also more consistent in how joins are reused. Backpatch of 90b86291d022a09031d1df397d7aaebc30e435f7
2012-11-17[1.5.x] Fixed #18989 -- Removed unused condition in CursorWrapperClaude Paroz
Thanks zimnyx for the report. Backport of 8c6927876 from master.
2012-11-15[1.5.x] Fixed #19058 -- Fixed Oracle GIS crashAnssi Kääriäinen
The problem is the same as in #10888 which was reintroduced when bulk_insert was added. Thanks to Jani Tiainen for report, patch and also testing the final patch on Oracle GIS. Backpatch of 92d7f541da8b59520c833b19fbba52d3ecef2428
2012-11-13Fixed select_related performance regressionsAnssi Kääriäinen
The regression was caused by select_related fix for Oracle, commit c159d9cec0baab7bbd04d5d51a92a51e354a722a.