Commit Graph

344 Commits

Author SHA1 Message Date
Alex Gaynor fa8f0cb2d8 When looking for django tables which exist, query for all tables once, not once *per table*.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 00:53:58 +00:00
Russell Keith-Magee 4d5b00b874 Fixed #14517 -- Corrected the exception that is caught when testing for the availability of STDDEV operations. Thanks to agabel for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 02:59:22 +00:00
Ramiro Morales cfdad9ed86 Fixed #14223 -- Extended unification of exception raised in presence of integrity constraint violations.
The unification had been introduced in r12352 and native backend exceptions still
slipped through in cases that end in connection.commit() call. Thanks Alex,
Jacob and Carl for reviewing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 00:01:22 +00:00
Ramiro Morales e1182306fd Fixed a small typo introduced in r14139.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 00:14:41 +00:00
Ramiro Morales 08d14925c9 Fixed #12192 -- Don't execute any DB query when the QS slicing being performed
will result in use of LIMIT 0. Thanks Suor for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 23:36:16 +00:00
Alex Gaynor 5506653b77 Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 03:33:19 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Russell Keith-Magee fea159282b Fixed #14406 -- Added a Python 2.4 compatibility to the logging interface. Thanks to Łukasz Rekucki for the report, and to Luke Plant for original patch this was based on.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-06 15:02:26 +00:00
Russell Keith-Magee 24acca4139 Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 15:12:39 +00:00
Ian Kelly 320c46999c Fixed #14244: Allow lists of more than 1000 items to be used with the 'in' lookup in Oracle, by breaking them up into groups of 1000 items and ORing them together. Thanks to rlynch for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-16 19:53:41 +00:00
Malcolm Tredinnick 17a79d5033 Changed the way we create class names for deferred field models to avoid
problems when people have hundreds of fields on model. Maximum class
name length is now 80 characters and uses a hash when necessary.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:08:10 +00:00
Russell Keith-Magee 6909c22663 Fixed #13798 -- Added connection argument to the connection_created signal. Thanks to liangent for the report, and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30 13:21:18 +00:00
Russell Keith-Magee 1b7fcf4758 Fixed #12343 -- Added support for connection-by-socket to MySQL using the 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
2010-08-28 13:17:50 +00:00
Russell Keith-Magee 72dc12ed06 Rationalized the verbosity levels (including introducing a new super-verbose level) for syncdb, test and loaddata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-07 06:58:14 +00:00
Russell Keith-Magee fc374976e5 Fixed #13946 -- Modified the database cache backend to use the database router to determine availability of the cache table. Thanks to tiemonster for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05 02:13:32 +00:00
Russell Keith-Magee f185a58025 Fixed #13773 -- Passed in the current connection in a call to db_type(). Thanks to Suor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 02:54:47 +00:00
Russell Keith-Magee 398415fc23 Fixed #13821 -- Added a double-quoting to the PostgreSQL sequence reset code. Thanks to PaulM for the report, and to PaulM and Simon Meers for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 02:43:01 +00:00
Russell Keith-Magee bab9aab9a2 Fixed #13941 -- Corrected the way sequence names are reset under Postgres, especially when generic foreign keys are involved. Thanks to Ales Zoulek for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 02:42:36 +00:00
Russell Keith-Magee 6ab3fea113 Fixed #8901 -- Reapplied r13328 (with extra docs) now that we have a 1.3 development branch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-21 11:48:45 +00:00
Russell Keith-Magee 2597f31ed4 Refs #8901 -- Reverted r13328 because the patch imposes a minimum version requirement of Postgres 8.0; we can't impose that on Django 1.2, so we need to wait until the 1.3 is branched before we can apply this change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-10 11:45:29 +00:00
Russell Keith-Magee 21a690fcfe Fixed #8901 -- Corrected the PostgreSQL sequence reset code when field identifiers exceed the maximum identifier length. Thanks to adam@zuerchertech.com for the report, and Matt Hoskins for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-07 15:47:19 +00:00
Russell Keith-Magee c4e0dc6b5e Fixed #13656 -- Ensure that the management commands use the right database for transaction start/end commands. Thanks to Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-28 13:46:12 +00:00
Russell Keith-Magee 5211f48ae3 Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 14:00:30 +00:00
Russell Keith-Magee 60df7421f6 Fixed #13441 -- Enforced a maximum identifier length of 63 for PostgreSQL. Thanks to aball for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-29 01:22:50 +00:00
Ian Kelly 6a1cf9369f Fixed a bug preventing cursor variables from being passed as bind parameters in the oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28 17:08:06 +00:00
Russell Keith-Magee 9d8492c169 Fixed #12977 -- Ensure that indexes don't exceed character limits on MySQL. Thanks to carljm for the original report, and hgeerts@osso.nl for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28 12:08:30 +00:00
Russell Keith-Magee 5866875547 Fixed #13396 -- Modified the SQLite introspection code to avoid a problem with unconsumed cursors on PyPy. Thanks to Alex Gaynor for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-21 23:43:35 +00:00
Russell Keith-Magee 3fb57d47bd Fixed #13328 -- Ensured that querysets on models with callable defaults can be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-21 16:34:33 +00:00
Russell Keith-Magee e9bbdb39de Fixed #13293 -- Corrected a problem with the MySQL handling of boolean return values when a query has an extra() clause. Thanks to mk for the report and draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-09 12:39:08 +00:00
Russell Keith-Magee 82efb48403 Fixed #12328 -- Corrected the handling of subqueries with ordering and slicing, especially when used in delete subqueries. Thanks to Walter Doekes for the report.
This fixes a feature that isn't available under MySQL and Oracle (Refs #10099).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-04 17:05:43 +00:00
Russell Keith-Magee 271bcda04a Fixed #7190 -- Corrected a problem with Boolean value handling on the MySQL backend. Thanks to George Vilches for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-01 15:10:53 +00:00
Russell Keith-Magee 59a7ca9f18 Fixed #12766 -- Only set the psycopg1 client encoding when the connection is first created. This allows the custom_pk test to pass under psycopg1.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25 14:03:35 +00:00
Russell Keith-Magee 04aa8a007e Fixed #12759 -- Fixed the iterator method on psycopg1 cursors, which was preventing the raw_query tests from passing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25 12:36:21 +00:00
Russell Keith-Magee d18501b0ed Fixed #12612 -- Corrected handling of parameter formatting in SQLite backend so that executemany raises exceptions when bad parameter counts are provided. Thanks to Niels <niels@pythonheads.nl> for the report, and Gabriel Hurley for the help narrowing down the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12836 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-23 13:51:11 +00:00
Russell Keith-Magee 4f98a7c45f Fixed #12850 -- Ensured that constraint names are quoted when they are removed. Thanks to Tim Kersten for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 12:29:17 +00:00
Russell Keith-Magee 29cb5124a6 Fixed #12976 -- Fixed the sequence reset commands issued by sqlflush in a multidb setup. To achieve this, database introspection was modified to utilize routing information to determine if a model should be available. Thanks to pczapla for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 13:43:23 +00:00
Karen Tracey ea288f14e0 Changed last_executed_query to avoid raising exceptions on non-utf8-encoded parameter data.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-09 14:46:33 +00:00
Russell Keith-Magee 5670331343 Corrected an edge case introduced in r12602. Thanks to Ramiro Morales for the eagle eyes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26 16:11:25 +00:00
Russell Keith-Magee 46cc7021a8 Fixed #1480 -- Added the ability to use the system timezone. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26 15:33:27 +00:00
Joseph Kocherhans 2f45af6f58 Fixed #12818. SQLite now properly quotes strings for date extraction and truncation. Thanks, SmilyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 15:29:25 +00:00
Russell Keith-Magee c646b99453 No, really this time -- corrected the warning message from r12510.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 12:33:20 +00:00
Russell Keith-Magee ea695f8668 Cleaned up the warning message introduced by r12510.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 12:26:50 +00:00
Russell Keith-Magee 156cdcf92d Fixed #12912 -- Placed the psycopg1-backed ``postgresql`` database backend on the deprecation path.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 12:24:41 +00:00
Russell Keith-Magee b740534dc4 Fixed a regression in the Postgres psycopg cursor handling introduced by r12352. Thanks to Kenneth Gonsalves for the report, and Karen for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-03 07:31:00 +00:00
Russell Keith-Magee 9a014a3a59 Fixed #12732 -- Corrected an argument naming problem introduced by r12532. Thanks to stevedegrace for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-30 02:25:33 +00:00
Russell Keith-Magee 11ee9746a0 Fixed #12702 -- Introduced a common implementation of DatabaseError and IntegrityError, so that database backends can (re)raise common error classes. Thanks for Waldemar Kornewald for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 15:45:55 +00:00
Ian Kelly 9cd1d6ed87 Fixed #11017: Changed implementation of Oracle LIKE lookups to enable index usage. Thanks to Jani Tiainen for this workaround.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25 19:28:36 +00:00
Russell Keith-Magee b3e1162ca5 Fixed #12633 -- Modified some old m2m attribute use in deprecated m2m table creation methods. Also added PendingDeprecation warnings to those methods. Thanks to Alex for the suggestion, and Ramiro for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-19 01:25:30 +00:00
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00