/ Check-in [98cc2659]
Login

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

Overview
Comment:Update this branch with latest trunk changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | window-functions
Files: files | file ages | folders
SHA3-256: 98cc26598718e5557ee00aa77336024c91e483ec6de650e172ad1b44a6f0a77b
User & Date: dan 2019-03-19 11:17:28
Wiki:window-functions
Context
2019-03-19
11:56
Revert the OP_MustBeInt opcode implementation on this branch so that it again matches trunk. The extra functionality is no longer required. check-in: c02f77b1 user: dan tags: window-functions
11:17
Update this branch with latest trunk changes. check-in: 98cc2659 user: dan tags: window-functions
09:57
Add a LICENSE.md, containing the text of the blessing. check-in: cbb7e602 user: drh tags: trunk
06:40
Ensure that all the new window-function keywords can still be used as SQL identifiers. check-in: a6d61dfd user: dan tags: window-functions
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added LICENSE.md.

            1  +The author disclaims copyright to this source code.  In place of
            2  +a legal notice, here is a blessing:
            3  +
            4  +  *   May you do good and not evil.
            5  +  *   May you find forgiveness for yourself and forgive others.
            6  +  *   May you share freely, never taking more than you give.

Changes to README.md.

     1      1   <h1 align="center">SQLite Source Repository</h1>
     2      2   
     3      3   This repository contains the complete source code for the 
     4      4   [SQLite database engine](https://sqlite.org/).  Some test scripts 
     5      5   are also included.  However, many other test scripts
     6      6   and most of the documentation are managed separately.
     7      7   
     8         -SQLite [does not use Git](https://sqlite.org/whynotgit.html).
     9         -If you are reading this on GitHub, then you are looking at an
    10         -unofficial mirror. See <https://sqlite.org/src> for the official
    11         -repository.
    12         -
    13         -## Obtaining The Code
            8  +## Version Control
    14      9   
    15     10   SQLite sources are managed using the
    16     11   [Fossil](https://www.fossil-scm.org/), a distributed version control system
    17         -that was specifically designed to support SQLite development.
           12  +that was specifically designed and written to support SQLite development.
           13  +The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext.
           14  +
           15  +If you are reading this on GitHub or some other Git repository or service,
           16  +then you are looking at a mirror.  The names of check-ins and
           17  +other artifacts in a Git mirror are different from the official
           18  +names for those objects.  The offical names for check-ins are
           19  +found in a footer on the check-in comment for authorized mirrors.
           20  +The official check-in name can also be seen in the `manifest.uuid` file
           21  +in the root of the tree.  Always use the official name, not  the
           22  +Git-name, when communicating about an SQLite check-in.
           23  +
           24  +If you pulled your SQLite source code from a secondary source and want to
           25  +verify its integrity, there are hints on how to do that in the
           26  +[Verifying Code Authenticity](#vauth) section below.
           27  +
           28  +## Obtaining The Code
           29  +
    18     30   If you do not want to use Fossil, you can download tarballs or ZIP
    19     31   archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
    20     32   
    21     33     *  Lastest trunk check-in as
    22     34        [Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz),
    23     35        [ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip), or
    24     36        [SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar).
................................................................................
   290    302   
   291    303     *  **ext/misc/json1.c** - This file implements the various JSON functions
   292    304        that are build into SQLite.
   293    305   
   294    306   There are many other source files.  Each has a succinct header comment that
   295    307   describes its purpose and role within the larger system.
   296    308   
          309  +<a name="vauth"></a>
          310  +## Verifying Code Authenticity
          311  +
          312  +If you obtained an SQLite source tree from a secondary source, such as a
          313  +GitHub mirror, and you want to verify that it has not been altered, there
          314  +are a couple of ways to do that.
          315  +
          316  +If you have an official release version of SQLite, and you are using the
          317  +`sqlite3.c` amalgamation, then SHA3-256 hashes for the amalgamation are
          318  +available in the [change log](https://www.sqlite.org/changes.html) on
          319  +the official website.  After building the `sqlite3.c` file, you can check
          320  +that is authentic by comparing the hash.  This does not ensure that the
          321  +test scripts are unaltered, but it does validate the deliverable part of
          322  +the code and only involves computing and comparing a single hash.
          323  +
          324  +For versions other than an official release, or if you are building the
          325  +`sqlite3.c` amalgamation using non-standard build options, the verification
          326  +process is a little more involved.  The `manifest` file at the root directory
          327  +of the source tree ([example](https://sqlite.org/src/artifact/bd49a8271d650fa8))
          328  +contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for 
          329  +older files) for every source file in the repository.  You can write a script
          330  +to extracts hashes from `manifest` and verifies the hashes against the 
          331  +corresponding files in the source tree.  The SHA3-256 hash of the `manifest`
          332  +file itself is the official name of the version of the source tree that you
          333  +have.  The `manifest.uuid` file should contain the SHA3-256 hash of the
          334  +`manifest` file.  If all of the above hash comparisons are correct, then
          335  +you can be confident that your source tree is authentic and unadulterated.
   297    336   
   298    337   ## Contacts
   299    338   
   300    339   The main SQLite webpage is [http://www.sqlite.org/](http://www.sqlite.org/)
   301    340   with geographically distributed backups at
   302    341   [http://www2.sqlite.org/](http://www2.sqlite.org) and
   303    342   [http://www3.sqlite.org/](http://www3.sqlite.org).

Changes to ext/fts5/fts5Int.h.

   579    579   /*
   580    580   ** Empty (but do not delete) a hash table.
   581    581   */
   582    582   void sqlite3Fts5HashClear(Fts5Hash*);
   583    583   
   584    584   int sqlite3Fts5HashQuery(
   585    585     Fts5Hash*,                      /* Hash table to query */
          586  +  int nPre,
   586    587     const char *pTerm, int nTerm,   /* Query term */
   587         -  const u8 **ppDoclist,           /* OUT: Pointer to doclist for pTerm */
          588  +  void **ppObj,                   /* OUT: Pointer to doclist for pTerm */
   588    589     int *pnDoclist                  /* OUT: Size of doclist in bytes */
   589    590   );
   590    591   
   591    592   int sqlite3Fts5HashScanInit(
   592    593     Fts5Hash*,                      /* Hash table to query */
   593    594     const char *pTerm, int nTerm    /* Query prefix */
   594    595   );

Changes to ext/fts5/fts5_hash.c.

   183    183   
   184    184     sqlite3_free(apOld);
   185    185     pHash->nSlot = nNew;
   186    186     pHash->aSlot = apNew;
   187    187     return SQLITE_OK;
   188    188   }
   189    189   
   190         -static void fts5HashAddPoslistSize(Fts5Hash *pHash, Fts5HashEntry *p){
          190  +static int fts5HashAddPoslistSize(
          191  +  Fts5Hash *pHash, 
          192  +  Fts5HashEntry *p,
          193  +  Fts5HashEntry *p2
          194  +){
          195  +  int nRet = 0;
   191    196     if( p->iSzPoslist ){
   192         -    u8 *pPtr = (u8*)p;
          197  +    u8 *pPtr = p2 ? (u8*)p2 : (u8*)p;
          198  +    int nData = p->nData;
   193    199       if( pHash->eDetail==FTS5_DETAIL_NONE ){
   194         -      assert( p->nData==p->iSzPoslist );
          200  +      assert( nData==p->iSzPoslist );
   195    201         if( p->bDel ){
   196         -        pPtr[p->nData++] = 0x00;
          202  +        pPtr[nData++] = 0x00;
   197    203           if( p->bContent ){
   198         -          pPtr[p->nData++] = 0x00;
          204  +          pPtr[nData++] = 0x00;
   199    205           }
   200    206         }
   201    207       }else{
   202         -      int nSz = (p->nData - p->iSzPoslist - 1);       /* Size in bytes */
          208  +      int nSz = (nData - p->iSzPoslist - 1);       /* Size in bytes */
   203    209         int nPos = nSz*2 + p->bDel;                     /* Value of nPos field */
   204    210   
   205    211         assert( p->bDel==0 || p->bDel==1 );
   206    212         if( nPos<=127 ){
   207    213           pPtr[p->iSzPoslist] = (u8)nPos;
   208    214         }else{
   209    215           int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
   210    216           memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz);
   211    217           sqlite3Fts5PutVarint(&pPtr[p->iSzPoslist], nPos);
   212         -        p->nData += (nByte-1);
          218  +        nData += (nByte-1);
   213    219         }
   214    220       }
   215    221   
   216         -    p->iSzPoslist = 0;
   217         -    p->bDel = 0;
   218         -    p->bContent = 0;
          222  +    nRet = nData - p->nData;
          223  +    if( p2==0 ){
          224  +      p->iSzPoslist = 0;
          225  +      p->bDel = 0;
          226  +      p->bContent = 0;
          227  +      p->nData = nData;
          228  +    }
   219    229     }
          230  +  return nRet;
   220    231   }
   221    232   
   222    233   /*
   223    234   ** Add an entry to the in-memory hash table. The key is the concatenation
   224    235   ** of bByte and (pToken/nToken). The value is (iRowid/iCol/iPos).
   225    236   **
   226    237   **     (bByte || pToken) -> (iRowid,iCol,iPos)
................................................................................
   324    335     assert( (p->nAlloc - p->nData) >= (9 + 4 + 1 + 3 + 5) );
   325    336   
   326    337     pPtr = (u8*)p;
   327    338   
   328    339     /* If this is a new rowid, append the 4-byte size field for the previous
   329    340     ** entry, and the new rowid for this entry.  */
   330    341     if( iRowid!=p->iRowid ){
   331         -    fts5HashAddPoslistSize(pHash, p);
          342  +    fts5HashAddPoslistSize(pHash, p, 0);
   332    343       p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iRowid - p->iRowid);
   333    344       p->iRowid = iRowid;
   334    345       bNew = 1;
   335    346       p->iSzPoslist = p->nData;
   336    347       if( pHash->eDetail!=FTS5_DETAIL_NONE ){
   337    348         p->nData += 1;
   338    349         p->iCol = (pHash->eDetail==FTS5_DETAIL_FULL ? 0 : -1);
................................................................................
   441    452     ap = sqlite3_malloc64(sizeof(Fts5HashEntry*) * nMergeSlot);
   442    453     if( !ap ) return SQLITE_NOMEM;
   443    454     memset(ap, 0, sizeof(Fts5HashEntry*) * nMergeSlot);
   444    455   
   445    456     for(iSlot=0; iSlot<pHash->nSlot; iSlot++){
   446    457       Fts5HashEntry *pIter;
   447    458       for(pIter=pHash->aSlot[iSlot]; pIter; pIter=pIter->pHashNext){
   448         -      if( pTerm==0 || 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm) ){
          459  +      if( pTerm==0 
          460  +       || (pIter->nKey+1>=nTerm && 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm))
          461  +      ){
   449    462           Fts5HashEntry *pEntry = pIter;
   450    463           pEntry->pScanNext = 0;
   451    464           for(i=0; ap[i]; i++){
   452    465             pEntry = fts5HashEntryMerge(pEntry, ap[i]);
   453    466             ap[i] = 0;
   454    467           }
   455    468           ap[i] = pEntry;
................................................................................
   469    482   }
   470    483   
   471    484   /*
   472    485   ** Query the hash table for a doclist associated with term pTerm/nTerm.
   473    486   */
   474    487   int sqlite3Fts5HashQuery(
   475    488     Fts5Hash *pHash,                /* Hash table to query */
          489  +  int nPre,
   476    490     const char *pTerm, int nTerm,   /* Query term */
   477         -  const u8 **ppDoclist,           /* OUT: Pointer to doclist for pTerm */
          491  +  void **ppOut,                   /* OUT: Pointer to new object */
   478    492     int *pnDoclist                  /* OUT: Size of doclist in bytes */
   479    493   ){
   480    494     unsigned int iHash = fts5HashKey(pHash->nSlot, (const u8*)pTerm, nTerm);
   481    495     char *zKey = 0;
   482    496     Fts5HashEntry *p;
   483    497   
   484    498     for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){
   485    499       zKey = fts5EntryKey(p);
   486    500       assert( p->nKey+1==(int)strlen(zKey) );
   487    501       if( nTerm==p->nKey+1 && memcmp(zKey, pTerm, nTerm)==0 ) break;
   488    502     }
   489    503   
   490    504     if( p ){
   491         -    fts5HashAddPoslistSize(pHash, p);
   492         -    *ppDoclist = (const u8*)&zKey[nTerm+1];
   493         -    *pnDoclist = p->nData - (sizeof(Fts5HashEntry) + nTerm + 1);
          505  +    int nHashPre = sizeof(Fts5HashEntry) + nTerm + 1;
          506  +    int nList = p->nData - nHashPre;
          507  +    u8 *pRet = (u8*)(*ppOut = sqlite3_malloc64(nPre + nList + 10));
          508  +    if( pRet ){
          509  +      Fts5HashEntry *pFaux = (Fts5HashEntry*)&pRet[nPre-nHashPre];
          510  +      memcpy(&pRet[nPre], &((u8*)p)[nHashPre], nList);
          511  +      nList += fts5HashAddPoslistSize(pHash, p, pFaux);
          512  +      *pnDoclist = nList;
          513  +    }else{
          514  +      *pnDoclist = 0;
          515  +      return SQLITE_NOMEM;
          516  +    }
   494    517     }else{
   495         -    *ppDoclist = 0;
          518  +    *ppOut = 0;
   496    519       *pnDoclist = 0;
   497    520     }
   498    521   
   499    522     return SQLITE_OK;
   500    523   }
   501    524   
   502    525   int sqlite3Fts5HashScanInit(
................................................................................
   521    544     const u8 **ppDoclist,           /* OUT: pointer to doclist */
   522    545     int *pnDoclist                  /* OUT: size of doclist in bytes */
   523    546   ){
   524    547     Fts5HashEntry *p;
   525    548     if( (p = pHash->pScan) ){
   526    549       char *zKey = fts5EntryKey(p);
   527    550       int nTerm = (int)strlen(zKey);
   528         -    fts5HashAddPoslistSize(pHash, p);
          551  +    fts5HashAddPoslistSize(pHash, p, 0);
   529    552       *pzTerm = zKey;
   530    553       *ppDoclist = (const u8*)&zKey[nTerm+1];
   531    554       *pnDoclist = p->nData - (sizeof(Fts5HashEntry) + nTerm + 1);
   532    555     }else{
   533    556       *pzTerm = 0;
   534    557       *ppDoclist = 0;
   535    558       *pnDoclist = 0;
   536    559     }
   537    560   }

Changes to ext/fts5/fts5_index.c.

  2453   2453   */
  2454   2454   static void fts5SegIterHashInit(
  2455   2455     Fts5Index *p,                   /* FTS5 backend */
  2456   2456     const u8 *pTerm, int nTerm,     /* Term to seek to */
  2457   2457     int flags,                      /* Mask of FTS5INDEX_XXX flags */
  2458   2458     Fts5SegIter *pIter              /* Object to populate */
  2459   2459   ){
  2460         -  const u8 *pList = 0;
  2461   2460     int nList = 0;
  2462   2461     const u8 *z = 0;
  2463   2462     int n = 0;
         2463  +  Fts5Data *pLeaf = 0;
  2464   2464   
  2465   2465     assert( p->pHash );
  2466   2466     assert( p->rc==SQLITE_OK );
  2467   2467   
  2468   2468     if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
         2469  +    const u8 *pList = 0;
         2470  +
  2469   2471       p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
  2470   2472       sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
  2471   2473       n = (z ? (int)strlen((const char*)z) : 0);
         2474  +    if( pList ){
         2475  +      pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));
         2476  +      if( pLeaf ){
         2477  +        pLeaf->p = pList;
         2478  +      }
         2479  +    }
  2472   2480     }else{
  2473         -    pIter->flags |= FTS5_SEGITER_ONETERM;
  2474         -    sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
         2481  +    p->rc = sqlite3Fts5HashQuery(p->pHash, sizeof(Fts5Data), 
         2482  +        (const char*)pTerm, nTerm, (void**)&pLeaf, &nList
         2483  +    );
         2484  +    if( pLeaf ){
         2485  +      pLeaf->p = (u8*)&pLeaf[1];
         2486  +    }
  2475   2487       z = pTerm;
  2476   2488       n = nTerm;
         2489  +    pIter->flags |= FTS5_SEGITER_ONETERM;
  2477   2490     }
  2478   2491   
  2479         -  if( pList ){
  2480         -    Fts5Data *pLeaf;
         2492  +  if( pLeaf ){
  2481   2493       sqlite3Fts5BufferSet(&p->rc, &pIter->term, n, z);
  2482         -    pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));
  2483         -    if( pLeaf==0 ) return;
  2484         -    pLeaf->p = (u8*)pList;
  2485   2494       pLeaf->nn = pLeaf->szLeaf = nList;
  2486   2495       pIter->pLeaf = pLeaf;
  2487   2496       pIter->iLeafOffset = fts5GetVarint(pLeaf->p, (u64*)&pIter->iRowid);
  2488   2497       pIter->iEndofDoclist = pLeaf->nn;
  2489   2498   
  2490   2499       if( flags & FTS5INDEX_QUERY_DESC ){
  2491   2500         pIter->flags |= FTS5_SEGITER_REVERSE;

Changes to ext/fts5/test/fts5aa.test.

   423    423     INSERT INTO n1 VALUES('a b c d');
   424    424   }
   425    425   
   426    426   proc funk {} {
   427    427     db eval { UPDATE n1_config SET v=50 WHERE k='version' }
   428    428     set fd [db incrblob main n1_data block 10]
   429    429     fconfigure $fd -encoding binary -translation binary
   430         -  puts -nonewline $fd "\x44\x45"
          430  +#  puts -nonewline $fd "\x44\x45"
   431    431     close $fd
   432    432   }
   433    433   db func funk funk
   434    434   
   435    435   # This test case corrupts the structure record within the first invocation
   436    436   # of function funk(). Which used to cause the bm25() function to throw an
   437    437   # exception. But since bm25() can now used the cached structure record,
................................................................................
   598    598   }
   599    599   do_execsql_test 23.1 {
   600    600     SELECT * FROM t11, t10 WHERE t11.x = t10.x AND t10.rowid IS NULL;
   601    601   }
   602    602   do_execsql_test 23.2 {
   603    603     SELECT * FROM t11, t10 WHERE t10.rowid IS NULL;
   604    604   }
          605  +
          606  +#-------------------------------------------------------------------------
          607  +do_execsql_test 24.0 {
          608  +  CREATE VIRTUAL TABLE t12 USING fts5(x, detail=%DETAIL%);
          609  +  INSERT INTO t12 VALUES('aaaa');
          610  +}
          611  +do_execsql_test 24.1 {
          612  +  BEGIN;
          613  +    DELETE FROM t12 WHERE rowid=1;
          614  +    SELECT * FROM t12('aaaa');
          615  +    INSERT INTO t12 VALUES('aaaa');
          616  +  END;
          617  +}
          618  +do_execsql_test 24.2 {
          619  +  INSERT INTO t12(t12) VALUES('integrity-check');
          620  +}
          621  +do_execsql_test 24.3 {
          622  +    SELECT * FROM t12('aaaa');
          623  +} {aaaa}
          624  +
          625  +#-------------------------------------------------------------------------
          626  +do_execsql_test 25.0 {
          627  +  CREATE VIRTUAL TABLE t13 USING fts5(x, detail=%DETAIL%);
          628  +}
          629  +do_execsql_test 25.1 {
          630  +  BEGIN;
          631  +  INSERT INTO t13 VALUES('AAAA');
          632  +SELECT * FROM t13('BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB*');
          633  +
          634  +  END;
          635  +}
          636  +
   605    637   
   606    638   }
   607    639   
   608    640   expand_all_sql db
   609    641   finish_test

Changes to src/alter.c.

   162    162       pVTab = sqlite3GetVTable(db, pTab);
   163    163       if( pVTab->pVtab->pModule->xRename==0 ){
   164    164         pVTab = 0;
   165    165       }
   166    166     }
   167    167   #endif
   168    168   
   169         -  /* Begin a transaction for database iDb. 
   170         -  ** Then modify the schema cookie (since the ALTER TABLE modifies the
   171         -  ** schema). Open a statement transaction if the table is a virtual
   172         -  ** table.
   173         -  */
          169  +  /* Begin a transaction for database iDb. Then modify the schema cookie
          170  +  ** (since the ALTER TABLE modifies the schema). Call sqlite3MayAbort(),
          171  +  ** as the scalar functions (e.g. sqlite_rename_table()) invoked by the 
          172  +  ** nested SQL may raise an exception.  */
   174    173     v = sqlite3GetVdbe(pParse);
   175    174     if( v==0 ){
   176    175       goto exit_rename_table;
   177    176     }
          177  +  sqlite3MayAbort(pParse);
   178    178   
   179    179     /* figure out how many UTF-8 characters are in zName */
   180    180     zTabName = pTab->zName;
   181    181     nTabName = sqlite3Utf8CharLen(zTabName, -1);
   182    182   
   183    183     /* Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in
   184    184     ** the schema to use the new table name.  */
................................................................................
   239    239     ** SQLite tables) that are identified by the name of the virtual table.
   240    240     */
   241    241   #ifndef SQLITE_OMIT_VIRTUALTABLE
   242    242     if( pVTab ){
   243    243       int i = ++pParse->nMem;
   244    244       sqlite3VdbeLoadString(v, i, zName);
   245    245       sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
   246         -    sqlite3MayAbort(pParse);
   247    246     }
   248    247   #endif
   249    248   
   250    249     renameReloadSchema(pParse, iDb);
   251    250     renameTestSchema(pParse, zDb, iDb==1);
   252    251   
   253    252   exit_rename_table:
................................................................................
   560    559       goto exit_rename_column;
   561    560     }
   562    561   
   563    562     /* Do the rename operation using a recursive UPDATE statement that
   564    563     ** uses the sqlite_rename_column() SQL function to compute the new
   565    564     ** CREATE statement text for the sqlite_master table.
   566    565     */
          566  +  sqlite3MayAbort(pParse);
   567    567     zNew = sqlite3NameFromToken(db, pNew);
   568    568     if( !zNew ) goto exit_rename_column;
   569    569     assert( pNew->n>0 );
   570    570     bQuote = sqlite3Isquote(pNew->z[0]);
   571    571     sqlite3NestedParse(pParse, 
   572    572         "UPDATE \"%w\".%s SET "
   573    573         "sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) "

Changes to src/os_unix.c.

  7818   7818     ** array cannot be const.
  7819   7819     */
  7820   7820     static sqlite3_vfs aVfs[] = {
  7821   7821   #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
  7822   7822       UNIXVFS("unix",          autolockIoFinder ),
  7823   7823   #elif OS_VXWORKS
  7824   7824       UNIXVFS("unix",          vxworksIoFinder ),
  7825         -#elif __Fuchsia__
  7826         -    /* We are told that Fuchsia only supports dot-file locking */
  7827         -    UNIXVFS("unix",          dotlockIoFinder ),
  7828   7825   #else
  7829   7826       UNIXVFS("unix",          posixIoFinder ),
  7830   7827   #endif
  7831   7828       UNIXVFS("unix-none",     nolockIoFinder ),
  7832   7829       UNIXVFS("unix-dotfile",  dotlockIoFinder ),
  7833   7830       UNIXVFS("unix-excl",     posixIoFinder ),
  7834   7831   #if OS_VXWORKS

Changes to src/sqlite.h.in.

  4041   4041   ** the value of the fourth parameter then the resulting string value will
  4042   4042   ** contain embedded NULs.  The result of expressions involving strings
  4043   4043   ** with embedded NULs is undefined.
  4044   4044   **
  4045   4045   ** ^The fifth argument to the BLOB and string binding interfaces
  4046   4046   ** is a destructor used to dispose of the BLOB or
  4047   4047   ** string after SQLite has finished with it.  ^The destructor is called
  4048         -** to dispose of the BLOB or string even if the call to bind API fails.
         4048  +** to dispose of the BLOB or string even if the call to the bind API fails,
         4049  +** except the destructor is not called if the third parameter is a NULL
         4050  +** pointer or the fourth parameter is negative.
  4049   4051   ** ^If the fifth argument is
  4050   4052   ** the special value [SQLITE_STATIC], then SQLite assumes that the
  4051   4053   ** information is in static, unmanaged space and does not need to be freed.
  4052   4054   ** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
  4053   4055   ** SQLite makes its own private copy of the data immediately, before
  4054   4056   ** the sqlite3_bind_*() routine returns.
  4055   4057   **
................................................................................
  5799   5801   ** CAPI3REF: Return The Filename For A Database Connection
  5800   5802   ** METHOD: sqlite3
  5801   5803   **
  5802   5804   ** ^The sqlite3_db_filename(D,N) interface returns a pointer to a filename
  5803   5805   ** associated with database N of connection D.  ^The main database file
  5804   5806   ** has the name "main".  If there is no attached database N on the database
  5805   5807   ** connection D, or if database N is a temporary or in-memory database, then
  5806         -** a NULL pointer is returned.
         5808  +** this function will return either a NULL pointer or an empty string.
  5807   5809   **
  5808   5810   ** ^The filename returned by this function is the output of the
  5809   5811   ** xFullPathname method of the [VFS].  ^In other words, the filename
  5810   5812   ** will be an absolute pathname, even if the filename used
  5811   5813   ** to open the database originally was a URI or relative pathname.
  5812   5814   */
  5813   5815   const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);

Changes to src/vdbeaux.c.

   633    633     memset(&sIter, 0, sizeof(sIter));
   634    634     sIter.v = v;
   635    635   
   636    636     while( (pOp = opIterNext(&sIter))!=0 ){
   637    637       int opcode = pOp->opcode;
   638    638       if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename 
   639    639        || opcode==OP_VDestroy
          640  +     || (opcode==OP_Function0 && pOp->p4.pFunc->funcFlags&SQLITE_FUNC_INTERNAL)
   640    641        || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
   641    642         && ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
   642    643       ){
   643    644         hasAbort = 1;
   644    645         break;
   645    646       }
   646    647       if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;

Changes to src/wherecode.c.

  1156   1156       sqlite3WalkExpr(&w, pWInfo->pWhere);
  1157   1157       sqlite3WalkExprList(&w, pWInfo->pOrderBy);
  1158   1158       sqlite3WalkExprList(&w, pWInfo->pResultSet);
  1159   1159     }
  1160   1160   }
  1161   1161   
  1162   1162   /*
  1163         -** The pTruth expression is always tree because it is the WHERE clause
         1163  +** The pTruth expression is always true because it is the WHERE clause
  1164   1164   ** a partial index that is driving a query loop.  Look through all of the
  1165   1165   ** WHERE clause terms on the query, and if any of those terms must be
  1166   1166   ** true because pTruth is true, then mark those WHERE clause terms as
  1167   1167   ** coded.
  1168   1168   */
  1169   1169   static void whereApplyPartialIndexConstraints(
  1170   1170     Expr *pTruth,

Changes to test/altertab3.test.

    77     77     ALTER TABLE t1 RENAME b TO bbb;
    78     78   }
    79     79   
    80     80   do_execsql_test 3.2 {
    81     81     SELECT sql FROM sqlite_master WHERE name = 'v1'
    82     82   } {{CREATE VIEW v1 AS SELECT * FROM t1 WHERE a=1 OR (bbb IN ())}}
    83     83   
           84  +#-------------------------------------------------------------------------
           85  +reset_db
           86  +do_execsql_test 4.0 {
           87  +  CREATE TABLE t1(a, b);
           88  +  CREATE TABLE t3(e, f);
           89  +  CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
           90  +    INSERT INTO t2 VALUES(new.a, new.b);
           91  +  END;
           92  +}
           93  +
           94  +do_catchsql_test 4.1.2 {
           95  +  BEGIN;
           96  +    ALTER TABLE t3 RENAME TO t4;
           97  +} {1 {error in trigger tr1: no such table: main.t2}}
           98  +do_execsql_test 4.1.2 {
           99  +  COMMIT;
          100  +}
          101  +do_execsql_test 4.1.3 {
          102  +  SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
          103  +} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
          104  +
    84    105   
          106  +do_catchsql_test 4.2.1 {
          107  +  BEGIN;
          108  +    ALTER TABLE t3 RENAME e TO eee;
          109  +} {1 {error in trigger tr1: no such table: main.t2}}
          110  +do_execsql_test 4.2.2 {
          111  +  COMMIT;
          112  +}
          113  +do_execsql_test 4.2.3 {
          114  +  SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
          115  +} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
    85    116   
    86    117   finish_test
    87    118   
    88    119   

Changes to test/sessionfuzz.c.

   826    826   static int conflictCall(
   827    827     void *NotUsed,
   828    828     int eConflict,
   829    829     sqlite3_changeset_iter *p
   830    830   ){
   831    831     (void)NotUsed;
   832    832     (void)p;
   833         -  printf("Conflict %d\n", eConflict);
   834    833     return SQLITE_CHANGESET_OMIT;
   835    834   }
   836    835   
   837    836   /*
   838    837   ** Reset the database file
   839    838   */
   840    839   static void db_reset(sqlite3 *db){

Changes to test/window8.tcl.

    92     92   
    93     93     execsql_test 1.$tn.6 "
    94     94       SELECT a, b, sum(c) OVER (ORDER BY a $f2) FROM t3 ORDER BY 1, 2, 3;
    95     95     "
    96     96     execsql_test 1.$tn.7 "
    97     97       SELECT a, b, sum(c) OVER (ORDER BY a,b $f2) FROM t3 ORDER BY 1, 2, 3;
    98     98     "
           99  +
          100  +  execsql_test 1.$tn.8 "
          101  +    SELECT a, b, 
          102  +      sum(c) OVER (ORDER BY a $f2),
          103  +      sum(c) OVER (ORDER BY a $frame),
          104  +      sum(c) OVER (ORDER BY a,b $f2),
          105  +      sum(c) OVER (ORDER BY a,b $frame)
          106  +    FROM t3 ORDER BY 1, 2, 3;
          107  +  "
    99    108   }
   100    109   
   101    110   
   102    111   foreach {tn ex} {
   103    112     1  { EXCLUDE NO OTHERS }
   104    113     2  { EXCLUDE CURRENT ROW }
   105    114     3  { EXCLUDE GROUP }

Changes to test/window8.test.

   174    174     GG bb 28983   GG bb 28983   GG bb 28983   HH aa 31854   HH aa 31854
   175    175     HH aa 31854   HH bb 34103   HH bb 34103   HH bb 34103   HH bb 34103
   176    176     HH bb 34103   HH bb 34103   II aa 37297   II aa 37297   II bb 38347
   177    177     II bb 38347   II bb 38347   II bb 38347   II bb 38347   JJ aa 40937
   178    178     JJ aa 40937   JJ aa 40937   JJ aa 40937   JJ bb 42951   JJ bb 42951
   179    179     JJ bb 42951   JJ bb 42951}
   180    180   
          181  +do_execsql_test 1.1.8 {
          182  +  SELECT a, b, 
          183  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING  EXCLUDE CURRENT ROW),
          184  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ),
          185  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING  EXCLUDE CURRENT ROW),
          186  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING )
          187  +    FROM t3 ORDER BY 1, 2, 3;
          188  +} {AA aa {} {} {} {}   AA aa {} {} {} {}   AA aa {} {} {} {}
          189  +  AA aa {} {} {} {}   AA bb {} {} 2307 2307   AA bb {} {} 2307 2307
          190  +  AA bb {} {} 2307 2307   AA bb {} {} 2307 2307   BB aa 4685 4685 4685 4685
          191  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
          192  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
          193  +  BB aa 4685 4685 4685 4685   BB bb 4685 4685 7558 7558
          194  +  BB bb 4685 4685 7558 7558   BB bb 4685 4685 7558 7558
          195  +  BB bb 4685 4685 7558 7558   BB bb 4685 4685 7558 7558
          196  +  BB bb 4685 4685 7558 7558   CC aa 12025 12025 12025 12025
          197  +  CC aa 12025 12025 12025 12025   CC aa 12025 12025 12025 12025
          198  +  CC aa 12025 12025 12025 12025   CC bb 12025 12025 13979 13979
          199  +  CC bb 12025 12025 13979 13979   DD aa 15147 15147 15147 15147
          200  +  DD aa 15147 15147 15147 15147   DD aa 15147 15147 15147 15147
          201  +  DD bb 15147 15147 16472 16472   DD bb 15147 15147 16472 16472
          202  +  DD bb 15147 15147 16472 16472   DD bb 15147 15147 16472 16472
          203  +  EE aa 19179 19179 19179 19179   EE aa 19179 19179 19179 19179
          204  +  EE bb 19179 19179 20069 20069   EE bb 19179 19179 20069 20069
          205  +  EE bb 19179 19179 20069 20069   FF aa 21718 21718 21718 21718
          206  +  FF aa 21718 21718 21718 21718   FF aa 21718 21718 21718 21718
          207  +  FF aa 21718 21718 21718 21718   FF bb 21718 21718 23881 23881
          208  +  FF bb 21718 21718 23881 23881   FF bb 21718 21718 23881 23881
          209  +  FF bb 21718 21718 23881 23881   FF bb 21718 21718 23881 23881
          210  +  FF bb 21718 21718 23881 23881   GG aa 27386 27386 27386 27386
          211  +  GG aa 27386 27386 27386 27386   GG aa 27386 27386 27386 27386
          212  +  GG aa 27386 27386 27386 27386   GG bb 27386 27386 28983 28983
          213  +  GG bb 27386 27386 28983 28983   GG bb 27386 27386 28983 28983
          214  +  GG bb 27386 27386 28983 28983   HH aa 31854 31854 31854 31854
          215  +  HH aa 31854 31854 31854 31854   HH aa 31854 31854 31854 31854
          216  +  HH bb 31854 31854 34103 34103   HH bb 31854 31854 34103 34103
          217  +  HH bb 31854 31854 34103 34103   HH bb 31854 31854 34103 34103
          218  +  HH bb 31854 31854 34103 34103   HH bb 31854 31854 34103 34103
          219  +  II aa 37297 37297 37297 37297   II aa 37297 37297 37297 37297
          220  +  II bb 37297 37297 38347 38347   II bb 37297 37297 38347 38347
          221  +  II bb 37297 37297 38347 38347   II bb 37297 37297 38347 38347
          222  +  II bb 37297 37297 38347 38347   JJ aa 40937 40937 40937 40937
          223  +  JJ aa 40937 40937 40937 40937   JJ aa 40937 40937 40937 40937
          224  +  JJ aa 40937 40937 40937 40937   JJ bb 40937 40937 42951 42951
          225  +  JJ bb 40937 40937 42951 42951   JJ bb 40937 40937 42951 42951
          226  +  JJ bb 40937 40937 42951 42951}
          227  +
   181    228   do_execsql_test 1.2.1 {
   182    229     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
   183    230   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
   184    231     AA bb 4685   AA bb 4685   BB aa 12025   BB aa 12025   BB aa 12025
   185    232     BB aa 12025   BB aa 12025   BB aa 12025   BB bb 12025   BB bb 12025
   186    233     BB bb 12025   BB bb 12025   BB bb 12025   BB bb 12025   CC aa 15147
   187    234     CC aa 15147   CC aa 15147   CC aa 15147   CC bb 15147   CC bb 15147
................................................................................
   299    346     GG bb 30916   GG bb 30925   GG bb 31010   GG bb 31694   HH aa 33124
   300    347     HH aa 33313   HH aa 33623   HH bb 36334   HH bb 36567   HH bb 36614
   301    348     HH bb 36942   HH bb 36967   HH bb 37164   II aa 37695   II aa 37949
   302    349     II bb 40132   II bb 40266   II bb 40494   II bb 40516   II bb 40687
   303    350     JJ aa 42052   JJ aa 42183   JJ aa 42717   JJ aa 42838   JJ bb 43898
   304    351     JJ bb 44383   JJ bb 44401   JJ bb 44480}
   305    352   
          353  +do_execsql_test 1.2.8 {
          354  +  SELECT a, b, 
          355  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  EXCLUDE CURRENT ROW),
          356  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ),
          357  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  EXCLUDE CURRENT ROW),
          358  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )
          359  +    FROM t3 ORDER BY 1, 2, 3;
          360  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
          361  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
          362  +  AA bb 3815 4685 3815 4685   AA bb 4058 4685 4058 4685
          363  +  AA bb 4113 4685 4113 4685   AA bb 4376 4685 4376 4685
          364  +  BB aa 11263 12025 6796 7558   BB aa 11365 12025 6898 7558
          365  +  BB aa 11613 12025 7146 7558   BB aa 11626 12025 7159 7558
          366  +  BB aa 11632 12025 7165 7558   BB aa 11778 12025 7311 7558
          367  +  BB bb 11185 12025 11185 12025   BB bb 11233 12025 11233 12025
          368  +  BB bb 11239 12025 11239 12025   BB bb 11314 12025 11314 12025
          369  +  BB bb 11320 12025 11320 12025   BB bb 11392 12025 11392 12025
          370  +  CC aa 14388 15147 13220 13979   CC aa 14540 15147 13372 13979
          371  +  CC aa 14717 15147 13549 13979   CC aa 14989 15147 13821 13979
          372  +  CC bb 14325 15147 14325 15147   CC bb 14801 15147 14801 15147
          373  +  DD aa 18334 19179 15627 16472   DD aa 18923 19179 16216 16472
          374  +  DD aa 18955 19179 16248 16472   DD bb 18220 19179 18220 19179
          375  +  DD bb 18385 19179 18385 19179   DD bb 18463 19179 18463 19179
          376  +  DD bb 18941 19179 18941 19179   EE aa 20941 21718 19292 20069
          377  +  EE aa 21605 21718 19956 20069   EE bb 20950 21718 20950 21718
          378  +  EE bb 21089 21718 21089 21718   EE bb 21466 21718 21466 21718
          379  +  FF aa 26716 27386 23211 23881   FF aa 26719 27386 23214 23881
          380  +  FF aa 26768 27386 23263 23881   FF aa 27178 27386 23673 23881
          381  +  FF bb 26448 27386 26448 27386   FF bb 26516 27386 26516 27386
          382  +  FF bb 26660 27386 26660 27386   FF bb 26812 27386 26812 27386
          383  +  FF bb 27091 27386 27091 27386   FF bb 27284 27386 27284 27386
          384  +  GG aa 31220 31854 28349 28983   GG aa 31374 31854 28503 28983
          385  +  GG aa 31519 31854 28648 28983   GG aa 31706 31854 28835 28983
          386  +  GG bb 30916 31854 30916 31854   GG bb 30925 31854 30925 31854
          387  +  GG bb 31010 31854 31010 31854   GG bb 31694 31854 31694 31854
          388  +  HH aa 36318 37297 33124 34103   HH aa 36507 37297 33313 34103
          389  +  HH aa 36817 37297 33623 34103   HH bb 36334 37297 36334 37297
          390  +  HH bb 36567 37297 36567 37297   HH bb 36614 37297 36614 37297
          391  +  HH bb 36942 37297 36942 37297   HH bb 36967 37297 36967 37297
          392  +  HH bb 37164 37297 37164 37297   II aa 40285 40937 37695 38347
          393  +  II aa 40539 40937 37949 38347   II bb 40132 40937 40132 40937
          394  +  II bb 40266 40937 40266 40937   II bb 40494 40937 40494 40937
          395  +  II bb 40516 40937 40516 40937   II bb 40687 40937 40687 40937
          396  +  JJ aa 43838 44737 42052 42951   JJ aa 43969 44737 42183 42951
          397  +  JJ aa 44503 44737 42717 42951   JJ aa 44624 44737 42838 42951
          398  +  JJ bb 43898 44737 43898 44737   JJ bb 44383 44737 44383 44737
          399  +  JJ bb 44401 44737 44401 44737   JJ bb 44480 44737 44480 44737}
          400  +
   306    401   do_execsql_test 1.3.1 {
   307    402     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
   308    403   } {AA aa 12025   AA aa 12025   AA aa 12025   AA aa 12025   AA bb 12025
   309    404     AA bb 12025   AA bb 12025   AA bb 12025   BB aa 15147   BB aa 15147
   310    405     BB aa 15147   BB aa 15147   BB aa 15147   BB aa 15147   BB bb 15147
   311    406     BB bb 15147   BB bb 15147   BB bb 15147   BB bb 15147   BB bb 15147
   312    407     CC aa 19179   CC aa 19179   CC aa 19179   CC aa 19179   CC bb 19179
................................................................................
   424    519     GG aa 31706   GG bb 33165   GG bb 33174   GG bb 33259   GG bb 33943
   425    520     HH aa 36318   HH aa 36507   HH aa 36817   HH bb 37384   HH bb 37617
   426    521     HH bb 37664   HH bb 37992   HH bb 38017   HH bb 38214   II aa 40285
   427    522     II aa 40539   II bb 42146   II bb 42280   II bb 42508   II bb 42530
   428    523     II bb 42701   JJ aa 43838   JJ aa 43969   JJ aa 44503   JJ aa 44624
   429    524     JJ bb 43898   JJ bb 44383   JJ bb 44401   JJ bb 44480}
   430    525   
          526  +do_execsql_test 1.3.8 {
          527  +  SELECT a, b, 
          528  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING  EXCLUDE CURRENT ROW),
          529  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING ),
          530  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING  EXCLUDE CURRENT ROW),
          531  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING )
          532  +    FROM t3 ORDER BY 1, 2, 3;
          533  +} {AA aa 11091 12025 3751 4685   AA aa 11114 12025 3774 4685
          534  +  AA aa 11786 12025 4446 4685   AA aa 11802 12025 4462 4685
          535  +  AA bb 11155 12025 6688 7558   AA bb 11398 12025 6931 7558
          536  +  AA bb 11453 12025 6986 7558   AA bb 11716 12025 7249 7558
          537  +  BB aa 14385 15147 11263 12025   BB aa 14487 15147 11365 12025
          538  +  BB aa 14735 15147 11613 12025   BB aa 14748 15147 11626 12025
          539  +  BB aa 14754 15147 11632 12025   BB aa 14900 15147 11778 12025
          540  +  BB bb 14307 15147 13139 13979   BB bb 14355 15147 13187 13979
          541  +  BB bb 14361 15147 13193 13979   BB bb 14436 15147 13268 13979
          542  +  BB bb 14442 15147 13274 13979   BB bb 14514 15147 13346 13979
          543  +  CC aa 18420 19179 14388 15147   CC aa 18572 19179 14540 15147
          544  +  CC aa 18749 19179 14717 15147   CC aa 19021 19179 14989 15147
          545  +  CC bb 18357 19179 15650 16472   CC bb 18833 19179 16126 16472
          546  +  DD aa 20873 21718 18334 19179   DD aa 21462 21718 18923 19179
          547  +  DD aa 21494 21718 18955 19179   DD bb 20759 21718 19110 20069
          548  +  DD bb 20924 21718 19275 20069   DD bb 21002 21718 19353 20069
          549  +  DD bb 21480 21718 19831 20069   EE aa 26609 27386 20941 21718
          550  +  EE aa 27273 27386 21605 21718   EE bb 26618 27386 23113 23881
          551  +  EE bb 26757 27386 23252 23881   EE bb 27134 27386 23629 23881
          552  +  FF aa 31184 31854 26716 27386   FF aa 31187 31854 26719 27386
          553  +  FF aa 31236 31854 26768 27386   FF aa 31646 31854 27178 27386
          554  +  FF bb 30916 31854 28045 28983   FF bb 30984 31854 28113 28983
          555  +  FF bb 31128 31854 28257 28983   FF bb 31280 31854 28409 28983
          556  +  FF bb 31559 31854 28688 28983   FF bb 31752 31854 28881 28983
          557  +  GG aa 36663 37297 31220 31854   GG aa 36817 37297 31374 31854
          558  +  GG aa 36962 37297 31519 31854   GG aa 37149 37297 31706 31854
          559  +  GG bb 36359 37297 33165 34103   GG bb 36368 37297 33174 34103
          560  +  GG bb 36453 37297 33259 34103   GG bb 37137 37297 33943 34103
          561  +  HH aa 39958 40937 36318 37297   HH aa 40147 40937 36507 37297
          562  +  HH aa 40457 40937 36817 37297   HH bb 39974 40937 37384 38347
          563  +  HH bb 40207 40937 37617 38347   HH bb 40254 40937 37664 38347
          564  +  HH bb 40582 40937 37992 38347   HH bb 40607 40937 38017 38347
          565  +  HH bb 40804 40937 38214 38347   II aa 44085 44737 40285 40937
          566  +  II aa 44339 44737 40539 40937   II bb 43932 44737 42146 42951
          567  +  II bb 44066 44737 42280 42951   II bb 44294 44737 42508 42951
          568  +  II bb 44316 44737 42530 42951   II bb 44487 44737 42701 42951
          569  +  JJ aa 43838 44737 43838 44737   JJ aa 43969 44737 43969 44737
          570  +  JJ aa 44503 44737 44503 44737   JJ aa 44624 44737 44624 44737
          571  +  JJ bb 43898 44737 43898 44737   JJ bb 44383 44737 44383 44737
          572  +  JJ bb 44401 44737 44401 44737   JJ bb 44480 44737 44480 44737}
          573  +
   431    574   do_execsql_test 1.4.1 {
   432    575     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
   433    576   } {AA aa 44737   AA aa 44737   AA aa 44737   AA aa 44737   AA bb 44737
   434    577     AA bb 44737   AA bb 44737   AA bb 44737   BB aa 44737   BB aa 44737
   435    578     BB aa 44737   BB aa 44737   BB aa 44737   BB aa 44737   BB bb 44737
   436    579     BB bb 44737   BB bb 44737   BB bb 44737   BB bb 44737   BB bb 44737
   437    580     CC aa 44737   CC aa 44737   CC aa 44737   CC aa 44737   CC bb 44737
................................................................................
   549    692     GG aa 44402   GG aa 44589   GG bb 43799   GG bb 43808   GG bb 43893
   550    693     GG bb 44577   HH aa 43758   HH aa 43947   HH aa 44257   HH bb 43774
   551    694     HH bb 44007   HH bb 44054   HH bb 44382   HH bb 44407   HH bb 44604
   552    695     II aa 44085   II aa 44339   II bb 43932   II bb 44066   II bb 44294
   553    696     II bb 44316   II bb 44487   JJ aa 43838   JJ aa 43969   JJ aa 44503
   554    697     JJ aa 44624   JJ bb 43898   JJ bb 44383   JJ bb 44401   JJ bb 44480}
   555    698   
          699  +do_execsql_test 1.4.8 {
          700  +  SELECT a, b, 
          701  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
          702  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ),
          703  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
          704  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING )
          705  +    FROM t3 ORDER BY 1, 2, 3;
          706  +} {AA aa 43803 44737 43803 44737   AA aa 43826 44737 43826 44737
          707  +  AA aa 44498 44737 44498 44737   AA aa 44514 44737 44514 44737
          708  +  AA bb 43867 44737 43867 44737   AA bb 44110 44737 44110 44737
          709  +  AA bb 44165 44737 44165 44737   AA bb 44428 44737 44428 44737
          710  +  BB aa 43975 44737 43975 44737   BB aa 44077 44737 44077 44737
          711  +  BB aa 44325 44737 44325 44737   BB aa 44338 44737 44338 44737
          712  +  BB aa 44344 44737 44344 44737   BB aa 44490 44737 44490 44737
          713  +  BB bb 43897 44737 43897 44737   BB bb 43945 44737 43945 44737
          714  +  BB bb 43951 44737 43951 44737   BB bb 44026 44737 44026 44737
          715  +  BB bb 44032 44737 44032 44737   BB bb 44104 44737 44104 44737
          716  +  CC aa 43978 44737 43978 44737   CC aa 44130 44737 44130 44737
          717  +  CC aa 44307 44737 44307 44737   CC aa 44579 44737 44579 44737
          718  +  CC bb 43915 44737 43915 44737   CC bb 44391 44737 44391 44737
          719  +  DD aa 43892 44737 43892 44737   DD aa 44481 44737 44481 44737
          720  +  DD aa 44513 44737 44513 44737   DD bb 43778 44737 43778 44737
          721  +  DD bb 43943 44737 43943 44737   DD bb 44021 44737 44021 44737
          722  +  DD bb 44499 44737 44499 44737   EE aa 43960 44737 43960 44737
          723  +  EE aa 44624 44737 44624 44737   EE bb 43969 44737 43969 44737
          724  +  EE bb 44108 44737 44108 44737   EE bb 44485 44737 44485 44737
          725  +  FF aa 44067 44737 44067 44737   FF aa 44070 44737 44070 44737
          726  +  FF aa 44119 44737 44119 44737   FF aa 44529 44737 44529 44737
          727  +  FF bb 43799 44737 43799 44737   FF bb 43867 44737 43867 44737
          728  +  FF bb 44011 44737 44011 44737   FF bb 44163 44737 44163 44737
          729  +  FF bb 44442 44737 44442 44737   FF bb 44635 44737 44635 44737
          730  +  GG aa 44103 44737 44103 44737   GG aa 44257 44737 44257 44737
          731  +  GG aa 44402 44737 44402 44737   GG aa 44589 44737 44589 44737
          732  +  GG bb 43799 44737 43799 44737   GG bb 43808 44737 43808 44737
          733  +  GG bb 43893 44737 43893 44737   GG bb 44577 44737 44577 44737
          734  +  HH aa 43758 44737 43758 44737   HH aa 43947 44737 43947 44737
          735  +  HH aa 44257 44737 44257 44737   HH bb 43774 44737 43774 44737
          736  +  HH bb 44007 44737 44007 44737   HH bb 44054 44737 44054 44737
          737  +  HH bb 44382 44737 44382 44737   HH bb 44407 44737 44407 44737
          738  +  HH bb 44604 44737 44604 44737   II aa 44085 44737 44085 44737
          739  +  II aa 44339 44737 44339 44737   II bb 43932 44737 43932 44737
          740  +  II bb 44066 44737 44066 44737   II bb 44294 44737 44294 44737
          741  +  II bb 44316 44737 44316 44737   II bb 44487 44737 44487 44737
          742  +  JJ aa 43838 44737 43838 44737   JJ aa 43969 44737 43969 44737
          743  +  JJ aa 44503 44737 44503 44737   JJ aa 44624 44737 44624 44737
          744  +  JJ bb 43898 44737 43898 44737   JJ bb 44383 44737 44383 44737
          745  +  JJ bb 44401 44737 44401 44737   JJ bb 44480 44737 44480 44737}
          746  +
   556    747   do_execsql_test 1.5.1 {
   557    748     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 PRECEDING         AND 2 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
   558    749   } {AA aa {}   AA aa {}   AA aa {}   AA aa {}   AA bb {}   AA bb {}   AA bb {}
   559    750     AA bb {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}
   560    751     BB bb {}   BB bb {}   BB bb {}   BB bb {}   BB bb {}   BB bb {}   CC aa {}
   561    752     CC aa {}   CC aa {}   CC aa {}   CC bb {}   CC bb {}   DD aa {}   DD aa {}
   562    753     DD aa {}   DD bb {}   DD bb {}   DD bb {}   DD bb {}   EE aa {}   EE aa {}
................................................................................
   654    845     FF bb {}   FF bb {}   FF bb {}   FF bb {}   FF bb {}   FF bb {}   GG aa {}
   655    846     GG aa {}   GG aa {}   GG aa {}   GG bb {}   GG bb {}   GG bb {}   GG bb {}
   656    847     HH aa {}   HH aa {}   HH aa {}   HH bb {}   HH bb {}   HH bb {}   HH bb {}
   657    848     HH bb {}   HH bb {}   II aa {}   II aa {}   II bb {}   II bb {}   II bb {}
   658    849     II bb {}   II bb {}   JJ aa {}   JJ aa {}   JJ aa {}   JJ aa {}   JJ bb {}
   659    850     JJ bb {}   JJ bb {}   JJ bb {}}
   660    851   
          852  +do_execsql_test 1.5.8 {
          853  +  SELECT a, b, 
          854  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 PRECEDING         AND 2 PRECEDING  EXCLUDE CURRENT ROW),
          855  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 PRECEDING         AND 2 PRECEDING ),
          856  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 PRECEDING         AND 2 PRECEDING  EXCLUDE CURRENT ROW),
          857  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 PRECEDING         AND 2 PRECEDING )
          858  +    FROM t3 ORDER BY 1, 2, 3;
          859  +} {AA aa {} {} {} {}   AA aa {} {} {} {}   AA aa {} {} {} {}
          860  +  AA aa {} {} {} {}   AA bb {} {} {} {}   AA bb {} {} {} {}
          861  +  AA bb {} {} {} {}   AA bb {} {} {} {}   BB aa {} {} {} {}
          862  +  BB aa {} {} {} {}   BB aa {} {} {} {}   BB aa {} {} {} {}
          863  +  BB aa {} {} {} {}   BB aa {} {} {} {}   BB bb {} {} {} {}
          864  +  BB bb {} {} {} {}   BB bb {} {} {} {}   BB bb {} {} {} {}
          865  +  BB bb {} {} {} {}   BB bb {} {} {} {}   CC aa {} {} {} {}
          866  +  CC aa {} {} {} {}   CC aa {} {} {} {}   CC aa {} {} {} {}
          867  +  CC bb {} {} {} {}   CC bb {} {} {} {}   DD aa {} {} {} {}
          868  +  DD aa {} {} {} {}   DD aa {} {} {} {}   DD bb {} {} {} {}
          869  +  DD bb {} {} {} {}   DD bb {} {} {} {}   DD bb {} {} {} {}
          870  +  EE aa {} {} {} {}   EE aa {} {} {} {}   EE bb {} {} {} {}
          871  +  EE bb {} {} {} {}   EE bb {} {} {} {}   FF aa {} {} {} {}
          872  +  FF aa {} {} {} {}   FF aa {} {} {} {}   FF aa {} {} {} {}
          873  +  FF bb {} {} {} {}   FF bb {} {} {} {}   FF bb {} {} {} {}
          874  +  FF bb {} {} {} {}   FF bb {} {} {} {}   FF bb {} {} {} {}
          875  +  GG aa {} {} {} {}   GG aa {} {} {} {}   GG aa {} {} {} {}
          876  +  GG aa {} {} {} {}   GG bb {} {} {} {}   GG bb {} {} {} {}
          877  +  GG bb {} {} {} {}   GG bb {} {} {} {}   HH aa {} {} {} {}
          878  +  HH aa {} {} {} {}   HH aa {} {} {} {}   HH bb {} {} {} {}
          879  +  HH bb {} {} {} {}   HH bb {} {} {} {}   HH bb {} {} {} {}
          880  +  HH bb {} {} {} {}   HH bb {} {} {} {}   II aa {} {} {} {}
          881  +  II aa {} {} {} {}   II bb {} {} {} {}   II bb {} {} {} {}
          882  +  II bb {} {} {} {}   II bb {} {} {} {}   II bb {} {} {} {}
          883  +  JJ aa {} {} {} {}   JJ aa {} {} {} {}   JJ aa {} {} {} {}
          884  +  JJ aa {} {} {} {}   JJ bb {} {} {} {}   JJ bb {} {} {} {}
          885  +  JJ bb {} {} {} {}   JJ bb {} {} {} {}}
          886  +
   661    887   do_execsql_test 1.6.1 {
   662    888     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
   663    889   } {AA aa {}   AA aa {}   AA aa {}   AA aa {}   AA bb {}   AA bb {}   AA bb {}
   664    890     AA bb {}   BB aa 4685   BB aa 4685   BB aa 4685   BB aa 4685   BB aa 4685
   665    891     BB aa 4685   BB bb 4685   BB bb 4685   BB bb 4685   BB bb 4685   BB bb 4685
   666    892     BB bb 4685   CC aa 12025   CC aa 12025   CC aa 12025   CC aa 12025
   667    893     CC bb 12025   CC bb 12025   DD aa 10462   DD aa 10462   DD aa 10462
................................................................................
   773    999     GG aa 5668   GG aa 5668   GG aa 5668   GG aa 5668   GG bb 5102   GG bb 5102
   774   1000     GG bb 5102   GG bb 5102   HH aa 4468   HH aa 4468   HH aa 4468   HH bb 5120
   775   1001     HH bb 5120   HH bb 5120   HH bb 5120   HH bb 5120   HH bb 5120   II aa 5443
   776   1002     II aa 5443   II bb 4244   II bb 4244   II bb 4244   II bb 4244   II bb 4244
   777   1003     JJ aa 3640   JJ aa 3640   JJ aa 3640   JJ aa 3640   JJ bb 4604   JJ bb 4604
   778   1004     JJ bb 4604   JJ bb 4604}
   779   1005   
         1006  +do_execsql_test 1.6.8 {
         1007  +  SELECT a, b, 
         1008  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND 1 PRECEDING  EXCLUDE CURRENT ROW),
         1009  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND 1 PRECEDING ),
         1010  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND 1 PRECEDING  EXCLUDE CURRENT ROW),
         1011  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND 1 PRECEDING )
         1012  +    FROM t3 ORDER BY 1, 2, 3;
         1013  +} {AA aa {} {} {} {}   AA aa {} {} {} {}   AA aa {} {} {} {}
         1014  +  AA aa {} {} {} {}   AA bb {} {} 2307 2307   AA bb {} {} 2307 2307
         1015  +  AA bb {} {} 2307 2307   AA bb {} {} 2307 2307   BB aa 4685 4685 4685 4685
         1016  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
         1017  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
         1018  +  BB aa 4685 4685 4685 4685   BB bb 4685 4685 5251 5251
         1019  +  BB bb 4685 4685 5251 5251   BB bb 4685 4685 5251 5251
         1020  +  BB bb 4685 4685 5251 5251   BB bb 4685 4685 5251 5251
         1021  +  BB bb 4685 4685 5251 5251   CC aa 12025 12025 7340 7340
         1022  +  CC aa 12025 12025 7340 7340   CC aa 12025 12025 7340 7340
         1023  +  CC aa 12025 12025 7340 7340   CC bb 12025 12025 6421 6421
         1024  +  CC bb 12025 12025 6421 6421   DD aa 10462 10462 3122 3122
         1025  +  DD aa 10462 10462 3122 3122   DD aa 10462 10462 3122 3122
         1026  +  DD bb 10462 10462 2493 2493   DD bb 10462 10462 2493 2493
         1027  +  DD bb 10462 10462 2493 2493   DD bb 10462 10462 2493 2493
         1028  +  EE aa 7154 7154 4032 4032   EE aa 7154 7154 4032 4032
         1029  +  EE bb 7154 7154 3597 3597   EE bb 7154 7154 3597 3597
         1030  +  EE bb 7154 7154 3597 3597   FF aa 6571 6571 2539 2539
         1031  +  FF aa 6571 6571 2539 2539   FF aa 6571 6571 2539 2539
         1032  +  FF aa 6571 6571 2539 2539   FF bb 6571 6571 3812 3812
         1033  +  FF bb 6571 6571 3812 3812   FF bb 6571 6571 3812 3812
         1034  +  FF bb 6571 6571 3812 3812   FF bb 6571 6571 3812 3812
         1035  +  FF bb 6571 6571 3812 3812   GG aa 8207 8207 5668 5668
         1036  +  GG aa 8207 8207 5668 5668   GG aa 8207 8207 5668 5668
         1037  +  GG aa 8207 8207 5668 5668   GG bb 8207 8207 5102 5102
         1038  +  GG bb 8207 8207 5102 5102   GG bb 8207 8207 5102 5102
         1039  +  GG bb 8207 8207 5102 5102   HH aa 10136 10136 4468 4468
         1040  +  HH aa 10136 10136 4468 4468   HH aa 10136 10136 4468 4468
         1041  +  HH bb 10136 10136 5120 5120   HH bb 10136 10136 5120 5120
         1042  +  HH bb 10136 10136 5120 5120   HH bb 10136 10136 5120 5120
         1043  +  HH bb 10136 10136 5120 5120   HH bb 10136 10136 5120 5120
         1044  +  II aa 9911 9911 5443 5443   II aa 9911 9911 5443 5443
         1045  +  II bb 9911 9911 4244 4244   II bb 9911 9911 4244 4244
         1046  +  II bb 9911 9911 4244 4244   II bb 9911 9911 4244 4244
         1047  +  II bb 9911 9911 4244 4244   JJ aa 9083 9083 3640 3640
         1048  +  JJ aa 9083 9083 3640 3640   JJ aa 9083 9083 3640 3640
         1049  +  JJ aa 9083 9083 3640 3640   JJ bb 9083 9083 4604 4604
         1050  +  JJ bb 9083 9083 4604 4604   JJ bb 9083 9083 4604 4604
         1051  +  JJ bb 9083 9083 4604 4604}
         1052  +
   780   1053   do_execsql_test 1.7.1 {
   781   1054     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 1 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
   782   1055   } {AA aa {}   AA aa {}   AA aa {}   AA aa {}   AA bb {}   AA bb {}   AA bb {}
   783   1056     AA bb {}   BB aa 4685   BB aa 4685   BB aa 4685   BB aa 4685   BB aa 4685
   784   1057     BB aa 4685   BB bb 4685   BB bb 4685   BB bb 4685   BB bb 4685   BB bb 4685
   785   1058     BB bb 4685   CC aa 12025   CC aa 12025   CC aa 12025   CC aa 12025
   786   1059     CC bb 12025   CC bb 12025   DD aa 15147   DD aa 15147   DD aa 15147
................................................................................
   892   1165     GG aa 7317   GG aa 7317   GG aa 7317   GG aa 7317   GG bb 7265   GG bb 7265
   893   1166     GG bb 7265   GG bb 7265   HH aa 7973   HH aa 7973   HH aa 7973   HH bb 6717
   894   1167     HH bb 6717   HH bb 6717   HH bb 6717   HH bb 6717   HH bb 6717   II aa 8314
   895   1168     II aa 8314   II bb 6493   II bb 6493   II bb 6493   II bb 6493   II bb 6493
   896   1169     JJ aa 6834   JJ aa 6834   JJ aa 6834   JJ aa 6834   JJ bb 5654   JJ bb 5654
   897   1170     JJ bb 5654   JJ bb 5654}
   898   1171   
         1172  +do_execsql_test 1.7.8 {
         1173  +  SELECT a, b, 
         1174  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 1 PRECEDING  EXCLUDE CURRENT ROW),
         1175  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 1 PRECEDING ),
         1176  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 1 PRECEDING  EXCLUDE CURRENT ROW),
         1177  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 1 PRECEDING )
         1178  +    FROM t3 ORDER BY 1, 2, 3;
         1179  +} {AA aa {} {} {} {}   AA aa {} {} {} {}   AA aa {} {} {} {}
         1180  +  AA aa {} {} {} {}   AA bb {} {} 2307 2307   AA bb {} {} 2307 2307
         1181  +  AA bb {} {} 2307 2307   AA bb {} {} 2307 2307   BB aa 4685 4685 4685 4685
         1182  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
         1183  +  BB aa 4685 4685 4685 4685   BB aa 4685 4685 4685 4685
         1184  +  BB aa 4685 4685 4685 4685   BB bb 4685 4685 7558 7558
         1185  +  BB bb 4685 4685 7558 7558   BB bb 4685 4685 7558 7558
         1186  +  BB bb 4685 4685 7558 7558   BB bb 4685 4685 7558 7558
         1187  +  BB bb 4685 4685 7558 7558   CC aa 12025 12025 9718 9718
         1188  +  CC aa 12025 12025 9718 9718   CC aa 12025 12025 9718 9718
         1189  +  CC aa 12025 12025 9718 9718   CC bb 12025 12025 9294 9294
         1190  +  CC bb 12025 12025 9294 9294   DD aa 15147 15147 7589 7589
         1191  +  DD aa 15147 15147 7589 7589   DD aa 15147 15147 7589 7589
         1192  +  DD bb 15147 15147 4447 4447   DD bb 15147 15147 4447 4447
         1193  +  DD bb 15147 15147 4447 4447   DD bb 15147 15147 4447 4447
         1194  +  EE aa 14494 14494 5200 5200   EE aa 14494 14494 5200 5200
         1195  +  EE bb 14494 14494 4922 4922   EE bb 14494 14494 4922 4922
         1196  +  EE bb 14494 14494 4922 4922   FF aa 9693 9693 5246 5246
         1197  +  FF aa 9693 9693 5246 5246   FF aa 9693 9693 5246 5246
         1198  +  FF aa 9693 9693 5246 5246   FF bb 9693 9693 4702 4702
         1199  +  FF bb 9693 9693 4702 4702   FF bb 9693 9693 4702 4702
         1200  +  FF bb 9693 9693 4702 4702   FF bb 9693 9693 4702 4702
         1201  +  FF bb 9693 9693 4702 4702   GG aa 12239 12239 7317 7317
         1202  +  GG aa 12239 12239 7317 7317   GG aa 12239 12239 7317 7317
         1203  +  GG aa 12239 12239 7317 7317   GG bb 12239 12239 7265 7265
         1204  +  GG bb 12239 12239 7265 7265   GG bb 12239 12239 7265 7265
         1205  +  GG bb 12239 12239 7265 7265   HH aa 12675 12675 7973 7973
         1206  +  HH aa 12675 12675 7973 7973   HH aa 12675 12675 7973 7973
         1207  +  HH bb 12675 12675 6717 6717   HH bb 12675 12675 6717 6717
         1208  +  HH bb 12675 12675 6717 6717   HH bb 12675 12675 6717 6717
         1209  +  HH bb 12675 12675 6717 6717   HH bb 12675 12675 6717 6717
         1210  +  II aa 15579 15579 8314 8314   II aa 15579 15579 8314 8314
         1211  +  II bb 15579 15579 6493 6493   II bb 15579 15579 6493 6493
         1212  +  II bb 15579 15579 6493 6493   II bb 15579 15579 6493 6493
         1213  +  II bb 15579 15579 6493 6493   JJ aa 13551 13551 6834 6834
         1214  +  JJ aa 13551 13551 6834 6834   JJ aa 13551 13551 6834 6834
         1215  +  JJ aa 13551 13551 6834 6834   JJ bb 13551 13551 5654 5654
         1216  +  JJ bb 13551 13551 5654 5654   JJ bb 13551 13551 5654 5654
         1217  +  JJ bb 13551 13551 5654 5654}
         1218  +
   899   1219   do_execsql_test 1.8.1 {
   900   1220     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 PRECEDING ) FROM t3 ORDER BY 1, 2, 3;
   901   1221   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
   902   1222     AA bb 4685   AA bb 4685   BB aa 12025   BB aa 12025   BB aa 12025
   903   1223     BB aa 12025   BB aa 12025   BB aa 12025   BB bb 12025   BB bb 12025
   904   1224     BB bb 12025   BB bb 12025   BB bb 12025   BB bb 12025   CC aa 15147
   905   1225     CC aa 15147   CC aa 15147   CC aa 15147   CC bb 15147   CC bb 15147
................................................................................
  1014   1334     FF bb 7633   FF bb 7912   FF bb 8105   GG aa 8280   GG aa 8434   GG aa 8579
  1015   1335     GG aa 8766   GG bb 9198   GG bb 9207   GG bb 9292   GG bb 9976   HH aa 9243
  1016   1336     HH aa 9432   HH aa 9742   HH bb 8948   HH bb 9181   HH bb 9228   HH bb 9556
  1017   1337     HH bb 9581   HH bb 9778   II aa 8712   II aa 8966   II bb 8278   II bb 8412
  1018   1338     II bb 8640   II bb 8662   II bb 8833   JJ aa 7949   JJ aa 8080   JJ aa 8614
  1019   1339     JJ aa 8735   JJ bb 6601   JJ bb 7086   JJ bb 7104   JJ bb 7183}
  1020   1340   
         1341  +do_execsql_test 1.8.8 {
         1342  +  SELECT a, b, 
         1343  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 PRECEDING  EXCLUDE CURRENT ROW),
         1344  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 PRECEDING ),
         1345  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 0 PRECEDING  EXCLUDE CURRENT ROW),
         1346  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 0 PRECEDING )
         1347  +    FROM t3 ORDER BY 1, 2, 3;
         1348  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
         1349  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
         1350  +  AA bb 3815 4685 3815 4685   AA bb 4058 4685 4058 4685
         1351  +  AA bb 4113 4685 4113 4685   AA bb 4376 4685 4376 4685
         1352  +  BB aa 11263 12025 6796 7558   BB aa 11365 12025 6898 7558
         1353  +  BB aa 11613 12025 7146 7558   BB aa 11626 12025 7159 7558
         1354  +  BB aa 11632 12025 7165 7558   BB aa 11778 12025 7311 7558
         1355  +  BB bb 11185 12025 11185 12025   BB bb 11233 12025 11233 12025
         1356  +  BB bb 11239 12025 11239 12025   BB bb 11314 12025 11314 12025
         1357  +  BB bb 11320 12025 11320 12025   BB bb 11392 12025 11392 12025
         1358  +  CC aa 14388 15147 10913 11672   CC aa 14540 15147 11065 11672
         1359  +  CC aa 14717 15147 11242 11672   CC aa 14989 15147 11514 11672
         1360  +  CC bb 14325 15147 9640 10462   CC bb 14801 15147 10116 10462
         1361  +  DD aa 18334 19179 8069 8914   DD aa 18923 19179 8658 8914
         1362  +  DD aa 18955 19179 8690 8914   DD bb 18220 19179 6195 7154
         1363  +  DD bb 18385 19179 6360 7154   DD bb 18463 19179 6438 7154
         1364  +  DD bb 18941 19179 6916 7154   EE aa 16256 17033 5313 6090
         1365  +  EE aa 16920 17033 5977 6090   EE bb 16265 17033 5803 6571
         1366  +  EE bb 16404 17033 5942 6571   EE bb 16781 17033 6319 6571
         1367  +  FF aa 14691 15361 6739 7409   FF aa 14694 15361 6742 7409
         1368  +  FF aa 14743 15361 6791 7409   FF aa 15153 15361 7201 7409
         1369  +  FF bb 14423 15361 7269 8207   FF bb 14491 15361 7337 8207
         1370  +  FF bb 14635 15361 7481 8207   FF bb 14787 15361 7633 8207
         1371  +  FF bb 15066 15361 7912 8207   FF bb 15259 15361 8105 8207
         1372  +  GG aa 16073 16707 8280 8914   GG aa 16227 16707 8434 8914
         1373  +  GG aa 16372 16707 8579 8914   GG aa 16559 16707 8766 8914
         1374  +  GG bb 15769 16707 9198 10136   GG bb 15778 16707 9207 10136
         1375  +  GG bb 15863 16707 9292 10136   GG bb 16547 16707 9976 10136
         1376  +  HH aa 17139 18118 9243 10222   HH aa 17328 18118 9432 10222
         1377  +  HH aa 17638 18118 9742 10222   HH bb 17155 18118 8948 9911
         1378  +  HH bb 17388 18118 9181 9911   HH bb 17435 18118 9228 9911
         1379  +  HH bb 17763 18118 9556 9911   HH bb 17788 18118 9581 9911
         1380  +  HH bb 17985 18118 9778 9911   II aa 18567 19219 8712 9364
         1381  +  II aa 18821 19219 8966 9364   II bb 18414 19219 8278 9083
         1382  +  II bb 18548 19219 8412 9083   II bb 18776 19219 8640 9083
         1383  +  II bb 18798 19219 8662 9083   II bb 18969 19219 8833 9083
         1384  +  JJ aa 16452 17351 7949 8848   JJ aa 16583 17351 8080 8848
         1385  +  JJ aa 17117 17351 8614 8848   JJ aa 17238 17351 8735 8848
         1386  +  JJ bb 16512 17351 6601 7440   JJ bb 16997 17351 7086 7440
         1387  +  JJ bb 17015 17351 7104 7440   JJ bb 17094 17351 7183 7440}
         1388  +
  1021   1389   do_execsql_test 1.9.1 {
  1022   1390     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND CURRENT ROW ) FROM t3 ORDER BY 1, 2, 3;
  1023   1391   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
  1024   1392     AA bb 4685   AA bb 4685   BB aa 12025   BB aa 12025   BB aa 12025
  1025   1393     BB aa 12025   BB aa 12025   BB aa 12025   BB bb 12025   BB bb 12025
  1026   1394     BB bb 12025   BB bb 12025   BB bb 12025   BB bb 12025   CC aa 15147
  1027   1395     CC aa 15147   CC aa 15147   CC aa 15147   CC bb 15147   CC bb 15147
................................................................................
  1135   1503     GG aa 6631   GG aa 6785   GG aa 6930   GG aa 7117   GG bb 7035   GG bb 7044
  1136   1504     GG bb 7129   GG bb 7813   HH aa 5738   HH aa 5927   HH aa 6237   HH bb 7351
  1137   1505     HH bb 7584   HH bb 7631   HH bb 7959   HH bb 7984   HH bb 8181   II aa 5841
  1138   1506     II aa 6095   II bb 6029   II bb 6163   II bb 6391   II bb 6413   II bb 6584
  1139   1507     JJ aa 4755   JJ aa 4886   JJ aa 5420   JJ aa 5541   JJ bb 5551   JJ bb 6036
  1140   1508     JJ bb 6054   JJ bb 6133}
  1141   1509   
         1510  +do_execsql_test 1.9.8 {
         1511  +  SELECT a, b, 
         1512  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND CURRENT ROW  EXCLUDE CURRENT ROW),
         1513  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND CURRENT ROW ),
         1514  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND CURRENT ROW  EXCLUDE CURRENT ROW),
         1515  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND CURRENT ROW )
         1516  +    FROM t3 ORDER BY 1, 2, 3;
         1517  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
         1518  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
         1519  +  AA bb 3815 4685 3815 4685   AA bb 4058 4685 4058 4685
         1520  +  AA bb 4113 4685 4113 4685   AA bb 4376 4685 4376 4685
         1521  +  BB aa 11263 12025 6796 7558   BB aa 11365 12025 6898 7558
         1522  +  BB aa 11613 12025 7146 7558   BB aa 11626 12025 7159 7558
         1523  +  BB aa 11632 12025 7165 7558   BB aa 11778 12025 7311 7558
         1524  +  BB bb 11185 12025 8878 9718   BB bb 11233 12025 8926 9718
         1525  +  BB bb 11239 12025 8932 9718   BB bb 11314 12025 9007 9718
         1526  +  BB bb 11320 12025 9013 9718   BB bb 11392 12025 9085 9718
         1527  +  CC aa 14388 15147 8535 9294   CC aa 14540 15147 8687 9294
         1528  +  CC aa 14717 15147 8864 9294   CC aa 14989 15147 9136 9294
         1529  +  CC bb 14325 15147 6767 7589   CC bb 14801 15147 7243 7589
         1530  +  DD aa 13649 14494 3602 4447   DD aa 14238 14494 4191 4447
         1531  +  DD aa 14270 14494 4223 4447   DD bb 13535 14494 4241 5200
         1532  +  DD bb 13700 14494 4406 5200   DD bb 13778 14494 4484 5200
         1533  +  DD bb 14256 14494 4962 5200   EE aa 8916 9693 4145 4922
         1534  +  EE aa 9580 9693 4809 4922   EE bb 8925 9693 4478 5246
         1535  +  EE bb 9064 9693 4617 5246   EE bb 9441 9693 4994 5246
         1536  +  FF aa 11569 12239 4032 4702   FF aa 11572 12239 4035 4702
         1537  +  FF aa 11621 12239 4084 4702   FF aa 12031 12239 4494 4702
         1538  +  FF bb 11301 12239 6379 7317   FF bb 11369 12239 6447 7317
         1539  +  FF bb 11513 12239 6591 7317   FF bb 11665 12239 6743 7317
         1540  +  FF bb 11944 12239 7022 7317   FF bb 12137 12239 7215 7317
         1541  +  GG aa 12041 12675 6631 7265   GG aa 12195 12675 6785 7265
         1542  +  GG aa 12340 12675 6930 7265   GG aa 12527 12675 7117 7265
         1543  +  GG bb 11737 12675 7035 7973   GG bb 11746 12675 7044 7973
         1544  +  GG bb 11831 12675 7129 7973   GG bb 12515 12675 7813 7973
         1545  +  HH aa 14600 15579 5738 6717   HH aa 14789 15579 5927 6717
         1546  +  HH aa 15099 15579 6237 6717   HH bb 14616 15579 7351 8314
         1547  +  HH bb 14849 15579 7584 8314   HH bb 14896 15579 7631 8314
         1548  +  HH bb 15224 15579 7959 8314   HH bb 15249 15579 7984 8314
         1549  +  HH bb 15446 15579 8181 8314   II aa 12899 13551 5841 6493
         1550  +  II aa 13153 13551 6095 6493   II bb 12746 13551 6029 6834
         1551  +  II bb 12880 13551 6163 6834   II bb 13108 13551 6391 6834
         1552  +  II bb 13130 13551 6413 6834   II bb 13301 13551 6584 6834
         1553  +  JJ aa 11984 12883 4755 5654   JJ aa 12115 12883 4886 5654
         1554  +  JJ aa 12649 12883 5420 5654   JJ aa 12770 12883 5541 5654
         1555  +  JJ bb 12044 12883 5551 6390   JJ bb 12529 12883 6036 6390
         1556  +  JJ bb 12547 12883 6054 6390   JJ bb 12626 12883 6133 6390}
         1557  +
  1142   1558   do_execsql_test 1.10.1 {
  1143   1559     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1144   1560   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
  1145   1561     AA bb 4685   AA bb 4685   BB aa 12025   BB aa 12025   BB aa 12025
  1146   1562     BB aa 12025   BB aa 12025   BB aa 12025   BB bb 12025   BB bb 12025
  1147   1563     BB bb 12025   BB bb 12025   BB bb 12025   BB bb 12025   CC aa 15147
  1148   1564     CC aa 15147   CC aa 15147   CC aa 15147   CC bb 15147   CC bb 15147
................................................................................
  1257   1673     FF bb 7633   FF bb 7912   FF bb 8105   GG aa 8280   GG aa 8434   GG aa 8579
  1258   1674     GG aa 8766   GG bb 9198   GG bb 9207   GG bb 9292   GG bb 9976   HH aa 9243
  1259   1675     HH aa 9432   HH aa 9742   HH bb 8948   HH bb 9181   HH bb 9228   HH bb 9556
  1260   1676     HH bb 9581   HH bb 9778   II aa 8712   II aa 8966   II bb 8278   II bb 8412
  1261   1677     II bb 8640   II bb 8662   II bb 8833   JJ aa 7949   JJ aa 8080   JJ aa 8614
  1262   1678     JJ aa 8735   JJ bb 6601   JJ bb 7086   JJ bb 7104   JJ bb 7183}
  1263   1679   
         1680  +do_execsql_test 1.10.8 {
         1681  +  SELECT a, b, 
         1682  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         1683  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 3 PRECEDING         AND 0 FOLLOWING ),
         1684  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         1685  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 3 PRECEDING         AND 0 FOLLOWING )
         1686  +    FROM t3 ORDER BY 1, 2, 3;
         1687  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
         1688  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
         1689  +  AA bb 3815 4685 3815 4685   AA bb 4058 4685 4058 4685
         1690  +  AA bb 4113 4685 4113 4685   AA bb 4376 4685 4376 4685
         1691  +  BB aa 11263 12025 6796 7558   BB aa 11365 12025 6898 7558
         1692  +  BB aa 11613 12025 7146 7558   BB aa 11626 12025 7159 7558
         1693  +  BB aa 11632 12025 7165 7558   BB aa 11778 12025 7311 7558
         1694  +  BB bb 11185 12025 11185 12025   BB bb 11233 12025 11233 12025
         1695  +  BB bb 11239 12025 11239 12025   BB bb 11314 12025 11314 12025
         1696  +  BB bb 11320 12025 11320 12025   BB bb 11392 12025 11392 12025
         1697  +  CC aa 14388 15147 10913 11672   CC aa 14540 15147 11065 11672
         1698  +  CC aa 14717 15147 11242 11672   CC aa 14989 15147 11514 11672
         1699  +  CC bb 14325 15147 9640 10462   CC bb 14801 15147 10116 10462
         1700  +  DD aa 18334 19179 8069 8914   DD aa 18923 19179 8658 8914
         1701  +  DD aa 18955 19179 8690 8914   DD bb 18220 19179 6195 7154
         1702  +  DD bb 18385 19179 6360 7154   DD bb 18463 19179 6438 7154
         1703  +  DD bb 18941 19179 6916 7154   EE aa 16256 17033 5313 6090
         1704  +  EE aa 16920 17033 5977 6090   EE bb 16265 17033 5803 6571
         1705  +  EE bb 16404 17033 5942 6571   EE bb 16781 17033 6319 6571
         1706  +  FF aa 14691 15361 6739 7409   FF aa 14694 15361 6742 7409
         1707  +  FF aa 14743 15361 6791 7409   FF aa 15153 15361 7201 7409
         1708  +  FF bb 14423 15361 7269 8207   FF bb 14491 15361 7337 8207
         1709  +  FF bb 14635 15361 7481 8207   FF bb 14787 15361 7633 8207
         1710  +  FF bb 15066 15361 7912 8207   FF bb 15259 15361 8105 8207
         1711  +  GG aa 16073 16707 8280 8914   GG aa 16227 16707 8434 8914
         1712  +  GG aa 16372 16707 8579 8914   GG aa 16559 16707 8766 8914
         1713  +  GG bb 15769 16707 9198 10136   GG bb 15778 16707 9207 10136
         1714  +  GG bb 15863 16707 9292 10136   GG bb 16547 16707 9976 10136
         1715  +  HH aa 17139 18118 9243 10222   HH aa 17328 18118 9432 10222
         1716  +  HH aa 17638 18118 9742 10222   HH bb 17155 18118 8948 9911
         1717  +  HH bb 17388 18118 9181 9911   HH bb 17435 18118 9228 9911
         1718  +  HH bb 17763 18118 9556 9911   HH bb 17788 18118 9581 9911
         1719  +  HH bb 17985 18118 9778 9911   II aa 18567 19219 8712 9364
         1720  +  II aa 18821 19219 8966 9364   II bb 18414 19219 8278 9083
         1721  +  II bb 18548 19219 8412 9083   II bb 18776 19219 8640 9083
         1722  +  II bb 18798 19219 8662 9083   II bb 18969 19219 8833 9083
         1723  +  JJ aa 16452 17351 7949 8848   JJ aa 16583 17351 8080 8848
         1724  +  JJ aa 17117 17351 8614 8848   JJ aa 17238 17351 8735 8848
         1725  +  JJ bb 16512 17351 6601 7440   JJ bb 16997 17351 7086 7440
         1726  +  JJ bb 17015 17351 7104 7440   JJ bb 17094 17351 7183 7440}
         1727  +
  1264   1728   do_execsql_test 1.11.1 {
  1265   1729     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1266   1730   } {AA aa 44737   AA aa 44737   AA aa 44737   AA aa 44737   AA bb 44737
  1267   1731     AA bb 44737   AA bb 44737   AA bb 44737   BB aa 44737   BB aa 44737
  1268   1732     BB aa 44737   BB aa 44737   BB aa 44737   BB aa 44737   BB bb 44737
  1269   1733     BB bb 44737   BB bb 44737   BB bb 44737   BB bb 44737   BB bb 44737
  1270   1734     CC aa 44737   CC aa 44737   CC aa 44737   CC aa 44737   CC bb 44737
................................................................................
  1382   1846     GG aa 22684   GG aa 22871   GG bb 19918   GG bb 19927   GG bb 20012
  1383   1847     GG bb 20696   HH aa 16372   HH aa 16561   HH aa 16871   HH bb 14791
  1384   1848     HH bb 15024   HH bb 15071   HH bb 15399   HH bb 15424   HH bb 15621
  1385   1849     II aa 12231   II aa 12485   II bb 9829   II bb 9963   II bb 10191
  1386   1850     II bb 10213   II bb 10384   JJ aa 6541   JJ aa 6672   JJ aa 7206
  1387   1851     JJ aa 7327   JJ bb 5551   JJ bb 6036   JJ bb 6054   JJ bb 6133}
  1388   1852   
         1853  +do_execsql_test 1.11.8 {
         1854  +  SELECT a, b, 
         1855  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         1856  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 2 PRECEDING         AND UNBOUNDED FOLLOWING ),
         1857  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         1858  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 2 PRECEDING         AND UNBOUNDED FOLLOWING )
         1859  +    FROM t3 ORDER BY 1, 2, 3;
         1860  +} {AA aa 43803 44737 43803 44737   AA aa 43826 44737 43826 44737
         1861  +  AA aa 44498 44737 44498 44737   AA aa 44514 44737 44514 44737
         1862  +  AA bb 43867 44737 43867 44737   AA bb 44110 44737 44110 44737
         1863  +  AA bb 44165 44737 44165 44737   AA bb 44428 44737 44428 44737
         1864  +  BB aa 43975 44737 43975 44737   BB aa 44077 44737 44077 44737
         1865  +  BB aa 44325 44737 44325 44737   BB aa 44338 44737 44338 44737
         1866  +  BB aa 44344 44737 44344 44737   BB aa 44490 44737 44490 44737
         1867  +  BB bb 43897 44737 41590 42430   BB bb 43945 44737 41638 42430
         1868  +  BB bb 43951 44737 41644 42430   BB bb 44026 44737 41719 42430
         1869  +  BB bb 44032 44737 41725 42430   BB bb 44104 44737 41797 42430
         1870  +  CC aa 43978 44737 39293 40052   CC aa 44130 44737 39445 40052
         1871  +  CC aa 44307 44737 39622 40052   CC aa 44579 44737 39894 40052
         1872  +  CC bb 43915 44737 36357 37179   CC bb 44391 44737 36833 37179
         1873  +  DD aa 39207 40052 31867 32712   DD aa 39796 40052 32456 32712
         1874  +  DD aa 39828 40052 32488 32712   DD bb 39093 40052 29799 30758
         1875  +  DD bb 39258 40052 29964 30758   DD bb 39336 40052 30042 30758
         1876  +  DD bb 39814 40052 30520 30758   EE aa 31935 32712 28813 29590
         1877  +  EE aa 32599 32712 29477 29590   EE bb 31944 32712 27497 28265
         1878  +  EE bb 32083 32712 27636 28265   EE bb 32460 32712 28013 28265
         1879  +  FF aa 28920 29590 24888 25558   FF aa 28923 29590 24891 25558
         1880  +  FF aa 28972 29590 24940 25558   FF aa 29382 29590 25350 25558
         1881  +  FF bb 28652 29590 23730 24668   FF bb 28720 29590 23798 24668
         1882  +  FF bb 28864 29590 23942 24668   FF bb 29016 29590 24094 24668
         1883  +  FF bb 29295 29590 24373 24668   FF bb 29488 29590 24566 24668
         1884  +  GG aa 24924 25558 22385 23019   GG aa 25078 25558 22539 23019
         1885  +  GG aa 25223 25558 22684 23019   GG aa 25410 25558 22871 23019
         1886  +  GG bb 24620 25558 19918 20856   GG bb 24629 25558 19927 20856
         1887  +  GG bb 24714 25558 20012 20856   GG bb 25398 25558 20696 20856
         1888  +  HH aa 22040 23019 16372 17351   HH aa 22229 23019 16561 17351
         1889  +  HH aa 22539 23019 16871 17351   HH bb 22056 23019 14791 15754
         1890  +  HH bb 22289 23019 15024 15754   HH bb 22336 23019 15071 15754
         1891  +  HH bb 22664 23019 15399 15754   HH bb 22689 23019 15424 15754
         1892  +  HH bb 22886 23019 15621 15754   II aa 16699 17351 12231 12883
         1893  +  II aa 16953 17351 12485 12883   II bb 16546 17351 9829 10634
         1894  +  II bb 16680 17351 9963 10634   II bb 16908 17351 10191 10634
         1895  +  II bb 16930 17351 10213 10634   II bb 17101 17351 10384 10634
         1896  +  JJ aa 11984 12883 6541 7440   JJ aa 12115 12883 6672 7440
         1897  +  JJ aa 12649 12883 7206 7440   JJ aa 12770 12883 7327 7440
         1898  +  JJ bb 12044 12883 5551 6390   JJ bb 12529 12883 6036 6390
         1899  +  JJ bb 12547 12883 6054 6390   JJ bb 12626 12883 6133 6390}
         1900  +
  1389   1901   do_execsql_test 1.12.1 {
  1390   1902     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1391   1903   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
  1392   1904     AA bb 4685   AA bb 4685   BB aa 7340   BB aa 7340   BB aa 7340   BB aa 7340
  1393   1905     BB aa 7340   BB aa 7340   BB bb 7340   BB bb 7340   BB bb 7340   BB bb 7340
  1394   1906     BB bb 7340   BB bb 7340   CC aa 3122   CC aa 3122   CC aa 3122   CC aa 3122
  1395   1907     CC bb 3122   CC bb 3122   DD aa 4032   DD aa 4032   DD aa 4032   DD bb 4032
................................................................................
  1499   2011     GG aa 963   GG aa 1117   GG aa 1262   GG aa 1449   GG bb 1933   GG bb 1942
  1500   2012     GG bb 2027   GG bb 2711   HH aa 1270   HH aa 1459   HH aa 1769   HH bb 2231
  1501   2013     HH bb 2464   HH bb 2511   HH bb 2839   HH bb 2864   HH bb 3061   II aa 398
  1502   2014     II aa 652   II bb 1785   II bb 1919   II bb 2147   II bb 2169   II bb 2340
  1503   2015     JJ aa 1115   JJ aa 1246   JJ aa 1780   JJ aa 1901   JJ bb 947   JJ bb 1432
  1504   2016     JJ bb 1450   JJ bb 1529}
  1505   2017   
         2018  +do_execsql_test 1.12.8 {
         2019  +  SELECT a, b, 
         2020  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2021  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 0 FOLLOWING ),
         2022  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2023  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 0 FOLLOWING )
         2024  +    FROM t3 ORDER BY 1, 2, 3;
         2025  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
         2026  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
         2027  +  AA bb 3815 4685 1508 2378   AA bb 4058 4685 1751 2378
         2028  +  AA bb 4113 4685 1806 2378   AA bb 4376 4685 2069 2378
         2029  +  BB aa 6578 7340 2111 2873   BB aa 6680 7340 2213 2873
         2030  +  BB aa 6928 7340 2461 2873   BB aa 6941 7340 2474 2873
         2031  +  BB aa 6947 7340 2480 2873   BB aa 7093 7340 2626 2873
         2032  +  BB bb 6500 7340 3627 4467   BB bb 6548 7340 3675 4467
         2033  +  BB bb 6554 7340 3681 4467   BB bb 6629 7340 3756 4467
         2034  +  BB bb 6635 7340 3762 4467   BB bb 6707 7340 3834 4467
         2035  +  CC aa 2363 3122 1195 1954   CC aa 2515 3122 1347 1954
         2036  +  CC aa 2692 3122 1524 1954   CC aa 2964 3122 1796 1954
         2037  +  CC bb 2300 3122 346 1168   CC bb 2776 3122 822 1168
         2038  +  DD aa 3187 4032 480 1325   DD aa 3776 4032 1069 1325
         2039  +  DD aa 3808 4032 1101 1325   DD bb 3073 4032 1748 2707
         2040  +  DD bb 3238 4032 1913 2707   DD bb 3316 4032 1991 2707
         2041  +  DD bb 3794 4032 2469 2707   EE aa 1762 2539 113 890
         2042  +  EE aa 2426 2539 777 890   EE bb 1771 2539 881 1649
         2043  +  EE bb 1910 2539 1020 1649   EE bb 2287 2539 1397 1649
         2044  +  FF aa 4998 5668 1493 2163   FF aa 5001 5668 1496 2163
         2045  +  FF aa 5050 5668 1545 2163   FF aa 5460 5668 1955 2163
         2046  +  FF bb 4730 5668 2567 3505   FF bb 4798 5668 2635 3505
         2047  +  FF bb 4942 5668 2779 3505   FF bb 5094 5668 2931 3505
         2048  +  FF bb 5373 5668 3210 3505   FF bb 5566 5668 3403 3505
         2049  +  GG aa 3834 4468 963 1597   GG aa 3988 4468 1117 1597
         2050  +  GG aa 4133 4468 1262 1597   GG aa 4320 4468 1449 1597
         2051  +  GG bb 3530 4468 1933 2871   GG bb 3539 4468 1942 2871
         2052  +  GG bb 3624 4468 2027 2871   GG bb 4308 4468 2711 2871
         2053  +  HH aa 4464 5443 1270 2249   HH aa 4653 5443 1459 2249
         2054  +  HH aa 4963 5443 1769 2249   HH bb 4480 5443 2231 3194
         2055  +  HH bb 4713 5443 2464 3194   HH bb 4760 5443 2511 3194
         2056  +  HH bb 5088 5443 2839 3194   HH bb 5113 5443 2864 3194
         2057  +  HH bb 5310 5443 3061 3194   II aa 2988 3640 398 1050
         2058  +  II aa 3242 3640 652 1050   II bb 2835 3640 1785 2590
         2059  +  II bb 2969 3640 1919 2590   II bb 3197 3640 2147 2590
         2060  +  II bb 3219 3640 2169 2590   II bb 3390 3640 2340 2590
         2061  +  JJ aa 2901 3800 1115 2014   JJ aa 3032 3800 1246 2014
         2062  +  JJ aa 3566 3800 1780 2014   JJ aa 3687 3800 1901 2014
         2063  +  JJ bb 2961 3800 947 1786   JJ bb 3446 3800 1432 1786
         2064  +  JJ bb 3464 3800 1450 1786   JJ bb 3543 3800 1529 1786}
         2065  +
  1506   2066   do_execsql_test 1.13.1 {
  1507   2067     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 1 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1508   2068   } {AA aa 12025   AA aa 12025   AA aa 12025   AA aa 12025   AA bb 12025
  1509   2069     AA bb 12025   AA bb 12025   AA bb 12025   BB aa 10462   BB aa 10462
  1510   2070     BB aa 10462   BB aa 10462   BB aa 10462   BB aa 10462   BB bb 10462
  1511   2071     BB bb 10462   BB bb 10462   BB bb 10462   BB bb 10462   BB bb 10462
  1512   2072     CC aa 7154   CC aa 7154   CC aa 7154   CC aa 7154   CC bb 7154   CC bb 7154
................................................................................
  1617   2177     GG aa 3834   GG aa 3988   GG aa 4133   GG aa 4320   GG bb 4182   GG bb 4191
  1618   2178     GG bb 4276   GG bb 4960   HH aa 4464   HH aa 4653   HH aa 4963   HH bb 3281
  1619   2179     HH bb 3514   HH bb 3561   HH bb 3889   HH bb 3914   HH bb 4111   II aa 2988
  1620   2180     II aa 3242   II bb 3799   II bb 3933   II bb 4161   II bb 4183   II bb 4354
  1621   2181     JJ aa 2901   JJ aa 3032   JJ aa 3566   JJ aa 3687   JJ bb 947   JJ bb 1432
  1622   2182     JJ bb 1450   JJ bb 1529}
  1623   2183   
         2184  +do_execsql_test 1.13.8 {
         2185  +  SELECT a, b, 
         2186  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 1 FOLLOWING  EXCLUDE CURRENT ROW),
         2187  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 1 FOLLOWING ),
         2188  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 1 FOLLOWING  EXCLUDE CURRENT ROW),
         2189  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 1 FOLLOWING )
         2190  +    FROM t3 ORDER BY 1, 2, 3;
         2191  +} {AA aa 11091 12025 3751 4685   AA aa 11114 12025 3774 4685
         2192  +  AA aa 11786 12025 4446 4685   AA aa 11802 12025 4462 4685
         2193  +  AA bb 11155 12025 4381 5251   AA bb 11398 12025 4624 5251
         2194  +  AA bb 11453 12025 4679 5251   AA bb 11716 12025 4942 5251
         2195  +  BB aa 9700 10462 6578 7340   BB aa 9802 10462 6680 7340
         2196  +  BB aa 10050 10462 6928 7340   BB aa 10063 10462 6941 7340
         2197  +  BB aa 10069 10462 6947 7340   BB aa 10215 10462 7093 7340
         2198  +  BB bb 9622 10462 5581 6421   BB bb 9670 10462 5629 6421
         2199  +  BB bb 9676 10462 5635 6421   BB bb 9751 10462 5710 6421
         2200  +  BB bb 9757 10462 5716 6421   BB bb 9829 10462 5788 6421
         2201  +  CC aa 6395 7154 2363 3122   CC aa 6547 7154 2515 3122
         2202  +  CC aa 6724 7154 2692 3122   CC aa 6996 7154 2964 3122
         2203  +  CC bb 6332 7154 1671 2493   CC bb 6808 7154 2147 2493
         2204  +  DD aa 5726 6571 3187 4032   DD aa 6315 6571 3776 4032
         2205  +  DD aa 6347 6571 3808 4032   DD bb 5612 6571 2638 3597
         2206  +  DD bb 5777 6571 2803 3597   DD bb 5855 6571 2881 3597
         2207  +  DD bb 6333 6571 3359 3597   EE aa 7430 8207 1762 2539
         2208  +  EE aa 8094 8207 2426 2539   EE bb 7439 8207 3044 3812
         2209  +  EE bb 7578 8207 3183 3812   EE bb 7955 8207 3560 3812
         2210  +  FF aa 9466 10136 4998 5668   FF aa 9469 10136 5001 5668
         2211  +  FF aa 9518 10136 5050 5668   FF aa 9928 10136 5460 5668
         2212  +  FF bb 9198 10136 4164 5102   FF bb 9266 10136 4232 5102
         2213  +  FF bb 9410 10136 4376 5102   FF bb 9562 10136 4528 5102
         2214  +  FF bb 9841 10136 4807 5102   FF bb 10034 10136 5000 5102
         2215  +  GG aa 9277 9911 3834 4468   GG aa 9431 9911 3988 4468
         2216  +  GG aa 9576 9911 4133 4468   GG aa 9763 9911 4320 4468
         2217  +  GG bb 8973 9911 4182 5120   GG bb 8982 9911 4191 5120
         2218  +  GG bb 9067 9911 4276 5120   GG bb 9751 9911 4960 5120
         2219  +  HH aa 8104 9083 4464 5443   HH aa 8293 9083 4653 5443
         2220  +  HH aa 8603 9083 4963 5443   HH bb 8120 9083 3281 4244
         2221  +  HH bb 8353 9083 3514 4244   HH bb 8400 9083 3561 4244
         2222  +  HH bb 8728 9083 3889 4244   HH bb 8753 9083 3914 4244
         2223  +  HH bb 8950 9083 4111 4244   II aa 6788 7440 2988 3640
         2224  +  II aa 7042 7440 3242 3640   II bb 6635 7440 3799 4604
         2225  +  II bb 6769 7440 3933 4604   II bb 6997 7440 4161 4604
         2226  +  II bb 7019 7440 4183 4604   II bb 7190 7440 4354 4604
         2227  +  JJ aa 2901 3800 2901 3800   JJ aa 3032 3800 3032 3800
         2228  +  JJ aa 3566 3800 3566 3800   JJ aa 3687 3800 3687 3800
         2229  +  JJ bb 2961 3800 947 1786   JJ bb 3446 3800 1432 1786
         2230  +  JJ bb 3464 3800 1450 1786   JJ bb 3543 3800 1529 1786}
         2231  +
  1624   2232   do_execsql_test 1.14.1 {
  1625   2233     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 100 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1626   2234   } {AA aa 44737   AA aa 44737   AA aa 44737   AA aa 44737   AA bb 44737
  1627   2235     AA bb 44737   AA bb 44737   AA bb 44737   BB aa 40052   BB aa 40052
  1628   2236     BB aa 40052   BB aa 40052   BB aa 40052   BB aa 40052   BB bb 40052
  1629   2237     BB bb 40052   BB bb 40052   BB bb 40052   BB bb 40052   BB bb 40052
  1630   2238     CC aa 32712   CC aa 32712   CC aa 32712   CC aa 32712   CC bb 32712
................................................................................
  1742   2350     GG aa 17016   GG aa 17203   GG bb 14816   GG bb 14825   GG bb 14910
  1743   2351     GG bb 15594   HH aa 11904   HH aa 12093   HH aa 12403   HH bb 9671
  1744   2352     HH bb 9904   HH bb 9951   HH bb 10279   HH bb 10304   HH bb 10501
  1745   2353     II aa 6788   II aa 7042   II bb 5585   II bb 5719   II bb 5947   II bb 5969
  1746   2354     II bb 6140   JJ aa 2901   JJ aa 3032   JJ aa 3566   JJ aa 3687   JJ bb 947
  1747   2355     JJ bb 1432   JJ bb 1450   JJ bb 1529}
  1748   2356   
         2357  +do_execsql_test 1.14.8 {
         2358  +  SELECT a, b, 
         2359  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 100 FOLLOWING  EXCLUDE CURRENT ROW),
         2360  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND 100 FOLLOWING ),
         2361  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 100 FOLLOWING  EXCLUDE CURRENT ROW),
         2362  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND 100 FOLLOWING )
         2363  +    FROM t3 ORDER BY 1, 2, 3;
         2364  +} {AA aa 43803 44737 43803 44737   AA aa 43826 44737 43826 44737
         2365  +  AA aa 44498 44737 44498 44737   AA aa 44514 44737 44514 44737
         2366  +  AA bb 43867 44737 41560 42430   AA bb 44110 44737 41803 42430
         2367  +  AA bb 44165 44737 41858 42430   AA bb 44428 44737 42121 42430
         2368  +  BB aa 39290 40052 39290 40052   BB aa 39392 40052 39392 40052
         2369  +  BB aa 39640 40052 39640 40052   BB aa 39653 40052 39653 40052
         2370  +  BB aa 39659 40052 39659 40052   BB aa 39805 40052 39805 40052
         2371  +  BB bb 39212 40052 36339 37179   BB bb 39260 40052 36387 37179
         2372  +  BB bb 39266 40052 36393 37179   BB bb 39341 40052 36468 37179
         2373  +  BB bb 39347 40052 36474 37179   BB bb 39419 40052 36546 37179
         2374  +  CC aa 31953 32712 31953 32712   CC aa 32105 32712 32105 32712
         2375  +  CC aa 32282 32712 32282 32712   CC aa 32554 32712 32554 32712
         2376  +  CC bb 31890 32712 29936 30758   CC bb 32366 32712 30412 30758
         2377  +  DD aa 28745 29590 28745 29590   DD aa 29334 29590 29334 29590
         2378  +  DD aa 29366 29590 29366 29590   DD bb 28631 29590 27306 28265
         2379  +  DD bb 28796 29590 27471 28265   DD bb 28874 29590 27549 28265
         2380  +  DD bb 29352 29590 28027 28265   EE aa 24781 25558 24781 25558
         2381  +  EE aa 25445 25558 25445 25558   EE bb 24790 25558 23900 24668
         2382  +  EE bb 24929 25558 24039 24668   EE bb 25306 25558 24416 24668
         2383  +  FF aa 22349 23019 22349 23019   FF aa 22352 23019 22352 23019
         2384  +  FF aa 22401 23019 22401 23019   FF aa 22811 23019 22811 23019
         2385  +  FF bb 22081 23019 19918 20856   FF bb 22149 23019 19986 20856
         2386  +  FF bb 22293 23019 20130 20856   FF bb 22445 23019 20282 20856
         2387  +  FF bb 22724 23019 20561 20856   FF bb 22917 23019 20754 20856
         2388  +  GG aa 16717 17351 16717 17351   GG aa 16871 17351 16871 17351
         2389  +  GG aa 17016 17351 17016 17351   GG aa 17203 17351 17203 17351
         2390  +  GG bb 16413 17351 14816 15754   GG bb 16422 17351 14825 15754
         2391  +  GG bb 16507 17351 14910 15754   GG bb 17191 17351 15594 15754
         2392  +  HH aa 11904 12883 11904 12883   HH aa 12093 12883 12093 12883
         2393  +  HH aa 12403 12883 12403 12883   HH bb 11920 12883 9671 10634
         2394  +  HH bb 12153 12883 9904 10634   HH bb 12200 12883 9951 10634
         2395  +  HH bb 12528 12883 10279 10634   HH bb 12553 12883 10304 10634
         2396  +  HH bb 12750 12883 10501 10634   II aa 6788 7440 6788 7440
         2397  +  II aa 7042 7440 7042 7440   II bb 6635 7440 5585 6390
         2398  +  II bb 6769 7440 5719 6390   II bb 6997 7440 5947 6390
         2399  +  II bb 7019 7440 5969 6390   II bb 7190 7440 6140 6390
         2400  +  JJ aa 2901 3800 2901 3800   JJ aa 3032 3800 3032 3800
         2401  +  JJ aa 3566 3800 3566 3800   JJ aa 3687 3800 3687 3800
         2402  +  JJ bb 2961 3800 947 1786   JJ bb 3446 3800 1432 1786
         2403  +  JJ bb 3464 3800 1450 1786   JJ bb 3543 3800 1529 1786}
         2404  +
  1749   2405   do_execsql_test 1.15.1 {
  1750   2406     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1751   2407   } {AA aa 44737   AA aa 44737   AA aa 44737   AA aa 44737   AA bb 44737
  1752   2408     AA bb 44737   AA bb 44737   AA bb 44737   BB aa 40052   BB aa 40052
  1753   2409     BB aa 40052   BB aa 40052   BB aa 40052   BB aa 40052   BB bb 40052
  1754   2410     BB bb 40052   BB bb 40052   BB bb 40052   BB bb 40052   BB bb 40052
  1755   2411     CC aa 32712   CC aa 32712   CC aa 32712   CC aa 32712   CC bb 32712
................................................................................
  1867   2523     GG aa 17016   GG aa 17203   GG bb 14816   GG bb 14825   GG bb 14910
  1868   2524     GG bb 15594   HH aa 11904   HH aa 12093   HH aa 12403   HH bb 9671
  1869   2525     HH bb 9904   HH bb 9951   HH bb 10279   HH bb 10304   HH bb 10501
  1870   2526     II aa 6788   II aa 7042   II bb 5585   II bb 5719   II bb 5947   II bb 5969
  1871   2527     II bb 6140   JJ aa 2901   JJ aa 3032   JJ aa 3566   JJ aa 3687   JJ bb 947
  1872   2528     JJ bb 1432   JJ bb 1450   JJ bb 1529}
  1873   2529   
         2530  +do_execsql_test 1.15.8 {
         2531  +  SELECT a, b, 
         2532  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         2533  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN CURRENT ROW         AND UNBOUNDED FOLLOWING ),
         2534  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         2535  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN CURRENT ROW         AND UNBOUNDED FOLLOWING )
         2536  +    FROM t3 ORDER BY 1, 2, 3;
         2537  +} {AA aa 43803 44737 43803 44737   AA aa 43826 44737 43826 44737
         2538  +  AA aa 44498 44737 44498 44737   AA aa 44514 44737 44514 44737
         2539  +  AA bb 43867 44737 41560 42430   AA bb 44110 44737 41803 42430
         2540  +  AA bb 44165 44737 41858 42430   AA bb 44428 44737 42121 42430
         2541  +  BB aa 39290 40052 39290 40052   BB aa 39392 40052 39392 40052
         2542  +  BB aa 39640 40052 39640 40052   BB aa 39653 40052 39653 40052
         2543  +  BB aa 39659 40052 39659 40052   BB aa 39805 40052 39805 40052
         2544  +  BB bb 39212 40052 36339 37179   BB bb 39260 40052 36387 37179
         2545  +  BB bb 39266 40052 36393 37179   BB bb 39341 40052 36468 37179
         2546  +  BB bb 39347 40052 36474 37179   BB bb 39419 40052 36546 37179
         2547  +  CC aa 31953 32712 31953 32712   CC aa 32105 32712 32105 32712
         2548  +  CC aa 32282 32712 32282 32712   CC aa 32554 32712 32554 32712
         2549  +  CC bb 31890 32712 29936 30758   CC bb 32366 32712 30412 30758
         2550  +  DD aa 28745 29590 28745 29590   DD aa 29334 29590 29334 29590
         2551  +  DD aa 29366 29590 29366 29590   DD bb 28631 29590 27306 28265
         2552  +  DD bb 28796 29590 27471 28265   DD bb 28874 29590 27549 28265
         2553  +  DD bb 29352 29590 28027 28265   EE aa 24781 25558 24781 25558
         2554  +  EE aa 25445 25558 25445 25558   EE bb 24790 25558 23900 24668
         2555  +  EE bb 24929 25558 24039 24668   EE bb 25306 25558 24416 24668
         2556  +  FF aa 22349 23019 22349 23019   FF aa 22352 23019 22352 23019
         2557  +  FF aa 22401 23019 22401 23019   FF aa 22811 23019 22811 23019
         2558  +  FF bb 22081 23019 19918 20856   FF bb 22149 23019 19986 20856
         2559  +  FF bb 22293 23019 20130 20856   FF bb 22445 23019 20282 20856
         2560  +  FF bb 22724 23019 20561 20856   FF bb 22917 23019 20754 20856
         2561  +  GG aa 16717 17351 16717 17351   GG aa 16871 17351 16871 17351
         2562  +  GG aa 17016 17351 17016 17351   GG aa 17203 17351 17203 17351
         2563  +  GG bb 16413 17351 14816 15754   GG bb 16422 17351 14825 15754
         2564  +  GG bb 16507 17351 14910 15754   GG bb 17191 17351 15594 15754
         2565  +  HH aa 11904 12883 11904 12883   HH aa 12093 12883 12093 12883
         2566  +  HH aa 12403 12883 12403 12883   HH bb 11920 12883 9671 10634
         2567  +  HH bb 12153 12883 9904 10634   HH bb 12200 12883 9951 10634
         2568  +  HH bb 12528 12883 10279 10634   HH bb 12553 12883 10304 10634
         2569  +  HH bb 12750 12883 10501 10634   II aa 6788 7440 6788 7440
         2570  +  II aa 7042 7440 7042 7440   II bb 6635 7440 5585 6390
         2571  +  II bb 6769 7440 5719 6390   II bb 6997 7440 5947 6390
         2572  +  II bb 7019 7440 5969 6390   II bb 7190 7440 6140 6390
         2573  +  JJ aa 2901 3800 2901 3800   JJ aa 3032 3800 3032 3800
         2574  +  JJ aa 3566 3800 3566 3800   JJ aa 3687 3800 3687 3800
         2575  +  JJ bb 2961 3800 947 1786   JJ bb 3446 3800 1432 1786
         2576  +  JJ bb 3464 3800 1450 1786   JJ bb 3543 3800 1529 1786}
         2577  +
  1874   2578   do_execsql_test 1.16.1 {
  1875   2579     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 0 FOLLOWING         AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1876   2580   } {AA aa 4685   AA aa 4685   AA aa 4685   AA aa 4685   AA bb 4685   AA bb 4685
  1877   2581     AA bb 4685   AA bb 4685   BB aa 7340   BB aa 7340   BB aa 7340   BB aa 7340
  1878   2582     BB aa 7340   BB aa 7340   BB bb 7340   BB bb 7340   BB bb 7340   BB bb 7340
  1879   2583     BB bb 7340   BB bb 7340   CC aa 3122   CC aa 3122   CC aa 3122   CC aa 3122
  1880   2584     CC bb 3122   CC bb 3122   DD aa 4032   DD aa 4032   DD aa 4032   DD bb 4032
................................................................................
  1984   2688     GG aa 963   GG aa 1117   GG aa 1262   GG aa 1449   GG bb 1933   GG bb 1942
  1985   2689     GG bb 2027   GG bb 2711   HH aa 1270   HH aa 1459   HH aa 1769   HH bb 2231
  1986   2690     HH bb 2464   HH bb 2511   HH bb 2839   HH bb 2864   HH bb 3061   II aa 398
  1987   2691     II aa 652   II bb 1785   II bb 1919   II bb 2147   II bb 2169   II bb 2340
  1988   2692     JJ aa 1115   JJ aa 1246   JJ aa 1780   JJ aa 1901   JJ bb 947   JJ bb 1432
  1989   2693     JJ bb 1450   JJ bb 1529}
  1990   2694   
         2695  +do_execsql_test 1.16.8 {
         2696  +  SELECT a, b, 
         2697  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 0 FOLLOWING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2698  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 0 FOLLOWING         AND 0 FOLLOWING ),
         2699  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 0 FOLLOWING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2700  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 0 FOLLOWING         AND 0 FOLLOWING )
         2701  +    FROM t3 ORDER BY 1, 2, 3;
         2702  +} {AA aa 3751 4685 1373 2307   AA aa 3774 4685 1396 2307
         2703  +  AA aa 4446 4685 2068 2307   AA aa 4462 4685 2084 2307
         2704  +  AA bb 3815 4685 1508 2378   AA bb 4058 4685 1751 2378
         2705  +  AA bb 4113 4685 1806 2378   AA bb 4376 4685 2069 2378
         2706  +  BB aa 6578 7340 2111 2873   BB aa 6680 7340 2213 2873
         2707  +  BB aa 6928 7340 2461 2873   BB aa 6941 7340 2474 2873
         2708  +  BB aa 6947 7340 2480 2873   BB aa 7093 7340 2626 2873
         2709  +  BB bb 6500 7340 3627 4467   BB bb 6548 7340 3675 4467
         2710  +  BB bb 6554 7340 3681 4467   BB bb 6629 7340 3756 4467
         2711  +  BB bb 6635 7340 3762 4467   BB bb 6707 7340 3834 4467
         2712  +  CC aa 2363 3122 1195 1954   CC aa 2515 3122 1347 1954
         2713  +  CC aa 2692 3122 1524 1954   CC aa 2964 3122 1796 1954
         2714  +  CC bb 2300 3122 346 1168   CC bb 2776 3122 822 1168
         2715  +  DD aa 3187 4032 480 1325   DD aa 3776 4032 1069 1325
         2716  +  DD aa 3808 4032 1101 1325   DD bb 3073 4032 1748 2707
         2717  +  DD bb 3238 4032 1913 2707   DD bb 3316 4032 1991 2707
         2718  +  DD bb 3794 4032 2469 2707   EE aa 1762 2539 113 890
         2719  +  EE aa 2426 2539 777 890   EE bb 1771 2539 881 1649
         2720  +  EE bb 1910 2539 1020 1649   EE bb 2287 2539 1397 1649
         2721  +  FF aa 4998 5668 1493 2163   FF aa 5001 5668 1496 2163
         2722  +  FF aa 5050 5668 1545 2163   FF aa 5460 5668 1955 2163
         2723  +  FF bb 4730 5668 2567 3505   FF bb 4798 5668 2635 3505
         2724  +  FF bb 4942 5668 2779 3505   FF bb 5094 5668 2931 3505
         2725  +  FF bb 5373 5668 3210 3505   FF bb 5566 5668 3403 3505
         2726  +  GG aa 3834 4468 963 1597   GG aa 3988 4468 1117 1597
         2727  +  GG aa 4133 4468 1262 1597   GG aa 4320 4468 1449 1597
         2728  +  GG bb 3530 4468 1933 2871   GG bb 3539 4468 1942 2871
         2729  +  GG bb 3624 4468 2027 2871   GG bb 4308 4468 2711 2871
         2730  +  HH aa 4464 5443 1270 2249   HH aa 4653 5443 1459 2249
         2731  +  HH aa 4963 5443 1769 2249   HH bb 4480 5443 2231 3194
         2732  +  HH bb 4713 5443 2464 3194   HH bb 4760 5443 2511 3194
         2733  +  HH bb 5088 5443 2839 3194   HH bb 5113 5443 2864 3194
         2734  +  HH bb 5310 5443 3061 3194   II aa 2988 3640 398 1050
         2735  +  II aa 3242 3640 652 1050   II bb 2835 3640 1785 2590
         2736  +  II bb 2969 3640 1919 2590   II bb 3197 3640 2147 2590
         2737  +  II bb 3219 3640 2169 2590   II bb 3390 3640 2340 2590
         2738  +  JJ aa 2901 3800 1115 2014   JJ aa 3032 3800 1246 2014
         2739  +  JJ aa 3566 3800 1780 2014   JJ aa 3687 3800 1901 2014
         2740  +  JJ bb 2961 3800 947 1786   JJ bb 3446 3800 1432 1786
         2741  +  JJ bb 3464 3800 1450 1786   JJ bb 3543 3800 1529 1786}
         2742  +
  1991   2743   do_execsql_test 1.17.1 {
  1992   2744     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 0 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  1993   2745   } {AA aa {}   AA aa {}   AA aa {}   AA aa {}   AA bb {}   AA bb {}   AA bb {}
  1994   2746     AA bb {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}   BB aa {}
  1995   2747     BB bb {}   BB bb {}   BB bb {}   BB bb {}   BB bb {}   BB bb {}   CC aa {}
  1996   2748     CC aa {}   CC aa {}   CC aa {}   CC bb {}   CC bb {}   DD aa {}   DD aa {}
  1997   2749     DD aa {}   DD bb {}   DD bb {}   DD bb {}   DD bb {}   EE aa {}   EE aa {}
................................................................................
  2089   2841     FF bb {}   FF bb {}   FF bb {}   FF bb {}   FF bb {}   FF bb {}   GG aa {}
  2090   2842     GG aa {}   GG aa {}   GG aa {}   GG bb {}   GG bb {}   GG bb {}   GG bb {}
  2091   2843     HH aa {}   HH aa {}   HH aa {}   HH bb {}   HH bb {}   HH bb {}   HH bb {}
  2092   2844     HH bb {}   HH bb {}   II aa {}   II aa {}   II bb {}   II bb {}   II bb {}
  2093   2845     II bb {}   II bb {}   JJ aa {}   JJ aa {}   JJ aa {}   JJ aa {}   JJ bb {}
  2094   2846     JJ bb {}   JJ bb {}   JJ bb {}}
  2095   2847   
         2848  +do_execsql_test 1.17.8 {
         2849  +  SELECT a, b, 
         2850  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2851  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 0 FOLLOWING ),
         2852  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND 0 FOLLOWING  EXCLUDE CURRENT ROW),
         2853  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND 0 FOLLOWING )
         2854  +    FROM t3 ORDER BY 1, 2, 3;
         2855  +} {AA aa {} {} {} {}   AA aa {} {} {} {}   AA aa {} {} {} {}
         2856  +  AA aa {} {} {} {}   AA bb {} {} {} {}   AA bb {} {} {} {}
         2857  +  AA bb {} {} {} {}   AA bb {} {} {} {}   BB aa {} {} {} {}
         2858  +  BB aa {} {} {} {}   BB aa {} {} {} {}   BB aa {} {} {} {}
         2859  +  BB aa {} {} {} {}   BB aa {} {} {} {}   BB bb {} {} {} {}
         2860  +  BB bb {} {} {} {}   BB bb {} {} {} {}   BB bb {} {} {} {}
         2861  +  BB bb {} {} {} {}   BB bb {} {} {} {}   CC aa {} {} {} {}
         2862  +  CC aa {} {} {} {}   CC aa {} {} {} {}   CC aa {} {} {} {}
         2863  +  CC bb {} {} {} {}   CC bb {} {} {} {}   DD aa {} {} {} {}
         2864  +  DD aa {} {} {} {}   DD aa {} {} {} {}   DD bb {} {} {} {}
         2865  +  DD bb {} {} {} {}   DD bb {} {} {} {}   DD bb {} {} {} {}
         2866  +  EE aa {} {} {} {}   EE aa {} {} {} {}   EE bb {} {} {} {}
         2867  +  EE bb {} {} {} {}   EE bb {} {} {} {}   FF aa {} {} {} {}
         2868  +  FF aa {} {} {} {}   FF aa {} {} {} {}   FF aa {} {} {} {}
         2869  +  FF bb {} {} {} {}   FF bb {} {} {} {}   FF bb {} {} {} {}
         2870  +  FF bb {} {} {} {}   FF bb {} {} {} {}   FF bb {} {} {} {}
         2871  +  GG aa {} {} {} {}   GG aa {} {} {} {}   GG aa {} {} {} {}
         2872  +  GG aa {} {} {} {}   GG bb {} {} {} {}   GG bb {} {} {} {}
         2873  +  GG bb {} {} {} {}   GG bb {} {} {} {}   HH aa {} {} {} {}
         2874  +  HH aa {} {} {} {}   HH aa {} {} {} {}   HH bb {} {} {} {}
         2875  +  HH bb {} {} {} {}   HH bb {} {} {} {}   HH bb {} {} {} {}
         2876  +  HH bb {} {} {} {}   HH bb {} {} {} {}   II aa {} {} {} {}
         2877  +  II aa {} {} {} {}   II bb {} {} {} {}   II bb {} {} {} {}
         2878  +  II bb {} {} {} {}   II bb {} {} {} {}   II bb {} {} {} {}
         2879  +  JJ aa {} {} {} {}   JJ aa {} {} {} {}   JJ aa {} {} {} {}
         2880  +  JJ aa {} {} {} {}   JJ bb {} {} {} {}   JJ bb {} {} {} {}
         2881  +  JJ bb {} {} {} {}   JJ bb {} {} {} {}}
         2882  +
  2096   2883   do_execsql_test 1.18.1 {
  2097   2884     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 5 FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  2098   2885   } {AA aa 22701   AA aa 22701   AA aa 22701   AA aa 22701   AA bb 22701
  2099   2886     AA bb 22701   AA bb 22701   AA bb 22701   BB aa 19829   BB aa 19829
  2100   2887     BB aa 19829   BB aa 19829   BB aa 19829   BB aa 19829   BB bb 19829
  2101   2888     BB bb 19829   BB bb 19829   BB bb 19829   BB bb 19829   BB bb 19829
  2102   2889     CC aa 22150   CC aa 22150   CC aa 22150   CC aa 22150   CC bb 22150
................................................................................
  2214   3001     GG aa 11954   GG bb 11097   GG bb 11097   GG bb 11097   GG bb 11097
  2215   3002     HH aa 10634   HH aa 10634   HH aa 10634   HH bb 7440   HH bb 7440
  2216   3003     HH bb 7440   HH bb 7440   HH bb 7440   HH bb 7440   II aa 6390   II aa 6390
  2217   3004     II bb 3800   II bb 3800   II bb 3800   II bb 3800   II bb 3800   JJ aa 1786
  2218   3005     JJ aa 1786   JJ aa 1786   JJ aa 1786   JJ bb {}   JJ bb {}   JJ bb {}
  2219   3006     JJ bb {}}
  2220   3007   
         3008  +do_execsql_test 1.18.8 {
         3009  +  SELECT a, b, 
         3010  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 5 FOLLOWING  EXCLUDE CURRENT ROW),
         3011  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND 5 FOLLOWING ),
         3012  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND 5 FOLLOWING  EXCLUDE CURRENT ROW),
         3013  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND 5 FOLLOWING )
         3014  +    FROM t3 ORDER BY 1, 2, 3;
         3015  +} {AA aa 22701 22701 12840 12840   AA aa 22701 22701 12840 12840
         3016  +  AA aa 22701 22701 12840 12840   AA aa 22701 22701 12840 12840
         3017  +  AA bb 22701 22701 11787 11787   AA bb 22701 22701 11787 11787
         3018  +  AA bb 22701 22701 11787 11787   AA bb 22701 22701 11787 11787
         3019  +  BB aa 19829 19829 11621 11621   BB aa 19829 19829 11621 11621
         3020  +  BB aa 19829 19829 11621 11621   BB aa 19829 19829 11621 11621
         3021  +  BB aa 19829 19829 11621 11621   BB aa 19829 19829 11621 11621
         3022  +  BB bb 19829 19829 8044 8044   BB bb 19829 19829 8044 8044
         3023  +  BB bb 19829 19829 8044 8044   BB bb 19829 19829 8044 8044
         3024  +  BB bb 19829 19829 8044 8044   BB bb 19829 19829 8044 8044
         3025  +  CC aa 22150 22150 7739 7739   CC aa 22150 22150 7739 7739
         3026  +  CC aa 22150 22150 7739 7739   CC aa 22150 22150 7739 7739
         3027  +  CC bb 22150 22150 8734 8734   CC bb 22150 22150 8734 8734
         3028  +  DD aa 21758 21758 10914 10914   DD aa 21758 21758 10914 10914
         3029  +  DD aa 21758 21758 10914 10914   DD bb 21758 21758 9804 9804
         3030  +  DD bb 21758 21758 9804 9804   DD bb 21758 21758 9804 9804
         3031  +  DD bb 21758 21758 9804 9804   EE aa 23019 23019 11785 11785
         3032  +  EE aa 23019 23019 11785 11785   EE bb 23019 23019 12385 12385
         3033  +  EE bb 23019 23019 12385 12385   EE bb 23019 23019 12385 12385
         3034  +  FF aa 17351 17351 13416 13416   FF aa 17351 17351 13416 13416
         3035  +  FF aa 17351 17351 13416 13416   FF aa 17351 17351 13416 13416
         3036  +  FF bb 17351 17351 10961 10961   FF bb 17351 17351 10961 10961
         3037  +  FF bb 17351 17351 10961 10961   FF bb 17351 17351 10961 10961
         3038  +  FF bb 17351 17351 10961 10961   FF bb 17351 17351 10961 10961
         3039  +  GG aa 12883 12883 11954 11954   GG aa 12883 12883 11954 11954
         3040  +  GG aa 12883 12883 11954 11954   GG aa 12883 12883 11954 11954
         3041  +  GG bb 12883 12883 11097 11097   GG bb 12883 12883 11097 11097
         3042  +  GG bb 12883 12883 11097 11097   GG bb 12883 12883 11097 11097
         3043  +  HH aa 7440 7440 10634 10634   HH aa 7440 7440 10634 10634
         3044  +  HH aa 7440 7440 10634 10634   HH bb 7440 7440 7440 7440
         3045  +  HH bb 7440 7440 7440 7440   HH bb 7440 7440 7440 7440
         3046  +  HH bb 7440 7440 7440 7440   HH bb 7440 7440 7440 7440
         3047  +  HH bb 7440 7440 7440 7440   II aa 3800 3800 6390 6390
         3048  +  II aa 3800 3800 6390 6390   II bb 3800 3800 3800 3800
         3049  +  II bb 3800 3800 3800 3800   II bb 3800 3800 3800 3800
         3050  +  II bb 3800 3800 3800 3800   II bb 3800 3800 3800 3800
         3051  +  JJ aa {} {} 1786 1786   JJ aa {} {} 1786 1786   JJ aa {} {} 1786 1786
         3052  +  JJ aa {} {} 1786 1786   JJ bb {} {} {} {}   JJ bb {} {} {} {}
         3053  +  JJ bb {} {} {} {}   JJ bb {} {} {} {}}
         3054  +
  2221   3055   do_execsql_test 1.19.1 {
  2222   3056     SELECT a, b, sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND UNBOUNDED FOLLOWING ) FROM t3 ORDER BY 1, 2, 3;
  2223   3057   } {AA aa 40052   AA aa 40052   AA aa 40052   AA aa 40052   AA bb 40052
  2224   3058     AA bb 40052   AA bb 40052   AA bb 40052   BB aa 32712   BB aa 32712
  2225   3059     BB aa 32712   BB aa 32712   BB aa 32712   BB aa 32712   BB bb 32712
  2226   3060     BB bb 32712   BB bb 32712   BB bb 32712   BB bb 32712   BB bb 32712
  2227   3061     CC aa 29590   CC aa 29590   CC aa 29590   CC aa 29590   CC bb 29590
................................................................................
  2339   3173     GG aa 15754   GG aa 15754   GG bb 12883   GG bb 12883   GG bb 12883
  2340   3174     GG bb 12883   HH aa 10634   HH aa 10634   HH aa 10634   HH bb 7440
  2341   3175     HH bb 7440   HH bb 7440   HH bb 7440   HH bb 7440   HH bb 7440   II aa 6390
  2342   3176     II aa 6390   II bb 3800   II bb 3800   II bb 3800   II bb 3800   II bb 3800
  2343   3177     JJ aa 1786   JJ aa 1786   JJ aa 1786   JJ aa 1786   JJ bb {}   JJ bb {}
  2344   3178     JJ bb {}   JJ bb {}}
  2345   3179   
         3180  +do_execsql_test 1.19.8 {
         3181  +  SELECT a, b, 
         3182  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         3183  +      sum(c) OVER (ORDER BY a  GROUPS BETWEEN 1 FOLLOWING         AND UNBOUNDED FOLLOWING ),
         3184  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND UNBOUNDED FOLLOWING  EXCLUDE CURRENT ROW),
         3185  +      sum(c) OVER (ORDER BY a,b  GROUPS BETWEEN 1 FOLLOWING         AND UNBOUNDED FOLLOWING )
         3186  +    FROM t3 ORDER BY 1, 2, 3;
         3187  +} {AA aa 40052 40052 42430 42430   AA aa 40052 40052 42430 42430
         3188  +  AA aa 40052 40052 42430 42430   AA aa 40052 40052 42430 42430
         3189  +  AA bb 40052 40052 40052 40052   AA bb 40052 40052 40052 40052
         3190  +  AA bb 40052 40052 40052 40052   AA bb 40052 40052 40052 40052
         3191  +  BB aa 32712 32712 37179 37179   BB aa 32712 32712 37179 37179
         3192  +  BB aa 32712 32712 37179 37179   BB aa 32712 32712 37179 37179
         3193  +  BB aa 32712 32712 37179 37179   BB aa 32712 32712 37179 37179
         3194  +  BB bb 32712 32712 32712 32712   BB bb 32712 32712 32712 32712
         3195  +  BB bb 32712 32712 32712 32712   BB bb 32712 32712 32712 32712
         3196  +  BB bb 32712 32712 32712 32712   BB bb 32712 32712 32712 32712
         3197  +  CC aa 29590 29590 30758 30758   CC aa 29590 29590 30758 30758
         3198  +  CC aa 29590 29590 30758 30758   CC aa 29590 29590 30758 30758
         3199  +  CC bb 29590 29590 29590 29590   CC bb 29590 29590 29590 29590
         3200  +  DD aa 25558 25558 28265 28265   DD aa 25558 25558 28265 28265
         3201  +  DD aa 25558 25558 28265 28265   DD bb 25558 25558 25558 25558
         3202  +  DD bb 25558 25558 25558 25558   DD bb 25558 25558 25558 25558
         3203  +  DD bb 25558 25558 25558 25558   EE aa 23019 23019 24668 24668
         3204  +  EE aa 23019 23019 24668 24668   EE bb 23019 23019 23019 23019
         3205  +  EE bb 23019 23019 23019 23019   EE bb 23019 23019 23019 23019
         3206  +  FF aa 17351 17351 20856 20856   FF aa 17351 17351 20856 20856
         3207  +  FF aa 17351 17351 20856 20856   FF aa 17351 17351 20856 20856
         3208  +  FF bb 17351 17351 17351 17351   FF bb 17351 17351 17351 17351
         3209  +  FF bb 17351 17351 17351 17351   FF bb 17351 17351 17351 17351
         3210  +  FF bb 17351 17351 17351 17351   FF bb 17351 17351 17351 17351
         3211  +  GG aa 12883 12883 15754 15754   GG aa 12883 12883 15754 15754
         3212  +  GG aa 12883 12883 15754 15754   GG aa 12883 12883 15754 15754
         3213  +  GG bb 12883 12883 12883 12883   GG bb 12883 12883 12883 12883
         3214  +  GG bb 12883 12883 12883 12883   GG bb 12883 12883 12883 12883
         3215  +  HH aa 7440 7440 10634 10634   HH aa 7440 7440 10634 10634
         3216  +  HH aa 7440 7440 10634 10634   HH bb 7440 7440 7440 7440
         3217  +  HH bb 7440 7440 7440 7440   HH bb 7440 7440 7440 7440
         3218  +  HH bb 7440 7440 7440 7440   HH bb 7440 7440 7440 7440
         3219  +  HH bb 7440 7440 7440 7440   II aa 3800 3800 6390 6390
         3220  +  II aa 3800 3800 6390 6390   II bb 3800 3800 3800 3800
         3221  +  II bb 3800 3800 3800 3800   II bb 3800 3800 3800 3800
         3222  +  II bb 3800 3800 3800 3800   II bb 3800 3800 3800 3800
         3223  +  JJ aa {} {} 1786 1786   JJ aa {} {} 1786 1786   JJ aa {} {} 1786 1786
         3224  +  JJ aa {} {} 1786 1786   JJ bb {} {} {} {}   JJ bb {} {} {} {}
         3225  +  JJ bb {} {} {} {}   JJ bb {} {} {} {}}
         3226  +
  2346   3227   do_execsql_test 2.1.1 {
  2347   3228     SELECT row_number() OVER win 
  2348   3229       FROM t3
  2349   3230       WINDOW win AS (
  2350   3231         ORDER BY c, b, a
  2351   3232         ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING  EXCLUDE NO OTHERS 
  2352   3233       )