summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/README.google
blob: abc7ee27839563493d38446c9641ce001d095f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
This directory contains a partial snapshot of the sqlite library from
http://sqlite.org.

Current version: 3.5.3, released 23-Nov-2007.

(This was built as 3.4.2 [13-Aug-2007] as described below, with the four
intervening patches 4315, 4427, 4546, and 4556 applied by hand.)

To import a new snapshot of sqlite:

- Visit http://sqlite.org/download.html and download the latest source
  distribution.
- Unpack the source on a Linux machine.
- Change to the source directory and run:
    $ ./configure --disable-tcl  # build headers
    $ make                       # build some generated files
- Copy the generated .c/.h files from the sqlite directory to this directory,
  as well as those in src/ and ext/fts2/.  Omit files which have been omitted
  here.  Here's an easy way to be sure you get everything:
    $ cp /path/to/source/*.[ch] .  # don't forget subdirs, too
    $ gvn status | grep -v ^M      # print the names of all new files
    $ mkdir new; mv each new file to new
    Then rebuild, and if any of the files in new/ are needed, move them
    back into this directory, add them to the project, and "gvn add" them.
- Apply the preload-cache.diff (see below)
- Update this README to reflect the new version number.

Modifications for this release:
- I marked all changes I made with "evanm", so you can find them with
  "grep evanm *".
- Most files include sqlite3ext.h with SQLITE_CORE #defined, but two don't:
  fts2_tokenizer.c and icu.c.  Without this #define, the calls in
  fts2_tokenizer.c try to go through some pointer to the sqlite API instead of
  calling the functions directly (to work as a loadable module), but then crash
  (because the other files never initialize that loadable module support).  As
  a hack I #defined it in these files, but it'd be nice to figure out what
  really ought to happen here (perhaps this file is new and hasn't been tested
  to verify it works right).
- shell_icu.c is a Chrome-specific file used to load our ICU data.  shell.c
  has been modifed to call into shell_icu.c.
- fts2_icu.c has a critical bug. U8_NEXT is used over a UTF-16 string. It's replaced
  by U16_NEXT (jungshik)

Patch
-----
The file preload-cache.diff patch must be applied to add a new function we use
to prime the database cache. It allows much faster performance by reading the
file in one contiguous operation rather than bringing it in organically, which
involves a lot of seeking.

FTS2 modification
-----------------
In fts2.c, we added an additional check from fts3 to try to catch some
additional problems. In buildTerms on line 3807, we replaced
    if( iPosition<0 ){
with:
    if( iPosition<0 || pToken == NULL || nTokenBytes == 0 ){
It is from this change to sqlite:
    http://www.sqlite.org/cvstrac/chngview?cn=4514