/ Check-in [42338e9e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge the latest trunk changes into shared-schema branch. Also fix a C99-ism in that branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | shared-schema
Files: files | file ages | folders
SHA1:42338e9e6979bb497823527f8f39e96f63623c59
User & Date: drh 2012-06-05 19:20:03
Context
2012-06-06
10:56
Make sure the Index.azColl pointers do not point to connection-specific memory. Also, remove an unnecessary reinitialization to sqlite3.pDfltColl. Closed-Leaf check-in: c469850b user: drh tags: shared-schema
2012-06-05
19:20
Merge the latest trunk changes into shared-schema branch. Also fix a C99-ism in that branch. check-in: 42338e9e user: drh tags: shared-schema
13:56
Add sqlite3_quota_ferror() and sqlite3_quota_file_available() interfaces to test_quota.c. Change sqlite3_quota_fwrite() to use a const input buffer. check-in: 61669c95 user: drh tags: trunk
2012-05-16
14:29
Return SQLITE_MISUSE if an application attempts to register a virtual table module with the same name as an existing module. check-in: ea2cd55e user: dan tags: shared-schema
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   161    161   
   162    162   # Object files for the SQLite library (non-amalgamation).
   163    163   #
   164    164   LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
   165    165            backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
   166    166            callback.lo complete.lo ctime.lo date.lo delete.lo \
   167    167            expr.lo fault.lo fkey.lo \
   168         -         fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo fts3_porter.lo \
   169         -         fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo fts3_write.lo \
          168  +         fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
          169  +         fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
          170  +         fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
   170    171            func.lo global.lo hash.lo \
   171    172            icu.lo insert.lo journal.lo legacy.lo loadext.lo \
   172    173            main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
   173    174            memjournal.lo \
   174    175            mutex.lo mutex_noop.lo mutex_os2.lo mutex_unix.lo mutex_w32.lo \
   175    176            notify.lo opcodes.lo os.lo os_os2.lo os_unix.lo os_win.lo \
   176    177            pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
................................................................................
   313    314     $(TOP)/ext/fts3/fts3_hash.h \
   314    315     $(TOP)/ext/fts3/fts3_icu.c \
   315    316     $(TOP)/ext/fts3/fts3_porter.c \
   316    317     $(TOP)/ext/fts3/fts3_snippet.c \
   317    318     $(TOP)/ext/fts3/fts3_tokenizer.h \
   318    319     $(TOP)/ext/fts3/fts3_tokenizer.c \
   319    320     $(TOP)/ext/fts3/fts3_tokenizer1.c \
          321  +  $(TOP)/ext/fts3/fts3_unicode.c \
          322  +  $(TOP)/ext/fts3/fts3_unicode2.c \
   320    323     $(TOP)/ext/fts3/fts3_write.c
   321    324   SRC += \
   322    325     $(TOP)/ext/icu/sqliteicu.h \
   323    326     $(TOP)/ext/icu/icu.c
   324    327   SRC += \
   325    328     $(TOP)/ext/rtree/rtree.h \
   326    329     $(TOP)/ext/rtree/rtree.c

Changes to Makefile.msc.

   246    246   
   247    247   # Object files for the SQLite library (non-amalgamation).
   248    248   #
   249    249   LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
   250    250            backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
   251    251            callback.lo complete.lo ctime.lo date.lo delete.lo \
   252    252            expr.lo fault.lo fkey.lo \
   253         -         fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo fts3_porter.lo \
   254         -         fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo fts3_write.lo \
          253  +         fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
          254  +         fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
          255  +         fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
   255    256            func.lo global.lo hash.lo \
   256    257            icu.lo insert.lo journal.lo legacy.lo loadext.lo \
   257    258            main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
   258    259            memjournal.lo \
   259    260            mutex.lo mutex_noop.lo mutex_os2.lo mutex_unix.lo mutex_w32.lo \
   260    261            notify.lo opcodes.lo os.lo os_os2.lo os_unix.lo os_win.lo \
   261    262            pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
................................................................................
   401    402     $(TOP)\ext\fts3\fts3_hash.h \
   402    403     $(TOP)\ext\fts3\fts3_icu.c \
   403    404     $(TOP)\ext\fts3\fts3_porter.c \
   404    405     $(TOP)\ext\fts3\fts3_snippet.c \
   405    406     $(TOP)\ext\fts3\fts3_tokenizer.h \
   406    407     $(TOP)\ext\fts3\fts3_tokenizer.c \
   407    408     $(TOP)\ext\fts3\fts3_tokenizer1.c \
          409  +  $(TOP)\ext\fts3\fts3_unicode.c \
          410  +  $(TOP)\ext\fts3\fts3_unicode2.c \
   408    411     $(TOP)\ext\fts3\fts3_write.c
   409    412   SRC = $(SRC) \
   410    413     $(TOP)\ext\icu\sqliteicu.h \
   411    414     $(TOP)\ext\icu\icu.c
   412    415   SRC = $(SRC) \
   413    416     $(TOP)\ext\rtree\rtree.h \
   414    417     $(TOP)\ext\rtree\rtree.c
................................................................................
   508    511     $(TOP)\src\vdbetrace.c \
   509    512     $(TOP)\src\where.c \
   510    513     parse.c \
   511    514     $(TOP)\ext\fts3\fts3.c \
   512    515     $(TOP)\ext\fts3\fts3_aux.c \
   513    516     $(TOP)\ext\fts3\fts3_expr.c \
   514    517     $(TOP)\ext\fts3\fts3_tokenizer.c \
          518  +  $(TOP)\ext\fts3\fts3_unicode.c \
          519  +  $(TOP)\ext\fts3\fts3_unicode2.c \
   515    520     $(TOP)\ext\fts3\fts3_write.c \
   516    521     $(TOP)\ext\async\sqlite3async.c
   517    522   
   518    523   # Header files used by all library source files.
   519    524   #
   520    525   HDR = \
   521    526      $(TOP)\src\btree.h \
................................................................................
   921    926   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
   922    927   
   923    928   fts3_tokenizer.lo:	$(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
   924    929   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
   925    930   
   926    931   fts3_tokenizer1.lo:	$(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
   927    932   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
          933  +
          934  +fts3_unicode.lo:	$(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
          935  +	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
          936  +
          937  +fts3_unicode2.lo:	$(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
          938  +	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
   928    939   
   929    940   fts3_write.lo:	$(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
   930    941   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
   931    942   
   932    943   rtree.lo:	$(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
   933    944   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
   934    945   

Changes to VERSION.

     1         -3.7.12
            1  +3.7.13

Changes to configure.

     1      1   #! /bin/sh
     2      2   # Guess values for system-dependent variables and create Makefiles.
     3         -# Generated by GNU Autoconf 2.62 for sqlite 3.7.12.
            3  +# Generated by GNU Autoconf 2.62 for sqlite 3.7.13.
     4      4   #
     5      5   # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
     6      6   # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
................................................................................
   739    739   MFLAGS=
   740    740   MAKEFLAGS=
   741    741   SHELL=${CONFIG_SHELL-/bin/sh}
   742    742   
   743    743   # Identity of this package.
   744    744   PACKAGE_NAME='sqlite'
   745    745   PACKAGE_TARNAME='sqlite'
   746         -PACKAGE_VERSION='3.7.12'
   747         -PACKAGE_STRING='sqlite 3.7.12'
          746  +PACKAGE_VERSION='3.7.13'
          747  +PACKAGE_STRING='sqlite 3.7.13'
   748    748   PACKAGE_BUGREPORT=''
   749    749   
   750    750   # Factoring default headers for most tests.
   751    751   ac_includes_default="\
   752    752   #include <stdio.h>
   753    753   #ifdef HAVE_SYS_TYPES_H
   754    754   # include <sys/types.h>
................................................................................
  1481   1481   #
  1482   1482   # Report the --help message.
  1483   1483   #
  1484   1484   if test "$ac_init_help" = "long"; then
  1485   1485     # Omit some internal or obsolete options to make the list less imposing.
  1486   1486     # This message is too long to be a string in the A/UX 3.1 sh.
  1487   1487     cat <<_ACEOF
  1488         -\`configure' configures sqlite 3.7.12 to adapt to many kinds of systems.
         1488  +\`configure' configures sqlite 3.7.13 to adapt to many kinds of systems.
  1489   1489   
  1490   1490   Usage: $0 [OPTION]... [VAR=VALUE]...
  1491   1491   
  1492   1492   To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1493   1493   VAR=VALUE.  See below for descriptions of some of the useful variables.
  1494   1494   
  1495   1495   Defaults for the options are specified in brackets.
................................................................................
  1546   1546     --build=BUILD     configure for building on BUILD [guessed]
  1547   1547     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  1548   1548   _ACEOF
  1549   1549   fi
  1550   1550   
  1551   1551   if test -n "$ac_init_help"; then
  1552   1552     case $ac_init_help in
  1553         -     short | recursive ) echo "Configuration of sqlite 3.7.12:";;
         1553  +     short | recursive ) echo "Configuration of sqlite 3.7.13:";;
  1554   1554      esac
  1555   1555     cat <<\_ACEOF
  1556   1556   
  1557   1557   Optional Features:
  1558   1558     --disable-option-checking  ignore unrecognized --enable/--with options
  1559   1559     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1560   1560     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  1662   1662       cd "$ac_pwd" || { ac_status=$?; break; }
  1663   1663     done
  1664   1664   fi
  1665   1665   
  1666   1666   test -n "$ac_init_help" && exit $ac_status
  1667   1667   if $ac_init_version; then
  1668   1668     cat <<\_ACEOF
  1669         -sqlite configure 3.7.12
         1669  +sqlite configure 3.7.13
  1670   1670   generated by GNU Autoconf 2.62
  1671   1671   
  1672   1672   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
  1673   1673   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  1674   1674   This configure script is free software; the Free Software Foundation
  1675   1675   gives unlimited permission to copy, distribute and modify it.
  1676   1676   _ACEOF
  1677   1677     exit
  1678   1678   fi
  1679   1679   cat >config.log <<_ACEOF
  1680   1680   This file contains any messages produced by compilers while
  1681   1681   running configure, to aid debugging if configure makes a mistake.
  1682   1682   
  1683         -It was created by sqlite $as_me 3.7.12, which was
         1683  +It was created by sqlite $as_me 3.7.13, which was
  1684   1684   generated by GNU Autoconf 2.62.  Invocation command line was
  1685   1685   
  1686   1686     $ $0 $@
  1687   1687   
  1688   1688   _ACEOF
  1689   1689   exec 5>>config.log
  1690   1690   {
................................................................................
 14028  14028   
 14029  14029   exec 6>&1
 14030  14030   
 14031  14031   # Save the log message, to keep $[0] and so on meaningful, and to
 14032  14032   # report actual input values of CONFIG_FILES etc. instead of their
 14033  14033   # values after options handling.
 14034  14034   ac_log="
 14035         -This file was extended by sqlite $as_me 3.7.12, which was
        14035  +This file was extended by sqlite $as_me 3.7.13, which was
 14036  14036   generated by GNU Autoconf 2.62.  Invocation command line was
 14037  14037   
 14038  14038     CONFIG_FILES    = $CONFIG_FILES
 14039  14039     CONFIG_HEADERS  = $CONFIG_HEADERS
 14040  14040     CONFIG_LINKS    = $CONFIG_LINKS
 14041  14041     CONFIG_COMMANDS = $CONFIG_COMMANDS
 14042  14042     $ $0 $@
................................................................................
 14081  14081   $config_commands
 14082  14082   
 14083  14083   Report bugs to <bug-autoconf@gnu.org>."
 14084  14084   
 14085  14085   _ACEOF
 14086  14086   cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 14087  14087   ac_cs_version="\\
 14088         -sqlite config.status 3.7.12
        14088  +sqlite config.status 3.7.13
 14089  14089   configured by $0, generated by GNU Autoconf 2.62,
 14090  14090     with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 14091  14091   
 14092  14092   Copyright (C) 2008 Free Software Foundation, Inc.
 14093  14093   This config.status script is free software; the Free Software Foundation
 14094  14094   gives unlimited permission to copy, distribute and modify it."
 14095  14095   

Changes to ext/fts3/README.tokenizers.

     7      7     statement:
     8      8   
     9      9       CREATE VIRTUAL TABLE <table-name> USING fts3(
    10     10         <columns ...> [, tokenize <tokenizer-name> [<tokenizer-args>]]
    11     11       );
    12     12   
    13     13     The built-in tokenizers (valid values to pass as <tokenizer name>) are
    14         -  "simple" and "porter".
           14  +  "simple", "porter" and "unicode".
    15     15   
    16     16     <tokenizer-args> should consist of zero or more white-space separated
    17     17     arguments to pass to the selected tokenizer implementation. The 
    18     18     interpretation of the arguments, if any, depends on the individual 
    19     19     tokenizer.
    20     20   
    21     21   2. Custom Tokenizers

Changes to ext/fts3/fts3.c.

  3550   3550   **
  3551   3551   ** Calling sqlite3Fts3SimpleTokenizerModule() sets the value pointed
  3552   3552   ** to by the argument to point to the "simple" tokenizer implementation.
  3553   3553   ** And so on.
  3554   3554   */
  3555   3555   void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
  3556   3556   void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);
         3557  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
         3558  +void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const**ppModule);
         3559  +#endif
  3557   3560   #ifdef SQLITE_ENABLE_ICU
  3558   3561   void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
  3559   3562   #endif
  3560   3563   
  3561   3564   /*
  3562   3565   ** Initialise the fts3 extension. If this extension is built as part
  3563   3566   ** of the sqlite library, then this function is called directly by
................................................................................
  3565   3568   ** function is called by the sqlite3_extension_init() entry point.
  3566   3569   */
  3567   3570   int sqlite3Fts3Init(sqlite3 *db){
  3568   3571     int rc = SQLITE_OK;
  3569   3572     Fts3Hash *pHash = 0;
  3570   3573     const sqlite3_tokenizer_module *pSimple = 0;
  3571   3574     const sqlite3_tokenizer_module *pPorter = 0;
         3575  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
         3576  +  const sqlite3_tokenizer_module *pUnicode = 0;
         3577  +#endif
  3572   3578   
  3573   3579   #ifdef SQLITE_ENABLE_ICU
  3574   3580     const sqlite3_tokenizer_module *pIcu = 0;
  3575   3581     sqlite3Fts3IcuTokenizerModule(&pIcu);
  3576   3582   #endif
         3583  +
         3584  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
         3585  +  sqlite3Fts3UnicodeTokenizer(&pUnicode);
         3586  +#endif
  3577   3587   
  3578   3588   #ifdef SQLITE_TEST
  3579   3589     rc = sqlite3Fts3InitTerm(db);
  3580   3590     if( rc!=SQLITE_OK ) return rc;
  3581   3591   #endif
  3582   3592   
  3583   3593     rc = sqlite3Fts3InitAux(db);
................................................................................
  3594   3604       sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
  3595   3605     }
  3596   3606   
  3597   3607     /* Load the built-in tokenizers into the hash table */
  3598   3608     if( rc==SQLITE_OK ){
  3599   3609       if( sqlite3Fts3HashInsert(pHash, "simple", 7, (void *)pSimple)
  3600   3610        || sqlite3Fts3HashInsert(pHash, "porter", 7, (void *)pPorter) 
         3611  +
         3612  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
         3613  +     || sqlite3Fts3HashInsert(pHash, "unicode61", 10, (void *)pUnicode) 
         3614  +#endif
  3601   3615   #ifdef SQLITE_ENABLE_ICU
  3602   3616        || (pIcu && sqlite3Fts3HashInsert(pHash, "icu", 4, (void *)pIcu))
  3603   3617   #endif
  3604   3618       ){
  3605   3619         rc = SQLITE_NOMEM;
  3606   3620       }
  3607   3621     }

Changes to ext/fts3/fts3Int.h.

   536    536   int sqlite3Fts3MsrIncrNext(
   537    537       Fts3Table *, Fts3MultiSegReader *, sqlite3_int64 *, char **, int *);
   538    538   int sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iCol, char **); 
   539    539   int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);
   540    540   int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
   541    541   
   542    542   int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);
          543  +
          544  +/* fts3_unicode2.c (functions generated by parsing unicode text files) */
          545  +int sqlite3FtsUnicodeTolower(int);
          546  +int sqlite3FtsUnicodeIsalnum(int);
   543    547   
   544    548   #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
   545    549   #endif /* _FTSINT_H */

Added ext/fts3/fts3_unicode.c.

            1  +/*
            2  +** 2012 May 24
            3  +**
            4  +** The author disclaims copyright to this source code.  In place of
            5  +** a legal notice, here is a blessing:
            6  +**
            7  +**    May you do good and not evil.
            8  +**    May you find forgiveness for yourself and forgive others.
            9  +**    May you share freely, never taking more than you give.
           10  +**
           11  +******************************************************************************
           12  +**
           13  +** Implementation of the "unicode" full-text-search tokenizer.
           14  +*/
           15  +
           16  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
           17  +
           18  +#include "fts3Int.h"
           19  +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
           20  +
           21  +#include <assert.h>
           22  +#include <stdlib.h>
           23  +#include <stdio.h>
           24  +#include <string.h>
           25  +
           26  +#include "fts3_tokenizer.h"
           27  +
           28  +/*
           29  +** The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied
           30  +** from the sqlite3 source file utf.c. If this file is compiled as part
           31  +** of the amalgamation, they are not required.
           32  +*/
           33  +#ifndef SQLITE_AMALGAMATION
           34  +
           35  +static const unsigned char sqlite3Utf8Trans1[] = {
           36  +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
           37  +  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
           38  +  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
           39  +  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
           40  +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
           41  +  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
           42  +  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
           43  +  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,
           44  +};
           45  +
           46  +#define READ_UTF8(zIn, zTerm, c)                           \
           47  +  c = *(zIn++);                                            \
           48  +  if( c>=0xc0 ){                                           \
           49  +    c = sqlite3Utf8Trans1[c-0xc0];                         \
           50  +    while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){            \
           51  +      c = (c<<6) + (0x3f & *(zIn++));                      \
           52  +    }                                                      \
           53  +    if( c<0x80                                             \
           54  +        || (c&0xFFFFF800)==0xD800                          \
           55  +        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \
           56  +  }
           57  +
           58  +#define WRITE_UTF8(zOut, c) {                          \
           59  +  if( c<0x00080 ){                                     \
           60  +    *zOut++ = (u8)(c&0xFF);                            \
           61  +  }                                                    \
           62  +  else if( c<0x00800 ){                                \
           63  +    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \
           64  +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
           65  +  }                                                    \
           66  +  else if( c<0x10000 ){                                \
           67  +    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \
           68  +    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
           69  +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
           70  +  }else{                                               \
           71  +    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \
           72  +    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \
           73  +    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
           74  +    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
           75  +  }                                                    \
           76  +}
           77  +
           78  +#endif /* ifndef SQLITE_AMALGAMATION */
           79  +
           80  +typedef struct unicode_tokenizer unicode_tokenizer;
           81  +typedef struct unicode_cursor unicode_cursor;
           82  +
           83  +struct unicode_tokenizer {
           84  +  sqlite3_tokenizer base;
           85  +};
           86  +
           87  +struct unicode_cursor {
           88  +  sqlite3_tokenizer_cursor base;
           89  +  const unsigned char *aInput;    /* Input text being tokenized */
           90  +  int nInput;                     /* Size of aInput[] in bytes */
           91  +  int iOff;                       /* Current offset within aInput[] */
           92  +  int iToken;                     /* Index of next token to be returned */
           93  +  char *zToken;                   /* storage for current token */
           94  +  int nAlloc;                     /* space allocated at zToken */
           95  +};
           96  +
           97  +/*
           98  +** Create a new tokenizer instance.
           99  +*/
          100  +static int unicodeCreate(
          101  +  int nArg,                       /* Size of array argv[] */
          102  +  const char * const *azArg,      /* Tokenizer creation arguments */
          103  +  sqlite3_tokenizer **pp          /* OUT: New tokenizer handle */
          104  +){
          105  +  unicode_tokenizer *pNew;        /* New tokenizer object */
          106  +  pNew = (unicode_tokenizer *) sqlite3_malloc(sizeof(unicode_tokenizer));
          107  +  if( pNew==NULL ){
          108  +    return SQLITE_NOMEM;
          109  +  }
          110  +  memset(pNew, 0, sizeof(unicode_tokenizer));
          111  +  *pp = &pNew->base;
          112  +  return SQLITE_OK;
          113  +}
          114  +
          115  +/*
          116  +** Destroy a tokenizer allocated by unicodeCreate().
          117  +*/
          118  +static int unicodeDestroy(sqlite3_tokenizer *pTokenizer){
          119  +  sqlite3_free(pTokenizer);
          120  +  return SQLITE_OK;
          121  +}
          122  +
          123  +/*
          124  +** Prepare to begin tokenizing a particular string.  The input
          125  +** string to be tokenized is pInput[0..nBytes-1].  A cursor
          126  +** used to incrementally tokenize this string is returned in 
          127  +** *ppCursor.
          128  +*/
          129  +static int unicodeOpen(
          130  +  sqlite3_tokenizer *p,           /* The tokenizer */
          131  +  const char *aInput,             /* Input string */
          132  +  int nInput,                     /* Size of string aInput in bytes */
          133  +  sqlite3_tokenizer_cursor **pp   /* OUT: New cursor object */
          134  +){
          135  +  unicode_cursor *pCsr;
          136  +
          137  +  pCsr = (unicode_cursor *)sqlite3_malloc(sizeof(unicode_cursor));
          138  +  if( pCsr==0 ){
          139  +    return SQLITE_NOMEM;
          140  +  }
          141  +  memset(pCsr, 0, sizeof(unicode_cursor));
          142  +
          143  +  pCsr->aInput = (const unsigned char *)aInput;
          144  +  if( aInput==0 ){
          145  +    pCsr->nInput = 0;
          146  +  }else if( nInput<0 ){
          147  +    pCsr->nInput = (int)strlen(aInput);
          148  +  }else{
          149  +    pCsr->nInput = nInput;
          150  +  }
          151  +
          152  +  *pp = &pCsr->base;
          153  +  UNUSED_PARAMETER(p);
          154  +  return SQLITE_OK;
          155  +}
          156  +
          157  +/*
          158  +** Close a tokenization cursor previously opened by a call to
          159  +** simpleOpen() above.
          160  +*/
          161  +static int unicodeClose(sqlite3_tokenizer_cursor *pCursor){
          162  +  unicode_cursor *pCsr = (unicode_cursor *) pCursor;
          163  +  sqlite3_free(pCsr->zToken);
          164  +  sqlite3_free(pCsr);
          165  +  return SQLITE_OK;
          166  +}
          167  +
          168  +/*
          169  +** Extract the next token from a tokenization cursor.  The cursor must
          170  +** have been opened by a prior call to simpleOpen().
          171  +*/
          172  +static int unicodeNext(
          173  +  sqlite3_tokenizer_cursor *p,    /* Cursor returned by simpleOpen */
          174  +  const char **paToken,           /* OUT: Token text */
          175  +  int *pnToken,                   /* OUT: Number of bytes at *paToken */
          176  +  int *piStart,                   /* OUT: Starting offset of token */
          177  +  int *piEnd,                     /* OUT: Ending offset of token */
          178  +  int *piPos                      /* OUT: Position integer of token */
          179  +){
          180  +  unicode_cursor *pCsr = (unicode_cursor *)p;
          181  +  int iCode;
          182  +  char *zOut;
          183  +  const unsigned char *z = &pCsr->aInput[pCsr->iOff];
          184  +  const unsigned char *zStart = z;
          185  +  const unsigned char *zEnd;
          186  +  const unsigned char *zTerm = &pCsr->aInput[pCsr->nInput];
          187  +
          188  +  /* Scan past any delimiter characters before the start of the next token.
          189  +  ** Return SQLITE_DONE early if this takes us all the way to the end of 
          190  +  ** the input.  */
          191  +  while( z<zTerm ){
          192  +    READ_UTF8(z, zTerm, iCode);
          193  +    if( sqlite3FtsUnicodeIsalnum(iCode) ) break;
          194  +    zStart = z;
          195  +  }
          196  +  if( zStart>=zTerm ) return SQLITE_DONE;
          197  +
          198  +  zOut = pCsr->zToken;
          199  +  do {
          200  +    /* Grow the output buffer if required. */
          201  +    if( (zOut-pCsr->zToken)>=(pCsr->nAlloc-4) ){
          202  +      char *zNew = sqlite3_realloc(pCsr->zToken, pCsr->nAlloc+64);
          203  +      if( !zNew ) return SQLITE_NOMEM;
          204  +      zOut = &zNew[zOut - pCsr->zToken];
          205  +      pCsr->zToken = zNew;
          206  +      pCsr->nAlloc += 64;
          207  +    }
          208  +
          209  +    /* Write the folded case of the last character read to the output */
          210  +    zEnd = z;
          211  +    WRITE_UTF8(zOut, sqlite3FtsUnicodeTolower(iCode));
          212  +
          213  +    /* If the cursor is not at EOF, read the next character */
          214  +    if( z>=zTerm ) break;
          215  +    READ_UTF8(z, zTerm, iCode);
          216  +  }while( sqlite3FtsUnicodeIsalnum(iCode) );
          217  +
          218  +  /* Set the output variables and return. */
          219  +  pCsr->iOff = (z - pCsr->aInput);
          220  +  *paToken = pCsr->zToken;
          221  +  *pnToken = zOut - pCsr->zToken;
          222  +  *piStart = (zStart - pCsr->aInput);
          223  +  *piEnd = (zEnd - pCsr->aInput);
          224  +  *piPos = pCsr->iToken++;
          225  +  return SQLITE_OK;
          226  +}
          227  +
          228  +/*
          229  +** Set *ppModule to a pointer to the sqlite3_tokenizer_module 
          230  +** structure for the unicode tokenizer.
          231  +*/
          232  +void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const **ppModule){
          233  +  static const sqlite3_tokenizer_module module = {
          234  +    0,
          235  +    unicodeCreate,
          236  +    unicodeDestroy,
          237  +    unicodeOpen,
          238  +    unicodeClose,
          239  +    unicodeNext,
          240  +    0,
          241  +  };
          242  +  *ppModule = &module;
          243  +}
          244  +
          245  +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
          246  +#endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */

Added ext/fts3/fts3_unicode2.c.

            1  +/*
            2  +** 2012 May 25
            3  +**
            4  +** The author disclaims copyright to this source code.  In place of
            5  +** a legal notice, here is a blessing:
            6  +**
            7  +**    May you do good and not evil.
            8  +**    May you find forgiveness for yourself and forgive others.
            9  +**    May you share freely, never taking more than you give.
           10  +**
           11  +******************************************************************************
           12  +*/
           13  +
           14  +/*
           15  +** DO NOT EDIT THIS MACHINE GENERATED FILE.
           16  +*/
           17  +
           18  +#if !defined(SQLITE_DISABLE_FTS3_UNICODE)
           19  +#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)
           20  +
           21  +#include <assert.h>
           22  +
           23  +/*
           24  +** Return true if the argument corresponds to a unicode codepoint
           25  +** classified as either a letter or a number. Otherwise false.
           26  +**
           27  +** The results are undefined if the value passed to this function
           28  +** is less than zero.
           29  +*/
           30  +int sqlite3FtsUnicodeIsalnum(int c){
           31  +  /* Each unsigned integer in the following array corresponds to a contiguous
           32  +  ** range of unicode codepoints that are not either letters or numbers (i.e.
           33  +  ** codepoints for which this function should return 0).
           34  +  **
           35  +  ** The most significant 22 bits in each 32-bit value contain the first 
           36  +  ** codepoint in the range. The least significant 10 bits are used to store
           37  +  ** the size of the range (always at least 1). In other words, the value 
           38  +  ** ((C<<22) + N) represents a range of N codepoints starting with codepoint 
           39  +  ** C. It is not possible to represent a range larger than 1023 codepoints 
           40  +  ** using this format.
           41  +  */
           42  +  const static unsigned int aEntry[] = {
           43  +    0x00000030, 0x0000E807, 0x00016C06, 0x0001EC2F, 0x0002AC07,
           44  +    0x0002D001, 0x0002D803, 0x0002EC01, 0x0002FC01, 0x00035C01,
           45  +    0x0003DC01, 0x000B0804, 0x000B480E, 0x000B9407, 0x000BB401,
           46  +    0x000BBC81, 0x000DD401, 0x000DF801, 0x000E1002, 0x000E1C01,
           47  +    0x000FD801, 0x00120808, 0x00156806, 0x00162402, 0x00163C01,
           48  +    0x00164437, 0x0017CC02, 0x00180005, 0x00181816, 0x00187802,
           49  +    0x00192C15, 0x0019A804, 0x0019C001, 0x001B5001, 0x001B580F,
           50  +    0x001B9C07, 0x001BF402, 0x001C000E, 0x001C3C01, 0x001C4401,
           51  +    0x001CC01B, 0x001E980B, 0x001FAC09, 0x001FD804, 0x00205804,
           52  +    0x00206C09, 0x00209403, 0x0020A405, 0x0020C00F, 0x00216403,
           53  +    0x00217801, 0x0023901B, 0x00240004, 0x0024E803, 0x0024F812,
           54  +    0x00254407, 0x00258804, 0x0025C001, 0x00260403, 0x0026F001,
           55  +    0x0026F807, 0x00271C02, 0x00272C03, 0x00275C01, 0x00278802,
           56  +    0x0027C802, 0x0027E802, 0x00280403, 0x0028F001, 0x0028F805,
           57  +    0x00291C02, 0x00292C03, 0x00294401, 0x0029C002, 0x0029D401,
           58  +    0x002A0403, 0x002AF001, 0x002AF808, 0x002B1C03, 0x002B2C03,
           59  +    0x002B8802, 0x002BC002, 0x002C0403, 0x002CF001, 0x002CF807,
           60  +    0x002D1C02, 0x002D2C03, 0x002D5802, 0x002D8802, 0x002DC001,
           61  +    0x002E0801, 0x002EF805, 0x002F1803, 0x002F2804, 0x002F5C01,
           62  +    0x002FCC08, 0x00300403, 0x0030F807, 0x00311803, 0x00312804,
           63  +    0x00315402, 0x00318802, 0x0031FC01, 0x00320802, 0x0032F001,
           64  +    0x0032F807, 0x00331803, 0x00332804, 0x00335402, 0x00338802,
           65  +    0x00340802, 0x0034F807, 0x00351803, 0x00352804, 0x00355C01,
           66  +    0x00358802, 0x0035E401, 0x00360802, 0x00372801, 0x00373C06,
           67  +    0x00375801, 0x00376008, 0x0037C803, 0x0038C401, 0x0038D007,
           68  +    0x0038FC01, 0x00391C09, 0x00396802, 0x003AC401, 0x003AD006,
           69  +    0x003AEC02, 0x003B2006, 0x003C041F, 0x003CD00C, 0x003DC417,
           70  +    0x003E340B, 0x003E6424, 0x003EF80F, 0x003F380D, 0x0040AC14,
           71  +    0x00412806, 0x00415804, 0x00417803, 0x00418803, 0x00419C07,
           72  +    0x0041C404, 0x0042080C, 0x00423C01, 0x00426806, 0x0043EC01,
           73  +    0x004D740C, 0x004E400A, 0x00500001, 0x0059B402, 0x005A0001,
           74  +    0x005A6C02, 0x005BAC03, 0x005C4803, 0x005CC805, 0x005D4802,
           75  +    0x005DC802, 0x005ED023, 0x005F6004, 0x005F7401, 0x0060000F,
           76  +    0x0062A401, 0x0064800C, 0x0064C00C, 0x00650001, 0x00651002,
           77  +    0x0066C011, 0x00672002, 0x00677822, 0x00685C05, 0x00687802,
           78  +    0x0069540A, 0x0069801D, 0x0069FC01, 0x006A8007, 0x006AA006,
           79  +    0x006C0005, 0x006CD011, 0x006D6823, 0x006E0003, 0x006E840D,
           80  +    0x006F980E, 0x006FF004, 0x00709014, 0x0070EC05, 0x0071F802,
           81  +    0x00730008, 0x00734019, 0x0073B401, 0x0073C803, 0x00770027,
           82  +    0x0077F004, 0x007EF401, 0x007EFC03, 0x007F3403, 0x007F7403,
           83  +    0x007FB403, 0x007FF402, 0x00800065, 0x0081A806, 0x0081E805,
           84  +    0x00822805, 0x0082801A, 0x00834021, 0x00840002, 0x00840C04,
           85  +    0x00842002, 0x00845001, 0x00845803, 0x00847806, 0x00849401,
           86  +    0x00849C01, 0x0084A401, 0x0084B801, 0x0084E802, 0x00850005,
           87  +    0x00852804, 0x00853C01, 0x00864264, 0x00900027, 0x0091000B,
           88  +    0x0092704E, 0x00940200, 0x009C0475, 0x009E53B9, 0x00AD400A,
           89  +    0x00B39406, 0x00B3BC03, 0x00B3E404, 0x00B3F802, 0x00B5C001,
           90  +    0x00B5FC01, 0x00B7804F, 0x00B8C00C, 0x00BA001A, 0x00BA6C59,
           91  +    0x00BC00D6, 0x00BFC00C, 0x00C00005, 0x00C02019, 0x00C0A807,
           92  +    0x00C0D802, 0x00C0F403, 0x00C26404, 0x00C28001, 0x00C3EC01,
           93  +    0x00C64002, 0x00C6580A, 0x00C70024, 0x00C8001F, 0x00C8A81E,
           94  +    0x00C94001, 0x00C98020, 0x00CA2827, 0x00CB003F, 0x00CC0100,
           95  +    0x01370040, 0x02924037, 0x0293F802, 0x02983403, 0x0299BC10,
           96  +    0x029A7C01, 0x029BC008, 0x029C0017, 0x029C8002, 0x029E2402,
           97  +    0x02A00801, 0x02A01801, 0x02A02C01, 0x02A08C09, 0x02A0D804,
           98  +    0x02A1D004, 0x02A20002, 0x02A2D011, 0x02A33802, 0x02A38012,
           99  +    0x02A3E003, 0x02A4980A, 0x02A51C0D, 0x02A57C01, 0x02A60004,
          100  +    0x02A6CC1B, 0x02A77802, 0x02A8A40E, 0x02A90C01, 0x02A93002,
          101  +    0x02A97004, 0x02A9DC03, 0x02A9EC01, 0x02AAC001, 0x02AAC803,
          102  +    0x02AADC02, 0x02AAF802, 0x02AB0401, 0x02AB7802, 0x02ABAC07,
          103  +    0x02ABD402, 0x02AF8C0B, 0x03600001, 0x036DFC02, 0x036FFC02,
          104  +    0x037FFC02, 0x03E3FC01, 0x03EC7801, 0x03ECA401, 0x03EEC810,
          105  +    0x03F4F802, 0x03F7F002, 0x03F8001A, 0x03F88007, 0x03F8C023,
          106  +    0x03F95013, 0x03F9A004, 0x03FBFC01, 0x03FC040F, 0x03FC6807,
          107  +    0x03FCEC06, 0x03FD6C0B, 0x03FF8007, 0x03FFA007, 0x03FFE405,
          108  +    0x04040003, 0x0404DC09, 0x0405E411, 0x0406400C, 0x0407402E,
          109  +    0x040E7C01, 0x040F4001, 0x04215C01, 0x04247C01, 0x0424FC01,
          110  +    0x04280403, 0x04281402, 0x04283004, 0x0428E003, 0x0428FC01,
          111  +    0x04294009, 0x0429FC01, 0x042CE407, 0x04400003, 0x0440E016,
          112  +    0x04420003, 0x0442C012, 0x04440003, 0x04449C0E, 0x04450004,
          113  +    0x04460003, 0x0446CC0E, 0x04471404, 0x045AAC0D, 0x0491C004,
          114  +    0x05BD442E, 0x05BE3C04, 0x074000F6, 0x07440027, 0x0744A4B5,
          115  +    0x07480046, 0x074C0057, 0x075B0401, 0x075B6C01, 0x075BEC01,
          116  +    0x075C5401, 0x075CD401, 0x075D3C01, 0x075DBC01, 0x075E2401,
          117  +    0x075EA401, 0x075F0C01, 0x07BBC002, 0x07C0002C, 0x07C0C064,
          118  +    0x07C2800F, 0x07C2C40E, 0x07C3040F, 0x07C3440F, 0x07C4401F,
          119  +    0x07C4C03C, 0x07C5C02B, 0x07C7981D, 0x07C8402B, 0x07C90009,
          120  +    0x07C94002, 0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014,
          121  +    0x07CE8025, 0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001,
          122  +    0x07D108B6, 0x07D3E404, 0x07D4003E, 0x07D50004, 0x07D54018,
          123  +    0x07D7EC46, 0x07D9140B, 0x07DA0046, 0x07DC0074, 0x38000401,
          124  +    0x38008060, 0x380400F0, 0x3C000001, 0x3FFFF401, 0x40000001,
          125  +    0x43FFF401,
          126  +  };
          127  +  static const unsigned int aAscii[4] = {
          128  +    0xFFFFFFFF, 0xFC00FFFF, 0xF8000001, 0xF8000001,
          129  +  };
          130  +
          131  +  if( c<128 ){
          132  +    return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 );
          133  +  }else if( c<(1<<22) ){
          134  +    unsigned int key = (((unsigned int)c)<<10) | 0x000003FF;
          135  +    int iRes;
          136  +    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
          137  +    int iLo = 0;
          138  +    while( iHi>=iLo ){
          139  +      int iTest = (iHi + iLo) / 2;
          140  +      if( key >= aEntry[iTest] ){
          141  +        iRes = iTest;
          142  +        iLo = iTest+1;
          143  +      }else{
          144  +        iHi = iTest-1;
          145  +      }
          146  +    }
          147  +    assert( aEntry[0]<key );
          148  +    assert( key>=aEntry[iRes] );
          149  +    return (c >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));
          150  +  }
          151  +  return 1;
          152  +}
          153  +
          154  +
          155  +/*
          156  +** Interpret the argument as a unicode codepoint. If the codepoint
          157  +** is an upper case character that has a lower case equivalent,
          158  +** return the codepoint corresponding to the lower case version.
          159  +** Otherwise, return a copy of the argument.
          160  +**
          161  +** The results are undefined if the value passed to this function
          162  +** is less than zero.
          163  +*/
          164  +int sqlite3FtsUnicodeTolower(int c){
          165  +  /* Each entry in the following array defines a rule for folding a range
          166  +  ** of codepoints to lower case. The rule applies to a range of nRange
          167  +  ** codepoints starting at codepoint iCode.
          168  +  **
          169  +  ** If the least significant bit in flags is clear, then the rule applies
          170  +  ** to all nRange codepoints (i.e. all nRange codepoints are upper case and
          171  +  ** need to be folded). Or, if it is set, then the rule only applies to
          172  +  ** every second codepoint in the range, starting with codepoint C.
          173  +  **
          174  +  ** The 7 most significant bits in flags are an index into the aiOff[]
          175  +  ** array. If a specific codepoint C does require folding, then its lower
          176  +  ** case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF).
          177  +  **
          178  +  ** The contents of this array are generated by parsing the CaseFolding.txt
          179  +  ** file distributed as part of the "Unicode Character Database". See
          180  +  ** http://www.unicode.org for details.
          181  +  */
          182  +  static const struct TableEntry {
          183  +    unsigned short iCode;
          184  +    unsigned char flags;
          185  +    unsigned char nRange;
          186  +  } aEntry[] = {
          187  +    {65, 14, 26},          {181, 64, 1},          {192, 14, 23},
          188  +    {216, 14, 7},          {256, 1, 48},          {306, 1, 6},
          189  +    {313, 1, 16},          {330, 1, 46},          {376, 116, 1},
          190  +    {377, 1, 6},           {383, 104, 1},         {385, 50, 1},
          191  +    {386, 1, 4},           {390, 44, 1},          {391, 0, 1},
          192  +    {393, 42, 2},          {395, 0, 1},           {398, 32, 1},
          193  +    {399, 38, 1},          {400, 40, 1},          {401, 0, 1},
          194  +    {403, 42, 1},          {404, 46, 1},          {406, 52, 1},
          195  +    {407, 48, 1},          {408, 0, 1},           {412, 52, 1},
          196  +    {413, 54, 1},          {415, 56, 1},          {416, 1, 6},
          197  +    {422, 60, 1},          {423, 0, 1},           {425, 60, 1},
          198  +    {428, 0, 1},           {430, 60, 1},          {431, 0, 1},
          199  +    {433, 58, 2},          {435, 1, 4},           {439, 62, 1},
          200  +    {440, 0, 1},           {444, 0, 1},           {452, 2, 1},
          201  +    {453, 0, 1},           {455, 2, 1},           {456, 0, 1},
          202  +    {458, 2, 1},           {459, 1, 18},          {478, 1, 18},
          203  +    {497, 2, 1},           {498, 1, 4},           {502, 122, 1},
          204  +    {503, 134, 1},         {504, 1, 40},          {544, 110, 1},
          205  +    {546, 1, 18},          {570, 70, 1},          {571, 0, 1},
          206  +    {573, 108, 1},         {574, 68, 1},          {577, 0, 1},
          207  +    {579, 106, 1},         {580, 28, 1},          {581, 30, 1},
          208  +    {582, 1, 10},          {837, 36, 1},          {880, 1, 4},
          209  +    {886, 0, 1},           {902, 18, 1},          {904, 16, 3},
          210  +    {908, 26, 1},          {910, 24, 2},          {913, 14, 17},
          211  +    {931, 14, 9},          {962, 0, 1},           {975, 4, 1},
          212  +    {976, 140, 1},         {977, 142, 1},         {981, 146, 1},
          213  +    {982, 144, 1},         {984, 1, 24},          {1008, 136, 1},
          214  +    {1009, 138, 1},        {1012, 130, 1},        {1013, 128, 1},
          215  +    {1015, 0, 1},          {1017, 152, 1},        {1018, 0, 1},
          216  +    {1021, 110, 3},        {1024, 34, 16},        {1040, 14, 32},
          217  +    {1120, 1, 34},         {1162, 1, 54},         {1216, 6, 1},
          218  +    {1217, 1, 14},         {1232, 1, 88},         {1329, 22, 38},
          219  +    {4256, 66, 38},        {4295, 66, 1},         {4301, 66, 1},
          220  +    {7680, 1, 150},        {7835, 132, 1},        {7838, 96, 1},
          221  +    {7840, 1, 96},         {7944, 150, 8},        {7960, 150, 6},
          222  +    {7976, 150, 8},        {7992, 150, 8},        {8008, 150, 6},
          223  +    {8025, 151, 8},        {8040, 150, 8},        {8072, 150, 8},
          224  +    {8088, 150, 8},        {8104, 150, 8},        {8120, 150, 2},
          225  +    {8122, 126, 2},        {8124, 148, 1},        {8126, 100, 1},
          226  +    {8136, 124, 4},        {8140, 148, 1},        {8152, 150, 2},
          227  +    {8154, 120, 2},        {8168, 150, 2},        {8170, 118, 2},
          228  +    {8172, 152, 1},        {8184, 112, 2},        {8186, 114, 2},
          229  +    {8188, 148, 1},        {8486, 98, 1},         {8490, 92, 1},
          230  +    {8491, 94, 1},         {8498, 12, 1},         {8544, 8, 16},
          231  +    {8579, 0, 1},          {9398, 10, 26},        {11264, 22, 47},
          232  +    {11360, 0, 1},         {11362, 88, 1},        {11363, 102, 1},
          233  +    {11364, 90, 1},        {11367, 1, 6},         {11373, 84, 1},
          234  +    {11374, 86, 1},        {11375, 80, 1},        {11376, 82, 1},
          235  +    {11378, 0, 1},         {11381, 0, 1},         {11390, 78, 2},
          236  +    {11392, 1, 100},       {11499, 1, 4},         {11506, 0, 1},
          237  +    {42560, 1, 46},        {42624, 1, 24},        {42786, 1, 14},
          238  +    {42802, 1, 62},        {42873, 1, 4},         {42877, 76, 1},
          239  +    {42878, 1, 10},        {42891, 0, 1},         {42893, 74, 1},
          240  +    {42896, 1, 4},         {42912, 1, 10},        {42922, 72, 1},
          241  +    {65313, 14, 26},       
          242  +  };
          243  +  static const unsigned short aiOff[] = {
          244  +   1,     2,     8,     15,    16,    26,    28,    32,    
          245  +   37,    38,    40,    48,    63,    64,    69,    71,    
          246  +   79,    80,    116,   202,   203,   205,   206,   207,   
          247  +   209,   210,   211,   213,   214,   217,   218,   219,   
          248  +   775,   7264,  10792, 10795, 23228, 23256, 30204, 54721, 
          249  +   54753, 54754, 54756, 54787, 54793, 54809, 57153, 57274, 
          250  +   57921, 58019, 58363, 61722, 65268, 65341, 65373, 65406, 
          251  +   65408, 65410, 65415, 65424, 65436, 65439, 65450, 65462, 
          252  +   65472, 65476, 65478, 65480, 65482, 65488, 65506, 65511, 
          253  +   65514, 65521, 65527, 65528, 65529, 
          254  +  };
          255  +
          256  +  int ret = c;
          257  +
          258  +  assert( c>=0 );
          259  +  assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );
          260  +
          261  +  if( c<128 ){
          262  +    if( c>='A' && c<='Z' ) ret = c + ('a' - 'A');
          263  +  }else if( c<65536 ){
          264  +    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
          265  +    int iLo = 0;
          266  +    int iRes = -1;
          267  +
          268  +    while( iHi>=iLo ){
          269  +      int iTest = (iHi + iLo) / 2;
          270  +      int cmp = (c - aEntry[iTest].iCode);
          271  +      if( cmp>=0 ){
          272  +        iRes = iTest;
          273  +        iLo = iTest+1;
          274  +      }else{
          275  +        iHi = iTest-1;
          276  +      }
          277  +    }
          278  +    assert( iRes<0 || c>=aEntry[iRes].iCode );
          279  +
          280  +    if( iRes>=0 ){
          281  +      const struct TableEntry *p = &aEntry[iRes];
          282  +      if( c<(p->iCode + p->nRange) && 0==(0x01 & p->flags & (p->iCode ^ c)) ){
          283  +        ret = (c + (aiOff[p->flags>>1])) & 0x0000FFFF;
          284  +        assert( ret>0 );
          285  +      }
          286  +    }
          287  +  }
          288  +  
          289  +  else if( c>=66560 && c<66600 ){
          290  +    ret = c + 40;
          291  +  }
          292  +
          293  +  return ret;
          294  +}
          295  +#endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */
          296  +#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */

Changes to ext/fts3/fts3_write.c.

  3170   3170     if( sqlite3_step(pStmt)==SQLITE_ROW ){
  3171   3171       fts3DecodeIntArray(nStat, a,
  3172   3172            sqlite3_column_blob(pStmt, 0),
  3173   3173            sqlite3_column_bytes(pStmt, 0));
  3174   3174     }else{
  3175   3175       memset(a, 0, sizeof(u32)*(nStat) );
  3176   3176     }
  3177         -  sqlite3_reset(pStmt);
         3177  +  rc = sqlite3_reset(pStmt);
         3178  +  if( rc!=SQLITE_OK ){
         3179  +    sqlite3_free(a);
         3180  +    *pRC = rc;
         3181  +    return;
         3182  +  }
  3178   3183     if( nChng<0 && a[0]<(u32)(-nChng) ){
  3179   3184       a[0] = 0;
  3180   3185     }else{
  3181   3186       a[0] += nChng;
  3182   3187     }
  3183   3188     for(i=0; i<p->nColumn+1; i++){
  3184   3189       u32 x = a[i+1];

Added ext/fts3/unicode/CaseFolding.txt.

            1  +# CaseFolding-6.1.0.txt
            2  +# Date: 2011-07-25, 21:21:56 GMT [MD]
            3  +#
            4  +# Unicode Character Database
            5  +# Copyright (c) 1991-2011 Unicode, Inc.
            6  +# For terms of use, see http://www.unicode.org/terms_of_use.html
            7  +# For documentation, see http://www.unicode.org/reports/tr44/
            8  +#
            9  +# Case Folding Properties
           10  +#
           11  +# This file is a supplement to the UnicodeData file.
           12  +# It provides a case folding mapping generated from the Unicode Character Database.
           13  +# If all characters are mapped according to the full mapping below, then
           14  +# case differences (according to UnicodeData.txt and SpecialCasing.txt)
           15  +# are eliminated.
           16  +#
           17  +# The data supports both implementations that require simple case foldings
           18  +# (where string lengths don't change), and implementations that allow full case folding
           19  +# (where string lengths may grow). Note that where they can be supported, the
           20  +# full case foldings are superior: for example, they allow "MASSE" and "Maße" to match.
           21  +#
           22  +# All code points not listed in this file map to themselves.
           23  +#
           24  +# NOTE: case folding does not preserve normalization formats!
           25  +#
           26  +# For information on case folding, including how to have case folding 
           27  +# preserve normalization formats, see Section 3.13 Default Case Algorithms in
           28  +# The Unicode Standard, Version 5.0.
           29  +#
           30  +# ================================================================================
           31  +# Format
           32  +# ================================================================================
           33  +# The entries in this file are in the following machine-readable format:
           34  +#
           35  +# <code>; <status>; <mapping>; # <name>
           36  +#
           37  +# The status field is:
           38  +# C: common case folding, common mappings shared by both simple and full mappings.
           39  +# F: full case folding, mappings that cause strings to grow in length. Multiple characters are separated by spaces.
           40  +# S: simple case folding, mappings to single characters where different from F.
           41  +# T: special case for uppercase I and dotted uppercase I
           42  +#    - For non-Turkic languages, this mapping is normally not used.
           43  +#    - For Turkic languages (tr, az), this mapping can be used instead of the normal mapping for these characters.
           44  +#      Note that the Turkic mappings do not maintain canonical equivalence without additional processing.
           45  +#      See the discussions of case mapping in the Unicode Standard for more information.
           46  +#
           47  +# Usage:
           48  +#  A. To do a simple case folding, use the mappings with status C + S.
           49  +#  B. To do a full case folding, use the mappings with status C + F.
           50  +#
           51  +#    The mappings with status T can be used or omitted depending on the desired case-folding
           52  +#    behavior. (The default option is to exclude them.)
           53  +#
           54  +# =================================================================
           55  +
           56  +# Property: Case_Folding
           57  +
           58  +#  All code points not explicitly listed for Case_Folding
           59  +#  have the value C for the status field, and the code point itself for the mapping field.
           60  +
           61  +# @missing: 0000..10FFFF; C; <code point>
           62  +
           63  +# =================================================================
           64  +0041; C; 0061; # LATIN CAPITAL LETTER A
           65  +0042; C; 0062; # LATIN CAPITAL LETTER B
           66  +0043; C; 0063; # LATIN CAPITAL LETTER C
           67  +0044; C; 0064; # LATIN CAPITAL LETTER D
           68  +0045; C; 0065; # LATIN CAPITAL LETTER E
           69  +0046; C; 0066; # LATIN CAPITAL LETTER F
           70  +0047; C; 0067; # LATIN CAPITAL LETTER G
           71  +0048; C; 0068; # LATIN CAPITAL LETTER H
           72  +0049; C; 0069; # LATIN CAPITAL LETTER I
           73  +0049; T; 0131; # LATIN CAPITAL LETTER I
           74  +004A; C; 006A; # LATIN CAPITAL LETTER J
           75  +004B; C; 006B; # LATIN CAPITAL LETTER K
           76  +004C; C; 006C; # LATIN CAPITAL LETTER L
           77  +004D; C; 006D; # LATIN CAPITAL LETTER M
           78  +004E; C; 006E; # LATIN CAPITAL LETTER N
           79  +004F; C; 006F; # LATIN CAPITAL LETTER O
           80  +0050; C; 0070; # LATIN CAPITAL LETTER P
           81  +0051; C; 0071; # LATIN CAPITAL LETTER Q
           82  +0052; C; 0072; # LATIN CAPITAL LETTER R
           83  +0053; C; 0073; # LATIN CAPITAL LETTER S
           84  +0054; C; 0074; # LATIN CAPITAL LETTER T
           85  +0055; C; 0075; # LATIN CAPITAL LETTER U
           86  +0056; C; 0076; # LATIN CAPITAL LETTER V
           87  +0057; C; 0077; # LATIN CAPITAL LETTER W
           88  +0058; C; 0078; # LATIN CAPITAL LETTER X
           89  +0059; C; 0079; # LATIN CAPITAL LETTER Y
           90  +005A; C; 007A; # LATIN CAPITAL LETTER Z
           91  +00B5; C; 03BC; # MICRO SIGN
           92  +00C0; C; 00E0; # LATIN CAPITAL LETTER A WITH GRAVE
           93  +00C1; C; 00E1; # LATIN CAPITAL LETTER A WITH ACUTE
           94  +00C2; C; 00E2; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
           95  +00C3; C; 00E3; # LATIN CAPITAL LETTER A WITH TILDE
           96  +00C4; C; 00E4; # LATIN CAPITAL LETTER A WITH DIAERESIS
           97  +00C5; C; 00E5; # LATIN CAPITAL LETTER A WITH RING ABOVE
           98  +00C6; C; 00E6; # LATIN CAPITAL LETTER AE
           99  +00C7; C; 00E7; # LATIN CAPITAL LETTER C WITH CEDILLA
          100  +00C8; C; 00E8; # LATIN CAPITAL LETTER E WITH GRAVE
          101  +00C9; C; 00E9; # LATIN CAPITAL LETTER E WITH ACUTE
          102  +00CA; C; 00EA; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
          103  +00CB; C; 00EB; # LATIN CAPITAL LETTER E WITH DIAERESIS
          104  +00CC; C; 00EC; # LATIN CAPITAL LETTER I WITH GRAVE
          105  +00CD; C; 00ED; # LATIN CAPITAL LETTER I WITH ACUTE
          106  +00CE; C; 00EE; # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
          107  +00CF; C; 00EF; # LATIN CAPITAL LETTER I WITH DIAERESIS
          108  +00D0; C; 00F0; # LATIN CAPITAL LETTER ETH
          109  +00D1; C; 00F1; # LATIN CAPITAL LETTER N WITH TILDE
          110  +00D2; C; 00F2; # LATIN CAPITAL LETTER O WITH GRAVE
          111  +00D3; C; 00F3; # LATIN CAPITAL LETTER O WITH ACUTE
          112  +00D4; C; 00F4; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
          113  +00D5; C; 00F5; # LATIN CAPITAL LETTER O WITH TILDE
          114  +00D6; C; 00F6; # LATIN CAPITAL LETTER O WITH DIAERESIS
          115  +00D8; C; 00F8; # LATIN CAPITAL LETTER O WITH STROKE
          116  +00D9; C; 00F9; # LATIN CAPITAL LETTER U WITH GRAVE
          117  +00DA; C; 00FA; # LATIN CAPITAL LETTER U WITH ACUTE
          118  +00DB; C; 00FB; # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
          119  +00DC; C; 00FC; # LATIN CAPITAL LETTER U WITH DIAERESIS
          120  +00DD; C; 00FD; # LATIN CAPITAL LETTER Y WITH ACUTE
          121  +00DE; C; 00FE; # LATIN CAPITAL LETTER THORN
          122  +00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S
          123  +0100; C; 0101; # LATIN CAPITAL LETTER A WITH MACRON
          124  +0102; C; 0103; # LATIN CAPITAL LETTER A WITH BREVE
          125  +0104; C; 0105; # LATIN CAPITAL LETTER A WITH OGONEK
          126  +0106; C; 0107; # LATIN CAPITAL LETTER C WITH ACUTE
          127  +0108; C; 0109; # LATIN CAPITAL LETTER C WITH CIRCUMFLEX
          128  +010A; C; 010B; # LATIN CAPITAL LETTER C WITH DOT ABOVE
          129  +010C; C; 010D; # LATIN CAPITAL LETTER C WITH CARON
          130  +010E; C; 010F; # LATIN CAPITAL LETTER D WITH CARON
          131  +0110; C; 0111; # LATIN CAPITAL LETTER D WITH STROKE
          132  +0112; C; 0113; # LATIN CAPITAL LETTER E WITH MACRON
          133  +0114; C; 0115; # LATIN CAPITAL LETTER E WITH BREVE
          134  +0116; C; 0117; # LATIN CAPITAL LETTER E WITH DOT ABOVE
          135  +0118; C; 0119; # LATIN CAPITAL LETTER E WITH OGONEK
          136  +011A; C; 011B; # LATIN CAPITAL LETTER E WITH CARON
          137  +011C; C; 011D; # LATIN CAPITAL LETTER G WITH CIRCUMFLEX
          138  +011E; C; 011F; # LATIN CAPITAL LETTER G WITH BREVE
          139  +0120; C; 0121; # LATIN CAPITAL LETTER G WITH DOT ABOVE
          140  +0122; C; 0123; # LATIN CAPITAL LETTER G WITH CEDILLA
          141  +0124; C; 0125; # LATIN CAPITAL LETTER H WITH CIRCUMFLEX
          142  +0126; C; 0127; # LATIN CAPITAL LETTER H WITH STROKE
          143  +0128; C; 0129; # LATIN CAPITAL LETTER I WITH TILDE
          144  +012A; C; 012B; # LATIN CAPITAL LETTER I WITH MACRON
          145  +012C; C; 012D; # LATIN CAPITAL LETTER I WITH BREVE
          146  +012E; C; 012F; # LATIN CAPITAL LETTER I WITH OGONEK
          147  +0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE
          148  +0130; T; 0069; # LATIN CAPITAL LETTER I WITH DOT ABOVE
          149  +0132; C; 0133; # LATIN CAPITAL LIGATURE IJ
          150  +0134; C; 0135; # LATIN CAPITAL LETTER J WITH CIRCUMFLEX
          151  +0136; C; 0137; # LATIN CAPITAL LETTER K WITH CEDILLA
          152  +0139; C; 013A; # LATIN CAPITAL LETTER L WITH ACUTE
          153  +013B; C; 013C; # LATIN CAPITAL LETTER L WITH CEDILLA
          154  +013D; C; 013E; # LATIN CAPITAL LETTER L WITH CARON
          155  +013F; C; 0140; # LATIN CAPITAL LETTER L WITH MIDDLE DOT
          156  +0141; C; 0142; # LATIN CAPITAL LETTER L WITH STROKE
          157  +0143; C; 0144; # LATIN CAPITAL LETTER N WITH ACUTE
          158  +0145; C; 0146; # LATIN CAPITAL LETTER N WITH CEDILLA
          159  +0147; C; 0148; # LATIN CAPITAL LETTER N WITH CARON
          160  +0149; F; 02BC 006E; # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
          161  +014A; C; 014B; # LATIN CAPITAL LETTER ENG
          162  +014C; C; 014D; # LATIN CAPITAL LETTER O WITH MACRON
          163  +014E; C; 014F; # LATIN CAPITAL LETTER O WITH BREVE
          164  +0150; C; 0151; # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
          165  +0152; C; 0153; # LATIN CAPITAL LIGATURE OE
          166  +0154; C; 0155; # LATIN CAPITAL LETTER R WITH ACUTE
          167  +0156; C; 0157; # LATIN CAPITAL LETTER R WITH CEDILLA
          168  +0158; C; 0159; # LATIN CAPITAL LETTER R WITH CARON
          169  +015A; C; 015B; # LATIN CAPITAL LETTER S WITH ACUTE
          170  +015C; C; 015D; # LATIN CAPITAL LETTER S WITH CIRCUMFLEX
          171  +015E; C; 015F; # LATIN CAPITAL LETTER S WITH CEDILLA
          172  +0160; C; 0161; # LATIN CAPITAL LETTER S WITH CARON
          173  +0162; C; 0163; # LATIN CAPITAL LETTER T WITH CEDILLA
          174  +0164; C; 0165; # LATIN CAPITAL LETTER T WITH CARON
          175  +0166; C; 0167; # LATIN CAPITAL LETTER T WITH STROKE
          176  +0168; C; 0169; # LATIN CAPITAL LETTER U WITH TILDE
          177  +016A; C; 016B; # LATIN CAPITAL LETTER U WITH MACRON
          178  +016C; C; 016D; # LATIN CAPITAL LETTER U WITH BREVE
          179  +016E; C; 016F; # LATIN CAPITAL LETTER U WITH RING ABOVE
          180  +0170; C; 0171; # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
          181  +0172; C; 0173; # LATIN CAPITAL LETTER U WITH OGONEK
          182  +0174; C; 0175; # LATIN CAPITAL LETTER W WITH CIRCUMFLEX
          183  +0176; C; 0177; # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
          184  +0178; C; 00FF; # LATIN CAPITAL LETTER Y WITH DIAERESIS
          185  +0179; C; 017A; # LATIN CAPITAL LETTER Z WITH ACUTE
          186  +017B; C; 017C; # LATIN CAPITAL LETTER Z WITH DOT ABOVE
          187  +017D; C; 017E; # LATIN CAPITAL LETTER Z WITH CARON
          188  +017F; C; 0073; # LATIN SMALL LETTER LONG S
          189  +0181; C; 0253; # LATIN CAPITAL LETTER B WITH HOOK
          190  +0182; C; 0183; # LATIN CAPITAL LETTER B WITH TOPBAR
          191  +0184; C; 0185; # LATIN CAPITAL LETTER TONE SIX
          192  +0186; C; 0254; # LATIN CAPITAL LETTER OPEN O
          193  +0187; C; 0188; # LATIN CAPITAL LETTER C WITH HOOK
          194  +0189; C; 0256; # LATIN CAPITAL LETTER AFRICAN D
          195  +018A; C; 0257; # LATIN CAPITAL LETTER D WITH HOOK
          196  +018B; C; 018C; # LATIN CAPITAL LETTER D WITH TOPBAR
          197  +018E; C; 01DD; # LATIN CAPITAL LETTER REVERSED E
          198  +018F; C; 0259; # LATIN CAPITAL LETTER SCHWA
          199  +0190; C; 025B; # LATIN CAPITAL LETTER OPEN E
          200  +0191; C; 0192; # LATIN CAPITAL LETTER F WITH HOOK
          201  +0193; C; 0260; # LATIN CAPITAL LETTER G WITH HOOK
          202  +0194; C; 0263; # LATIN CAPITAL LETTER GAMMA
          203  +0196; C; 0269; # LATIN CAPITAL LETTER IOTA
          204  +0197; C; 0268; # LATIN CAPITAL LETTER I WITH STROKE
          205  +0198; C; 0199; # LATIN CAPITAL LETTER K WITH HOOK
          206  +019C; C; 026F; # LATIN CAPITAL LETTER TURNED M
          207  +019D; C; 0272; # LATIN CAPITAL LETTER N WITH LEFT HOOK
          208  +019F; C; 0275; # LATIN CAPITAL LETTER O WITH MIDDLE TILDE
          209  +01A0; C; 01A1; # LATIN CAPITAL LETTER O WITH HORN
          210  +01A2; C; 01A3; # LATIN CAPITAL LETTER OI
          211  +01A4; C; 01A5; # LATIN CAPITAL LETTER P WITH HOOK
          212  +01A6; C; 0280; # LATIN LETTER YR
          213  +01A7; C; 01A8; # LATIN CAPITAL LETTER TONE TWO
          214  +01A9; C; 0283; # LATIN CAPITAL LETTER ESH
          215  +01AC; C; 01AD; # LATIN CAPITAL LETTER T WITH HOOK
          216  +01AE; C; 0288; # LATIN CAPITAL LETTER T WITH RETROFLEX HOOK
          217  +01AF; C; 01B0; # LATIN CAPITAL LETTER U WITH HORN
          218  +01B1; C; 028A; # LATIN CAPITAL LETTER UPSILON
          219  +01B2; C; 028B; # LATIN CAPITAL LETTER V WITH HOOK
          220  +01B3; C; 01B4; # LATIN CAPITAL LETTER Y WITH HOOK
          221  +01B5; C; 01B6; # LATIN CAPITAL LETTER Z WITH STROKE
          222  +01B7; C; 0292; # LATIN CAPITAL LETTER EZH
          223  +01B8; C; 01B9; # LATIN CAPITAL LETTER EZH REVERSED
          224  +01BC; C; 01BD; # LATIN CAPITAL LETTER TONE FIVE
          225  +01C4; C; 01C6; # LATIN CAPITAL LETTER DZ WITH CARON
          226  +01C5; C; 01C6; # LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
          227  +01C7; C; 01C9; # LATIN CAPITAL LETTER LJ
          228  +01C8; C; 01C9; # LATIN CAPITAL LETTER L WITH SMALL LETTER J
          229  +01CA; C; 01CC; # LATIN CAPITAL LETTER NJ
          230  +01CB; C; 01CC; # LATIN CAPITAL LETTER N WITH SMALL LETTER J
          231  +01CD; C; 01CE; # LATIN CAPITAL LETTER A WITH CARON
          232  +01CF; C; 01D0; # LATIN CAPITAL LETTER I WITH CARON
          233  +01D1; C; 01D2; # LATIN CAPITAL LETTER O WITH CARON
          234  +01D3; C; 01D4; # LATIN CAPITAL LETTER U WITH CARON
          235  +01D5; C; 01D6; # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
          236  +01D7; C; 01D8; # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
          237  +01D9; C; 01DA; # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
          238  +01DB; C; 01DC; # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
          239  +01DE; C; 01DF; # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON
          240  +01E0; C; 01E1; # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON
          241  +01E2; C; 01E3; # LATIN CAPITAL LETTER AE WITH MACRON
          242  +01E4; C; 01E5; # LATIN CAPITAL LETTER G WITH STROKE
          243  +01E6; C; 01E7; # LATIN CAPITAL LETTER G WITH CARON
          244  +01E8; C; 01E9; # LATIN CAPITAL LETTER K WITH CARON
          245  +01EA; C; 01EB; # LATIN CAPITAL LETTER O WITH OGONEK
          246  +01EC; C; 01ED; # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON
          247  +01EE; C; 01EF; # LATIN CAPITAL LETTER EZH WITH CARON
          248  +01F0; F; 006A 030C; # LATIN SMALL LETTER J WITH CARON
          249  +01F1; C; 01F3; # LATIN CAPITAL LETTER DZ
          250  +01F2; C; 01F3; # LATIN CAPITAL LETTER D WITH SMALL LETTER Z
          251  +01F4; C; 01F5; # LATIN CAPITAL LETTER G WITH ACUTE
          252  +01F6; C; 0195; # LATIN CAPITAL LETTER HWAIR
          253  +01F7; C; 01BF; # LATIN CAPITAL LETTER WYNN
          254  +01F8; C; 01F9; # LATIN CAPITAL LETTER N WITH GRAVE
          255  +01FA; C; 01FB; # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
          256  +01FC; C; 01FD; # LATIN CAPITAL LETTER AE WITH ACUTE
          257  +01FE; C; 01FF; # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
          258  +0200; C; 0201; # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
          259  +0202; C; 0203; # LATIN CAPITAL LETTER A WITH INVERTED BREVE
          260  +0204; C; 0205; # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
          261  +0206; C; 0207; # LATIN CAPITAL LETTER E WITH INVERTED BREVE
          262  +0208; C; 0209; # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
          263  +020A; C; 020B; # LATIN CAPITAL LETTER I WITH INVERTED BREVE
          264  +020C; C; 020D; # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
          265  +020E; C; 020F; # LATIN CAPITAL LETTER O WITH INVERTED BREVE
          266  +0210; C; 0211; # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
          267  +0212; C; 0213; # LATIN CAPITAL LETTER R WITH INVERTED BREVE
          268  +0214; C; 0215; # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
          269  +0216; C; 0217; # LATIN CAPITAL LETTER U WITH INVERTED BREVE
          270  +0218; C; 0219; # LATIN CAPITAL LETTER S WITH COMMA BELOW
          271  +021A; C; 021B; # LATIN CAPITAL LETTER T WITH COMMA BELOW
          272  +021C; C; 021D; # LATIN CAPITAL LETTER YOGH
          273  +021E; C; 021F; # LATIN CAPITAL LETTER H WITH CARON
          274  +0220; C; 019E; # LATIN CAPITAL LETTER N WITH LONG RIGHT LEG
          275  +0222; C; 0223; # LATIN CAPITAL LETTER OU
          276  +0224; C; 0225; # LATIN CAPITAL LETTER Z WITH HOOK
          277  +0226; C; 0227; # LATIN CAPITAL LETTER A WITH DOT ABOVE
          278  +0228; C; 0229; # LATIN CAPITAL LETTER E WITH CEDILLA
          279  +022A; C; 022B; # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON
          280  +022C; C; 022D; # LATIN CAPITAL LETTER O WITH TILDE AND MACRON
          281  +022E; C; 022F; # LATIN CAPITAL LETTER O WITH DOT ABOVE
          282  +0230; C; 0231; # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON
          283  +0232; C; 0233; # LATIN CAPITAL LETTER Y WITH MACRON
          284  +023A; C; 2C65; # LATIN CAPITAL LETTER A WITH STROKE
          285  +023B; C; 023C; # LATIN CAPITAL LETTER C WITH STROKE
          286  +023D; C; 019A; # LATIN CAPITAL LETTER L WITH BAR
          287  +023E; C; 2C66; # LATIN CAPITAL LETTER T WITH DIAGONAL STROKE
          288  +0241; C; 0242; # LATIN CAPITAL LETTER GLOTTAL STOP
          289  +0243; C; 0180; # LATIN CAPITAL LETTER B WITH STROKE
          290  +0244; C; 0289; # LATIN CAPITAL LETTER U BAR
          291  +0245; C; 028C; # LATIN CAPITAL LETTER TURNED V
          292  +0246; C; 0247; # LATIN CAPITAL LETTER E WITH STROKE
          293  +0248; C; 0249; # LATIN CAPITAL LETTER J WITH STROKE
          294  +024A; C; 024B; # LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL
          295  +024C; C; 024D; # LATIN CAPITAL LETTER R WITH STROKE
          296  +024E; C; 024F; # LATIN CAPITAL LETTER Y WITH STROKE
          297  +0345; C; 03B9; # COMBINING GREEK YPOGEGRAMMENI
          298  +0370; C; 0371; # GREEK CAPITAL LETTER HETA
          299  +0372; C; 0373; # GREEK CAPITAL LETTER ARCHAIC SAMPI
          300  +0376; C; 0377; # GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA
          301  +0386; C; 03AC; # GREEK CAPITAL LETTER ALPHA WITH TONOS
          302  +0388; C; 03AD; # GREEK CAPITAL LETTER EPSILON WITH TONOS
          303  +0389; C; 03AE; # GREEK CAPITAL LETTER ETA WITH TONOS
          304  +038A; C; 03AF; # GREEK CAPITAL LETTER IOTA WITH TONOS
          305  +038C; C; 03CC; # GREEK CAPITAL LETTER OMICRON WITH TONOS
          306  +038E; C; 03CD; # GREEK CAPITAL LETTER UPSILON WITH TONOS
          307  +038F; C; 03CE; # GREEK CAPITAL LETTER OMEGA WITH TONOS
          308  +0390; F; 03B9 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
          309  +0391; C; 03B1; # GREEK CAPITAL LETTER ALPHA
          310  +0392; C; 03B2; # GREEK CAPITAL LETTER BETA
          311  +0393; C; 03B3; # GREEK CAPITAL LETTER GAMMA
          312  +0394; C; 03B4; # GREEK CAPITAL LETTER DELTA
          313  +0395; C; 03B5; # GREEK CAPITAL LETTER EPSILON
          314  +0396; C; 03B6; # GREEK CAPITAL LETTER ZETA
          315  +0397; C; 03B7; # GREEK CAPITAL LETTER ETA
          316  +0398; C; 03B8; # GREEK CAPITAL LETTER THETA
          317  +0399; C; 03B9; # GREEK CAPITAL LETTER IOTA
          318  +039A; C; 03BA; # GREEK CAPITAL LETTER KAPPA
          319  +039B; C; 03BB; # GREEK CAPITAL LETTER LAMDA
          320  +039C; C; 03BC; # GREEK CAPITAL LETTER MU
          321  +039D; C; 03BD; # GREEK CAPITAL LETTER NU
          322  +039E; C; 03BE; # GREEK CAPITAL LETTER XI
          323  +039F; C; 03BF; # GREEK CAPITAL LETTER OMICRON
          324  +03A0; C; 03C0; # GREEK CAPITAL LETTER PI
          325  +03A1; C; 03C1; # GREEK CAPITAL LETTER RHO
          326  +03A3; C; 03C3; # GREEK CAPITAL LETTER SIGMA
          327  +03A4; C; 03C4; # GREEK CAPITAL LETTER TAU
          328  +03A5; C; 03C5; # GREEK CAPITAL LETTER UPSILON
          329  +03A6; C; 03C6; # GREEK CAPITAL LETTER PHI
          330  +03A7; C; 03C7; # GREEK CAPITAL LETTER CHI
          331  +03A8; C; 03C8; # GREEK CAPITAL LETTER PSI
          332  +03A9; C; 03C9; # GREEK CAPITAL LETTER OMEGA
          333  +03AA; C; 03CA; # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
          334  +03AB; C; 03CB; # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
          335  +03B0; F; 03C5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
          336  +03C2; C; 03C3; # GREEK SMALL LETTER FINAL SIGMA
          337  +03CF; C; 03D7; # GREEK CAPITAL KAI SYMBOL
          338  +03D0; C; 03B2; # GREEK BETA SYMBOL
          339  +03D1; C; 03B8; # GREEK THETA SYMBOL
          340  +03D5; C; 03C6; # GREEK PHI SYMBOL
          341  +03D6; C; 03C0; # GREEK PI SYMBOL
          342  +03D8; C; 03D9; # GREEK LETTER ARCHAIC KOPPA
          343  +03DA; C; 03DB; # GREEK LETTER STIGMA
          344  +03DC; C; 03DD; # GREEK LETTER DIGAMMA
          345  +03DE; C; 03DF; # GREEK LETTER KOPPA
          346  +03E0; C; 03E1; # GREEK LETTER SAMPI
          347  +03E2; C; 03E3; # COPTIC CAPITAL LETTER SHEI
          348  +03E4; C; 03E5; # COPTIC CAPITAL LETTER FEI
          349  +03E6; C; 03E7; # COPTIC CAPITAL LETTER KHEI
          350  +03E8; C; 03E9; # COPTIC CAPITAL LETTER HORI
          351  +03EA; C; 03EB; # COPTIC CAPITAL LETTER GANGIA
          352  +03EC; C; 03ED; # COPTIC CAPITAL LETTER SHIMA
          353  +03EE; C; 03EF; # COPTIC CAPITAL LETTER DEI
          354  +03F0; C; 03BA; # GREEK KAPPA SYMBOL
          355  +03F1; C; 03C1; # GREEK RHO SYMBOL
          356  +03F4; C; 03B8; # GREEK CAPITAL THETA SYMBOL
          357  +03F5; C; 03B5; # GREEK LUNATE EPSILON SYMBOL
          358  +03F7; C; 03F8; # GREEK CAPITAL LETTER SHO
          359  +03F9; C; 03F2; # GREEK CAPITAL LUNATE SIGMA SYMBOL
          360  +03FA; C; 03FB; # GREEK CAPITAL LETTER SAN
          361  +03FD; C; 037B; # GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL
          362  +03FE; C; 037C; # GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL
          363  +03FF; C; 037D; # GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL
          364  +0400; C; 0450; # CYRILLIC CAPITAL LETTER IE WITH GRAVE
          365  +0401; C; 0451; # CYRILLIC CAPITAL LETTER IO
          366  +0402; C; 0452; # CYRILLIC CAPITAL LETTER DJE
          367  +0403; C; 0453; # CYRILLIC CAPITAL LETTER GJE
          368  +0404; C; 0454; # CYRILLIC CAPITAL LETTER UKRAINIAN IE
          369  +0405; C; 0455; # CYRILLIC CAPITAL LETTER DZE
          370  +0406; C; 0456; # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
          371  +0407; C; 0457; # CYRILLIC CAPITAL LETTER YI
          372  +0408; C; 0458; # CYRILLIC CAPITAL LETTER JE
          373  +0409; C; 0459; # CYRILLIC CAPITAL LETTER LJE
          374  +040A; C; 045A; # CYRILLIC CAPITAL LETTER NJE
          375  +040B; C; 045B; # CYRILLIC CAPITAL LETTER TSHE
          376  +040C; C; 045C; # CYRILLIC CAPITAL LETTER KJE
          377  +040D; C; 045D; # CYRILLIC CAPITAL LETTER I WITH GRAVE
          378  +040E; C; 045E; # CYRILLIC CAPITAL LETTER SHORT U
          379  +040F; C; 045F; # CYRILLIC CAPITAL LETTER DZHE
          380  +0410; C; 0430; # CYRILLIC CAPITAL LETTER A
          381  +0411; C; 0431; # CYRILLIC CAPITAL LETTER BE
          382  +0412; C; 0432; # CYRILLIC CAPITAL LETTER VE
          383  +0413; C; 0433; # CYRILLIC CAPITAL LETTER GHE
          384  +0414; C; 0434; # CYRILLIC CAPITAL LETTER DE
          385  +0415; C; 0435; # CYRILLIC CAPITAL LETTER IE
          386  +0416; C; 0436; # CYRILLIC CAPITAL LETTER ZHE
          387  +0417; C; 0437; # CYRILLIC CAPITAL LETTER ZE
          388  +0418; C; 0438; # CYRILLIC CAPITAL LETTER I
          389  +0419; C; 0439; # CYRILLIC CAPITAL LETTER SHORT I
          390  +041A; C; 043A; # CYRILLIC CAPITAL LETTER KA
          391  +041B; C; 043B; # CYRILLIC CAPITAL LETTER EL
          392  +041C; C; 043C; # CYRILLIC CAPITAL LETTER EM
          393  +041D; C; 043D; # CYRILLIC CAPITAL LETTER EN
          394  +041E; C; 043E; # CYRILLIC CAPITAL LETTER O
          395  +041F; C; 043F; # CYRILLIC CAPITAL LETTER PE
          396  +0420; C; 0440; # CYRILLIC CAPITAL LETTER ER
          397  +0421; C; 0441; # CYRILLIC CAPITAL LETTER ES
          398  +0422; C; 0442; # CYRILLIC CAPITAL LETTER TE
          399  +0423; C; 0443; # CYRILLIC CAPITAL LETTER U
          400  +0424; C; 0444; # CYRILLIC CAPITAL LETTER EF
          401  +0425; C; 0445; # CYRILLIC CAPITAL LETTER HA
          402  +0426; C; 0446; # CYRILLIC CAPITAL LETTER TSE
          403  +0427; C; 0447; # CYRILLIC CAPITAL LETTER CHE
          404  +0428; C; 0448; # CYRILLIC CAPITAL LETTER SHA
          405  +0429; C; 0449; # CYRILLIC CAPITAL LETTER SHCHA
          406  +042A; C; 044A; # CYRILLIC CAPITAL LETTER HARD SIGN
          407  +042B; C; 044B; # CYRILLIC CAPITAL LETTER YERU
          408  +042C; C; 044C; # CYRILLIC CAPITAL LETTER SOFT SIGN
          409  +042D; C; 044D; # CYRILLIC CAPITAL LETTER E
          410  +042E; C; 044E; # CYRILLIC CAPITAL LETTER YU
          411  +042F; C; 044F; # CYRILLIC CAPITAL LETTER YA
          412  +0460; C; 0461; # CYRILLIC CAPITAL LETTER OMEGA
          413  +0462; C; 0463; # CYRILLIC CAPITAL LETTER YAT
          414  +0464; C; 0465; # CYRILLIC CAPITAL LETTER IOTIFIED E
          415  +0466; C; 0467; # CYRILLIC CAPITAL LETTER LITTLE YUS
          416  +0468; C; 0469; # CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS
          417  +046A; C; 046B; # CYRILLIC CAPITAL LETTER BIG YUS
          418  +046C; C; 046D; # CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS
          419  +046E; C; 046F; # CYRILLIC CAPITAL LETTER KSI
          420  +0470; C; 0471; # CYRILLIC CAPITAL LETTER PSI
          421  +0472; C; 0473; # CYRILLIC CAPITAL LETTER FITA
          422  +0474; C; 0475; # CYRILLIC CAPITAL LETTER IZHITSA
          423  +0476; C; 0477; # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
          424  +0478; C; 0479; # CYRILLIC CAPITAL LETTER UK
          425  +047A; C; 047B; # CYRILLIC CAPITAL LETTER ROUND OMEGA
          426  +047C; C; 047D; # CYRILLIC CAPITAL LETTER OMEGA WITH TITLO
          427  +047E; C; 047F; # CYRILLIC CAPITAL LETTER OT
          428  +0480; C; 0481; # CYRILLIC CAPITAL LETTER KOPPA
          429  +048A; C; 048B; # CYRILLIC CAPITAL LETTER SHORT I WITH TAIL
          430  +048C; C; 048D; # CYRILLIC CAPITAL LETTER SEMISOFT SIGN
          431  +048E; C; 048F; # CYRILLIC CAPITAL LETTER ER WITH TICK
          432  +0490; C; 0491; # CYRILLIC CAPITAL LETTER GHE WITH UPTURN
          433  +0492; C; 0493; # CYRILLIC CAPITAL LETTER GHE WITH STROKE
          434  +0494; C; 0495; # CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK
          435  +0496; C; 0497; # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
          436  +0498; C; 0499; # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
          437  +049A; C; 049B; # CYRILLIC CAPITAL LETTER KA WITH DESCENDER
          438  +049C; C; 049D; # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
          439  +049E; C; 049F; # CYRILLIC CAPITAL LETTER KA WITH STROKE
          440  +04A0; C; 04A1; # CYRILLIC CAPITAL LETTER BASHKIR KA
          441  +04A2; C; 04A3; # CYRILLIC CAPITAL LETTER EN WITH DESCENDER
          442  +04A4; C; 04A5; # CYRILLIC CAPITAL LIGATURE EN GHE
          443  +04A6; C; 04A7; # CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK
          444  +04A8; C; 04A9; # CYRILLIC CAPITAL LETTER ABKHASIAN HA
          445  +04AA; C; 04AB; # CYRILLIC CAPITAL LETTER ES WITH DESCENDER
          446  +04AC; C; 04AD; # CYRILLIC CAPITAL LETTER TE WITH DESCENDER
          447  +04AE; C; 04AF; # CYRILLIC CAPITAL LETTER STRAIGHT U
          448  +04B0; C; 04B1; # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
          449  +04B2; C; 04B3; # CYRILLIC CAPITAL LETTER HA WITH DESCENDER
          450  +04B4; C; 04B5; # CYRILLIC CAPITAL LIGATURE TE TSE
          451  +04B6; C; 04B7; # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
          452  +04B8; C; 04B9; # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
          453  +04BA; C; 04BB; # CYRILLIC CAPITAL LETTER SHHA
          454  +04BC; C; 04BD; # CYRILLIC CAPITAL LETTER ABKHASIAN CHE
          455  +04BE; C; 04BF; # CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER
          456  +04C0; C; 04CF; # CYRILLIC LETTER PALOCHKA
          457  +04C1; C; 04C2; # CYRILLIC CAPITAL LETTER ZHE WITH BREVE
          458  +04C3; C; 04C4; # CYRILLIC CAPITAL LETTER KA WITH HOOK
          459  +04C5; C; 04C6; # CYRILLIC CAPITAL LETTER EL WITH TAIL
          460  +04C7; C; 04C8; # CYRILLIC CAPITAL LETTER EN WITH HOOK
          461  +04C9; C; 04CA; # CYRILLIC CAPITAL LETTER EN WITH TAIL
          462  +04CB; C; 04CC; # CYRILLIC CAPITAL LETTER KHAKASSIAN CHE
          463  +04CD; C; 04CE; # CYRILLIC CAPITAL LETTER EM WITH TAIL
          464  +04D0; C; 04D1; # CYRILLIC CAPITAL LETTER A WITH BREVE
          465  +04D2; C; 04D3; # CYRILLIC CAPITAL LETTER A WITH DIAERESIS
          466  +04D4; C; 04D5; # CYRILLIC CAPITAL LIGATURE A IE
          467  +04D6; C; 04D7; # CYRILLIC CAPITAL LETTER IE WITH BREVE
          468  +04D8; C; 04D9; # CYRILLIC CAPITAL LETTER SCHWA
          469  +04DA; C; 04DB; # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS
          470  +04DC; C; 04DD; # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS
          471  +04DE; C; 04DF; # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS
          472  +04E0; C; 04E1; # CYRILLIC CAPITAL LETTER ABKHASIAN DZE
          473  +04E2; C; 04E3; # CYRILLIC CAPITAL LETTER I WITH MACRON
          474  +04E4; C; 04E5; # CYRILLIC CAPITAL LETTER I WITH DIAERESIS
          475  +04E6; C; 04E7; # CYRILLIC CAPITAL LETTER O WITH DIAERESIS
          476  +04E8; C; 04E9; # CYRILLIC CAPITAL LETTER BARRED O
          477  +04EA; C; 04EB; # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS
          478  +04EC; C; 04ED; # CYRILLIC CAPITAL LETTER E WITH DIAERESIS
          479  +04EE; C; 04EF; # CYRILLIC CAPITAL LETTER U WITH MACRON
          480  +04F0; C; 04F1; # CYRILLIC CAPITAL LETTER U WITH DIAERESIS
          481  +04F2; C; 04F3; # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE
          482  +04F4; C; 04F5; # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS
          483  +04F6; C; 04F7; # CYRILLIC CAPITAL LETTER GHE WITH DESCENDER
          484  +04F8; C; 04F9; # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS
          485  +04FA; C; 04FB; # CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK
          486  +04FC; C; 04FD; # CYRILLIC CAPITAL LETTER HA WITH HOOK
          487  +04FE; C; 04FF; # CYRILLIC CAPITAL LETTER HA WITH STROKE
          488  +0500; C; 0501; # CYRILLIC CAPITAL LETTER KOMI DE
          489  +0502; C; 0503; # CYRILLIC CAPITAL LETTER KOMI DJE
          490  +0504; C; 0505; # CYRILLIC CAPITAL LETTER KOMI ZJE
          491  +0506; C; 0507; # CYRILLIC CAPITAL LETTER KOMI DZJE
          492  +0508; C; 0509; # CYRILLIC CAPITAL LETTER KOMI LJE
          493  +050A; C; 050B; # CYRILLIC CAPITAL LETTER KOMI NJE
          494  +050C; C; 050D; # CYRILLIC CAPITAL LETTER KOMI SJE
          495  +050E; C; 050F; # CYRILLIC CAPITAL LETTER KOMI TJE
          496  +0510; C; 0511; # CYRILLIC CAPITAL LETTER REVERSED ZE
          497  +0512; C; 0513; # CYRILLIC CAPITAL LETTER EL WITH HOOK
          498  +0514; C; 0515; # CYRILLIC CAPITAL LETTER LHA
          499  +0516; C; 0517; # CYRILLIC CAPITAL LETTER RHA
          500  +0518; C; 0519; # CYRILLIC CAPITAL LETTER YAE
          501  +051A; C; 051B; # CYRILLIC CAPITAL LETTER QA
          502  +051C; C; 051D; # CYRILLIC CAPITAL LETTER WE
          503  +051E; C; 051F; # CYRILLIC CAPITAL LETTER ALEUT KA
          504  +0520; C; 0521; # CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK
          505  +0522; C; 0523; # CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK
          506  +0524; C; 0525; # CYRILLIC CAPITAL LETTER PE WITH DESCENDER
          507  +0526; C; 0527; # CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER
          508  +0531; C; 0561; # ARMENIAN CAPITAL LETTER AYB
          509  +0532; C; 0562; # ARMENIAN CAPITAL LETTER BEN
          510  +0533; C; 0563; # ARMENIAN CAPITAL LETTER GIM
          511  +0534; C; 0564; # ARMENIAN CAPITAL LETTER DA
          512  +0535; C; 0565; # ARMENIAN CAPITAL LETTER ECH
          513  +0536; C; 0566; # ARMENIAN CAPITAL LETTER ZA
          514  +0537; C; 0567; # ARMENIAN CAPITAL LETTER EH
          515  +0538; C; 0568; # ARMENIAN CAPITAL LETTER ET
          516  +0539; C; 0569; # ARMENIAN CAPITAL LETTER TO
          517  +053A; C; 056A; # ARMENIAN CAPITAL LETTER ZHE
          518  +053B; C; 056B; # ARMENIAN CAPITAL LETTER INI
          519  +053C; C; 056C; # ARMENIAN CAPITAL LETTER LIWN
          520  +053D; C; 056D; # ARMENIAN CAPITAL LETTER XEH
          521  +053E; C; 056E; # ARMENIAN CAPITAL LETTER CA
          522  +053F; C; 056F; # ARMENIAN CAPITAL LETTER KEN
          523  +0540; C; 0570; # ARMENIAN CAPITAL LETTER HO
          524  +0541; C; 0571; # ARMENIAN CAPITAL LETTER JA
          525  +0542; C; 0572; # ARMENIAN CAPITAL LETTER GHAD
          526  +0543; C; 0573; # ARMENIAN CAPITAL LETTER CHEH
          527  +0544; C; 0574; # ARMENIAN CAPITAL LETTER MEN
          528  +0545; C; 0575; # ARMENIAN CAPITAL LETTER YI
          529  +0546; C; 0576; # ARMENIAN CAPITAL LETTER NOW
          530  +0547; C; 0577; # ARMENIAN CAPITAL LETTER SHA
          531  +0548; C; 0578; # ARMENIAN CAPITAL LETTER VO
          532  +0549; C; 0579; # ARMENIAN CAPITAL LETTER CHA
          533  +054A; C; 057A; # ARMENIAN CAPITAL LETTER PEH
          534  +054B; C; 057B; # ARMENIAN CAPITAL LETTER JHEH
          535  +054C; C; 057C; # ARMENIAN CAPITAL LETTER RA
          536  +054D; C; 057D; # ARMENIAN CAPITAL LETTER SEH
          537  +054E; C; 057E; # ARMENIAN CAPITAL LETTER VEW
          538  +054F; C; 057F; # ARMENIAN CAPITAL LETTER TIWN
          539  +0550; C; 0580; # ARMENIAN CAPITAL LETTER REH
          540  +0551; C; 0581; # ARMENIAN CAPITAL LETTER CO
          541  +0552; C; 0582; # ARMENIAN CAPITAL LETTER YIWN
          542  +0553; C; 0583; # ARMENIAN CAPITAL LETTER PIWR
          543  +0554; C; 0584; # ARMENIAN CAPITAL LETTER KEH
          544  +0555; C; 0585; # ARMENIAN CAPITAL LETTER OH
          545  +0556; C; 0586; # ARMENIAN CAPITAL LETTER FEH
          546  +0587; F; 0565 0582; # ARMENIAN SMALL LIGATURE ECH YIWN
          547  +10A0; C; 2D00; # GEORGIAN CAPITAL LETTER AN
          548  +10A1; C; 2D01; # GEORGIAN CAPITAL LETTER BAN
          549  +10A2; C; 2D02; # GEORGIAN CAPITAL LETTER GAN
          550  +10A3; C; 2D03; # GEORGIAN CAPITAL LETTER DON
          551  +10A4; C; 2D04; # GEORGIAN CAPITAL LETTER EN
          552  +10A5; C; 2D05; # GEORGIAN CAPITAL LETTER VIN
          553  +10A6; C; 2D06; # GEORGIAN CAPITAL LETTER ZEN
          554  +10A7; C; 2D07; # GEORGIAN CAPITAL LETTER TAN
          555  +10A8; C; 2D08; # GEORGIAN CAPITAL LETTER IN
          556  +10A9; C; 2D09; # GEORGIAN CAPITAL LETTER KAN
          557  +10AA; C; 2D0A; # GEORGIAN CAPITAL LETTER LAS
          558  +10AB; C; 2D0B; # GEORGIAN CAPITAL LETTER MAN
          559  +10AC; C; 2D0C; # GEORGIAN CAPITAL LETTER NAR
          560  +10AD; C; 2D0D; # GEORGIAN CAPITAL LETTER ON
          561  +10AE; C; 2D0E; # GEORGIAN CAPITAL LETTER PAR
          562  +10AF; C; 2D0F; # GEORGIAN CAPITAL LETTER ZHAR
          563  +10B0; C; 2D10; # GEORGIAN CAPITAL LETTER RAE
          564  +10B1; C; 2D11; # GEORGIAN CAPITAL LETTER SAN
          565  +10B2; C; 2D12; # GEORGIAN CAPITAL LETTER TAR
          566  +10B3; C; 2D13; # GEORGIAN CAPITAL LETTER UN
          567  +10B4; C; 2D14; # GEORGIAN CAPITAL LETTER PHAR
          568  +10B5; C; 2D15; # GEORGIAN CAPITAL LETTER KHAR
          569  +10B6; C; 2D16; # GEORGIAN CAPITAL LETTER GHAN
          570  +10B7; C; 2D17; # GEORGIAN CAPITAL LETTER QAR
          571  +10B8; C; 2D18; # GEORGIAN CAPITAL LETTER SHIN
          572  +10B9; C; 2D19; # GEORGIAN CAPITAL LETTER CHIN
          573  +10BA; C; 2D1A; # GEORGIAN CAPITAL LETTER CAN
          574  +10BB; C; 2D1B; # GEORGIAN CAPITAL LETTER JIL
          575  +10BC; C; 2D1C; # GEORGIAN CAPITAL LETTER CIL
          576  +10BD; C; 2D1D; # GEORGIAN CAPITAL LETTER CHAR
          577  +10BE; C; 2D1E; # GEORGIAN CAPITAL LETTER XAN
          578  +10BF; C; 2D1F; # GEORGIAN CAPITAL LETTER JHAN
          579  +10C0; C; 2D20; # GEORGIAN CAPITAL LETTER HAE
          580  +10C1; C; 2D21; # GEORGIAN CAPITAL LETTER HE
          581  +10C2; C; 2D22; # GEORGIAN CAPITAL LETTER HIE
          582  +10C3; C; 2D23; # GEORGIAN CAPITAL LETTER WE
          583  +10C4; C; 2D24; # GEORGIAN CAPITAL LETTER HAR
          584  +10C5; C; 2D25; # GEORGIAN CAPITAL LETTER HOE
          585  +10C7; C; 2D27; # GEORGIAN CAPITAL LETTER YN
          586  +10CD; C; 2D2D; # GEORGIAN CAPITAL LETTER AEN
          587  +1E00; C; 1E01; # LATIN CAPITAL LETTER A WITH RING BELOW
          588  +1E02; C; 1E03; # LATIN CAPITAL LETTER B WITH DOT ABOVE
          589  +1E04; C; 1E05; # LATIN CAPITAL LETTER B WITH DOT BELOW
          590  +1E06; C; 1E07; # LATIN CAPITAL LETTER B WITH LINE BELOW
          591  +1E08; C; 1E09; # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE
          592  +1E0A; C; 1E0B; # LATIN CAPITAL LETTER D WITH DOT ABOVE
          593  +1E0C; C; 1E0D; # LATIN CAPITAL LETTER D WITH DOT BELOW
          594  +1E0E; C; 1E0F; # LATIN CAPITAL LETTER D WITH LINE BELOW
          595  +1E10; C; 1E11; # LATIN CAPITAL LETTER D WITH CEDILLA
          596  +1E12; C; 1E13; # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW
          597  +1E14; C; 1E15; # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE
          598  +1E16; C; 1E17; # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE
          599  +1E18; C; 1E19; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW
          600  +1E1A; C; 1E1B; # LATIN CAPITAL LETTER E WITH TILDE BELOW
          601  +1E1C; C; 1E1D; # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE
          602  +1E1E; C; 1E1F; # LATIN CAPITAL LETTER F WITH DOT ABOVE
          603  +1E20; C; 1E21; # LATIN CAPITAL LETTER G WITH MACRON
          604  +1E22; C; 1E23; # LATIN CAPITAL LETTER H WITH DOT ABOVE
          605  +1E24; C; 1E25; # LATIN CAPITAL LETTER H WITH DOT BELOW
          606  +1E26; C; 1E27; # LATIN CAPITAL LETTER H WITH DIAERESIS
          607  +1E28; C; 1E29; # LATIN CAPITAL LETTER H WITH CEDILLA
          608  +1E2A; C; 1E2B; # LATIN CAPITAL LETTER H WITH BREVE BELOW
          609  +1E2C; C; 1E2D; # LATIN CAPITAL LETTER I WITH TILDE BELOW
          610  +1E2E; C; 1E2F; # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE
          611  +1E30; C; 1E31; # LATIN CAPITAL LETTER K WITH ACUTE
          612  +1E32; C; 1E33; # LATIN CAPITAL LETTER K WITH DOT BELOW
          613  +1E34; C; 1E35; # LATIN CAPITAL LETTER K WITH LINE BELOW
          614  +1E36; C; 1E37; # LATIN CAPITAL LETTER L WITH DOT BELOW
          615  +1E38; C; 1E39; # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON
          616  +1E3A; C; 1E3B; # LATIN CAPITAL LETTER L WITH LINE BELOW
          617  +1E3C; C; 1E3D; # LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW
          618  +1E3E; C; 1E3F; # LATIN CAPITAL LETTER M WITH ACUTE
          619  +1E40; C; 1E41; # LATIN CAPITAL LETTER M WITH DOT ABOVE
          620  +1E42; C; 1E43; # LATIN CAPITAL LETTER M WITH DOT BELOW
          621  +1E44; C; 1E45; # LATIN CAPITAL LETTER N WITH DOT ABOVE
          622  +1E46; C; 1E47; # LATIN CAPITAL LETTER N WITH DOT BELOW
          623  +1E48; C; 1E49; # LATIN CAPITAL LETTER N WITH LINE BELOW
          624  +1E4A; C; 1E4B; # LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW
          625  +1E4C; C; 1E4D; # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE
          626  +1E4E; C; 1E4F; # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS
          627  +1E50; C; 1E51; # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE
          628  +1E52; C; 1E53; # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE
          629  +1E54; C; 1E55; # LATIN CAPITAL LETTER P WITH ACUTE
          630  +1E56; C; 1E57; # LATIN CAPITAL LETTER P WITH DOT ABOVE
          631  +1E58; C; 1E59; # LATIN CAPITAL LETTER R WITH DOT ABOVE
          632  +1E5A; C; 1E5B; # LATIN CAPITAL LETTER R WITH DOT BELOW
          633  +1E5C; C; 1E5D; # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON
          634  +1E5E; C; 1E5F; # LATIN CAPITAL LETTER R WITH LINE BELOW
          635  +1E60; C; 1E61; # LATIN CAPITAL LETTER S WITH DOT ABOVE
          636  +1E62; C; 1E63; # LATIN CAPITAL LETTER S WITH DOT BELOW
          637  +1E64; C; 1E65; # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE
          638  +1E66; C; 1E67; # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE
          639  +1E68; C; 1E69; # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE
          640  +1E6A; C; 1E6B; # LATIN CAPITAL LETTER T WITH DOT ABOVE
          641  +1E6C; C; 1E6D; # LATIN CAPITAL LETTER T WITH DOT BELOW
          642  +1E6E; C; 1E6F; # LATIN CAPITAL LETTER T WITH LINE BELOW
          643  +1E70; C; 1E71; # LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW
          644  +1E72; C; 1E73; # LATIN CAPITAL LETTER U WITH DIAERESIS BELOW
          645  +1E74; C; 1E75; # LATIN CAPITAL LETTER U WITH TILDE BELOW
          646  +1E76; C; 1E77; # LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW
          647  +1E78; C; 1E79; # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE
          648  +1E7A; C; 1E7B; # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS
          649  +1E7C; C; 1E7D; # LATIN CAPITAL LETTER V WITH TILDE
          650  +1E7E; C; 1E7F; # LATIN CAPITAL LETTER V WITH DOT BELOW
          651  +1E80; C; 1E81; # LATIN CAPITAL LETTER W WITH GRAVE
          652  +1E82; C; 1E83; # LATIN CAPITAL LETTER W WITH ACUTE
          653  +1E84; C; 1E85; # LATIN CAPITAL LETTER W WITH DIAERESIS
          654  +1E86; C; 1E87; # LATIN CAPITAL LETTER W WITH DOT ABOVE
          655  +1E88; C; 1E89; # LATIN CAPITAL LETTER W WITH DOT BELOW
          656  +1E8A; C; 1E8B; # LATIN CAPITAL LETTER X WITH DOT ABOVE
          657  +1E8C; C; 1E8D; # LATIN CAPITAL LETTER X WITH DIAERESIS
          658  +1E8E; C; 1E8F; # LATIN CAPITAL LETTER Y WITH DOT ABOVE
          659  +1E90; C; 1E91; # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX
          660  +1E92; C; 1E93; # LATIN CAPITAL LETTER Z WITH DOT BELOW
          661  +1E94; C; 1E95; # LATIN CAPITAL LETTER Z WITH LINE BELOW
          662  +1E96; F; 0068 0331; # LATIN SMALL LETTER H WITH LINE BELOW
          663  +1E97; F; 0074 0308; # LATIN SMALL LETTER T WITH DIAERESIS
          664  +1E98; F; 0077 030A; # LATIN SMALL LETTER W WITH RING ABOVE
          665  +1E99; F; 0079 030A; # LATIN SMALL LETTER Y WITH RING ABOVE
          666  +1E9A; F; 0061 02BE; # LATIN SMALL LETTER A WITH RIGHT HALF RING
          667  +1E9B; C; 1E61; # LATIN SMALL LETTER LONG S WITH DOT ABOVE
          668  +1E9E; F; 0073 0073; # LATIN CAPITAL LETTER SHARP S
          669  +1E9E; S; 00DF; # LATIN CAPITAL LETTER SHARP S
          670  +1EA0; C; 1EA1; # LATIN CAPITAL LETTER A WITH DOT BELOW
          671  +1EA2; C; 1EA3; # LATIN CAPITAL LETTER A WITH HOOK ABOVE
          672  +1EA4; C; 1EA5; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
          673  +1EA6; C; 1EA7; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
          674  +1EA8; C; 1EA9; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
          675  +1EAA; C; 1EAB; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
          676  +1EAC; C; 1EAD; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
          677  +1EAE; C; 1EAF; # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
          678  +1EB0; C; 1EB1; # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
          679  +1EB2; C; 1EB3; # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
          680  +1EB4; C; 1EB5; # LATIN CAPITAL LETTER A WITH BREVE AND TILDE
          681  +1EB6; C; 1EB7; # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
          682  +1EB8; C; 1EB9; # LATIN CAPITAL LETTER E WITH DOT BELOW
          683  +1EBA; C; 1EBB; # LATIN CAPITAL LETTER E WITH HOOK ABOVE
          684  +1EBC; C; 1EBD; # LATIN CAPITAL LETTER E WITH TILDE
          685  +1EBE; C; 1EBF; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
          686  +1EC0; C; 1EC1; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
          687  +1EC2; C; 1EC3; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
          688  +1EC4; C; 1EC5; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
          689  +1EC6; C; 1EC7; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
          690  +1EC8; C; 1EC9; # LATIN CAPITAL LETTER I WITH HOOK ABOVE
          691  +1ECA; C; 1ECB; # LATIN CAPITAL LETTER I WITH DOT BELOW
          692  +1ECC; C; 1ECD; # LATIN CAPITAL LETTER O WITH DOT BELOW
          693  +1ECE; C; 1ECF; # LATIN CAPITAL LETTER O WITH HOOK ABOVE
          694  +1ED0; C; 1ED1; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
          695  +1ED2; C; 1ED3; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
          696  +1ED4; C; 1ED5; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
          697  +1ED6; C; 1ED7; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
          698  +1ED8; C; 1ED9; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
          699  +1EDA; C; 1EDB; # LATIN CAPITAL LETTER O WITH HORN AND ACUTE
          700  +1EDC; C; 1EDD; # LATIN CAPITAL LETTER O WITH HORN AND GRAVE
          701  +1EDE; C; 1EDF; # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
          702  +1EE0; C; 1EE1; # LATIN CAPITAL LETTER O WITH HORN AND TILDE
          703  +1EE2; C; 1EE3; # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
          704  +1EE4; C; 1EE5; # LATIN CAPITAL LETTER U WITH DOT BELOW
          705  +1EE6; C; 1EE7; # LATIN CAPITAL LETTER U WITH HOOK ABOVE
          706  +1EE8; C; 1EE9; # LATIN CAPITAL LETTER U WITH HORN AND ACUTE
          707  +1EEA; C; 1EEB; # LATIN CAPITAL LETTER U WITH HORN AND GRAVE
          708  +1EEC; C; 1EED; # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
          709  +1EEE; C; 1EEF; # LATIN CAPITAL LETTER U WITH HORN AND TILDE
          710  +1EF0; C; 1EF1; # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
          711  +1EF2; C; 1EF3; # LATIN CAPITAL LETTER Y WITH GRAVE
          712  +1EF4; C; 1EF5; # LATIN CAPITAL LETTER Y WITH DOT BELOW
          713  +1EF6; C; 1EF7; # LATIN CAPITAL LETTER Y WITH HOOK ABOVE
          714  +1EF8; C; 1EF9; # LATIN CAPITAL LETTER Y WITH TILDE
          715  +1EFA; C; 1EFB; # LATIN CAPITAL LETTER MIDDLE-WELSH LL
          716  +1EFC; C; 1EFD; # LATIN CAPITAL LETTER MIDDLE-WELSH V
          717  +1EFE; C; 1EFF; # LATIN CAPITAL LETTER Y WITH LOOP
          718  +1F08; C; 1F00; # GREEK CAPITAL LETTER ALPHA WITH PSILI
          719  +1F09; C; 1F01; # GREEK CAPITAL LETTER ALPHA WITH DASIA
          720  +1F0A; C; 1F02; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA
          721  +1F0B; C; 1F03; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA
          722  +1F0C; C; 1F04; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA
          723  +1F0D; C; 1F05; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA
          724  +1F0E; C; 1F06; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI
          725  +1F0F; C; 1F07; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI
          726  +1F18; C; 1F10; # GREEK CAPITAL LETTER EPSILON WITH PSILI
          727  +1F19; C; 1F11; # GREEK CAPITAL LETTER EPSILON WITH DASIA
          728  +1F1A; C; 1F12; # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA
          729  +1F1B; C; 1F13; # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA
          730  +1F1C; C; 1F14; # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA
          731  +1F1D; C; 1F15; # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
          732  +1F28; C; 1F20; # GREEK CAPITAL LETTER ETA WITH PSILI
          733  +1F29; C; 1F21; # GREEK CAPITAL LETTER ETA WITH DASIA
          734  +1F2A; C; 1F22; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA
          735  +1F2B; C; 1F23; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA
          736  +1F2C; C; 1F24; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA
          737  +1F2D; C; 1F25; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA
          738  +1F2E; C; 1F26; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI
          739  +1F2F; C; 1F27; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI
          740  +1F38; C; 1F30; # GREEK CAPITAL LETTER IOTA WITH PSILI
          741  +1F39; C; 1F31; # GREEK CAPITAL LETTER IOTA WITH DASIA
          742  +1F3A; C; 1F32; # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA
          743  +1F3B; C; 1F33; # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA
          744  +1F3C; C; 1F34; # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA
          745  +1F3D; C; 1F35; # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA
          746  +1F3E; C; 1F36; # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI
          747  +1F3F; C; 1F37; # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI
          748  +1F48; C; 1F40; # GREEK CAPITAL LETTER OMICRON WITH PSILI
          749  +1F49; C; 1F41; # GREEK CAPITAL LETTER OMICRON WITH DASIA
          750  +1F4A; C; 1F42; # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA
          751  +1F4B; C; 1F43; # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA
          752  +1F4C; C; 1F44; # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA
          753  +1F4D; C; 1F45; # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
          754  +1F50; F; 03C5 0313; # GREEK SMALL LETTER UPSILON WITH PSILI
          755  +1F52; F; 03C5 0313 0300; # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA
          756  +1F54; F; 03C5 0313 0301; # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA
          757  +1F56; F; 03C5 0313 0342; # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI
          758  +1F59; C; 1F51; # GREEK CAPITAL LETTER UPSILON WITH DASIA
          759  +1F5B; C; 1F53; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
          760  +1F5D; C; 1F55; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
          761  +1F5F; C; 1F57; # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI
          762  +1F68; C; 1F60; # GREEK CAPITAL LETTER OMEGA WITH PSILI
          763  +1F69; C; 1F61; # GREEK CAPITAL LETTER OMEGA WITH DASIA
          764  +1F6A; C; 1F62; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA
          765  +1F6B; C; 1F63; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA
          766  +1F6C; C; 1F64; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA
          767  +1F6D; C; 1F65; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA
          768  +1F6E; C; 1F66; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI
          769  +1F6F; C; 1F67; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI
          770  +1F80; F; 1F00 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI
          771  +1F81; F; 1F01 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI
          772  +1F82; F; 1F02 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI
          773  +1F83; F; 1F03 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI
          774  +1F84; F; 1F04 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI
          775  +1F85; F; 1F05 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI
          776  +1F86; F; 1F06 03B9; # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
          777  +1F87; F; 1F07 03B9; # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
          778  +1F88; F; 1F00 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
          779  +1F88; S; 1F80; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
          780  +1F89; F; 1F01 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
          781  +1F89; S; 1F81; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
          782  +1F8A; F; 1F02 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          783  +1F8A; S; 1F82; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          784  +1F8B; F; 1F03 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          785  +1F8B; S; 1F83; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          786  +1F8C; F; 1F04 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          787  +1F8C; S; 1F84; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          788  +1F8D; F; 1F05 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          789  +1F8D; S; 1F85; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          790  +1F8E; F; 1F06 03B9; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          791  +1F8E; S; 1F86; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          792  +1F8F; F; 1F07 03B9; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          793  +1F8F; S; 1F87; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          794  +1F90; F; 1F20 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI
          795  +1F91; F; 1F21 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI
          796  +1F92; F; 1F22 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI
          797  +1F93; F; 1F23 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI
          798  +1F94; F; 1F24 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI
          799  +1F95; F; 1F25 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI
          800  +1F96; F; 1F26 03B9; # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
          801  +1F97; F; 1F27 03B9; # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
          802  +1F98; F; 1F20 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
          803  +1F98; S; 1F90; # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
          804  +1F99; F; 1F21 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
          805  +1F99; S; 1F91; # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
          806  +1F9A; F; 1F22 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          807  +1F9A; S; 1F92; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          808  +1F9B; F; 1F23 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          809  +1F9B; S; 1F93; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          810  +1F9C; F; 1F24 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          811  +1F9C; S; 1F94; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          812  +1F9D; F; 1F25 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          813  +1F9D; S; 1F95; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          814  +1F9E; F; 1F26 03B9; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          815  +1F9E; S; 1F96; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          816  +1F9F; F; 1F27 03B9; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          817  +1F9F; S; 1F97; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          818  +1FA0; F; 1F60 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI
          819  +1FA1; F; 1F61 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI
          820  +1FA2; F; 1F62 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
          821  +1FA3; F; 1F63 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI
          822  +1FA4; F; 1F64 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI
          823  +1FA5; F; 1F65 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI
          824  +1FA6; F; 1F66 03B9; # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
          825  +1FA7; F; 1F67 03B9; # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
          826  +1FA8; F; 1F60 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
          827  +1FA8; S; 1FA0; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
          828  +1FA9; F; 1F61 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
          829  +1FA9; S; 1FA1; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
          830  +1FAA; F; 1F62 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          831  +1FAA; S; 1FA2; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
          832  +1FAB; F; 1F63 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          833  +1FAB; S; 1FA3; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
          834  +1FAC; F; 1F64 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          835  +1FAC; S; 1FA4; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
          836  +1FAD; F; 1F65 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          837  +1FAD; S; 1FA5; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
          838  +1FAE; F; 1F66 03B9; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          839  +1FAE; S; 1FA6; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
          840  +1FAF; F; 1F67 03B9; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          841  +1FAF; S; 1FA7; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
          842  +1FB2; F; 1F70 03B9; # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI
          843  +1FB3; F; 03B1 03B9; # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI
          844  +1FB4; F; 03AC 03B9; # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
          845  +1FB6; F; 03B1 0342; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI
          846  +1FB7; F; 03B1 0342 03B9; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI
          847  +1FB8; C; 1FB0; # GREEK CAPITAL LETTER ALPHA WITH VRACHY
          848  +1FB9; C; 1FB1; # GREEK CAPITAL LETTER ALPHA WITH MACRON
          849  +1FBA; C; 1F70; # GREEK CAPITAL LETTER ALPHA WITH VARIA
          850  +1FBB; C; 1F71; # GREEK CAPITAL LETTER ALPHA WITH OXIA
          851  +1FBC; F; 03B1 03B9; # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
          852  +1FBC; S; 1FB3; # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
          853  +1FBE; C; 03B9; # GREEK PROSGEGRAMMENI
          854  +1FC2; F; 1F74 03B9; # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
          855  +1FC3; F; 03B7 03B9; # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
          856  +1FC4; F; 03AE 03B9; # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
          857  +1FC6; F; 03B7 0342; # GREEK SMALL LETTER ETA WITH PERISPOMENI
          858  +1FC7; F; 03B7 0342 03B9; # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI
          859  +1FC8; C; 1F72; # GREEK CAPITAL LETTER EPSILON WITH VARIA
          860  +1FC9; C; 1F73; # GREEK CAPITAL LETTER EPSILON WITH OXIA
          861  +1FCA; C; 1F74; # GREEK CAPITAL LETTER ETA WITH VARIA
          862  +1FCB; C; 1F75; # GREEK CAPITAL LETTER ETA WITH OXIA
          863  +1FCC; F; 03B7 03B9; # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
          864  +1FCC; S; 1FC3; # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
          865  +1FD2; F; 03B9 0308 0300; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
          866  +1FD3; F; 03B9 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
          867  +1FD6; F; 03B9 0342; # GREEK SMALL LETTER IOTA WITH PERISPOMENI
          868  +1FD7; F; 03B9 0308 0342; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
          869  +1FD8; C; 1FD0; # GREEK CAPITAL LETTER IOTA WITH VRACHY
          870  +1FD9; C; 1FD1; # GREEK CAPITAL LETTER IOTA WITH MACRON
          871  +1FDA; C; 1F76; # GREEK CAPITAL LETTER IOTA WITH VARIA
          872  +1FDB; C; 1F77; # GREEK CAPITAL LETTER IOTA WITH OXIA
          873  +1FE2; F; 03C5 0308 0300; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
          874  +1FE3; F; 03C5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
          875  +1FE4; F; 03C1 0313; # GREEK SMALL LETTER RHO WITH PSILI
          876  +1FE6; F; 03C5 0342; # GREEK SMALL LETTER UPSILON WITH PERISPOMENI
          877  +1FE7; F; 03C5 0308 0342; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
          878  +1FE8; C; 1FE0; # GREEK CAPITAL LETTER UPSILON WITH VRACHY
          879  +1FE9; C; 1FE1; # GREEK CAPITAL LETTER UPSILON WITH MACRON
          880  +1FEA; C; 1F7A; # GREEK CAPITAL LETTER UPSILON WITH VARIA
          881  +1FEB; C; 1F7B; # GREEK CAPITAL LETTER UPSILON WITH OXIA
          882  +1FEC; C; 1FE5; # GREEK CAPITAL LETTER RHO WITH DASIA
          883  +1FF2; F; 1F7C 03B9; # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI
          884  +1FF3; F; 03C9 03B9; # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI
          885  +1FF4; F; 03CE 03B9; # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
          886  +1FF6; F; 03C9 0342; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI
          887  +1FF7; F; 03C9 0342 03B9; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI
          888  +1FF8; C; 1F78; # GREEK CAPITAL LETTER OMICRON WITH VARIA
          889  +1FF9; C; 1F79; # GREEK CAPITAL LETTER OMICRON WITH OXIA
          890  +1FFA; C; 1F7C; # GREEK CAPITAL LETTER OMEGA WITH VARIA
          891  +1FFB; C; 1F7D; # GREEK CAPITAL LETTER OMEGA WITH OXIA
          892  +1FFC; F; 03C9 03B9; # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
          893  +1FFC; S; 1FF3; # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
          894  +2126; C; 03C9; # OHM SIGN
          895  +212A; C; 006B; # KELVIN SIGN
          896  +212B; C; 00E5; # ANGSTROM SIGN
          897  +2132; C; 214E; # TURNED CAPITAL F
          898  +2160; C; 2170; # ROMAN NUMERAL ONE
          899  +2161; C; 2171; # ROMAN NUMERAL TWO
          900  +2162; C; 2172; # ROMAN NUMERAL THREE
          901  +2163; C; 2173; # ROMAN NUMERAL FOUR
          902  +2164; C; 2174; # ROMAN NUMERAL FIVE
          903  +2165; C; 2175; # ROMAN NUMERAL SIX
          904  +2166; C; 2176; # ROMAN NUMERAL SEVEN
          905  +2167; C; 2177; # ROMAN NUMERAL EIGHT
          906  +2168; C; 2178; # ROMAN NUMERAL NINE
          907  +2169; C; 2179; # ROMAN NUMERAL TEN
          908  +216A; C; 217A; # ROMAN NUMERAL ELEVEN
          909  +216B; C; 217B; # ROMAN NUMERAL TWELVE
          910  +216C; C; 217C; # ROMAN NUMERAL FIFTY
          911  +216D; C; 217D; # ROMAN NUMERAL ONE HUNDRED
          912  +216E; C; 217E; # ROMAN NUMERAL FIVE HUNDRED
          913  +216F; C; 217F; # ROMAN NUMERAL ONE THOUSAND
          914  +2183; C; 2184; # ROMAN NUMERAL REVERSED ONE HUNDRED
          915  +24B6; C; 24D0; # CIRCLED LATIN CAPITAL LETTER A
          916  +24B7; C; 24D1; # CIRCLED LATIN CAPITAL LETTER B
          917  +24B8; C; 24D2; # CIRCLED LATIN CAPITAL LETTER C
          918  +24B9; C; 24D3; # CIRCLED LATIN CAPITAL LETTER D
          919  +24BA; C; 24D4; # CIRCLED LATIN CAPITAL LETTER E
          920  +24BB; C; 24D5; # CIRCLED LATIN CAPITAL LETTER F
          921  +24BC; C; 24D6; # CIRCLED LATIN CAPITAL LETTER G
          922  +24BD; C; 24D7; # CIRCLED LATIN CAPITAL LETTER H
          923  +24BE; C; 24D8; # CIRCLED LATIN CAPITAL LETTER I
          924  +24BF; C; 24D9; # CIRCLED LATIN CAPITAL LETTER J
          925  +24C0; C; 24DA; # CIRCLED LATIN CAPITAL LETTER K
          926  +24C1; C; 24DB; # CIRCLED LATIN CAPITAL LETTER L
          927  +24C2; C; 24DC; # CIRCLED LATIN CAPITAL LETTER M
          928  +24C3; C; 24DD; # CIRCLED LATIN CAPITAL LETTER N
          929  +24C4; C; 24DE; # CIRCLED LATIN CAPITAL LETTER O
          930  +24C5; C; 24DF; # CIRCLED LATIN CAPITAL LETTER P
          931  +24C6; C; 24E0; # CIRCLED LATIN CAPITAL LETTER Q
          932  +24C7; C; 24E1; # CIRCLED LATIN CAPITAL LETTER R
          933  +24C8; C; 24E2; # CIRCLED LATIN CAPITAL LETTER S
          934  +24C9; C; 24E3; # CIRCLED LATIN CAPITAL LETTER T
          935  +24CA; C; 24E4; # CIRCLED LATIN CAPITAL LETTER U
          936  +24CB; C; 24E5; # CIRCLED LATIN CAPITAL LETTER V
          937  +24CC; C; 24E6; # CIRCLED LATIN CAPITAL LETTER W
          938  +24CD; C; 24E7; # CIRCLED LATIN CAPITAL LETTER X
          939  +24CE; C; 24E8; # CIRCLED LATIN CAPITAL LETTER Y
          940  +24CF; C; 24E9; # CIRCLED LATIN CAPITAL LETTER Z
          941  +2C00; C; 2C30; # GLAGOLITIC CAPITAL LETTER AZU
          942  +2C01; C; 2C31; # GLAGOLITIC CAPITAL LETTER BUKY
          943  +2C02; C; 2C32; # GLAGOLITIC CAPITAL LETTER VEDE
          944  +2C03; C; 2C33; # GLAGOLITIC CAPITAL LETTER GLAGOLI
          945  +2C04; C; 2C34; # GLAGOLITIC CAPITAL LETTER DOBRO
          946  +2C05; C; 2C35; # GLAGOLITIC CAPITAL LETTER YESTU
          947  +2C06; C; 2C36; # GLAGOLITIC CAPITAL LETTER ZHIVETE
          948  +2C07; C; 2C37; # GLAGOLITIC CAPITAL LETTER DZELO
          949  +2C08; C; 2C38; # GLAGOLITIC CAPITAL LETTER ZEMLJA
          950  +2C09; C; 2C39; # GLAGOLITIC CAPITAL LETTER IZHE
          951  +2C0A; C; 2C3A; # GLAGOLITIC CAPITAL LETTER INITIAL IZHE
          952  +2C0B; C; 2C3B; # GLAGOLITIC CAPITAL LETTER I
          953  +2C0C; C; 2C3C; # GLAGOLITIC CAPITAL LETTER DJERVI
          954  +2C0D; C; 2C3D; # GLAGOLITIC CAPITAL LETTER KAKO
          955  +2C0E; C; 2C3E; # GLAGOLITIC CAPITAL LETTER LJUDIJE
          956  +2C0F; C; 2C3F; # GLAGOLITIC CAPITAL LETTER MYSLITE
          957  +2C10; C; 2C40; # GLAGOLITIC CAPITAL LETTER NASHI
          958  +2C11; C; 2C41; # GLAGOLITIC CAPITAL LETTER ONU
          959  +2C12; C; 2C42; # GLAGOLITIC CAPITAL LETTER POKOJI
          960  +2C13; C; 2C43; # GLAGOLITIC CAPITAL LETTER RITSI
          961  +2C14; C; 2C44; # GLAGOLITIC CAPITAL LETTER SLOVO
          962  +2C15; C; 2C45; # GLAGOLITIC CAPITAL LETTER TVRIDO
          963  +2C16; C; 2C46; # GLAGOLITIC CAPITAL LETTER UKU
          964  +2C17; C; 2C47; # GLAGOLITIC CAPITAL LETTER FRITU
          965  +2C18; C; 2C48; # GLAGOLITIC CAPITAL LETTER HERU
          966  +2C19; C; 2C49; # GLAGOLITIC CAPITAL LETTER OTU
          967  +2C1A; C; 2C4A; # GLAGOLITIC CAPITAL LETTER PE
          968  +2C1B; C; 2C4B; # GLAGOLITIC CAPITAL LETTER SHTA
          969  +2C1C; C; 2C4C; # GLAGOLITIC CAPITAL LETTER TSI
          970  +2C1D; C; 2C4D; # GLAGOLITIC CAPITAL LETTER CHRIVI
          971  +2C1E; C; 2C4E; # GLAGOLITIC CAPITAL LETTER SHA
          972  +2C1F; C; 2C4F; # GLAGOLITIC CAPITAL LETTER YERU
          973  +2C20; C; 2C50; # GLAGOLITIC CAPITAL LETTER YERI
          974  +2C21; C; 2C51; # GLAGOLITIC CAPITAL LETTER YATI
          975  +2C22; C; 2C52; # GLAGOLITIC CAPITAL LETTER SPIDERY HA
          976  +2C23; C; 2C53; # GLAGOLITIC CAPITAL LETTER YU
          977  +2C24; C; 2C54; # GLAGOLITIC CAPITAL LETTER SMALL YUS
          978  +2C25; C; 2C55; # GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL
          979  +2C26; C; 2C56; # GLAGOLITIC CAPITAL LETTER YO
          980  +2C27; C; 2C57; # GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS
          981  +2C28; C; 2C58; # GLAGOLITIC CAPITAL LETTER BIG YUS
          982  +2C29; C; 2C59; # GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS
          983  +2C2A; C; 2C5A; # GLAGOLITIC CAPITAL LETTER FITA
          984  +2C2B; C; 2C5B; # GLAGOLITIC CAPITAL LETTER IZHITSA
          985  +2C2C; C; 2C5C; # GLAGOLITIC CAPITAL LETTER SHTAPIC
          986  +2C2D; C; 2C5D; # GLAGOLITIC CAPITAL LETTER TROKUTASTI A
          987  +2C2E; C; 2C5E; # GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE
          988  +2C60; C; 2C61; # LATIN CAPITAL LETTER L WITH DOUBLE BAR
          989  +2C62; C; 026B; # LATIN CAPITAL LETTER L WITH MIDDLE TILDE
          990  +2C63; C; 1D7D; # LATIN CAPITAL LETTER P WITH STROKE
          991  +2C64; C; 027D; # LATIN CAPITAL LETTER R WITH TAIL
          992  +2C67; C; 2C68; # LATIN CAPITAL LETTER H WITH DESCENDER
          993  +2C69; C; 2C6A; # LATIN CAPITAL LETTER K WITH DESCENDER
          994  +2C6B; C; 2C6C; # LATIN CAPITAL LETTER Z WITH DESCENDER
          995  +2C6D; C; 0251; # LATIN CAPITAL LETTER ALPHA
          996  +2C6E; C; 0271; # LATIN CAPITAL LETTER M WITH HOOK
          997  +2C6F; C; 0250; # LATIN CAPITAL LETTER TURNED A
          998  +2C70; C; 0252; # LATIN CAPITAL LETTER TURNED ALPHA
          999  +2C72; C; 2C73; # LATIN CAPITAL LETTER W WITH HOOK
         1000  +2C75; C; 2C76; # LATIN CAPITAL LETTER HALF H
         1001  +2C7E; C; 023F; # LATIN CAPITAL LETTER S WITH SWASH TAIL
         1002  +2C7F; C; 0240; # LATIN CAPITAL LETTER Z WITH SWASH TAIL
         1003  +2C80; C; 2C81; # COPTIC CAPITAL LETTER ALFA
         1004  +2C82; C; 2C83; # COPTIC CAPITAL LETTER VIDA
         1005  +2C84; C; 2C85; # COPTIC CAPITAL LETTER GAMMA
         1006  +2C86; C; 2C87; # COPTIC CAPITAL LETTER DALDA
         1007  +2C88; C; 2C89; # COPTIC CAPITAL LETTER EIE
         1008  +2C8A; C; 2C8B; # COPTIC CAPITAL LETTER SOU
         1009  +2C8C; C; 2C8D; # COPTIC CAPITAL LETTER ZATA
         1010  +2C8E; C; 2C8F; # COPTIC CAPITAL LETTER HATE
         1011  +2C90; C; 2C91; # COPTIC CAPITAL LETTER THETHE
         1012  +2C92; C; 2C93; # COPTIC CAPITAL LETTER IAUDA
         1013  +2C94; C; 2C95; # COPTIC CAPITAL LETTER KAPA
         1014  +2C96; C; 2C97; # COPTIC CAPITAL LETTER LAULA
         1015  +2C98; C; 2C99; # COPTIC CAPITAL LETTER MI
         1016  +2C9A; C; 2C9B; # COPTIC CAPITAL LETTER NI
         1017  +2C9C; C; 2C9D; # COPTIC CAPITAL LETTER KSI
         1018  +2C9E; C; 2C9F; # COPTIC CAPITAL LETTER O
         1019  +2CA0; C; 2CA1; # COPTIC CAPITAL LETTER PI
         1020  +2CA2; C; 2CA3; # COPTIC CAPITAL LETTER RO
         1021  +2CA4; C; 2CA5; # COPTIC CAPITAL LETTER SIMA
         1022  +2CA6; C; 2CA7; # COPTIC CAPITAL LETTER TAU
         1023  +2CA8; C; 2CA9; # COPTIC CAPITAL LETTER UA
         1024  +2CAA; C; 2CAB; # COPTIC CAPITAL LETTER FI
         1025  +2CAC; C; 2CAD; # COPTIC CAPITAL LETTER KHI
         1026  +2CAE; C; 2CAF; # COPTIC CAPITAL LETTER PSI
         1027  +2CB0; C; 2CB1; # COPTIC CAPITAL LETTER OOU
         1028  +2CB2; C; 2CB3; # COPTIC CAPITAL LETTER DIALECT-P ALEF
         1029  +2CB4; C; 2CB5; # COPTIC CAPITAL LETTER OLD COPTIC AIN
         1030  +2CB6; C; 2CB7; # COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE
         1031  +2CB8; C; 2CB9; # COPTIC CAPITAL LETTER DIALECT-P KAPA
         1032  +2CBA; C; 2CBB; # COPTIC CAPITAL LETTER DIALECT-P NI
         1033  +2CBC; C; 2CBD; # COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI
         1034  +2CBE; C; 2CBF; # COPTIC CAPITAL LETTER OLD COPTIC OOU
         1035  +2CC0; C; 2CC1; # COPTIC CAPITAL LETTER SAMPI
         1036  +2CC2; C; 2CC3; # COPTIC CAPITAL LETTER CROSSED SHEI
         1037  +2CC4; C; 2CC5; # COPTIC CAPITAL LETTER OLD COPTIC SHEI
         1038  +2CC6; C; 2CC7; # COPTIC CAPITAL LETTER OLD COPTIC ESH
         1039  +2CC8; C; 2CC9; # COPTIC CAPITAL LETTER AKHMIMIC KHEI
         1040  +2CCA; C; 2CCB; # COPTIC CAPITAL LETTER DIALECT-P HORI
         1041  +2CCC; C; 2CCD; # COPTIC CAPITAL LETTER OLD COPTIC HORI
         1042  +2CCE; C; 2CCF; # COPTIC CAPITAL LETTER OLD COPTIC HA
         1043  +2CD0; C; 2CD1; # COPTIC CAPITAL LETTER L-SHAPED HA
         1044  +2CD2; C; 2CD3; # COPTIC CAPITAL LETTER OLD COPTIC HEI
         1045  +2CD4; C; 2CD5; # COPTIC CAPITAL LETTER OLD COPTIC HAT
         1046  +2CD6; C; 2CD7; # COPTIC CAPITAL LETTER OLD COPTIC GANGIA
         1047  +2CD8; C; 2CD9; # COPTIC CAPITAL LETTER OLD COPTIC DJA
         1048  +2CDA; C; 2CDB; # COPTIC CAPITAL LETTER OLD COPTIC SHIMA
         1049  +2CDC; C; 2CDD; # COPTIC CAPITAL LETTER OLD NUBIAN SHIMA
         1050  +2CDE; C; 2CDF; # COPTIC CAPITAL LETTER OLD NUBIAN NGI
         1051  +2CE0; C; 2CE1; # COPTIC CAPITAL LETTER OLD NUBIAN NYI
         1052  +2CE2; C; 2CE3; # COPTIC CAPITAL LETTER OLD NUBIAN WAU
         1053  +2CEB; C; 2CEC; # COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI
         1054  +2CED; C; 2CEE; # COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA
         1055  +2CF2; C; 2CF3; # COPTIC CAPITAL LETTER BOHAIRIC KHEI
         1056  +A640; C; A641; # CYRILLIC CAPITAL LETTER ZEMLYA
         1057  +A642; C; A643; # CYRILLIC CAPITAL LETTER DZELO
         1058  +A644; C; A645; # CYRILLIC CAPITAL LETTER REVERSED DZE
         1059  +A646; C; A647; # CYRILLIC CAPITAL LETTER IOTA
         1060  +A648; C; A649; # CYRILLIC CAPITAL LETTER DJERV
         1061  +A64A; C; A64B; # CYRILLIC CAPITAL LETTER MONOGRAPH UK
         1062  +A64C; C; A64D; # CYRILLIC CAPITAL LETTER BROAD OMEGA
         1063  +A64E; C; A64F; # CYRILLIC CAPITAL LETTER NEUTRAL YER
         1064  +A650; C; A651; # CYRILLIC CAPITAL LETTER YERU WITH BACK YER
         1065  +A652; C; A653; # CYRILLIC CAPITAL LETTER IOTIFIED YAT
         1066  +A654; C; A655; # CYRILLIC CAPITAL LETTER REVERSED YU
         1067  +A656; C; A657; # CYRILLIC CAPITAL LETTER IOTIFIED A
         1068  +A658; C; A659; # CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS
         1069  +A65A; C; A65B; # CYRILLIC CAPITAL LETTER BLENDED YUS
         1070  +A65C; C; A65D; # CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS
         1071  +A65E; C; A65F; # CYRILLIC CAPITAL LETTER YN
         1072  +A660; C; A661; # CYRILLIC CAPITAL LETTER REVERSED TSE
         1073  +A662; C; A663; # CYRILLIC CAPITAL LETTER SOFT DE
         1074  +A664; C; A665; # CYRILLIC CAPITAL LETTER SOFT EL
         1075  +A666; C; A667; # CYRILLIC CAPITAL LETTER SOFT EM
         1076  +A668; C; A669; # CYRILLIC CAPITAL LETTER MONOCULAR O
         1077  +A66A; C; A66B; # CYRILLIC CAPITAL LETTER BINOCULAR O
         1078  +A66C; C; A66D; # CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O
         1079  +A680; C; A681; # CYRILLIC CAPITAL LETTER DWE
         1080  +A682; C; A683; # CYRILLIC CAPITAL LETTER DZWE
         1081  +A684; C; A685; # CYRILLIC CAPITAL LETTER ZHWE
         1082  +A686; C; A687; # CYRILLIC CAPITAL LETTER CCHE
         1083  +A688; C; A689; # CYRILLIC CAPITAL LETTER DZZE
         1084  +A68A; C; A68B; # CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK
         1085  +A68C; C; A68D; # CYRILLIC CAPITAL LETTER TWE
         1086  +A68E; C; A68F; # CYRILLIC CAPITAL LETTER TSWE
         1087  +A690; C; A691; # CYRILLIC CAPITAL LETTER TSSE
         1088  +A692; C; A693; # CYRILLIC CAPITAL LETTER TCHE
         1089  +A694; C; A695; # CYRILLIC CAPITAL LETTER HWE
         1090  +A696; C; A697; # CYRILLIC CAPITAL LETTER SHWE
         1091  +A722; C; A723; # LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF
         1092  +A724; C; A725; # LATIN CAPITAL LETTER EGYPTOLOGICAL AIN
         1093  +A726; C; A727; # LATIN CAPITAL LETTER HENG
         1094  +A728; C; A729; # LATIN CAPITAL LETTER TZ
         1095  +A72A; C; A72B; # LATIN CAPITAL LETTER TRESILLO
         1096  +A72C; C; A72D; # LATIN CAPITAL LETTER CUATRILLO
         1097  +A72E; C; A72F; # LATIN CAPITAL LETTER CUATRILLO WITH COMMA
         1098  +A732; C; A733; # LATIN CAPITAL LETTER AA
         1099  +A734; C; A735; # LATIN CAPITAL LETTER AO
         1100  +A736; C; A737; # LATIN CAPITAL LETTER AU
         1101  +A738; C; A739; # LATIN CAPITAL LETTER AV
         1102  +A73A; C; A73B; # LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR
         1103  +A73C; C; A73D; # LATIN CAPITAL LETTER AY
         1104  +A73E; C; A73F; # LATIN CAPITAL LETTER REVERSED C WITH DOT
         1105  +A740; C; A741; # LATIN CAPITAL LETTER K WITH STROKE
         1106  +A742; C; A743; # LATIN CAPITAL LETTER K WITH DIAGONAL STROKE
         1107  +A744; C; A745; # LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE
         1108  +A746; C; A747; # LATIN CAPITAL LETTER BROKEN L
         1109  +A748; C; A749; # LATIN CAPITAL LETTER L WITH HIGH STROKE
         1110  +A74A; C; A74B; # LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY
         1111  +A74C; C; A74D; # LATIN CAPITAL LETTER O WITH LOOP
         1112  +A74E; C; A74F; # LATIN CAPITAL LETTER OO
         1113  +A750; C; A751; # LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER
         1114  +A752; C; A753; # LATIN CAPITAL LETTER P WITH FLOURISH
         1115  +A754; C; A755; # LATIN CAPITAL LETTER P WITH SQUIRREL TAIL
         1116  +A756; C; A757; # LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER
         1117  +A758; C; A759; # LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE
         1118  +A75A; C; A75B; # LATIN CAPITAL LETTER R ROTUNDA
         1119  +A75C; C; A75D; # LATIN CAPITAL LETTER RUM ROTUNDA
         1120  +A75E; C; A75F; # LATIN CAPITAL LETTER V WITH DIAGONAL STROKE
         1121  +A760; C; A761; # LATIN CAPITAL LETTER VY
         1122  +A762; C; A763; # LATIN CAPITAL LETTER VISIGOTHIC Z
         1123  +A764; C; A765; # LATIN CAPITAL LETTER THORN WITH STROKE
         1124  +A766; C; A767; # LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER
         1125  +A768; C; A769; # LATIN CAPITAL LETTER VEND
         1126  +A76A; C; A76B; # LATIN CAPITAL LETTER ET
         1127  +A76C; C; A76D; # LATIN CAPITAL LETTER IS
         1128  +A76E; C; A76F; # LATIN CAPITAL LETTER CON
         1129  +A779; C; A77A; # LATIN CAPITAL LETTER INSULAR D
         1130  +A77B; C; A77C; # LATIN CAPITAL LETTER INSULAR F
         1131  +A77D; C; 1D79; # LATIN CAPITAL LETTER INSULAR G
         1132  +A77E; C; A77F; # LATIN CAPITAL LETTER TURNED INSULAR G
         1133  +A780; C; A781; # LATIN CAPITAL LETTER TURNED L
         1134  +A782; C; A783; # LATIN CAPITAL LETTER INSULAR R
         1135  +A784; C; A785; # LATIN CAPITAL LETTER INSULAR S
         1136  +A786; C; A787; # LATIN CAPITAL LETTER INSULAR T
         1137  +A78B; C; A78C; # LATIN CAPITAL LETTER SALTILLO
         1138  +A78D; C; 0265; # LATIN CAPITAL LETTER TURNED H
         1139  +A790; C; A791; # LATIN CAPITAL LETTER N WITH DESCENDER
         1140  +A792; C; A793; # LATIN CAPITAL LETTER C WITH BAR
         1141  +A7A0; C; A7A1; # LATIN CAPITAL LETTER G WITH OBLIQUE STROKE
         1142  +A7A2; C; A7A3; # LATIN CAPITAL LETTER K WITH OBLIQUE STROKE
         1143  +A7A4; C; A7A5; # LATIN CAPITAL LETTER N WITH OBLIQUE STROKE
         1144  +A7A6; C; A7A7; # LATIN CAPITAL LETTER R WITH OBLIQUE STROKE
         1145  +A7A8; C; A7A9; # LATIN CAPITAL LETTER S WITH OBLIQUE STROKE
         1146  +A7AA; C; 0266; # LATIN CAPITAL LETTER H WITH HOOK
         1147  +FB00; F; 0066 0066; # LATIN SMALL LIGATURE FF
         1148  +FB01; F; 0066 0069; # LATIN SMALL LIGATURE FI
         1149  +FB02; F; 0066 006C; # LATIN SMALL LIGATURE FL
         1150  +FB03; F; 0066 0066 0069; # LATIN SMALL LIGATURE FFI
         1151  +FB04; F; 0066 0066 006C; # LATIN SMALL LIGATURE FFL
         1152  +FB05; F; 0073 0074; # LATIN SMALL LIGATURE LONG S T
         1153  +FB06; F; 0073 0074; # LATIN SMALL LIGATURE ST
         1154  +FB13; F; 0574 0576; # ARMENIAN SMALL LIGATURE MEN NOW
         1155  +FB14; F; 0574 0565; # ARMENIAN SMALL LIGATURE MEN ECH
         1156  +FB15; F; 0574 056B; # ARMENIAN SMALL LIGATURE MEN INI
         1157  +FB16; F; 057E 0576; # ARMENIAN SMALL LIGATURE VEW NOW
         1158  +FB17; F; 0574 056D; # ARMENIAN SMALL LIGATURE MEN XEH
         1159  +FF21; C; FF41; # FULLWIDTH LATIN CAPITAL LETTER A
         1160  +FF22; C; FF42; # FULLWIDTH LATIN CAPITAL LETTER B
         1161  +FF23; C; FF43; # FULLWIDTH LATIN CAPITAL LETTER C
         1162  +FF24; C; FF44; # FULLWIDTH LATIN CAPITAL LETTER D
         1163  +FF25; C; FF45; # FULLWIDTH LATIN CAPITAL LETTER E
         1164  +FF26; C; FF46; # FULLWIDTH LATIN CAPITAL LETTER F
         1165  +FF27; C; FF47; # FULLWIDTH LATIN CAPITAL LETTER G
         1166  +FF28; C; FF48; # FULLWIDTH LATIN CAPITAL LETTER H
         1167  +FF29; C; FF49; # FULLWIDTH LATIN CAPITAL LETTER I
         1168  +FF2A; C; FF4A; # FULLWIDTH LATIN CAPITAL LETTER J
         1169  +FF2B; C; FF4B; # FULLWIDTH LATIN CAPITAL LETTER K
         1170  +FF2C; C; FF4C; # FULLWIDTH LATIN CAPITAL LETTER L
         1171  +FF2D; C; FF4D; # FULLWIDTH LATIN CAPITAL LETTER M
         1172  +FF2E; C; FF4E; # FULLWIDTH LATIN CAPITAL LETTER N
         1173  +FF2F; C; FF4F; # FULLWIDTH LATIN CAPITAL LETTER O
         1174  +FF30; C; FF50; # FULLWIDTH LATIN CAPITAL LETTER P
         1175  +FF31; C; FF51; # FULLWIDTH LATIN CAPITAL LETTER Q
         1176  +FF32; C; FF52; # FULLWIDTH LATIN CAPITAL LETTER R
         1177  +FF33; C; FF53; # FULLWIDTH LATIN CAPITAL LETTER S
         1178  +FF34; C; FF54; # FULLWIDTH LATIN CAPITAL LETTER T
         1179  +FF35; C; FF55; # FULLWIDTH LATIN CAPITAL LETTER U
         1180  +FF36; C; FF56; # FULLWIDTH LATIN CAPITAL LETTER V
         1181  +FF37; C; FF57; # FULLWIDTH LATIN CAPITAL LETTER W
         1182  +FF38; C; FF58; # FULLWIDTH LATIN CAPITAL LETTER X
         1183  +FF39; C; FF59; # FULLWIDTH LATIN CAPITAL LETTER Y
         1184  +FF3A; C; FF5A; # FULLWIDTH LATIN CAPITAL LETTER Z
         1185  +10400; C; 10428; # DESERET CAPITAL LETTER LONG I
         1186  +10401; C; 10429; # DESERET CAPITAL LETTER LONG E
         1187  +10402; C; 1042A; # DESERET CAPITAL LETTER LONG A
         1188  +10403; C; 1042B; # DESERET CAPITAL LETTER LONG AH
         1189  +10404; C; 1042C; # DESERET CAPITAL LETTER LONG O
         1190  +10405; C; 1042D; # DESERET CAPITAL LETTER LONG OO
         1191  +10406; C; 1042E; # DESERET CAPITAL LETTER SHORT I
         1192  +10407; C; 1042F; # DESERET CAPITAL LETTER SHORT E
         1193  +10408; C; 10430; # DESERET CAPITAL LETTER SHORT A
         1194  +10409; C; 10431; # DESERET CAPITAL LETTER SHORT AH
         1195  +1040A; C; 10432; # DESERET CAPITAL LETTER SHORT O
         1196  +1040B; C; 10433; # DESERET CAPITAL LETTER SHORT OO
         1197  +1040C; C; 10434; # DESERET CAPITAL LETTER AY
         1198  +1040D; C; 10435; # DESERET CAPITAL LETTER OW
         1199  +1040E; C; 10436; # DESERET CAPITAL LETTER WU
         1200  +1040F; C; 10437; # DESERET CAPITAL LETTER YEE
         1201  +10410; C; 10438; # DESERET CAPITAL LETTER H
         1202  +10411; C; 10439; # DESERET CAPITAL LETTER PEE
         1203  +10412; C; 1043A; # DESERET CAPITAL LETTER BEE
         1204  +10413; C; 1043B; # DESERET CAPITAL LETTER TEE
         1205  +10414; C; 1043C; # DESERET CAPITAL LETTER DEE
         1206  +10415; C; 1043D; # DESERET CAPITAL LETTER CHEE
         1207  +10416; C; 1043E; # DESERET CAPITAL LETTER JEE
         1208  +10417; C; 1043F; # DESERET CAPITAL LETTER KAY
         1209  +10418; C; 10440; # DESERET CAPITAL LETTER GAY
         1210  +10419; C; 10441; # DESERET CAPITAL LETTER EF
         1211  +1041A; C; 10442; # DESERET CAPITAL LETTER VEE
         1212  +1041B; C; 10443; # DESERET CAPITAL LETTER ETH
         1213  +1041C; C; 10444; # DESERET CAPITAL LETTER THEE
         1214  +1041D; C; 10445; # DESERET CAPITAL LETTER ES
         1215  +1041E; C; 10446; # DESERET CAPITAL LETTER ZEE
         1216  +1041F; C; 10447; # DESERET CAPITAL LETTER ESH
         1217  +10420; C; 10448; # DESERET CAPITAL LETTER ZHEE
         1218  +10421; C; 10449; # DESERET CAPITAL LETTER ER
         1219  +10422; C; 1044A; # DESERET CAPITAL LETTER EL
         1220  +10423; C; 1044B; # DESERET CAPITAL LETTER EM
         1221  +10424; C; 1044C; # DESERET CAPITAL LETTER EN
         1222  +10425; C; 1044D; # DESERET CAPITAL LETTER ENG
         1223  +10426; C; 1044E; # DESERET CAPITAL LETTER OI
         1224  +10427; C; 1044F; # DESERET CAPITAL LETTER EW

Added ext/fts3/unicode/UnicodeData.txt.

more than 10,000 changes

Added ext/fts3/unicode/mkunicode.tcl.

            1  +
            2  +
            3  +# Parameter $zName must be a path to the file UnicodeData.txt. This command
            4  +# reads the file and returns a list of codepoints (integers). The list
            5  +# contains all codepoints in the UnicodeData.txt assigned to any "General
            6  +# Category" that is not a "Letter" or "Number".
            7  +#
            8  +proc an_load_unicodedata_text {zName} {
            9  +  set fd [open $zName]
           10  +  set lField {
           11  +    code
           12  +    character_name
           13  +    general_category
           14  +    canonical_combining_classes
           15  +    bidirectional_category
           16  +    character_decomposition_mapping
           17  +    decimal_digit_value
           18  +    digit_value
           19  +    numeric_value
           20  +    mirrored
           21  +    unicode_1_name
           22  +    iso10646_comment_field
           23  +    uppercase_mapping
           24  +    lowercase_mapping
           25  +    titlecase_mapping
           26  +  }
           27  +  set lRet [list]
           28  +
           29  +  while { ![eof $fd] } {
           30  +    set line [gets $fd]
           31  +    if {$line == ""} continue
           32  +
           33  +    set fields [split $line ";"]
           34  +    if {[llength $fields] != [llength $lField]} { error "parse error: $line" }
           35  +    foreach $lField $fields {}
           36  +
           37  +    set iCode [expr "0x$code"]
           38  +    set bAlnum [expr {[lsearch {L N} [string range $general_category 0 0]]>=0}]
           39  +
           40  +    if { !$bAlnum } { lappend lRet $iCode }
           41  +  }
           42  +
           43  +  close $fd
           44  +  set lRet
           45  +}
           46  +
           47  +proc an_load_separator_ranges {} {
           48  +  global unicodedata.txt
           49  +  set lSep [an_load_unicodedata_text ${unicodedata.txt}]
           50  +  unset -nocomplain iFirst 
           51  +  unset -nocomplain nRange 
           52  +  set lRange [list]
           53  +  foreach sep $lSep {
           54  +    if {0==[info exists iFirst]} {
           55  +      set iFirst $sep
           56  +      set nRange 1
           57  +    } elseif { $sep == ($iFirst+$nRange) } {
           58  +      incr nRange
           59  +    } else {
           60  +      lappend lRange [list $iFirst $nRange]
           61  +      set iFirst $sep
           62  +      set nRange 1
           63  +    }
           64  +  } 
           65  +  lappend lRange [list $iFirst $nRange]
           66  +  set lRange
           67  +}
           68  +
           69  +proc an_print_range_array {lRange} {
           70  +  set iFirstMax 0
           71  +  set nRangeMax 0
           72  +  foreach range $lRange {
           73  +    foreach {iFirst nRange} $range {}
           74  +    if {$iFirst > $iFirstMax} {set iFirstMax $iFirst}
           75  +    if {$nRange > $nRangeMax} {set nRangeMax $nRange}
           76  +  }
           77  +  if {$iFirstMax >= (1<<22)} {error "first-max is too large for format"}
           78  +  if {$nRangeMax >= (1<<10)} {error "range-max is too large for format"}
           79  +
           80  +  puts -nonewline "  "
           81  +  puts [string trim {
           82  +  /* Each unsigned integer in the following array corresponds to a contiguous
           83  +  ** range of unicode codepoints that are not either letters or numbers (i.e.
           84  +  ** codepoints for which this function should return 0).
           85  +  **
           86  +  ** The most significant 22 bits in each 32-bit value contain the first 
           87  +  ** codepoint in the range. The least significant 10 bits are used to store
           88  +  ** the size of the range (always at least 1). In other words, the value 
           89  +  ** ((C<<22) + N) represents a range of N codepoints starting with codepoint 
           90  +  ** C. It is not possible to represent a range larger than 1023 codepoints 
           91  +  ** using this format.
           92  +  */
           93  +  }]
           94  +  puts -nonewline "  const static unsigned int aEntry\[\] = \{"
           95  +  set i 0
           96  +  foreach range $lRange {
           97  +    foreach {iFirst nRange} $range {}
           98  +    set u32 [format "0x%08X" [expr ($iFirst<<10) + $nRange]]
           99  +
          100  +    if {($i % 5)==0} {puts "" ; puts -nonewline "   "}
          101  +    puts -nonewline " $u32,"
          102  +    incr i
          103  +  }
          104  +  puts ""
          105  +  puts "  \};"
          106  +}
          107  +
          108  +proc an_print_ascii_bitmap {lRange} {
          109  +  foreach range $lRange {
          110  +    foreach {iFirst nRange} $range {}
          111  +    for {set i $iFirst} {$i < ($iFirst+$nRange)} {incr i} {
          112  +      if {$i<=127} { set a($i) 1 }
          113  +    }
          114  +  }
          115  +
          116  +  set aAscii [list 0 0 0 0]
          117  +  foreach key [array names a] {
          118  +    set idx [expr $key >> 5]
          119  +    lset aAscii $idx [expr [lindex $aAscii $idx] | (1 << ($key&0x001F))]
          120  +  }
          121  +
          122  +  puts "  static const unsigned int aAscii\[4\] = \{"
          123  +  puts -nonewline "   "
          124  +  foreach v $aAscii { puts -nonewline [format " 0x%08X," $v] }
          125  +  puts ""
          126  +  puts "  \};"
          127  +}
          128  +
          129  +proc print_isalnum {zFunc lRange} {
          130  +  puts "/*"
          131  +  puts "** Return true if the argument corresponds to a unicode codepoint"
          132  +  puts "** classified as either a letter or a number. Otherwise false."
          133  +  puts "**"
          134  +  puts "** The results are undefined if the value passed to this function"
          135  +  puts "** is less than zero."
          136  +  puts "*/"
          137  +  puts "int ${zFunc}\(int c)\{"
          138  +  an_print_range_array $lRange
          139  +  an_print_ascii_bitmap $lRange
          140  +  puts {
          141  +  if( c<128 ){
          142  +    return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 );
          143  +  }else if( c<(1<<22) ){
          144  +    unsigned int key = (((unsigned int)c)<<10) | 0x000003FF;
          145  +    int iRes;
          146  +    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
          147  +    int iLo = 0;
          148  +    while( iHi>=iLo ){
          149  +      int iTest = (iHi + iLo) / 2;
          150  +      if( key >= aEntry[iTest] ){
          151  +        iRes = iTest;
          152  +        iLo = iTest+1;
          153  +      }else{
          154  +        iHi = iTest-1;
          155  +      }
          156  +    }
          157  +    assert( aEntry[0]<key );
          158  +    assert( key>=aEntry[iRes] );
          159  +    return (c >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));
          160  +  }
          161  +  return 1;}
          162  +  puts "\}"
          163  +}
          164  +
          165  +proc print_test_isalnum {zFunc lRange} {
          166  +  foreach range $lRange {
          167  +    foreach {iFirst nRange} $range {}
          168  +    for {set i $iFirst} {$i < ($iFirst+$nRange)} {incr i} { set a($i) 1 }
          169  +  }
          170  +
          171  +  puts "static int isalnum_test(int *piCode)\{"
          172  +  puts -nonewline "  unsigned char aAlnum\[\] = \{"
          173  +  for {set i 0} {$i < 70000} {incr i} {
          174  +    if {($i % 32)==0} { puts "" ; puts -nonewline "    " }
          175  +    set bFlag [expr ![info exists a($i)]]
          176  +    puts -nonewline "${bFlag},"
          177  +  }
          178  +  puts ""
          179  +  puts "  \};"
          180  +
          181  +  puts -nonewline "  int aLargeSep\[\] = \{"
          182  +  set i 0
          183  +  foreach iSep [lsort -integer [array names a]] {
          184  +    if {$iSep<70000} continue
          185  +    if {($i % 8)==0} { puts "" ; puts -nonewline "   " }
          186  +    puts -nonewline " $iSep,"
          187  +    incr i
          188  +  }
          189  +  puts ""
          190  +  puts "  \};"
          191  +  puts -nonewline "  int aLargeOther\[\] = \{"
          192  +  set i 0
          193  +  foreach iSep [lsort -integer [array names a]] {
          194  +    if {$iSep<70000} continue
          195  +    if {[info exists a([expr $iSep-1])]==0} {
          196  +      if {($i % 8)==0} { puts "" ; puts -nonewline "   " }
          197  +      puts -nonewline " [expr $iSep-1],"
          198  +      incr i
          199  +    }
          200  +    if {[info exists a([expr $iSep+1])]==0} {
          201  +      if {($i % 8)==0} { puts "" ; puts -nonewline "   " }
          202  +      puts -nonewline " [expr $iSep+1],"
          203  +      incr i
          204  +    }
          205  +  }
          206  +  puts ""
          207  +  puts "  \};"
          208  +
          209  +  puts [subst -nocommands {
          210  +  int i;
          211  +  for(i=0; i<sizeof(aAlnum)/sizeof(aAlnum[0]); i++){
          212  +    if( ${zFunc}(i)!=aAlnum[i] ){
          213  +      *piCode = i;
          214  +      return 1;
          215  +    }
          216  +  }
          217  +  for(i=0; i<sizeof(aLargeSep)/sizeof(aLargeSep[0]); i++){
          218  +    if( ${zFunc}(aLargeSep[i])!=0 ){
          219  +      *piCode = aLargeSep[i];
          220  +      return 1;
          221  +    }
          222  +  }
          223  +  for(i=0; i<sizeof(aLargeOther)/sizeof(aLargeOther[0]); i++){
          224  +    if( ${zFunc}(aLargeOther[i])!=1 ){
          225  +      *piCode = aLargeOther[i];
          226  +      return 1;
          227  +    }
          228  +  }
          229  +  }]
          230  +  puts "  return 0;"
          231  +  puts "\}"
          232  +}
          233  +
          234  +#-------------------------------------------------------------------------
          235  +
          236  +proc tl_load_casefolding_txt {zName} {
          237  +  global tl_lookup_table
          238  +
          239  +  set fd [open $zName]
          240  +  while { ![eof $fd] } {
          241  +    set line [gets $fd]
          242  +    if {[string range $line 0 0] == "#"} continue
          243  +    if {$line == ""} continue
          244  +
          245  +    foreach x {a b c d} {unset -nocomplain $x}
          246  +    foreach {a b c d} [split $line ";"] {}
          247  +
          248  +    set a2 [list]
          249  +    set c2 [list]
          250  +    foreach elem $a { lappend a2 [expr "0x[string trim $elem]"] }
          251  +    foreach elem $c { lappend c2 [expr "0x[string trim $elem]"] }
          252  +    set b [string trim $b]
          253  +    set d [string trim $d]
          254  +
          255  +    if {$b=="C" || $b=="S"} { set tl_lookup_table($a2) $c2 }
          256  +  }
          257  +}
          258  +
          259  +proc tl_create_records {} {
          260  +  global tl_lookup_table
          261  +
          262  +  set iFirst ""
          263  +  set nOff 0
          264  +  set nRange 0
          265  +  set nIncr 0
          266  +
          267  +  set lRecord [list]
          268  +  foreach code [lsort -integer [array names tl_lookup_table]] {
          269  +    set mapping $tl_lookup_table($code)
          270  +    if {$iFirst == ""} {
          271  +      set iFirst $code
          272  +      set nOff   [expr $mapping - $code]
          273  +      set nRange 1
          274  +      set nIncr 1
          275  +    } else {
          276  +      set diff [expr $code - ($iFirst + ($nIncr * ($nRange - 1)))]
          277  +      if { $nRange==1 && ($diff==1 || $diff==2) } {
          278  +        set nIncr $diff
          279  +      }
          280  +
          281  +      if {$diff != $nIncr || ($mapping - $code)!=$nOff} {
          282  +        if { $nRange==1 } {set nIncr 1}
          283  +        lappend lRecord [list $iFirst $nIncr $nRange $nOff]
          284  +        set iFirst $code
          285  +        set nOff   [expr $mapping - $code]
          286  +        set nRange 1
          287  +        set nIncr 1
          288  +      } else {
          289  +        incr nRange
          290  +      }
          291  +    }
          292  +  }
          293  +
          294  +  lappend lRecord [list $iFirst $nIncr $nRange $nOff]
          295  +
          296  +  set lRecord
          297  +}
          298  +
          299  +proc tl_print_table_header {} {
          300  +  puts -nonewline "  "
          301  +  puts [string trim {
          302  +  /* Each entry in the following array defines a rule for folding a range
          303  +  ** of codepoints to lower case. The rule applies to a range of nRange
          304  +  ** codepoints starting at codepoint iCode.
          305  +  **
          306  +  ** If the least significant bit in flags is clear, then the rule applies
          307  +  ** to all nRange codepoints (i.e. all nRange codepoints are upper case and
          308  +  ** need to be folded). Or, if it is set, then the rule only applies to
          309  +  ** every second codepoint in the range, starting with codepoint C.
          310  +  **
          311  +  ** The 7 most significant bits in flags are an index into the aiOff[]
          312  +  ** array. If a specific codepoint C does require folding, then its lower
          313  +  ** case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF).
          314  +  **
          315  +  ** The contents of this array are generated by parsing the CaseFolding.txt
          316  +  ** file distributed as part of the "Unicode Character Database". See
          317  +  ** http://www.unicode.org for details.
          318  +  */
          319  +  }]
          320  +  puts "  static const struct TableEntry \{"
          321  +  puts "    unsigned short iCode;"
          322  +  puts "    unsigned char flags;"
          323  +  puts "    unsigned char nRange;"
          324  +  puts "  \} aEntry\[\] = \{"
          325  +}
          326  +
          327  +proc tl_print_table_entry {togglevar entry liOff} {
          328  +  upvar $togglevar t
          329  +  foreach {iFirst nIncr nRange nOff} $entry {}
          330  +
          331  +  if {$iFirst > (1<<16)} { return 1 }
          332  +
          333  +  if {[info exists t]==0} {set t 0}
          334  +  if {$t==0} { puts -nonewline "    " }
          335  +
          336  +  set flags 0
          337  +  if {$nIncr==2} { set flags 1 ; set nRange [expr $nRange * 2]}
          338  +  if {$nOff<0}   { incr nOff [expr (1<<16)] }
          339  +
          340  +  set idx [lsearch $liOff $nOff]
          341  +  if {$idx<0} {error "malfunction generating aiOff"}
          342  +  set flags [expr $flags + $idx*2]
          343  +
          344  +  set txt "{$iFirst, $flags, $nRange},"
          345  +  if {$t==2} {
          346  +    puts $txt
          347  +  } else {
          348  +    puts -nonewline [format "% -23s" $txt]
          349  +  }
          350  +  set t [expr ($t+1)%3]
          351  +
          352  +  return 0
          353  +}
          354  +
          355  +proc tl_print_table_footer {togglevar} {
          356  +  upvar $togglevar t
          357  +  if {$t!=0} {puts ""}
          358  +  puts "  \};"
          359  +}
          360  +
          361  +proc tl_print_if_entry {entry} {
          362  +  foreach {iFirst nIncr nRange nOff} $entry {}
          363  +  if {$nIncr==2} {error "tl_print_if_entry needs improvement!"}
          364  +
          365  +  puts "  else if( c>=$iFirst && c<[expr $iFirst+$nRange] )\{"
          366  +  puts "    ret = c + $nOff;"
          367  +  puts "  \}"
          368  +}
          369  +
          370  +proc tl_generate_ioff_table {lRecord} {
          371  +  foreach entry $lRecord {
          372  +    foreach {iFirst nIncr nRange iOff} $entry {}
          373  +    if {$iOff<0}   { incr iOff [expr (1<<16)] }
          374  +    if {[info exists a($iOff)]} continue
          375  +    set a($iOff) 1
          376  +  }
          377  +
          378  +  set liOff [lsort -integer [array names a]]
          379  +  if {[llength $liOff]>128} { error "Too many distinct ioffs" }
          380  +  return $liOff
          381  +}
          382  +
          383  +proc tl_print_ioff_table {liOff} {
          384  +  puts -nonewline "  static const unsigned short aiOff\[\] = \{"
          385  +  set i 0
          386  +  foreach off $liOff {
          387  +    if {($i % 8)==0} {puts "" ; puts -nonewline "   "}
          388  +    puts -nonewline [format "% -7s" "$off,"]
          389  +    incr i
          390  +  }
          391  +  puts ""
          392  +  puts "  \};"
          393  +
          394  +}
          395  +
          396  +proc print_tolower {zFunc} {
          397  +
          398  +  set lRecord [tl_create_records]
          399  +
          400  +  set lHigh [list]
          401  +  puts "/*"
          402  +  puts "** Interpret the argument as a unicode codepoint. If the codepoint"
          403  +  puts "** is an upper case character that has a lower case equivalent,"
          404  +  puts "** return the codepoint corresponding to the lower case version."
          405  +  puts "** Otherwise, return a copy of the argument."
          406  +  puts "**"
          407  +  puts "** The results are undefined if the value passed to this function"
          408  +  puts "** is less than zero."
          409  +  puts "*/"
          410  +  puts "int ${zFunc}\(int c)\{"
          411  +
          412  +  set liOff [tl_generate_ioff_table $lRecord]
          413  +  tl_print_table_header
          414  +  foreach entry $lRecord { 
          415  +    if {[tl_print_table_entry toggle $entry $liOff]} { 
          416  +      lappend lHigh $entry 
          417  +    } 
          418  +  }
          419  +  tl_print_table_footer toggle
          420  +  tl_print_ioff_table $liOff
          421  +
          422  +  puts {
          423  +  int ret = c;
          424  +
          425  +  assert( c>=0 );
          426  +  assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );
          427  +
          428  +  if( c<128 ){
          429  +    if( c>='A' && c<='Z' ) ret = c + ('a' - 'A');
          430  +  }else if( c<65536 ){
          431  +    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
          432  +    int iLo = 0;
          433  +    int iRes = -1;
          434  +
          435  +    while( iHi>=iLo ){
          436  +      int iTest = (iHi + iLo) / 2;
          437  +      int cmp = (c - aEntry[iTest].iCode);
          438  +      if( cmp>=0 ){
          439  +        iRes = iTest;
          440  +        iLo = iTest+1;
          441  +      }else{
          442  +        iHi = iTest-1;
          443  +      }
          444  +    }
          445  +    assert( iRes<0 || c>=aEntry[iRes].iCode );
          446  +
          447  +    if( iRes>=0 ){
          448  +      const struct TableEntry *p = &aEntry[iRes];
          449  +      if( c<(p->iCode + p->nRange) && 0==(0x01 & p->flags & (p->iCode ^ c)) ){
          450  +        ret = (c + (aiOff[p->flags>>1])) & 0x0000FFFF;
          451  +        assert( ret>0 );
          452  +      }
          453  +    }
          454  +  }
          455  +  }
          456  +
          457  +  foreach entry $lHigh {
          458  +    tl_print_if_entry $entry
          459  +  }
          460  +
          461  +  puts ""
          462  +  puts "  return ret;"
          463  +  puts "\}"
          464  +}
          465  +
          466  +proc print_tolower_test {zFunc} {
          467  +  global tl_lookup_table
          468  +
          469  +  puts "static int tolower_test(int *piCode)\{"
          470  +  puts -nonewline "  static int aLookup\[\] = \{"
          471  +  for {set i 0} {$i < 70000} {incr i} {
          472  +    set expected $i
          473  +    catch { set expected $tl_lookup_table($i) }
          474  +    if {($i % 8)==0}  { puts "" ; puts -nonewline "    " }
          475  +    puts -nonewline "$expected, "
          476  +  }
          477  +  puts "  \};"
          478  +  puts "  int i;"
          479  +  puts "  for(i=0; i<sizeof(aLookup)/sizeof(aLookup\[0\]); i++)\{"
          480  +  puts "    if( ${zFunc}\(i)!=aLookup\[i\] )\{"
          481  +  puts "      *piCode = i;"
          482  +  puts "      return 1;"
          483  +  puts "    \}"
          484  +  puts "  \}"
          485  +  puts "  return 0;"
          486  +  puts "\}"
          487  +}
          488  +
          489  +
          490  +proc print_fileheader {} {
          491  +  puts [string trim {
          492  +/*
          493  +** 2012 May 25
          494  +**
          495  +** The author disclaims copyright to this source code.  In place of
          496  +** a legal notice, here is a blessing:
          497  +**
          498  +**    May you do good and not evil.
          499  +**    May you find forgiveness for yourself and forgive others.
          500  +**    May you share freely, never taking more than you give.
          501  +**
          502  +******************************************************************************
          503  +*/
          504  +
          505  +/*
          506  +** DO NOT EDIT THIS MACHINE GENERATED FILE.
          507  +*/
          508  +  }]
          509  +  puts ""
          510  +  puts "#if !defined(SQLITE_DISABLE_FTS3_UNICODE)"
          511  +  puts "#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)"
          512  +  puts ""
          513  +  puts "#include <assert.h>"
          514  +  puts ""
          515  +}
          516  +
          517  +proc print_test_main {} {
          518  +  puts ""
          519  +  puts "#include <stdio.h>"
          520  +  puts ""
          521  +  puts "int main(int argc, char **argv)\{"
          522  +  puts "  int r1, r2;"
          523  +  puts "  int code;"
          524  +  puts "  r1 = isalnum_test(&code);"
          525  +  puts "  if( r1 ) printf(\"isalnum(): Problem with code %d\\n\",code);"
          526  +  puts "  else printf(\"isalnum(): test passed\\n\");"
          527  +  puts "  r2 = tolower_test(&code);"
          528  +  puts "  if( r2 ) printf(\"tolower(): Problem with code %d\\n\",code);"
          529  +  puts "  else printf(\"tolower(): test passed\\n\");"
          530  +  puts "  return (r1 || r2);"
          531  +  puts "\}"
          532  +}
          533  +
          534  +# Proces the command line arguments. Exit early if they are not to
          535  +# our liking.
          536  +#
          537  +proc usage {} {
          538  +  puts -nonewline stderr "Usage: $::argv0 ?-test? "
          539  +  puts            stderr "<CaseFolding.txt file> <UnicodeData.txt file>"
          540  +  exit 1
          541  +}
          542  +if {[llength $argv]!=2 && [llength $argv]!=3} usage
          543  +if {[llength $argv]==3 && [lindex $argv 0]!="-test"} usage
          544  +set unicodedata.txt [lindex $argv end]
          545  +set casefolding.txt [lindex $argv end-1]
          546  +set generate_test_code [expr {[llength $argv]==3}]
          547  +
          548  +# Print the isalnum() function to stdout.
          549  +#
          550  +print_fileheader
          551  +set lRange [an_load_separator_ranges]
          552  +print_isalnum sqlite3FtsUnicodeIsalnum $lRange
          553  +
          554  +# Leave a gap between the two generated C functions.
          555  +#
          556  +puts ""
          557  +puts ""
          558  +
          559  +# Print the tolower() function to stdout.
          560  +#
          561  +tl_load_casefolding_txt ${casefolding.txt}
          562  +print_tolower sqlite3FtsUnicodeTolower
          563  +
          564  +# Print the test routines and main() function to stdout, if -test 
          565  +# was specified.
          566  +#
          567  +if {$::generate_test_code} {
          568  +  print_test_isalnum sqlite3FtsUnicodeIsalnum $lRange
          569  +  print_tolower_test sqlite3FtsUnicodeTolower 
          570  +  print_test_main 
          571  +}
          572  +
          573  +puts "#endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */"
          574  +puts "#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */"

Changes to ext/rtree/rtree.c.

  2734   2734       rc = nodeRelease(pRtree, pRoot);
  2735   2735     }else{
  2736   2736       nodeRelease(pRtree, pRoot);
  2737   2737     }
  2738   2738   
  2739   2739     return rc;
  2740   2740   }
         2741  +
         2742  +/*
         2743  +** Rounding constants for float->double conversion.
         2744  +*/
         2745  +#define RNDTOWARDS  (1.0 - 1.0/8388608.0)  /* Round towards zero */
         2746  +#define RNDAWAY     (1.0 + 1.0/8388608.0)  /* Round away from zero */
         2747  +
         2748  +#if !defined(SQLITE_RTREE_INT_ONLY)
         2749  +/*
         2750  +** Convert an sqlite3_value into an RtreeValue (presumably a float)
         2751  +** while taking care to round toward negative or positive, respectively.
         2752  +*/
         2753  +static RtreeValue rtreeValueDown(sqlite3_value *v){
         2754  +  double d = sqlite3_value_double(v);
         2755  +  float f = (float)d;
         2756  +  if( f>d ){
         2757  +    f = (float)(d*(d<0 ? RNDAWAY : RNDTOWARDS));
         2758  +  }
         2759  +  return f;
         2760  +}
         2761  +static RtreeValue rtreeValueUp(sqlite3_value *v){
         2762  +  double d = sqlite3_value_double(v);
         2763  +  float f = (float)d;
         2764  +  if( f<d ){
         2765  +    f = (float)(d*(d<0 ? RNDTOWARDS : RNDAWAY));
         2766  +  }
         2767  +  return f;
         2768  +}
         2769  +#endif /* !defined(SQLITE_RTREE_INT_ONLY) */
         2770  +
  2741   2771   
  2742   2772   /*
  2743   2773   ** The xUpdate method for rtree module virtual tables.
  2744   2774   */
  2745   2775   static int rtreeUpdate(
  2746   2776     sqlite3_vtab *pVtab, 
  2747   2777     int nData, 
................................................................................
  2771   2801       int ii;
  2772   2802   
  2773   2803       /* Populate the cell.aCoord[] array. The first coordinate is azData[3]. */
  2774   2804       assert( nData==(pRtree->nDim*2 + 3) );
  2775   2805   #ifndef SQLITE_RTREE_INT_ONLY
  2776   2806       if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
  2777   2807         for(ii=0; ii<(pRtree->nDim*2); ii+=2){
  2778         -        cell.aCoord[ii].f = (RtreeValue)sqlite3_value_double(azData[ii+3]);
  2779         -        cell.aCoord[ii+1].f = (RtreeValue)sqlite3_value_double(azData[ii+4]);
         2808  +        cell.aCoord[ii].f = rtreeValueDown(azData[ii+3]);
         2809  +        cell.aCoord[ii+1].f = rtreeValueUp(azData[ii+4]);
  2780   2810           if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){
  2781   2811             rc = SQLITE_CONSTRAINT;
  2782   2812             goto constraint;
  2783   2813           }
  2784   2814         }
  2785   2815       }else
  2786   2816   #endif

Changes to main.mk.

    51     51   # Object files for the SQLite library.
    52     52   #
    53     53   LIBOBJ+= alter.o analyze.o attach.o auth.o \
    54     54            backup.o bitvec.o btmutex.o btree.o build.o \
    55     55            callback.o complete.o ctime.o date.o delete.o expr.o fault.o fkey.o \
    56     56            fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
    57     57            fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \
           58  +	 fts3_unicode.o fts3_unicode2.o \
    58     59            fts3_write.o func.o global.o hash.o \
    59     60            icu.o insert.o journal.o legacy.o loadext.o \
    60     61            main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
    61     62            memjournal.o \
    62     63            mutex.o mutex_noop.o mutex_os2.o mutex_unix.o mutex_w32.o \
    63     64            notify.o opcodes.o os.o os_os2.o os_unix.o os_win.o \
    64     65            pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \
................................................................................
   194    195     $(TOP)/ext/fts3/fts3_hash.h \
   195    196     $(TOP)/ext/fts3/fts3_icu.c \
   196    197     $(TOP)/ext/fts3/fts3_porter.c \
   197    198     $(TOP)/ext/fts3/fts3_snippet.c \
   198    199     $(TOP)/ext/fts3/fts3_tokenizer.h \
   199    200     $(TOP)/ext/fts3/fts3_tokenizer.c \
   200    201     $(TOP)/ext/fts3/fts3_tokenizer1.c \
          202  +  $(TOP)/ext/fts3/fts3_unicode.c \
          203  +  $(TOP)/ext/fts3/fts3_unicode2.c \
   201    204     $(TOP)/ext/fts3/fts3_write.c
   202    205   SRC += \
   203    206     $(TOP)/ext/icu/sqliteicu.h \
   204    207     $(TOP)/ext/icu/icu.c
   205    208   SRC += \
   206    209     $(TOP)/ext/rtree/rtree.h \
   207    210     $(TOP)/ext/rtree/rtree.c
................................................................................
   503    506   	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
   504    507   
   505    508   fts3_tokenizer.o:	$(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
   506    509   	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
   507    510   
   508    511   fts3_tokenizer1.o:	$(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
   509    512   	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
          513  +
          514  +fts3_unicode.o:	$(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR)
          515  +	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c
          516  +
          517  +fts3_unicode2.o:	$(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR)
          518  +	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c
   510    519   
   511    520   fts3_write.o:	$(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
   512    521   	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
   513    522   
   514    523   rtree.o:	$(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
   515    524   	$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
   516    525   

Changes to src/btree.c.

  1717   1717     /* Set the variable isMemdb to true for an in-memory database, or 
  1718   1718     ** false for a file-based database.
  1719   1719     */
  1720   1720   #ifdef SQLITE_OMIT_MEMORYDB
  1721   1721     const int isMemdb = 0;
  1722   1722   #else
  1723   1723     const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
  1724         -                       || (isTempDb && sqlite3TempInMemory(db));
         1724  +                       || (isTempDb && sqlite3TempInMemory(db))
         1725  +                       || (vfsFlags & SQLITE_OPEN_MEMORY)!=0;
  1725   1726   #endif
  1726   1727   
  1727   1728     assert( db!=0 );
  1728   1729     assert( pVfs!=0 );
  1729   1730     assert( sqlite3_mutex_held(db->mutex) );
  1730   1731     assert( (flags&0xff)==flags );   /* flags fit in 8 bits */
  1731   1732   
................................................................................
  1753   1754   #endif
  1754   1755   
  1755   1756   #if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
  1756   1757     /*
  1757   1758     ** If this Btree is a candidate for shared cache, try to find an
  1758   1759     ** existing BtShared object that we can share with
  1759   1760     */
  1760         -  if( isMemdb==0 && isTempDb==0 ){
         1761  +  if( isTempDb==0 && (isMemdb==0 || (vfsFlags&SQLITE_OPEN_URI)!=0) ){
  1761   1762       if( vfsFlags & SQLITE_OPEN_SHAREDCACHE ){
  1762   1763         int nFullPathname = pVfs->mxPathname+1;
  1763   1764         char *zFullPathname = sqlite3Malloc(nFullPathname);
  1764   1765         MUTEX_LOGIC( sqlite3_mutex *mutexShared; )
  1765   1766         p->sharable = 1;
  1766   1767         if( !zFullPathname ){
  1767   1768           sqlite3_free(p);
  1768   1769           return SQLITE_NOMEM;
  1769   1770         }
  1770         -      rc = sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);
  1771         -      if( rc ){
  1772         -        sqlite3_free(zFullPathname);
  1773         -        sqlite3_free(p);
  1774         -        return rc;
         1771  +      if( isMemdb ){
         1772  +        memcpy(zFullPathname, zFilename, sqlite3Strlen30(zFilename)+1);
         1773  +      }else{
         1774  +        rc = sqlite3OsFullPathname(pVfs, zFilename,
         1775  +                                   nFullPathname, zFullPathname);
         1776  +        if( rc ){
         1777  +          sqlite3_free(zFullPathname);
         1778  +          sqlite3_free(p);
         1779  +          return rc;
         1780  +        }
  1775   1781         }
  1776   1782   #if SQLITE_THREADSAFE
  1777   1783         mutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);
  1778   1784         sqlite3_mutex_enter(mutexOpen);
  1779   1785         mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
  1780   1786         sqlite3_mutex_enter(mutexShared);
  1781   1787   #endif
  1782   1788         for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
  1783   1789           assert( pBt->nRef>0 );
  1784         -        if( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt->pPager))
         1790  +        if( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt->pPager, 0))
  1785   1791                    && sqlite3PagerVfs(pBt->pPager)==pVfs ){
  1786   1792             int iDb;
  1787   1793             for(iDb=db->nDb-1; iDb>=0; iDb--){
  1788   1794               Btree *pExisting = db->aDb[iDb].pBt;
  1789   1795               if( pExisting && pExisting->pBt==pBt ){
  1790   1796                 sqlite3_mutex_leave(mutexShared);
  1791   1797                 sqlite3_mutex_leave(mutexOpen);
................................................................................
  8042   8048     *pnErr = sCheck.nErr;
  8043   8049     if( sCheck.nErr==0 ) sqlite3StrAccumReset(&sCheck.errMsg);
  8044   8050     return sqlite3StrAccumFinish(&sCheck.errMsg);
  8045   8051   }
  8046   8052   #endif /* SQLITE_OMIT_INTEGRITY_CHECK */
  8047   8053   
  8048   8054   /*
  8049         -** Return the full pathname of the underlying database file.
         8055  +** Return the full pathname of the underlying database file.  Return
         8056  +** an empty string if the database is in-memory or a TEMP database.
  8050   8057   **
  8051   8058   ** The pager filename is invariant as long as the pager is
  8052   8059   ** open so it is safe to access without the BtShared mutex.
  8053   8060   */
  8054   8061   const char *sqlite3BtreeGetFilename(Btree *p){
  8055   8062     assert( p->pBt->pPager!=0 );
  8056         -  return sqlite3PagerFilename(p->pBt->pPager);
         8063  +  return sqlite3PagerFilename(p->pBt->pPager, 1);
  8057   8064   }
  8058   8065   
  8059   8066   /*
  8060   8067   ** Return the pathname of the journal file for this database. The return
  8061   8068   ** value of this routine is the same regardless of whether the journal file
  8062   8069   ** has been created or not.
  8063   8070   **

Changes to src/build.c.

   425    425   }
   426    426   
   427    427   /*
   428    428   ** Reset the schema for the database at index iDb.  Also reset the
   429    429   ** TEMP schema.
   430    430   */
   431    431   void sqlite3ResetOneSchema(sqlite3 *db, int iDb){
          432  +  Db *pDb;
   432    433     assert( iDb<db->nDb );
   433    434   
   434    435     /* Case 1:  Reset the single schema identified by iDb */
   435         -  Db *pDb = &db->aDb[iDb];
          436  +  pDb = &db->aDb[iDb];
   436    437     assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
   437    438     assert( pDb->pSchema!=0 );
   438    439     sqlite3SchemaClear(pDb->pSchema);
   439    440   
   440    441     /* If any database other than TEMP is reset, then also reset TEMP
   441    442     ** since TEMP might be holding triggers that reference tables in the
   442    443     ** other database.
................................................................................
  1504   1505       memset(&sSrc, 0, sizeof(sSrc));
  1505   1506       sSrc.nSrc = 1;
  1506   1507       sSrc.a[0].zName = p->zName;
  1507   1508       sSrc.a[0].pTab = p;
  1508   1509       sSrc.a[0].iCursor = -1;
  1509   1510       sNC.pParse = pParse;
  1510   1511       sNC.pSrcList = &sSrc;
  1511         -    sNC.isCheck = 1;
         1512  +    sNC.ncFlags = NC_IsCheck;
  1512   1513       pList = p->pCheck;
  1513   1514       for(i=0; i<pList->nExpr; i++){
  1514   1515         if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
  1515   1516           return;
  1516   1517         }
  1517   1518       }
  1518   1519     }

Changes to src/expr.c.

  3774   3774     if( sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 2;
  3775   3775     if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList) ) return 2;
  3776   3776     if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 2;
  3777   3777     if( ExprHasProperty(pA, EP_IntValue) ){
  3778   3778       if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){
  3779   3779         return 2;
  3780   3780       }
  3781         -  }else if( pA->op!=TK_COLUMN && pA->op!=TK_AGG_COLUMN && pA->u.zToken ){
         3781  +  }else if( pA->op!=TK_COLUMN && ALWAYS(pA->op!=TK_AGG_COLUMN) && pA->u.zToken){
  3782   3782       if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 2;
  3783   3783       if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
  3784   3784         return 2;
  3785   3785       }
  3786   3786     }
  3787   3787     if( (pA->flags & EP_ExpCollate)!=(pB->flags & EP_ExpCollate) ) return 1;
  3788   3788     if( (pA->flags & EP_ExpCollate)!=0 && pA->pColl!=pB->pColl ) return 2;
................................................................................
  3961   3961               break;
  3962   3962             } /* endif pExpr->iTable==pItem->iCursor */
  3963   3963           } /* end loop over pSrcList */
  3964   3964         }
  3965   3965         return WRC_Prune;
  3966   3966       }
  3967   3967       case TK_AGG_FUNCTION: {
  3968         -      if( !sqlite3FunctionUsesOtherSrc(pExpr, pSrcList) ){
         3968  +      if( (pNC->ncFlags & NC_InAggFunc)==0
         3969  +       && !sqlite3FunctionUsesOtherSrc(pExpr, pSrcList)
         3970  +      ){
  3969   3971           /* Check to see if pExpr is a duplicate of another aggregate 
  3970   3972           ** function that is already in the pAggInfo structure
  3971   3973           */
  3972   3974           struct AggInfo_func *pItem = pAggInfo->aFunc;
  3973   3975           for(i=0; i<pAggInfo->nFunc; i++, pItem++){
  3974   3976             if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){
  3975   3977               break;
................................................................................
  3998   4000           }
  3999   4001           /* Make pExpr point to the appropriate pAggInfo->aFunc[] entry
  4000   4002           */
  4001   4003           assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
  4002   4004           ExprSetIrreducible(pExpr);
  4003   4005           pExpr->iAgg = (i16)i;
  4004   4006           pExpr->pAggInfo = pAggInfo;
  4005         -        return WRC_Prune;
  4006   4007         }
         4008  +      return WRC_Prune;
  4007   4009       }
  4008   4010     }
  4009   4011     return WRC_Continue;
  4010   4012   }
  4011   4013   static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
  4012   4014     UNUSED_PARAMETER(pWalker);
  4013   4015     UNUSED_PARAMETER(pSelect);

Changes to src/main.c.

  2040   2040             zModeType = "cache";
  2041   2041           }
  2042   2042           if( nOpt==4 && memcmp("mode", zOpt, 4)==0 ){
  2043   2043             static struct OpenMode aOpenMode[] = {
  2044   2044               { "ro",  SQLITE_OPEN_READONLY },
  2045   2045               { "rw",  SQLITE_OPEN_READWRITE }, 
  2046   2046               { "rwc", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE },
         2047  +            { "memory",
         2048  +                    SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE 
         2049  +                       | SQLITE_OPEN_MEMORY },
  2047   2050               { 0, 0 }
  2048   2051             };
  2049   2052   
  2050         -          mask = SQLITE_OPEN_READONLY|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
         2053  +          mask = SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE
         2054  +                   | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY;
  2051   2055             aMode = aOpenMode;
  2052   2056             limit = mask & flags;
  2053   2057             zModeType = "access";
  2054   2058           }
  2055   2059   
  2056   2060           if( aMode ){
  2057   2061             int i;
................................................................................
  2064   2068               }
  2065   2069             }
  2066   2070             if( mode==0 ){
  2067   2071               *pzErrMsg = sqlite3_mprintf("no such %s mode: %s", zModeType, zVal);
  2068   2072               rc = SQLITE_ERROR;
  2069   2073               goto parse_uri_out;
  2070   2074             }
  2071         -          if( mode>limit ){
         2075  +          if( (mode & ~SQLITE_OPEN_MEMORY)>limit ){
  2072   2076               *pzErrMsg = sqlite3_mprintf("%s mode not allowed: %s",
  2073   2077                                           zModeType, zVal);
  2074   2078               rc = SQLITE_PERM;
  2075   2079               goto parse_uri_out;
  2076   2080             }
  2077   2081             flags = (flags & ~mask) | mode;
  2078   2082           }
................................................................................
  2083   2087   
  2084   2088     }else{
  2085   2089       zFile = sqlite3_malloc(nUri+2);
  2086   2090       if( !zFile ) return SQLITE_NOMEM;
  2087   2091       memcpy(zFile, zUri, nUri);
  2088   2092       zFile[nUri] = '\0';
  2089   2093       zFile[nUri+1] = '\0';
         2094  +    flags &= ~SQLITE_OPEN_URI;
  2090   2095     }
  2091   2096   
  2092   2097     *ppVfs = sqlite3_vfs_find(zVfs);
  2093   2098     if( *ppVfs==0 ){
  2094   2099       *pzErrMsg = sqlite3_mprintf("no such vfs: %s", zVfs);
  2095   2100       rc = SQLITE_ERROR;
  2096   2101     }

Changes to src/malloc.c.

   487    487     if( db ){
   488    488       if( db->pnBytesFreed ){
   489    489         *db->pnBytesFreed += sqlite3DbMallocSize(db, p);
   490    490         return;
   491    491       }
   492    492       if( isLookaside(db, p) ){
   493    493         LookasideSlot *pBuf = (LookasideSlot*)p;
          494  +#if SQLITE_DEBUG
          495  +      /* Trash all content in the buffer being freed */
          496  +      memset(p, 0xaa, db->lookaside.sz);
          497  +#endif
   494    498         pBuf->pNext = db->lookaside.pFree;
   495    499         db->lookaside.pFree = pBuf;
   496    500         db->lookaside.nOut--;
   497    501         return;
   498    502       }
   499    503     }
   500    504     assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );

Changes to src/os_unix.c.

   223    223   #endif
   224    224   #if SQLITE_ENABLE_LOCKING_STYLE || defined(__APPLE__)
   225    225     unsigned fsFlags;                   /* cached details from statfs() */
   226    226   #endif
   227    227   #if OS_VXWORKS
   228    228     struct vxworksFileId *pId;          /* Unique file ID */
   229    229   #endif
   230         -#ifndef NDEBUG
          230  +#ifdef SQLITE_DEBUG
   231    231     /* The next group of variables are used to track whether or not the
   232    232     ** transaction counter in bytes 24-27 of database files are updated
   233    233     ** whenever any part of the database changes.  An assertion fault will
   234    234     ** occur if a file is updated without also updating the transaction
   235    235     ** counter.  This test is made to avoid new problems similar to the
   236    236     ** one described by ticket #3584. 
   237    237     */
................................................................................
   258    258   #else
   259    259   # define UNIXFILE_DIRSYNC    0x00
   260    260   #endif
   261    261   #define UNIXFILE_PSOW        0x10     /* SQLITE_IOCAP_POWERSAFE_OVERWRITE */
   262    262   #define UNIXFILE_DELETE      0x20     /* Delete on close */
   263    263   #define UNIXFILE_URI         0x40     /* Filename might have query parameters */
   264    264   #define UNIXFILE_NOLOCK      0x80     /* Do no file locking */
   265         -#define UNIXFILE_CHOWN      0x100     /* File ownership was changed */
   266    265   
   267    266   /*
   268    267   ** Include code that is common to all os_*.c files
   269    268   */
   270    269   #include "os_common.h"
   271    270   
   272    271   /*
................................................................................
   303    302   **
   304    303   ** The safest way to deal with the problem is to always use this wrapper
   305    304   ** which always has the same well-defined interface.
   306    305   */
   307    306   static int posixOpen(const char *zFile, int flags, int mode){
   308    307     return open(zFile, flags, mode);
   309    308   }
          309  +
          310  +/*
          311  +** On some systems, calls to fchown() will trigger a message in a security
          312  +** log if they come from non-root processes.  So avoid calling fchown() if
          313  +** we are not running as root.
          314  +*/
          315  +static int posixFchown(int fd, uid_t uid, gid_t gid){
          316  +  return geteuid() ? 0 : fchown(fd,uid,gid);
          317  +}
   310    318   
   311    319   /* Forward reference */
   312    320   static int openDirectory(const char*, int*);
   313    321   
   314    322   /*
   315    323   ** Many system calls are accessed through pointer-to-functions so that
   316    324   ** they may be overridden at runtime to facilitate fault injection during
................................................................................
   415    423   
   416    424     { "mkdir",        (sqlite3_syscall_ptr)mkdir,           0 },
   417    425   #define osMkdir     ((int(*)(const char*,mode_t))aSyscall[18].pCurrent)
   418    426   
   419    427     { "rmdir",        (sqlite3_syscall_ptr)rmdir,           0 },
   420    428   #define osRmdir     ((int(*)(const char*))aSyscall[19].pCurrent)
   421    429   
   422         -  { "fchown",       (sqlite3_syscall_ptr)fchown,          0 },
          430  +  { "fchown",       (sqlite3_syscall_ptr)posixFchown,     0 },
   423    431   #define osFchown    ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
   424    432   
   425    433     { "umask",        (sqlite3_syscall_ptr)umask,           0 },
   426    434   #define osUmask     ((mode_t(*)(mode_t))aSyscall[21].pCurrent)
   427    435   
   428    436   }; /* End of the overrideable system calls */
   429    437   
................................................................................
  1559   1567         if( rc!=SQLITE_BUSY ){
  1560   1568           pFile->lastErrno = tErrno;
  1561   1569         }
  1562   1570       }
  1563   1571     }
  1564   1572     
  1565   1573   
  1566         -#ifndef NDEBUG
         1574  +#ifdef SQLITE_DEBUG
  1567   1575     /* Set up the transaction-counter change checking flags when
  1568   1576     ** transitioning from a SHARED to a RESERVED lock.  The change
  1569   1577     ** from SHARED to RESERVED marks the beginning of a normal
  1570   1578     ** write operation (not a hot journal rollback).
  1571   1579     */
  1572   1580     if( rc==SQLITE_OK
  1573   1581      && pFile->eFileLock<=SHARED_LOCK
................................................................................
  1638   1646     }
  1639   1647     unixEnterMutex();
  1640   1648     pInode = pFile->pInode;
  1641   1649     assert( pInode->nShared!=0 );
  1642   1650     if( pFile->eFileLock>SHARED_LOCK ){
  1643   1651       assert( pInode->eFileLock==pFile->eFileLock );
  1644   1652   
  1645         -#ifndef NDEBUG
         1653  +#ifdef SQLITE_DEBUG
  1646   1654       /* When reducing a lock such that other processes can start
  1647   1655       ** reading the database file again, make sure that the
  1648   1656       ** transaction counter was updated if any part of the database
  1649   1657       ** file changed.  If the transaction counter is not updated,
  1650   1658       ** other connections to the same file might not realize that
  1651   1659       ** the file has changed and hence might not know to flush their
  1652   1660       ** cache.  The use of a stale cache can lead to database corruption.
................................................................................
  2837   2845     assert( pInode->nShared!=0 );
  2838   2846     if( pFile->eFileLock>SHARED_LOCK ){
  2839   2847       assert( pInode->eFileLock==pFile->eFileLock );
  2840   2848       SimulateIOErrorBenign(1);
  2841   2849       SimulateIOError( h=(-1) )
  2842   2850       SimulateIOErrorBenign(0);
  2843   2851       
  2844         -#ifndef NDEBUG
         2852  +#ifdef SQLITE_DEBUG
  2845   2853       /* When reducing a lock such that other processes can start
  2846   2854       ** reading the database file again, make sure that the
  2847   2855       ** transaction counter was updated if any part of the database
  2848   2856       ** file changed.  If the transaction counter is not updated,
  2849   2857       ** other connections to the same file might not realize that
  2850   2858       ** the file has changed and hence might not know to flush their
  2851   2859       ** cache.  The use of a stale cache can lead to database corruption.
................................................................................
  3141   3149   #if 0
  3142   3150     assert( pFile->pUnused==0
  3143   3151          || offset>=PENDING_BYTE+512
  3144   3152          || offset+amt<=PENDING_BYTE 
  3145   3153     );
  3146   3154   #endif
  3147   3155   
  3148         -#ifndef NDEBUG
         3156  +#ifdef SQLITE_DEBUG
  3149   3157     /* If we are doing a normal write to a database file (as opposed to
  3150   3158     ** doing a hot-journal rollback or a write to some file other than a
  3151   3159     ** normal database file) then record the fact that the database
  3152   3160     ** has changed.  If the transaction counter is modified, record that
  3153   3161     ** fact too.
  3154   3162     */
  3155   3163     if( pFile->inNormalWrite ){
................................................................................
  3432   3440     }
  3433   3441   
  3434   3442     rc = robust_ftruncate(pFile->h, (off_t)nByte);
  3435   3443     if( rc ){
  3436   3444       pFile->lastErrno = errno;
  3437   3445       return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
  3438   3446     }else{
  3439         -#ifndef NDEBUG
         3447  +#ifdef SQLITE_DEBUG
  3440   3448       /* If we are doing a normal write to a database file (as opposed to
  3441   3449       ** doing a hot-journal rollback or a write to some file other than a
  3442   3450       ** normal database file) and we truncate the file to zero length,
  3443   3451       ** that effectively updates the change counter.  This might happen
  3444   3452       ** when restoring a database using the backup API from a zero-length
  3445   3453       ** source.
  3446   3454       */
................................................................................
  3589   3597         unixModeBit(pFile, UNIXFILE_PSOW, (int*)pArg);
  3590   3598         return SQLITE_OK;
  3591   3599       }
  3592   3600       case SQLITE_FCNTL_VFSNAME: {
  3593   3601         *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
  3594   3602         return SQLITE_OK;
  3595   3603       }
  3596         -#ifndef NDEBUG
         3604  +#ifdef SQLITE_DEBUG
  3597   3605       /* The pager calls this method to signal that it has done
  3598   3606       ** a rollback and that the database is therefore unchanged and
  3599   3607       ** it hence it is OK for the transaction change counter to be
  3600   3608       ** unchanged.
  3601   3609       */
  3602   3610       case SQLITE_FCNTL_DB_UNCHANGED: {
  3603   3611         ((unixFile*)id)->dbUpdate = 0;
................................................................................
  3940   3948         if( pShmNode->h<0 ){
  3941   3949           rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zShmFilename);
  3942   3950           goto shm_open_err;
  3943   3951         }
  3944   3952   
  3945   3953         /* If this process is running as root, make sure that the SHM file
  3946   3954         ** is owned by the same user that owns the original database.  Otherwise,
  3947         -      ** the original owner will not be able to connect. If this process is
  3948         -      ** not root, the following fchown() will fail, but we don't care.  The
  3949         -      ** if(){..} and the UNIXFILE_CHOWN flag are purely to silence compiler
  3950         -      ** warnings.
         3955  +      ** the original owner will not be able to connect.
  3951   3956         */
  3952         -      if( osFchown(pShmNode->h, sStat.st_uid, sStat.st_gid)==0 ){
  3953         -        pDbFd->ctrlFlags |= UNIXFILE_CHOWN;
  3954         -      }
         3957  +      osFchown(pShmNode->h, sStat.st_uid, sStat.st_gid);
  3955   3958     
  3956   3959         /* Check to see if another process is holding the dead-man switch.
  3957   3960         ** If not, truncate the file to zero length. 
  3958   3961         */
  3959   3962         rc = SQLITE_OK;
  3960   3963         if( unixShmSystemLock(pShmNode, F_WRLCK, UNIX_SHM_DMS, 1)==SQLITE_OK ){
  3961   3964           if( robust_ftruncate(pShmNode->h, 0) ){
................................................................................
  5153   5156       if( fd<0 ){
  5154   5157         rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
  5155   5158         goto open_finished;
  5156   5159       }
  5157   5160   
  5158   5161       /* If this process is running as root and if creating a new rollback
  5159   5162       ** journal or WAL file, set the ownership of the journal or WAL to be
  5160         -    ** the same as the original database.  If we are not running as root,
  5161         -    ** then the fchown() call will fail, but that's ok.  The "if(){}" and
  5162         -    ** the setting of the UNIXFILE_CHOWN flag are purely to silence compiler
  5163         -    ** warnings from gcc.
         5163  +    ** the same as the original database.
  5164   5164       */
  5165   5165       if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){
  5166         -      if( osFchown(fd, uid, gid)==0 ){ p->ctrlFlags |= UNIXFILE_CHOWN; }
         5166  +      osFchown(fd, uid, gid);
  5167   5167       }
  5168   5168     }
  5169   5169     assert( fd>=0 );
  5170   5170     if( pOutFlags ){
  5171   5171       *pOutFlags = flags;
  5172   5172     }
  5173   5173   

Changes to src/pager.c.

  4356   4356   
  4357   4357     /* Set the output variable to NULL in case an error occurs. */
  4358   4358     *ppPager = 0;
  4359   4359   
  4360   4360   #ifndef SQLITE_OMIT_MEMORYDB
  4361   4361     if( flags & PAGER_MEMORY ){
  4362   4362       memDb = 1;
  4363         -    zFilename = 0;
         4363  +    if( zFilename && zFilename[0] ){
         4364  +      zPathname = sqlite3DbStrDup(0, zFilename);
         4365  +      if( zPathname==0  ) return SQLITE_NOMEM;
         4366  +      nPathname = sqlite3Strlen30(zPathname);
         4367  +      zFilename = 0;
         4368  +    }
  4364   4369     }
  4365   4370   #endif
  4366   4371   
  4367   4372     /* Compute and store the full pathname in an allocated buffer pointed
  4368   4373     ** to by zPathname, length nPathname. Or, if this is a temporary file,
  4369   4374     ** leave both nPathname and zPathname set to 0.
  4370   4375     */
................................................................................
  6292   6297     }
  6293   6298   
  6294   6299     return rc;
  6295   6300   }
  6296   6301   
  6297   6302   /*
  6298   6303   ** Return the full pathname of the database file.
         6304  +**
         6305  +** Except, if the pager is in-memory only, then return an empty string if
         6306  +** nullIfMemDb is true.  This routine is called with nullIfMemDb==1 when
         6307  +** used to report the filename to the user, for compatibility with legacy
         6308  +** behavior.  But when the Btree needs to know the filename for matching to
         6309  +** shared cache, it uses nullIfMemDb==0 so that in-memory databases can
         6310  +** participate in shared-cache.
  6299   6311   */
  6300         -const char *sqlite3PagerFilename(Pager *pPager){
  6301         -  return pPager->zFilename;
         6312  +const char *sqlite3PagerFilename(Pager *pPager, int nullIfMemDb){
         6313  +  return (nullIfMemDb && pPager->memDb) ? "" : pPager->zFilename;
  6302   6314   }
  6303   6315   
  6304   6316   /*
  6305   6317   ** Return the VFS structure for the pager.
  6306   6318   */
  6307   6319   const sqlite3_vfs *sqlite3PagerVfs(Pager *pPager){
  6308   6320     return pPager->pVfs;

Changes to src/pager.h.

   147    147     int sqlite3PagerWalFramesize(Pager *pPager);
   148    148   #endif
   149    149   
   150    150   /* Functions used to query pager state and configuration. */
   151    151   u8 sqlite3PagerIsreadonly(Pager*);
   152    152   int sqlite3PagerRefcount(Pager*);
   153    153   int sqlite3PagerMemUsed(Pager*);
   154         -const char *sqlite3PagerFilename(Pager*);
          154  +const char *sqlite3PagerFilename(Pager*, int);
   155    155   const sqlite3_vfs *sqlite3PagerVfs(Pager*);
   156    156   sqlite3_file *sqlite3PagerFile(Pager*);
   157    157   const char *sqlite3PagerJournalname(Pager*);
   158    158   int sqlite3PagerNosync(Pager*);
   159    159   void *sqlite3PagerTempSpace(Pager*);
   160    160   int sqlite3PagerIsMemdb(Pager*);
   161    161   void sqlite3PagerCacheStat(Pager *, int, int, int *);

Changes to src/resolve.c.

   307    307           char *zAs = pEList->a[j].zName;
   308    308           if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
   309    309             Expr *pOrig;
   310    310             assert( pExpr->pLeft==0 && pExpr->pRight==0 );
   311    311             assert( pExpr->x.pList==0 );
   312    312             assert( pExpr->x.pSelect==0 );
   313    313             pOrig = pEList->a[j].pExpr;
   314         -          if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){
          314  +          if( (pNC->ncFlags&NC_AllowAgg)==0 && ExprHasProperty(pOrig, EP_Agg) ){
   315    315               sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
   316    316               return WRC_Abort;
   317    317             }
   318    318             resolveAlias(pParse, pEList, j, pExpr, "");
   319    319             cnt = 1;
   320    320             pMatch = 0;
   321    321             assert( zTab==0 && zDb==0 );
................................................................................
   552    552               pNC->nErr++;
   553    553             }
   554    554             pExpr->op = TK_NULL;
   555    555             return WRC_Prune;
   556    556           }
   557    557         }
   558    558   #endif
   559         -      if( is_agg && !pNC->allowAgg ){
          559  +      if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
   560    560           sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
   561    561           pNC->nErr++;
   562    562           is_agg = 0;
   563    563         }else if( no_such_func ){
   564    564           sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
   565    565           pNC->nErr++;
   566    566         }else if( wrong_num_args ){
   567    567           sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
   568    568                nId, zId);
   569    569           pNC->nErr++;
   570    570         }
   571    571         if( is_agg ){
   572    572           pExpr->op = TK_AGG_FUNCTION;
   573         -        pNC->hasAgg = 1;
          573  +        pNC->ncFlags |= NC_HasAgg;
   574    574         }
   575         -      if( is_agg ) pNC->allowAgg = 0;
          575  +      if( is_agg ) pNC->ncFlags &= ~NC_AllowAgg;
   576    576         sqlite3WalkExprList(pWalker, pList);
   577         -      if( is_agg ) pNC->allowAgg = 1;
          577  +      if( is_agg ) pNC->ncFlags |= NC_AllowAgg;
   578    578         /* FIX ME:  Compute pExpr->affinity based on the expected return
   579    579         ** type of the function 
   580    580         */
   581    581         return WRC_Prune;
   582    582       }
   583    583   #ifndef SQLITE_OMIT_SUBQUERY
   584    584       case TK_SELECT:
................................................................................
   585    585       case TK_EXISTS:  testcase( pExpr->op==TK_EXISTS );
   586    586   #endif
   587    587       case TK_IN: {
   588    588         testcase( pExpr->op==TK_IN );
   589    589         if( ExprHasProperty(pExpr, EP_xIsSelect) ){
   590    590           int nRef = pNC->nRef;
   591    591   #ifndef SQLITE_OMIT_CHECK
   592         -        if( pNC->isCheck ){
          592  +        if( (pNC->ncFlags & NC_IsCheck)!=0 ){
   593    593             sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");
   594    594           }
   595    595   #endif
   596    596           sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
   597    597           assert( pNC->nRef>=nRef );
   598    598           if( nRef!=pNC->nRef ){
   599    599             ExprSetProperty(pExpr, EP_VarSelect);
   600    600           }
   601    601         }
   602    602         break;
   603    603       }
   604    604   #ifndef SQLITE_OMIT_CHECK
   605    605       case TK_VARIABLE: {
   606         -      if( pNC->isCheck ){
          606  +      if( (pNC->ncFlags & NC_IsCheck)!=0 ){
   607    607           sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");
   608    608         }
   609    609         break;
   610    610       }
   611    611   #endif
   612    612     }
   613    613     return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue;
................................................................................
   681    681   
   682    682     /* Resolve all names in the ORDER BY term expression
   683    683     */
   684    684     memset(&nc, 0, sizeof(nc));
   685    685     nc.pParse = pParse;
   686    686     nc.pSrcList = pSelect->pSrc;
   687    687     nc.pEList = pEList;
   688         -  nc.allowAgg = 1;
          688  +  nc.ncFlags = NC_AllowAgg;
   689    689     nc.nErr = 0;
   690    690     db = pParse->db;
   691    691     savedSuppErr = db->suppressErr;
   692    692     db->suppressErr = 1;
   693    693     rc = sqlite3ResolveExprNames(&nc, pE);
   694    694     db->suppressErr = savedSuppErr;
   695    695     if( rc ) return 0;
................................................................................
   983    983           sqlite3ResolveExprNames(&sNC, p->pOffset) ){
   984    984         return WRC_Abort;
   985    985       }
   986    986     
   987    987       /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
   988    988       ** resolve the result-set expression list.
   989    989       */
   990         -    sNC.allowAgg = 1;
          990  +    sNC.ncFlags = NC_AllowAgg;
   991    991       sNC.pSrcList = p->pSrc;
   992    992       sNC.pNext = pOuterNC;
   993    993     
   994    994       /* Resolve names in the result set. */
   995    995       pEList = p->pEList;
   996    996       assert( pEList!=0 );
   997    997       for(i=0; i<pEList->nExpr; i++){
................................................................................
  1029   1029       }
  1030   1030     
  1031   1031       /* If there are no aggregate functions in the result-set, and no GROUP BY 
  1032   1032       ** expression, do not allow aggregates in any of the other expressions.
  1033   1033       */
  1034   1034       assert( (p->selFlags & SF_Aggregate)==0 );
  1035   1035       pGroupBy = p->pGroupBy;
  1036         -    if( pGroupBy || sNC.hasAgg ){
         1036  +    if( pGroupBy || (sNC.ncFlags & NC_HasAgg)!=0 ){
  1037   1037         p->selFlags |= SF_Aggregate;
  1038   1038       }else{
  1039         -      sNC.allowAgg = 0;
         1039  +      sNC.ncFlags &= ~NC_AllowAgg;
  1040   1040       }
  1041   1041     
  1042   1042       /* If a HAVING clause is present, then there must be a GROUP BY clause.
  1043   1043       */
  1044   1044       if( p->pHaving && !pGroupBy ){
  1045   1045         sqlite3ErrorMsg(pParse, "a GROUP BY clause is required before HAVING");
  1046   1046         return WRC_Abort;
................................................................................
  1061   1061         return WRC_Abort;
  1062   1062       }
  1063   1063   
  1064   1064       /* The ORDER BY and GROUP BY clauses may not refer to terms in
  1065   1065       ** outer queries 
  1066   1066       */
  1067   1067       sNC.pNext = 0;
  1068         -    sNC.allowAgg = 1;
         1068  +    sNC.ncFlags |= NC_AllowAgg;
  1069   1069   
  1070   1070       /* Process the ORDER BY clause for singleton SELECT statements.
  1071   1071       ** The ORDER BY clause for compounds SELECT statements is handled
  1072   1072       ** below, after all of the result-sets for all of the elements of
  1073   1073       ** the compound have been resolved.
  1074   1074       */
  1075   1075       if( !isCompound && resolveOrderGroupBy(&sNC, p, p->pOrderBy, "ORDER") ){
................................................................................
  1149   1149   **
  1150   1150   ** The "x" term of the order by is replaced by "a+b" to render:
  1151   1151   **
  1152   1152   **      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
  1153   1153   **
  1154   1154   ** Function calls are checked to make sure that the function is 
  1155   1155   ** defined and that the correct number of arguments are specified.
  1156         -** If the function is an aggregate function, then the pNC->hasAgg is
         1156  +** If the function is an aggregate function, then the NC_HasAgg flag is
  1157   1157   ** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
  1158   1158   ** If an expression contains aggregate functions then the EP_Agg
  1159   1159   ** property on the expression is set.
  1160   1160   **
  1161   1161   ** An error message is left in pParse if anything is amiss.  The number
  1162   1162   ** if errors is returned.
  1163   1163   */
  1164   1164   int sqlite3ResolveExprNames( 
  1165   1165     NameContext *pNC,       /* Namespace to resolve expressions in. */
  1166   1166     Expr *pExpr             /* The expression to be analyzed. */
  1167   1167   ){
  1168         -  int savedHasAgg;
         1168  +  u8 savedHasAgg;
  1169   1169     Walker w;
  1170   1170   
  1171   1171     if( pExpr==0 ) return 0;
  1172   1172   #if SQLITE_MAX_EXPR_DEPTH>0
  1173   1173     {
  1174   1174       Parse *pParse = pNC->pParse;
  1175   1175       if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
  1176   1176         return 1;
  1177   1177       }
  1178   1178       pParse->nHeight += pExpr->nHeight;
  1179   1179     }
  1180   1180   #endif
  1181         -  savedHasAgg = pNC->hasAgg;
  1182         -  pNC->hasAgg = 0;
         1181  +  savedHasAgg = pNC->ncFlags & NC_HasAgg;
         1182  +  pNC->ncFlags &= ~NC_HasAgg;
  1183   1183     w.xExprCallback = resolveExprStep;
  1184   1184     w.xSelectCallback = resolveSelectStep;
  1185   1185     w.pParse = pNC->pParse;
  1186   1186     w.u.pNC = pNC;
  1187   1187     sqlite3WalkExpr(&w, pExpr);
  1188   1188   #if SQLITE_MAX_EXPR_DEPTH>0
  1189   1189     pNC->pParse->nHeight -= pExpr->nHeight;
  1190   1190   #endif
  1191   1191     if( pNC->nErr>0 || w.pParse->nErr>0 ){
  1192   1192       ExprSetProperty(pExpr, EP_Error);
  1193   1193     }
  1194         -  if( pNC->hasAgg ){
         1194  +  if( pNC->ncFlags & NC_HasAgg ){
  1195   1195       ExprSetProperty(pExpr, EP_Agg);
  1196   1196     }else if( savedHasAgg ){
  1197         -    pNC->hasAgg = 1;
         1197  +    pNC->ncFlags |= NC_HasAgg;
  1198   1198     }
  1199   1199     return ExprHasProperty(pExpr, EP_Error);
  1200   1200   }
  1201   1201   
  1202   1202   
  1203   1203   /*
  1204   1204   ** Resolve all names in all expressions of a SELECT and in all

Changes to src/select.c.

  3145   3145     }
  3146   3146     pTab = p->pSrc->a[0].pTab;
  3147   3147     pExpr = p->pEList->a[0].pExpr;
  3148   3148     assert( pTab && !pTab->pSelect && pExpr );
  3149   3149   
  3150   3150     if( IsVirtual(pTab) ) return 0;
  3151   3151     if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
         3152  +  if( pAggInfo->nFunc==0 ) return 0;
  3152   3153     if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
  3153   3154     if( pExpr->flags&EP_Distinct ) return 0;
  3154   3155   
  3155   3156     return pTab;
  3156   3157   }
  3157   3158   
  3158   3159   /*
................................................................................
  4135   4136       sqlite3ExprAnalyzeAggList(&sNC, pOrderBy);
  4136   4137       if( pHaving ){
  4137   4138         sqlite3ExprAnalyzeAggregates(&sNC, pHaving);
  4138   4139       }
  4139   4140       sAggInfo.nAccumulator = sAggInfo.nColumn;
  4140   4141       for(i=0; i<sAggInfo.nFunc; i++){
  4141   4142         assert( !ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect) );
         4143  +      sNC.ncFlags |= NC_InAggFunc;
  4142   4144         sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
         4145  +      sNC.ncFlags &= ~NC_InAggFunc;
  4143   4146       }
  4144   4147       if( db->mallocFailed ) goto select_end;
  4145   4148   
  4146   4149       /* Processing for aggregates with GROUP BY is very different and
  4147   4150       ** much more complex than aggregates without a GROUP BY.
  4148   4151       */
  4149   4152       if( pGroupBy ){

Changes to src/shell.c.

  2180   2180           new_colv[1] = 0;
  2181   2181           callback(&data, 1, new_argv, new_colv);
  2182   2182           rc = SQLITE_OK;
  2183   2183         }else{
  2184   2184           zShellStatic = azArg[1];
  2185   2185           rc = sqlite3_exec(p->db,
  2186   2186             "SELECT sql FROM "
  2187         -          "  (SELECT sql sql, type type, tbl_name tbl_name, name name"
         2187  +          "  (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
  2188   2188             "     FROM sqlite_master UNION ALL"
  2189         -          "   SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
         2189  +          "   SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
  2190   2190             "WHERE lower(tbl_name) LIKE shellstatic()"
  2191   2191             "  AND type!='meta' AND sql NOTNULL "
  2192         -          "ORDER BY substr(type,2,1), name",
         2192  +          "ORDER BY substr(type,2,1), "
         2193  +                  " CASE type WHEN 'view' THEN rowid ELSE name END",
  2193   2194             callback, &data, &zErrMsg);
  2194   2195           zShellStatic = 0;
  2195   2196         }
  2196   2197       }else{
  2197   2198         rc = sqlite3_exec(p->db,
  2198   2199            "SELECT sql FROM "
  2199         -         "  (SELECT sql sql, type type, tbl_name tbl_name, name name"
         2200  +         "  (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
  2200   2201            "     FROM sqlite_master UNION ALL"
  2201         -         "   SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
         2202  +         "   SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
  2202   2203            "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
  2203         -         "ORDER BY substr(type,2,1), name",
         2204  +         "ORDER BY substr(type,2,1),"
         2205  +                  " CASE type WHEN 'view' THEN rowid ELSE name END",
  2204   2206            callback, &data, &zErrMsg
  2205   2207         );
  2206   2208       }
  2207   2209       if( zErrMsg ){
  2208   2210         fprintf(stderr,"Error: %s\n", zErrMsg);
  2209   2211         sqlite3_free(zErrMsg);
  2210   2212         rc = 1;

Changes to src/sqlite.h.in.

   469    469   #define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */
   470    470   #define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */
   471    471   #define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */
   472    472   #define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */
   473    473   #define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */
   474    474   #define SQLITE_OPEN_AUTOPROXY        0x00000020  /* VFS only */
   475    475   #define SQLITE_OPEN_URI              0x00000040  /* Ok for sqlite3_open_v2() */
          476  +#define SQLITE_OPEN_MEMORY           0x00000080  /* Ok for sqlite3_open_v2() */
   476    477   #define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */
   477    478   #define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */
   478    479   #define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */
   479    480   #define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */
   480    481   #define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */
   481    482   #define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */
   482    483   #define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */
................................................................................
  2566   2567   **     a VFS object that provides the operating system interface that should
  2567   2568   **     be used to access the database file on disk. ^If this option is set to
  2568   2569   **     an empty string the default VFS object is used. ^Specifying an unknown
  2569   2570   **     VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is
  2570   2571   **     present, then the VFS specified by the option takes precedence over
  2571   2572   **     the value passed as the fourth parameter to sqlite3_open_v2().
  2572   2573   **
  2573         -**   <li> <b>mode</b>: ^(The mode parameter may be set to either "ro", "rw" or
  2574         -**     "rwc". Attempting to set it to any other value is an error)^. 
         2574  +**   <li> <b>mode</b>: ^(The mode parameter may be set to either "ro", "rw",
         2575  +**     "rwc", or "memory". Attempting to set it to any other value is
         2576  +**     an error)^. 
  2575   2577   **     ^If "ro" is specified, then the database is opened for read-only 
  2576   2578   **     access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the 
  2577   2579   **     third argument to sqlite3_prepare_v2(). ^If the mode option is set to 
  2578   2580   **     "rw", then the database is opened for read-write (but not create) 
  2579   2581   **     access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had 
  2580   2582   **     been set. ^Value "rwc" is equivalent to setting both 
  2581         -**     SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If sqlite3_open_v2() is 
  2582         -**     used, it is an error to specify a value for the mode parameter that is 
  2583         -**     less restrictive than that specified by the flags passed as the third 
  2584         -**     parameter.
         2583  +**     SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE.  ^If the mode option is
         2584  +**     set to "memory" then a pure [in-memory database] that never reads
         2585  +**     or writes from disk is used. ^It is an error to specify a value for
         2586  +**     the mode parameter that is less restrictive than that specified by
         2587  +**     the flags passed in the third parameter to sqlite3_open_v2().
  2585   2588   **
  2586   2589   **   <li> <b>cache</b>: ^The cache parameter may be set to either "shared" or
  2587   2590   **     "private". ^Setting it to "shared" is equivalent to setting the
  2588   2591   **     SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to
  2589   2592   **     sqlite3_open_v2(). ^Setting the cache parameter to "private" is 
  2590   2593   **     equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.
  2591   2594   **     ^If sqlite3_open_v2() is used and the "cache" parameter is present in
................................................................................
  4618   4621     sqlite3*, 
  4619   4622     void(*)(void *,int ,char const *,char const *,sqlite3_int64),
  4620   4623     void*
  4621   4624   );
  4622   4625   
  4623   4626   /*
  4624   4627   ** CAPI3REF: Enable Or Disable Shared Pager Cache
  4625         -** KEYWORDS: {shared cache}
  4626   4628   **
  4627   4629   ** ^(This routine enables or disables the sharing of the database cache
  4628   4630   ** and schema data structures between [database connection | connections]
  4629   4631   ** to the same database. Sharing is enabled if the argument is true
  4630   4632   ** and disabled if the argument is false.)^
  4631   4633   **
  4632   4634   ** ^Cache sharing is enabled and disabled for an entire process.

Changes to src/sqliteInt.h.

   199    199   ** The TCL headers are only needed when compiling the TCL bindings.
   200    200   */
   201    201   #if defined(SQLITE_TCL) || defined(TCLSH)
   202    202   # include <tcl.h>
   203    203   #endif
   204    204   
   205    205   /*
   206         -** Many people are failing to set -DNDEBUG=1 when compiling SQLite.
   207         -** Setting NDEBUG makes the code smaller and run faster.  So the following
   208         -** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1
   209         -** option is set.  Thus NDEBUG becomes an opt-in rather than an opt-out
          206  +** NDEBUG and SQLITE_DEBUG are opposites.  It should always be true that
          207  +** defined(NDEBUG)==!defined(SQLITE_DEBUG).  If this is not currently true,
          208  +** make it true by defining or undefining NDEBUG.
          209  +**
          210  +** Setting NDEBUG makes the code smaller and run faster by disabling the
          211  +** number assert() statements in the code.  So we want the default action
          212  +** to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG
          213  +** is set.  Thus NDEBUG becomes an opt-in rather than an opt-out
   210    214   ** feature.
   211    215   */
   212    216   #if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
   213    217   # define NDEBUG 1
          218  +#endif
          219  +#if defined(NDEBUG) && defined(SQLITE_DEBUG)
          220  +# undef NDEBUG
   214    221   #endif
   215    222   
   216    223   /*
   217    224   ** The testcase() macro is used to aid in coverage testing.  When 
   218    225   ** doing coverage testing, the condition inside the argument to
   219    226   ** testcase() must be evaluated both true and false in order to
   220    227   ** get full branch coverage.  The testcase() macro is inserted
................................................................................
  2002   2009   ** NameContext list corresponds to searching through successively outer
  2003   2010   ** subqueries looking for a match.
  2004   2011   */
  2005   2012   struct NameContext {
  2006   2013     Parse *pParse;       /* The parser */
  2007   2014     SrcList *pSrcList;   /* One or more tables used to resolve names */
  2008   2015     ExprList *pEList;    /* Optional list of named expressions */
         2016  +  AggInfo *pAggInfo;   /* Information about aggregates at this level */
         2017  +  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
  2009   2018     int nRef;            /* Number of names resolved by this context */
  2010   2019     int nErr;            /* Number of errors encountered while resolving names */
  2011         -  u8 allowAgg;         /* Aggregate functions allowed here */
  2012         -  u8 hasAgg;           /* True if aggregates are seen */
  2013         -  u8 isCheck;          /* True if resolving names in a CHECK constraint */
  2014         -  AggInfo *pAggInfo;   /* Information about aggregates at this level */
  2015         -  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
         2020  +  u8 ncFlags;          /* Zero or more NC_* flags defined below */
  2016   2021   };
  2017   2022   
         2023  +/*
         2024  +** Allowed values for the NameContext, ncFlags field.
         2025  +*/
         2026  +#define NC_AllowAgg  0x01    /* Aggregate functions are allowed here */
         2027  +#define NC_HasAgg    0x02    /* One or more aggregate functions seen */
         2028  +#define NC_IsCheck   0x04    /* True if resolving names in a CHECK constraint */
         2029  +#define NC_InAggFunc 0x08    /* True if analyzing arguments to an agg func */
         2030  +
  2018   2031   /*
  2019   2032   ** An instance of the following structure contains all information
  2020   2033   ** needed to generate code for a single SELECT statement.
  2021   2034   **
  2022   2035   ** nLimit is set to -1 if there is no LIMIT clause.  nOffset is set to 0.
  2023   2036   ** If there is a LIMIT clause, the parser sets nLimit to the value of the
  2024   2037   ** limit and nOffset to the value of the offset (or 0 if there is not

Changes to src/test_btree.c.

    29     29     Tcl_Obj *CONST objv[]
    30     30   ){
    31     31   #ifndef SQLITE_OMIT_SHARED_CACHE
    32     32     extern BtShared *sqlite3SharedCacheList;
    33     33     BtShared *pBt;
    34     34     Tcl_Obj *pRet = Tcl_NewObj();
    35     35     for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
    36         -    const char *zFile = sqlite3PagerFilename(pBt->pPager);
           36  +    const char *zFile = sqlite3PagerFilename(pBt->pPager, 1);
    37     37       Tcl_ListObjAppendElement(interp, pRet, Tcl_NewStringObj(zFile, -1));
    38     38       Tcl_ListObjAppendElement(interp, pRet, Tcl_NewIntObj(pBt->nRef));
    39     39     }
    40     40     Tcl_SetObjResult(interp, pRet);
    41     41   #endif
    42     42     return TCL_OK;
    43     43   }

Changes to src/test_config.c.

   302    302   #endif
   303    303   
   304    304   #ifdef SQLITE_ENABLE_FTS3
   305    305     Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL_GLOBAL_ONLY);
   306    306   #else
   307    307     Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
   308    308   #endif
          309  +
          310  +#if !defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_DISABLE_FTS3_UNICODE)
          311  +  Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "0", TCL_GLOBAL_ONLY);
          312  +#else
          313  +  Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "1", TCL_GLOBAL_ONLY);
          314  +#endif
   309    315   
   310    316   #ifdef SQLITE_OMIT_GET_TABLE
   311    317     Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL_GLOBAL_ONLY);
   312    318   #else
   313    319     Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL_GLOBAL_ONLY);
   314    320   #endif
   315    321   

Changes to src/test_quota.c.

    40     40   #define sqlite3_mutex_enter(X)
    41     41   #define sqlite3_mutex_try(X)      SQLITE_OK
    42     42   #define sqlite3_mutex_leave(X)
    43     43   #define sqlite3_mutex_held(X)     ((void)(X),1)
    44     44   #define sqlite3_mutex_notheld(X)  ((void)(X),1)
    45     45   #endif /* SQLITE_THREADSAFE==0 */
    46     46   
           47  +
           48  +/*
           49  +** Figure out if we are dealing with Unix, Windows, or some other
           50  +** operating system.  After the following block of preprocess macros,
           51  +** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
           52  +** will defined to either 1 or 0.  One of the four will be 1.  The other 
           53  +** three will be 0.
           54  +*/
           55  +#if defined(SQLITE_OS_OTHER)
           56  +# if SQLITE_OS_OTHER==1
           57  +#   undef SQLITE_OS_UNIX
           58  +#   define SQLITE_OS_UNIX 0
           59  +#   undef SQLITE_OS_WIN
           60  +#   define SQLITE_OS_WIN 0
           61  +#   undef SQLITE_OS_OS2
           62  +#   define SQLITE_OS_OS2 0
           63  +# else
           64  +#   undef SQLITE_OS_OTHER
           65  +# endif
           66  +#endif
           67  +#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
           68  +# define SQLITE_OS_OTHER 0
           69  +# ifndef SQLITE_OS_WIN
           70  +#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) \
           71  +                       || defined(__MINGW32__) || defined(__BORLANDC__)
           72  +#     define SQLITE_OS_WIN 1
           73  +#     define SQLITE_OS_UNIX 0
           74  +#     define SQLITE_OS_OS2 0
           75  +#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) \
           76  +                          || defined(_OS2_) || defined(__OS2__)
           77  +#     define SQLITE_OS_WIN 0
           78  +#     define SQLITE_OS_UNIX 0
           79  +#     define SQLITE_OS_OS2 1
           80  +#   else
           81  +#     define SQLITE_OS_WIN 0
           82  +#     define SQLITE_OS_UNIX 1
           83  +#     define SQLITE_OS_OS2 0
           84  +#  endif
           85  +# else
           86  +#  define SQLITE_OS_UNIX 0
           87  +#  define SQLITE_OS_OS2 0
           88  +# endif
           89  +#else
           90  +# ifndef SQLITE_OS_WIN
           91  +#  define SQLITE_OS_WIN 0
           92  +# endif
           93  +#endif
           94  +
           95  +#if SQLITE_OS_UNIX
           96  +# include <unistd.h>
           97  +#endif
           98  +#if SQLITE_OS_WIN
           99  +# include <windows.h>
          100  +# include <io.h>
          101  +#endif
          102  +
    47    103   
    48    104   /************************ Object Definitions ******************************/
    49    105   
    50    106   /* Forward declaration of all object types */
    51    107   typedef struct quotaGroup quotaGroup;
    52    108   typedef struct quotaConn quotaConn;
    53    109   typedef struct quotaFile quotaFile;
................................................................................
   355    411         pFile->ppPrev = &pGroup->pFiles;
   356    412         pGroup->pFiles = pFile;
   357    413         pFile->pGroup = pGroup;
   358    414       }
   359    415     }
   360    416     return pFile;
   361    417   }
   362         -
   363         -/*
   364         -** Figure out if we are dealing with Unix, Windows, or some other
   365         -** operating system.  After the following block of preprocess macros,
   366         -** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
   367         -** will defined to either 1 or 0.  One of the four will be 1.  The other 
   368         -** three will be 0.
   369         -*/
   370         -#if defined(SQLITE_OS_OTHER)
   371         -# if SQLITE_OS_OTHER==1
   372         -#   undef SQLITE_OS_UNIX
   373         -#   define SQLITE_OS_UNIX 0
   374         -#   undef SQLITE_OS_WIN
   375         -#   define SQLITE_OS_WIN 0
   376         -#   undef SQLITE_OS_OS2
   377         -#   define SQLITE_OS_OS2 0
   378         -# else
   379         -#   undef SQLITE_OS_OTHER
   380         -# endif
   381         -#endif
   382         -#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
   383         -# define SQLITE_OS_OTHER 0
   384         -# ifndef SQLITE_OS_WIN
   385         -#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) \
   386         -                       || defined(__MINGW32__) || defined(__BORLANDC__)
   387         -#     define SQLITE_OS_WIN 1
   388         -#     define SQLITE_OS_UNIX 0
   389         -#     define SQLITE_OS_OS2 0
   390         -#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) \
   391         -                          || defined(_OS2_) || defined(__OS2__)
   392         -#     define SQLITE_OS_WIN 0
   393         -#     define SQLITE_OS_UNIX 0
   394         -#     define SQLITE_OS_OS2 1
   395         -#   else
   396         -#     define SQLITE_OS_WIN 0
   397         -#     define SQLITE_OS_UNIX 1
   398         -#     define SQLITE_OS_OS2 0
   399         -#  endif
   400         -# else
   401         -#  define SQLITE_OS_UNIX 0
   402         -#  define SQLITE_OS_OS2 0
   403         -# endif
   404         -#else
   405         -# ifndef SQLITE_OS_WIN
   406         -#  define SQLITE_OS_WIN 0
   407         -# endif
   408         -#endif
   409         -
   410         -#if SQLITE_OS_UNIX
   411         -# include <unistd.h>
   412         -#endif
   413         -#if SQLITE_OS_WIN
   414         -# include <windows.h>
   415         -# include <io.h>
   416         -#endif
   417         -
   418    418   /*
   419    419   ** Translate UTF8 to MBCS for use in fopen() calls.  Return a pointer to the
   420    420   ** translated text..  Call quota_mbcs_free() to deallocate any memory
   421    421   ** used to store the returned pointer when done.
   422    422   */
   423    423   static char *quota_utf8_to_mbcs(const char *zUtf8){
   424    424   #if SQLITE_OS_WIN
................................................................................
  1038   1038   }
  1039   1039   
  1040   1040   /*
  1041   1041   ** Write content into a quota_FILE.  Invoke the quota callback and block
  1042   1042   ** the write if we exceed quota.
  1043   1043   */
  1044   1044   size_t sqlite3_quota_fwrite(
  1045         -  void *pBuf,            /* Take content to write from here */
         1045  +  const void *pBuf,      /* Take content to write from here */
  1046   1046     size_t size,           /* Size of each element */
  1047   1047     size_t nmemb,          /* Number of elements */
  1048   1048     quota_FILE *p          /* Write to this quota_FILE objecct */
  1049   1049   ){
  1050   1050     sqlite3_int64 iOfst;
  1051   1051     sqlite3_int64 iEnd;
  1052   1052     sqlite3_int64 szNew;
  1053   1053     quotaFile *pFile;
  1054   1054     size_t rc;
  1055         -  
         1055  +
  1056   1056     iOfst = ftell(p->f);
  1057   1057     iEnd = iOfst + size*nmemb;
  1058   1058     pFile = p->pFile;
  1059   1059     if( pFile && pFile->iSize<iEnd ){
  1060   1060       quotaGroup *pGroup = pFile->pGroup;
  1061   1061       quotaEnter();
  1062   1062       szNew = pGroup->iSize - pFile->iSize + iEnd;
................................................................................
  1087   1087       sqlite3_int64 iNewEnd = iOfst + size*nWritten;
  1088   1088       if( iNewEnd<iEnd ) iNewEnd = iEnd;
  1089   1089       quotaEnter();
  1090   1090       pFile->pGroup->iSize += iNewEnd - pFile->iSize;
  1091   1091       pFile->iSize = iNewEnd;
  1092   1092       quotaLeave();
  1093   1093     }
  1094         -  return rc;    
         1094  +  return rc;
  1095   1095   }
  1096   1096   
  1097   1097   /*
  1098   1098   ** Close an open quota_FILE stream.
  1099   1099   */
  1100   1100   int sqlite3_quota_fclose(quota_FILE *p){
  1101   1101     int rc;
................................................................................
  1155   1155   
  1156   1156   /*
  1157   1157   ** Tell the current location of a quota_FILE stream.
  1158   1158   */
  1159   1159   long sqlite3_quota_ftell(quota_FILE *p){
  1160   1160     return ftell(p->f);
  1161   1161   }
         1162  +
         1163  +/*
         1164  +** Test the error indicator for the given file.
         1165  +*/
         1166  +int sqlite3_quota_ferror(quota_FILE *p){
         1167  +  return ferror(p->f);
         1168  +}
  1162   1169   
  1163   1170   /*
  1164   1171   ** Truncate a file to szNew bytes.
  1165   1172   */
  1166   1173   int sqlite3_quota_ftruncate(quota_FILE *p, sqlite3_int64 szNew){
  1167   1174     quotaFile *pFile = p->pFile;
  1168   1175     int rc;
................................................................................
  1232   1239   
  1233   1240   /*
  1234   1241   ** Return the size of the file, as it is known to the quota subsystem.
  1235   1242   */
  1236   1243   sqlite3_int64 sqlite3_quota_file_size(quota_FILE *p){
  1237   1244     return p->pFile ? p->pFile->iSize : -1;
  1238   1245   }
         1246  + 
         1247  +/*
         1248  +** Determine the amount of data in bytes available for reading
         1249  +** in the given file.
         1250  +*/
         1251  +long sqlite3_quota_file_available(quota_FILE *p){
         1252  +  FILE* f = p->f;
         1253  +  long pos1, pos2;
         1254  +  int rc;
         1255  +  pos1 = ftell(f);
         1256  +  if ( pos1 < 0 ) return -1;
         1257  +  rc = fseek(f, 0, SEEK_END);
         1258  +  if ( rc != 0 ) return -1;
         1259  +  pos2 = ftell(f);
         1260  +  if ( pos2 < 0 ) return -1;
         1261  +  rc = fseek(f, pos1, SEEK_SET);
         1262  +  if ( rc != 0 ) return -1;
         1263  +  return pos2 - pos1;
         1264  +}
  1239   1265   
  1240   1266   /*
  1241   1267   ** Remove a managed file.  Update quotas accordingly.
  1242   1268   */
  1243   1269   int sqlite3_quota_remove(const char *zFilename){
  1244   1270     char *zFull;            /* Full pathname for zFilename */
  1245   1271     size_t nFull;           /* Number of bytes in zFilename */
................................................................................
  1890   1916     }
  1891   1917     zPattern = Tcl_GetString(objv[1]);
  1892   1918     zText = Tcl_GetString(objv[2]);
  1893   1919     rc = quotaStrglob(zPattern, zText);
  1894   1920     Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
  1895   1921     return TCL_OK;
  1896   1922   }
         1923  +
         1924  +/*
         1925  +** tclcmd: sqlite3_quota_file_available HANDLE
         1926  +**
         1927  +** Return the number of bytes from the current file point to the end of
         1928  +** the file.
         1929  +*/
         1930  +static int test_quota_file_available(
         1931  +  void * clientData,
         1932  +  Tcl_Interp *interp,
         1933  +  int objc,
         1934  +  Tcl_Obj *CONST objv[]
         1935  +){
         1936  +  quota_FILE *p;
         1937  +  sqlite3_int64 x;
         1938  +  if( objc!=2 ){
         1939  +    Tcl_WrongNumArgs(interp, 1, objv, "HANDLE");
         1940  +    return TCL_ERROR;
         1941  +  }
         1942  +  p = sqlite3TestTextToPtr(Tcl_GetString(objv[1]));
         1943  +  x = sqlite3_quota_file_available(p);
         1944  +  Tcl_SetObjResult(interp, Tcl_NewWideIntObj(x));
         1945  +  return TCL_OK;
         1946  +}
         1947  +
         1948  +/*
         1949  +** tclcmd: sqlite3_quota_ferror HANDLE
         1950  +**
         1951  +** Return true if the file handle is in the error state.
         1952  +*/
         1953  +static int test_quota_ferror(
         1954  +  void * clientData,
         1955  +  Tcl_Interp *interp,
         1956  +  int objc,
         1957  +  Tcl_Obj *CONST objv[]
         1958  +){
         1959  +  quota_FILE *p;
         1960  +  int x;
         1961  +  if( objc!=2 ){
         1962  +    Tcl_WrongNumArgs(interp, 1, objv, "HANDLE");
         1963  +    return TCL_ERROR;
         1964  +  }
         1965  +  p = sqlite3TestTextToPtr(Tcl_GetString(objv[1]));
         1966  +  x = sqlite3_quota_ferror(p);
         1967  +  Tcl_SetObjResult(interp, Tcl_NewIntObj(x));
         1968  +  return TCL_OK;
         1969  +}
  1897   1970   
  1898   1971   /*
  1899   1972   ** This routine registers the custom TCL commands defined in this
  1900   1973   ** module.  This should be the only procedure visible from outside
  1901   1974   ** of this module.
  1902   1975   */
  1903   1976   int Sqlitequota_Init(Tcl_Interp *interp){
................................................................................
  1920   1993       { "sqlite3_quota_ftell",         test_quota_ftell },
  1921   1994       { "sqlite3_quota_ftruncate",     test_quota_ftruncate },
  1922   1995       { "sqlite3_quota_file_size",     test_quota_file_size },
  1923   1996       { "sqlite3_quota_file_truesize", test_quota_file_truesize },
  1924   1997       { "sqlite3_quota_file_mtime",    test_quota_file_mtime },
  1925   1998       { "sqlite3_quota_remove",        test_quota_remove },
  1926   1999       { "sqlite3_quota_glob",          test_quota_glob },
         2000  +    { "sqlite3_quota_file_available",test_quota_file_available },
         2001  +    { "sqlite3_quota_ferror",        test_quota_ferror },
  1927   2002     };
  1928   2003     int i;
  1929   2004   
  1930   2005     for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){
  1931   2006       Tcl_CreateObjCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0);
  1932   2007     }
  1933   2008   
  1934   2009     return TCL_OK;
  1935   2010   }
  1936   2011   #endif

Changes to src/test_quota.h.

   158    158   
   159    159   /*
   160    160   ** Perform I/O against a quota_FILE object.  When doing writes, the
   161    161   ** quota mechanism may result in a short write, in order to prevent
   162    162   ** the sum of sizes of all files from going over quota.
   163    163   */
   164    164   size_t sqlite3_quota_fread(void*, size_t, size_t, quota_FILE*);
   165         -size_t sqlite3_quota_fwrite(void*, size_t, size_t, quota_FILE*);
          165  +size_t sqlite3_quota_fwrite(const void*, size_t, size_t, quota_FILE*);
   166    166   
   167    167   /*
   168    168   ** Flush all written content held in memory buffers out to disk.
   169    169   ** This is the equivalent of fflush() in the standard library.
   170    170   **
   171    171   ** If the hardSync parameter is true (non-zero) then this routine
   172    172   ** also forces OS buffers to disk - the equivalent of fsync().
................................................................................
   186    186   ** Move the read/write pointer for a quota_FILE object.  Or tell the
   187    187   ** current location of the read/write pointer.
   188    188   */
   189    189   int sqlite3_quota_fseek(quota_FILE*, long, int);
   190    190   void sqlite3_quota_rewind(quota_FILE*);
   191    191   long sqlite3_quota_ftell(quota_FILE*);
   192    192   
          193  +/*
          194  +** Test the error indicator for the given file.
          195  +**
          196  +** Return non-zero if the error indicator is set.
          197  +*/
          198  +int sqlite3_quota_ferror(quota_FILE*);
          199  +
   193    200   /*
   194    201   ** Truncate a file previously opened by sqlite3_quota_fopen().  Return
   195    202   ** zero on success and non-zero on any kind of failure.
   196    203   **
   197    204   ** The newSize argument must be less than or equal to the current file size.
   198    205   ** Any attempt to "truncate" a file to a larger size results in 
   199    206   ** undefined behavior.
   200    207   */
   201         -int sqlite3_quota_ftrunate(quota_FILE*, sqlite3_int64 newSize);
          208  +int sqlite3_quota_ftruncate(quota_FILE*, sqlite3_int64 newSize);
   202    209   
   203    210   /*
   204    211   ** Return the last modification time of the opened file, in seconds
   205    212   ** since 1970.
   206    213   */
   207    214   int sqlite3_quota_file_mtime(quota_FILE*, time_t *pTime);
   208    215   
................................................................................
   228    235   ** pending writes have not yet been flushed to disk.
   229    236   **
   230    237   ** Return -1 if the file does not exist or if the size of the file
   231    238   ** cannot be determined for some reason.
   232    239   */
   233    240   sqlite3_int64 sqlite3_quota_file_truesize(quota_FILE*);
   234    241   
          242  +/*
          243  +** Determine the amount of data in bytes available for reading
          244  +** in the given file.
          245  +**
          246  +** Return -1 if the amount cannot be determined for some reason.
          247  +*/
          248  +long sqlite3_quota_file_available(quota_FILE*);
          249  +
   235    250   /*
   236    251   ** Delete a file from the disk, if that file is under quota management.
   237    252   ** Adjust quotas accordingly.
   238    253   **
   239    254   ** If zFilename is the name of a directory that matches one of the
   240    255   ** quota glob patterns, then all files under quota management that
   241    256   ** are contained within that directory are deleted.

Changes to src/vdbe.c.

  5507   5507     pBt = db->aDb[pOp->p1].pBt;
  5508   5508     pPager = sqlite3BtreePager(pBt);
  5509   5509     eOld = sqlite3PagerGetJournalMode(pPager);
  5510   5510     if( eNew==PAGER_JOURNALMODE_QUERY ) eNew = eOld;
  5511   5511     if( !sqlite3PagerOkToChangeJournalMode(pPager) ) eNew = eOld;
  5512   5512   
  5513   5513   #ifndef SQLITE_OMIT_WAL
  5514         -  zFilename = sqlite3PagerFilename(pPager);
         5514  +  zFilename = sqlite3PagerFilename(pPager, 1);
  5515   5515   
  5516   5516     /* Do not allow a transition to journal_mode=WAL for a database
  5517   5517     ** in temporary storage or if the VFS does not support shared memory 
  5518   5518     */
  5519   5519     if( eNew==PAGER_JOURNALMODE_WAL
  5520   5520      && (sqlite3Strlen30(zFilename)==0           /* Temp file */
  5521   5521          || !sqlite3PagerWalSupported(pPager))   /* No shared-memory support */

Changes to src/vdbetrace.c.

   163    163   #if defined(SQLITE_ENABLE_TREE_EXPLAIN)
   164    164   
   165    165   /*
   166    166   ** Allocate a new Explain object
   167    167   */
   168    168   void sqlite3ExplainBegin(Vdbe *pVdbe){
   169    169     if( pVdbe ){
          170  +    Explain *p;
   170    171       sqlite3BeginBenignMalloc();
   171         -    Explain *p = sqlite3_malloc( sizeof(Explain) );
          172  +    p = sqlite3_malloc( sizeof(Explain) );
   172    173       if( p ){
   173    174         memset(p, 0, sizeof(*p));
   174    175         p->pVdbe = pVdbe;
   175    176         sqlite3_free(pVdbe->pExplain);
   176    177         pVdbe->pExplain = p;
   177    178         sqlite3StrAccumInit(&p->str, p->zBase, sizeof(p->zBase),
   178    179                             SQLITE_MAX_LENGTH);

Changes to test/e_uri.test.

   250    250   foreach {tn uri error} "
   251    251     1    {file:test.db?mode=ro}    {not an error}
   252    252     2    {file:test.db?mode=rw}    {not an error}
   253    253     3    {file:test.db?mode=rwc}   {not an error}
   254    254     4    {file:test.db?mode=Ro}    {no such access mode: Ro}
   255    255     5    {file:test.db?mode=Rw}    {no such access mode: Rw}
   256    256     6    {file:test.db?mode=Rwc}   {no such access mode: Rwc}
          257  +  7    {file:test.db?mode=memory} {not an error}
          258  +  8    {file:test.db?mode=MEMORY} {no such access mode: MEMORY}
   257    259   " {
   258    260     do_test 7.$tn { open_uri_error $uri } $error
   259    261   }
   260    262   
   261    263   
   262    264   # EVIDENCE-OF: R-09651-31805 If "ro" is specified, then the database is
   263    265   # opened for read-only access, just as if the SQLITE_OPEN_READONLY flag

Changes to test/fts3fault2.test.

   126    126     faultsim_restore_and_reopen
   127    127     db eval {SELECT * FROM sqlite_master}
   128    128   } -body {
   129    129     execsql { INSERT INTO ft(ft) VALUES('rebuild') }
   130    130   } -test {
   131    131     faultsim_test_result {0 {}}
   132    132   }
          133  +
          134  +ifcapable fts3_unicode {
          135  +  do_test 5.0 {
          136  +    faultsim_delete_and_reopen
          137  +    execsql {
          138  +      CREATE VIRTUAL TABLE ft USING fts4(a, tokenize=unicode61);
          139  +    }
          140  +    faultsim_save_and_close
          141  +  } {}
          142  +  
          143  +  do_faultsim_test 5.1 -faults oom* -prep {
          144  +    faultsim_restore_and_reopen
          145  +    db eval {SELECT * FROM sqlite_master}
          146  +  } -body {
          147  +    execsql { INSERT INTO ft VALUES('the quick brown fox'); }
          148  +    execsql { INSERT INTO ft VALUES(
          149  +       'theunusuallylongtokenthatjustdragsonandonandonandthendragsonsomemoreeof'
          150  +      );
          151  +    }
          152  +    execsql { SELECT docid FROM ft WHERE ft MATCH 'th*' }
          153  +  } -test {
          154  +    faultsim_test_result {0 {1 2}}
          155  +  }
          156  +}
   133    157   
   134    158   finish_test

Added test/fts4unicode.test.

            1  +# 2012 May 25
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +#*************************************************************************
           11  +#
           12  +# The tests in this file focus on testing the "unicode" FTS tokenizer.
           13  +#
           14  +
           15  +set testdir [file dirname $argv0]
           16  +source $testdir/tester.tcl
           17  +ifcapable !fts3_unicode { finish_test ; return }
           18  +set ::testprefix fts4unicode
           19  +
           20  +proc do_unicode_token_test {tn input res} {
           21  +  set input [string map {' ''} $input]
           22  +  uplevel [list do_execsql_test $tn "
           23  +    SELECT fts3_tokenizer_test('unicode61', '$input');
           24  +  " [list [list {*}$res]]]
           25  +}
           26  +
           27  +do_unicode_token_test 1.0 {a B c D} {0 a a 1 b B 2 c c 3 d D}
           28  +do_unicode_token_test 1.1 {ń ÷ ‹} {0 š ń 1 Ų ÷ 2 Ł ‹}
           29  +do_unicode_token_test 1.2 {xńx x÷x x‹x} {0 xšx xńx 1 xŲx x÷x 2 xŁx x‹x}
           30  +
           31  +# 0x00DF is a small "sharp s". 0x1E9E is a capital sharp s.
           32  +do_unicode_token_test 1.3 "\uDF" "0 \uDF \uDF"
           33  +do_unicode_token_test 1.4 "\u1E9E" "0 Ŗ \u1E9E"
           34  +do_unicode_token_test 1.5 "\u1E9E" "0 \uDF \u1E9E"
           35  +
           36  +do_unicode_token_test 1.6 "The quick brown fox" {
           37  +  0 the The 1 quick quick 2 brown brown 3 fox fox
           38  +}
           39  +do_unicode_token_test 1.7 "The\u00bfquick\u224ebrown\u2263fox" {
           40  +  0 the The 1 quick quick 2 brown brown 3 fox fox
           41  +}
           42  +
           43  +#-------------------------------------------------------------------------
           44  +#
           45  +set docs [list {
           46  +  Enhance the INSERT syntax to allow multiple rows to be inserted via the
           47  +  VALUES clause.
           48  +} {
           49  +  Enhance the CREATE VIRTUAL TABLE command to support the IF NOT EXISTS clause.
           50  +} {
           51  +  Added the sqlite3_stricmp() interface as a counterpart to sqlite3_strnicmp().
           52  +} {
           53  +  Added the sqlite3_db_readonly() interface.
           54  +} {
           55  +  Added the SQLITE_FCNTL_PRAGMA file control, giving VFS implementations the
           56  +  ability to add new PRAGMA statements or to override built-in PRAGMAs.  
           57  +} {
           58  +  Queries of the form: "SELECT max(x), y FROM table" returns the value of y on
           59  +  the same row that contains the maximum x value.
           60  +} {
           61  +  Added support for the FTS4 languageid option.
           62  +} {
           63  +  Documented support for the FTS4 content option. This feature has actually
           64  +  been in the code since version 3.7.9 but is only now considered to be
           65  +  officially supported.  
           66  +} {
           67  +  Pending statements no longer block ROLLBACK. Instead, the pending statement
           68  +  will return SQLITE_ABORT upon next access after the ROLLBACK.  
           69  +} {
           70  +  Improvements to the handling of CSV inputs in the command-line shell
           71  +} {
           72  +  Fix a bug introduced in version 3.7.10 that might cause a LEFT JOIN to be
           73  +  incorrectly converted into an INNER JOIN if the WHERE clause indexable terms
           74  +  connected by OR.  
           75  +}]
           76  +
           77  +set map(a) [list "\u00C4" "\u00E4"]  ; # LATIN LETTER A WITH DIAERESIS
           78  +set map(e) [list "\u00CB" "\u00EB"]  ; # LATIN LETTER E WITH DIAERESIS
           79  +set map(i) [list "\u00CF" "\u00EF"]  ; # LATIN LETTER I WITH DIAERESIS
           80  +set map(o) [list "\u00D6" "\u00F6"]  ; # LATIN LETTER O WITH DIAERESIS
           81  +set map(u) [list "\u00DC" "\u00FC"]  ; # LATIN LETTER U WITH DIAERESIS
           82  +set map(y) [list "\u0178" "\u00FF"]  ; # LATIN LETTER Y WITH DIAERESIS
           83  +set map(h) [list "\u1E26" "\u1E27"]  ; # LATIN LETTER H WITH DIAERESIS
           84  +set map(w) [list "\u1E84" "\u1E85"]  ; # LATIN LETTER W WITH DIAERESIS
           85  +set map(x) [list "\u1E8C" "\u1E8D"]  ; # LATIN LETTER X WITH DIAERESIS
           86  +foreach k [array names map] {
           87  +  lappend mappings [string toupper $k] [lindex $map($k) 0] 
           88  +  lappend mappings $k [lindex $map($k) 1]
           89  +}
           90  +proc mapdoc {doc} { 
           91  +  set doc [regsub -all {[[:space:]]+} $doc " "]
           92  +  string map $::mappings [string trim $doc] 
           93  +}
           94  +
           95  +do_test 2.0 {
           96  +  execsql { CREATE VIRTUAL TABLE t2 USING fts4(tokenize=unicode61, x); }
           97  +  foreach doc $docs {
           98  +    set d [mapdoc $doc]
           99  +    execsql { INSERT INTO t2 VALUES($d) }
          100  +  }
          101  +} {}
          102  +
          103  +do_test 2.1 {
          104  +  set q [mapdoc "row"]
          105  +  execsql { SELECT * FROM t2 WHERE t2 MATCH $q }
          106  +} [list [mapdoc {
          107  +  Queries of the form: "SELECT max(x), y FROM table" returns the value of y on
          108  +  the same row that contains the maximum x value.
          109  +}]]
          110  +
          111  +foreach {tn query snippet} {
          112  +  2 "row" {
          113  +     ...returns the value of y on the same [row] that contains 
          114  +     the maximum x value.
          115  +  }
          116  +  3 "ROW" {
          117  +     ...returns the value of y on the same [row] that contains 
          118  +     the maximum x value.
          119  +  }
          120  +  4 "rollback" {
          121  +     ...[ROLLBACK]. Instead, the pending statement
          122  +     will return SQLITE_ABORT upon next access after the [ROLLBACK].
          123  +  }
          124  +  5 "rOllback" {
          125  +     ...[ROLLBACK]. Instead, the pending statement
          126  +     will return SQLITE_ABORT upon next access after the [ROLLBACK].
          127  +  }
          128  +  6 "lang*" {
          129  +     Added support for the FTS4 [languageid] option.
          130  +  }
          131  +} {
          132  +  do_test 2.$tn {
          133  +    set q [mapdoc $query]
          134  +    execsql { SELECT snippet(t2, '[', ']', '...') FROM t2 WHERE t2 MATCH $q }
          135  +  } [list [mapdoc $snippet]]
          136  +}
          137  +
          138  +#-------------------------------------------------------------------------
          139  +# Make sure the unicode61 tokenizer does not crash if it is passed a 
          140  +# NULL pointer.
          141  +reset_db
          142  +do_execsql_test 3.1 {
          143  +  CREATE VIRTUAL TABLE t1 USING fts4(tokenize=unicode61, x, y);
          144  +  INSERT INTO t1 VALUES(NULL, 'a b c');
          145  +}
          146  +
          147  +do_execsql_test 3.2 {
          148  +  SELECT snippet(t1, '[', ']') FROM t1 WHERE t1 MATCH 'b'
          149  +} {{a [b] c}}
          150  +
          151  +do_execsql_test 3.3 {
          152  +  BEGIN;
          153  +  DELETE FROM t1;
          154  +  INSERT INTO t1 VALUES('b b b b b b b b b b b', 'b b b b b b b b b b b b b');
          155  +  INSERT INTO t1 SELECT * FROM t1;
          156  +  INSERT INTO t1 SELECT * FROM t1;
          157  +  INSERT INTO t1 SELECT * FROM t1;
          158  +  INSERT INTO t1 SELECT * FROM t1;
          159  +  INSERT INTO t1 SELECT * FROM t1;
          160  +  INSERT INTO t1 SELECT * FROM t1;
          161  +  INSERT INTO t1 SELECT * FROM t1;
          162  +  INSERT INTO t1 SELECT * FROM t1;
          163  +  INSERT INTO t1 SELECT * FROM t1;
          164  +  INSERT INTO t1 SELECT * FROM t1;
          165  +  INSERT INTO t1 SELECT * FROM t1;
          166  +  INSERT INTO t1 SELECT * FROM t1;
          167  +  INSERT INTO t1 SELECT * FROM t1;
          168  +  INSERT INTO t1 SELECT * FROM t1;
          169  +  INSERT INTO t1 SELECT * FROM t1;
          170  +  INSERT INTO t1 SELECT * FROM t1;
          171  +  INSERT INTO t1 VALUES('a b c', NULL);
          172  +  INSERT INTO t1 VALUES('a x c', NULL);
          173  +  COMMIT;
          174  +}
          175  +
          176  +do_execsql_test 3.4 {
          177  +  SELECT * FROM t1 WHERE t1 MATCH 'a b';
          178  +} {{a b c} {}}
          179  +
          180  +#-------------------------------------------------------------------------
          181  +#
          182  +reset_db
          183  +
          184  +do_test 4.1 {
          185  +  set a "abc\uFFFEdef"
          186  +  set b "abc\uD800def"
          187  +  set c "\uFFFEdef"
          188  +  set d "\uD800def"
          189  +  execsql {
          190  +    CREATE VIRTUAL TABLE t1 USING fts4(tokenize=unicode61, x);
          191  +    INSERT INTO t1 VALUES($a);
          192  +    INSERT INTO t1 VALUES($b);
          193  +    INSERT INTO t1 VALUES($c);
          194  +    INSERT INTO t1 VALUES($d);
          195  +  }
          196  +} {}
          197  +
          198  +do_test 4.2 {
          199  +  set a [binary format c* {0x61 0xF7 0xBF 0xBF 0xBF 0x62}]
          200  +  set b [binary format c* {0x61 0xF7 0xBF 0xBF 0xBF 0xBF 0x62}]
          201  +  set c [binary format c* {0x61 0xF7 0xBF 0xBF 0xBF 0xBF 0xBF 0x62}]
          202  +  set d [binary format c* {0x61 0xF7 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0x62}]
          203  +  execsql {
          204  +    INSERT INTO t1 VALUES($a);
          205  +    INSERT INTO t1 VALUES($b);
          206  +    INSERT INTO t1 VALUES($c);
          207  +    INSERT INTO t1 VALUES($d);
          208  +  }
          209  +} {}
          210  +
          211  +do_test 4.3 {
          212  +  set a [binary format c* {0xF7 0xBF 0xBF 0xBF}]
          213  +  set b [binary format c* {0xF7 0xBF 0xBF 0xBF 0xBF}]
          214  +  set c [binary format c* {0xF7 0xBF 0xBF 0xBF 0xBF 0xBF}]
          215  +  set d [binary format c* {0xF7 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF}]
          216  +  execsql {
          217  +    INSERT INTO t1 VALUES($a);
          218  +    INSERT INTO t1 VALUES($b);
          219  +    INSERT INTO t1 VALUES($c);
          220  +    INSERT INTO t1 VALUES($d);
          221  +  }
          222  +} {}
          223  +
          224  +
          225  +
          226  +finish_test
          227  +

Added test/fuzz-oss1.test.

            1  +# 2012 May 21
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +# NB:  Portions of this file are extracted from open-source projects
           11  +# covered by permissive licenses.  Use of this file for testing is clearly
           12  +# allowed.  However, do not incorporate the text of this one file into
           13  +# end-products without checking the licenses on the open-source projects
           14  +# from which this code was extracted.  This warning applies to this one
           15  +# file only - not the bulk of the SQLite source code and tests.
           16  +#
           17  +#***********************************************************************
           18  +#
           19  +# This file contains large and complex schemas obtained from open-source
           20  +# software projects.  The schemas are parsed just to make sure that nothing
           21  +# breaks in the parser logic.
           22  +#
           23  +# These tests merely verify that the parse occurs without error.
           24  +# No attempt is made to verify correct operation of the resulting schema
           25  +# and statements.
           26  +#
           27  +
           28  +set testdir [file dirname $argv0]
           29  +source $testdir/tester.tcl
           30  +
           31  +# Schema and query extracted from Skrooge.org.  
           32  +#
           33  +do_test fuzz-oss1-skrooge {
           34  +  db eval {
           35  +CREATE TABLE parameters (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_uuid_parent TEXT NOT NULL DEFAULT '',t_name TEXT NOT NULL,t_value TEXT NOT NULL DEFAULT '',b_blob BLOB,d_lastmodifdate DATE NOT NULL DEFAULT CURRENT_TIMESTAMP,i_tmp INTEGER NOT NULL DEFAULT 0);
           36  +CREATE TABLE doctransaction (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_mode VARCHAR(1) DEFAULT 'U' CHECK (t_mode IN ('U', 'R')),d_date DATE NOT NULL,t_savestep VARCHAR(1) DEFAULT 'N' CHECK (t_savestep IN ('Y', 'N')),i_parent INTEGER, t_refreshviews VARCHAR(1) DEFAULT 'Y' CHECK (t_refreshviews IN ('Y', 'N')));
           37  +CREATE TABLE doctransactionitem (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, rd_doctransaction_id INTEGER NOT NULL,i_object_id INTEGER NOT NULL,t_object_table TEXT NOT NULL,t_action VARCHAR(1) DEFAULT 'I' CHECK (t_action IN ('I', 'U', 'D')),t_sqlorder TEXT NOT NULL DEFAULT '');
           38  +CREATE TABLE doctransactionmsg (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, rd_doctransaction_id INTEGER NOT NULL,t_message TEXT NOT NULL DEFAULT '',t_popup VARCHAR(1) DEFAULT 'Y' CHECK (t_popup IN ('Y', 'N')));
           39  +CREATE TABLE unit(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_symbol TEXT NOT NULL DEFAULT '',t_country TEXT NOT NULL DEFAULT '',t_type VARCHAR(1) NOT NULL DEFAULT 'C' CHECK (t_type IN ('1', '2', 'C', 'S', 'I', 'O')),t_internet_code TEXT NOT NULL DEFAULT '',i_nbdecimal INT NOT NULL DEFAULT 2,rd_unit_id INTEGER NOT NULL DEFAULT 0, t_source TEXT NOT NULL DEFAULT '');
           40  +CREATE TABLE unitvalue(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rd_unit_id INTEGER NOT NULL,d_date DATE NOT NULL,f_quantity FLOAT NOT NULL CHECK (f_quantity>=0));
           41  +CREATE TABLE bank (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_bank_number TEXT NOT NULL DEFAULT '',t_icon TEXT NOT NULL DEFAULT '');
           42  +CREATE TABLE interest(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rd_account_id INTEGER NOT NULL,d_date DATE NOT NULL,f_rate FLOAT NOT NULL CHECK (f_rate>=0),t_income_value_date_mode VARCHAR(1) NOT NULL DEFAULT 'F' CHECK (t_income_value_date_mode IN ('F', '0', '1', '2', '3', '4', '5')),t_expenditure_value_date_mode VARCHAR(1) NOT NULL DEFAULT 'F' CHECK (t_expenditure_value_date_mode IN ('F', '0', '1', '2', '3', '4', '5')),t_base VARCHAR(3) NOT NULL DEFAULT '24' CHECK (t_base IN ('24', '360', '365')));
           43  +CREATE TABLE operation(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,i_group_id INTEGER NOT NULL DEFAULT 0,i_number INTEGER DEFAULT 0 CHECK (i_number>=0),d_date DATE NOT NULL DEFAULT '0000-00-00',rd_account_id INTEGER NOT NULL,t_mode TEXT NOT NULL DEFAULT '',r_payee_id INTEGER NOT NULL DEFAULT 0,t_comment TEXT NOT NULL DEFAULT '',rc_unit_id INTEGER NOT NULL,t_status VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_status IN ('N', 'P', 'Y')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),t_imported VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_imported IN ('Y', 'N', 'P', 'T')),t_template VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_template IN ('Y', 'N')),t_import_id TEXT NOT NULL DEFAULT '',i_tmp INTEGER NOT NULL DEFAULT 0,r_recurrentoperation_id INTEGER NOT NULL DEFAULT 0);
           44  +CREATE TABLE operationbalance(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,f_balance FLOAT NOT NULL DEFAULT 0,r_operation_id INTEGER NOT NULL);
           45  +CREATE TABLE refund (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_comment TEXT NOT NULL DEFAULT '',t_close VARCHAR(1) DEFAULT 'N' CHECK (t_close IN ('Y', 'N')));
           46  +CREATE TABLE payee (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '',t_address TEXT NOT NULL DEFAULT '', t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')));
           47  +CREATE TABLE suboperation(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_comment TEXT NOT NULL DEFAULT '',rd_operation_id INTEGER NOT NULL,r_category_id INTEGER NOT NULL DEFAULT 0,f_value FLOAT NOT NULL DEFAULT 0.0,i_tmp INTEGER NOT NULL DEFAULT 0,r_refund_id INTEGER NOT NULL DEFAULT 0, t_formula TEXT NOT NULL DEFAULT '');
           48  +CREATE TABLE rule (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_description TEXT NOT NULL DEFAULT '',t_definition TEXT NOT NULL DEFAULT '',t_action_description TEXT NOT NULL DEFAULT '',t_action_definition TEXT NOT NULL DEFAULT '',t_action_type VARCHAR(1) DEFAULT 'S' CHECK (t_action_type IN ('S', 'U', 'A')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),f_sortorder FLOAT);
           49  +CREATE TABLE budget (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rc_category_id INTEGER NOT NULL DEFAULT 0,t_including_subcategories TEXT NOT NULL DEFAULT 'N' CHECK (t_including_subcategories IN ('Y', 'N')),f_budgeted FLOAT NOT NULL DEFAULT 0.0,f_budgeted_modified FLOAT NOT NULL DEFAULT 0.0,f_transferred FLOAT NOT NULL DEFAULT 0.0,i_year INTEGER NOT NULL DEFAULT 2010,i_month INTEGER NOT NULL DEFAULT 0 CHECK (i_month>=0 AND i_month<=12));
           50  +CREATE TABLE budgetcategory(id INTEGER NOT NULL DEFAULT 0,id_category INTEGER NOT NULL DEFAULT 0);
           51  +CREATE TABLE budgetrule (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rc_category_id INTEGER NOT NULL DEFAULT 0,t_category_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_category_condition IN ('Y', 'N')),t_year_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_year_condition IN ('Y', 'N')),i_year INTEGER NOT NULL DEFAULT 2010,i_month INTEGER NOT NULL DEFAULT 0 CHECK (i_month>=0 AND i_month<=12),t_month_condition TEXT NOT NULL DEFAULT 'Y' CHECK (t_month_condition IN ('Y', 'N')),i_condition INTEGER NOT NULL DEFAULT 0 CHECK (i_condition IN (-1,0,1)),f_quantity FLOAT NOT NULL DEFAULT 0.0,t_absolute TEXT NOT NULL DEFAULT 'Y' CHECK (t_absolute IN ('Y', 'N')),rc_category_id_target INTEGER NOT NULL DEFAULT 0,t_category_target TEXT NOT NULL DEFAULT 'Y' CHECK (t_category_target IN ('Y', 'N')),t_rule TEXT NOT NULL DEFAULT 'N' CHECK (t_rule IN ('N', 'C', 'Y')));
           52  +CREATE TABLE "recurrentoperation" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,d_date DATE NOT NULL DEFAULT '0000-00-00',rd_operation_id INTEGER NOT NULL,i_period_increment INTEGER NOT NULL DEFAULT 1 CHECK (i_period_increment>=0),t_period_unit TEXT NOT NULL DEFAULT 'M' CHECK (t_period_unit IN ('D', 'W', 'M', 'Y')),t_auto_write VARCHAR(1) DEFAULT 'Y' CHECK (t_auto_write IN ('Y', 'N')),i_auto_write_days INTEGER NOT NULL DEFAULT 5 CHECK (i_auto_write_days>=0),t_warn VARCHAR(1) DEFAULT 'Y' CHECK (t_warn IN ('Y', 'N')),i_warn_days INTEGER NOT NULL DEFAULT 5 CHECK (i_warn_days>=0),t_times VARCHAR(1) DEFAULT 'N' CHECK (t_times IN ('Y', 'N')),i_nb_times INTEGER NOT NULL DEFAULT 1 CHECK (i_nb_times>=0));
           53  +CREATE TABLE "category" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '' CHECK (t_name NOT LIKE '% > %'),t_fullname TEXT,rd_category_id INT,t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')));
           54  +CREATE TABLE "account"(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL,t_number TEXT NOT NULL DEFAULT '',t_agency_number TEXT NOT NULL DEFAULT '',t_agency_address TEXT NOT NULL DEFAULT '',t_comment TEXT NOT NULL DEFAULT '',t_close VARCHAR(1) DEFAULT 'N' CHECK (t_close IN ('Y', 'N')),t_type VARCHAR(1) NOT NULL DEFAULT 'C' CHECK (t_type IN ('C', 'D', 'A', 'I', 'L', 'W', 'O')),t_bookmarked VARCHAR(1) NOT NULL DEFAULT 'N' CHECK (t_bookmarked IN ('Y', 'N')),rd_bank_id INTEGER NOT NULL);
           55  +CREATE TABLE "node" (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,t_name TEXT NOT NULL DEFAULT '' CHECK (t_name NOT LIKE '% > %'),t_fullname TEXT,t_icon TEXT DEFAULT '',f_sortorder FLOAT,t_autostart VARCHAR(1) DEFAULT 'N' CHECK (t_autostart IN ('Y', 'N')),t_data TEXT,rd_node_id INT CONSTRAINT fk_id REFERENCES node(id) ON DELETE CASCADE);
           56  +CREATE TABLE vm_category_display_tmp(
           57  +  id INT,
           58  +  t_name TEXT,
           59  +  t_fullname TEXT,
           60  +  rd_category_id INT,
           61  +  t_bookmarked TEXT,
           62  +  i_NBOPERATIONS,
           63  +  f_REALCURRENTAMOUNT
           64  +);
           65  +CREATE TABLE vm_budget_tmp(
           66  +  id INT,
           67  +  rc_category_id INT,
           68  +  t_including_subcategories TEXT,
           69  +  f_budgeted REAL,
           70  +  f_budgeted_modified REAL,
           71  +  f_transferred REAL,
           72  +  i_year INT,
           73  +  i_month INT,
           74  +  t_CATEGORY,
           75  +  t_PERIOD,
           76  +  f_CURRENTAMOUNT,
           77  +  t_RULES
           78  +);
           79  +CREATE INDEX idx_doctransaction_parent ON doctransaction (i_parent);
           80  +CREATE INDEX idx_doctransactionitem_i_object_id ON doctransactionitem (i_object_id);
           81  +CREATE INDEX idx_doctransactionitem_t_object_table ON doctransactionitem (t_object_table);
           82  +CREATE INDEX idx_doctransactionitem_t_action ON doctransactionitem (t_action);
           83  +CREATE INDEX idx_doctransactionitem_rd_doctransaction_id ON doctransactionitem (rd_doctransaction_id);
           84  +CREATE INDEX idx_doctransactionitem_optimization ON doctransactionitem (rd_doctransaction_id, i_object_id, t_object_table, t_action, id);
           85  +CREATE INDEX idx_unit_unit_id ON unitvalue(rd_unit_id);
           86  +CREATE INDEX idx_account_bank_id ON account(rd_bank_id);
           87  +CREATE INDEX idx_account_type ON account(t_type);
           88  +CREATE INDEX idx_category_category_id ON category(rd_category_id);
           89  +CREATE INDEX idx_category_t_fullname ON category(t_fullname);
           90  +CREATE INDEX idx_operation_account_id ON operation (rd_account_id);
           91  +CREATE INDEX idx_operation_tmp1_found_transfert ON operation (rc_unit_id, d_date);
           92  +CREATE INDEX idx_operation_grouped_operation_id ON operation (i_group_id);
           93  +CREATE INDEX idx_operation_i_number ON operation (i_number);
           94  +CREATE INDEX idx_operation_i_tmp ON operation (i_tmp);
           95  +CREATE INDEX idx_operation_rd_account_id ON operation (rd_account_id);
           96  +CREATE INDEX idx_operation_rc_unit_id ON operation (rc_unit_id);
           97  +CREATE INDEX idx_operation_t_status ON operation (t_status);
           98  +CREATE INDEX idx_operation_t_import_id ON operation (t_import_id);
           99  +CREATE INDEX idx_operation_t_template ON operation (t_template);
          100  +CREATE INDEX idx_operation_d_date ON operation (d_date);
          101  +CREATE INDEX idx_operationbalance_operation_id ON operationbalance (r_operation_id);
          102  +CREATE INDEX idx_suboperation_operation_id ON suboperation (rd_operation_id);
          103  +CREATE INDEX idx_suboperation_i_tmp ON suboperation (i_tmp);
          104  +CREATE INDEX idx_suboperation_category_id ON suboperation (r_category_id);
          105  +CREATE INDEX idx_suboperation_refund_id_id ON suboperation (r_refund_id);
          106  +CREATE INDEX idx_recurrentoperation_rd_operation_id ON recurrentoperation (rd_operation_id);
          107  +CREATE INDEX idx_refund_close ON refund(t_close);
          108  +CREATE INDEX idx_interest_account_id ON interest (rd_account_id);
          109  +CREATE INDEX idx_rule_action_type ON rule(t_action_type);
          110  +CREATE INDEX idx_budget_category_id ON budget(rc_category_id);
          111  +CREATE INDEX idx_budgetcategory_id ON budgetcategory (id);
          112  +CREATE INDEX idx_budgetcategory_id_category ON budgetcategory (id_category);
          113  +CREATE UNIQUE INDEX uidx_parameters_uuid_parent_name ON parameters (t_uuid_parent, t_name);
          114  +CREATE UNIQUE INDEX uidx_node_parent_id_name ON node(t_name,rd_node_id);
          115  +CREATE UNIQUE INDEX uidx_node_fullname ON node(t_fullname);
          116  +CREATE UNIQUE INDEX uidx_unit_name ON unit(t_name);
          117  +CREATE UNIQUE INDEX uidx_unit_symbol ON unit(t_symbol);
          118  +CREATE UNIQUE INDEX uidx_unitvalue ON unitvalue(d_date,rd_unit_id);
          119  +CREATE UNIQUE INDEX uidx_bank_name ON bank(t_name);
          120  +CREATE UNIQUE INDEX uidx_account_name ON account(t_name);
          121  +CREATE UNIQUE INDEX uidx_category_parent_id_name ON category(t_name,rd_category_id);
          122  +CREATE UNIQUE INDEX uidx_category_fullname ON  category(t_fullname);
          123  +CREATE UNIQUE INDEX uidx_refund_name ON refund(t_name);
          124  +CREATE UNIQUE INDEX uidx_payee_name ON payee(t_name);
          125  +CREATE UNIQUE INDEX uidx_interest ON interest(d_date,rd_account_id);
          126  +CREATE UNIQUE INDEX uidx_budget ON budget(i_year,i_month, rc_category_id);
          127  +CREATE VIEW v_node AS SELECT * from node;
          128  +CREATE VIEW v_node_displayname AS SELECT *, t_fullname AS t_displayname from node;
          129  +CREATE VIEW v_parameters_displayname AS SELECT *, t_name AS t_displayname from parameters;
          130  +CREATE TRIGGER fkdc_parameters_parameters_uuid BEFORE DELETE ON parameters FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'parameters'; END;
          131  +CREATE TRIGGER fkdc_node_parameters_uuid BEFORE DELETE ON node FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'node'; END;
          132  +CREATE TRIGGER cpt_node_fullname1 AFTER INSERT ON node BEGIN UPDATE node SET t_fullname=CASE WHEN new.rd_node_id IS NULL OR new.rd_node_id='' OR new.rd_node_id=0 THEN new.t_name ELSE (SELECT c.t_fullname from node c where c.id=new.rd_node_id)||' > '||new.t_name END WHERE id=new.id;END;
          133  +CREATE TRIGGER cpt_node_fullname2 AFTER UPDATE OF t_name, rd_node_id ON node BEGIN UPDATE node SET t_fullname=CASE WHEN new.rd_node_id IS NULL OR new.rd_node_id='' OR new.rd_node_id=0 THEN new.t_name ELSE (SELECT c.t_fullname from node c where c.id=new.rd_node_id)||' > '||new.t_name END WHERE id=new.id;UPDATE node SET t_name=t_name WHERE rd_node_id=new.id;END;
          134  +CREATE TRIGGER fki_account_bank_rd_bank_id_id BEFORE INSERT ON account FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (bank est utilisé par account)
          135  +Nom de la contrainte : fki_account_bank_rd_bank_id_id')   WHERE NEW.rd_bank_id!=0 AND NEW.rd_bank_id!='' AND (SELECT id FROM bank WHERE id = NEW.rd_bank_id) IS NULL; END;
          136  +CREATE TRIGGER fku_account_bank_rd_bank_id_id BEFORE UPDATE ON account FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (bank est utilisé par account)
          137  +Nom de la contrainte : fku_account_bank_rd_bank_id_id')       WHERE NEW.rd_bank_id!=0 AND NEW.rd_bank_id!='' AND (SELECT id FROM bank WHERE id = NEW.rd_bank_id) IS NULL; END;
          138  +CREATE TRIGGER fkdc_bank_account_id_rd_bank_id BEFORE DELETE ON bank FOR EACH ROW BEGIN     DELETE FROM account WHERE account.rd_bank_id = OLD.id; END;
          139  +CREATE TRIGGER fki_budget_category_rc_category_id_id BEFORE INSERT ON budget FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budget)
          140  +Nom de la contrainte : fki_budget_category_rc_category_id_id')   WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          141  +CREATE TRIGGER fku_budget_category_rc_category_id_id BEFORE UPDATE ON budget FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budget)
          142  +Nom de la contrainte : fku_budget_category_rc_category_id_id')       WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          143  +CREATE TRIGGER fkd_budget_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budget)
          144  +Nom de la contrainte : fkd_budget_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM budget WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          145  +CREATE TRIGGER fki_budgetrule_category_rc_category_id_id BEFORE INSERT ON budgetrule FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budgetrule)
          146  +Nom de la contrainte : fki_budgetrule_category_rc_category_id_id')   WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          147  +CREATE TRIGGER fku_budgetrule_category_rc_category_id_id BEFORE UPDATE ON budgetrule FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budgetrule)
          148  +Nom de la contrainte : fku_budgetrule_category_rc_category_id_id')       WHERE NEW.rc_category_id!=0 AND NEW.rc_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id) IS NULL; END;
          149  +CREATE TRIGGER fkd_budgetrule_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budgetrule)
          150  +Nom de la contrainte : fkd_budgetrule_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM budgetrule WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          151  +CREATE TRIGGER fki_budgetrule_category_rc_category_id_target_id BEFORE INSERT ON budgetrule FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par budgetrule)
          152  +Nom de la contrainte : fki_budgetrule_category_rc_category_id_target_id')   WHERE NEW.rc_category_id_target!=0 AND NEW.rc_category_id_target!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id_target) IS NULL; END;
          153  +CREATE TRIGGER fku_budgetrule_category_rc_category_id_target_id BEFORE UPDATE ON budgetrule FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par budgetrule)
          154  +Nom de la contrainte : fku_budgetrule_category_rc_category_id_target_id')       WHERE NEW.rc_category_id_target!=0 AND NEW.rc_category_id_target!='' AND (SELECT id FROM category WHERE id = NEW.rc_category_id_target) IS NULL; END;
          155  +CREATE TRIGGER fkd_budgetrule_category_rc_category_id_target_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par budgetrule)
          156  +Nom de la contrainte : fkd_budgetrule_category_rc_category_id_target_id')     WHERE (SELECT rc_category_id_target FROM budgetrule WHERE rc_category_id_target = OLD.id) IS NOT NULL; END;
          157  +CREATE TRIGGER fki_category_category_rd_category_id_id BEFORE INSERT ON category FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par category)
          158  +Nom de la contrainte : fki_category_category_rd_category_id_id')   WHERE NEW.rd_category_id!=0 AND NEW.rd_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rd_category_id) IS NULL; END;
          159  +CREATE TRIGGER fku_category_category_rd_category_id_id BEFORE UPDATE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par category)
          160  +Nom de la contrainte : fku_category_category_rd_category_id_id')       WHERE NEW.rd_category_id!=0 AND NEW.rd_category_id!='' AND (SELECT id FROM category WHERE id = NEW.rd_category_id) IS NULL; END;
          161  +CREATE TRIGGER fkdc_category_category_id_rd_category_id BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM category WHERE category.rd_category_id = OLD.id; END;
          162  +CREATE TRIGGER fki_doctransactionitem_doctransaction_rd_doctransaction_id_id BEFORE INSERT ON doctransactionitem FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (doctransaction est utilisé par doctransactionitem)
          163  +Nom de la contrainte : fki_doctransactionitem_doctransaction_rd_doctransaction_id_id')   WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          164  +CREATE TRIGGER fku_doctransactionitem_doctransaction_rd_doctransaction_id_id BEFORE UPDATE ON doctransactionitem FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (doctransaction est utilisé par doctransactionitem)
          165  +Nom de la contrainte : fku_doctransactionitem_doctransaction_rd_doctransaction_id_id')       WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          166  +CREATE TRIGGER fkdc_doctransaction_doctransactionitem_id_rd_doctransaction_id BEFORE DELETE ON doctransaction FOR EACH ROW BEGIN     DELETE FROM doctransactionitem WHERE doctransactionitem.rd_doctransaction_id = OLD.id; END;
          167  +CREATE TRIGGER fki_doctransactionmsg_doctransaction_rd_doctransaction_id_id BEFORE INSERT ON doctransactionmsg FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (doctransaction est utilisé par doctransactionmsg)
          168  +Nom de la contrainte : fki_doctransactionmsg_doctransaction_rd_doctransaction_id_id')   WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          169  +CREATE TRIGGER fku_doctransactionmsg_doctransaction_rd_doctransaction_id_id BEFORE UPDATE ON doctransactionmsg FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (doctransaction est utilisé par doctransactionmsg)
          170  +Nom de la contrainte : fku_doctransactionmsg_doctransaction_rd_doctransaction_id_id')       WHERE NEW.rd_doctransaction_id!=0 AND NEW.rd_doctransaction_id!='' AND (SELECT id FROM doctransaction WHERE id = NEW.rd_doctransaction_id) IS NULL; END;
          171  +CREATE TRIGGER fkdc_doctransaction_doctransactionmsg_id_rd_doctransaction_id BEFORE DELETE ON doctransaction FOR EACH ROW BEGIN     DELETE FROM doctransactionmsg WHERE doctransactionmsg.rd_doctransaction_id = OLD.id; END;
          172  +CREATE TRIGGER fki_interest_account_rd_account_id_id BEFORE INSERT ON interest FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (account est utilisé par interest)
          173  +Nom de la contrainte : fki_interest_account_rd_account_id_id')   WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          174  +CREATE TRIGGER fku_interest_account_rd_account_id_id BEFORE UPDATE ON interest FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (account est utilisé par interest)
          175  +Nom de la contrainte : fku_interest_account_rd_account_id_id')       WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          176  +CREATE TRIGGER fkdc_account_interest_id_rd_account_id BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM interest WHERE interest.rd_account_id = OLD.id; END;
          177  +CREATE TRIGGER fki_node_node_rd_node_id_id BEFORE INSERT ON node FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (node est utilisé par node)
          178  +Nom de la contrainte : fki_node_node_rd_node_id_id')   WHERE NEW.rd_node_id!=0 AND NEW.rd_node_id!='' AND (SELECT id FROM node WHERE id = NEW.rd_node_id) IS NULL; END;
          179  +CREATE TRIGGER fku_node_node_rd_node_id_id BEFORE UPDATE ON node FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (node est utilisé par node)
          180  +Nom de la contrainte : fku_node_node_rd_node_id_id')       WHERE NEW.rd_node_id!=0 AND NEW.rd_node_id!='' AND (SELECT id FROM node WHERE id = NEW.rd_node_id) IS NULL; END;
          181  +CREATE TRIGGER fkdc_node_node_id_rd_node_id BEFORE DELETE ON node FOR EACH ROW BEGIN     DELETE FROM node WHERE node.rd_node_id = OLD.id; END;
          182  +CREATE TRIGGER fki_operation_account_rd_account_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (account est utilisé par operation)
          183  +Nom de la contrainte : fki_operation_account_rd_account_id_id')   WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          184  +CREATE TRIGGER fku_operation_account_rd_account_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (account est utilisé par operation)
          185  +Nom de la contrainte : fku_operation_account_rd_account_id_id')       WHERE NEW.rd_account_id!=0 AND NEW.rd_account_id!='' AND (SELECT id FROM account WHERE id = NEW.rd_account_id) IS NULL; END;
          186  +CREATE TRIGGER fkdc_account_operation_id_rd_account_id BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM operation WHERE operation.rd_account_id = OLD.id; END;
          187  +CREATE TRIGGER fki_operation_payee_r_payee_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (payee est utilisé par operation)
          188  +Nom de la contrainte : fki_operation_payee_r_payee_id_id')   WHERE NEW.r_payee_id!=0 AND NEW.r_payee_id!='' AND (SELECT id FROM payee WHERE id = NEW.r_payee_id) IS NULL; END;
          189  +CREATE TRIGGER fku_operation_payee_r_payee_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (payee est utilisé par operation)
          190  +Nom de la contrainte : fku_operation_payee_r_payee_id_id')       WHERE NEW.r_payee_id!=0 AND NEW.r_payee_id!='' AND (SELECT id FROM payee WHERE id = NEW.r_payee_id) IS NULL; END;
          191  +CREATE TRIGGER fkd_operation_payee_r_payee_id_id BEFORE DELETE ON payee FOR EACH ROW BEGIN     UPDATE operation SET r_payee_id=0 WHERE r_payee_id=OLD.id; END;
          192  +CREATE TRIGGER fki_operation_unit_rc_unit_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par operation)
          193  +Nom de la contrainte : fki_operation_unit_rc_unit_id_id')   WHERE NEW.rc_unit_id!=0 AND NEW.rc_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rc_unit_id) IS NULL; END;
          194  +CREATE TRIGGER fku_operation_unit_rc_unit_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par operation)
          195  +Nom de la contrainte : fku_operation_unit_rc_unit_id_id')       WHERE NEW.rc_unit_id!=0 AND NEW.rc_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rc_unit_id) IS NULL; END;
          196  +CREATE TRIGGER fkd_operation_unit_rc_unit_id_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (unit est utilisé par operation)
          197  +Nom de la contrainte : fkd_operation_unit_rc_unit_id_id')     WHERE (SELECT rc_unit_id FROM operation WHERE rc_unit_id = OLD.id) IS NOT NULL; END;
          198  +CREATE TRIGGER fki_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE INSERT ON operation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (recurrentoperation est utilisé par operation)
          199  +Nom de la contrainte : fki_operation_recurrentoperation_r_recurrentoperation_id_id')   WHERE NEW.r_recurrentoperation_id!=0 AND NEW.r_recurrentoperation_id!='' AND (SELECT id FROM recurrentoperation WHERE id = NEW.r_recurrentoperation_id) IS NULL; END;
          200  +CREATE TRIGGER fku_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE UPDATE ON operation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (recurrentoperation est utilisé par operation)
          201  +Nom de la contrainte : fku_operation_recurrentoperation_r_recurrentoperation_id_id')       WHERE NEW.r_recurrentoperation_id!=0 AND NEW.r_recurrentoperation_id!='' AND (SELECT id FROM recurrentoperation WHERE id = NEW.r_recurrentoperation_id) IS NULL; END;
          202  +CREATE TRIGGER fkd_operation_recurrentoperation_r_recurrentoperation_id_id BEFORE DELETE ON recurrentoperation FOR EACH ROW BEGIN     UPDATE operation SET r_recurrentoperation_id=0 WHERE r_recurrentoperation_id=OLD.id; END;
          203  +CREATE TRIGGER fki_operationbalance_operation_r_operation_id_id BEFORE INSERT ON operationbalance FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par operationbalance)
          204  +Nom de la contrainte : fki_operationbalance_operation_r_operation_id_id')   WHERE NEW.r_operation_id!=0 AND NEW.r_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.r_operation_id) IS NULL; END;
          205  +CREATE TRIGGER fku_operationbalance_operation_r_operation_id_id BEFORE UPDATE ON operationbalance FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par operationbalance)
          206  +Nom de la contrainte : fku_operationbalance_operation_r_operation_id_id')       WHERE NEW.r_operation_id!=0 AND NEW.r_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.r_operation_id) IS NULL; END;
          207  +CREATE TRIGGER fkd_operationbalance_operation_r_operation_id_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     UPDATE operationbalance SET r_operation_id=0 WHERE r_operation_id=OLD.id; END;
          208  +CREATE TRIGGER fki_recurrentoperation_operation_rd_operation_id_id BEFORE INSERT ON recurrentoperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par recurrentoperation)
          209  +Nom de la contrainte : fki_recurrentoperation_operation_rd_operation_id_id')   WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          210  +CREATE TRIGGER fku_recurrentoperation_operation_rd_operation_id_id BEFORE UPDATE ON recurrentoperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par recurrentoperation)
          211  +Nom de la contrainte : fku_recurrentoperation_operation_rd_operation_id_id')       WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          212  +CREATE TRIGGER fkdc_operation_recurrentoperation_id_rd_operation_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM recurrentoperation WHERE recurrentoperation.rd_operation_id = OLD.id; END;
          213  +CREATE TRIGGER fki_suboperation_operation_rd_operation_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (operation est utilisé par suboperation)
          214  +Nom de la contrainte : fki_suboperation_operation_rd_operation_id_id')   WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          215  +CREATE TRIGGER fku_suboperation_operation_rd_operation_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (operation est utilisé par suboperation)
          216  +Nom de la contrainte : fku_suboperation_operation_rd_operation_id_id')       WHERE NEW.rd_operation_id!=0 AND NEW.rd_operation_id!='' AND (SELECT id FROM operation WHERE id = NEW.rd_operation_id) IS NULL; END;
          217  +CREATE TRIGGER fkdc_operation_suboperation_id_rd_operation_id BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM suboperation WHERE suboperation.rd_operation_id = OLD.id; END;
          218  +CREATE TRIGGER fki_suboperation_category_r_category_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (category est utilisé par suboperation)
          219  +Nom de la contrainte : fki_suboperation_category_r_category_id_id')   WHERE NEW.r_category_id!=0 AND NEW.r_category_id!='' AND (SELECT id FROM category WHERE id = NEW.r_category_id) IS NULL; END;
          220  +CREATE TRIGGER fku_suboperation_category_r_category_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (category est utilisé par suboperation)
          221  +Nom de la contrainte : fku_suboperation_category_r_category_id_id')       WHERE NEW.r_category_id!=0 AND NEW.r_category_id!='' AND (SELECT id FROM category WHERE id = NEW.r_category_id) IS NULL; END;
          222  +CREATE TRIGGER fkd_suboperation_category_r_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     UPDATE suboperation SET r_category_id=0 WHERE r_category_id=OLD.id; END;
          223  +CREATE TRIGGER fki_suboperation_refund_r_refund_id_id BEFORE INSERT ON suboperation FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (refund est utilisé par suboperation)
          224  +Nom de la contrainte : fki_suboperation_refund_r_refund_id_id')   WHERE NEW.r_refund_id!=0 AND NEW.r_refund_id!='' AND (SELECT id FROM refund WHERE id = NEW.r_refund_id) IS NULL; END;
          225  +CREATE TRIGGER fku_suboperation_refund_r_refund_id_id BEFORE UPDATE ON suboperation FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (refund est utilisé par suboperation)
          226  +Nom de la contrainte : fku_suboperation_refund_r_refund_id_id')       WHERE NEW.r_refund_id!=0 AND NEW.r_refund_id!='' AND (SELECT id FROM refund WHERE id = NEW.r_refund_id) IS NULL; END;
          227  +CREATE TRIGGER fkd_suboperation_refund_r_refund_id_id BEFORE DELETE ON refund FOR EACH ROW BEGIN     UPDATE suboperation SET r_refund_id=0 WHERE r_refund_id=OLD.id; END;
          228  +CREATE TRIGGER fki_unit_unit_rd_unit_id_id BEFORE INSERT ON unit FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par unit)
          229  +Nom de la contrainte : fki_unit_unit_rd_unit_id_id')   WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          230  +CREATE TRIGGER fku_unit_unit_rd_unit_id_id BEFORE UPDATE ON unit FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par unit)
          231  +Nom de la contrainte : fku_unit_unit_rd_unit_id_id')       WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          232  +CREATE TRIGGER fkdc_unit_unit_id_rd_unit_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM unit WHERE unit.rd_unit_id = OLD.id; END;
          233  +CREATE TRIGGER fki_unitvalue_unit_rd_unit_id_id BEFORE INSERT ON unitvalue FOR EACH ROW BEGIN   SELECT RAISE(ABORT, 'Impossible d''ajouter un objet (unit est utilisé par unitvalue)
          234  +Nom de la contrainte : fki_unitvalue_unit_rd_unit_id_id')   WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          235  +CREATE TRIGGER fku_unitvalue_unit_rd_unit_id_id BEFORE UPDATE ON unitvalue FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de modifier un objet (unit est utilisé par unitvalue)
          236  +Nom de la contrainte : fku_unitvalue_unit_rd_unit_id_id')       WHERE NEW.rd_unit_id!=0 AND NEW.rd_unit_id!='' AND (SELECT id FROM unit WHERE id = NEW.rd_unit_id) IS NULL; END;
          237  +CREATE TRIGGER fkdc_unit_unitvalue_id_rd_unit_id BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM unitvalue WHERE unitvalue.rd_unit_id = OLD.id; END;
          238  +CREATE TRIGGER fkd_vm_budget_tmp_category_rc_category_id_id BEFORE DELETE ON category FOR EACH ROW BEGIN     SELECT RAISE(ABORT, 'Impossible de détruire un objet (category est utilisé par vm_budget_tmp)
          239  +Nom de la contrainte : fkd_vm_budget_tmp_category_rc_category_id_id')     WHERE (SELECT rc_category_id FROM vm_budget_tmp WHERE rc_category_id = OLD.id) IS NOT NULL; END;
          240  +CREATE TRIGGER fkdc_category_vm_category_display_tmp_id_rd_category_id BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM vm_category_display_tmp WHERE vm_category_display_tmp.rd_category_id = OLD.id; END;
          241  +CREATE VIEW v_unit_displayname AS SELECT *, t_name||' ('||t_symbol||')' AS t_displayname FROM unit;
          242  +CREATE VIEW v_unit_tmp1 AS SELECT *,(SELECT count(*) FROM unitvalue s WHERE s.rd_unit_id=unit.id) AS i_NBVALUES, (CASE WHEN unit.rd_unit_id=0 THEN '' ELSE (SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=unit.rd_unit_id) END) AS t_UNIT,(CASE unit.t_type WHEN '1' THEN 'Monnaie principale' WHEN '2' THEN 'Monnaie secondaire' WHEN 'C' THEN 'Monnaie' WHEN 'S' THEN 'Action' WHEN 'I' THEN 'Indice' ELSE 'Objet' END) AS t_TYPENLS, (SELECT MIN(s.d_date) FROM  unitvalue s WHERE s.rd_unit_id=unit.id) AS d_MINDATE, (SELECT MAX(s.d_date) FROM  unitvalue s WHERE s.rd_unit_id=unit.id) AS d_MAXDATE from unit;
          243  +CREATE VIEW v_unit_tmp2 AS SELECT *,CASE WHEN v_unit_tmp1.t_type='1' THEN 1 ELSE IFNULL((SELECT s.f_quantity FROM unitvalue s WHERE s.rd_unit_id=v_unit_tmp1.id AND s.d_date=v_unit_tmp1.d_MAXDATE),1) END AS f_LASTVALUE from v_unit_tmp1;
          244  +CREATE VIEW v_unit AS SELECT *,v_unit_tmp2.f_LASTVALUE*IFNULL((SELECT s2.f_LASTVALUE FROM v_unit_tmp2 s2 WHERE s2.id=v_unit_tmp2.rd_unit_id) , 1) AS f_CURRENTAMOUNT from v_unit_tmp2;
          245  +CREATE VIEW v_unitvalue_displayname AS SELECT *, (SELECT t_displayname FROM v_unit_displayname WHERE unitvalue.rd_unit_id=v_unit_displayname.id)||' '||STRFTIME('%d/%m/%Y',d_date) AS t_displayname FROM unitvalue;
          246  +CREATE VIEW v_unitvalue AS SELECT * FROM unitvalue;
          247  +CREATE VIEW v_suboperation AS SELECT * FROM suboperation;
          248  +CREATE VIEW v_operation_numbers AS SELECT DISTINCT i_number, rd_account_id FROM operation;
          249  +CREATE VIEW v_operation_next_numbers AS SELECT T1.i_number+1 AS i_number FROM v_operation_numbers AS T1 LEFT OUTER JOIN v_operation_numbers T2 ON T2.rd_account_id=T1.rd_account_id AND T2.i_number=T1.i_number+1 WHERE T1.i_number!=0 AND (T2.i_number IS NULL) ORDER BY T1.i_number;
          250  +CREATE VIEW v_operation_tmp1 AS SELECT *,(SELECT t_name FROM payee s WHERE s.id=operation.r_payee_id) AS t_PAYEE,(SELECT TOTAL(s.f_value) FROM suboperation s WHERE s.rd_operation_id=operation.ID) AS f_QUANTITY,(SELECT count(*) FROM suboperation s WHERE s.rd_operation_id=operation.ID) AS i_NBSUBCATEGORY FROM operation;
          251  +CREATE VIEW v_operation AS SELECT *,(SELECT s.id FROM suboperation s WHERE s.rd_operation_id=v_operation_tmp1.id AND ABS(s.f_value)=(SELECT MAX(ABS(s2.f_value)) FROM suboperation s2 WHERE s2.rd_operation_id=v_operation_tmp1.id)) AS i_MOSTIMPSUBOP,((SELECT s.f_CURRENTAMOUNT FROM v_unit s WHERE s.id=v_operation_tmp1.rc_unit_id)*v_operation_tmp1.f_QUANTITY) AS f_CURRENTAMOUNT, (CASE WHEN v_operation_tmp1.i_group_id<>0 AND EXISTS (SELECT 1 FROM account a WHERE v_operation_tmp1.rd_account_id=a.id AND a.t_type<>'L') AND EXISTS (SELECT 1 FROM v_operation_tmp1 op2, account a WHERE op2.i_group_id=v_operation_tmp1.i_group_id AND op2.rd_account_id=a.id AND a.t_type<>'L' AND op2.rc_unit_id=v_operation_tmp1.rc_unit_id AND op2.f_QUANTITY=-v_operation_tmp1.f_QUANTITY) THEN 'Y' ELSE 'N' END) AS t_TRANSFER FROM v_operation_tmp1;
          252  +CREATE VIEW v_operation_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||IFNULL(t_PAYEE,'')||' '||v_operation.f_CURRENTAMOUNT||' '||(SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=v_operation.rc_unit_id) AS t_displayname FROM v_operation;
          253  +CREATE VIEW v_operation_delete AS SELECT *, (CASE WHEN t_status='Y' THEN 'Vous n''√™tes pas autoris√© √† d√©truire cette op√©ration car en √©tat ¬ę¬†rapproch√©¬†¬Ľ' END) t_delete_message FROM operation;
          254  +CREATE VIEW v_account AS SELECT *,(SELECT MAX(s.d_date) FROM  interest s WHERE s.rd_account_id=account.id) AS d_MAXDATE, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=account.id AND s.t_template='N') AS f_CURRENTAMOUNT FROM account;
          255  +CREATE VIEW v_account_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM operation WHERE rd_account_id=account.id AND d_date<>'0000-00-00' AND t_template='N' AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce compte car il contient des opérations rapprochées' END) t_delete_message FROM account;
          256  +CREATE VIEW v_bank_displayname AS SELECT *, t_name AS t_displayname FROM bank;
          257  +CREATE VIEW v_account_displayname AS SELECT *, (SELECT t_displayname FROM v_bank_displayname WHERE account.rd_bank_id=v_bank_displayname.id)||'-'||t_name AS t_displayname FROM account;
          258  +CREATE VIEW v_bank AS SELECT *,(SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_account s WHERE s.rd_bank_id=bank.id) AS f_CURRENTAMOUNT FROM bank;
          259  +CREATE VIEW v_category_displayname AS SELECT *, t_fullname AS t_displayname FROM category;
          260  +CREATE VIEW v_category AS SELECT * FROM category;
          261  +CREATE VIEW v_recurrentoperation AS SELECT *,i_period_increment||' '||(CASE t_period_unit WHEN 'Y' THEN 'année(s)' WHEN 'M' THEN 'mois' WHEN 'W' THEN 'semaine(s)' ELSE 'jour(s)' END) AS t_PERIODNLS FROM recurrentoperation;
          262  +CREATE VIEW v_recurrentoperation_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||SUBSTR((SELECT t_displayname FROM v_operation_displayname WHERE v_operation_displayname.id=v_recurrentoperation.rd_operation_id), 11) AS t_displayname FROM v_recurrentoperation;
          263  +CREATE VIEW v_unitvalue_display AS SELECT *,IFNULL((SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=(SELECT s2.rd_unit_id FROM unit s2 WHERE s2.id=unitvalue.rd_unit_id)),'') AS t_UNIT,STRFTIME('%Y-%m',unitvalue.d_date) AS d_DATEMONTH,STRFTIME('%Y',unitvalue.d_date) AS d_DATEYEAR FROM unitvalue;
          264  +CREATE VIEW v_suboperation_display AS SELECT *,IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=v_suboperation.r_category_id),'') AS t_CATEGORY, IFNULL((SELECT s.t_name FROM refund s WHERE s.id=v_suboperation.r_refund_id),'') AS t_REFUND, (CASE WHEN v_suboperation.f_value>=0 THEN v_suboperation.f_value ELSE 0 END) AS f_VALUE_INCOME, (CASE WHEN v_suboperation.f_value<=0 THEN v_suboperation.f_value ELSE 0 END) AS f_VALUE_EXPENSE FROM v_suboperation;
          265  +CREATE VIEW v_suboperation_displayname AS SELECT *, t_CATEGORY||' : '||f_value AS t_displayname FROM v_suboperation_display;
          266  +CREATE VIEW v_operation_display_all AS SELECT *,(SELECT s.t_name FROM account s WHERE s.id=v_operation.rd_account_id) AS t_ACCOUNT,(SELECT (CASE WHEN s.t_symbol!='' THEN s.t_symbol ELSE s.t_name END) FROM unit s WHERE s.id=v_operation.rc_unit_id) AS t_UNIT,(SELECT s.t_CATEGORY FROM v_suboperation_display s WHERE s.id=v_operation.i_MOSTIMPSUBOP) AS t_CATEGORY,(SELECT s.t_REFUND FROM v_suboperation_display s WHERE s.id=v_operation.i_MOSTIMPSUBOP) AS t_REFUND,(CASE WHEN v_operation.f_QUANTITY<0 THEN '-' WHEN v_operation.f_QUANTITY=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE, (CASE WHEN v_operation.f_QUANTITY<=0 THEN 'Dépense' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS, STRFTIME('%Y-W%W',v_operation.d_date) AS d_DATEWEEK,STRFTIME('%Y-%m',v_operation.d_date) AS d_DATEMONTH,STRFTIME('%Y',v_operation.d_date)||'-Q'||(CASE WHEN STRFTIME('%m',v_operation.d_date)<='03' THEN '1' WHEN STRFTIME('%m',v_operation.d_date)<='06' THEN '2' WHEN STRFTIME('%m',v_operation.d_date)<='09' THEN '3' ELSE '4' END) AS d_DATEQUARTER, STRFTIME('%Y',v_operation.d_date)||'-S'||(CASE WHEN STRFTIME('%m',v_operation.d_date)<='06' THEN '1' ELSE '2' END) AS d_DATESEMESTER, STRFTIME('%Y',v_operation.d_date) AS d_DATEYEAR, (SELECT count(*) FROM v_recurrentoperation s WHERE s.rd_operation_id=v_operation.id) AS i_NBRECURRENT,  (CASE WHEN v_operation.f_QUANTITY>=0 THEN v_operation.f_QUANTITY ELSE 0 END) AS f_QUANTITY_INCOME, (CASE WHEN v_operation.f_QUANTITY<=0 THEN v_operation.f_QUANTITY ELSE 0 END) AS f_QUANTITY_EXPENSE, (SELECT o2.f_balance FROM operationbalance o2 WHERE o2.r_operation_id=v_operation.id ) AS f_BALANCE, (CASE WHEN v_operation.f_QUANTITY>=0 THEN v_operation.f_CURRENTAMOUNT ELSE 0 END) AS f_CURRENTAMOUNT_INCOME, (CASE WHEN v_operation.f_QUANTITY<=0 THEN v_operation.f_CURRENTAMOUNT ELSE 0 END) AS f_CURRENTAMOUNT_EXPENSE FROM v_operation;
          267  +CREATE VIEW v_operation_template_display AS SELECT * FROM v_operation_display_all WHERE t_template='Y';
          268  +CREATE VIEW v_operation_display AS SELECT * FROM v_operation_display_all WHERE d_date!='0000-00-00' AND t_template='N';
          269  +CREATE VIEW v_unit_display AS SELECT *,(SELECT TOTAL(o.f_QUANTITY) FROM v_operation_display o WHERE o.rc_unit_id=v_unit.id) AS f_QUANTITYOWNED FROM v_unit;
          270  +CREATE VIEW v_account_display AS SELECT (CASE t_type WHEN 'C' THEN 'Courant' WHEN 'D' THEN 'Carte de crédit' WHEN 'A' THEN 'Actif' WHEN 'I' THEN 'Investissement' WHEN 'W' THEN 'Portefeuille' WHEN 'L' THEN 'Prêt' WHEN 'O' THEN 'Autre' END) AS t_TYPENLS,bank.t_name  AS t_BANK,bank.t_bank_number AS t_BANK_NUMBER,bank.t_icon AS t_ICON,v_account.*,(v_account.f_CURRENTAMOUNT/(SELECT u.f_CURRENTAMOUNT FROM v_unit u, operation s WHERE u.id=s.rc_unit_id AND s.rd_account_id=v_account.id AND s.d_date='0000-00-00')) AS f_QUANTITY, (SELECT (CASE WHEN u.t_symbol!='' THEN u.t_symbol ELSE u.t_name END) FROM unit u, operation s WHERE u.id=s.rc_unit_id AND s.rd_account_id=v_account.id AND s.d_date='0000-00-00') AS t_UNIT, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.t_status!='N' AND s.t_template='N') AS f_CHECKED, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.t_status='N' AND s.t_template='N') AS f_COMING_SOON, (SELECT TOTAL(s.f_CURRENTAMOUNT) FROM v_operation s WHERE s.rd_account_id=v_account.id AND s.d_date<=date('now') AND s.t_template='N') AS f_TODAYAMOUNT, (SELECT count(*) FROM v_operation_display s WHERE s.rd_account_id=v_account.id) AS i_NBOPERATIONS, IFNULL((SELECT s.f_rate FROM interest s WHERE s.rd_account_id=v_account.id AND s.d_date=v_account.d_MAXDATE),0) AS f_RATE FROM v_account, bank WHERE bank.id=v_account.rd_bank_id;
          271  +CREATE VIEW v_operation_consolidated AS SELECT (SELECT s.t_TYPENLS FROM v_account_display s WHERE s.id=op.rd_account_id) AS t_ACCOUNTTYPE,(SELECT u.t_TYPENLS FROM v_unit u WHERE u.id=op.rc_unit_id) AS t_UNITTYPE,sop.id AS i_SUBOPID, sop.r_refund_id AS r_refund_id, (CASE WHEN sop.t_comment='' THEN op.t_comment ELSE sop.t_comment END) AS t_REALCOMMENT, sop.t_CATEGORY AS t_REALCATEGORY, sop.t_REFUND AS t_REALREFUND, sop.r_category_id AS i_IDCATEGORY, (CASE WHEN sop.f_value<0 THEN '-' WHEN sop.f_value=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE, (CASE WHEN sop.f_value<0 THEN 'Dépense' WHEN sop.f_value=0 THEN '' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS, sop.f_value AS f_REALQUANTITY, sop.f_VALUE_INCOME AS f_REALQUANTITY_INCOME, sop.f_VALUE_EXPENSE AS f_REALQUANTITY_EXPENSE, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_value) AS f_REALCURRENTAMOUNT, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_VALUE_INCOME) AS f_REALCURRENTAMOUNT_INCOME, ((SELECT u.f_CURRENTAMOUNT FROM v_unit u WHERE u.id=op.rc_unit_id)*sop.f_VALUE_EXPENSE) AS f_REALCURRENTAMOUNT_EXPENSE, op.* FROM v_operation_display_all AS op, v_suboperation_display AS sop WHERE op.t_template='N' AND sop.rd_operation_id=op.ID;
          272  +CREATE VIEW v_operation_prop AS SELECT p.id AS i_PROPPID, p.t_name AS i_PROPPNAME, p.t_value AS i_PROPVALUE, op.* FROM v_operation_consolidated AS op LEFT OUTER JOIN parameters AS p ON p.t_uuid_parent=op.id||'-operation';
          273  +CREATE VIEW v_refund_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM v_operation_consolidated WHERE r_refund_id=refund.id AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce suiveur car utilisé par des opérations rapprochées' END) t_delete_message FROM refund;
          274  +CREATE VIEW v_refund AS SELECT *, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE o.r_refund_id=refund.id) AS f_CURRENTAMOUNT FROM refund;
          275  +CREATE VIEW v_refund_display AS SELECT *,(SELECT MIN(o.d_date) FROM v_operation_consolidated o WHERE o.r_refund_id=v_refund.id) AS d_FIRSTDATE, (SELECT MAX(o.d_date) FROM v_operation_consolidated o WHERE o.r_refund_id=v_refund.id) AS d_LASTDATE  FROM v_refund;
          276  +CREATE VIEW v_refund_displayname AS SELECT *, t_name AS t_displayname FROM refund;
          277  +CREATE VIEW v_payee_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM operation WHERE r_payee_id=payee.id AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire ce tiers car utilisé par des opérations rapprochées' END) t_delete_message FROM payee;
          278  +CREATE VIEW v_payee AS SELECT *, (SELECT TOTAL(o.f_CURRENTAMOUNT) FROM v_operation o WHERE o.r_payee_id=payee.id AND o.t_template='N') AS f_CURRENTAMOUNT FROM payee;
          279  +CREATE VIEW v_payee_display AS SELECT *  FROM v_payee;
          280  +CREATE VIEW v_payee_displayname AS SELECT *, t_name AS t_displayname FROM payee;
          281  +CREATE VIEW v_category_delete AS SELECT *, (CASE WHEN EXISTS(SELECT 1 FROM v_operation_consolidated WHERE (t_REALCATEGORY=category.t_fullname OR t_REALCATEGORY like category.t_fullname||'%') AND t_status='Y') THEN 'Vous n''êtes pas autorisé à détruire cette catégorie car utilisée par des opérations rapprochées' END) t_delete_message FROM category;
          282  +CREATE VIEW v_category_display_tmp AS SELECT *,(SELECT count(distinct(so.rd_operation_id)) FROM operation o, suboperation so WHERE so.rd_operation_id=o.id AND so.r_category_id=v_category.ID AND o.t_template='N') AS i_NBOPERATIONS, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE o.i_IDCATEGORY=v_category.ID) AS f_REALCURRENTAMOUNT FROM v_category;
          283  +CREATE VIEW v_category_display AS SELECT *,f_REALCURRENTAMOUNT+(SELECT TOTAL(c.f_REALCURRENTAMOUNT) FROM vm_category_display_tmp c WHERE c.t_fullname LIKE vm_category_display_tmp.t_fullname||' > %') AS f_SUMCURRENTAMOUNT, i_NBOPERATIONS+(SELECT CAST(TOTAL(c.i_NBOPERATIONS) AS INTEGER) FROM vm_category_display_tmp c WHERE c.t_fullname like vm_category_display_tmp.t_fullname||' > %') AS i_SUMNBOPERATIONS, (CASE WHEN t_bookmarked='Y' THEN 'Y' WHEN EXISTS(SELECT 1 FROM category c WHERE c.t_bookmarked='Y' AND c.t_fullname like vm_category_display_tmp.t_fullname||' > %') THEN 'C' ELSE 'N' END) AS t_HASBOOKMARKEDCHILD, (CASE WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT<0 THEN '-' WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT=0 THEN '' ELSE '+' END) AS t_TYPEEXPENSE,(CASE WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT<0 THEN 'Dépense' WHEN vm_category_display_tmp.f_REALCURRENTAMOUNT=0 THEN '' ELSE 'Revenu' END) AS t_TYPEEXPENSENLS FROM vm_category_display_tmp;
          284  +CREATE VIEW v_recurrentoperation_display AS SELECT rop.*, op.t_ACCOUNT, op.i_number, op.t_mode, op.i_group_id, op.t_TRANSFER, op.t_PAYEE, op.t_comment, op.t_CATEGORY, op.t_status, op.f_CURRENTAMOUNT FROM v_recurrentoperation rop, v_operation_display_all AS op WHERE rop.rd_operation_id=op.ID;
          285  +CREATE VIEW v_rule AS SELECT *,(SELECT COUNT(1) FROM rule r WHERE r.f_sortorder<=rule.f_sortorder) AS i_ORDER FROM rule;
          286  +CREATE VIEW v_rule_displayname AS SELECT *, t_definition AS t_displayname FROM rule;
          287  +CREATE VIEW v_interest AS SELECT *,(SELECT s.t_name FROM account s WHERE s.id=interest.rd_account_id) AS t_ACCOUNT  FROM interest;
          288  +CREATE VIEW v_interest_displayname AS SELECT *, STRFTIME('%d/%m/%Y',d_date)||' '||f_rate||'%' AS t_displayname FROM interest;
          289  +CREATE VIEW v_budgetrule AS SELECT *, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budgetrule.rc_category_id),'') AS t_CATEGORYCONDITION, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budgetrule.rc_category_id_target),'') AS t_CATEGORY, (CASE WHEN budgetrule.i_condition=-1 THEN 'Négatif' WHEN budgetrule.i_condition=1 THEN 'Positif' WHEN budgetrule.i_condition=0 THEN 'Tous' END) AS t_WHENNLS, f_quantity||(CASE WHEN budgetrule.t_absolute='N' THEN '%' ELSE (SELECT t_symbol FROM unit WHERE t_type='1') END) AS t_WHATNLS,(CASE WHEN budgetrule.t_rule='N' THEN 'Suivant' WHEN budgetrule.t_rule='C' THEN 'Courant' WHEN budgetrule.t_rule='Y' THEN 'Année' END) AS t_RULENLS FROM budgetrule;
          290  +CREATE VIEW v_budgetrule_display AS SELECT *  FROM v_budgetrule;
          291  +CREATE VIEW v_budgetrule_displayname AS SELECT *, t_WHENNLS||' '||t_WHATNLS||' '||t_RULENLS||' '||t_CATEGORY AS t_displayname FROM v_budgetrule;
          292  +CREATE VIEW v_budget_tmp AS SELECT *, IFNULL((SELECT s.t_fullname FROM category s WHERE s.id=budget.rc_category_id),'') AS t_CATEGORY, (i_year||(CASE WHEN i_month=0 THEN '' WHEN i_month<10 THEN '-0'||i_month ELSE '-'||i_month END)) AS t_PERIOD, (SELECT TOTAL(o.f_REALCURRENTAMOUNT) FROM v_operation_consolidated o WHERE STRFTIME('%Y', o.d_date)=i_year AND (i_month=0 OR STRFTIME('%m', o.d_date)=i_month) AND o.i_IDCATEGORY IN (SELECT b2.id_category FROM budgetcategory b2 WHERE b2.id=budget.id)) AS f_CURRENTAMOUNT, (SELECT GROUP_CONCAT(v_budgetrule_displayname.t_displayname,',') FROM v_budgetrule_displayname WHERE (v_budgetrule_displayname.t_year_condition='N' OR budget.i_year=v_budgetrule_displayname.i_year) AND (v_budgetrule_displayname.t_month_condition='N' OR budget.i_month=v_budgetrule_displayname.i_month) AND (v_budgetrule_displayname.t_category_condition='N' OR budget.rc_category_id=v_budgetrule_displayname.rc_category_id) ORDER BY v_budgetrule_displayname.t_absolute DESC, v_budgetrule_displayname.id) AS t_RULES FROM budget;
          293  +CREATE VIEW v_budget AS SELECT *, (f_CURRENTAMOUNT-f_budgeted_modified) AS f_DELTABEFORETRANSFER, (f_CURRENTAMOUNT-f_budgeted_modified-f_transferred) AS f_DELTA FROM v_budget_tmp;
          294  +CREATE VIEW v_budget_display AS SELECT *, (f_CURRENTAMOUNT-f_budgeted_modified) AS f_DELTABEFORETRANSFER, (f_CURRENTAMOUNT-f_budgeted_modified-f_transferred) AS f_DELTA FROM vm_budget_tmp;
          295  +CREATE VIEW v_budget_displayname AS SELECT *, t_CATEGORY||' '||t_PERIOD||' '||f_budgeted_modified AS t_displayname FROM v_budget;
          296  +CREATE TRIGGER fkdc_bank_parameters_uuid BEFORE DELETE ON bank FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'bank'; END;
          297  +CREATE TRIGGER fkdc_account_parameters_uuid BEFORE DELETE ON account FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'account'; END;
          298  +CREATE TRIGGER fkdc_unit_parameters_uuid BEFORE DELETE ON unit FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'unit'; END;
          299  +CREATE TRIGGER fkdc_unitvalue_parameters_uuid BEFORE DELETE ON unitvalue FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'unitvalue'; END;
          300  +CREATE TRIGGER fkdc_category_parameters_uuid BEFORE DELETE ON category FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'category'; END;
          301  +CREATE TRIGGER fkdc_operation_parameters_uuid BEFORE DELETE ON operation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'operation'; END;
          302  +CREATE TRIGGER fkdc_interest_parameters_uuid BEFORE DELETE ON interest FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'interest'; END;
          303  +CREATE TRIGGER fkdc_suboperation_parameters_uuid BEFORE DELETE ON suboperation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'suboperation'; END;
          304  +CREATE TRIGGER fkdc_refund_parameters_uuid BEFORE DELETE ON refund FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'refund'; END;
          305  +CREATE TRIGGER fkdc_payee_parameters_uuid BEFORE DELETE ON payee FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'payee'; END;
          306  +CREATE TRIGGER fkdc_recurrentoperation_parameters_uuid BEFORE DELETE ON recurrentoperation FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'recurrentoperation'; END;
          307  +CREATE TRIGGER fkdc_rule_parameters_uuid BEFORE DELETE ON rule FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'rule'; END;
          308  +CREATE TRIGGER fkdc_budget_parameters_uuid BEFORE DELETE ON budget FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'budget'; END;
          309  +CREATE TRIGGER fkdc_budgetrule_parameters_uuid BEFORE DELETE ON budgetrule FOR EACH ROW BEGIN     DELETE FROM parameters WHERE parameters.t_uuid_parent=OLD.id||'-'||'budgetrule'; END;
          310  +CREATE TRIGGER cpt_category_fullname1 AFTER INSERT ON category BEGIN UPDATE category SET t_fullname=CASE WHEN rd_category_id IS NULL OR rd_category_id='' OR rd_category_id=0 THEN new.t_name ELSE (SELECT c.t_fullname FROM category c WHERE c.id=new.rd_category_id)||' > '||new.t_name END WHERE id=new.id;END;
          311  +CREATE TRIGGER cpt_category_fullname2 AFTER UPDATE OF t_name, rd_category_id ON category BEGIN UPDATE category SET t_fullname=CASE WHEN rd_category_id IS NULL OR rd_category_id='' OR rd_category_id=0 THEN new.t_name ELSE (SELECT c.t_fullname FROM category c WHERE c.id=new.rd_category_id)||' > '||new.t_name END WHERE id=new.id;UPDATE category SET t_name=t_name WHERE rd_category_id=new.id;END;
          312  +CREATE TRIGGER fkdc_category_delete BEFORE DELETE ON category FOR EACH ROW BEGIN     UPDATE suboperation SET r_category_id=OLD.rd_category_id WHERE r_category_id=OLD.id; END;
          313  +explain
          314  +       SELECT TOTAL(f_CURRENTAMOUNT), d_DATEMONTH
          315  +       from v_operation_display
          316  +       WHERE d_DATEMONTH IN ('2012-05', '2012-04')
          317  +       group by d_DATEMONTH, t_TYPEEXPENSE;
          318  +  }
          319  +} {/.* Goto .*/}
          320  +
          321  +# The next test requires FTS4
          322  +ifcapable !fts3 {
          323  +  finish_test
          324  +  return
          325  +}
          326  +
          327  +# Taken from the gnome-shell project
          328  +#
          329  +db close
          330  +forcedelete test.db
          331  +sqlite3 db test.db
          332  +do_test fuzz-oss1-gnomeshell {
          333  +  db eval {
          334  +CREATE TABLE Resource (ID INTEGER NOT NULL PRIMARY KEY, Uri TEXT NOT
          335  +NULL, UNIQUE (Uri));
          336  +CREATE VIRTUAL TABLE fts USING fts4;
          337  +CREATE TABLE "mfo:Action" (ID INTEGER NOT NULL PRIMARY KEY);
          338  +CREATE TABLE "mfo:Enclosure" (ID INTEGER NOT NULL PRIMARY KEY,
          339  +"mfo:remoteLink" INTEGER, "mfo:remoteLink:graph" INTEGER,
          340  +"mfo:groupDefault" INTEGER, "mfo:groupDefault:graph" INTEGER,
          341  +"mfo:localLink" INTEGER, "mfo:localLink:graph" INTEGER, "mfo:optional"
          342  +INTEGER, "mfo:optional:graph" INTEGER);
          343  +CREATE TABLE "mfo:FeedChannel" (ID INTEGER NOT NULL PRIMARY KEY,
          344  +"mfo:updatedTime" INTEGER, "mfo:updatedTime:graph" INTEGER,
          345  +"mfo:updatedTime:localDate" INTEGER, "mfo:updatedTime:localTime"
          346  +INTEGER, "mfo:unreadCount" INTEGER, "mfo:unreadCount:graph" INTEGER,
          347  +"mfo:totalCount" INTEGER, "mfo:totalCount:graph" INTEGER, "mfo:action"
          348  +INTEGER, "mfo:action:graph" INTEGER, "mfo:type" INTEGER,
          349  +"mfo:type:graph" INTEGER);
          350  +CREATE TABLE "mfo:FeedElement" (ID INTEGER NOT NULL PRIMARY KEY,
          351  +"mfo:image" TEXT COLLATE NOCASE, "mfo:image:graph" INTEGER,
          352  +"mfo:feedSettings" INTEGER, "mfo:feedSettings:graph" INTEGER);
          353  +CREATE TABLE "mfo:FeedMessage" (ID INTEGER NOT NULL PRIMARY KEY,
          354  +"mfo:downloadedTime" INTEGER, "mfo:downloadedTime:graph" INTEGER,
          355  +"mfo:downloadedTime:localDate" INTEGER, "mfo:downloadedTime:localTime"
          356  +INTEGER);
          357  +CREATE TABLE "mfo:FeedMessage_mfo:enclosureList" (ID INTEGER NOT NULL,
          358  +"mfo:enclosureList" INTEGER NOT NULL, "mfo:enclosureList:graph"
          359  +INTEGER);
          360  +CREATE TABLE "mfo:FeedSettings" (ID INTEGER NOT NULL PRIMARY KEY,
          361  +"mfo:updateInterval" INTEGER, "mfo:updateInterval:graph" INTEGER,
          362  +"mfo:expiryInterval" INTEGER, "mfo:expiryInterval:graph" INTEGER,
          363  +"mfo:downloadPath" TEXT COLLATE NOCASE, "mfo:downloadPath:graph"
          364  +INTEGER, "mfo:downloadFlag" INTEGER, "mfo:downloadFlag:graph" INTEGER,
          365  +"mfo:maxSize" INTEGER, "mfo:maxSize:graph" INTEGER);
          366  +CREATE TABLE "mfo:FeedType" (ID INTEGER NOT NULL PRIMARY KEY,
          367  +"mfo:name" TEXT COLLATE NOCASE, "mfo:name:graph" INTEGER);
          368  +CREATE TABLE "mlo:GeoBoundingBox" (ID INTEGER NOT NULL PRIMARY KEY);
          369  +CREATE TABLE "mlo:GeoBoundingBox_mlo:bbNorthWest" (ID INTEGER NOT
          370  +NULL, "mlo:bbNorthWest" INTEGER NOT NULL, "mlo:bbNorthWest:graph"
          371  +INTEGER);
          372  +CREATE TABLE "mlo:GeoBoundingBox_mlo:bbSouthEast" (ID INTEGER NOT
          373  +NULL, "mlo:bbSouthEast" INTEGER NOT NULL, "mlo:bbSouthEast:graph"
          374  +INTEGER);
          375  +CREATE TABLE "mlo:GeoLocation" (ID INTEGER NOT NULL PRIMARY KEY);
          376  +CREATE TABLE "mlo:GeoLocation_mlo:asBoundingBox" (ID INTEGER NOT NULL,
          377  +"mlo:asBoundingBox" INTEGER NOT NULL, "mlo:asBoundingBox:graph"
          378  +INTEGER);
          379  +CREATE TABLE "mlo:GeoLocation_mlo:asGeoPoint" (ID INTEGER NOT NULL,
          380  +"mlo:asGeoPoint" INTEGER NOT NULL, "mlo:asGeoPoint:graph" INTEGER);
          381  +CREATE TABLE "mlo:GeoLocation_mlo:asPostalAddress" (ID INTEGER NOT
          382  +NULL, "mlo:asPostalAddress" INTEGER NOT NULL,
          383  +"mlo:asPostalAddress:graph" INTEGER);
          384  +CREATE TABLE "mlo:GeoPoint" (ID INTEGER NOT NULL PRIMARY KEY);
          385  +CREATE TABLE "mlo:GeoPoint_mlo:address" (ID INTEGER NOT NULL,
          386  +"mlo:address" TEXT NOT NULL, "mlo:address:graph" INTEGER);
          387  +CREATE TABLE "mlo:GeoPoint_mlo:altitude" (ID INTEGER NOT NULL,
          388  +"mlo:altitude" REAL NOT NULL, "mlo:altitude:graph" INTEGER);
          389  +CREATE TABLE "mlo:GeoPoint_mlo:city" (ID INTEGER NOT NULL, "mlo:city"
          390  +TEXT NOT NULL, "mlo:city:graph" INTEGER);
          391  +CREATE TABLE "mlo:GeoPoint_mlo:country" (ID INTEGER NOT NULL,
          392  +"mlo:country" TEXT NOT NULL, "mlo:country:graph" INTEGER);
          393  +CREATE TABLE "mlo:GeoPoint_mlo:latitude" (ID INTEGER NOT NULL,
          394  +"mlo:latitude" REAL NOT NULL, "mlo:latitude:graph" INTEGER);
          395  +CREATE TABLE "mlo:GeoPoint_mlo:longitude" (ID INTEGER NOT NULL,
          396  +"mlo:longitude" REAL NOT NULL, "mlo:longitude:graph" INTEGER);
          397  +CREATE TABLE "mlo:GeoPoint_mlo:state" (ID INTEGER NOT NULL,
          398  +"mlo:state" TEXT NOT NULL, "mlo:state:graph" INTEGER);
          399  +CREATE TABLE "mlo:GeoPoint_mlo:timestamp" (ID INTEGER NOT NULL,
          400  +"mlo:timestamp" INTEGER NOT NULL, "mlo:timestamp:graph" INTEGER,
          401  +"mlo:timestamp:localDate" INTEGER NOT NULL, "mlo:timestamp:localTime"
          402  +INTEGER NOT NULL);
          403  +CREATE TABLE "mlo:GeoSphere" (ID INTEGER NOT NULL PRIMARY KEY);
          404  +CREATE TABLE "mlo:GeoSphere_mlo:radius" (ID INTEGER NOT NULL,
          405  +"mlo:radius" REAL NOT NULL, "mlo:radius:graph" INTEGER);
          406  +CREATE TABLE "mlo:Landmark" (ID INTEGER NOT NULL PRIMARY KEY);
          407  +CREATE TABLE "mlo:LandmarkCategory" (ID INTEGER NOT NULL PRIMARY KEY);
          408  +CREATE TABLE "mlo:LandmarkCategory_mlo:isRemovable" (ID INTEGER NOT
          409  +NULL, "mlo:isRemovable" INTEGER NOT NULL, "mlo:isRemovable:graph"
          410  +INTEGER);
          411  +CREATE TABLE "mlo:Landmark_mlo:belongsToCategory" (ID INTEGER NOT
          412  +NULL, "mlo:belongsToCategory" INTEGER NOT NULL,
          413  +"mlo:belongsToCategory:graph" INTEGER);
          414  +CREATE TABLE "mlo:Landmark_mlo:poiLocation" (ID INTEGER NOT NULL,
          415  +"mlo:poiLocation" INTEGER NOT NULL, "mlo:poiLocation:graph" INTEGER);
          416  +CREATE TABLE "mlo:LocationBoundingBox" (ID INTEGER NOT NULL PRIMARY KEY);
          417  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxEastLimit" (ID INTEGER
          418  +NOT NULL, "mlo:boxEastLimit" INTEGER NOT NULL,
          419  +"mlo:boxEastLimit:graph" INTEGER);
          420  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxNorthLimit" (ID INTEGER
          421  +NOT NULL, "mlo:boxNorthLimit" INTEGER NOT NULL,
          422  +"mlo:boxNorthLimit:graph" INTEGER);
          423  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxSouthWestCorner" (ID
          424  +INTEGER NOT NULL, "mlo:boxSouthWestCorner" INTEGER NOT NULL,
          425  +"mlo:boxSouthWestCorner:graph" INTEGER);
          426  +CREATE TABLE "mlo:LocationBoundingBox_mlo:boxVerticalLimit" (ID
          427  +INTEGER NOT NULL, "mlo:boxVerticalLimit" INTEGER NOT NULL,
          428  +"mlo:boxVerticalLimit:graph" INTEGER);
          429  +CREATE TABLE "mlo:PointOfInterest" (ID INTEGER NOT NULL PRIMARY KEY);
          430  +CREATE TABLE "mlo:Route" (ID INTEGER NOT NULL PRIMARY KEY);
          431  +CREATE TABLE "mlo:Route_mlo:endTime" (ID INTEGER NOT NULL,
          432  +"mlo:endTime" INTEGER NOT NULL, "mlo:endTime:graph" INTEGER,
          433  +"mlo:endTime:localDate" INTEGER NOT NULL, "mlo:endTime:localTime"
          434  +INTEGER NOT NULL);
          435  +CREATE TABLE "mlo:Route_mlo:routeDetails" (ID INTEGER NOT NULL,
          436  +"mlo:routeDetails" TEXT NOT NULL, "mlo:routeDetails:graph" INTEGER);
          437  +CREATE TABLE "mlo:Route_mlo:startTime" (ID INTEGER NOT NULL,
          438  +"mlo:startTime" INTEGER NOT NULL, "mlo:startTime:graph" INTEGER,
          439  +"mlo:startTime:localDate" INTEGER NOT NULL, "mlo:startTime:localTime"
          440  +INTEGER NOT NULL);
          441  +CREATE TABLE "mto:DownloadTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          442  +CREATE TABLE "mto:State" (ID INTEGER NOT NULL PRIMARY KEY);
          443  +CREATE TABLE "mto:SyncTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          444  +CREATE TABLE "mto:Transfer" (ID INTEGER NOT NULL PRIMARY KEY,
          445  +"mto:transferState" INTEGER, "mto:transferState:graph" INTEGER,
          446  +"mto:method" INTEGER, "mto:method:graph" INTEGER, "mto:created"
          447  +INTEGER, "mto:created:graph" INTEGER, "mto:created:localDate" INTEGER,
          448  +"mto:created:localTime" INTEGER, "mto:account" TEXT COLLATE NOCASE,
          449  +"mto:account:graph" INTEGER, "mto:starter" INTEGER,
          450  +"mto:starter:graph" INTEGER, "mto:agent" INTEGER, "mto:agent:graph"
          451  +INTEGER);
          452  +CREATE TABLE "mto:TransferElement" (ID INTEGER NOT NULL PRIMARY KEY,
          453  +"mto:source" INTEGER, "mto:source:graph" INTEGER, "mto:destination"
          454  +INTEGER, "mto:destination:graph" INTEGER, "mto:startedTime" INTEGER,
          455  +"mto:startedTime:graph" INTEGER, "mto:startedTime:localDate" INTEGER,
          456  +"mto:startedTime:localTime" INTEGER, "mto:completedTime" INTEGER,
          457  +"mto:completedTime:graph" INTEGER, "mto:completedTime:localDate"
          458  +INTEGER, "mto:completedTime:localTime" INTEGER, "mto:state" INTEGER,
          459  +"mto:state:graph" INTEGER);
          460  +CREATE TABLE "mto:TransferMethod" (ID INTEGER NOT NULL PRIMARY KEY);
          461  +CREATE TABLE "mto:Transfer_mto:transferList" (ID INTEGER NOT NULL,
          462  +"mto:transferList" INTEGER NOT NULL, "mto:transferList:graph"
          463  +INTEGER);
          464  +CREATE TABLE "mto:Transfer_mto:transferPrivacyLevel" (ID INTEGER NOT
          465  +NULL, "mto:transferPrivacyLevel" TEXT NOT NULL,
          466  +"mto:transferPrivacyLevel:graph" INTEGER);
          467  +CREATE TABLE "mto:UploadTransfer" (ID INTEGER NOT NULL PRIMARY KEY);
          468  +CREATE TABLE "mto:UploadTransfer_mto:transferCategory" (ID INTEGER NOT
          469  +NULL, "mto:transferCategory" TEXT NOT NULL,
          470  +"mto:transferCategory:graph" INTEGER);
          471  +CREATE TABLE "mtp:ScanType" (ID INTEGER NOT NULL PRIMARY KEY);
          472  +CREATE TABLE "nao:Property" (ID INTEGER NOT NULL PRIMARY KEY,
          473  +"nao:propertyName" TEXT COLLATE NOCASE, "nao:propertyName:graph"
          474  +INTEGER, "nao:propertyValue" TEXT COLLATE NOCASE,
          475  +"nao:propertyValue:graph" INTEGER);
          476  +CREATE TABLE "nao:Tag" (ID INTEGER NOT NULL PRIMARY KEY,
          477  +"nao:prefLabel" TEXT COLLATE NOCASE, "nao:prefLabel:graph" INTEGER,
          478  +"nao:description" TEXT COLLATE NOCASE, "nao:description:graph"
          479  +INTEGER);
          480  +CREATE TABLE "nao:Tag_tracker:isDefaultTag" (ID INTEGER NOT NULL,
          481  +"tracker:isDefaultTag" INTEGER NOT NULL, "tracker:isDefaultTag:graph"
          482  +INTEGER);
          483  +CREATE TABLE "nao:Tag_tracker:tagRelatedTo" (ID INTEGER NOT NULL,
          484  +"tracker:tagRelatedTo" INTEGER NOT NULL, "tracker:tagRelatedTo:graph"
          485  +INTEGER);
          486  +CREATE TABLE "ncal:AccessClassification" (ID INTEGER NOT NULL PRIMARY KEY);
          487  +CREATE TABLE "ncal:Alarm" (ID INTEGER NOT NULL PRIMARY KEY,
          488  +"ncal:repeat" INTEGER, "ncal:repeat:graph" INTEGER);
          489  +CREATE TABLE "ncal:AlarmAction" (ID INTEGER NOT NULL PRIMARY KEY);
          490  +CREATE TABLE "ncal:Alarm_ncal:action" (ID INTEGER NOT NULL,
          491  +"ncal:action" INTEGER NOT NULL, "ncal:action:graph" INTEGER);
          492  +CREATE TABLE "ncal:Attachment" (ID INTEGER NOT NULL PRIMARY KEY,
          493  +"ncal:attachmentUri" INTEGER, "ncal:attachmentUri:graph" INTEGER,
          494  +"ncal:fmttype" TEXT COLLATE NOCASE, "ncal:fmttype:graph" INTEGER,
          495  +"ncal:encoding" INTEGER, "ncal:encoding:graph" INTEGER,
          496  +"ncal:attachmentContent" TEXT COLLATE NOCASE,
          497  +"ncal:attachmentContent:graph" INTEGER);
          498  +CREATE TABLE "ncal:AttachmentEncoding" (ID INTEGER NOT NULL PRIMARY KEY);
          499  +CREATE TABLE "ncal:Attendee" (ID INTEGER NOT NULL PRIMARY KEY,
          500  +"ncal:delegatedTo" INTEGER, "ncal:delegatedTo:graph" INTEGER,
          501  +"ncal:delegatedFrom" INTEGER, "ncal:delegatedFrom:graph" INTEGER,
          502  +"ncal:cutype" INTEGER, "ncal:cutype:graph" INTEGER, "ncal:member"
          503  +INTEGER, "ncal:member:graph" INTEGER, "ncal:role" INTEGER,
          504  +"ncal:role:graph" INTEGER, "ncal:rsvp" INTEGER, "ncal:rsvp:graph"
          505  +INTEGER, "ncal:partstat" INTEGER, "ncal:partstat:graph" INTEGER);
          506  +CREATE TABLE "ncal:AttendeeOrOrganizer" (ID INTEGER NOT NULL PRIMARY
          507  +KEY, "ncal:dir" INTEGER, "ncal:dir:graph" INTEGER,
          508  +"ncal:involvedContact" INTEGER, "ncal:involvedContact:graph" INTEGER,
          509  +"ncal:sentBy" INTEGER, "ncal:sentBy:graph" INTEGER);
          510  +CREATE TABLE "ncal:AttendeeRole" (ID INTEGER NOT NULL PRIMARY KEY);
          511  +CREATE TABLE "ncal:BydayRulePart" (ID INTEGER NOT NULL PRIMARY KEY);
          512  +CREATE TABLE "ncal:BydayRulePart_ncal:bydayModifier" (ID INTEGER NOT
          513  +NULL, "ncal:bydayModifier" INTEGER NOT NULL,
          514  +"ncal:bydayModifier:graph" INTEGER);
          515  +CREATE TABLE "ncal:BydayRulePart_ncal:bydayWeekday" (ID INTEGER NOT
          516  +NULL, "ncal:bydayWeekday" INTEGER NOT NULL, "ncal:bydayWeekday:graph"
          517  +INTEGER);
          518  +CREATE TABLE "ncal:Calendar" (ID INTEGER NOT NULL PRIMARY KEY,
          519  +"ncal:method" TEXT COLLATE NOCASE, "ncal:method:graph" INTEGER,
          520  +"ncal:calscale" INTEGER, "ncal:calscale:graph" INTEGER, "ncal:prodid"
          521  +TEXT COLLATE NOCASE, "ncal:prodid:graph" INTEGER, "ncal:version" TEXT
          522  +COLLATE NOCASE, "ncal:version:graph" INTEGER);
          523  +CREATE TABLE "ncal:CalendarDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          524  +CREATE TABLE "ncal:CalendarScale" (ID INTEGER NOT NULL PRIMARY KEY);
          525  +CREATE TABLE "ncal:CalendarUserType" (ID INTEGER NOT NULL PRIMARY KEY);
          526  +CREATE TABLE "ncal:Calendar_ncal:component" (ID INTEGER NOT NULL,
          527  +"ncal:component" INTEGER NOT NULL, "ncal:component:graph" INTEGER);
          528  +CREATE TABLE "ncal:Event" (ID INTEGER NOT NULL PRIMARY KEY,
          529  +"ncal:eventStatus" INTEGER, "ncal:eventStatus:graph" INTEGER,
          530  +"ncal:transp" INTEGER, "ncal:transp:graph" INTEGER);
          531  +CREATE TABLE "ncal:EventStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          532  +CREATE TABLE "ncal:Freebusy" (ID INTEGER NOT NULL PRIMARY KEY);
          533  +CREATE TABLE "ncal:FreebusyPeriod" (ID INTEGER NOT NULL PRIMARY KEY,
          534  +"ncal:fbtype" INTEGER, "ncal:fbtype:graph" INTEGER);
          535  +CREATE TABLE "ncal:FreebusyType" (ID INTEGER NOT NULL PRIMARY KEY);
          536  +CREATE TABLE "ncal:Freebusy_ncal:freebusy" (ID INTEGER NOT NULL,
          537  +"ncal:freebusy" INTEGER NOT NULL, "ncal:freebusy:graph" INTEGER);
          538  +CREATE TABLE "ncal:Journal" (ID INTEGER NOT NULL PRIMARY KEY,
          539  +"ncal:journalStatus" INTEGER, "ncal:journalStatus:graph" INTEGER);
          540  +CREATE TABLE "ncal:JournalStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          541  +CREATE TABLE "ncal:NcalDateTime" (ID INTEGER NOT NULL PRIMARY KEY,
          542  +"ncal:ncalTimezone" INTEGER, "ncal:ncalTimezone:graph" INTEGER,
          543  +"ncal:date" INTEGER, "ncal:date:graph" INTEGER, "ncal:date:localDate"
          544  +INTEGER, "ncal:date:localTime" INTEGER, "ncal:dateTime" INTEGER,
          545  +"ncal:dateTime:graph" INTEGER, "ncal:dateTime:localDate" INTEGER,
          546  +"ncal:dateTime:localTime" INTEGER);
          547  +CREATE TABLE "ncal:NcalPeriod" (ID INTEGER NOT NULL PRIMARY KEY,
          548  +"ncal:periodBegin" INTEGER, "ncal:periodBegin:graph" INTEGER,
          549  +"ncal:periodBegin:localDate" INTEGER, "ncal:periodBegin:localTime"
          550  +INTEGER, "ncal:periodDuration" INTEGER, "ncal:periodDuration:graph"
          551  +INTEGER, "ncal:periodEnd" INTEGER, "ncal:periodEnd:graph" INTEGER,
          552  +"ncal:periodEnd:localDate" INTEGER, "ncal:periodEnd:localTime"
          553  +INTEGER);
          554  +CREATE TABLE "ncal:NcalTimeEntity" (ID INTEGER NOT NULL PRIMARY KEY);
          555  +CREATE TABLE "ncal:Organizer" (ID INTEGER NOT NULL PRIMARY KEY);
          556  +CREATE TABLE "ncal:ParticipationStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          557  +CREATE TABLE "ncal:RecurrenceFrequency" (ID INTEGER NOT NULL PRIMARY KEY);
          558  +CREATE TABLE "ncal:RecurrenceIdentifier" (ID INTEGER NOT NULL PRIMARY
          559  +KEY, "ncal:range" INTEGER, "ncal:range:graph" INTEGER,
          560  +"ncal:recurrenceIdDateTime" INTEGER, "ncal:recurrenceIdDateTime:graph"
          561  +INTEGER);
          562  +CREATE TABLE "ncal:RecurrenceIdentifierRange" (ID INTEGER NOT NULL PRIMARY KEY);
          563  +CREATE TABLE "ncal:RecurrenceRule" (ID INTEGER NOT NULL PRIMARY KEY,
          564  +"ncal:until" INTEGER, "ncal:until:graph" INTEGER,
          565  +"ncal:until:localDate" INTEGER, "ncal:until:localTime" INTEGER,
          566  +"ncal:wkst" INTEGER, "ncal:wkst:graph" INTEGER, "ncal:interval"
          567  +INTEGER, "ncal:interval:graph" INTEGER, "ncal:count" INTEGER,
          568  +"ncal:count:graph" INTEGER, "ncal:freq" INTEGER, "ncal:freq:graph"
          569  +INTEGER);
          570  +CREATE TABLE "ncal:RecurrenceRule_ncal:byday" (ID INTEGER NOT NULL,
          571  +"ncal:byday" INTEGER NOT NULL, "ncal:byday:graph" INTEGER);
          572  +CREATE TABLE "ncal:RecurrenceRule_ncal:byhour" (ID INTEGER NOT NULL,
          573  +"ncal:byhour" INTEGER NOT NULL, "ncal:byhour:graph" INTEGER);
          574  +CREATE TABLE "ncal:RecurrenceRule_ncal:byminute" (ID INTEGER NOT NULL,
          575  +"ncal:byminute" INTEGER NOT NULL, "ncal:byminute:graph" INTEGER);
          576  +CREATE TABLE "ncal:RecurrenceRule_ncal:bymonth" (ID INTEGER NOT NULL,
          577  +"ncal:bymonth" INTEGER NOT NULL, "ncal:bymonth:graph" INTEGER);
          578  +CREATE TABLE "ncal:RecurrenceRule_ncal:bymonthday" (ID INTEGER NOT
          579  +NULL, "ncal:bymonthday" INTEGER NOT NULL, "ncal:bymonthday:graph"
          580  +INTEGER);
          581  +CREATE TABLE "ncal:RecurrenceRule_ncal:bysecond" (ID INTEGER NOT NULL,
          582  +"ncal:bysecond" INTEGER NOT NULL, "ncal:bysecond:graph" INTEGER);
          583  +CREATE TABLE "ncal:RecurrenceRule_ncal:bysetpos" (ID INTEGER NOT NULL,
          584  +"ncal:bysetpos" INTEGER NOT NULL, "ncal:bysetpos:graph" INTEGER);
          585  +CREATE TABLE "ncal:RecurrenceRule_ncal:byweekno" (ID INTEGER NOT NULL,
          586  +"ncal:byweekno" INTEGER NOT NULL, "ncal:byweekno:graph" INTEGER);
          587  +CREATE TABLE "ncal:RecurrenceRule_ncal:byyearday" (ID INTEGER NOT
          588  +NULL, "ncal:byyearday" INTEGER NOT NULL, "ncal:byyearday:graph"
          589  +INTEGER);
          590  +CREATE TABLE "ncal:RequestStatus" (ID INTEGER NOT NULL PRIMARY KEY,
          591  +"ncal:statusDescription" TEXT COLLATE NOCASE,
          592  +"ncal:statusDescription:graph" INTEGER, "ncal:returnStatus" TEXT
          593  +COLLATE NOCASE, "ncal:returnStatus:graph" INTEGER,
          594  +"ncal:requestStatusData" TEXT COLLATE NOCASE,
          595  +"ncal:requestStatusData:graph" INTEGER);
          596  +CREATE TABLE "ncal:TimeTransparency" (ID INTEGER NOT NULL PRIMARY KEY);
          597  +CREATE TABLE "ncal:Timezone" (ID INTEGER NOT NULL PRIMARY KEY,
          598  +"ncal:tzurl" INTEGER, "ncal:tzurl:graph" INTEGER, "ncal:standard"
          599  +INTEGER, "ncal:standard:graph" INTEGER, "ncal:daylight" INTEGER,
          600  +"ncal:daylight:graph" INTEGER, "ncal:tzid" TEXT COLLATE NOCASE,
          601  +"ncal:tzid:graph" INTEGER);
          602  +CREATE TABLE "ncal:TimezoneObservance" (ID INTEGER NOT NULL PRIMARY
          603  +KEY, "ncal:tzoffsetfrom" TEXT COLLATE NOCASE,
          604  +"ncal:tzoffsetfrom:graph" INTEGER, "ncal:tzoffsetto" TEXT COLLATE
          605  +NOCASE, "ncal:tzoffsetto:graph" INTEGER, "ncal:tzname" TEXT COLLATE
          606  +NOCASE, "ncal:tzname:graph" INTEGER);
          607  +CREATE TABLE "ncal:Todo" (ID INTEGER NOT NULL PRIMARY KEY,
          608  +"ncal:percentComplete" INTEGER, "ncal:percentComplete:graph" INTEGER,
          609  +"ncal:completed" INTEGER, "ncal:completed:graph" INTEGER,
          610  +"ncal:completed:localDate" INTEGER, "ncal:completed:localTime"
          611  +INTEGER, "ncal:todoStatus" INTEGER, "ncal:todoStatus:graph" INTEGER,
          612  +"ncal:due" INTEGER, "ncal:due:graph" INTEGER);
          613  +CREATE TABLE "ncal:TodoStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          614  +CREATE TABLE "ncal:Trigger" (ID INTEGER NOT NULL PRIMARY KEY,
          615  +"ncal:related" INTEGER, "ncal:related:graph" INTEGER,
          616  +"ncal:triggerDateTime" INTEGER, "ncal:triggerDateTime:graph" INTEGER,
          617  +"ncal:triggerDateTime:localDate" INTEGER,
          618  +"ncal:triggerDateTime:localTime" INTEGER, "ncal:triggerDuration"
          619  +INTEGER, "ncal:triggerDuration:graph" INTEGER);
          620  +CREATE TABLE "ncal:TriggerRelation" (ID INTEGER NOT NULL PRIMARY KEY);
          621  +CREATE TABLE "ncal:UnionParentClass" (ID INTEGER NOT NULL PRIMARY KEY,
          622  +"ncal:lastModified" INTEGER, "ncal:lastModified:graph" INTEGER,
          623  +"ncal:lastModified:localDate" INTEGER, "ncal:lastModified:localTime"
          624  +INTEGER, "ncal:trigger" INTEGER, "ncal:trigger:graph" INTEGER,
          625  +"ncal:created" INTEGER, "ncal:created:graph" INTEGER,
          626  +"ncal:created:localDate" INTEGER, "ncal:created:localTime" INTEGER,
          627  +"ncal:url" INTEGER, "ncal:url:graph" INTEGER, "ncal:comment" TEXT
          628  +COLLATE NOCASE, "ncal:comment:graph" INTEGER, "ncal:summaryAltRep"
          629  +INTEGER, "ncal:summaryAltRep:graph" INTEGER, "ncal:priority" INTEGER,
          630  +"ncal:priority:graph" INTEGER, "ncal:location" TEXT COLLATE NOCASE,
          631  +"ncal:location:graph" INTEGER, "ncal:uid" TEXT COLLATE NOCASE,
          632  +"ncal:uid:graph" INTEGER, "ncal:requestStatus" INTEGER,
          633  +"ncal:requestStatus:graph" INTEGER, "ncal:recurrenceId" INTEGER,
          634  +"ncal:recurrenceId:graph" INTEGER, "ncal:dtstamp" INTEGER,
          635  +"ncal:dtstamp:graph" INTEGER, "ncal:dtstamp:localDate" INTEGER,
          636  +"ncal:dtstamp:localTime" INTEGER, "ncal:class" INTEGER,
          637  +"ncal:class:graph" INTEGER, "ncal:organizer" INTEGER,
          638  +"ncal:organizer:graph" INTEGER, "ncal:dtend" INTEGER,
          639  +"ncal:dtend:graph" INTEGER, "ncal:summary" TEXT COLLATE NOCASE,
          640  +"ncal:summary:graph" INTEGER, "ncal:descriptionAltRep" INTEGER,
          641  +"ncal:descriptionAltRep:graph" INTEGER, "ncal:commentAltRep" INTEGER,
          642  +"ncal:commentAltRep:graph" INTEGER, "ncal:sequence" INTEGER,
          643  +"ncal:sequence:graph" INTEGER, "ncal:contact" TEXT COLLATE NOCASE,
          644  +"ncal:contact:graph" INTEGER, "ncal:contactAltRep" INTEGER,
          645  +"ncal:contactAltRep:graph" INTEGER, "ncal:locationAltRep" INTEGER,
          646  +"ncal:locationAltRep:graph" INTEGER, "ncal:geo" INTEGER,
          647  +"ncal:geo:graph" INTEGER, "ncal:resourcesAltRep" INTEGER,
          648  +"ncal:resourcesAltRep:graph" INTEGER, "ncal:dtstart" INTEGER,
          649  +"ncal:dtstart:graph" INTEGER, "ncal:description" TEXT COLLATE NOCASE,
          650  +"ncal:description:graph" INTEGER, "ncal:relatedToSibling" TEXT COLLATE
          651  +NOCASE, "ncal:relatedToSibling:graph" INTEGER, "ncal:duration"
          652  +INTEGER, "ncal:duration:graph" INTEGER);
          653  +CREATE TABLE "ncal:UnionParentClass_ncal:attach" (ID INTEGER NOT NULL,
          654  +"ncal:attach" INTEGER NOT NULL, "ncal:attach:graph" INTEGER);
          655  +CREATE TABLE "ncal:UnionParentClass_ncal:attendee" (ID INTEGER NOT
          656  +NULL, "ncal:attendee" INTEGER NOT NULL, "ncal:attendee:graph"
          657  +INTEGER);
          658  +CREATE TABLE "ncal:UnionParentClass_ncal:categories" (ID INTEGER NOT
          659  +NULL, "ncal:categories" TEXT NOT NULL, "ncal:categories:graph"
          660  +INTEGER);
          661  +CREATE TABLE "ncal:UnionParentClass_ncal:exdate" (ID INTEGER NOT NULL,
          662  +"ncal:exdate" INTEGER NOT NULL, "ncal:exdate:graph" INTEGER);
          663  +CREATE TABLE "ncal:UnionParentClass_ncal:exrule" (ID INTEGER NOT NULL,
          664  +"ncal:exrule" INTEGER NOT NULL, "ncal:exrule:graph" INTEGER);
          665  +CREATE TABLE "ncal:UnionParentClass_ncal:hasAlarm" (ID INTEGER NOT
          666  +NULL, "ncal:hasAlarm" INTEGER NOT NULL, "ncal:hasAlarm:graph"
          667  +INTEGER);
          668  +CREATE TABLE "ncal:UnionParentClass_ncal:ncalRelation" (ID INTEGER NOT
          669  +NULL, "ncal:ncalRelation" TEXT NOT NULL, "ncal:ncalRelation:graph"
          670  +INTEGER);
          671  +CREATE TABLE "ncal:UnionParentClass_ncal:rdate" (ID INTEGER NOT NULL,
          672  +"ncal:rdate" INTEGER NOT NULL, "ncal:rdate:graph" INTEGER);
          673  +CREATE TABLE "ncal:UnionParentClass_ncal:relatedToChild" (ID INTEGER
          674  +NOT NULL, "ncal:relatedToChild" TEXT NOT NULL,
          675  +"ncal:relatedToChild:graph" INTEGER);
          676  +CREATE TABLE "ncal:UnionParentClass_ncal:relatedToParent" (ID INTEGER
          677  +NOT NULL, "ncal:relatedToParent" TEXT NOT NULL,
          678  +"ncal:relatedToParent:graph" INTEGER);
          679  +CREATE TABLE "ncal:UnionParentClass_ncal:resources" (ID INTEGER NOT
          680  +NULL, "ncal:resources" TEXT NOT NULL, "ncal:resources:graph" INTEGER);
          681  +CREATE TABLE "ncal:UnionParentClass_ncal:rrule" (ID INTEGER NOT NULL,
          682  +"ncal:rrule" INTEGER NOT NULL, "ncal:rrule:graph" INTEGER);
          683  +CREATE TABLE "ncal:Weekday" (ID INTEGER NOT NULL PRIMARY KEY);
          684  +CREATE TABLE "nco:Affiliation" (ID INTEGER NOT NULL PRIMARY KEY,
          685  +"nco:department" TEXT COLLATE NOCASE, "nco:department:graph" INTEGER,
          686  +"nco:org" INTEGER, "nco:org:graph" INTEGER, "nco:role" TEXT COLLATE
          687  +NOCASE, "nco:role:graph" INTEGER);
          688  +CREATE TABLE "nco:Affiliation_nco:title" (ID INTEGER NOT NULL,
          689  +"nco:title" TEXT NOT NULL, "nco:title:graph" INTEGER);
          690  +CREATE TABLE "nco:AuthorizationStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          691  +CREATE TABLE "nco:BbsNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          692  +CREATE TABLE "nco:CarPhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          693  +CREATE TABLE "nco:CellPhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          694  +CREATE TABLE "nco:Contact" (ID INTEGER NOT NULL PRIMARY KEY,
          695  +"nco:fullname" TEXT COLLATE NOCASE, "nco:fullname:graph" INTEGER,
          696  +"nco:key" INTEGER, "nco:key:graph" INTEGER, "nco:contactUID" TEXT
          697  +COLLATE NOCASE, "nco:contactUID:graph" INTEGER, "nco:contactLocalUID"
          698  +TEXT COLLATE NOCASE, "nco:contactLocalUID:graph" INTEGER,
          699  +"nco:hasLocation" INTEGER, "nco:hasLocation:graph" INTEGER,
          700  +"nco:nickname" TEXT COLLATE NOCASE, "nco:nickname:graph" INTEGER,
          701  +"nco:representative" INTEGER, "nco:representative:graph" INTEGER,
          702  +"nco:photo" INTEGER, "nco:photo:graph" INTEGER, "nco:birthDate"
          703  +INTEGER, "nco:birthDate:graph" INTEGER, "nco:birthDate:localDate"
          704  +INTEGER, "nco:birthDate:localTime" INTEGER, "nco:sound" INTEGER,
          705  +"nco:sound:graph" INTEGER);
          706  +CREATE TABLE "nco:ContactGroup" (ID INTEGER NOT NULL PRIMARY KEY,
          707  +"nco:contactGroupName" TEXT COLLATE NOCASE,
          708  +"nco:contactGroupName:graph" INTEGER);
          709  +CREATE TABLE "nco:ContactList" (ID INTEGER NOT NULL PRIMARY KEY);
          710  +CREATE TABLE "nco:ContactListDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          711  +CREATE TABLE "nco:ContactList_nco:containsContact" (ID INTEGER NOT
          712  +NULL, "nco:containsContact" INTEGER NOT NULL,
          713  +"nco:containsContact:graph" INTEGER);
          714  +CREATE TABLE "nco:ContactMedium" (ID INTEGER NOT NULL PRIMARY KEY,
          715  +"nco:contactMediumComment" TEXT COLLATE NOCASE,
          716  +"nco:contactMediumComment:graph" INTEGER);
          717  +CREATE TABLE "nco:Contact_ncal:anniversary" (ID INTEGER NOT NULL,
          718  +"ncal:anniversary" INTEGER NOT NULL, "ncal:anniversary:graph"
          719  +INTEGER);
          720  +CREATE TABLE "nco:Contact_ncal:birthday" (ID INTEGER NOT NULL,
          721  +"ncal:birthday" INTEGER NOT NULL, "ncal:birthday:graph" INTEGER);
          722  +CREATE TABLE "nco:Contact_nco:belongsToGroup" (ID INTEGER NOT NULL,
          723  +"nco:belongsToGroup" INTEGER NOT NULL, "nco:belongsToGroup:graph"
          724  +INTEGER);
          725  +CREATE TABLE "nco:Contact_nco:note" (ID INTEGER NOT NULL, "nco:note"
          726  +TEXT NOT NULL, "nco:note:graph" INTEGER);
          727  +CREATE TABLE "nco:Contact_scal:anniversary" (ID INTEGER NOT NULL,
          728  +"scal:anniversary" INTEGER NOT NULL, "scal:anniversary:graph"
          729  +INTEGER);
          730  +CREATE TABLE "nco:Contact_scal:birthday" (ID INTEGER NOT NULL,
          731  +"scal:birthday" INTEGER NOT NULL, "scal:birthday:graph" INTEGER);
          732  +CREATE TABLE "nco:DomesticDeliveryAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          733  +CREATE TABLE "nco:EmailAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          734  +"nco:emailAddress" TEXT COLLATE NOCASE UNIQUE,
          735  +"nco:emailAddress:graph" INTEGER);
          736  +CREATE TABLE "nco:FaxNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          737  +CREATE TABLE "nco:Gender" (ID INTEGER NOT NULL PRIMARY KEY);
          738  +CREATE TABLE "nco:IMAccount" (ID INTEGER NOT NULL PRIMARY KEY,
          739  +"nco:imAccountAddress" INTEGER UNIQUE, "nco:imAccountAddress:graph"
          740  +INTEGER, "nco:imAccountType" TEXT COLLATE NOCASE,
          741  +"nco:imAccountType:graph" INTEGER, "nco:imDisplayName" TEXT COLLATE
          742  +NOCASE, "nco:imDisplayName:graph" INTEGER, "nco:imEnabled" INTEGER,
          743  +"nco:imEnabled:graph" INTEGER);
          744  +CREATE TABLE "nco:IMAccount_nco:hasIMContact" (ID INTEGER NOT NULL,
          745  +"nco:hasIMContact" INTEGER NOT NULL, "nco:hasIMContact:graph"
          746  +INTEGER);
          747  +CREATE TABLE "nco:IMAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          748  +"nco:imID" TEXT COLLATE NOCASE, "nco:imID:graph" INTEGER,
          749  +"nco:imNickname" TEXT COLLATE NOCASE, "nco:imNickname:graph" INTEGER,
          750  +"nco:imAvatar" INTEGER, "nco:imAvatar:graph" INTEGER, "nco:imProtocol"
          751  +TEXT COLLATE NOCASE, "nco:imProtocol:graph" INTEGER,
          752  +"nco:imStatusMessage" TEXT COLLATE NOCASE,
          753  +"nco:imStatusMessage:graph" INTEGER, "nco:imPresence" INTEGER,
          754  +"nco:imPresence:graph" INTEGER, "nco:presenceLastModified" INTEGER,
          755  +"nco:presenceLastModified:graph" INTEGER,
          756  +"nco:presenceLastModified:localDate" INTEGER,
          757  +"nco:presenceLastModified:localTime" INTEGER,
          758  +"nco:imAddressAuthStatusFrom" INTEGER,
          759  +"nco:imAddressAuthStatusFrom:graph" INTEGER,
          760  +"nco:imAddressAuthStatusTo" INTEGER, "nco:imAddressAuthStatusTo:graph"
          761  +INTEGER);
          762  +CREATE TABLE "nco:IMAddress_nco:imCapability" (ID INTEGER NOT NULL,
          763  +"nco:imCapability" INTEGER NOT NULL, "nco:imCapability:graph"
          764  +INTEGER);
          765  +CREATE TABLE "nco:IMCapability" (ID INTEGER NOT NULL PRIMARY KEY);
          766  +CREATE TABLE "nco:InternationalDeliveryAddress" (ID INTEGER NOT NULL
          767  +PRIMARY KEY);
          768  +CREATE TABLE "nco:IsdnNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          769  +CREATE TABLE "nco:MessagingNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          770  +CREATE TABLE "nco:ModemNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          771  +CREATE TABLE "nco:OrganizationContact" (ID INTEGER NOT NULL PRIMARY
          772  +KEY, "nco:logo" INTEGER, "nco:logo:graph" INTEGER);
          773  +CREATE TABLE "nco:PagerNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          774  +CREATE TABLE "nco:ParcelDeliveryAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          775  +CREATE TABLE "nco:PcsNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          776  +CREATE TABLE "nco:PersonContact" (ID INTEGER NOT NULL PRIMARY KEY,
          777  +"nco:nameFamily" TEXT COLLATE NOCASE, "nco:nameFamily:graph" INTEGER,
          778  +"nco:nameGiven" TEXT COLLATE NOCASE, "nco:nameGiven:graph" INTEGER,
          779  +"nco:nameAdditional" TEXT COLLATE NOCASE, "nco:nameAdditional:graph"
          780  +INTEGER, "nco:nameHonorificSuffix" TEXT COLLATE NOCASE,
          781  +"nco:nameHonorificSuffix:graph" INTEGER, "nco:nameHonorificPrefix"
          782  +TEXT COLLATE NOCASE, "nco:nameHonorificPrefix:graph" INTEGER,
          783  +"nco:hobby" TEXT COLLATE NOCASE, "nco:hobby:graph" INTEGER,
          784  +"nco:gender" INTEGER, "nco:gender:graph" INTEGER);
          785  +CREATE TABLE "nco:PersonContact_nco:hasAffiliation" (ID INTEGER NOT
          786  +NULL, "nco:hasAffiliation" INTEGER NOT NULL,
          787  +"nco:hasAffiliation:graph" INTEGER);
          788  +CREATE TABLE "nco:PhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY,
          789  +"nco:phoneNumber" TEXT COLLATE NOCASE, "nco:phoneNumber:graph"
          790  +INTEGER);
          791  +CREATE TABLE "nco:PostalAddress" (ID INTEGER NOT NULL PRIMARY KEY,
          792  +"nco:region" TEXT COLLATE NOCASE, "nco:region:graph" INTEGER,
          793  +"nco:country" TEXT COLLATE NOCASE, "nco:country:graph" INTEGER,
          794  +"nco:extendedAddress" TEXT COLLATE NOCASE,
          795  +"nco:extendedAddress:graph" INTEGER, "nco:addressLocation" INTEGER,
          796  +"nco:addressLocation:graph" INTEGER, "nco:streetAddress" TEXT COLLATE
          797  +NOCASE, "nco:streetAddress:graph" INTEGER, "nco:postalcode" TEXT
          798  +COLLATE NOCASE, "nco:postalcode:graph" INTEGER, "nco:locality" TEXT
          799  +COLLATE NOCASE, "nco:locality:graph" INTEGER, "nco:county" TEXT
          800  +COLLATE NOCASE, "nco:county:graph" INTEGER, "nco:district" TEXT
          801  +COLLATE NOCASE, "nco:district:graph" INTEGER, "nco:pobox" TEXT
          802  +COLLATE NOCASE, "nco:pobox:graph" INTEGER);
          803  +CREATE TABLE "nco:PresenceStatus" (ID INTEGER NOT NULL PRIMARY KEY);
          804  +CREATE TABLE "nco:Role" (ID INTEGER NOT NULL PRIMARY KEY, "nco:video"
          805  +INTEGER, "nco:video:graph" INTEGER);
          806  +CREATE TABLE "nco:Role_nco:blogUrl" (ID INTEGER NOT NULL,
          807  +"nco:blogUrl" INTEGER NOT NULL, "nco:blogUrl:graph" INTEGER);
          808  +CREATE TABLE "nco:Role_nco:foafUrl" (ID INTEGER NOT NULL,
          809  +"nco:foafUrl" INTEGER NOT NULL, "nco:foafUrl:graph" INTEGER);
          810  +CREATE TABLE "nco:Role_nco:hasContactMedium" (ID INTEGER NOT NULL,
          811  +"nco:hasContactMedium" INTEGER NOT NULL, "nco:hasContactMedium:graph"
          812  +INTEGER);
          813  +CREATE TABLE "nco:Role_nco:hasEmailAddress" (ID INTEGER NOT NULL,
          814  +"nco:hasEmailAddress" INTEGER NOT NULL, "nco:hasEmailAddress:graph"
          815  +INTEGER);
          816  +CREATE TABLE "nco:Role_nco:hasIMAddress" (ID INTEGER NOT NULL,
          817  +"nco:hasIMAddress" INTEGER NOT NULL, "nco:hasIMAddress:graph"
          818  +INTEGER);
          819  +CREATE TABLE "nco:Role_nco:hasPhoneNumber" (ID INTEGER NOT NULL,
          820  +"nco:hasPhoneNumber" INTEGER NOT NULL, "nco:hasPhoneNumber:graph"
          821  +INTEGER);
          822  +CREATE TABLE "nco:Role_nco:hasPostalAddress" (ID INTEGER NOT NULL,
          823  +"nco:hasPostalAddress" INTEGER NOT NULL, "nco:hasPostalAddress:graph"
          824  +INTEGER);
          825  +CREATE TABLE "nco:Role_nco:url" (ID INTEGER NOT NULL, "nco:url"
          826  +INTEGER NOT NULL, "nco:url:graph" INTEGER);
          827  +CREATE TABLE "nco:Role_nco:websiteUrl" (ID INTEGER NOT NULL,
          828  +"nco:websiteUrl" INTEGER NOT NULL, "nco:websiteUrl:graph" INTEGER);
          829  +CREATE TABLE "nco:VideoTelephoneNumber" (ID INTEGER NOT NULL PRIMARY KEY);
          830  +CREATE TABLE "nco:VoicePhoneNumber" (ID INTEGER NOT NULL PRIMARY KEY,
          831  +"nco:voiceMail" INTEGER, "nco:voiceMail:graph" INTEGER);
          832  +CREATE TABLE "nfo:Application" (ID INTEGER NOT NULL PRIMARY KEY);
          833  +CREATE TABLE "nfo:Archive" (ID INTEGER NOT NULL PRIMARY KEY,
          834  +"nfo:uncompressedSize" INTEGER, "nfo:uncompressedSize:graph" INTEGER);
          835  +CREATE TABLE "nfo:ArchiveItem" (ID INTEGER NOT NULL PRIMARY KEY,
          836  +"nfo:isPasswordProtected" INTEGER, "nfo:isPasswordProtected:graph"
          837  +INTEGER);
          838  +CREATE TABLE "nfo:Attachment" (ID INTEGER NOT NULL PRIMARY KEY);
          839  +CREATE TABLE "nfo:Audio" (ID INTEGER NOT NULL PRIMARY KEY,
          840  +"nfo:channels" INTEGER, "nfo:channels:graph" INTEGER,
          841  +"nfo:sideChannels" INTEGER, "nfo:sideChannels:graph" INTEGER,
          842  +"nfo:lfeChannels" INTEGER, "nfo:lfeChannels:graph" INTEGER,
          843  +"nfo:sampleCount" INTEGER, "nfo:sampleCount:graph" INTEGER,
          844  +"nfo:bitsPerSample" INTEGER, "nfo:bitsPerSample:graph" INTEGER,
          845  +"nfo:frontChannels" INTEGER, "nfo:frontChannels:graph" INTEGER,
          846  +"nfo:sampleRate" REAL, "nfo:sampleRate:graph" INTEGER,
          847  +"nfo:averageAudioBitrate" REAL, "nfo:averageAudioBitrate:graph"
          848  +INTEGER, "nfo:rearChannels" INTEGER, "nfo:rearChannels:graph" INTEGER,
          849  +"nfo:gain" INTEGER, "nfo:gain:graph" INTEGER, "nfo:peakGain" INTEGER,
          850  +"nfo:peakGain:graph" INTEGER, "nfo:audioOffset" REAL,
          851  +"nfo:audioOffset:graph" INTEGER);
          852  +CREATE TABLE "nfo:Bookmark" (ID INTEGER NOT NULL PRIMARY KEY,
          853  +"nfo:bookmarks" INTEGER, "nfo:bookmarks:graph" INTEGER,
          854  +"nfo:characterPosition" INTEGER, "nfo:characterPosition:graph"
          855  +INTEGER, "nfo:pageNumber" INTEGER, "nfo:pageNumber:graph" INTEGER,
          856  +"nfo:streamPosition" INTEGER, "nfo:streamPosition:graph" INTEGER,
          857  +"nfo:streamDuration" INTEGER, "nfo:streamDuration:graph" INTEGER);
          858  +CREATE TABLE "nfo:BookmarkFolder" (ID INTEGER NOT NULL PRIMARY KEY);
          859  +CREATE TABLE "nfo:BookmarkFolder_nfo:containsBookmark" (ID INTEGER NOT
          860  +NULL, "nfo:containsBookmark" INTEGER NOT NULL,
          861  +"nfo:containsBookmark:graph" INTEGER);
          862  +CREATE TABLE "nfo:BookmarkFolder_nfo:containsBookmarkFolder" (ID
          863  +INTEGER NOT NULL, "nfo:containsBookmarkFolder" INTEGER NOT NULL,
          864  +"nfo:containsBookmarkFolder:graph" INTEGER);
          865  +CREATE TABLE "nfo:CompressionType" (ID INTEGER NOT NULL PRIMARY KEY);
          866  +CREATE TABLE "nfo:Cursor" (ID INTEGER NOT NULL PRIMARY KEY);
          867  +CREATE TABLE "nfo:DataContainer" (ID INTEGER NOT NULL PRIMARY KEY);
          868  +CREATE TABLE "nfo:DeletedResource" (ID INTEGER NOT NULL PRIMARY KEY,
          869  +"nfo:originalLocation" TEXT COLLATE NOCASE,
          870  +"nfo:originalLocation:graph" INTEGER, "nfo:deletionDate" INTEGER,
          871  +"nfo:deletionDate:graph" INTEGER, "nfo:deletionDate:localDate"
          872  +INTEGER, "nfo:deletionDate:localTime" INTEGER);
          873  +CREATE TABLE "nfo:Document" (ID INTEGER NOT NULL PRIMARY KEY,
          874  +"nfo:tableOfContents" TEXT COLLATE NOCASE,
          875  +"nfo:tableOfContents:graph" INTEGER);
          876  +CREATE TABLE "nfo:EmbeddedFileDataObject" (ID INTEGER NOT NULL PRIMARY
          877  +KEY, "nfo:encoding" TEXT COLLATE NOCASE, "nfo:encoding:graph"
          878  +INTEGER);
          879  +CREATE TABLE "nfo:Equipment" (ID INTEGER NOT NULL PRIMARY KEY,
          880  +"nfo:manufacturer" TEXT COLLATE NOCASE, "nfo:manufacturer:graph"
          881  +INTEGER, "nfo:model" TEXT COLLATE NOCASE, "nfo:model:graph" INTEGER,
          882  +"nfo:equipmentSoftware" TEXT COLLATE NOCASE,
          883  +"nfo:equipmentSoftware:graph" INTEGER);
          884  +CREATE TABLE "nfo:Executable" (ID INTEGER NOT NULL PRIMARY KEY);
          885  +CREATE TABLE "nfo:FileDataObject" (ID INTEGER NOT NULL PRIMARY KEY,
          886  +"nfo:fileLastAccessed" INTEGER, "nfo:fileLastAccessed:graph" INTEGER,
          887  +"nfo:fileLastAccessed:localDate" INTEGER,
          888  +"nfo:fileLastAccessed:localTime" INTEGER, "nfo:fileCreated" INTEGER,
          889  +"nfo:fileCreated:graph" INTEGER, "nfo:fileCreated:localDate" INTEGER,
          890  +"nfo:fileCreated:localTime" INTEGER, "nfo:fileSize" INTEGER,
          891  +"nfo:fileSize:graph" INTEGER, "nfo:permissions" TEXT COLLATE NOCASE,
          892  +"nfo:permissions:graph" INTEGER, "nfo:fileName" TEXT COLLATE NOCASE,
          893  +"nfo:fileName:graph" INTEGER, "nfo:hasHash" INTEGER,
          894  +"nfo:hasHash:graph" INTEGER, "nfo:fileOwner" INTEGER,
          895  +"nfo:fileOwner:graph" INTEGER, "nfo:fileLastModified" INTEGER,
          896  +"nfo:fileLastModified:graph" INTEGER, "nfo:fileLastModified:localDate"
          897  +INTEGER, "nfo:fileLastModified:localTime" INTEGER);
          898  +CREATE TABLE "nfo:FileHash" (ID INTEGER NOT NULL PRIMARY KEY,
          899  +"nfo:hashValue" TEXT COLLATE NOCASE, "nfo:hashValue:graph" INTEGER,
          900  +"nfo:hashAlgorithm" TEXT COLLATE NOCASE, "nfo:hashAlgorithm:graph"
          901  +INTEGER);
          902  +CREATE TABLE "nfo:Filesystem" (ID INTEGER NOT NULL PRIMARY KEY);
          903  +CREATE TABLE "nfo:FilesystemImage" (ID INTEGER NOT NULL PRIMARY KEY);
          904  +CREATE TABLE "nfo:Folder" (ID INTEGER NOT NULL PRIMARY KEY);
          905  +CREATE TABLE "nfo:Font" (ID INTEGER NOT NULL PRIMARY KEY,
          906  +"nfo:fontFamily" TEXT COLLATE NOCASE, "nfo:fontFamily:graph" INTEGER,
          907  +"nfo:foundry" INTEGER, "nfo:foundry:graph" INTEGER);
          908  +CREATE TABLE "nfo:HardDiskPartition" (ID INTEGER NOT NULL PRIMARY KEY);
          909  +CREATE TABLE "nfo:HelpDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          910  +CREATE TABLE "nfo:HtmlDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          911  +CREATE TABLE "nfo:Icon" (ID INTEGER NOT NULL PRIMARY KEY);
          912  +CREATE TABLE "nfo:Image" (ID INTEGER NOT NULL PRIMARY KEY,
          913  +"nfo:verticalResolution" INTEGER, "nfo:verticalResolution:graph"
          914  +INTEGER, "nfo:horizontalResolution" INTEGER,
          915  +"nfo:horizontalResolution:graph" INTEGER, "nfo:orientation" INTEGER,
          916  +"nfo:orientation:graph" INTEGER);
          917  +CREATE TABLE "nfo:Image_nfo:depicts" (ID INTEGER NOT NULL,
          918  +"nfo:depicts" INTEGER NOT NULL, "nfo:depicts:graph" INTEGER);
          919  +CREATE TABLE "nfo:Image_nfo:hasRegionOfInterest" (ID INTEGER NOT NULL,
          920  +"nfo:hasRegionOfInterest" INTEGER NOT NULL,
          921  +"nfo:hasRegionOfInterest:graph" INTEGER);
          922  +CREATE TABLE "nfo:Media" (ID INTEGER NOT NULL PRIMARY KEY, "nfo:count"
          923  +INTEGER, "nfo:count:graph" INTEGER, "nfo:duration" INTEGER,
          924  +"nfo:duration:graph" INTEGER, "nfo:compressionType" INTEGER,
          925  +"nfo:compressionType:graph" INTEGER, "nfo:hasMediaStream" INTEGER,
          926  +"nfo:hasMediaStream:graph" INTEGER, "nfo:bitDepth" INTEGER,
          927  +"nfo:bitDepth:graph" INTEGER, "nfo:codec" TEXT COLLATE NOCASE,
          928  +"nfo:codec:graph" INTEGER, "nfo:encodedBy" TEXT COLLATE NOCASE,
          929  +"nfo:encodedBy:graph" INTEGER, "nfo:bitrateType" TEXT COLLATE NOCASE,
          930  +"nfo:bitrateType:graph" INTEGER, "nfo:averageBitrate" REAL,
          931  +"nfo:averageBitrate:graph" INTEGER, "nfo:genre" TEXT COLLATE NOCASE,
          932  +"nfo:genre:graph" INTEGER, "nfo:equipment" INTEGER,
          933  +"nfo:equipment:graph" INTEGER, "nfo:lastPlayedPosition" INTEGER,
          934  +"nfo:lastPlayedPosition:graph" INTEGER, "nmm:genre" TEXT COLLATE
          935  +NOCASE, "nmm:genre:graph" INTEGER, "nmm:skipCounter" INTEGER,
          936  +"nmm:skipCounter:graph" INTEGER, "nmm:dlnaProfile" TEXT COLLATE
          937  +NOCASE, "nmm:dlnaProfile:graph" INTEGER, "nmm:dlnaMime" TEXT COLLATE
          938  +NOCASE, "nmm:dlnaMime:graph" INTEGER, "nmm:uPnPShared" INTEGER,
          939  +"nmm:uPnPShared:graph" INTEGER, "mtp:credits" TEXT COLLATE NOCASE,
          940  +"mtp:credits:graph" INTEGER, "mtp:creator" TEXT COLLATE NOCASE,
          941  +"mtp:creator:graph" INTEGER);
          942  +CREATE TABLE "nfo:MediaFileListEntry" (ID INTEGER NOT NULL PRIMARY
          943  +KEY, "nfo:listPosition" REAL, "nfo:listPosition:graph" INTEGER,
          944  +"nfo:entryUrl" TEXT COLLATE NOCASE, "nfo:entryUrl:graph" INTEGER);
          945  +CREATE TABLE "nfo:MediaList" (ID INTEGER NOT NULL PRIMARY KEY,
          946  +"nfo:entryCounter" INTEGER, "nfo:entryCounter:graph" INTEGER,
          947  +"nfo:listDuration" INTEGER, "nfo:listDuration:graph" INTEGER);
          948  +CREATE TABLE "nfo:MediaList_nfo:hasMediaFileListEntry" (ID INTEGER NOT
          949  +NULL, "nfo:hasMediaFileListEntry" INTEGER NOT NULL,
          950  +"nfo:hasMediaFileListEntry:graph" INTEGER);
          951  +CREATE TABLE "nfo:MediaList_nfo:mediaListEntry" (ID INTEGER NOT NULL,
          952  +"nfo:mediaListEntry" INTEGER NOT NULL, "nfo:mediaListEntry:graph"
          953  +INTEGER);
          954  +CREATE TABLE "nfo:MediaStream" (ID INTEGER NOT NULL PRIMARY KEY);
          955  +CREATE TABLE "nfo:Media_mtp:hidden" (ID INTEGER NOT NULL, "mtp:hidden"
          956  +INTEGER NOT NULL, "mtp:hidden:graph" INTEGER);
          957  +CREATE TABLE "nfo:Media_nmm:alternativeMedia" (ID INTEGER NOT NULL,
          958  +"nmm:alternativeMedia" INTEGER NOT NULL, "nmm:alternativeMedia:graph"
          959  +INTEGER);
          960  +CREATE TABLE "nfo:MindMap" (ID INTEGER NOT NULL PRIMARY KEY);
          961  +CREATE TABLE "nfo:Note" (ID INTEGER NOT NULL PRIMARY KEY);
          962  +CREATE TABLE "nfo:OperatingSystem" (ID INTEGER NOT NULL PRIMARY KEY);
          963  +CREATE TABLE "nfo:Orientation" (ID INTEGER NOT NULL PRIMARY KEY);
          964  +CREATE TABLE "nfo:PaginatedTextDocument" (ID INTEGER NOT NULL PRIMARY
          965  +KEY, "nfo:pageCount" INTEGER, "nfo:pageCount:graph" INTEGER);
          966  +CREATE TABLE "nfo:PlainTextDocument" (ID INTEGER NOT NULL PRIMARY KEY);
          967  +CREATE TABLE "nfo:Presentation" (ID INTEGER NOT NULL PRIMARY KEY);
          968  +CREATE TABLE "nfo:RasterImage" (ID INTEGER NOT NULL PRIMARY KEY);
          969  +CREATE TABLE "nfo:RegionOfInterest" (ID INTEGER NOT NULL PRIMARY KEY,
          970  +"nfo:regionOfInterestX" REAL, "nfo:regionOfInterestX:graph" INTEGER,
          971  +"nfo:regionOfInterestY" REAL, "nfo:regionOfInterestY:graph" INTEGER,
          972  +"nfo:regionOfInterestWidth" REAL, "nfo:regionOfInterestWidth:graph"
          973  +INTEGER, "nfo:regionOfInterestHeight" REAL,
          974  +"nfo:regionOfInterestHeight:graph" INTEGER, "nfo:regionOfInterestType"
          975  +INTEGER, "nfo:regionOfInterestType:graph" INTEGER, "nfo:roiRefersTo"
          976  +INTEGER, "nfo:roiRefersTo:graph" INTEGER);
          977  +CREATE TABLE "nfo:RegionOfInterestContent" (ID INTEGER NOT NULL PRIMARY KEY);
          978  +CREATE TABLE "nfo:RemoteDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
          979  +CREATE TABLE "nfo:RemotePortAddress" (ID INTEGER NOT NULL PRIMARY KEY);
          980  +CREATE TABLE "nfo:Software" (ID INTEGER NOT NULL PRIMARY KEY,
          981  +"nfo:conflicts" INTEGER, "nfo:conflicts:graph" INTEGER,
          982  +"nfo:supercedes" INTEGER, "nfo:supercedes:graph" INTEGER,
          983  +"nfo:softwareIcon" INTEGER, "nfo:softwareIcon:graph" INTEGER,
          984  +"nfo:softwareCmdLine" TEXT COLLATE NOCASE,
          985  +"nfo:softwareCmdLine:graph" INTEGER);
          986  +CREATE TABLE "nfo:SoftwareApplication" (ID INTEGER NOT NULL PRIMARY KEY);
          987  +CREATE TABLE "nfo:SoftwareCategory" (ID INTEGER NOT NULL PRIMARY KEY,
          988  +"nfo:softwareCategoryIcon" INTEGER, "nfo:softwareCategoryIcon:graph"
          989  +INTEGER);
          990  +CREATE TABLE "nfo:SoftwareItem" (ID INTEGER NOT NULL PRIMARY KEY);
          991  +CREATE TABLE "nfo:SoftwareService" (ID INTEGER NOT NULL PRIMARY KEY);
          992  +CREATE TABLE "nfo:SourceCode" (ID INTEGER NOT NULL PRIMARY KEY,
          993  +"nfo:commentCharacterCount" INTEGER, "nfo:commentCharacterCount:graph"
          994  +INTEGER, "nfo:programmingLanguage" TEXT COLLATE NOCASE,
          995  +"nfo:programmingLanguage:graph" INTEGER, "nfo:definesClass" TEXT
          996  +COLLATE NOCASE, "nfo:definesClass:graph" INTEGER,
          997  +"nfo:definesFunction" TEXT COLLATE NOCASE,
          998  +"nfo:definesFunction:graph" INTEGER, "nfo:definesGlobalVariable" TEXT
          999  +COLLATE NOCASE, "nfo:definesGlobalVariable:graph" INTEGER);
         1000  +CREATE TABLE "nfo:Spreadsheet" (ID INTEGER NOT NULL PRIMARY KEY);
         1001  +CREATE TABLE "nfo:TextDocument" (ID INTEGER NOT NULL PRIMARY KEY,
         1002  +"nfo:wordCount" INTEGER, "nfo:wordCount:graph" INTEGER,
         1003  +"nfo:lineCount" INTEGER, "nfo:lineCount:graph" INTEGER,
         1004  +"nfo:characterCount" INTEGER, "nfo:characterCount:graph" INTEGER);
         1005  +CREATE TABLE "nfo:Trash" (ID INTEGER NOT NULL PRIMARY KEY);
         1006  +CREATE TABLE "nfo:VectorImage" (ID INTEGER NOT NULL PRIMARY KEY);
         1007  +CREATE TABLE "nfo:Video" (ID INTEGER NOT NULL PRIMARY KEY,
         1008  +"nfo:frameRate" REAL, "nfo:frameRate:graph" INTEGER, "nfo:frameCount"
         1009  +INTEGER, "nfo:frameCount:graph" INTEGER, "nfo:averageVideoBitrate"
         1010  +REAL, "nfo:averageVideoBitrate:graph" INTEGER);
         1011  +CREATE TABLE "nfo:Visual" (ID INTEGER NOT NULL PRIMARY KEY,
         1012  +"nie:contentCreated" INTEGER, "nie:contentCreated:graph" INTEGER,
         1013  +"nie:contentCreated:localDate" INTEGER, "nie:contentCreated:localTime"
         1014  +INTEGER, "nfo:aspectRatio" REAL, "nfo:aspectRatio:graph" INTEGER,
         1015  +"nfo:heading" REAL, "nfo:heading:graph" INTEGER, "nfo:tilt" REAL,
         1016  +"nfo:tilt:graph" INTEGER, "nfo:interlaceMode" INTEGER,
         1017  +"nfo:interlaceMode:graph" INTEGER, "nfo:height" INTEGER,
         1018  +"nfo:height:graph" INTEGER, "nfo:width" INTEGER, "nfo:width:graph"
         1019  +INTEGER, "nfo:colorDepth" INTEGER, "nfo:colorDepth:graph" INTEGER);
         1020  +CREATE TABLE "nfo:WebHistory" (ID INTEGER NOT NULL PRIMARY KEY,
         1021  +"nfo:domain" TEXT COLLATE NOCASE, "nfo:domain:graph" INTEGER,
         1022  +"nfo:uri" TEXT COLLATE NOCASE, "nfo:uri:graph" INTEGER);
         1023  +CREATE TABLE "nfo:Website" (ID INTEGER NOT NULL PRIMARY KEY);
         1024  +CREATE TABLE "nid3:ID3Audio" (ID INTEGER NOT NULL PRIMARY KEY,
         1025  +"nid3:title" TEXT COLLATE NOCASE, "nid3:title:graph" INTEGER,
         1026  +"nid3:albumTitle" TEXT COLLATE NOCASE, "nid3:albumTitle:graph"
         1027  +INTEGER, "nid3:contentType" TEXT COLLATE NOCASE,
         1028  +"nid3:contentType:graph" INTEGER, "nid3:length" INTEGER,
         1029  +"nid3:length:graph" INTEGER, "nid3:recordingYear" INTEGER,
         1030  +"nid3:recordingYear:graph" INTEGER, "nid3:trackNumber" TEXT COLLATE
         1031  +NOCASE, "nid3:trackNumber:graph" INTEGER, "nid3:partOfSet" TEXT
         1032  +COLLATE NOCASE, "nid3:partOfSet:graph" INTEGER, "nid3:comments" TEXT
         1033  +COLLATE NOCASE, "nid3:comments:graph" INTEGER);
         1034  +CREATE TABLE "nid3:ID3Audio_nid3:leadArtist" (ID INTEGER NOT NULL,
         1035  +"nid3:leadArtist" INTEGER NOT NULL, "nid3:leadArtist:graph" INTEGER);
         1036  +CREATE TABLE "nie:DataObject" (ID INTEGER NOT NULL PRIMARY KEY,
         1037  +"nie:url" TEXT COLLATE NOCASE UNIQUE, "nie:url:graph" INTEGER,
         1038  +"nie:byteSize" INTEGER, "nie:byteSize:graph" INTEGER,
         1039  +"nie:interpretedAs" INTEGER, "nie:interpretedAs:graph" INTEGER,
         1040  +"nie:lastRefreshed" INTEGER, "nie:lastRefreshed:graph" INTEGER,
         1041  +"nie:lastRefreshed:localDate" INTEGER, "nie:lastRefreshed:localTime"
         1042  +INTEGER, "nie:created" INTEGER, "nie:created:graph" INTEGER,
         1043  +"nie:created:localDate" INTEGER, "nie:created:localTime" INTEGER,
         1044  +"nfo:belongsToContainer" INTEGER, "nfo:belongsToContainer:graph"
         1045  +INTEGER, "tracker:available" INTEGER, "tracker:available:graph"
         1046  +INTEGER);
         1047  +CREATE TABLE "nie:DataObject_nie:dataSource" (ID INTEGER NOT NULL,
         1048  +"nie:dataSource" INTEGER NOT NULL, "nie:dataSource:graph" INTEGER);
         1049  +CREATE TABLE "nie:DataObject_nie:isPartOf" (ID INTEGER NOT NULL,
         1050  +"nie:isPartOf" INTEGER NOT NULL, "nie:isPartOf:graph" INTEGER);
         1051  +CREATE TABLE "nie:DataSource" (ID INTEGER NOT NULL PRIMARY KEY);
         1052  +CREATE TABLE "nie:InformationElement" (ID INTEGER NOT NULL PRIMARY
         1053  +KEY, "nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1054  +"nie:contentLastModified" INTEGER, "nie:contentLastModified:graph"
         1055  +INTEGER, "nie:contentLastModified:localDate" INTEGER,
         1056  +"nie:contentLastModified:localTime" INTEGER, "nie:subject" TEXT
         1057  +COLLATE NOCASE, "nie:subject:graph" INTEGER, "nie:mimeType" TEXT
         1058  +COLLATE NOCASE, "nie:mimeType:graph" INTEGER, "nie:language" TEXT
         1059  +COLLATE NOCASE, "nie:language:graph" INTEGER, "nie:plainTextContent"
         1060  +TEXT COLLATE NOCASE, "nie:plainTextContent:graph" INTEGER,
         1061  +"nie:legal" TEXT COLLATE NOCASE, "nie:legal:graph" INTEGER,
         1062  +"nie:generator" TEXT COLLATE NOCASE, "nie:generator:graph" INTEGER,
         1063  +"nie:description" TEXT COLLATE NOCASE, "nie:description:graph"
         1064  +INTEGER, "nie:disclaimer" TEXT COLLATE NOCASE, "nie:disclaimer:graph"
         1065  +INTEGER, "nie:depends" INTEGER, "nie:depends:graph" INTEGER,
         1066  +"nie:links" INTEGER, "nie:links:graph" INTEGER, "nie:copyright" TEXT
         1067  +COLLATE NOCASE, "nie:copyright:graph" INTEGER, "nie:comment" TEXT
         1068  +COLLATE NOCASE, "nie:comment:graph" INTEGER, "nie:isStoredAs"
         1069  +INTEGER, "nie:isStoredAs:graph" INTEGER, "nie:version" TEXT COLLATE
         1070  +NOCASE, "nie:version:graph" INTEGER, "nie:contentCreated" INTEGER,
         1071  +"nie:contentCreated:graph" INTEGER, "nie:contentCreated:localDate"
         1072  +INTEGER, "nie:contentCreated:localTime" INTEGER, "nie:contentAccessed"
         1073  +INTEGER, "nie:contentAccessed:graph" INTEGER,
         1074  +"nie:contentAccessed:localDate" INTEGER,
         1075  +"nie:contentAccessed:localTime" INTEGER, "nie:license" TEXT COLLATE
         1076  +NOCASE, "nie:license:graph" INTEGER, "nie:identifier" TEXT COLLATE
         1077  +NOCASE, "nie:identifier:graph" INTEGER, "nie:licenseType" TEXT
         1078  +COLLATE NOCASE, "nie:licenseType:graph" INTEGER, "nie:characterSet"
         1079  +TEXT COLLATE NOCASE, "nie:characterSet:graph" INTEGER,
         1080  +"nie:contentSize" INTEGER, "nie:contentSize:graph" INTEGER,
         1081  +"nie:rootElementOf" INTEGER, "nie:rootElementOf:graph" INTEGER,
         1082  +"nie:usageCounter" INTEGER, "nie:usageCounter:graph" INTEGER,
         1083  +"nco:publisher" INTEGER, "nco:publisher:graph" INTEGER,
         1084  +"nfo:isContentEncrypted" INTEGER, "nfo:isContentEncrypted:graph"
         1085  +INTEGER, "slo:location" INTEGER, "slo:location:graph" INTEGER,
         1086  +"nfo:isBootable" INTEGER, "nfo:isBootable:graph" INTEGER, "osinfo:id"
         1087  +TEXT COLLATE NOCASE, "osinfo:id:graph" INTEGER, "osinfo:mediaId" TEXT
         1088  +COLLATE NOCASE, "osinfo:mediaId:graph" INTEGER);
         1089  +CREATE TABLE "nie:InformationElement_mlo:location" (ID INTEGER NOT
         1090  +NULL, "mlo:location" INTEGER NOT NULL, "mlo:location:graph" INTEGER);
         1091  +CREATE TABLE "nie:InformationElement_nao:hasProperty" (ID INTEGER NOT
         1092  +NULL, "nao:hasProperty" INTEGER NOT NULL, "nao:hasProperty:graph"
         1093  +INTEGER);
         1094  +CREATE TABLE "nie:InformationElement_nco:contributor" (ID INTEGER NOT
         1095  +NULL, "nco:contributor" INTEGER NOT NULL, "nco:contributor:graph"
         1096  +INTEGER);
         1097  +CREATE TABLE "nie:InformationElement_nco:creator" (ID INTEGER NOT
         1098  +NULL, "nco:creator" INTEGER NOT NULL, "nco:creator:graph" INTEGER);
         1099  +CREATE TABLE "nie:InformationElement_nie:hasLogicalPart" (ID INTEGER
         1100  +NOT NULL, "nie:hasLogicalPart" INTEGER NOT NULL,
         1101  +"nie:hasLogicalPart:graph" INTEGER);
         1102  +CREATE TABLE "nie:InformationElement_nie:hasPart" (ID INTEGER NOT
         1103  +NULL, "nie:hasPart" INTEGER NOT NULL, "nie:hasPart:graph" INTEGER);
         1104  +CREATE TABLE "nie:InformationElement_nie:informationElementDate" (ID
         1105  +INTEGER NOT NULL, "nie:informationElementDate" INTEGER NOT NULL,
         1106  +"nie:informationElementDate:graph" INTEGER,
         1107  +"nie:informationElementDate:localDate" INTEGER NOT NULL,
         1108  +"nie:informationElementDate:localTime" INTEGER NOT NULL);
         1109  +CREATE TABLE "nie:InformationElement_nie:isLogicalPartOf" (ID INTEGER
         1110  +NOT NULL, "nie:isLogicalPartOf" INTEGER NOT NULL,
         1111  +"nie:isLogicalPartOf:graph" INTEGER);
         1112  +CREATE TABLE "nie:InformationElement_nie:keyword" (ID INTEGER NOT
         1113  +NULL, "nie:keyword" TEXT NOT NULL, "nie:keyword:graph" INTEGER);
         1114  +CREATE TABLE "nie:InformationElement_nie:relatedTo" (ID INTEGER NOT
         1115  +NULL, "nie:relatedTo" INTEGER NOT NULL, "nie:relatedTo:graph"
         1116  +INTEGER);
         1117  +CREATE TABLE "nmm:AnalogRadio" (ID INTEGER NOT NULL PRIMARY KEY,
         1118  +"nmm:modulation" INTEGER, "nmm:modulation:graph" INTEGER,
         1119  +"nmm:frequency" INTEGER, "nmm:frequency:graph" INTEGER);
         1120  +CREATE TABLE "nmm:Artist" (ID INTEGER NOT NULL PRIMARY KEY,
         1121  +"nmm:artistName" TEXT COLLATE NOCASE, "nmm:artistName:graph"
         1122  +INTEGER);
         1123  +CREATE TABLE "nmm:DigitalRadio" (ID INTEGER NOT NULL PRIMARY KEY,
         1124  +"nmm:streamingBitrate" INTEGER, "nmm:streamingBitrate:graph" INTEGER,
         1125  +"nmm:encoding" TEXT COLLATE NOCASE, "nmm:encoding:graph" INTEGER,
         1126  +"nmm:protocol" TEXT COLLATE NOCASE, "nmm:protocol:graph" INTEGER);
         1127  +CREATE TABLE "nmm:Flash" (ID INTEGER NOT NULL PRIMARY KEY);
         1128  +CREATE TABLE "nmm:ImageList" (ID INTEGER NOT NULL PRIMARY KEY);
         1129  +CREATE TABLE "nmm:MeteringMode" (ID INTEGER NOT NULL PRIMARY KEY);
         1130  +CREATE TABLE "nmm:MusicAlbum" (ID INTEGER NOT NULL PRIMARY KEY,
         1131  +"nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1132  +"nmm:albumTrackCount" INTEGER, "nmm:albumTrackCount:graph" INTEGER,
         1133  +"nmm:albumTitle" TEXT COLLATE NOCASE, "nmm:albumTitle:graph" INTEGER,
         1134  +"nmm:albumDuration" INTEGER, "nmm:albumDuration:graph" INTEGER,
         1135  +"nmm:albumGain" INTEGER, "nmm:albumGain:graph" INTEGER,
         1136  +"nmm:albumPeakGain" INTEGER, "nmm:albumPeakGain:graph" INTEGER);
         1137  +CREATE TABLE "nmm:MusicAlbumDisc" (ID INTEGER NOT NULL PRIMARY KEY,
         1138  +"nmm:albumDiscAlbum" INTEGER, "nmm:albumDiscAlbum:graph" INTEGER,
         1139  +"nmm:musicCDIdentifier" TEXT COLLATE NOCASE,
         1140  +"nmm:musicCDIdentifier:graph" INTEGER, "nmm:setNumber" INTEGER,
         1141  +"nmm:setNumber:graph" INTEGER);
         1142  +CREATE TABLE "nmm:MusicAlbum_nmm:albumArtist" (ID INTEGER NOT NULL,
         1143  +"nmm:albumArtist" INTEGER NOT NULL, "nmm:albumArtist:graph" INTEGER);
         1144  +CREATE TABLE "nmm:MusicPiece" (ID INTEGER NOT NULL PRIMARY KEY,
         1145  +"nie:title" TEXT COLLATE NOCASE, "nie:title:graph" INTEGER,
         1146  +"nmm:musicAlbum" INTEGER, "nmm:musicAlbum:graph" INTEGER,
         1147  +"nmm:musicAlbumDisc" INTEGER, "nmm:musicAlbumDisc:graph" INTEGER,
         1148  +"nmm:beatsPerMinute" INTEGER, "nmm:beatsPerMinute:graph" INTEGER,
         1149  +"nmm:performer" INTEGER, "nmm:performer:graph" INTEGER, "nmm:composer"
         1150  +INTEGER, "nmm:composer:graph" INTEGER, "nmm:lyricist" INTEGER,
         1151  +"nmm:lyricist:graph" INTEGER, "nmm:trackNumber" INTEGER,
         1152  +"nmm:trackNumber:graph" INTEGER,
         1153  +"nmm:internationalStandardRecordingCode" TEXT COLLATE NOCASE,
         1154  +"nmm:internationalStandardRecordingCode:graph" INTEGER);
         1155  +CREATE TABLE "nmm:MusicPiece_nmm:lyrics" (ID INTEGER NOT NULL,
         1156  +"nmm:lyrics" INTEGER NOT NULL, "nmm:lyrics:graph" INTEGER);
         1157  +CREATE TABLE "nmm:Photo" (ID INTEGER NOT NULL PRIMARY KEY,
         1158  +"nmm:exposureTime" REAL, "nmm:exposureTime:graph" INTEGER, "nmm:flash"
         1159  +INTEGER, "nmm:flash:graph" INTEGER, "nmm:fnumber" REAL,
         1160  +"nmm:fnumber:graph" INTEGER, "nmm:focalLength" REAL,
         1161  +"nmm:focalLength:graph" INTEGER, "nmm:isoSpeed" REAL,
         1162  +"nmm:isoSpeed:graph" INTEGER, "nmm:meteringMode" INTEGER,
         1163  +"nmm:meteringMode:graph" INTEGER, "nmm:whiteBalance" INTEGER,
         1164  +"nmm:whiteBalance:graph" INTEGER, "nmm:isCropped" INTEGER,
         1165  +"nmm:isCropped:graph" INTEGER, "nmm:isColorCorrected" INTEGER,
         1166  +"nmm:isColorCorrected:graph" INTEGER);
         1167  +CREATE TABLE "nmm:Playlist" (ID INTEGER NOT NULL PRIMARY KEY);
         1168  +CREATE TABLE "nmm:RadioModulation" (ID INTEGER NOT NULL PRIMARY KEY);
         1169  +CREATE TABLE "nmm:RadioStation" (ID INTEGER NOT NULL PRIMARY KEY,
         1170  +"nmm:radioIcon" INTEGER, "nmm:radioIcon:graph" INTEGER, "nmm:radioPTY"
         1171  +INTEGER, "nmm:radioPTY:graph" INTEGER);
         1172  +CREATE TABLE "nmm:RadioStation_nmm:carrier" (ID INTEGER NOT NULL,
         1173  +"nmm:carrier" INTEGER NOT NULL, "nmm:carrier:graph" INTEGER);
         1174  +CREATE TABLE "nmm:SynchronizedText" (ID INTEGER NOT NULL PRIMARY KEY,
         1175  +"nmm:isForHearingImpaired" INTEGER, "nmm:isForHearingImpaired:graph"
         1176  +INTEGER);
         1177  +CREATE TABLE "nmm:Video" (ID INTEGER NOT NULL PRIMARY KEY,
         1178  +"nmm:videoAlbum" INTEGER, "nmm:videoAlbum:graph" INTEGER,
         1179  +"nmm:isSeries" INTEGER, "nmm:isSeries:graph" INTEGER, "nmm:season"
         1180  +INTEGER, "nmm:season:graph" INTEGER, "nmm:episodeNumber" INTEGER,
         1181  +"nmm:episodeNumber:graph" INTEGER, "nmm:runTime" INTEGER,
         1182  +"nmm:runTime:graph" INTEGER, "nmm:synopsis" TEXT COLLATE NOCASE,
         1183  +"nmm:synopsis:graph" INTEGER, "nmm:MPAARating" TEXT COLLATE NOCASE,
         1184  +"nmm:MPAARating:graph" INTEGER, "nmm:category" TEXT COLLATE NOCASE,
         1185  +"nmm:category:graph" INTEGER, "nmm:producedBy" INTEGER,
         1186  +"nmm:producedBy:graph" INTEGER, "nmm:hasSubtitle" INTEGER,
         1187  +"nmm:hasSubtitle:graph" INTEGER, "nmm:isContentEncrypted" INTEGER,
         1188  +"nmm:isContentEncrypted:graph" INTEGER, "mtp:fourCC" TEXT COLLATE
         1189  +NOCASE, "mtp:fourCC:graph" INTEGER, "mtp:waveformat" TEXT COLLATE
         1190  +NOCASE, "mtp:waveformat:graph" INTEGER);
         1191  +CREATE TABLE "nmm:Video_mtp:scantype" (ID INTEGER NOT NULL,
         1192  +"mtp:scantype" INTEGER NOT NULL, "mtp:scantype:graph" INTEGER);
         1193  +CREATE TABLE "nmm:Video_nmm:director" (ID INTEGER NOT NULL,
         1194  +"nmm:director" INTEGER NOT NULL, "nmm:director:graph" INTEGER);
         1195  +CREATE TABLE "nmm:Video_nmm:leadActor" (ID INTEGER NOT NULL,
         1196  +"nmm:leadActor" INTEGER NOT NULL, "nmm:leadActor:graph" INTEGER);
         1197  +CREATE TABLE "nmm:Video_nmm:subtitle" (ID INTEGER NOT NULL,
         1198  +"nmm:subtitle" INTEGER NOT NULL, "nmm:subtitle:graph" INTEGER);
         1199  +CREATE TABLE "nmm:WhiteBalance" (ID INTEGER NOT NULL PRIMARY KEY);
         1200  +CREATE TABLE "nmo:Attachment" (ID INTEGER NOT NULL PRIMARY KEY);
         1201  +CREATE TABLE "nmo:Call" (ID INTEGER NOT NULL PRIMARY KEY,
         1202  +"nmo:sentDate" INTEGER, "nmo:sentDate:graph" INTEGER,
         1203  +"nmo:sentDate:localDate" INTEGER, "nmo:sentDate:localTime" INTEGER,
         1204  +"nmo:duration" INTEGER, "nmo:duration:graph" INTEGER);
         1205  +CREATE TABLE "nmo:CommunicationChannel" (ID INTEGER NOT NULL PRIMARY
         1206  +KEY, "nmo:lastMessageDate" INTEGER, "nmo:lastMessageDate:graph"
         1207  +INTEGER, "nmo:lastMessageDate:localDate" INTEGER,
         1208  +"nmo:lastMessageDate:localTime" INTEGER,
         1209  +"nmo:lastSuccessfulMessageDate" INTEGER,
         1210  +"nmo:lastSuccessfulMessageDate:graph" INTEGER,
         1211  +"nmo:lastSuccessfulMessageDate:localDate" INTEGER,
         1212  +"nmo:lastSuccessfulMessageDate:localTime" INTEGER);
         1213  +CREATE TABLE "nmo:CommunicationChannel_nmo:hasParticipant" (ID INTEGER
         1214  +NOT NULL, "nmo:hasParticipant" INTEGER NOT NULL,
         1215  +"nmo:hasParticipant:graph" INTEGER);
         1216  +CREATE TABLE "nmo:Conversation" (ID INTEGER NOT NULL PRIMARY KEY);
         1217  +CREATE TABLE "nmo:DeliveryStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1218  +CREATE TABLE "nmo:Email" (ID INTEGER NOT NULL PRIMARY KEY,
         1219  +"nmo:hasContent" INTEGER, "nmo:hasContent:graph" INTEGER,
         1220  +"nmo:isFlagged" INTEGER, "nmo:isFlagged:graph" INTEGER, "nmo:isRecent"
         1221  +INTEGER, "nmo:isRecent:graph" INTEGER, "nmo:status" TEXT COLLATE
         1222  +NOCASE, "nmo:status:graph" INTEGER, "nmo:responseType" TEXT COLLATE
         1223  +NOCASE, "nmo:responseType:graph" INTEGER);
         1224  +CREATE TABLE "nmo:Email_nmo:contentMimeType" (ID INTEGER NOT NULL,
         1225  +"nmo:contentMimeType" TEXT NOT NULL, "nmo:contentMimeType:graph"
         1226  +INTEGER);
         1227  +CREATE TABLE "nmo:IMMessage" (ID INTEGER NOT NULL PRIMARY KEY);
         1228  +CREATE TABLE "nmo:MMSMessage" (ID INTEGER NOT NULL PRIMARY KEY,
         1229  +"nmo:mmsHasContent" INTEGER, "nmo:mmsHasContent:graph" INTEGER);
         1230  +CREATE TABLE "nmo:MailAccount" (ID INTEGER NOT NULL PRIMARY KEY,
         1231  +"nmo:accountName" TEXT COLLATE NOCASE, "nmo:accountName:graph"
         1232  +INTEGER, "nmo:accountDisplayName" TEXT COLLATE NOCASE,
         1233  +"nmo:accountDisplayName:graph" INTEGER, "nmo:fromAddress" INTEGER,
         1234  +"nmo:fromAddress:graph" INTEGER, "nmo:signature" TEXT COLLATE NOCASE,
         1235  +"nmo:signature:graph" INTEGER);
         1236  +CREATE TABLE "nmo:MailFolder" (ID INTEGER NOT NULL PRIMARY KEY,
         1237  +"nmo:folderName" TEXT COLLATE NOCASE, "nmo:folderName:graph" INTEGER,
         1238  +"nmo:serverCount" INTEGER, "nmo:serverCount:graph" INTEGER,
         1239  +"nmo:serverUnreadCount" INTEGER, "nmo:serverUnreadCount:graph"
         1240  +INTEGER);
         1241  +CREATE TABLE "nmo:MailboxDataObject" (ID INTEGER NOT NULL PRIMARY KEY);
         1242  +CREATE TABLE "nmo:Message" (ID INTEGER NOT NULL PRIMARY KEY,
         1243  +"nmo:sentDate" INTEGER, "nmo:sentDate:graph" INTEGER,
         1244  +"nmo:sentDate:localDate" INTEGER, "nmo:sentDate:localTime" INTEGER,
         1245  +"nmo:from" INTEGER, "nmo:from:graph" INTEGER, "nmo:isAnswered"
         1246  +INTEGER, "nmo:isAnswered:graph" INTEGER, "nmo:isDeleted" INTEGER,
         1247  +"nmo:isDeleted:graph" INTEGER, "nmo:isDraft" INTEGER,
         1248  +"nmo:isDraft:graph" INTEGER, "nmo:isRead" INTEGER, "nmo:isRead:graph"
         1249  +INTEGER, "nmo:isSent" INTEGER, "nmo:isSent:graph" INTEGER,
         1250  +"nmo:isEmergency" INTEGER, "nmo:isEmergency:graph" INTEGER,
         1251  +"nmo:htmlMessageContent" TEXT COLLATE NOCASE,
         1252  +"nmo:htmlMessageContent:graph" INTEGER, "nmo:messageId" TEXT COLLATE
         1253  +NOCASE, "nmo:messageId:graph" INTEGER, "nmo:messageSubject" TEXT
         1254  +COLLATE NOCASE, "nmo:messageSubject:graph" INTEGER,
         1255  +"nmo:receivedDate" INTEGER, "nmo:receivedDate:graph" INTEGER,
         1256  +"nmo:receivedDate:localDate" INTEGER, "nmo:receivedDate:localTime"
         1257  +INTEGER, "nmo:replyTo" INTEGER, "nmo:replyTo:graph" INTEGER,
         1258  +"nmo:sender" INTEGER, "nmo:sender:graph" INTEGER, "nmo:conversation"
         1259  +INTEGER, "nmo:conversation:graph" INTEGER, "nmo:communicationChannel"
         1260  +INTEGER, "nmo:communicationChannel:graph" INTEGER,
         1261  +"nmo:deliveryStatus" INTEGER, "nmo:deliveryStatus:graph" INTEGER,
         1262  +"nmo:reportDelivery" INTEGER, "nmo:reportDelivery:graph" INTEGER,
         1263  +"nmo:sentWithReportRead" INTEGER, "nmo:sentWithReportRead:graph"
         1264  +INTEGER, "nmo:reportReadStatus" INTEGER, "nmo:reportReadStatus:graph"
         1265  +INTEGER, "nmo:mustAnswerReportRead" INTEGER,
         1266  +"nmo:mustAnswerReportRead:graph" INTEGER, "nmo:mmsId" TEXT COLLATE
         1267  +NOCASE, "nmo:mmsId:graph" INTEGER);
         1268  +CREATE TABLE "nmo:MessageHeader" (ID INTEGER NOT NULL PRIMARY KEY,
         1269  +"nmo:headerName" TEXT COLLATE NOCASE, "nmo:headerName:graph" INTEGER,
         1270  +"nmo:headerValue" TEXT COLLATE NOCASE, "nmo:headerValue:graph"
         1271  +INTEGER);
         1272  +CREATE TABLE "nmo:Message_nmo:bcc" (ID INTEGER NOT NULL, "nmo:bcc"
         1273  +INTEGER NOT NULL, "nmo:bcc:graph" INTEGER);
         1274  +CREATE TABLE "nmo:Message_nmo:cc" (ID INTEGER NOT NULL, "nmo:cc"
         1275  +INTEGER NOT NULL, "nmo:cc:graph" INTEGER);
         1276  +CREATE TABLE "nmo:Message_nmo:hasAttachment" (ID INTEGER NOT NULL,
         1277  +"nmo:hasAttachment" INTEGER NOT NULL, "nmo:hasAttachment:graph"
         1278  +INTEGER);
         1279  +CREATE TABLE "nmo:Message_nmo:inReplyTo" (ID INTEGER NOT NULL,
         1280  +"nmo:inReplyTo" INTEGER NOT NULL, "nmo:inReplyTo:graph" INTEGER);
         1281  +CREATE TABLE "nmo:Message_nmo:messageHeader" (ID INTEGER NOT NULL,
         1282  +"nmo:messageHeader" INTEGER NOT NULL, "nmo:messageHeader:graph"
         1283  +INTEGER);
         1284  +CREATE TABLE "nmo:Message_nmo:recipient" (ID INTEGER NOT NULL,
         1285  +"nmo:recipient" INTEGER NOT NULL, "nmo:recipient:graph" INTEGER);
         1286  +CREATE TABLE "nmo:Message_nmo:references" (ID INTEGER NOT NULL,
         1287  +"nmo:references" INTEGER NOT NULL, "nmo:references:graph" INTEGER);
         1288  +CREATE TABLE "nmo:Message_nmo:to" (ID INTEGER NOT NULL, "nmo:to"
         1289  +INTEGER NOT NULL, "nmo:to:graph" INTEGER);
         1290  +CREATE TABLE "nmo:MimePart" (ID INTEGER NOT NULL PRIMARY KEY,
         1291  +"nmo:charSet" TEXT COLLATE NOCASE, "nmo:charSet:graph" INTEGER,
         1292  +"nmo:contentId" TEXT COLLATE NOCASE, "nmo:contentId:graph" INTEGER,
         1293  +"nmo:contentTransferEncoding" TEXT COLLATE NOCASE,
         1294  +"nmo:contentTransferEncoding:graph" INTEGER, "nmo:contentDescription"
         1295  +TEXT COLLATE NOCASE, "nmo:contentDescription:graph" INTEGER,
         1296  +"nmo:contentDisposition" TEXT COLLATE NOCASE,
         1297  +"nmo:contentDisposition:graph" INTEGER);
         1298  +CREATE TABLE "nmo:MimePart_nmo:mimeHeader" (ID INTEGER NOT NULL,
         1299  +"nmo:mimeHeader" INTEGER NOT NULL, "nmo:mimeHeader:graph" INTEGER);
         1300  +CREATE TABLE "nmo:Multipart" (ID INTEGER NOT NULL PRIMARY KEY);
         1301  +CREATE TABLE "nmo:Multipart_nmo:partBoundary" (ID INTEGER NOT NULL,
         1302  +"nmo:partBoundary" TEXT NOT NULL, "nmo:partBoundary:graph" INTEGER);
         1303  +CREATE TABLE "nmo:PermanentChannel" (ID INTEGER NOT NULL PRIMARY KEY);
         1304  +CREATE TABLE "nmo:PhoneMessage" (ID INTEGER NOT NULL PRIMARY KEY,
         1305  +"nmo:fromVCard" INTEGER, "nmo:fromVCard:graph" INTEGER, "nmo:encoding"
         1306  +TEXT COLLATE NOCASE, "nmo:encoding:graph" INTEGER,
         1307  +"nmo:phoneMessageId" INTEGER, "nmo:phoneMessageId:graph" INTEGER,
         1308  +"nmo:validityPeriod" INTEGER, "nmo:validityPeriod:graph" INTEGER);
         1309  +CREATE TABLE "nmo:PhoneMessageFolder" (ID INTEGER NOT NULL PRIMARY
         1310  +KEY, "nmo:phoneMessageFolderId" TEXT COLLATE NOCASE,
         1311  +"nmo:phoneMessageFolderId:graph" INTEGER);
         1312  +CREATE TABLE "nmo:PhoneMessageFolder_nmo:containsPhoneMessage" (ID
         1313  +INTEGER NOT NULL, "nmo:containsPhoneMessage" INTEGER NOT NULL,
         1314  +"nmo:containsPhoneMessage:graph" INTEGER);
         1315  +CREATE TABLE "nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder"
         1316  +(ID INTEGER NOT NULL, "nmo:containsPhoneMessageFolder" INTEGER NOT
         1317  +NULL, "nmo:containsPhoneMessageFolder:graph" INTEGER);
         1318  +CREATE TABLE "nmo:PhoneMessage_nmo:toVCard" (ID INTEGER NOT NULL,
         1319  +"nmo:toVCard" INTEGER NOT NULL, "nmo:toVCard:graph" INTEGER);
         1320  +CREATE TABLE "nmo:ReportReadStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1321  +CREATE TABLE "nmo:SMSMessage" (ID INTEGER NOT NULL PRIMARY KEY);
         1322  +CREATE TABLE "nmo:TransientChannel" (ID INTEGER NOT NULL PRIMARY KEY);
         1323  +CREATE TABLE "nmo:VOIPCall" (ID INTEGER NOT NULL PRIMARY KEY);
         1324  +CREATE TABLE "nrl:InverseFunctionalProperty" (ID INTEGER NOT NULL PRIMARY KEY);
         1325  +CREATE TABLE "osinfo:Installer" (ID INTEGER NOT NULL PRIMARY KEY);
         1326  +CREATE TABLE "poi:ObjectOfInterest" (ID INTEGER NOT NULL PRIMARY KEY);
         1327  +CREATE TABLE "rdf:Property" (ID INTEGER NOT NULL PRIMARY KEY,
         1328  +"rdfs:domain" INTEGER, "rdfs:domain:graph" INTEGER, "rdfs:range"
         1329  +INTEGER, "rdfs:range:graph" INTEGER, "tracker:indexed" INTEGER,
         1330  +"tracker:indexed:graph" INTEGER, "tracker:secondaryIndex" INTEGER,
         1331  +"tracker:secondaryIndex:graph" INTEGER, "tracker:fulltextIndexed"
         1332  +INTEGER, "tracker:fulltextIndexed:graph" INTEGER,
         1333  +"tracker:fulltextNoLimit" INTEGER, "tracker:fulltextNoLimit:graph"
         1334  +INTEGER, "tracker:transient" INTEGER, "tracker:transient:graph"
         1335  +INTEGER, "tracker:weight" INTEGER, "tracker:weight:graph" INTEGER,
         1336  +"tracker:defaultValue" TEXT COLLATE NOCASE,
         1337  +"tracker:defaultValue:graph" INTEGER, "nrl:maxCardinality" INTEGER,
         1338  +"nrl:maxCardinality:graph" INTEGER, "tracker:writeback" INTEGER,
         1339  +"tracker:writeback:graph" INTEGER, "tracker:forceJournal" INTEGER,
         1340  +"tracker:forceJournal:graph" INTEGER);
         1341  +CREATE TABLE "rdf:Property_rdfs:subPropertyOf" (ID INTEGER NOT NULL,
         1342  +"rdfs:subPropertyOf" INTEGER NOT NULL, "rdfs:subPropertyOf:graph"
         1343  +INTEGER);
         1344  +CREATE TABLE "rdfs:Class" (ID INTEGER NOT NULL PRIMARY KEY,
         1345  +"tracker:notify" INTEGER, "tracker:notify:graph" INTEGER);
         1346  +CREATE TABLE "rdfs:Class_rdfs:subClassOf" (ID INTEGER NOT NULL,
         1347  +"rdfs:subClassOf" INTEGER NOT NULL, "rdfs:subClassOf:graph" INTEGER);
         1348  +CREATE TABLE "rdfs:Class_tracker:domainIndex" (ID INTEGER NOT NULL,
         1349  +"tracker:domainIndex" INTEGER NOT NULL, "tracker:domainIndex:graph"
         1350  +INTEGER);
         1351  +CREATE TABLE "rdfs:Literal" (ID INTEGER NOT NULL PRIMARY KEY);
         1352  +CREATE TABLE "rdfs:Resource" (ID INTEGER NOT NULL PRIMARY KEY,
         1353  +Available INTEGER NOT NULL, "rdfs:comment" TEXT COLLATE NOCASE,
         1354  +"rdfs:comment:graph" INTEGER, "rdfs:label" TEXT COLLATE NOCASE,
         1355  +"rdfs:label:graph" INTEGER, "tracker:added" INTEGER,
         1356  +"tracker:added:graph" INTEGER, "tracker:added:localDate" INTEGER,
         1357  +"tracker:added:localTime" INTEGER, "tracker:modified" INTEGER,
         1358  +"tracker:modified:graph" INTEGER, "tracker:damaged" INTEGER,
         1359  +"tracker:damaged:graph" INTEGER, "dc:title" TEXT COLLATE NOCASE,
         1360  +"dc:title:graph" INTEGER, "dc:creator" TEXT COLLATE NOCASE,
         1361  +"dc:creator:graph" INTEGER, "dc:subject" TEXT COLLATE NOCASE,
         1362  +"dc:subject:graph" INTEGER, "dc:description" TEXT COLLATE NOCASE,
         1363  +"dc:description:graph" INTEGER, "dc:publisher" TEXT COLLATE NOCASE,
         1364  +"dc:publisher:graph" INTEGER, "dc:type" TEXT COLLATE NOCASE,
         1365  +"dc:type:graph" INTEGER, "dc:format" TEXT COLLATE NOCASE,
         1366  +"dc:format:graph" INTEGER, "dc:identifier" TEXT COLLATE NOCASE,
         1367  +"dc:identifier:graph" INTEGER, "dc:language" TEXT COLLATE NOCASE,
         1368  +"dc:language:graph" INTEGER, "dc:coverage" TEXT COLLATE NOCASE,
         1369  +"dc:coverage:graph" INTEGER, "dc:rights" TEXT COLLATE NOCASE,
         1370  +"dc:rights:graph" INTEGER, "nao:identifier" TEXT COLLATE NOCASE,
         1371  +"nao:identifier:graph" INTEGER, "nao:numericRating" REAL,
         1372  +"nao:numericRating:graph" INTEGER, "nao:lastModified" INTEGER,
         1373  +"nao:lastModified:graph" INTEGER, "nao:lastModified:localDate"
         1374  +INTEGER, "nao:lastModified:localTime" INTEGER);
         1375  +CREATE TABLE "rdfs:Resource_dc:contributor" (ID INTEGER NOT NULL,
         1376  +"dc:contributor" TEXT NOT NULL, "dc:contributor:graph" INTEGER);
         1377  +CREATE TABLE "rdfs:Resource_dc:date" (ID INTEGER NOT NULL, "dc:date"
         1378  +INTEGER NOT NULL, "dc:date:graph" INTEGER, "dc:date:localDate" INTEGER
         1379  +NOT NULL, "dc:date:localTime" INTEGER NOT NULL);
         1380  +CREATE TABLE "rdfs:Resource_dc:relation" (ID INTEGER NOT NULL,
         1381  +"dc:relation" TEXT NOT NULL, "dc:relation:graph" INTEGER);
         1382  +CREATE TABLE "rdfs:Resource_dc:source" (ID INTEGER NOT NULL,
         1383  +"dc:source" INTEGER NOT NULL, "dc:source:graph" INTEGER);
         1384  +CREATE TABLE "rdfs:Resource_nao:deprecated" (ID INTEGER NOT NULL,
         1385  +"nao:deprecated" INTEGER NOT NULL, "nao:deprecated:graph" INTEGER);
         1386  +CREATE TABLE "rdfs:Resource_nao:hasTag" (ID INTEGER NOT NULL,
         1387  +"nao:hasTag" INTEGER NOT NULL, "nao:hasTag:graph" INTEGER);
         1388  +CREATE TABLE "rdfs:Resource_nao:isRelated" (ID INTEGER NOT NULL,
         1389  +"nao:isRelated" INTEGER NOT NULL, "nao:isRelated:graph" INTEGER);
         1390  +CREATE TABLE "rdfs:Resource_rdf:type" (ID INTEGER NOT NULL, "rdf:type"
         1391  +INTEGER NOT NULL, "rdf:type:graph" INTEGER);
         1392  +CREATE TABLE "scal:AccessLevel" (ID INTEGER NOT NULL PRIMARY KEY);
         1393  +CREATE TABLE "scal:AttendanceStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1394  +CREATE TABLE "scal:Attendee" (ID INTEGER NOT NULL PRIMARY KEY,
         1395  +"scal:attendanceStatus" INTEGER, "scal:attendanceStatus:graph"
         1396  +INTEGER, "scal:attendeeRole" INTEGER, "scal:attendeeRole:graph"
         1397  +INTEGER, "scal:attendeeContact" INTEGER, "scal:attendeeContact:graph"
         1398  +INTEGER, "scal:rsvp" INTEGER, "scal:rsvp:graph" INTEGER,
         1399  +"scal:calendarUserType" INTEGER, "scal:calendarUserType:graph"
         1400  +INTEGER);
         1401  +CREATE TABLE "scal:AttendeeRole" (ID INTEGER NOT NULL PRIMARY KEY);
         1402  +CREATE TABLE "scal:Attendee_scal:delegated-from" (ID INTEGER NOT NULL,
         1403  +"scal:delegated-from" INTEGER NOT NULL, "scal:delegated-from:graph"
         1404  +INTEGER);
         1405  +CREATE TABLE "scal:Attendee_scal:delegated-to" (ID INTEGER NOT NULL,
         1406  +"scal:delegated-to" INTEGER NOT NULL, "scal:delegated-to:graph"
         1407  +INTEGER);
         1408  +CREATE TABLE "scal:Attendee_scal:member" (ID INTEGER NOT NULL,
         1409  +"scal:member" INTEGER NOT NULL, "scal:member:graph" INTEGER);
         1410  +CREATE TABLE "scal:Attendee_scal:sent-by" (ID INTEGER NOT NULL,
         1411  +"scal:sent-by" INTEGER NOT NULL, "scal:sent-by:graph" INTEGER);
         1412  +CREATE TABLE "scal:Calendar" (ID INTEGER NOT NULL PRIMARY KEY);
         1413  +CREATE TABLE "scal:CalendarAlarm" (ID INTEGER NOT NULL PRIMARY KEY,
         1414  +"scal:alarmOffset" INTEGER, "scal:alarmOffset:graph" INTEGER);
         1415  +CREATE TABLE "scal:CalendarAlarm_scal:alarmAttendee" (ID INTEGER NOT
         1416  +NULL, "scal:alarmAttendee" INTEGER NOT NULL,
         1417  +"scal:alarmAttendee:graph" INTEGER);
         1418  +CREATE TABLE "scal:CalendarItem" (ID INTEGER NOT NULL PRIMARY KEY,
         1419  +"scal:textLocation" INTEGER, "scal:textLocation:graph" INTEGER,
         1420  +"scal:resources" TEXT COLLATE NOCASE, "scal:resources:graph" INTEGER,
         1421  +"scal:transparency" INTEGER, "scal:transparency:graph" INTEGER,
         1422  +"scal:calendarItemAlarm" INTEGER, "scal:calendarItemAlarm:graph"
         1423  +INTEGER, "scal:start" INTEGER, "scal:start:graph" INTEGER, "scal:end"
         1424  +INTEGER, "scal:end:graph" INTEGER, "scal:isAllDay" INTEGER,
         1425  +"scal:isAllDay:graph" INTEGER, "scal:priority" INTEGER,
         1426  +"scal:priority:graph" INTEGER, "scal:rdate" INTEGER,
         1427  +"scal:rdate:graph" INTEGER, "scal:exceptionRDate" INTEGER,
         1428  +"scal:exceptionRDate:graph" INTEGER);
         1429  +CREATE TABLE "scal:CalendarItem_scal:access" (ID INTEGER NOT NULL,
         1430  +"scal:access" INTEGER NOT NULL, "scal:access:graph" INTEGER);
         1431  +CREATE TABLE "scal:CalendarItem_scal:attachment" (ID INTEGER NOT NULL,
         1432  +"scal:attachment" INTEGER NOT NULL, "scal:attachment:graph" INTEGER);
         1433  +CREATE TABLE "scal:CalendarItem_scal:attendee" (ID INTEGER NOT NULL,
         1434  +"scal:attendee" INTEGER NOT NULL, "scal:attendee:graph" INTEGER);
         1435  +CREATE TABLE "scal:CalendarItem_scal:belongsToCalendar" (ID INTEGER
         1436  +NOT NULL, "scal:belongsToCalendar" INTEGER NOT NULL,
         1437  +"scal:belongsToCalendar:graph" INTEGER);
         1438  +CREATE TABLE "scal:CalendarItem_scal:contact" (ID INTEGER NOT NULL,
         1439  +"scal:contact" INTEGER NOT NULL, "scal:contact:graph" INTEGER);
         1440  +CREATE TABLE "scal:CalendarItem_scal:rrule" (ID INTEGER NOT NULL,
         1441  +"scal:rrule" INTEGER NOT NULL, "scal:rrule:graph" INTEGER);
         1442  +CREATE TABLE "scal:CalendarUserType" (ID INTEGER NOT NULL PRIMARY KEY);
         1443  +CREATE TABLE "scal:Event" (ID INTEGER NOT NULL PRIMARY KEY,
         1444  +"scal:eventStatus" INTEGER, "scal:eventStatus:graph" INTEGER);
         1445  +CREATE TABLE "scal:EventStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1446  +CREATE TABLE "scal:Journal" (ID INTEGER NOT NULL PRIMARY KEY,
         1447  +"scal:journalStatus" INTEGER, "scal:journalStatus:graph" INTEGER);
         1448  +CREATE TABLE "scal:JournalStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1449  +CREATE TABLE "scal:RSVPValues" (ID INTEGER NOT NULL PRIMARY KEY);
         1450  +CREATE TABLE "scal:RecurrenceRule" (ID INTEGER NOT NULL PRIMARY KEY,
         1451  +"scal:recurrencePattern" TEXT COLLATE NOCASE,
         1452  +"scal:recurrencePattern:graph" INTEGER, "scal:recurrenceStartDate"
         1453  +INTEGER, "scal:recurrenceStartDate:graph" INTEGER, "scal:exception"
         1454  +INTEGER, "scal:exception:graph" INTEGER);
         1455  +CREATE TABLE "scal:TimePoint" (ID INTEGER NOT NULL PRIMARY KEY,
         1456  +"scal:dateTime" INTEGER, "scal:dateTime:graph" INTEGER,
         1457  +"scal:dateTime:localDate" INTEGER, "scal:dateTime:localTime" INTEGER,
         1458  +"scal:TimeZone" TEXT COLLATE NOCASE, "scal:TimeZone:graph" INTEGER);
         1459  +CREATE TABLE "scal:Todo" (ID INTEGER NOT NULL PRIMARY KEY,
         1460  +"scal:todoStatus" INTEGER, "scal:todoStatus:graph" INTEGER, "scal:due"
         1461  +INTEGER, "scal:due:graph" INTEGER, "scal:completed" INTEGER,
         1462  +"scal:completed:graph" INTEGER, "scal:percentComplete" INTEGER,
         1463  +"scal:percentComplete:graph" INTEGER);
         1464  +CREATE TABLE "scal:TodoStatus" (ID INTEGER NOT NULL PRIMARY KEY);
         1465  +CREATE TABLE "scal:TransparencyValues" (ID INTEGER NOT NULL PRIMARY KEY);
         1466  +CREATE TABLE "slo:GeoLocation" (ID INTEGER NOT NULL PRIMARY KEY,
         1467  +"slo:latitude" REAL, "slo:latitude:graph" INTEGER, "slo:longitude"
         1468  +REAL, "slo:longitude:graph" INTEGER, "slo:verticalAccuracy" REAL,
         1469  +"slo:verticalAccuracy:graph" INTEGER, "slo:horizontalAccuracy" REAL,
         1470  +"slo:horizontalAccuracy:graph" INTEGER, "slo:altitude" REAL,
         1471  +"slo:altitude:graph" INTEGER, "slo:boundingLatitudeMin" REAL,
         1472  +"slo:boundingLatitudeMin:graph" INTEGER, "slo:boundingLatitudeMax"
         1473  +REAL, "slo:boundingLatitudeMax:graph" INTEGER,
         1474  +"slo:boundingLongitudeMin" REAL, "slo:boundingLongitudeMin:graph"
         1475  +INTEGER, "slo:boundingLongitudeMax" REAL,
         1476  +"slo:boundingLongitudeMax:graph" INTEGER, "slo:radius" REAL,
         1477  +"slo:radius:graph" INTEGER, "slo:timestamp" INTEGER,
         1478  +"slo:timestamp:graph" INTEGER, "slo:timestamp:localDate" INTEGER,
         1479  +"slo:timestamp:localTime" INTEGER, "slo:postalAddress" INTEGER,
         1480  +"slo:postalAddress:graph" INTEGER);
         1481  +CREATE TABLE "slo:Landmark" (ID INTEGER NOT NULL PRIMARY KEY,
         1482  +"slo:iconUrl" INTEGER, "slo:iconUrl:graph" INTEGER);
         1483  +CREATE TABLE "slo:LandmarkCategory" (ID INTEGER NOT NULL PRIMARY KEY,
         1484  +"slo:isRemovable" INTEGER, "slo:isRemovable:graph" INTEGER,
         1485  +"slo:categoryIconUrl" INTEGER, "slo:categoryIconUrl:graph" INTEGER);
         1486  +CREATE TABLE "slo:Landmark_slo:belongsToCategory" (ID INTEGER NOT
         1487  +NULL, "slo:belongsToCategory" INTEGER NOT NULL,
         1488  +"slo:belongsToCategory:graph" INTEGER);
         1489  +CREATE TABLE "slo:Landmark_slo:hasContact" (ID INTEGER NOT NULL,
         1490  +"slo:hasContact" INTEGER NOT NULL, "slo:hasContact:graph" INTEGER);
         1491  +CREATE TABLE "slo:Route" (ID INTEGER NOT NULL PRIMARY KEY,
         1492  +"slo:startTime" INTEGER, "slo:startTime:graph" INTEGER,
         1493  +"slo:startTime:localDate" INTEGER, "slo:startTime:localTime" INTEGER,
         1494  +"slo:endTime" INTEGER, "slo:endTime:graph" INTEGER,
         1495  +"slo:endTime:localDate" INTEGER, "slo:endTime:localTime" INTEGER);
         1496  +CREATE TABLE "slo:Route_slo:routeDetails" (ID INTEGER NOT NULL,
         1497  +"slo:routeDetails" TEXT NOT NULL, "slo:routeDetails:graph" INTEGER);
         1498  +CREATE TABLE "tracker:Namespace" (ID INTEGER NOT NULL PRIMARY KEY,
         1499  +"tracker:prefix" TEXT COLLATE NOCASE, "tracker:prefix:graph"
         1500  +INTEGER);
         1501  +CREATE TABLE "tracker:Ontology" (ID INTEGER NOT NULL PRIMARY KEY);
         1502  +CREATE TABLE "tracker:Volume" (ID INTEGER NOT NULL PRIMARY KEY,
         1503  +"tracker:isMounted" INTEGER, "tracker:isMounted:graph" INTEGER,
         1504  +"tracker:unmountDate" INTEGER, "tracker:unmountDate:graph" INTEGER,
         1505  +"tracker:unmountDate:localDate" INTEGER,
         1506  +"tracker:unmountDate:localTime" INTEGER, "tracker:mountPoint" INTEGER,
         1507  +"tracker:mountPoint:graph" INTEGER, "tracker:isRemovable" INTEGER,
         1508  +"tracker:isRemovable:graph" INTEGER, "tracker:isOptical" INTEGER,
         1509  +"tracker:isOptical:graph" INTEGER);
         1510  +CREATE UNIQUE INDEX "mfo:FeedMessage_mfo:enclosureList_ID_ID" ON
         1511  +"mfo:FeedMessage_mfo:enclosureList" (ID, "mfo:enclosureList");
         1512  +CREATE UNIQUE INDEX "mlo:GeoBoundingBox_mlo:bbNorthWest_ID_ID" ON
         1513  +"mlo:GeoBoundingBox_mlo:bbNorthWest" (ID, "mlo:bbNorthWest");
         1514  +CREATE UNIQUE INDEX "mlo:GeoBoundingBox_mlo:bbSouthEast_ID_ID" ON
         1515  +"mlo:GeoBoundingBox_mlo:bbSouthEast" (ID, "mlo:bbSouthEast");
         1516  +CREATE INDEX "mlo:GeoLocation_mlo:asBoundingBox_ID" ON
         1517  +"mlo:GeoLocation_mlo:asBoundingBox" (ID);
         1518  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asBoundingBox_ID_ID" ON
         1519  +"mlo:GeoLocation_mlo:asBoundingBox" ("mlo:asBoundingBox", ID);
         1520  +CREATE INDEX "mlo:GeoLocation_mlo:asGeoPoint_ID" ON
         1521  +"mlo:GeoLocation_mlo:asGeoPoint" (ID);
         1522  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asGeoPoint_ID_ID" ON
         1523  +"mlo:GeoLocation_mlo:asGeoPoint" ("mlo:asGeoPoint", ID);
         1524  +CREATE INDEX "mlo:GeoLocation_mlo:asPostalAddress_ID" ON
         1525  +"mlo:GeoLocation_mlo:asPostalAddress" (ID);
         1526  +CREATE UNIQUE INDEX "mlo:GeoLocation_mlo:asPostalAddress_ID_ID" ON
         1527  +"mlo:GeoLocation_mlo:asPostalAddress" ("mlo:asPostalAddress", ID);
         1528  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:address_ID_ID" ON
         1529  +"mlo:GeoPoint_mlo:address" (ID, "mlo:address");
         1530  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:altitude_ID_ID" ON
         1531  +"mlo:GeoPoint_mlo:altitude" (ID, "mlo:altitude");
         1532  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:city_ID_ID" ON
         1533  +"mlo:GeoPoint_mlo:city" (ID, "mlo:city");
         1534  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:country_ID_ID" ON
         1535  +"mlo:GeoPoint_mlo:country" (ID, "mlo:country");
         1536  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:latitude_ID_ID" ON
         1537  +"mlo:GeoPoint_mlo:latitude" (ID, "mlo:latitude");
         1538  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:longitude_ID_ID" ON
         1539  +"mlo:GeoPoint_mlo:longitude" (ID, "mlo:longitude");
         1540  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:state_ID_ID" ON
         1541  +"mlo:GeoPoint_mlo:state" (ID, "mlo:state");
         1542  +CREATE UNIQUE INDEX "mlo:GeoPoint_mlo:timestamp_ID_ID" ON
         1543  +"mlo:GeoPoint_mlo:timestamp" (ID, "mlo:timestamp");
         1544  +CREATE UNIQUE INDEX "mlo:GeoSphere_mlo:radius_ID_ID" ON
         1545  +"mlo:GeoSphere_mlo:radius" (ID, "mlo:radius");
         1546  +CREATE UNIQUE INDEX "mlo:LandmarkCategory_mlo:isRemovable_ID_ID" ON
         1547  +"mlo:LandmarkCategory_mlo:isRemovable" (ID, "mlo:isRemovable");
         1548  +CREATE UNIQUE INDEX "mlo:Landmark_mlo:belongsToCategory_ID_ID" ON
         1549  +"mlo:Landmark_mlo:belongsToCategory" (ID, "mlo:belongsToCategory");
         1550  +CREATE UNIQUE INDEX "mlo:Landmark_mlo:poiLocation_ID_ID" ON
         1551  +"mlo:Landmark_mlo:poiLocation" (ID, "mlo:poiLocation");
         1552  +CREATE UNIQUE INDEX "mlo:LocationBoundingBox_mlo:boxEastLimit_ID_ID"
         1553  +ON "mlo:LocationBoundingBox_mlo:boxEastLimit" (ID,
         1554  +"mlo:boxEastLimit");
         1555  +CREATE UNIQUE INDEX "mlo:LocationBoundingBox_mlo:boxNorthLimit_ID_ID"
         1556  +ON "mlo:LocationBoundingBox_mlo:boxNorthLimit" (ID,
         1557  +"mlo:boxNorthLimit");
         1558  +CREATE UNIQUE INDEX
         1559  +"mlo:LocationBoundingBox_mlo:boxSouthWestCorner_ID_ID" ON
         1560  +"mlo:LocationBoundingBox_mlo:boxSouthWestCorner" (ID,
         1561  +"mlo:boxSouthWestCorner");
         1562  +CREATE UNIQUE INDEX
         1563  +"mlo:LocationBoundingBox_mlo:boxVerticalLimit_ID_ID" ON
         1564  +"mlo:LocationBoundingBox_mlo:boxVerticalLimit" (ID,
         1565  +"mlo:boxVerticalLimit");
         1566  +CREATE UNIQUE INDEX "mlo:Route_mlo:endTime_ID_ID" ON
         1567  +"mlo:Route_mlo:endTime" (ID, "mlo:endTime");
         1568  +CREATE UNIQUE INDEX "mlo:Route_mlo:routeDetails_ID_ID" ON
         1569  +"mlo:Route_mlo:routeDetails" (ID, "mlo:routeDetails");
         1570  +CREATE UNIQUE INDEX "mlo:Route_mlo:startTime_ID_ID" ON
         1571  +"mlo:Route_mlo:startTime" (ID, "mlo:startTime");
         1572  +CREATE UNIQUE INDEX "mto:Transfer_mto:transferList_ID_ID" ON
         1573  +"mto:Transfer_mto:transferList" (ID, "mto:transferList");
         1574  +CREATE UNIQUE INDEX "mto:Transfer_mto:transferPrivacyLevel_ID_ID" ON
         1575  +"mto:Transfer_mto:transferPrivacyLevel" (ID,
         1576  +"mto:transferPrivacyLevel");
         1577  +CREATE UNIQUE INDEX "mto:UploadTransfer_mto:transferCategory_ID_ID" ON
         1578  +"mto:UploadTransfer_mto:transferCategory" (ID,
         1579  +"mto:transferCategory");
         1580  +CREATE UNIQUE INDEX "nao:Tag_tracker:isDefaultTag_ID_ID" ON
         1581  +"nao:Tag_tracker:isDefaultTag" (ID, "tracker:isDefaultTag");
         1582  +CREATE UNIQUE INDEX "nao:Tag_tracker:tagRelatedTo_ID_ID" ON
         1583  +"nao:Tag_tracker:tagRelatedTo" (ID, "tracker:tagRelatedTo");
         1584  +CREATE UNIQUE INDEX "ncal:Alarm_ncal:action_ID_ID" ON
         1585  +"ncal:Alarm_ncal:action" (ID, "ncal:action");
         1586  +CREATE UNIQUE INDEX "ncal:BydayRulePart_ncal:bydayModifier_ID_ID" ON
         1587  +"ncal:BydayRulePart_ncal:bydayModifier" (ID, "ncal:bydayModifier");
         1588  +CREATE UNIQUE INDEX "ncal:BydayRulePart_ncal:bydayWeekday_ID_ID" ON
         1589  +"ncal:BydayRulePart_ncal:bydayWeekday" (ID, "ncal:bydayWeekday");
         1590  +CREATE UNIQUE INDEX "ncal:Calendar_ncal:component_ID_ID" ON
         1591  +"ncal:Calendar_ncal:component" (ID, "ncal:component");
         1592  +CREATE UNIQUE INDEX "ncal:Freebusy_ncal:freebusy_ID_ID" ON
         1593  +"ncal:Freebusy_ncal:freebusy" (ID, "ncal:freebusy");
         1594  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byday_ID_ID" ON
         1595  +"ncal:RecurrenceRule_ncal:byday" (ID, "ncal:byday");
         1596  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byhour_ID_ID" ON
         1597  +"ncal:RecurrenceRule_ncal:byhour" (ID, "ncal:byhour");
         1598  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byminute_ID_ID" ON
         1599  +"ncal:RecurrenceRule_ncal:byminute" (ID, "ncal:byminute");
         1600  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bymonth_ID_ID" ON
         1601  +"ncal:RecurrenceRule_ncal:bymonth" (ID, "ncal:bymonth");
         1602  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bymonthday_ID_ID" ON
         1603  +"ncal:RecurrenceRule_ncal:bymonthday" (ID, "ncal:bymonthday");
         1604  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bysecond_ID_ID" ON
         1605  +"ncal:RecurrenceRule_ncal:bysecond" (ID, "ncal:bysecond");
         1606  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:bysetpos_ID_ID" ON
         1607  +"ncal:RecurrenceRule_ncal:bysetpos" (ID, "ncal:bysetpos");
         1608  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byweekno_ID_ID" ON
         1609  +"ncal:RecurrenceRule_ncal:byweekno" (ID, "ncal:byweekno");
         1610  +CREATE UNIQUE INDEX "ncal:RecurrenceRule_ncal:byyearday_ID_ID" ON
         1611  +"ncal:RecurrenceRule_ncal:byyearday" (ID, "ncal:byyearday");
         1612  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:attach_ID_ID" ON
         1613  +"ncal:UnionParentClass_ncal:attach" (ID, "ncal:attach");
         1614  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:attendee_ID_ID" ON
         1615  +"ncal:UnionParentClass_ncal:attendee" (ID, "ncal:attendee");
         1616  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:categories_ID_ID" ON
         1617  +"ncal:UnionParentClass_ncal:categories" (ID, "ncal:categories");
         1618  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:exdate_ID_ID" ON
         1619  +"ncal:UnionParentClass_ncal:exdate" (ID, "ncal:exdate");
         1620  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:exrule_ID_ID" ON
         1621  +"ncal:UnionParentClass_ncal:exrule" (ID, "ncal:exrule");
         1622  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:hasAlarm_ID_ID" ON
         1623  +"ncal:UnionParentClass_ncal:hasAlarm" (ID, "ncal:hasAlarm");
         1624  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:ncalRelation_ID_ID" ON
         1625  +"ncal:UnionParentClass_ncal:ncalRelation" (ID, "ncal:ncalRelation");
         1626  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:rdate_ID_ID" ON
         1627  +"ncal:UnionParentClass_ncal:rdate" (ID, "ncal:rdate");
         1628  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:relatedToChild_ID_ID"
         1629  +ON "ncal:UnionParentClass_ncal:relatedToChild" (ID,
         1630  +"ncal:relatedToChild");
         1631  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:relatedToParent_ID_ID"
         1632  +ON "ncal:UnionParentClass_ncal:relatedToParent" (ID,
         1633  +"ncal:relatedToParent");
         1634  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:resources_ID_ID" ON
         1635  +"ncal:UnionParentClass_ncal:resources" (ID, "ncal:resources");
         1636  +CREATE UNIQUE INDEX "ncal:UnionParentClass_ncal:rrule_ID_ID" ON
         1637  +"ncal:UnionParentClass_ncal:rrule" (ID, "ncal:rrule");
         1638  +CREATE UNIQUE INDEX "nco:Affiliation_nco:title_ID_ID" ON
         1639  +"nco:Affiliation_nco:title" (ID, "nco:title");
         1640  +CREATE UNIQUE INDEX "nco:ContactList_nco:containsContact_ID_ID" ON
         1641  +"nco:ContactList_nco:containsContact" (ID, "nco:containsContact");
         1642  +CREATE UNIQUE INDEX "nco:Contact_ncal:anniversary_ID_ID" ON
         1643  +"nco:Contact_ncal:anniversary" (ID, "ncal:anniversary");
         1644  +CREATE UNIQUE INDEX "nco:Contact_ncal:birthday_ID_ID" ON
         1645  +"nco:Contact_ncal:birthday" (ID, "ncal:birthday");
         1646  +CREATE UNIQUE INDEX "nco:Contact_nco:belongsToGroup_ID_ID" ON
         1647  +"nco:Contact_nco:belongsToGroup" (ID, "nco:belongsToGroup");
         1648  +CREATE UNIQUE INDEX "nco:Contact_nco:note_ID_ID" ON
         1649  +"nco:Contact_nco:note" (ID, "nco:note");
         1650  +CREATE UNIQUE INDEX "nco:Contact_scal:anniversary_ID_ID" ON
         1651  +"nco:Contact_scal:anniversary" (ID, "scal:anniversary");
         1652  +CREATE UNIQUE INDEX "nco:Contact_scal:birthday_ID_ID" ON
         1653  +"nco:Contact_scal:birthday" (ID, "scal:birthday");
         1654  +CREATE UNIQUE INDEX "nco:IMAccount_nco:hasIMContact_ID_ID" ON
         1655  +"nco:IMAccount_nco:hasIMContact" (ID, "nco:hasIMContact");
         1656  +CREATE UNIQUE INDEX "nco:IMAddress_nco:imCapability_ID_ID" ON
         1657  +"nco:IMAddress_nco:imCapability" (ID, "nco:imCapability");
         1658  +CREATE UNIQUE INDEX "nco:PersonContact_nco:hasAffiliation_ID_ID" ON
         1659  +"nco:PersonContact_nco:hasAffiliation" (ID, "nco:hasAffiliation");
         1660  +CREATE INDEX "nco:PersonContact_nco:nameFamily" ON "nco:PersonContact"
         1661  +("nco:nameFamily");
         1662  +CREATE INDEX "nco:PhoneNumber_nco:phoneNumber" ON "nco:PhoneNumber"
         1663  +("nco:phoneNumber");
         1664  +CREATE UNIQUE INDEX "nco:Role_nco:blogUrl_ID_ID" ON
         1665  +"nco:Role_nco:blogUrl" (ID, "nco:blogUrl");
         1666  +CREATE UNIQUE INDEX "nco:Role_nco:foafUrl_ID_ID" ON
         1667  +"nco:Role_nco:foafUrl" (ID, "nco:foafUrl");
         1668  +CREATE UNIQUE INDEX "nco:Role_nco:hasContactMedium_ID_ID" ON
         1669  +"nco:Role_nco:hasContactMedium" (ID, "nco:hasContactMedium");
         1670  +CREATE INDEX "nco:Role_nco:hasEmailAddress_ID" ON
         1671  +"nco:Role_nco:hasEmailAddress" (ID);
         1672  +CREATE UNIQUE INDEX "nco:Role_nco:hasEmailAddress_ID_ID" ON
         1673  +"nco:Role_nco:hasEmailAddress" ("nco:hasEmailAddress", ID);
         1674  +CREATE UNIQUE INDEX "nco:Role_nco:hasIMAddress_ID_ID" ON
         1675  +"nco:Role_nco:hasIMAddress" (ID, "nco:hasIMAddress");
         1676  +CREATE UNIQUE INDEX "nco:Role_nco:hasPhoneNumber_ID_ID" ON
         1677  +"nco:Role_nco:hasPhoneNumber" (ID, "nco:hasPhoneNumber");
         1678  +CREATE INDEX "nco:Role_nco:hasPostalAddress_ID" ON
         1679  +"nco:Role_nco:hasPostalAddress" (ID);
         1680  +CREATE UNIQUE INDEX "nco:Role_nco:hasPostalAddress_ID_ID" ON
         1681  +"nco:Role_nco:hasPostalAddress" ("nco:hasPostalAddress", ID);
         1682  +CREATE UNIQUE INDEX "nco:Role_nco:url_ID_ID" ON "nco:Role_nco:url"
         1683  +(ID, "nco:url");
         1684  +CREATE UNIQUE INDEX "nco:Role_nco:websiteUrl_ID_ID" ON
         1685  +"nco:Role_nco:websiteUrl" (ID, "nco:websiteUrl");
         1686  +CREATE UNIQUE INDEX
         1687  +"nfo:BookmarkFolder_nfo:containsBookmarkFolder_ID_ID" ON
         1688  +"nfo:BookmarkFolder_nfo:containsBookmarkFolder" (ID,
         1689  +"nfo:containsBookmarkFolder");
         1690  +CREATE UNIQUE INDEX "nfo:BookmarkFolder_nfo:containsBookmark_ID_ID" ON
         1691  +"nfo:BookmarkFolder_nfo:containsBookmark" (ID,
         1692  +"nfo:containsBookmark");
         1693  +CREATE INDEX "nfo:FileDataObject_nfo:fileLastModified" ON
         1694  +"nfo:FileDataObject" ("nfo:fileLastModified");
         1695  +CREATE UNIQUE INDEX "nfo:Image_nfo:depicts_ID_ID" ON
         1696  +"nfo:Image_nfo:depicts" (ID, "nfo:depicts");
         1697  +CREATE UNIQUE INDEX "nfo:Image_nfo:hasRegionOfInterest_ID_ID" ON
         1698  +"nfo:Image_nfo:hasRegionOfInterest" (ID, "nfo:hasRegionOfInterest");
         1699  +CREATE UNIQUE INDEX "nfo:MediaList_nfo:hasMediaFileListEntry_ID_ID" ON
         1700  +"nfo:MediaList_nfo:hasMediaFileListEntry" (ID,
         1701  +"nfo:hasMediaFileListEntry");
         1702  +CREATE UNIQUE INDEX "nfo:MediaList_nfo:mediaListEntry_ID_ID" ON
         1703  +"nfo:MediaList_nfo:mediaListEntry" (ID, "nfo:mediaListEntry");
         1704  +CREATE UNIQUE INDEX "nfo:Media_mtp:hidden_ID_ID" ON
         1705  +"nfo:Media_mtp:hidden" (ID, "mtp:hidden");
         1706  +CREATE UNIQUE INDEX "nfo:Media_nmm:alternativeMedia_ID_ID" ON
         1707  +"nfo:Media_nmm:alternativeMedia" (ID, "nmm:alternativeMedia");
         1708  +CREATE INDEX "nfo:Visual_nie:contentCreated" ON "nfo:Visual"
         1709  +("nie:contentCreated");
         1710  +CREATE UNIQUE INDEX "nid3:ID3Audio_nid3:leadArtist_ID_ID" ON
         1711  +"nid3:ID3Audio_nid3:leadArtist" (ID, "nid3:leadArtist");
         1712  +CREATE UNIQUE INDEX "nie:DataObject_nie:dataSource_ID_ID" ON
         1713  +"nie:DataObject_nie:dataSource" (ID, "nie:dataSource");
         1714  +CREATE UNIQUE INDEX "nie:DataObject_nie:isPartOf_ID_ID" ON
         1715  +"nie:DataObject_nie:isPartOf" (ID, "nie:isPartOf");
         1716  +CREATE INDEX "nie:DataObject_nie:url" ON "nie:DataObject" ("nie:url");
         1717  +CREATE INDEX "nie:InformationElement_mlo:location_ID" ON
         1718  +"nie:InformationElement_mlo:location" (ID);
         1719  +CREATE UNIQUE INDEX "nie:InformationElement_mlo:location_ID_ID" ON
         1720  +"nie:InformationElement_mlo:location" ("mlo:location", ID);
         1721  +CREATE UNIQUE INDEX "nie:InformationElement_nao:hasProperty_ID_ID" ON
         1722  +"nie:InformationElement_nao:hasProperty" (ID, "nao:hasProperty");
         1723  +CREATE UNIQUE INDEX "nie:InformationElement_nco:contributor_ID_ID" ON
         1724  +"nie:InformationElement_nco:contributor" (ID, "nco:contributor");
         1725  +CREATE UNIQUE INDEX "nie:InformationElement_nco:creator_ID_ID" ON
         1726  +"nie:InformationElement_nco:creator" (ID, "nco:creator");
         1727  +CREATE UNIQUE INDEX "nie:InformationElement_nie:hasLogicalPart_ID_ID"
         1728  +ON "nie:InformationElement_nie:hasLogicalPart" (ID,
         1729  +"nie:hasLogicalPart");
         1730  +CREATE UNIQUE INDEX "nie:InformationElement_nie:hasPart_ID_ID" ON
         1731  +"nie:InformationElement_nie:hasPart" (ID, "nie:hasPart");
         1732  +CREATE UNIQUE INDEX
         1733  +"nie:InformationElement_nie:informationElementDate_ID_ID" ON
         1734  +"nie:InformationElement_nie:informationElementDate" (ID,
         1735  +"nie:informationElementDate");
         1736  +CREATE UNIQUE INDEX "nie:InformationElement_nie:isLogicalPartOf_ID_ID"
         1737  +ON "nie:InformationElement_nie:isLogicalPartOf" (ID,
         1738  +"nie:isLogicalPartOf");
         1739  +CREATE UNIQUE INDEX "nie:InformationElement_nie:keyword_ID_ID" ON
         1740  +"nie:InformationElement_nie:keyword" (ID, "nie:keyword");
         1741  +CREATE UNIQUE INDEX "nie:InformationElement_nie:relatedTo_ID_ID" ON
         1742  +"nie:InformationElement_nie:relatedTo" (ID, "nie:relatedTo");
         1743  +CREATE INDEX "nie:InformationElement_slo:location" ON
         1744  +"nie:InformationElement" ("slo:location");
         1745  +CREATE INDEX "nmm:Artist_nmm:artistName" ON "nmm:Artist" ("nmm:artistName");
         1746  +CREATE INDEX "nmm:MusicAlbum_nie:title" ON "nmm:MusicAlbum" ("nie:title");
         1747  +CREATE UNIQUE INDEX "nmm:MusicAlbum_nmm:albumArtist_ID_ID" ON
         1748  +"nmm:MusicAlbum_nmm:albumArtist" (ID, "nmm:albumArtist");
         1749  +CREATE INDEX "nmm:MusicPiece_nie:title" ON "nmm:MusicPiece" ("nie:title");
         1750  +CREATE UNIQUE INDEX "nmm:MusicPiece_nmm:lyrics_ID_ID" ON
         1751  +"nmm:MusicPiece_nmm:lyrics" (ID, "nmm:lyrics");
         1752  +CREATE INDEX "nmm:MusicPiece_nmm:musicAlbum" ON "nmm:MusicPiece"
         1753  +("nmm:musicAlbum");
         1754  +CREATE INDEX "nmm:MusicPiece_nmm:performer" ON "nmm:MusicPiece"
         1755  +("nmm:performer");
         1756  +CREATE UNIQUE INDEX "nmm:RadioStation_nmm:carrier_ID_ID" ON
         1757  +"nmm:RadioStation_nmm:carrier" (ID, "nmm:carrier");
         1758  +CREATE UNIQUE INDEX "nmm:Video_mtp:scantype_ID_ID" ON
         1759  +"nmm:Video_mtp:scantype" (ID, "mtp:scantype");
         1760  +CREATE UNIQUE INDEX "nmm:Video_nmm:director_ID_ID" ON
         1761  +"nmm:Video_nmm:director" (ID, "nmm:director");
         1762  +CREATE UNIQUE INDEX "nmm:Video_nmm:leadActor_ID_ID" ON
         1763  +"nmm:Video_nmm:leadActor" (ID, "nmm:leadActor");
         1764  +CREATE UNIQUE INDEX "nmm:Video_nmm:subtitle_ID_ID" ON
         1765  +"nmm:Video_nmm:subtitle" (ID, "nmm:subtitle");
         1766  +CREATE INDEX "nmo:Call_nmo:sentDate" ON "nmo:Call" ("nmo:sentDate");
         1767  +CREATE INDEX "nmo:CommunicationChannel_nmo:hasParticipant_ID" ON
         1768  +"nmo:CommunicationChannel_nmo:hasParticipant" (ID);
         1769  +CREATE UNIQUE INDEX
         1770  +"nmo:CommunicationChannel_nmo:hasParticipant_ID_ID" ON
         1771  +"nmo:CommunicationChannel_nmo:hasParticipant" ("nmo:hasParticipant",
         1772  +ID);
         1773  +CREATE INDEX "nmo:CommunicationChannel_nmo:lastMessageDate" ON
         1774  +"nmo:CommunicationChannel" ("nmo:lastMessageDate");
         1775  +CREATE UNIQUE INDEX "nmo:Email_nmo:contentMimeType_ID_ID" ON
         1776  +"nmo:Email_nmo:contentMimeType" (ID, "nmo:contentMimeType");
         1777  +CREATE UNIQUE INDEX "nmo:Message_nmo:bcc_ID_ID" ON
         1778  +"nmo:Message_nmo:bcc" (ID, "nmo:bcc");
         1779  +CREATE UNIQUE INDEX "nmo:Message_nmo:cc_ID_ID" ON "nmo:Message_nmo:cc"
         1780  +(ID, "nmo:cc");
         1781  +CREATE INDEX "nmo:Message_nmo:communicationChannel" ON "nmo:Message"
         1782  +("nmo:communicationChannel", "nmo:receivedDate");
         1783  +CREATE INDEX "nmo:Message_nmo:conversation" ON "nmo:Message"
         1784  +("nmo:conversation");
         1785  +CREATE INDEX "nmo:Message_nmo:from" ON "nmo:Message" ("nmo:from");
         1786  +CREATE UNIQUE INDEX "nmo:Message_nmo:hasAttachment_ID_ID" ON
         1787  +"nmo:Message_nmo:hasAttachment" (ID, "nmo:hasAttachment");
         1788  +CREATE UNIQUE INDEX "nmo:Message_nmo:inReplyTo_ID_ID" ON
         1789  +"nmo:Message_nmo:inReplyTo" (ID, "nmo:inReplyTo");
         1790  +CREATE UNIQUE INDEX "nmo:Message_nmo:messageHeader_ID_ID" ON
         1791  +"nmo:Message_nmo:messageHeader" (ID, "nmo:messageHeader");
         1792  +CREATE UNIQUE INDEX "nmo:Message_nmo:recipient_ID_ID" ON
         1793  +"nmo:Message_nmo:recipient" (ID, "nmo:recipient");
         1794  +CREATE UNIQUE INDEX "nmo:Message_nmo:references_ID_ID" ON
         1795  +"nmo:Message_nmo:references" (ID, "nmo:references");
         1796  +CREATE INDEX "nmo:Message_nmo:sender" ON "nmo:Message" ("nmo:sender");
         1797  +CREATE INDEX "nmo:Message_nmo:sentDate" ON "nmo:Message" ("nmo:sentDate");
         1798  +CREATE INDEX "nmo:Message_nmo:to_ID" ON "nmo:Message_nmo:to" (ID);
         1799  +CREATE UNIQUE INDEX "nmo:Message_nmo:to_ID_ID" ON "nmo:Message_nmo:to"
         1800  +("nmo:to", ID);
         1801  +CREATE UNIQUE INDEX "nmo:MimePart_nmo:mimeHeader_ID_ID" ON
         1802  +"nmo:MimePart_nmo:mimeHeader" (ID, "nmo:mimeHeader");
         1803  +CREATE UNIQUE INDEX "nmo:Multipart_nmo:partBoundary_ID_ID" ON
         1804  +"nmo:Multipart_nmo:partBoundary" (ID, "nmo:partBoundary");
         1805  +CREATE UNIQUE INDEX
         1806  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder_ID_ID" ON
         1807  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessageFolder" (ID,
         1808  +"nmo:containsPhoneMessageFolder");
         1809  +CREATE UNIQUE INDEX
         1810  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessage_ID_ID" ON
         1811  +"nmo:PhoneMessageFolder_nmo:containsPhoneMessage" (ID,
         1812  +"nmo:containsPhoneMessage");
         1813  +CREATE UNIQUE INDEX "nmo:PhoneMessage_nmo:toVCard_ID_ID" ON
         1814  +"nmo:PhoneMessage_nmo:toVCard" (ID, "nmo:toVCard");
         1815  +CREATE UNIQUE INDEX "rdf:Property_rdfs:subPropertyOf_ID_ID" ON
         1816  +"rdf:Property_rdfs:subPropertyOf" (ID, "rdfs:subPropertyOf");
         1817  +CREATE UNIQUE INDEX "rdfs:Class_rdfs:subClassOf_ID_ID" ON
         1818  +"rdfs:Class_rdfs:subClassOf" (ID, "rdfs:subClassOf");
         1819  +CREATE UNIQUE INDEX "rdfs:Class_tracker:domainIndex_ID_ID" ON
         1820  +"rdfs:Class_tracker:domainIndex" (ID, "tracker:domainIndex");
         1821  +CREATE UNIQUE INDEX "rdfs:Resource_dc:contributor_ID_ID" ON
         1822  +"rdfs:Resource_dc:contributor" (ID, "dc:contributor");
         1823  +CREATE UNIQUE INDEX "rdfs:Resource_dc:date_ID_ID" ON
         1824  +"rdfs:Resource_dc:date" (ID, "dc:date");
         1825  +CREATE UNIQUE INDEX "rdfs:Resource_dc:relation_ID_ID" ON
         1826  +"rdfs:Resource_dc:relation" (ID, "dc:relation");
         1827  +CREATE UNIQUE INDEX "rdfs:Resource_dc:source_ID_ID" ON
         1828  +"rdfs:Resource_dc:source" (ID, "dc:source");
         1829  +CREATE UNIQUE INDEX "rdfs:Resource_nao:deprecated_ID_ID" ON
         1830  +"rdfs:Resource_nao:deprecated" (ID, "nao:deprecated");
         1831  +CREATE INDEX "rdfs:Resource_nao:hasTag_ID" ON "rdfs:Resource_nao:hasTag" (ID);
         1832  +CREATE UNIQUE INDEX "rdfs:Resource_nao:hasTag_ID_ID" ON
         1833  +"rdfs:Resource_nao:hasTag" ("nao:hasTag", ID);
         1834  +CREATE UNIQUE INDEX "rdfs:Resource_nao:isRelated_ID_ID" ON
         1835  +"rdfs:Resource_nao:isRelated" (ID, "nao:isRelated");
         1836  +CREATE UNIQUE INDEX "rdfs:Resource_rdf:type_ID_ID" ON
         1837  +"rdfs:Resource_rdf:type" (ID, "rdf:type");
         1838  +CREATE INDEX "rdfs:Resource_tracker:added" ON "rdfs:Resource" ("tracker:added");
         1839  +CREATE UNIQUE INDEX "scal:Attendee_scal:delegated-from_ID_ID" ON
         1840  +"scal:Attendee_scal:delegated-from" (ID, "scal:delegated-from");
         1841  +CREATE UNIQUE INDEX "scal:Attendee_scal:delegated-to_ID_ID" ON
         1842  +"scal:Attendee_scal:delegated-to" (ID, "scal:delegated-to");
         1843  +CREATE UNIQUE INDEX "scal:Attendee_scal:member_ID_ID" ON
         1844  +"scal:Attendee_scal:member" (ID, "scal:member");
         1845  +CREATE UNIQUE INDEX "scal:Attendee_scal:sent-by_ID_ID" ON
         1846  +"scal:Attendee_scal:sent-by" (ID, "scal:sent-by");
         1847  +CREATE UNIQUE INDEX "scal:CalendarAlarm_scal:alarmAttendee_ID_ID" ON
         1848  +"scal:CalendarAlarm_scal:alarmAttendee" (ID, "scal:alarmAttendee");
         1849  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:access_ID_ID" ON
         1850  +"scal:CalendarItem_scal:access" (ID, "scal:access");
         1851  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:attachment_ID_ID" ON
         1852  +"scal:CalendarItem_scal:attachment" (ID, "scal:attachment");
         1853  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:attendee_ID_ID" ON
         1854  +"scal:CalendarItem_scal:attendee" (ID, "scal:attendee");
         1855  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:belongsToCalendar_ID_ID"
         1856  +ON "scal:CalendarItem_scal:belongsToCalendar" (ID,
         1857  +"scal:belongsToCalendar");
         1858  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:contact_ID_ID" ON
         1859  +"scal:CalendarItem_scal:contact" (ID, "scal:contact");
         1860  +CREATE UNIQUE INDEX "scal:CalendarItem_scal:rrule_ID_ID" ON
         1861  +"scal:CalendarItem_scal:rrule" (ID, "scal:rrule");
         1862  +CREATE INDEX "slo:GeoLocation_slo:postalAddress" ON "slo:GeoLocation"
         1863  +("slo:postalAddress");
         1864  +CREATE UNIQUE INDEX "slo:Landmark_slo:belongsToCategory_ID_ID" ON
         1865  +"slo:Landmark_slo:belongsToCategory" (ID, "slo:belongsToCategory");
         1866  +CREATE UNIQUE INDEX "slo:Landmark_slo:hasContact_ID_ID" ON
         1867  +"slo:Landmark_slo:hasContact" (ID, "slo:hasContact");
         1868  +CREATE UNIQUE INDEX "slo:Route_slo:routeDetails_ID_ID" ON
         1869  +"slo:Route_slo:routeDetails" (ID, "slo:routeDetails");
         1870  +
         1871  +EXPLAIN SELECT "1_u", (SELECT "nco:fullname" FROM "nco:Contact" WHERE
         1872  +ID = "1_u") COLLATE NOCASE, (SELECT "nco:nameFamily" FROM
         1873  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1874  +"nco:nameGiven" FROM "nco:PersonContact" WHERE ID = "1_u")
         1875  +COLLATE NOCASE, (SELECT "nco:nameAdditional" FROM
         1876  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1877  +"nco:nameHonorificPrefix" FROM "nco:PersonContact" WHERE ID =
         1878  +"1_u") COLLATE NOCASE, (SELECT "nco:nameHonorificSuffix" FROM
         1879  +"nco:PersonContact" WHERE ID = "1_u") COLLATE NOCASE, (SELECT
         1880  +"nco:nickname" FROM "nco:Contact" WHERE ID = "1_u") COLLATE
         1881  +NOCASE, strftime("%s",(SELECT "nco:birthDate" FROM
         1882  +"nco:Contact" WHERE ID = "1_u")), (SELECT "nie:url" FROM
         1883  +"nie:DataObject" WHERE ID = (SELECT "nco:photo" FROM
         1884  +"nco:Contact" WHERE ID = "1_u")) COLLATE NOCASE, (SELECT
         1885  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||COALESCE((SELECT
         1886  +"nco:imProtocol" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1887  +NOCASE, ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1888  +"nco:imID" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1889  +NOCASE, ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1890  +"nco:imNickname" FROM "nco:IMAddress" WHERE ID = "3_u") COLLATE
         1891  +NOCASE, ? COLLATE NOCASE), '\n') FROM (SELECT
         1892  +"nco:PersonContact_nco:hasAffiliation2"."nco:hasAffiliation" AS
         1893  +"2_u", "nco:Role_nco:hasIMAddress3"."nco:hasIMAddress" AS
         1894  +"3_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1895  +"nco:PersonContact_nco:hasAffiliation2",
         1896  +"nco:Role_nco:hasIMAddress" AS "nco:Role_nco:hasIMAddress3" WHERE
         1897  +"1_u" = "nco:PersonContact_nco:hasAffiliation2"."ID" AND
         1898  +"nco:PersonContact_nco:hasAffiliation2"."nco:hasAffiliation" =
         1899  +"nco:Role_nco:hasIMAddress3"."ID")), (SELECT
         1900  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||(SELECT "nco:phoneNumber"
         1901  +FROM "nco:PhoneNumber" WHERE ID = "4_u") COLLATE NOCASE, '\n')
         1902  +FROM (SELECT "nco:PersonContact_nco:hasAffiliation4"."nco:hasAffiliation"
         1903  +AS "2_u", "nco:Role_nco:hasPhoneNumber5"."nco:hasPhoneNumber" AS
         1904  +"4_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1905  +"nco:PersonContact_nco:hasAffiliation4",
         1906  +"nco:Role_nco:hasPhoneNumber" AS "nco:Role_nco:hasPhoneNumber5"
         1907  +WHERE "1_u" = "nco:PersonContact_nco:hasAffiliation4"."ID" AND
         1908  +"nco:PersonContact_nco:hasAffiliation4"."nco:hasAffiliation" =
         1909  +"nco:Role_nco:hasPhoneNumber5"."ID")), (SELECT
         1910  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||(SELECT "nco:emailAddress"
         1911  +FROM "nco:EmailAddress" WHERE ID = "5_u") COLLATE NOCASE, ',')
         1912  +FROM (SELECT "nco:PersonContact_nco:hasAffiliation6"."nco:hasAffiliation"
         1913  +AS "2_u", "nco:Role_nco:hasEmailAddress7"."nco:hasEmailAddress"
         1914  +AS "5_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1915  +"nco:PersonContact_nco:hasAffiliation6",
         1916  +"nco:Role_nco:hasEmailAddress" AS "nco:Role_nco:hasEmailAddress7"
         1917  +WHERE "1_u" = "nco:PersonContact_nco:hasAffiliation6"."ID" AND
         1918  +"nco:PersonContact_nco:hasAffiliation6"."nco:hasAffiliation" =
         1919  +"nco:Role_nco:hasEmailAddress7"."ID")), (SELECT
         1920  +GROUP_CONCAT("2_u"||? COLLATE NOCASE||COALESCE((SELECT
         1921  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID =
         1922  +"nco:blogUrl"),',') FROM "nco:Role_nco:blogUrl" WHERE ID =
         1923  +"2_u"), ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1924  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID =
         1925  +"nco:websiteUrl"),',') FROM "nco:Role_nco:websiteUrl" WHERE ID =
         1926  +"2_u"), ? COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT
         1927  +GROUP_CONCAT((SELECT Uri FROM Resource WHERE ID = "nco:url"),',')
         1928  +FROM "nco:Role_nco:url" WHERE ID = "2_u"), ? COLLATE NOCASE),
         1929  +'\n') FROM (SELECT
         1930  +"nco:PersonContact_nco:hasAffiliation8"."nco:hasAffiliation" AS
         1931  +"2_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1932  +"nco:PersonContact_nco:hasAffiliation8" WHERE "1_u" =
         1933  +"nco:PersonContact_nco:hasAffiliation8"."ID")), (SELECT
         1934  +GROUP_CONCAT("6_u", ',') FROM (SELECT
         1935  +"rdfs:Resource_nao:hasTag9"."nao:hasTag" AS "6_u" FROM
         1936  +"rdfs:Resource_nao:hasTag" AS "rdfs:Resource_nao:hasTag9" WHERE
         1937  +"1_u" = "rdfs:Resource_nao:hasTag9"."ID")), (SELECT Uri FROM
         1938  +Resource WHERE ID = "1_u"), (SELECT GROUP_CONCAT("2_u"||? COLLATE
         1939  +NOCASE||COALESCE((SELECT "nco:role" FROM "nco:Affiliation" WHERE
         1940  +ID = "2_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1941  +NOCASE||COALESCE((SELECT "nco:department" FROM "nco:Affiliation"
         1942  +WHERE ID = "2_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1943  +NOCASE||COALESCE((SELECT GROUP_CONCAT("nco:title",',') FROM
         1944  +"nco:Affiliation_nco:title" WHERE ID = "2_u"), ? COLLATE NOCASE),
         1945  +'\n') FROM (SELECT
         1946  +"nco:PersonContact_nco:hasAffiliation10"."nco:hasAffiliation" AS
         1947  +"2_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1948  +"nco:PersonContact_nco:hasAffiliation10" WHERE "1_u" =
         1949  +"nco:PersonContact_nco:hasAffiliation10"."ID")), (SELECT
         1950  +GROUP_CONCAT("nco:note",',') FROM "nco:Contact_nco:note" WHERE ID
         1951  += "1_u"), (SELECT "nco:gender" FROM "nco:PersonContact" WHERE ID
         1952  += "1_u"), (SELECT GROUP_CONCAT("2_u"||? COLLATE
         1953  +NOCASE||COALESCE((SELECT "nco:pobox" FROM "nco:PostalAddress"
         1954  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1955  +NOCASE||COALESCE((SELECT "nco:district" FROM "nco:PostalAddress"
         1956  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1957  +NOCASE||COALESCE((SELECT "nco:county" FROM "nco:PostalAddress"
         1958  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1959  +NOCASE||COALESCE((SELECT "nco:locality" FROM "nco:PostalAddress"
         1960  +WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE NOCASE)||? COLLATE
         1961  +NOCASE||COALESCE((SELECT "nco:postalcode" FROM
         1962  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1963  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:streetAddress"
         1964  +FROM "nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ?
         1965  +COLLATE NOCASE)||? COLLATE NOCASE||COALESCE((SELECT Uri FROM
         1966  +Resource WHERE ID = (SELECT "nco:addressLocation" FROM
         1967  +"nco:PostalAddress" WHERE ID = "7_u")), ? COLLATE NOCASE)||?
         1968  +COLLATE NOCASE||COALESCE((SELECT "nco:extendedAddress" FROM
         1969  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1970  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:country" FROM
         1971  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1972  +NOCASE)||? COLLATE NOCASE||COALESCE((SELECT "nco:region" FROM
         1973  +"nco:PostalAddress" WHERE ID = "7_u") COLLATE NOCASE, ? COLLATE
         1974  +NOCASE), '\n') FROM (SELECT
         1975  +"nco:PersonContact_nco:hasAffiliation11"."nco:hasAffiliation" AS
         1976  +"2_u", "nco:Role_nco:hasPostalAddress12"."nco:hasPostalAddress"
         1977  +AS "7_u" FROM "nco:PersonContact_nco:hasAffiliation" AS
         1978  +"nco:PersonContact_nco:hasAffiliation11",
         1979  +"nco:Role_nco:hasPostalAddress" AS
         1980  +"nco:Role_nco:hasPostalAddress12" WHERE "1_u" =
         1981  +"nco:PersonContact_nco:hasAffiliation11"."ID" AND
         1982  +"nco:PersonContact_nco:hasAffiliation11"."nco:hasAffiliation" =
         1983  +"nco:Role_nco:hasPostalAddress12"."ID")), (SELECT
         1984  +GROUP_CONCAT("10_u" COLLATE NOCASE, ',') FROM (SELECT
         1985  +"nie:InformationElement_nao:hasProperty13"."nao:hasProperty" AS
         1986  +"8_u", "nao:Property14"."nao:propertyName" AS "9_u",
         1987  +"nao:Property14"."nao:propertyValue" AS "10_u" FROM
         1988  +"nie:InformationElement_nao:hasProperty" AS
         1989  +"nie:InformationElement_nao:hasProperty13", "nao:Property" AS
         1990  +"nao:Property14" WHERE "1_u" =
         1991  +"nie:InformationElement_nao:hasProperty13"."ID" AND
         1992  +"nie:InformationElement_nao:hasProperty13"."nao:hasProperty" =
         1993  +"nao:Property14"."ID" AND "9_u" IS NOT NULL AND "10_u" IS NOT
         1994  +NULL AND ("9_u" COLLATE NOCASE = ? COLLATE NOCASE))) FROM (SELECT
         1995  +"nco:PersonContact1"."ID" AS "1_u" FROM "nco:PersonContact" AS
         1996  +"nco:PersonContact1") ORDER BY "1_u";
         1997  +  }
         1998  +} {/.* Goto .*/}
         1999  +
         2000  +
         2001  +finish_test

Changes to test/permutations.test.

   181    181     fts3near.test fts3query.test fts3shared.test fts3snippet.test 
   182    182     fts3sort.test
   183    183     fts3fault.test fts3malloc.test fts3matchinfo.test
   184    184     fts3aux1.test fts3comp1.test fts3auto.test
   185    185     fts4aa.test fts4content.test
   186    186     fts3conf.test fts3prefix.test fts3fault2.test fts3corrupt.test
   187    187     fts3corrupt2.test fts3first.test fts4langid.test fts4merge.test
   188         -  fts4check.test
          188  +  fts4check.test fts4unicode.test
   189    189   }
   190    190   
   191    191   
   192    192   lappend ::testsuitelist xxx
   193    193   #-------------------------------------------------------------------------
   194    194   # Define the coverage related test suites:
   195    195   #

Changes to test/quota2.test.

   160    160   do_test quota2-2.1 {
   161    161     set ::h1 [sqlite3_quota_fopen quota2c/xyz.txt w+b]
   162    162     sqlite3_quota_fwrite $::h1 1 7000 $bigtext
   163    163   } {7000}
   164    164   do_test quota2-2.2 {
   165    165     set ::quota
   166    166   } {}
   167         -do_test quota2-2.3 {
          167  +do_test quota2-2.3.1 {
   168    168     sqlite3_quota_rewind $::h1
          169  +  sqlite3_quota_file_available $::h1
          170  +} {7000}
          171  +do_test quota2-2.3.2 {
   169    172     set ::x [sqlite3_quota_fread $::h1 1001 7]
   170    173     string length $::x
   171    174   } {6006}
          175  +do_test quota2-2.3.3 {
          176  +  sqlite3_quota_file_available $::h1
          177  +} {0}
   172    178   do_test quota2-2.4 {
   173    179     string match $::x [string range $::bigtext 0 6005]
   174    180   } {1}
   175    181   do_test quota2-2.5 {
   176    182     sqlite3_quota_fseek $::h1 0 SEEK_END
   177    183     sqlite3_quota_ftell $::h1
   178    184   } {7000}
   179    185   do_test quota2-2.6 {
   180    186     sqlite3_quota_fseek $::h1 -100 SEEK_END
   181    187     sqlite3_quota_ftell $::h1
   182    188   } {6900}
          189  +do_test quota2-2.6.1 {
          190  +  sqlite3_quota_file_available $::h1
          191  +} {100}
   183    192   do_test quota2-2.7 {
   184    193     sqlite3_quota_fseek $::h1 -100 SEEK_CUR
   185    194     sqlite3_quota_ftell $::h1
   186    195   } {6800}
          196  +do_test quota2-2.7.1 {
          197  +  sqlite3_quota_file_available $::h1
          198  +} {200}
   187    199   do_test quota2-2.8 {
   188    200     sqlite3_quota_fseek $::h1 50 SEEK_CUR
   189    201     sqlite3_quota_ftell $::h1
   190    202   } {6850}
          203  +do_test quota2-2.8.1 {
          204  +  sqlite3_quota_file_available $::h1
          205  +} {150}
   191    206   do_test quota2-2.9 {
   192    207     sqlite3_quota_fseek $::h1 50 SEEK_SET
   193    208     sqlite3_quota_ftell $::h1
   194    209   } {50}
          210  +do_test quota2-2.9.1 {
          211  +  sqlite3_quota_file_available $::h1
          212  +} {6950}
   195    213   do_test quota2-2.10 {
   196    214     sqlite3_quota_rewind $::h1
   197    215     sqlite3_quota_ftell $::h1
   198    216   } {0}
          217  +do_test quota2-2.10.1 {
          218  +  sqlite3_quota_file_available $::h1
          219  +} {7000}
          220  +do_test quota2-2.10.2 {
          221  +  sqlite3_quota_ferror $::h1
          222  +} {0}
   199    223   do_test quota2-2.11 {
   200    224     standard_path [sqlite3_quota_dump]
   201    225   } {{*/quota2b/* 5000 0} {*/quota2a/* 4000 0}}
   202    226   do_test quota2-2.12 {
   203    227     sqlite3_quota_fclose $::h1
   204    228     standard_path [sqlite3_quota_dump]
   205    229   } {{*/quota2b/* 5000 0} {*/quota2a/* 4000 0}}

Changes to test/shared.test.

  1052   1052   } {1 2 6 8 9 12 1 2 5 11 12 14 1 2 4}
  1053   1053   do_test shared-$av-15.2 {
  1054   1054     execsql { DROP TABLE t1 } db2
  1055   1055   } {}
  1056   1056   db close
  1057   1057   db2 close
  1058   1058   
  1059         -}
         1059  +# Shared cache on a :memory: database.  This only works for URI filenames.
         1060  +#
         1061  +do_test shared-$av-16.1 {
         1062  +  sqlite3 db1 file::memory: -uri 1
         1063  +  sqlite3 db2 file::memory: -uri 1
         1064  +  db1 eval {
         1065  +    CREATE TABLE t1(x); INSERT INTO t1 VALUES(1),(2),(3);
         1066  +  }
         1067  +  db2 eval {
         1068  +    SELECT x FROM t1 ORDER BY x;
         1069  +  }
         1070  +} {1 2 3}
         1071  +do_test shared-$av-16.2 {
         1072  +  db2 eval {
         1073  +    INSERT INTO t1 VALUES(99);
         1074  +    DELETE FROM t1 WHERE x=2;
         1075  +  }
         1076  +  db1 eval {
         1077  +    SELECT x FROM t1 ORDER BY x;
         1078  +  }
         1079  +} {1 3 99}
         1080  +
         1081  +# Verify that there is no cache sharing ordinary (non-URI) filenames are
         1082  +# used.
         1083  +#
         1084  +do_test shared-$av-16.3 {
         1085  +  db1 close
         1086  +  db2 close
         1087  +  sqlite3 db1 :memory:
         1088  +  sqlite3 db2 :memory:
         1089  +  db1 eval {
         1090  +    CREATE TABLE t1(x); INSERT INTO t1 VALUES(4),(5),(6);
         1091  +  }
         1092  +  catchsql {
         1093  +    SELECT * FROM t1;
         1094  +  } db2
         1095  +} {1 {no such table: t1}}
         1096  +
         1097  +# Shared cache on named memory databases.
         1098  +#
         1099  +do_test shared-$av-16.4 {
         1100  +  db1 close
         1101  +  db2 close
         1102  +  forcedelete test.db test.db-wal test.db-journal
         1103  +  sqlite3 db1 file:test.db?mode=memory -uri 1
         1104  +  sqlite3 db2 file:test.db?mode=memory -uri 1
         1105  +  db1 eval {
         1106  +    CREATE TABLE t1(x); INSERT INTO t1 VALUES(1),(2),(3);
         1107  +  }
         1108  +  db2 eval {
         1109  +    SELECT x FROM t1 ORDER BY x;
         1110  +  }
         1111  +} {1 2 3}
         1112  +do_test shared-$av-16.5 {
         1113  +  db2 eval {
         1114  +    INSERT INTO t1 VALUES(99);
         1115  +    DELETE FROM t1 WHERE x=2;
         1116  +  }
         1117  +  db1 eval {
         1118  +    SELECT x FROM t1 ORDER BY x;
         1119  +  }
         1120  +} {1 3 99}
         1121  +do_test shared-$av-16.6 {
         1122  +  file exists test.db
         1123  +} {0}  ;# Verify that the database is in-memory
         1124  +
         1125  +# Shared cache on named memory databases with different names.
         1126  +#
         1127  +do_test shared-$av-16.7 {
         1128  +  db1 close
         1129  +  db2 close
         1130  +  forcedelete test1.db test2.db
         1131  +  sqlite3 db1 file:test1.db?mode=memory -uri 1
         1132  +  sqlite3 db2 file:test2.db?mode=memory -uri 1
         1133  +  db1 eval {
         1134  +    CREATE TABLE t1(x); INSERT INTO t1 VALUES(1),(2),(3);
         1135  +  }
         1136  +  catchsql {
         1137  +    SELECT x FROM t1 ORDER BY x;
         1138  +  } db2
         1139  +} {1 {no such table: t1}}
         1140  +do_test shared-$av-16.8 {
         1141  +  file exists test1.db
         1142  +} {0}  ;# Verify that the database is in-memory
         1143  +
         1144  +
         1145  +db1 close
         1146  +db2 close
         1147  +
         1148  +}  ;# end of autovacuum on/off loop
  1060   1149   
  1061   1150   sqlite3_enable_shared_cache $::enable_shared_cache
  1062   1151   finish_test

Changes to test/shell1.test.

   170    170     list $rc \
   171    171          [regexp {Error: missing argument for option: -nullvalue} $res]
   172    172   } {1 1}
   173    173   
   174    174   # -version             show SQLite version
   175    175   do_test shell1-1.16.1 {
   176    176     set x [catchcmd "-version test.db" ""]
   177         -  regexp {0 \{3.\d.\d+ 20\d\d-[01]\d-\d\d \d\d:\d\d:\d\d [0-9a-f]+\}} $x 
   178         -} 1
          177  +} {/3.[0-9.]+ 20\d\d-[01]\d-\d\d \d\d:\d\d:\d\d [0-9a-f]+/}
   179    178   
   180    179   #----------------------------------------------------------------------------
   181    180   # Test cases shell1-2.*: Basic "dot" command token parsing.
   182    181   #
   183    182   
   184    183   # check first token handling
   185    184   do_test shell1-2.1.1 {
................................................................................
   280    279     # too many arguments
   281    280     catchcmd "test.db" ".bail OFF BAD"
   282    281   } {1 {Error: unknown command or invalid arguments:  "bail". Enter ".help" for help}}
   283    282   
   284    283   # .databases             List names and files of attached databases
   285    284   do_test shell1-3.3.1 {
   286    285     catchcmd "-csv test.db" ".databases"
   287         -} {/0 +.*main +.*test.db.*/}
          286  +} "/0 +.*main +[string map {/ .} [string range [pwd] 0 10]].*/"
   288    287   do_test shell1-3.3.2 {
   289    288     # too many arguments
   290    289     catchcmd "test.db" ".databases BAD"
   291    290   } {1 {Error: unknown command or invalid arguments:  "databases". Enter ".help" for help}}
   292    291   
   293    292   # .dump ?TABLE? ...      Dump the database in an SQL text format
   294    293   #                          If TABLE specified, only dump tables matching
................................................................................
   574    573     catchcmd "test.db" ".schema FOO"
   575    574   } {0 {}}
   576    575   do_test shell1-3.21.3 {
   577    576     # too many arguments
   578    577     catchcmd "test.db" ".schema FOO BAD"
   579    578   } {1 {Error: unknown command or invalid arguments:  "schema". Enter ".help" for help}}
   580    579   
          580  +do_test shell1-3.21.4 {
          581  +  catchcmd "test.db" {
          582  +     CREATE TABLE t1(x);
          583  +     CREATE VIEW v2 AS SELECT x+1 AS y FROM t1;
          584  +     CREATE VIEW v1 AS SELECT y+1 FROM v2;
          585  +  }
          586  +  catchcmd "test.db" ".schema"
          587  +} {0 {CREATE TABLE t1(x);
          588  +CREATE VIEW v2 AS SELECT x+1 AS y FROM t1;
          589  +CREATE VIEW v1 AS SELECT y+1 FROM v2;}}
          590  +db eval {DROP VIEW v1; DROP VIEW v2; DROP TABLE t1;}
          591  +
   581    592   # .separator STRING      Change separator used by output mode and .import
   582    593   do_test shell1-3.22.1 {
   583    594     catchcmd "test.db" ".separator"
   584    595   } {1 {Error: unknown command or invalid arguments:  "separator". Enter ".help" for help}}
   585    596   do_test shell1-3.22.2 {
   586    597     catchcmd "test.db" ".separator FOO"
   587    598   } {0 {}}

Changes to test/subquery.test.

   372    372                     GROUP BY c.x
   373    373                    HAVING avg(a.y) > avg(c.y))
   374    374         FROM t34 AS a
   375    375        GROUP BY a.x
   376    376        ORDER BY a.x;
   377    377     }
   378    378   } {106 4.5 0 1 107 4.0 1 0}
          379  +
          380  +do_test subquery-3.5.1 {
          381  +  execsql {
          382  +    CREATE TABLE t35a(x); INSERT INTO t35a VALUES(1),(2),(3);
          383  +    CREATE TABLE t35b(y); INSERT INTO t35b VALUES(98), (99);
          384  +    SELECT max((SELECT avg(y) FROM t35b)) FROM t35a;
          385  +  }
          386  +} {98.5}
          387  +do_test subquery-3.5.2 {
          388  +  execsql {
          389  +    SELECT max((SELECT count(y) FROM t35b)) FROM t35a;
          390  +  }
          391  +} {2}
          392  +do_test subquery-3.5.3 {
          393  +  execsql {
          394  +    SELECT max((SELECT count() FROM t35b)) FROM t35a;
          395  +  }
          396  +} {2}
          397  +do_test subquery-3.5.4 {
          398  +  catchsql {
          399  +    SELECT max((SELECT count(x) FROM t35b)) FROM t35a;
          400  +  }
          401  +} {1 {misuse of aggregate: count()}}
          402  +do_test subquery-3.5.5 {
          403  +  catchsql {
          404  +    SELECT max((SELECT count(x) FROM t35b)) FROM t35a;
          405  +  }
          406  +} {1 {misuse of aggregate: count()}}
          407  +do_test subquery-3.5.6 {
          408  +  catchsql {
          409  +    SELECT max((SELECT a FROM (SELECT count(x) AS a FROM t35b))) FROM t35a;
          410  +  }
          411  +} {1 {misuse of aggregate: count()}}
          412  +do_test subquery-3.5.7 {
          413  +  execsql {
          414  +    SELECT max((SELECT a FROM (SELECT count(y) AS a FROM t35b))) FROM t35a;
          415  +  }
          416  +} {2}
   379    417   
   380    418   
   381    419   #------------------------------------------------------------------
   382    420   # These tests - subquery-4.* - use the TCL statement cache to try 
   383    421   # and expose bugs to do with re-using statements that have been 
   384    422   # passed to sqlite3_reset().
   385    423   #

Changes to tool/mksqlite3c.tcl.

   312    312      fts3_expr.c
   313    313      fts3_hash.c
   314    314      fts3_porter.c
   315    315      fts3_tokenizer.c
   316    316      fts3_tokenizer1.c
   317    317      fts3_write.c
   318    318      fts3_snippet.c
          319  +   fts3_unicode.c
          320  +   fts3_unicode2.c
   319    321   
   320    322      rtree.c
   321    323      icu.c
   322    324      fts3_icu.c
   323    325   } {
   324    326     copy_file tsrc/$file
   325    327   }
   326    328   
   327    329   close $out