Edgewall Software

Changes between Version 57 and Version 58 of PySqlite


Ignore:
Timestamp:
Jan 27, 2015, 9:08:44 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, link updates

Legend:

Unmodified
Added
Removed
Modified
  • PySqlite

    v57 v58  
    1 = PySqlite =
    2 
    3 
    4 [http://pysqlite.googlecode.com PySqlite] is a Python binding
    5 for the [http://www.sqlite.org SQLite] light-weight database engine,
    6 which is Trac's default DatabaseBackend.
    7 
    8 == Installation ==
    9 === The short version ===
    10 
    11 {{{
    12 #!div style="background: #f0f0f0; padding: .5em"
    13 
    14 If you're using Python 2.5 and up, you already have a working version of pysqlite 2, bundled as `sqlite3`. You can stop here ;-)
    15 
    16 If you are using an older version of Python or you'd like to benefit from the latest and greatest version of pysqlite, grab Windows installer or the source .tar.gz from the official [http://code.google.com/p/pysqlite/downloads/list Downloads].
     1= PySqlite
     2
     3[https://pypi.python.org/pypi/pysqlite PySqlite] is a Python binding for the [http://www.sqlite.org SQLite] light-weight database engine, which is Trac's default DatabaseBackend.
     4
     5== Installation
     6=== The short version
     7
     8If you're using Python 2.5 and up, you already have a working version of pysqlite 2, bundled as `sqlite3`.
     9
     10If you are using an older version of Python or you'd like to benefit from the latest version of pysqlite, grab Windows installer or the source .tar.gz from the official [https://pypi.python.org/pypi/pysqlite pysqlite site].
    1711
    1812If you need to build from this .tar.gz, simply do after unpacking:
     
    2216This will fetch the latest SQLite version and bundle it within the extension.
    2317
    24 }}}
    25 
    2618[[PageOutline(2-4)]]
    2719
    28 === The SQLite library ===
    29 
    30 Trac supports '''[http://www.sqlite.org/version3.html SQLite 3.x]''',
    31 like SQLite 3.3.8, 3.5.6, etc. The latest tested as of this writing ('''3.6.12''') works fine.
    32 
    33 Pay attention to
    34 [http://www.sqlite.org/formatchng.html database format changes]
    35 when upgrading the SQLite library.
    36 See below how to [wiki:PySqlite#UpgradingSQLite upgrade] your database,
    37 if needed (SQLite v2.x is no longer supported in 0.12.x, use it at your own risks with earlier versions of Trac).
    38 The recent ''[[http://www.sqlite.org/wal.html|WAL]]'' mode introduced with sqlite 3.7.0 also works great with Trac.
    39  
    40 
    41 ==== Downloading SQLite ====
    42 
    43 The latest stable version of SQLite can be obtained on the
    44 [http://www.sqlite.org/download.html SQLite download] page.
    45 
    46 But you don't need to download it by yourself,
    47 if you install the pysqlite bindings from a package, it
    48 will usually come with the SQLite code bundled.
    49 
    50 If you build the pysqlite bindings by yourself, you also
    51 have the possibility to use the `build_static` mode, which
    52 will download the latest "amalgamation" code of SQLite and
    53 build it together with the extension code.
    54 
    55 
    56 ==== Building SQLite yourself ====
    57 
    58 If you really insist in being in full control...
    59 
    60 '''Note:''' If you want to use Trac in a multi-threaded setup
    61 by using either TracModPython or TracStandalone, be sure to build a
    62 '''thread-safe version of SQLite''', by using the `--enable-threadsafe`
    63 configuration switch.
    64 
    65 If you use a non thread-safe library, which is unfortunately what you
    66 get by default on non-windows platforms, you face the risk to get
    67 persistent database locks (see #2170).
    68 
    69 === The Pysqlite2 bindings ===
    70 
    71 The latest stable version available at pysqlite.googlecode.com as of this writing is '''2.5.6''', and it works fine with Trac.
    72 
    73 {{{
    74 #!comment
    75 For the very adventurous people, note that there's also a few experimental versions:
    76  - ctypes based: http://code.google.com/p/pysqlite/source/browse/?r=ctypes
    77  - cython based: http://code.google.com/p/pysqlite/source/browse/?r=cython
    78 
    79 The ctypes based one worked quite fine with Trac at the time I tested it.
    80 
    81 The reason why this info is commented out is that I don't know if Gerhard really wants those versions to be publicized ;-)
    82 }}}
     20=== The SQLite library
     21
     22Trac supports '''[http://www.sqlite.org/version3.html SQLite 3.x]'''.
     23
     24Pay attention to [http://www.sqlite.org/formatchng.html database format changes] when upgrading the SQLite library, see below for [wiki:PySqlite#UpgradingSQLite details]. Note that SQLite v2.x is no longer supported in Trac 0.12.x, use it at your own risk with earlier versions of Trac.
     25
     26The [http://www.sqlite.org/wal.html WAL mode] introduced with SQLite 3.7.0 also works great with Trac.
     27
     28==== Downloading SQLite
     29
     30The latest stable version of SQLite can be obtained on the [http://www.sqlite.org/download.html SQLite download] page. However, if you install the pysqlite bindings from a package, it will usually come with the SQLite code bundled.
     31
     32If you build the pysqlite bindings by yourself, you also have the possibility to use the `build_static` mode, which will download the latest "amalgamation" code of SQLite and build it together with the extension code.
     33
     34==== Building SQLite yourself
     35
     36'''Note:''' If you want to use Trac in a multi-threaded setup by using either TracModPython or TracStandalone, build a '''thread-safe version of SQLite''' by using the `--enable-threadsafe` configuration switch.
     37
     38If you use a non thread-safe library, which is unfortunately what you get by default on non-Windows platforms, you face the risk of persistent database locks, see #2170.
     39
     40=== The Pysqlite2 bindings
    8341
    8442Detailed information about older releases:
     
    8644   * version 1.1.6 as of this writing,
    8745   * version ''1.1.7'' required if using SQLite >= 3.3.3
    88    But really, you should be using the 2.x versions, at this time.
     46   But you should upgrade to the 2.x versions, at this time.
    8947 * Trac 0.12.x requires one of the newer 2.x release branch
    9048   * version >= 2.0.5 preferred,
    91    * 2.0.3 has been reported to cause [ticket:2688 crashes] on Windows
     49   * 2.0.3 has been reported to cause crashes on Windows (#2688)
    9250   * version '''2.0.7''' required if using SQLite >= 3.3.3
    9351 * The ''2.1.3'' version appears to work well with Trac.
     
    9553   a better handling of concurrent write operations.
    9654 * The ''2.2.0'' version appears to work with Trac as well
    97    (I tested the 2.4 egg from initd on Windows, and on Linux I
    98    built it from source, linking with sqlite-3.3.4; so far both
     55   (I tested the 2.4 egg from initd on Windows, and on Linux I built it from source, linking with sqlite-3.3.4; so both
    9956   are working perfectly)
    100  * The ''2.3.2'' version is the one which ships with Python 2.5 (available there as the `sqlite3` package. Trac tries to use it if the `pysqlite2` package is installed).
    101  * You need ''2.3.3'' if you use Apache and `mod_cache` (see Pysqlite:#174).
    102  * The versions 2.5.2 - 2.5.4 have a bug that prevents upgrading from 0.11 to 0.12 (and possibly other breakage), so don't use any of those (see #9434).
    103 
    104 Note that bug reports involving the obsolete pysqlite 1.0.x (for SQLite v2)
    105 will simply not be considered. Starting with 0.11.6, there will be an explicit
    106 deprecation warning and in 0.12, support for that version will be removed.
    107 
    108 ==== Downloading Pysqlite ====
    109 
    110  * The source tarballs for the versions listed above are available from the
    111    [http://code.google.com/p/pysqlite/downloads/list Downloads] tab.
     57 * The ''2.3.2'' version is the one which ships with Python 2.5, available there as the `sqlite3` package. Trac tries to use it if the `pysqlite2` package is installed.
     58 * You need ''2.3.3'' if you use Apache and `mod_cache`, see Pysqlite:#174.
     59 * The versions 2.5.2 to 2.5.4 have a bug that prevents upgrading from 0.11 to 0.12 (and possibly other breakage), so don't use any of those, see #9434.
     60
     61Note that bug reports involving the obsolete pysqlite 1.0.x (for SQLite v2) will simply not be considered. Starting with Trac 0.11.6, there will be an explicit deprecation warning and in Trac 0.12, support for that version will be removed.
     62
     63==== Downloading Pysqlite
     64
     65The source tarballs for the versions listed above are available from the [https://pypi.python.org/pypi/pysqlite pysqlite site].
    11266 
    113 ==== Building pysqlite ====
    114 
    115 The recommended way to build the SQLite bindings is to do a `static_build`,
    116 which will download the latest sqlite3 amalgamation file, build and link it inside
    117 the pysqlite module:
     67==== Building Pysqlite
     68
     69The recommended way to build the SQLite bindings is to do a `static_build`, which will download the latest sqlite3 amalgamation file, build and link it inside the Pysqlite module:
    11870 
    11971{{{
     
    12476}}}
    12577
    126 ''Note: Users of Mac OS X please take care; the Apple-supplied SQLite contains additional code to support file locking on network filesystems like AFP or SMB. This is not presently (3.3.6) in the mainline sources, so if you build your own SQLite from source it will not function correctly on such filesystems - typically it gives the error "{{{database is locked}}}". [http://www.alastairs-place.net/2006/07/sqlite_and_mac/ A patch] is available for version 3.3.6, based on Apple's code, otherwise you're probably best off using the Apple supplied version (presently 3.1.3).''
    127 
    128 == Upgrading SQLite ==
    129 === Upgrading SQLite from 2.x to 3.x ===
    130 
    131 It is not advised anymore to use SQLite 2.x. Support for this version and the corresponding PySqlite 1.0.x bindings will be dropped in Trac version [milestone:0.12].
    132 If you happen to use that version, you will need to upgrade.
    133 
    134 The following information is copied from http://dev.ctor.org/pkcs1/wiki/TracUpgrade
    135 
    136 The database formats used by SQLite 2.x and sqlite 3.x are incompatible. If you upgrade your SQLite version (this can  also happen implicitly if you upgrade from PySQLite 1.0.x to 1.1.x or 2.x), then you must convert your database.
    137 
    138 To do this, install both SQLite 2.8 and SQLite 3.x  (they have different filenames so can coexist in the same directory). Then use the following commands (Windows):
     78'''Users of Mac OS X please take care''': the Apple-supplied SQLite contains additional code to support file locking on network filesystems like AFP or SMB. This is not presently (3.3.6) in the mainline sources, so if you build your own SQLite from source it will not function correctly on such filesystems - typically it gives the error "{{{database is locked}}}". [http://alastairs-place.net/blog/2006/07/10/sqlite-and-mac/ A patch] used to be available, but you're better off using the Apple supplied version (presently 3.1.3).
     79
     80== Upgrading SQLite
     81=== Upgrading SQLite from 2.x to 3.x
     82
     83It is not advised to use SQLite 2.x, because support for this version and the corresponding PySqlite 1.0.x bindings will be dropped in Trac version [milestone:0.12]. If you happen to use that version, you will need to upgrade.
     84
     85The database formats used by SQLite 2.x and SQLite 3.x are incompatible. If you upgrade your SQLite version - and this can also happen implicitly if you upgrade from PySQLite 1.0.x to 1.1.x or 2.x - then you must convert your database.
     86
     87To do this, install both SQLite 2.8 and SQLite 3.x. They have different filenames, so can coexist in the same directory. Then use the following commands (Windows):
    13988{{{
    14089 $ mv trac.db trac2.db
     
    14291}}}
    14392
    144 Then when you're happy with the conversion and tested everything  you can delete the trac2.db file.
    145 
    146 === Upgrading SQLite from 3.x.y to 3.x.z ===
    147 
    148 It's almost the same as above.
    149 The following shows you how to upgrade from 3.2.8 to 3.3.4:
     93Then when you're happy with the conversion and tested everything, you can delete the trac2.db file.
     94
     95=== Upgrading SQLite from 3.x.y to 3.x.z
     96
     97Similar to above, the following shows you how to upgrade from SQLite 3.2.8 to 3.3.4:
    15098
    15199{{{
     
    156104}}}
    157105
    158 
    159 == Troubleshooting ==
    160 
    161 From time to time, there are reports about problems related to
    162 Pysqlite and/or SQLite. This section willl guide you through
    163 understanding and fixing those issues, should those problems
    164 also happen to you.
    165 
    166 === Determine actual SQLite and PySqlite version ===
    167 
    168 Troubleshooting is greatly helped by knowing exactly what versions are used for {{{sqlite}}} inside your Python interpreter. Especially on *nix systems, a number of different versions might exist - and the actual versions linked and used might not be what you think.
     106== Troubleshooting
     107
     108From time to time, there are reports about problems related to Pysqlite and/or SQLite, and here are a few of those with resolutions.
     109
     110=== Determine actual SQLite and PySqlite version
     111
     112Troubleshooting is greatly helped by knowing exactly what versions are used for {{{sqlite}}} inside your Python interpreter. Especially on *nix systems different versions might exist and the actual versions linked and used might not be what you think.
    169113
    170114To test the version of PySqlite what your Python installation uses and the version of SQLite linked, try this inside an interpreter:
     
    177121}}}
    178122
    179 To ensure that this is the exact version Trac uses - you may try this:
     123To ensure that this is the exact version Trac uses, you may try this:
    180124
    181125{{{
     
    190134}}}
    191135
    192 PySqlite is version 2 (2.6.0), compiled and linked to use version SQLite 3.7.5.
     136In other words, PySqlite is version 2.6.0, compiled and linked to use version SQLite 3.7.5.
    193137
    194138Another way to test the bindings with PySqlite 2 is to use:
     
    205149}}}
    206150
    207 === Check if database is ok ===
    208 Sometimes vacuum helps to fix inconsistencies in the db. See also [http://www.sqlite.org/pragma.html pragma], [http://www.sqlite.org/sqlite.html command line], [http://www.sqlite.org/lang_vacuum.html vacuum].
     151=== Check if database is ok
     152
     153Sometimes `vacuum` helps to fix inconsistencies in the database:
    209154{{{
    210155$ sqlite3 trac-parent/mytracinstance/db/trac.db
     
    216161}}}
    217162
    218 === Common ''Oops'' ===
    219 
    220 ==== `OperationalError: unsupported file format` ====
    221 
    222   ''This probably is symptomatic of a mismatch between the SQLite library and the SQLite database format.''
     163See also [http://www.sqlite.org/pragma.html pragma], [http://www.sqlite.org/sqlite.html command line], [http://www.sqlite.org/lang_vacuum.html vacuum].
     164
     165=== Common errors
     166
     167==== `OperationalError: unsupported file format`
     168
     169''This probably is symptomatic of a mismatch between the SQLite library and the SQLite database format.''
    223170
    224171See Trac-ML:7540
    225172
    226 And this might be caused by a different version of PHP's pdo_sqlite module when you use Trac in mod_python mode. Check your pdo_sqlite module's version, or if OK, you may simply disable it (see /etc/php.d/pdo_sqlite.ini). (Note that sqlite 3.3.x and 3.2.x does not have compatibility.)
    227 
    228 ==== `DatabaseError: file is encrypted or is not a database` ====
     173And this might be caused by a different version of PHP's pdo_sqlite module when you use Trac in mod_python mode. Check your pdo_sqlite module's version, or if OK, you may simply disable it, see `/etc/php.d/pdo_sqlite.ini`. Note that sqlite 3.3.x and 3.2.x are not compatible.
     174
     175==== `DatabaseError: file is encrypted or is not a database`
    229176
    230177There are typically three situations in which this somewhat ''cryptic'' error message can be seen:
    231178 - when trying to modify the database file and the '''write''' permission is missing; fix the permissions
    232179 - when accessing a SQLite 2.x database file with a SQLite 3.x library; see [#UpgradingSQLitefrom2.xto3.x above] for the upgrade instructions.
    233  - when accessing a database that has been created in or explicitly converted to WAL mode, using a version of SQLite older than 3.7.0 (i.e. with no WAL support); upgrade your bindings to use a recent SQLite
    234 
    235 
    236 ==== `OperationalError: SQL logic error or missing database` ====
    237 
    238   ''This can indicate that the database was corrupted.''
    239 
    240 A procedure similar to upgrading can be used in order to recover
    241 such a database:
     180 - when accessing a database that has been created in or explicitly converted to WAL mode, using a version of SQLite older than 3.7.0, ie with no WAL support; upgrade your bindings to use a recent SQLite.
     181
     182==== `OperationalError: SQL logic error or missing database`
     183
     184''This can indicate that the database was corrupted.''
     185
     186A procedure similar to upgrading can be used in order to recover such a database:
    242187{{{
    243188sqlite3 corrupted.db .dump | sqlite3 recovered.db
    244189}}}
    245190
    246 (see #2598, for example)
    247 
    248   ''This can also be the symptom of errors due to constraint violations''
     191See #2598, for example.
     192
     193''This can also be the symptom of errors due to constraint violations''
    249194
    250195And this ''might'' correspond to an open bug. See #2902 and #2570.
    251196
    252 ==== `OperationalError: unable to open database file` ====
    253 
    254 Besides the obvious reason of missing '''read''' permissions on the file, it can also happen when the server process has already opened too many files and is unable to open new ones due to O/S limitations. See #8551 for a detailed explanation. You can tell immediately between the two causes depending on the occurrence of the error: if the error is systematic, it's a permission problem, if it's only transient and happening under load, then it's likely the second.
    255 
    256 ==== `OperationalError: database is locked` ====
     197==== `OperationalError: unable to open database file`
     198
     199Besides the obvious reason of missing '''read''' permissions on the file, it can also happen when the server process has already opened too many files and is unable to open new ones. See #8551 for a detailed explanation. You can tell immediately between the two causes depending on the occurrence of the error: if the error is systematic, it's a permission problem, if it's only transient and happening under load, then it's likely an operating system limitation.
     200
     201==== `OperationalError: database is locked`
    257202
    258203There are numerous reasons why you can get this.
    259204
    260 First, if this only happens occasionally and if the Trac server
    261 is still reachable after a second attempt, then it's not really
    262 a problem. This simply can happen and indicates that some
    263 other user was writing to the database at the same time your
    264 request triggerd an attempted to write.
    265 There are probably a few things that could be enhanced in the
    266 future to handle this situation, like automatic retry, see #3446.
    267 
    268 Also, is this error is somehow inevitable with SQLite, we should make
    269 the error message a bit more "user friendly" (#3503).
    270 
    271 The lock error is also much more frequent if SQLite is used in a
    272 multi-threaded environment (like TracStandalone or TracModPython)
    273 but the library was not compiled to be thread-safe.
    274 See above, [#BuildingSQLiteyourself building from source], and #2170.
    275 
    276 The real problem with this occurs when ''all'' requests to Trac
    277 end up with this error. This indicates a permanent lock situation,
    278 which is not normal. Here are the known possible reasons for this:
     205First, if this only happens occasionally and if the Trac server is still reachable after a second attempt, then it's not really
     206a problem. This simply can happen and indicates that some other user was writing to the database at the same time your request triggered an attempted to write.
     207There are probably a few things that could be enhanced in the future to handle this situation, like automatic retry, see #3446.
     208
     209Also, if this error is somehow inevitable with SQLite, we should make the error message a bit more "user friendly" (#3503).
     210
     211The lock error is also much more frequent if SQLite is used in a multi-threaded environment, like TracStandalone or TracModPython, but the library was not compiled to be thread-safe. See above, [#BuildingSQLiteyourself building from source], and #2170.
     212
     213The real problem with this occurs when ''all'' requests to Trac end up with this error. This indicates a permanent lock situation, which is not normal. Here are the known possible reasons for this:
    279214 * there was a crash related to some other part of the system,
    280215   like due to the svn bindings, and the SQLite journal file
     
    282217   Simply removing the journal file will take care of the lock
    283218   situation. Of course, you'll have to fix the faulty part of
    284    system in order to get rid of the crashes (e.g. see #1590).
     219   system in order to get rid of the crashes (#1590).
    285220 * The Pysqlite version is older than 2.0.5 and/or Trac is pre0.9.
    286    Upgrading Trac and Pysqlite will solve the issue (see #2345)
     221   Upgrading Trac and Pysqlite will solve the issue (#2345).
    287222
    288223See also: SQLite:DatabaseIsLocked.
    289224
    290 ==== `ProgrammingError: library routine called out of sequence` ====
    291 
    292 This happens on MacOS X, and is still an open issue (see #2969)
     225==== `ProgrammingError: library routine called out of sequence`
     226
     227This happens on MacOS X, see #2969.
    293228
    294229See also: SQLite:LibraryRoutineCalledOutOfSequence.
    295230
    296 ==== `Warning: You can only execute one statement at a time.` ====
    297 
    298 This is typically an error which happens when the pysqlite package
    299 you're using is loading at runtime a `sqlite3.so` library which has
    300 a different version than the one against which pysqlite was built
    301 (e.g. see #2993).
    302 
    303 ==== `DatabaseError: database is full` ====
    304 
    305 Besides the obvious reason (no space left on the partition where
    306 the trac db resides), you probably ran out of space in either
    307 `/tmp` or `/var/tmp`, where SQLite apparently needs to write too.
    308 See #2356, #ps20.
    309 
    310 ==== `NameError: global name 'sqlite' is not defined` ====
    311 
    312 This error usually comes from an invalid PySqlite installation:[[BR]]
    313 The Python interpreter is not able to import the sqlite module.
     231==== `Warning: You can only execute one statement at a time.`
     232
     233This is typically an error which happens when the pysqlite package you're using is loading at runtime a `sqlite3.so` library which has a different version than the one against which pysqlite was built, eg see #2993.
     234
     235==== `DatabaseError: database is full`
     236
     237Besides the obvious reason (no space left on the partition where the trac db resides), you probably ran out of space in either
     238`/tmp` or `/var/tmp`, where SQLite apparently needs to write too. See #2356, #ps20.
     239
     240==== `NameError: global name 'sqlite' is not defined`
     241
     242This error usually comes from an invalid PySqlite installation: the Python interpreter is not able to import the sqlite module.
    314243{{{
    315244...
     
    320249}}}
    321250
    322  * Check that the sqlite Python module can be load from a Python interpreter
     251 * Check that the sqlite Python module can be load from a Python interpreter:
    323252{{{
    324253python
     
    330259A common mistake is to install PySqlite for one Python interpreter, and run the server with another Python interpreter: both interpreters do not use the same paths to search for modules.
    331260
    332 Another possible mistake is the pysqlite2 installer forgot to make "_sqlite.so" dll unreadable by anyone other than root.  Fix by chmod 775 _sqlite.so inside $PYTHON_PATH/site-packages/pysqlite2/. 
    333 
    334 Also make sure you ld.so.cache (ldconfig --print-cache (if using debian)) finds the correct path for installed libraries that Trac depends on.  If can't modify, set set your LD_LIBRARY_PATH to point where sqlite dlls are installed.
    335 
    336 ==== `_sqlite.so: Undefined symbol "PyGILState_Ensure"` ====
    337 
    338 If after the import test you encounter this message it most likely means that your Python was not compiled with threads support. On FreeBSD this is easily verified by doing a {{{grep -i threads /var/db/ports/python24/options}}}. If it comes back with a {{{WITHOUT_THREADS=true}}} you need to configure Python to be compiled with threads by executing {{{make config}}} in the appropriate Python ports directory and subsequently recompile and replace Python.
    339 
    340 ==== `InterfaceError: Cursor needed to be reset because of commit/rollback and can no longer be fetched from.` ====
    341 
    342 When upgrading trac databases from 0.11.x to 0.12, the trac-admin upgrade script will die with this error due to a bug in PySqlite versions 2.5.2-2.5.4. It is advised to use either a newer or older release to successfully upgrade. See ticket #9434 for full details.
    343 
    344 === Other issues ===
    345 
    346 ==== `Segmentation Fault` ====
    347 
    348 Some old Python 2.3 versions (like on SuSE 9.0) have a bug
    349 related to gc and weakrefs, which might be triggered by Trac.
    350 
    351 ([http://projects.edgewall.com/trac/ticket/2170#change_8 details])
    352 
    353 Segmentation faults can also happen in multi-threaded servers using a SQLite library which has ''not'' been configured to be multi-thread safe (see [#BuildingSQLiteyourself above]).
    354 
    355 ==== Summary of Known Issues ====
     261Another possibility is the pysqlite2 installer forgot to make "_sqlite.so" dll unreadable by anyone other than root. Fix by `chmod 775 _sqlite.so` inside `$PYTHON_PATH/site-packages/pysqlite2/`. 
     262
     263Also make sure you ld.so.cache (`ldconfig --print-cache` if using Debian) finds the correct path for installed libraries that Trac depends on. If it cannot be modified, set set your LD_LIBRARY_PATH to point where SQLite dlls are installed.
     264
     265==== `_sqlite.so: Undefined symbol "PyGILState_Ensure"`
     266
     267If after the import test you encounter this message, it most likely means that your Python was not compiled with threads support. On FreeBSD this is easily verified by doing a {{{grep -i threads /var/db/ports/python24/options}}}. If it comes back with a {{{WITHOUT_THREADS=true}}}, you need to configure Python to be compiled with threads by executing {{{make config}}} in the appropriate Python ports directory and subsequently recompile and replace Python.
     268
     269==== `InterfaceError: Cursor needed to be reset because of commit/rollback and can no longer be fetched from.`
     270
     271When upgrading trac databases from 0.11.x to 0.12, the trac-admin upgrade script will die with this error due to a bug in PySqlite versions 2.5.2-2.5.4. It is advised to use either a newer or older release to successfully upgrade. See ticket #9434 for details.
     272
     273=== Other issues
     274
     275==== `Segmentation Fault`
     276
     277Some old Python 2.3 versions (like on SuSE 9.0) have a bug related to gc and weakrefs, which might be triggered by Trac.
     278
     279See [http://projects.edgewall.com/trac/ticket/2170#change_8 details].
     280
     281Segmentation faults can also happen in multi-threaded servers using a SQLite library which has ''not'' been configured to be multi-thread safe, see [#BuildingSQLiteyourself above].
     282
     283==== Summary of Known Issues
    356284
    357285[[TicketQuery(status=!closed&keywords=~sqlite&type=defect)]]
    358 
    359 '''P.S. Note that despite of all of the above, for some (most?) users, SQLite/Pysqlite works flawlessly :)'''