Ticket #7570: t7570-r8930.diff

File t7570-r8930.diff, 2.1 KB (added by Ramiro Morales, 16 years ago)

First try at a documentation addition for this issue

  • docs/ref/databases.txt

    diff -r 67d7706725e5 docs/ref/databases.txt
    a b some limitations on the usage of such LO  
    370370    Oracle. A workaround to this is to keep ``TextField`` columns out of any
    371371    models that you foresee performing ``distinct()`` queries on, and to
    372372    include the ``TextField`` in a related model instead.
     373
     374SQLite notes
     375============
     376
     377Versions of SQLite 3.3.5 and older contain a `bug`_ when handling ``ORDER BY``
     378parameters. This can cause problems when you use the ``select`` parameter for
     379the ``extra()`` QuerySet method. The bug can be identified because a
     380``OperationalError: ORDER BY terms must not be non-integer constants`` error
     381message is generated. The problem can be solved updating SQLite to version 3.3.6
     382or newer, possibly also updating the ``pysqlite2`` Python module in the process.
     383
     384.. _`bug`: http://www.sqlite.org/cvstrac/tktview?tn=1768
     385
     386This has a very low impact because 3.3.6 was released in April 2006, so most
     387current binary distributions for different platforms include newer version of
     388SQLite usable from Python through either the ``pysqlite2`` or the ``sqlite3``
     389modules.
     390
     391But in the case of Windows, the official binary distribution of the stable
     392release of Python 2.5 (2.5.2 as of now) includes SQLite 3.3.4 so the bug can
     393make itself evident in that platform. There are (as of Django 1.0) even three
     394tests in the Django test suite that will fail when run under this setup.  As
     395described above, this can be solved by downloading and installing a newer
     396version of ``pysqlite2`` (``pysqlite-2.x.x.win32-py2.5.exe``) that includes and
     397uses a newer version of SQLite. Python 2.6 will ship with a newer version of
     398SQLite and so will no be affected by this issue.
     399
     400If you are in such platform and find yourself in the need to update
     401``pysqlite``/SQLite, you will also need to manually modify the
     402``django/db/backends/sqlite3/base.py`` file in the Django source tree so it
     403attempts to import ``pysqlite2`` before that ``sqlite3`` and so it can take
     404advantage of the new ``pysqlite2``/SQLite versions.
Back to Top