Fossil SCM
Update the built-in SQLite to the latest pre-release trunk 3.47.0 for testing.
Commit
44f067d2ad4867a14a0342b305e92760c85322e315fcc2a32f0eab5f7b5ee278
Parent
d6f8f324eff817e…
2 files changed
+928
-658
+5
-5
+928
-658
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | -** version 3.46.0. By combining all the individual C code files into this | |
| 3 | +** version 3.47.0. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| @@ -16,11 +16,11 @@ | ||
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | -** 96c92aba00c8375bc32fafcdf12429c58bd8. | |
| 21 | +** a47c644fef71f3ab3dc584ea917eaab9a8e5. | |
| 22 | 22 | */ |
| 23 | 23 | #define SQLITE_CORE 1 |
| 24 | 24 | #define SQLITE_AMALGAMATION 1 |
| 25 | 25 | #ifndef SQLITE_PRIVATE |
| 26 | 26 | # define SQLITE_PRIVATE static |
| @@ -457,13 +457,13 @@ | ||
| 457 | 457 | ** |
| 458 | 458 | ** See also: [sqlite3_libversion()], |
| 459 | 459 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 460 | 460 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 461 | 461 | */ |
| 462 | -#define SQLITE_VERSION "3.46.0" | |
| 463 | -#define SQLITE_VERSION_NUMBER 3046000 | |
| 464 | -#define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" | |
| 462 | +#define SQLITE_VERSION "3.47.0" | |
| 463 | +#define SQLITE_VERSION_NUMBER 3047000 | |
| 464 | +#define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f" | |
| 465 | 465 | |
| 466 | 466 | /* |
| 467 | 467 | ** CAPI3REF: Run-Time Library Version Numbers |
| 468 | 468 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 469 | 469 | ** |
| @@ -3881,12 +3881,12 @@ | ||
| 3881 | 3881 | ** the default shared cache setting provided by |
| 3882 | 3882 | ** [sqlite3_enable_shared_cache()].)^ |
| 3883 | 3883 | ** |
| 3884 | 3884 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3885 | 3885 | ** <dd>The database connection comes up in "extended result code mode". |
| 3886 | -** In other words, the database behaves has if | |
| 3887 | -** [sqlite3_extended_result_codes(db,1)] where called on the database | |
| 3886 | +** In other words, the database behaves as if | |
| 3887 | +** [sqlite3_extended_result_codes(db,1)] were called on the database | |
| 3888 | 3888 | ** connection as soon as the connection is created. In addition to setting |
| 3889 | 3889 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3890 | 3890 | ** to return an extended result code.</dd> |
| 3891 | 3891 | ** |
| 3892 | 3892 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| @@ -20996,10 +20996,11 @@ | ||
| 20996 | 20996 | SQLITE_PRIVATE int sqlite3WhereUsesDeferredSeek(WhereInfo*); |
| 20997 | 20997 | SQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(Parse*, Index*, int, int, int); |
| 20998 | 20998 | SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, u8); |
| 20999 | 20999 | SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int); |
| 21000 | 21000 | SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int); |
| 21001 | +SQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg); | |
| 21001 | 21002 | SQLITE_PRIVATE void sqlite3ExprCode(Parse*, Expr*, int); |
| 21002 | 21003 | #ifndef SQLITE_OMIT_GENERATED_COLUMNS |
| 21003 | 21004 | SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int); |
| 21004 | 21005 | #endif |
| 21005 | 21006 | SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int); |
| @@ -33402,11 +33403,12 @@ | ||
| 33402 | 33403 | case OE_Abort: zType = "abort"; break; |
| 33403 | 33404 | case OE_Fail: zType = "fail"; break; |
| 33404 | 33405 | case OE_Ignore: zType = "ignore"; break; |
| 33405 | 33406 | } |
| 33406 | 33407 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 33407 | - sqlite3TreeViewLine(pView, "RAISE %s(%Q)", zType, pExpr->u.zToken); | |
| 33408 | + sqlite3TreeViewLine(pView, "RAISE %s", zType); | |
| 33409 | + sqlite3TreeViewExpr(pView, pExpr->pLeft, 0); | |
| 33408 | 33410 | break; |
| 33409 | 33411 | } |
| 33410 | 33412 | #endif |
| 33411 | 33413 | case TK_MATCH: { |
| 33412 | 33414 | sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s", |
| @@ -78108,11 +78110,12 @@ | ||
| 78108 | 78110 | assert( i<iEnd ); |
| 78109 | 78111 | j = get2byte(&aData[hdr+5]); |
| 78110 | 78112 | if( j>(u32)usableSize ){ j = 0; } |
| 78111 | 78113 | memcpy(&pTmp[j], &aData[j], usableSize - j); |
| 78112 | 78114 | |
| 78113 | - for(k=0; ALWAYS(k<NB*2) && pCArray->ixNx[k]<=i; k++){} | |
| 78115 | + assert( pCArray->ixNx[NB*2-1]>i ); | |
| 78116 | + for(k=0; pCArray->ixNx[k]<=i; k++){} | |
| 78114 | 78117 | pSrcEnd = pCArray->apEnd[k]; |
| 78115 | 78118 | |
| 78116 | 78119 | pData = pEnd; |
| 78117 | 78120 | while( 1/*exit by break*/ ){ |
| 78118 | 78121 | u8 *pCell = pCArray->apCell[i]; |
| @@ -78191,11 +78194,12 @@ | ||
| 78191 | 78194 | int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */ |
| 78192 | 78195 | int k; /* Current slot in pCArray->apEnd[] */ |
| 78193 | 78196 | u8 *pEnd; /* Maximum extent of cell data */ |
| 78194 | 78197 | assert( CORRUPT_DB || pPg->hdrOffset==0 ); /* Never called on page 1 */ |
| 78195 | 78198 | if( iEnd<=iFirst ) return 0; |
| 78196 | - for(k=0; ALWAYS(k<NB*2) && pCArray->ixNx[k]<=i ; k++){} | |
| 78199 | + assert( pCArray->ixNx[NB*2-1]>i ); | |
| 78200 | + for(k=0; pCArray->ixNx[k]<=i ; k++){} | |
| 78197 | 78201 | pEnd = pCArray->apEnd[k]; |
| 78198 | 78202 | while( 1 /*Exit by break*/ ){ |
| 78199 | 78203 | int sz, rc; |
| 78200 | 78204 | u8 *pSlot; |
| 78201 | 78205 | assert( pCArray->szCell[i]!=0 ); |
| @@ -78476,10 +78480,11 @@ | ||
| 78476 | 78480 | b.pRef = pPage; |
| 78477 | 78481 | b.apCell = &pCell; |
| 78478 | 78482 | b.szCell = &szCell; |
| 78479 | 78483 | b.apEnd[0] = pPage->aDataEnd; |
| 78480 | 78484 | b.ixNx[0] = 2; |
| 78485 | + b.ixNx[NB*2-1] = 0x7fffffff; | |
| 78481 | 78486 | rc = rebuildPage(&b, 0, 1, pNew); |
| 78482 | 78487 | if( NEVER(rc) ){ |
| 78483 | 78488 | releasePage(pNew); |
| 78484 | 78489 | return rc; |
| 78485 | 78490 | } |
| @@ -78711,11 +78716,13 @@ | ||
| 78711 | 78716 | u8 abDone[NB+2]; /* True after i'th new page is populated */ |
| 78712 | 78717 | Pgno aPgno[NB+2]; /* Page numbers of new pages before shuffling */ |
| 78713 | 78718 | CellArray b; /* Parsed information on cells being balanced */ |
| 78714 | 78719 | |
| 78715 | 78720 | memset(abDone, 0, sizeof(abDone)); |
| 78716 | - memset(&b, 0, sizeof(b)); | |
| 78721 | + assert( sizeof(b) - sizeof(b.ixNx) == offsetof(CellArray,ixNx) ); | |
| 78722 | + memset(&b, 0, sizeof(b)-sizeof(b.ixNx[0])); | |
| 78723 | + b.ixNx[NB*2-1] = 0x7fffffff; | |
| 78717 | 78724 | pBt = pParent->pBt; |
| 78718 | 78725 | assert( sqlite3_mutex_held(pBt->mutex) ); |
| 78719 | 78726 | assert( sqlite3PagerIswriteable(pParent->pDbPage) ); |
| 78720 | 78727 | |
| 78721 | 78728 | /* At this point pParent may have at most one overflow cell. And if |
| @@ -79302,11 +79309,12 @@ | ||
| 79302 | 79309 | } |
| 79303 | 79310 | } |
| 79304 | 79311 | iOvflSpace += sz; |
| 79305 | 79312 | assert( sz<=pBt->maxLocal+23 ); |
| 79306 | 79313 | assert( iOvflSpace <= (int)pBt->pageSize ); |
| 79307 | - for(k=0; ALWAYS(k<NB*2) && b.ixNx[k]<=j; k++){} | |
| 79314 | + assert( b.ixNx[NB*2-1]>j ); | |
| 79315 | + for(k=0; b.ixNx[k]<=j; k++){} | |
| 79308 | 79316 | pSrcEnd = b.apEnd[k]; |
| 79309 | 79317 | if( SQLITE_OVERFLOW(pSrcEnd, pCell, pCell+sz) ){ |
| 79310 | 79318 | rc = SQLITE_CORRUPT_BKPT; |
| 79311 | 79319 | goto balance_cleanup; |
| 79312 | 79320 | } |
| @@ -90171,11 +90179,12 @@ | ||
| 90171 | 90179 | */ |
| 90172 | 90180 | SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){ |
| 90173 | 90181 | assert( iVar>0 ); |
| 90174 | 90182 | if( v ){ |
| 90175 | 90183 | Mem *pMem = &v->aVar[iVar-1]; |
| 90176 | - assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); | |
| 90184 | + assert( (v->db->flags & SQLITE_EnableQPSG)==0 | |
| 90185 | + || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); | |
| 90177 | 90186 | if( 0==(pMem->flags & MEM_Null) ){ |
| 90178 | 90187 | sqlite3_value *pRet = sqlite3ValueNew(v->db); |
| 90179 | 90188 | if( pRet ){ |
| 90180 | 90189 | sqlite3VdbeMemCopy((Mem *)pRet, pMem); |
| 90181 | 90190 | sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8); |
| @@ -90191,11 +90200,12 @@ | ||
| 90191 | 90200 | ** to sqlite3_reoptimize() that re-preparing the statement may result |
| 90192 | 90201 | ** in a better query plan. |
| 90193 | 90202 | */ |
| 90194 | 90203 | SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ |
| 90195 | 90204 | assert( iVar>0 ); |
| 90196 | - assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); | |
| 90205 | + assert( (v->db->flags & SQLITE_EnableQPSG)==0 | |
| 90206 | + || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); | |
| 90197 | 90207 | if( iVar>=32 ){ |
| 90198 | 90208 | v->expmask |= 0x80000000; |
| 90199 | 90209 | }else{ |
| 90200 | 90210 | v->expmask |= ((u32)1 << (iVar-1)); |
| 90201 | 90211 | } |
| @@ -94323,11 +94333,11 @@ | ||
| 94323 | 94333 | if( (pIn3->flags & MEM_Null)==0 ) break; |
| 94324 | 94334 | /* Fall through into OP_Halt */ |
| 94325 | 94335 | /* no break */ deliberate_fall_through |
| 94326 | 94336 | } |
| 94327 | 94337 | |
| 94328 | -/* Opcode: Halt P1 P2 * P4 P5 | |
| 94338 | +/* Opcode: Halt P1 P2 P3 P4 P5 | |
| 94329 | 94339 | ** |
| 94330 | 94340 | ** Exit immediately. All open cursors, etc are closed |
| 94331 | 94341 | ** automatically. |
| 94332 | 94342 | ** |
| 94333 | 94343 | ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), |
| @@ -94336,22 +94346,26 @@ | ||
| 94336 | 94346 | ** whether or not to rollback the current transaction. Do not rollback |
| 94337 | 94347 | ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, |
| 94338 | 94348 | ** then back out all changes that have occurred during this execution of the |
| 94339 | 94349 | ** VDBE, but do not rollback the transaction. |
| 94340 | 94350 | ** |
| 94341 | -** If P4 is not null then it is an error message string. | |
| 94351 | +** If P3 is not zero and P4 is NULL, then P3 is a register that holds the | |
| 94352 | +** text of an error message. | |
| 94342 | 94353 | ** |
| 94343 | -** P5 is a value between 0 and 4, inclusive, that modifies the P4 string. | |
| 94354 | +** If P3 is zero and P4 is not null then the error message string is held | |
| 94355 | +** in P4. | |
| 94344 | 94356 | ** |
| 94345 | -** 0: (no change) | |
| 94357 | +** P5 is a value between 1 and 4, inclusive, then the P4 error message | |
| 94358 | +** string is modified as follows: | |
| 94359 | +** | |
| 94346 | 94360 | ** 1: NOT NULL constraint failed: P4 |
| 94347 | 94361 | ** 2: UNIQUE constraint failed: P4 |
| 94348 | 94362 | ** 3: CHECK constraint failed: P4 |
| 94349 | 94363 | ** 4: FOREIGN KEY constraint failed: P4 |
| 94350 | 94364 | ** |
| 94351 | -** If P5 is not zero and P4 is NULL, then everything after the ":" is | |
| 94352 | -** omitted. | |
| 94365 | +** If P3 is zero and P5 is not zero and P4 is NULL, then everything after | |
| 94366 | +** the ":" is omitted. | |
| 94353 | 94367 | ** |
| 94354 | 94368 | ** There is an implied "Halt 0 0 0" instruction inserted at the very end of |
| 94355 | 94369 | ** every program. So a jump past the last instruction of the program |
| 94356 | 94370 | ** is the same as executing Halt. |
| 94357 | 94371 | */ |
| @@ -94360,10 +94374,13 @@ | ||
| 94360 | 94374 | int pcx; |
| 94361 | 94375 | |
| 94362 | 94376 | #ifdef SQLITE_DEBUG |
| 94363 | 94377 | if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); } |
| 94364 | 94378 | #endif |
| 94379 | + assert( pOp->p4type==P4_NOTUSED | |
| 94380 | + || pOp->p4type==P4_STATIC | |
| 94381 | + || pOp->p4type==P4_DYNAMIC ); | |
| 94365 | 94382 | |
| 94366 | 94383 | /* A deliberately coded "OP_Halt SQLITE_INTERNAL * * * *" opcode indicates |
| 94367 | 94384 | ** something is wrong with the code generator. Raise an assertion in order |
| 94368 | 94385 | ** to bring this to the attention of fuzzers and other testing tools. */ |
| 94369 | 94386 | assert( pOp->p1!=SQLITE_INTERNAL ); |
| @@ -94390,11 +94407,16 @@ | ||
| 94390 | 94407 | } |
| 94391 | 94408 | p->rc = pOp->p1; |
| 94392 | 94409 | p->errorAction = (u8)pOp->p2; |
| 94393 | 94410 | assert( pOp->p5<=4 ); |
| 94394 | 94411 | if( p->rc ){ |
| 94395 | - if( pOp->p5 ){ | |
| 94412 | + if( pOp->p3>0 && pOp->p4type==P4_NOTUSED ){ | |
| 94413 | + const char *zErr; | |
| 94414 | + assert( pOp->p3<=(p->nMem + 1 - p->nCursor) ); | |
| 94415 | + zErr = sqlite3ValueText(&aMem[pOp->p3], SQLITE_UTF8); | |
| 94416 | + sqlite3VdbeError(p, "%s", zErr); | |
| 94417 | + }else if( pOp->p5 ){ | |
| 94396 | 94418 | static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK", |
| 94397 | 94419 | "FOREIGN KEY" }; |
| 94398 | 94420 | testcase( pOp->p5==1 ); |
| 94399 | 94421 | testcase( pOp->p5==2 ); |
| 94400 | 94422 | testcase( pOp->p5==3 ); |
| @@ -97433,27 +97455,27 @@ | ||
| 97433 | 97455 | wrFlag = BTREE_WRCSR | (pOp->p5 & OPFLAG_FORDELETE); |
| 97434 | 97456 | assert( sqlite3SchemaMutexHeld(db, iDb, 0) ); |
| 97435 | 97457 | if( pDb->pSchema->file_format < p->minWriteFileFormat ){ |
| 97436 | 97458 | p->minWriteFileFormat = pDb->pSchema->file_format; |
| 97437 | 97459 | } |
| 97460 | + if( pOp->p5 & OPFLAG_P2ISREG ){ | |
| 97461 | + assert( p2>0 ); | |
| 97462 | + assert( p2<=(u32)(p->nMem+1 - p->nCursor) ); | |
| 97463 | + pIn2 = &aMem[p2]; | |
| 97464 | + assert( memIsValid(pIn2) ); | |
| 97465 | + assert( (pIn2->flags & MEM_Int)!=0 ); | |
| 97466 | + sqlite3VdbeMemIntegerify(pIn2); | |
| 97467 | + p2 = (int)pIn2->u.i; | |
| 97468 | + /* The p2 value always comes from a prior OP_CreateBtree opcode and | |
| 97469 | + ** that opcode will always set the p2 value to 2 or more or else fail. | |
| 97470 | + ** If there were a failure, the prepared statement would have halted | |
| 97471 | + ** before reaching this instruction. */ | |
| 97472 | + assert( p2>=2 ); | |
| 97473 | + } | |
| 97438 | 97474 | }else{ |
| 97439 | 97475 | wrFlag = 0; |
| 97440 | - } | |
| 97441 | - if( pOp->p5 & OPFLAG_P2ISREG ){ | |
| 97442 | - assert( p2>0 ); | |
| 97443 | - assert( p2<=(u32)(p->nMem+1 - p->nCursor) ); | |
| 97444 | - assert( pOp->opcode==OP_OpenWrite ); | |
| 97445 | - pIn2 = &aMem[p2]; | |
| 97446 | - assert( memIsValid(pIn2) ); | |
| 97447 | - assert( (pIn2->flags & MEM_Int)!=0 ); | |
| 97448 | - sqlite3VdbeMemIntegerify(pIn2); | |
| 97449 | - p2 = (int)pIn2->u.i; | |
| 97450 | - /* The p2 value always comes from a prior OP_CreateBtree opcode and | |
| 97451 | - ** that opcode will always set the p2 value to 2 or more or else fail. | |
| 97452 | - ** If there were a failure, the prepared statement would have halted | |
| 97453 | - ** before reaching this instruction. */ | |
| 97454 | - assert( p2>=2 ); | |
| 97476 | + assert( (pOp->p5 & OPFLAG_P2ISREG)==0 ); | |
| 97455 | 97477 | } |
| 97456 | 97478 | if( pOp->p4type==P4_KEYINFO ){ |
| 97457 | 97479 | pKeyInfo = pOp->p4.pKeyInfo; |
| 97458 | 97480 | assert( pKeyInfo->enc==ENC(db) ); |
| 97459 | 97481 | assert( pKeyInfo->db==db ); |
| @@ -113247,11 +113269,11 @@ | ||
| 113247 | 113269 | /* |
| 113248 | 113270 | ** Convert a scalar expression node to a TK_REGISTER referencing |
| 113249 | 113271 | ** register iReg. The caller must ensure that iReg already contains |
| 113250 | 113272 | ** the correct value for the expression. |
| 113251 | 113273 | */ |
| 113252 | -static void exprToRegister(Expr *pExpr, int iReg){ | |
| 113274 | +SQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg){ | |
| 113253 | 113275 | Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr); |
| 113254 | 113276 | if( NEVER(p==0) ) return; |
| 113255 | 113277 | p->op2 = p->op; |
| 113256 | 113278 | p->op = TK_REGISTER; |
| 113257 | 113279 | p->iTable = iReg; |
| @@ -114256,11 +114278,11 @@ | ||
| 114256 | 114278 | if( db->mallocFailed ){ |
| 114257 | 114279 | sqlite3ExprDelete(db, pDel); |
| 114258 | 114280 | break; |
| 114259 | 114281 | } |
| 114260 | 114282 | testcase( pX->op==TK_COLUMN ); |
| 114261 | - exprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); | |
| 114283 | + sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); | |
| 114262 | 114284 | testcase( regFree1==0 ); |
| 114263 | 114285 | memset(&opCompare, 0, sizeof(opCompare)); |
| 114264 | 114286 | opCompare.op = TK_EQ; |
| 114265 | 114287 | opCompare.pLeft = pDel; |
| 114266 | 114288 | pTest = &opCompare; |
| @@ -114310,19 +114332,18 @@ | ||
| 114310 | 114332 | if( pExpr->affExpr==OE_Abort ){ |
| 114311 | 114333 | sqlite3MayAbort(pParse); |
| 114312 | 114334 | } |
| 114313 | 114335 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 114314 | 114336 | if( pExpr->affExpr==OE_Ignore ){ |
| 114315 | - sqlite3VdbeAddOp4( | |
| 114316 | - v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0); | |
| 114337 | + sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, OE_Ignore); | |
| 114317 | 114338 | VdbeCoverage(v); |
| 114318 | 114339 | }else{ |
| 114319 | - sqlite3HaltConstraint(pParse, | |
| 114340 | + r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, ®Free1); | |
| 114341 | + sqlite3VdbeAddOp3(v, OP_Halt, | |
| 114320 | 114342 | pParse->pTriggerTab ? SQLITE_CONSTRAINT_TRIGGER : SQLITE_ERROR, |
| 114321 | - pExpr->affExpr, pExpr->u.zToken, 0, 0); | |
| 114343 | + pExpr->affExpr, r1); | |
| 114322 | 114344 | } |
| 114323 | - | |
| 114324 | 114345 | break; |
| 114325 | 114346 | } |
| 114326 | 114347 | #endif |
| 114327 | 114348 | } |
| 114328 | 114349 | sqlite3ReleaseTempReg(pParse, regFree1); |
| @@ -114607,11 +114628,11 @@ | ||
| 114607 | 114628 | compLeft.pLeft = pDel; |
| 114608 | 114629 | compLeft.pRight = pExpr->x.pList->a[0].pExpr; |
| 114609 | 114630 | compRight.op = TK_LE; |
| 114610 | 114631 | compRight.pLeft = pDel; |
| 114611 | 114632 | compRight.pRight = pExpr->x.pList->a[1].pExpr; |
| 114612 | - exprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); | |
| 114633 | + sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); | |
| 114613 | 114634 | if( xJump ){ |
| 114614 | 114635 | xJump(pParse, &exprAnd, dest, jumpIfNull); |
| 114615 | 114636 | }else{ |
| 114616 | 114637 | /* Mark the expression is being from the ON or USING clause of a join |
| 114617 | 114638 | ** so that the sqlite3ExprCodeTarget() routine will not attempt to move |
| @@ -124424,12 +124445,13 @@ | ||
| 124424 | 124445 | #endif /* SQLITE_OMIT_VIEW */ |
| 124425 | 124446 | |
| 124426 | 124447 | #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) |
| 124427 | 124448 | /* |
| 124428 | 124449 | ** The Table structure pTable is really a VIEW. Fill in the names of |
| 124429 | -** the columns of the view in the pTable structure. Return the number | |
| 124430 | -** of errors. If an error is seen leave an error message in pParse->zErrMsg. | |
| 124450 | +** the columns of the view in the pTable structure. Return non-zero if | |
| 124451 | +** there are errors. If an error is seen an error message is left | |
| 124452 | +** in pParse->zErrMsg. | |
| 124431 | 124453 | */ |
| 124432 | 124454 | static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124433 | 124455 | Table *pSelTab; /* A fake table from which we get the result set */ |
| 124434 | 124456 | Select *pSel; /* Copy of the SELECT that implements the view */ |
| 124435 | 124457 | int nErr = 0; /* Number of errors encountered */ |
| @@ -124548,11 +124570,11 @@ | ||
| 124548 | 124570 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 124549 | 124571 | if( db->mallocFailed ){ |
| 124550 | 124572 | sqlite3DeleteColumnNames(db, pTable); |
| 124551 | 124573 | } |
| 124552 | 124574 | #endif /* SQLITE_OMIT_VIEW */ |
| 124553 | - return nErr; | |
| 124575 | + return nErr + pParse->nErr; | |
| 124554 | 124576 | } |
| 124555 | 124577 | SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124556 | 124578 | assert( pTable!=0 ); |
| 124557 | 124579 | if( !IsVirtual(pTable) && pTable->nCol>0 ) return 0; |
| 124558 | 124580 | return viewGetColumnNames(pParse, pTable); |
| @@ -130846,10 +130868,12 @@ | ||
| 130846 | 130868 | StrAccum *pAccum = &pGCC->str; |
| 130847 | 130869 | if( pAccum->accError==SQLITE_TOOBIG ){ |
| 130848 | 130870 | sqlite3_result_error_toobig(context); |
| 130849 | 130871 | }else if( pAccum->accError==SQLITE_NOMEM ){ |
| 130850 | 130872 | sqlite3_result_error_nomem(context); |
| 130873 | + }else if( pGCC->nAccum>0 && pAccum->nChar==0 ){ | |
| 130874 | + sqlite3_result_text(context, "", 1, SQLITE_STATIC); | |
| 130851 | 130875 | }else{ |
| 130852 | 130876 | const char *zText = sqlite3_str_value(pAccum); |
| 130853 | 130877 | sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT); |
| 130854 | 130878 | } |
| 130855 | 130879 | } |
| @@ -132726,11 +132750,12 @@ | ||
| 132726 | 132750 | if( action==OE_Restrict ){ |
| 132727 | 132751 | int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 132728 | 132752 | SrcList *pSrc; |
| 132729 | 132753 | Expr *pRaise; |
| 132730 | 132754 | |
| 132731 | - pRaise = sqlite3Expr(db, TK_RAISE, "FOREIGN KEY constraint failed"); | |
| 132755 | + pRaise = sqlite3Expr(db, TK_STRING, "FOREIGN KEY constraint failed"), | |
| 132756 | + pRaise = sqlite3PExpr(pParse, TK_RAISE, pRaise, 0); | |
| 132732 | 132757 | if( pRaise ){ |
| 132733 | 132758 | pRaise->affExpr = OE_Abort; |
| 132734 | 132759 | } |
| 132735 | 132760 | pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); |
| 132736 | 132761 | if( pSrc ){ |
| @@ -150727,16 +150752,22 @@ | ||
| 150727 | 150752 | ** written the query must use a temp-table for at least one of the ORDER |
| 150728 | 150753 | ** BY and DISTINCT, and an index or separate temp-table for the other. |
| 150729 | 150754 | */ |
| 150730 | 150755 | if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct |
| 150731 | 150756 | && sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0 |
| 150757 | + && OptimizationEnabled(db, SQLITE_GroupByOrder) | |
| 150732 | 150758 | #ifndef SQLITE_OMIT_WINDOWFUNC |
| 150733 | 150759 | && p->pWin==0 |
| 150734 | 150760 | #endif |
| 150735 | 150761 | ){ |
| 150736 | 150762 | p->selFlags &= ~SF_Distinct; |
| 150737 | 150763 | pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0); |
| 150764 | + if( pGroupBy ){ | |
| 150765 | + for(i=0; i<pGroupBy->nExpr; i++){ | |
| 150766 | + pGroupBy->a[i].u.x.iOrderByCol = i+1; | |
| 150767 | + } | |
| 150768 | + } | |
| 150738 | 150769 | p->selFlags |= SF_Aggregate; |
| 150739 | 150770 | /* Notice that even thought SF_Distinct has been cleared from p->selFlags, |
| 150740 | 150771 | ** the sDistinct.isTnct is still set. Hence, isTnct represents the |
| 150741 | 150772 | ** original setting of the SF_Distinct flag, not the current setting */ |
| 150742 | 150773 | assert( sDistinct.isTnct ); |
| @@ -151195,16 +151226,22 @@ | ||
| 151195 | 151226 | if( groupBySort ){ |
| 151196 | 151227 | sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx, |
| 151197 | 151228 | sortOut, sortPTab); |
| 151198 | 151229 | } |
| 151199 | 151230 | for(j=0; j<pGroupBy->nExpr; j++){ |
| 151231 | + int iOrderByCol = pGroupBy->a[j].u.x.iOrderByCol; | |
| 151232 | + | |
| 151200 | 151233 | if( groupBySort ){ |
| 151201 | 151234 | sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j); |
| 151202 | 151235 | }else{ |
| 151203 | 151236 | pAggInfo->directMode = 1; |
| 151204 | 151237 | sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j); |
| 151205 | 151238 | } |
| 151239 | + | |
| 151240 | + if( iOrderByCol ){ | |
| 151241 | + sqlite3ExprToRegister(p->pEList->a[iOrderByCol-1].pExpr, iAMem+j); | |
| 151242 | + } | |
| 151206 | 151243 | } |
| 151207 | 151244 | sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr, |
| 151208 | 151245 | (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO); |
| 151209 | 151246 | addr1 = sqlite3VdbeCurrentAddr(v); |
| 151210 | 151247 | sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v); |
| @@ -151216,13 +151253,13 @@ | ||
| 151216 | 151253 | ** This code copies current group by terms in b0,b1,b2,... |
| 151217 | 151254 | ** over to a0,a1,a2. It then calls the output subroutine |
| 151218 | 151255 | ** and resets the aggregate accumulator registers in preparation |
| 151219 | 151256 | ** for the next GROUP BY batch. |
| 151220 | 151257 | */ |
| 151221 | - sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr); | |
| 151222 | 151258 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| 151223 | 151259 | VdbeComment((v, "output one row")); |
| 151260 | + sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr); | |
| 151224 | 151261 | sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd); VdbeCoverage(v); |
| 151225 | 151262 | VdbeComment((v, "check abort flag")); |
| 151226 | 151263 | sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset); |
| 151227 | 151264 | VdbeComment((v, "reset accumulator")); |
| 151228 | 151265 | |
| @@ -156939,10 +156976,12 @@ | ||
| 156939 | 156976 | u16 nLTerm; /* Number of entries in aLTerm[] */ |
| 156940 | 156977 | u16 nSkip; /* Number of NULL aLTerm[] entries */ |
| 156941 | 156978 | /**** whereLoopXfer() copies fields above ***********************/ |
| 156942 | 156979 | # define WHERE_LOOP_XFER_SZ offsetof(WhereLoop,nLSlot) |
| 156943 | 156980 | u16 nLSlot; /* Number of slots allocated for aLTerm[] */ |
| 156981 | + LogEst rStarDelta; /* Cost delta due to star-schema heuristic. Not | |
| 156982 | + ** initialized unless pWInfo->nOutStarDelta>0 */ | |
| 156944 | 156983 | WhereTerm **aLTerm; /* WhereTerms used */ |
| 156945 | 156984 | WhereLoop *pNextLoop; /* Next WhereLoop object in the WhereClause */ |
| 156946 | 156985 | WhereTerm *aLTermSpace[3]; /* Initial aLTerm[] space */ |
| 156947 | 156986 | }; |
| 156948 | 156987 | |
| @@ -157261,10 +157300,11 @@ | ||
| 157261 | 157300 | u8 eDistinct; /* One of the WHERE_DISTINCT_* values */ |
| 157262 | 157301 | unsigned bDeferredSeek :1; /* Uses OP_DeferredSeek */ |
| 157263 | 157302 | unsigned untestedTerms :1; /* Not all WHERE terms resolved by outer loop */ |
| 157264 | 157303 | unsigned bOrderedInnerLoop:1;/* True if only the inner-most loop is ordered */ |
| 157265 | 157304 | unsigned sorted :1; /* True if really sorted (not just grouped) */ |
| 157305 | + LogEst nOutStarDelta; /* Artifical nOut reduction for star-query */ | |
| 157266 | 157306 | LogEst nRowOut; /* Estimated number of output rows */ |
| 157267 | 157307 | int iTop; /* The very beginning of the WHERE loop */ |
| 157268 | 157308 | int iEndWhere; /* End of the WHERE clause itself */ |
| 157269 | 157309 | WhereLoop *pLoops; /* List of all WhereLoop objects */ |
| 157270 | 157310 | WhereMemBlock *pMemToFree;/* Memory to free when this object destroyed */ |
| @@ -157860,10 +157900,43 @@ | ||
| 157860 | 157900 | zAff[i] = SQLITE_AFF_BLOB; |
| 157861 | 157901 | } |
| 157862 | 157902 | } |
| 157863 | 157903 | } |
| 157864 | 157904 | |
| 157905 | +/* | |
| 157906 | +** The pOrderBy->a[].u.x.iOrderByCol values might be incorrect because | |
| 157907 | +** columns might have been rearranged in the result set. This routine | |
| 157908 | +** fixes them up. | |
| 157909 | +** | |
| 157910 | +** pEList is the new result set. The pEList->a[].u.x.iOrderByCol values | |
| 157911 | +** contain the *old* locations of each expression. This is a temporary | |
| 157912 | +** use of u.x.iOrderByCol, not its intended use. The caller must reset | |
| 157913 | +** u.x.iOrderByCol back to zero for all entries in pEList before the | |
| 157914 | +** caller returns. | |
| 157915 | +** | |
| 157916 | +** This routine changes pOrderBy->a[].u.x.iOrderByCol values from | |
| 157917 | +** pEList->a[N].u.x.iOrderByCol into N+1. (The "+1" is because of the 1-based | |
| 157918 | +** indexing used by iOrderByCol.) Or if no match, iOrderByCol is set to zero. | |
| 157919 | +*/ | |
| 157920 | +static void adjustOrderByCol(ExprList *pOrderBy, ExprList *pEList){ | |
| 157921 | + int i, j; | |
| 157922 | + if( pOrderBy==0 ) return; | |
| 157923 | + for(i=0; i<pOrderBy->nExpr; i++){ | |
| 157924 | + int t = pOrderBy->a[i].u.x.iOrderByCol; | |
| 157925 | + if( t==0 ) continue; | |
| 157926 | + for(j=0; j<pEList->nExpr; j++){ | |
| 157927 | + if( pEList->a[j].u.x.iOrderByCol==t ){ | |
| 157928 | + pOrderBy->a[i].u.x.iOrderByCol = j+1; | |
| 157929 | + break; | |
| 157930 | + } | |
| 157931 | + } | |
| 157932 | + if( j>=pEList->nExpr ){ | |
| 157933 | + pOrderBy->a[i].u.x.iOrderByCol = 0; | |
| 157934 | + } | |
| 157935 | + } | |
| 157936 | +} | |
| 157937 | + | |
| 157865 | 157938 | |
| 157866 | 157939 | /* |
| 157867 | 157940 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 157868 | 157941 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 157869 | 157942 | ** LHS. But not all terms in the vector are indexable and the terms might |
| @@ -157923,10 +157996,11 @@ | ||
| 157923 | 157996 | assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 ); |
| 157924 | 157997 | iField = pLoop->aLTerm[i]->u.x.iField - 1; |
| 157925 | 157998 | if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */ |
| 157926 | 157999 | pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr); |
| 157927 | 158000 | pOrigRhs->a[iField].pExpr = 0; |
| 158001 | + if( pRhs ) pRhs->a[pRhs->nExpr-1].u.x.iOrderByCol = iField+1; | |
| 157928 | 158002 | if( pOrigLhs ){ |
| 157929 | 158003 | assert( pOrigLhs->a[iField].pExpr!=0 ); |
| 157930 | 158004 | pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr); |
| 157931 | 158005 | pOrigLhs->a[iField].pExpr = 0; |
| 157932 | 158006 | } |
| @@ -157945,22 +158019,20 @@ | ||
| 157945 | 158019 | Expr *p = pLhs->a[0].pExpr; |
| 157946 | 158020 | pLhs->a[0].pExpr = 0; |
| 157947 | 158021 | sqlite3ExprDelete(db, pNew->pLeft); |
| 157948 | 158022 | pNew->pLeft = p; |
| 157949 | 158023 | } |
| 157950 | - if( pSelect->pOrderBy ){ | |
| 157951 | - /* If the SELECT statement has an ORDER BY clause, zero the | |
| 157952 | - ** iOrderByCol variables. These are set to non-zero when an | |
| 157953 | - ** ORDER BY term exactly matches one of the terms of the | |
| 157954 | - ** result-set. Since the result-set of the SELECT statement may | |
| 157955 | - ** have been modified or reordered, these variables are no longer | |
| 157956 | - ** set correctly. Since setting them is just an optimization, | |
| 157957 | - ** it's easiest just to zero them here. */ | |
| 157958 | - ExprList *pOrderBy = pSelect->pOrderBy; | |
| 157959 | - for(i=0; i<pOrderBy->nExpr; i++){ | |
| 157960 | - pOrderBy->a[i].u.x.iOrderByCol = 0; | |
| 157961 | - } | |
| 158024 | + | |
| 158025 | + /* If either the ORDER BY clause or the GROUP BY clause contains | |
| 158026 | + ** references to result-set columns, those references might now be | |
| 158027 | + ** obsolete. So fix them up. | |
| 158028 | + */ | |
| 158029 | + assert( pRhs!=0 || db->mallocFailed ); | |
| 158030 | + if( pRhs ){ | |
| 158031 | + adjustOrderByCol(pSelect->pOrderBy, pRhs); | |
| 158032 | + adjustOrderByCol(pSelect->pGroupBy, pRhs); | |
| 158033 | + for(i=0; i<pRhs->nExpr; i++) pRhs->a[i].u.x.iOrderByCol = 0; | |
| 157962 | 158034 | } |
| 157963 | 158035 | |
| 157964 | 158036 | #if 0 |
| 157965 | 158037 | printf("For indexing, change the IN expr:\n"); |
| 157966 | 158038 | sqlite3TreeViewExpr(0, pX, 0); |
| @@ -162946,10 +163018,44 @@ | ||
| 162946 | 163018 | return 0; |
| 162947 | 163019 | } |
| 162948 | 163020 | return 1; |
| 162949 | 163021 | } |
| 162950 | 163022 | |
| 163023 | +#ifndef SQLITE_OMIT_AUTOMATIC_INDEX | |
| 163024 | +/* | |
| 163025 | +** Return true if column iCol of table pTab seem like it might be a | |
| 163026 | +** good column to use as part of a query-time index. | |
| 163027 | +** | |
| 163028 | +** Current algorithm (subject to improvement!): | |
| 163029 | +** | |
| 163030 | +** 1. If iCol is already the left-most column of some other index, | |
| 163031 | +** then return false. | |
| 163032 | +** | |
| 163033 | +** 2. If iCol is part of an existing index that has an aiRowLogEst of | |
| 163034 | +** more than 20, then return false. | |
| 163035 | +** | |
| 163036 | +** 3. If no disqualifying conditions above are found, return true. | |
| 163037 | +*/ | |
| 163038 | +static SQLITE_NOINLINE int columnIsGoodIndexCandidate( | |
| 163039 | + const Table *pTab, | |
| 163040 | + int iCol | |
| 163041 | +){ | |
| 163042 | + const Index *pIdx; | |
| 163043 | + for(pIdx = pTab->pIndex; pIdx!=0; pIdx=pIdx->pNext){ | |
| 163044 | + int j; | |
| 163045 | + for(j=0; j<pIdx->nKeyCol; j++){ | |
| 163046 | + if( pIdx->aiColumn[j]==iCol ){ | |
| 163047 | + if( j==0 ) return 0; | |
| 163048 | + if( pIdx->hasStat1 && pIdx->aiRowLogEst[j+1]>20 ) return 0; | |
| 163049 | + break; | |
| 163050 | + } | |
| 163051 | + } | |
| 163052 | + } | |
| 163053 | + return 1; | |
| 163054 | +} | |
| 163055 | +#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */ | |
| 163056 | + | |
| 162951 | 163057 | |
| 162952 | 163058 | |
| 162953 | 163059 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| 162954 | 163060 | /* |
| 162955 | 163061 | ** Return TRUE if the WHERE clause term pTerm is of a form where it |
| @@ -162960,10 +163066,12 @@ | ||
| 162960 | 163066 | const WhereTerm *pTerm, /* WHERE clause term to check */ |
| 162961 | 163067 | const SrcItem *pSrc, /* Table we are trying to access */ |
| 162962 | 163068 | const Bitmask notReady /* Tables in outer loops of the join */ |
| 162963 | 163069 | ){ |
| 162964 | 163070 | char aff; |
| 163071 | + int leftCol; | |
| 163072 | + | |
| 162965 | 163073 | if( pTerm->leftCursor!=pSrc->iCursor ) return 0; |
| 162966 | 163074 | if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0; |
| 162967 | 163075 | assert( (pSrc->fg.jointype & JT_RIGHT)==0 ); |
| 162968 | 163076 | if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0 |
| 162969 | 163077 | && !constraintCompatibleWithOuterJoin(pTerm,pSrc) |
| @@ -162970,15 +163078,16 @@ | ||
| 162970 | 163078 | ){ |
| 162971 | 163079 | return 0; /* See https://sqlite.org/forum/forumpost/51e6959f61 */ |
| 162972 | 163080 | } |
| 162973 | 163081 | if( (pTerm->prereqRight & notReady)!=0 ) return 0; |
| 162974 | 163082 | assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 ); |
| 162975 | - if( pTerm->u.x.leftColumn<0 ) return 0; | |
| 162976 | - aff = pSrc->pTab->aCol[pTerm->u.x.leftColumn].affinity; | |
| 163083 | + leftCol = pTerm->u.x.leftColumn; | |
| 163084 | + if( leftCol<0 ) return 0; | |
| 163085 | + aff = pSrc->pTab->aCol[leftCol].affinity; | |
| 162977 | 163086 | if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0; |
| 162978 | 163087 | testcase( pTerm->pExpr->op==TK_IS ); |
| 162979 | - return 1; | |
| 163088 | + return columnIsGoodIndexCandidate(pSrc->pTab, leftCol); | |
| 162980 | 163089 | } |
| 162981 | 163090 | #endif |
| 162982 | 163091 | |
| 162983 | 163092 | |
| 162984 | 163093 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| @@ -165276,11 +165385,11 @@ | ||
| 165276 | 165385 | assert( saved_nEq==pNew->u.btree.nEq ); |
| 165277 | 165386 | if( iCol==XN_ROWID |
| 165278 | 165387 | || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1) |
| 165279 | 165388 | ){ |
| 165280 | 165389 | if( iCol==XN_ROWID || pProbe->uniqNotNull |
| 165281 | - || (pProbe->nKeyCol==1 && pProbe->onError && eOp==WO_EQ) | |
| 165390 | + || (pProbe->nKeyCol==1 && pProbe->onError && (eOp & WO_EQ)) | |
| 165282 | 165391 | ){ |
| 165283 | 165392 | pNew->wsFlags |= WHERE_ONEROW; |
| 165284 | 165393 | }else{ |
| 165285 | 165394 | pNew->wsFlags |= WHERE_UNQ_WANTED; |
| 165286 | 165395 | } |
| @@ -167312,10 +167421,87 @@ | ||
| 167312 | 167421 | if( nRow>10 ){ nRow -= 10; assert( 10==sqlite3LogEst(2) ); } |
| 167313 | 167422 | } |
| 167314 | 167423 | rSortCost += estLog(nRow); |
| 167315 | 167424 | return rSortCost; |
| 167316 | 167425 | } |
| 167426 | + | |
| 167427 | +/* | |
| 167428 | +** Compute the maximum number of paths in the solver algorithm, for | |
| 167429 | +** queries that have three or more terms in the FROM clause. Queries with | |
| 167430 | +** two or fewer FROM clause terms are handled by the caller. | |
| 167431 | +** | |
| 167432 | +** Query planning is NP-hard. We must limit the number of paths at | |
| 167433 | +** each step of the solver search algorithm to avoid exponential behavior. | |
| 167434 | +** | |
| 167435 | +** The value returned is a tuning parameter. Currently the value is: | |
| 167436 | +** | |
| 167437 | +** 18 for star queries | |
| 167438 | +** 12 otherwise | |
| 167439 | +** | |
| 167440 | +** For the purposes of SQLite, a star-query is defined as a query | |
| 167441 | +** with a large central table that is joined against four or more | |
| 167442 | +** smaller tables. The central table is called the "fact" table. | |
| 167443 | +** The smaller tables that get joined are "dimension tables". | |
| 167444 | +** | |
| 167445 | +** SIDE EFFECT: | |
| 167446 | +** | |
| 167447 | +** If pWInfo describes a star-query, then the cost on WhereLoops for the | |
| 167448 | +** fact table is reduced. This heuristic helps keep fact tables in | |
| 167449 | +** outer loops. Without this heuristic, paths with fact tables in outer | |
| 167450 | +** loops tend to get pruned by the mxChoice limit on the number of paths, | |
| 167451 | +** resulting in poor query plans. The total amount of heuristic cost | |
| 167452 | +** adjustment is stored in pWInfo->nOutStarDelta and the cost adjustment | |
| 167453 | +** for each WhereLoop is stored in its rStarDelta field. | |
| 167454 | +*/ | |
| 167455 | +static int computeMxChoice(WhereInfo *pWInfo, LogEst nRowEst){ | |
| 167456 | + int nLoop = pWInfo->nLevel; /* Number of terms in the join */ | |
| 167457 | + if( nRowEst==0 && nLoop>=4 ){ | |
| 167458 | + /* Check to see if we are dealing with a star schema and if so, reduce | |
| 167459 | + ** the cost of fact tables relative to dimension tables, as a heuristic | |
| 167460 | + ** to help keep the fact tables in outer loops. | |
| 167461 | + */ | |
| 167462 | + int iLoop; /* Counter over join terms */ | |
| 167463 | + Bitmask m; /* Bitmask for current loop */ | |
| 167464 | + assert( pWInfo->nOutStarDelta==0 ); | |
| 167465 | + for(iLoop=0, m=1; iLoop<nLoop; iLoop++, m<<=1){ | |
| 167466 | + WhereLoop *pWLoop; /* For looping over WhereLoops */ | |
| 167467 | + int nDep = 0; /* Number of dimension tables */ | |
| 167468 | + LogEst rDelta; /* Heuristic cost adjustment */ | |
| 167469 | + Bitmask mSeen = 0; /* Mask of dimension tables */ | |
| 167470 | + for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ | |
| 167471 | + if( (pWLoop->prereq & m)!=0 && (pWLoop->maskSelf & mSeen)==0 ){ | |
| 167472 | + nDep++; | |
| 167473 | + mSeen |= pWLoop->maskSelf; | |
| 167474 | + } | |
| 167475 | + } | |
| 167476 | + if( nDep<=3 ) continue; | |
| 167477 | + rDelta = 15*(nDep-3); | |
| 167478 | +#ifdef WHERETRACE_ENABLED /* 0x4 */ | |
| 167479 | + if( sqlite3WhereTrace&0x4 ){ | |
| 167480 | + SrcItem *pItem = pWInfo->pTabList->a + iLoop; | |
| 167481 | + sqlite3DebugPrintf("Fact-table %s: %d dimensions, cost reduced %d\n", | |
| 167482 | + pItem->zAlias ? pItem->zAlias : pItem->pTab->zName, | |
| 167483 | + nDep, rDelta); | |
| 167484 | + } | |
| 167485 | +#endif | |
| 167486 | + if( pWInfo->nOutStarDelta==0 ){ | |
| 167487 | + for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ | |
| 167488 | + pWLoop->rStarDelta = 0; | |
| 167489 | + } | |
| 167490 | + } | |
| 167491 | + pWInfo->nOutStarDelta += rDelta; | |
| 167492 | + for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ | |
| 167493 | + if( pWLoop->maskSelf==m ){ | |
| 167494 | + pWLoop->rRun -= rDelta; | |
| 167495 | + pWLoop->nOut -= rDelta; | |
| 167496 | + pWLoop->rStarDelta = rDelta; | |
| 167497 | + } | |
| 167498 | + } | |
| 167499 | + } | |
| 167500 | + } | |
| 167501 | + return pWInfo->nOutStarDelta>0 ? 18 : 12; | |
| 167502 | +} | |
| 167317 | 167503 | |
| 167318 | 167504 | /* |
| 167319 | 167505 | ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine |
| 167320 | 167506 | ** attempts to find the lowest cost path that visits each WhereLoop |
| 167321 | 167507 | ** once. This path is then loaded into the pWInfo->a[].pWLoop fields. |
| @@ -167348,17 +167534,29 @@ | ||
| 167348 | 167534 | char *pSpace; /* Temporary memory used by this routine */ |
| 167349 | 167535 | int nSpace; /* Bytes of space allocated at pSpace */ |
| 167350 | 167536 | |
| 167351 | 167537 | pParse = pWInfo->pParse; |
| 167352 | 167538 | nLoop = pWInfo->nLevel; |
| 167353 | - /* TUNING: For simple queries, only the best path is tracked. | |
| 167354 | - ** For 2-way joins, the 5 best paths are followed. | |
| 167355 | - ** For joins of 3 or more tables, track the 10 best paths */ | |
| 167356 | - mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 10); | |
| 167357 | - assert( nLoop<=pWInfo->pTabList->nSrc ); | |
| 167358 | 167539 | WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n", |
| 167359 | 167540 | nRowEst, pParse->nQueryLoop)); |
| 167541 | + /* TUNING: mxChoice is the maximum number of possible paths to preserve | |
| 167542 | + ** at each step. Based on the number of loops in the FROM clause: | |
| 167543 | + ** | |
| 167544 | + ** nLoop mxChoice | |
| 167545 | + ** ----- -------- | |
| 167546 | + ** 1 1 // the most common case | |
| 167547 | + ** 2 5 | |
| 167548 | + ** 3+ 12 or 18 // see computeMxChoice() | |
| 167549 | + */ | |
| 167550 | + if( nLoop<=1 ){ | |
| 167551 | + mxChoice = 1; | |
| 167552 | + }else if( nLoop==2 ){ | |
| 167553 | + mxChoice = 5; | |
| 167554 | + }else{ | |
| 167555 | + mxChoice = computeMxChoice(pWInfo, nRowEst); | |
| 167556 | + } | |
| 167557 | + assert( nLoop<=pWInfo->pTabList->nSrc ); | |
| 167360 | 167558 | |
| 167361 | 167559 | /* If nRowEst is zero and there is an ORDER BY clause, ignore it. In this |
| 167362 | 167560 | ** case the purpose of this call is to estimate the number of rows returned |
| 167363 | 167561 | ** by the overall query. Once this estimate has been obtained, the caller |
| 167364 | 167562 | ** will invoke this function a second time, passing the estimate as the |
| @@ -167437,11 +167635,14 @@ | ||
| 167437 | 167635 | continue; |
| 167438 | 167636 | } |
| 167439 | 167637 | |
| 167440 | 167638 | /* At this point, pWLoop is a candidate to be the next loop. |
| 167441 | 167639 | ** Compute its cost */ |
| 167442 | - rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup,pWLoop->rRun + pFrom->nRow); | |
| 167640 | + rUnsorted = pWLoop->rRun + pFrom->nRow; | |
| 167641 | + if( pWLoop->rSetup ){ | |
| 167642 | + rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup, rUnsorted); | |
| 167643 | + } | |
| 167443 | 167644 | rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted); |
| 167444 | 167645 | nOut = pFrom->nRow + pWLoop->nOut; |
| 167445 | 167646 | maskNew = pFrom->maskLoop | pWLoop->maskSelf; |
| 167446 | 167647 | isOrdered = pFrom->isOrdered; |
| 167447 | 167648 | if( isOrdered<0 ){ |
| @@ -167482,10 +167683,11 @@ | ||
| 167482 | 167683 | ** |
| 167483 | 167684 | ** The term "((pTo->isOrdered^isOrdered)&0x80)==0" is equivalent |
| 167484 | 167685 | ** to (pTo->isOrdered==(-1))==(isOrdered==(-1))" for the range |
| 167485 | 167686 | ** of legal values for isOrdered, -1..64. |
| 167486 | 167687 | */ |
| 167688 | + testcase( nTo==0 ); | |
| 167487 | 167689 | for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){ |
| 167488 | 167690 | if( pTo->maskLoop==maskNew |
| 167489 | 167691 | && ((pTo->isOrdered^isOrdered)&0x80)==0 |
| 167490 | 167692 | ){ |
| 167491 | 167693 | testcase( jj==nTo-1 ); |
| @@ -167598,20 +167800,32 @@ | ||
| 167598 | 167800 | } |
| 167599 | 167801 | } |
| 167600 | 167802 | |
| 167601 | 167803 | #ifdef WHERETRACE_ENABLED /* >=2 */ |
| 167602 | 167804 | if( sqlite3WhereTrace & 0x02 ){ |
| 167805 | + LogEst rMin, rFloor = 0; | |
| 167806 | + int nDone = 0; | |
| 167603 | 167807 | sqlite3DebugPrintf("---- after round %d ----\n", iLoop); |
| 167604 | - for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ | |
| 167605 | - sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c", | |
| 167606 | - wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, | |
| 167607 | - pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?'); | |
| 167608 | - if( pTo->isOrdered>0 ){ | |
| 167609 | - sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop); | |
| 167610 | - }else{ | |
| 167611 | - sqlite3DebugPrintf("\n"); | |
| 167612 | - } | |
| 167808 | + while( nDone<nTo ){ | |
| 167809 | + rMin = 0x7fff; | |
| 167810 | + for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ | |
| 167811 | + if( pTo->rCost>rFloor && pTo->rCost<rMin ) rMin = pTo->rCost; | |
| 167812 | + } | |
| 167813 | + for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ | |
| 167814 | + if( pTo->rCost==rMin ){ | |
| 167815 | + sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c", | |
| 167816 | + wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, | |
| 167817 | + pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?'); | |
| 167818 | + if( pTo->isOrdered>0 ){ | |
| 167819 | + sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop); | |
| 167820 | + }else{ | |
| 167821 | + sqlite3DebugPrintf("\n"); | |
| 167822 | + } | |
| 167823 | + nDone++; | |
| 167824 | + } | |
| 167825 | + } | |
| 167826 | + rFloor = rMin; | |
| 167613 | 167827 | } |
| 167614 | 167828 | } |
| 167615 | 167829 | #endif |
| 167616 | 167830 | |
| 167617 | 167831 | /* Swap the roles of aFrom and aTo for the next generation */ |
| @@ -167702,11 +167916,11 @@ | ||
| 167702 | 167916 | pWInfo->revMask = revMask; |
| 167703 | 167917 | } |
| 167704 | 167918 | } |
| 167705 | 167919 | } |
| 167706 | 167920 | |
| 167707 | - pWInfo->nRowOut = pFrom->nRow; | |
| 167921 | + pWInfo->nRowOut = pFrom->nRow + pWInfo->nOutStarDelta; | |
| 167708 | 167922 | |
| 167709 | 167923 | /* Free temporary memory and return success */ |
| 167710 | 167924 | sqlite3StackFreeNN(pParse->db, pSpace); |
| 167711 | 167925 | return SQLITE_OK; |
| 167712 | 167926 | } |
| @@ -168092,10 +168306,11 @@ | ||
| 168092 | 168306 | pLoop->cId, (double)sqlite3LogEstToInt(nSearch), pTab->zName, |
| 168093 | 168307 | (double)sqlite3LogEstToInt(pTab->nRowLogEst))); |
| 168094 | 168308 | } |
| 168095 | 168309 | } |
| 168096 | 168310 | nSearch += pLoop->nOut; |
| 168311 | + if( pWInfo->nOutStarDelta ) nSearch += pLoop->rStarDelta; | |
| 168097 | 168312 | } |
| 168098 | 168313 | } |
| 168099 | 168314 | |
| 168100 | 168315 | /* |
| 168101 | 168316 | ** Expression Node callback for sqlite3ExprCanReturnSubtype(). |
| @@ -168607,11 +168822,11 @@ | ||
| 168607 | 168822 | |
| 168608 | 168823 | wherePathSolver(pWInfo, 0); |
| 168609 | 168824 | if( db->mallocFailed ) goto whereBeginError; |
| 168610 | 168825 | if( pWInfo->pOrderBy ){ |
| 168611 | 168826 | whereInterstageHeuristic(pWInfo); |
| 168612 | - wherePathSolver(pWInfo, pWInfo->nRowOut+1); | |
| 168827 | + wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); | |
| 168613 | 168828 | if( db->mallocFailed ) goto whereBeginError; |
| 168614 | 168829 | } |
| 168615 | 168830 | |
| 168616 | 168831 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 168617 | 168832 | ** the output size by a factor of 8 (LogEst -30). |
| @@ -173084,227 +173299,229 @@ | ||
| 173084 | 173299 | ** yy_reduce_ofst[] For each state, the offset into yy_action for |
| 173085 | 173300 | ** shifting non-terminals after a reduce. |
| 173086 | 173301 | ** yy_default[] Default action for each state. |
| 173087 | 173302 | ** |
| 173088 | 173303 | *********** Begin parsing tables **********************************************/ |
| 173089 | -#define YY_ACTTAB_COUNT (2142) | |
| 173304 | +#define YY_ACTTAB_COUNT (2167) | |
| 173090 | 173305 | static const YYACTIONTYPE yy_action[] = { |
| 173091 | - /* 0 */ 576, 128, 125, 232, 1622, 549, 576, 1290, 1281, 576, | |
| 173092 | - /* 10 */ 328, 576, 1300, 212, 576, 128, 125, 232, 578, 412, | |
| 173093 | - /* 20 */ 578, 391, 1542, 51, 51, 523, 405, 1293, 529, 51, | |
| 173094 | - /* 30 */ 51, 983, 51, 51, 81, 81, 1107, 61, 61, 984, | |
| 173095 | - /* 40 */ 1107, 1292, 380, 135, 136, 90, 1228, 1228, 1063, 1066, | |
| 173096 | - /* 50 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 1577, 412, | |
| 173097 | - /* 60 */ 287, 287, 7, 287, 287, 422, 1050, 1050, 1064, 1067, | |
| 173098 | - /* 70 */ 289, 556, 492, 573, 524, 561, 573, 497, 561, 482, | |
| 173099 | - /* 80 */ 530, 262, 229, 135, 136, 90, 1228, 1228, 1063, 1066, | |
| 173100 | - /* 90 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 128, 125, | |
| 173101 | - /* 100 */ 232, 1506, 132, 132, 132, 132, 131, 131, 130, 130, | |
| 173102 | - /* 110 */ 130, 129, 126, 450, 1204, 1255, 1, 1, 582, 2, | |
| 173103 | - /* 120 */ 1259, 1571, 420, 1582, 379, 320, 1174, 153, 1174, 1584, | |
| 173104 | - /* 130 */ 412, 378, 1582, 543, 1341, 330, 111, 570, 570, 570, | |
| 173105 | - /* 140 */ 293, 1054, 132, 132, 132, 132, 131, 131, 130, 130, | |
| 173106 | - /* 150 */ 130, 129, 126, 450, 135, 136, 90, 1228, 1228, 1063, | |
| 173107 | - /* 160 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 287, | |
| 173108 | - /* 170 */ 287, 1204, 1205, 1204, 255, 287, 287, 510, 507, 506, | |
| 173109 | - /* 180 */ 137, 455, 573, 212, 561, 447, 446, 505, 573, 1616, | |
| 173110 | - /* 190 */ 561, 134, 134, 134, 134, 127, 400, 243, 132, 132, | |
| 173111 | - /* 200 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450, | |
| 173112 | - /* 210 */ 282, 471, 345, 132, 132, 132, 132, 131, 131, 130, | |
| 173113 | - /* 220 */ 130, 130, 129, 126, 450, 574, 155, 936, 936, 454, | |
| 173114 | - /* 230 */ 227, 521, 1236, 412, 1236, 134, 134, 134, 134, 132, | |
| 173115 | - /* 240 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126, | |
| 173116 | - /* 250 */ 450, 130, 130, 130, 129, 126, 450, 135, 136, 90, | |
| 173117 | - /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, | |
| 173118 | - /* 270 */ 134, 134, 128, 125, 232, 450, 576, 412, 397, 1249, | |
| 173119 | - /* 280 */ 180, 92, 93, 132, 132, 132, 132, 131, 131, 130, | |
| 173120 | - /* 290 */ 130, 130, 129, 126, 450, 381, 387, 1204, 383, 81, | |
| 173121 | - /* 300 */ 81, 135, 136, 90, 1228, 1228, 1063, 1066, 1053, 1053, | |
| 173122 | - /* 310 */ 133, 133, 134, 134, 134, 134, 132, 132, 132, 132, | |
| 173123 | - /* 320 */ 131, 131, 130, 130, 130, 129, 126, 450, 131, 131, | |
| 173124 | - /* 330 */ 130, 130, 130, 129, 126, 450, 556, 1204, 302, 319, | |
| 173125 | - /* 340 */ 567, 121, 568, 480, 4, 555, 1149, 1657, 1628, 1657, | |
| 173126 | - /* 350 */ 45, 128, 125, 232, 1204, 1205, 1204, 1250, 571, 1169, | |
| 173127 | - /* 360 */ 132, 132, 132, 132, 131, 131, 130, 130, 130, 129, | |
| 173128 | - /* 370 */ 126, 450, 1169, 287, 287, 1169, 1019, 576, 422, 1019, | |
| 173129 | - /* 380 */ 412, 451, 1602, 582, 2, 1259, 573, 44, 561, 95, | |
| 173130 | - /* 390 */ 320, 110, 153, 565, 1204, 1205, 1204, 522, 522, 1341, | |
| 173131 | - /* 400 */ 81, 81, 7, 44, 135, 136, 90, 1228, 1228, 1063, | |
| 173132 | - /* 410 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 295, | |
| 173133 | - /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 319, 567, 119, 119, | |
| 173134 | - /* 430 */ 343, 466, 331, 343, 287, 287, 120, 556, 451, 577, | |
| 173135 | - /* 440 */ 451, 1169, 1169, 1028, 319, 567, 438, 573, 210, 561, | |
| 173136 | - /* 450 */ 1339, 1451, 546, 531, 1169, 1169, 1598, 1169, 1169, 416, | |
| 173137 | - /* 460 */ 319, 567, 243, 132, 132, 132, 132, 131, 131, 130, | |
| 173138 | - /* 470 */ 130, 130, 129, 126, 450, 1028, 1028, 1030, 1031, 35, | |
| 173139 | - /* 480 */ 44, 1204, 1205, 1204, 472, 287, 287, 1328, 412, 1307, | |
| 173140 | - /* 490 */ 372, 1595, 359, 225, 454, 1204, 195, 1328, 573, 1147, | |
| 173141 | - /* 500 */ 561, 1333, 1333, 274, 576, 1188, 576, 340, 46, 196, | |
| 173142 | - /* 510 */ 537, 217, 135, 136, 90, 1228, 1228, 1063, 1066, 1053, | |
| 173143 | - /* 520 */ 1053, 133, 133, 134, 134, 134, 134, 19, 19, 19, | |
| 173144 | - /* 530 */ 19, 412, 581, 1204, 1259, 511, 1204, 319, 567, 320, | |
| 173145 | - /* 540 */ 944, 153, 425, 491, 430, 943, 1204, 488, 1341, 1450, | |
| 173146 | - /* 550 */ 532, 1277, 1204, 1205, 1204, 135, 136, 90, 1228, 1228, | |
| 173147 | - /* 560 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, | |
| 173148 | - /* 570 */ 575, 132, 132, 132, 132, 131, 131, 130, 130, 130, | |
| 173149 | - /* 580 */ 129, 126, 450, 287, 287, 528, 287, 287, 372, 1595, | |
| 173150 | - /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 486, 561, 573, | |
| 173151 | - /* 600 */ 889, 561, 412, 1204, 1205, 1204, 886, 40, 22, 22, | |
| 173152 | - /* 610 */ 220, 243, 525, 1449, 132, 132, 132, 132, 131, 131, | |
| 173153 | - /* 620 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, | |
| 173154 | - /* 630 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173155 | - /* 640 */ 134, 412, 180, 454, 1204, 879, 255, 287, 287, 510, | |
| 173156 | - /* 650 */ 507, 506, 372, 1595, 1568, 1331, 1331, 576, 889, 505, | |
| 173157 | - /* 660 */ 573, 44, 561, 559, 1207, 135, 136, 90, 1228, 1228, | |
| 173158 | - /* 670 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, | |
| 173159 | - /* 680 */ 81, 81, 422, 576, 377, 132, 132, 132, 132, 131, | |
| 173160 | - /* 690 */ 131, 130, 130, 130, 129, 126, 450, 297, 287, 287, | |
| 173161 | - /* 700 */ 460, 1204, 1205, 1204, 1204, 534, 19, 19, 448, 448, | |
| 173162 | - /* 710 */ 448, 573, 412, 561, 230, 436, 1187, 535, 319, 567, | |
| 173163 | - /* 720 */ 363, 432, 1207, 1435, 132, 132, 132, 132, 131, 131, | |
| 173164 | - /* 730 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, | |
| 173165 | - /* 740 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173166 | - /* 750 */ 134, 412, 211, 949, 1169, 1041, 1110, 1110, 494, 547, | |
| 173167 | - /* 760 */ 547, 1204, 1205, 1204, 7, 539, 1570, 1169, 376, 576, | |
| 173168 | - /* 770 */ 1169, 5, 1204, 486, 3, 135, 136, 90, 1228, 1228, | |
| 173169 | - /* 780 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, | |
| 173170 | - /* 790 */ 576, 513, 19, 19, 427, 132, 132, 132, 132, 131, | |
| 173171 | - /* 800 */ 131, 130, 130, 130, 129, 126, 450, 305, 1204, 433, | |
| 173172 | - /* 810 */ 225, 1204, 385, 19, 19, 273, 290, 371, 516, 366, | |
| 173173 | - /* 820 */ 515, 260, 412, 538, 1568, 549, 1024, 362, 437, 1204, | |
| 173174 | - /* 830 */ 1205, 1204, 902, 1552, 132, 132, 132, 132, 131, 131, | |
| 173175 | - /* 840 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, | |
| 173176 | - /* 850 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173177 | - /* 860 */ 134, 412, 1435, 514, 1281, 1204, 1205, 1204, 1204, 1205, | |
| 173178 | - /* 870 */ 1204, 903, 48, 342, 1568, 1568, 1279, 1627, 1568, 911, | |
| 173179 | - /* 880 */ 576, 129, 126, 450, 110, 135, 136, 90, 1228, 1228, | |
| 173180 | - /* 890 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, | |
| 173181 | - /* 900 */ 265, 576, 459, 19, 19, 132, 132, 132, 132, 131, | |
| 173182 | - /* 910 */ 131, 130, 130, 130, 129, 126, 450, 1345, 204, 576, | |
| 173183 | - /* 920 */ 459, 458, 50, 47, 19, 19, 49, 434, 1105, 573, | |
| 173184 | - /* 930 */ 497, 561, 412, 428, 108, 1224, 1569, 1554, 376, 205, | |
| 173185 | - /* 940 */ 550, 550, 81, 81, 132, 132, 132, 132, 131, 131, | |
| 173186 | - /* 950 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, | |
| 173187 | - /* 960 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173188 | - /* 970 */ 134, 480, 576, 1204, 576, 1541, 412, 1435, 969, 315, | |
| 173189 | - /* 980 */ 1659, 398, 284, 497, 969, 893, 1569, 1569, 376, 376, | |
| 173190 | - /* 990 */ 1569, 461, 376, 1224, 459, 80, 80, 81, 81, 497, | |
| 173191 | - /* 1000 */ 374, 114, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133, | |
| 173192 | - /* 1010 */ 133, 134, 134, 134, 134, 132, 132, 132, 132, 131, | |
| 173193 | - /* 1020 */ 131, 130, 130, 130, 129, 126, 450, 1204, 1505, 576, | |
| 173194 | - /* 1030 */ 1204, 1205, 1204, 1366, 316, 486, 281, 281, 497, 431, | |
| 173195 | - /* 1040 */ 557, 288, 288, 402, 1340, 471, 345, 298, 429, 573, | |
| 173196 | - /* 1050 */ 576, 561, 81, 81, 573, 374, 561, 971, 386, 132, | |
| 173197 | - /* 1060 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126, | |
| 173198 | - /* 1070 */ 450, 231, 117, 81, 81, 287, 287, 231, 287, 287, | |
| 173199 | - /* 1080 */ 576, 1511, 576, 1336, 1204, 1205, 1204, 139, 573, 556, | |
| 173200 | - /* 1090 */ 561, 573, 412, 561, 441, 456, 969, 213, 558, 1511, | |
| 173201 | - /* 1100 */ 1513, 1550, 969, 143, 143, 145, 145, 1368, 314, 478, | |
| 173202 | - /* 1110 */ 444, 970, 412, 850, 851, 852, 135, 136, 90, 1228, | |
| 173203 | - /* 1120 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173204 | - /* 1130 */ 134, 357, 412, 397, 1148, 304, 135, 136, 90, 1228, | |
| 173205 | - /* 1140 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173206 | - /* 1150 */ 134, 1575, 323, 6, 862, 7, 135, 124, 90, 1228, | |
| 173207 | - /* 1160 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, | |
| 173208 | - /* 1170 */ 134, 409, 408, 1511, 212, 132, 132, 132, 132, 131, | |
| 173209 | - /* 1180 */ 131, 130, 130, 130, 129, 126, 450, 411, 118, 1204, | |
| 173210 | - /* 1190 */ 116, 10, 352, 265, 355, 132, 132, 132, 132, 131, | |
| 173211 | - /* 1200 */ 131, 130, 130, 130, 129, 126, 450, 576, 324, 306, | |
| 173212 | - /* 1210 */ 576, 306, 1250, 469, 158, 132, 132, 132, 132, 131, | |
| 173213 | - /* 1220 */ 131, 130, 130, 130, 129, 126, 450, 207, 1224, 1126, | |
| 173214 | - /* 1230 */ 65, 65, 470, 66, 66, 412, 447, 446, 882, 531, | |
| 173215 | - /* 1240 */ 335, 258, 257, 256, 1127, 1233, 1204, 1205, 1204, 327, | |
| 173216 | - /* 1250 */ 1235, 874, 159, 576, 16, 480, 1085, 1040, 1234, 1128, | |
| 173217 | - /* 1260 */ 136, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133, 133, | |
| 173218 | - /* 1270 */ 134, 134, 134, 134, 1029, 576, 81, 81, 1028, 1040, | |
| 173219 | - /* 1280 */ 922, 576, 463, 1236, 576, 1236, 1224, 502, 107, 1435, | |
| 173220 | - /* 1290 */ 923, 6, 576, 410, 1498, 882, 1029, 480, 21, 21, | |
| 173221 | - /* 1300 */ 1028, 332, 1380, 334, 53, 53, 497, 81, 81, 874, | |
| 173222 | - /* 1310 */ 1028, 1028, 1030, 445, 259, 19, 19, 533, 132, 132, | |
| 173223 | - /* 1320 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450, | |
| 173224 | - /* 1330 */ 551, 301, 1028, 1028, 1030, 107, 532, 545, 121, 568, | |
| 173225 | - /* 1340 */ 1188, 4, 1126, 1576, 449, 576, 462, 7, 1282, 418, | |
| 173226 | - /* 1350 */ 462, 350, 1435, 576, 518, 571, 544, 1127, 121, 568, | |
| 173227 | - /* 1360 */ 442, 4, 1188, 464, 533, 1180, 1223, 9, 67, 67, | |
| 173228 | - /* 1370 */ 487, 576, 1128, 303, 410, 571, 54, 54, 451, 576, | |
| 173229 | - /* 1380 */ 123, 944, 576, 417, 576, 333, 943, 1379, 576, 236, | |
| 173230 | - /* 1390 */ 565, 576, 1574, 564, 68, 68, 7, 576, 451, 362, | |
| 173231 | - /* 1400 */ 419, 182, 69, 69, 541, 70, 70, 71, 71, 540, | |
| 173232 | - /* 1410 */ 565, 72, 72, 484, 55, 55, 473, 1180, 296, 1040, | |
| 173233 | - /* 1420 */ 56, 56, 296, 493, 541, 119, 119, 410, 1573, 542, | |
| 173234 | - /* 1430 */ 569, 418, 7, 120, 1244, 451, 577, 451, 465, 1040, | |
| 173235 | - /* 1440 */ 1028, 576, 1557, 552, 476, 119, 119, 527, 259, 121, | |
| 173236 | - /* 1450 */ 568, 240, 4, 120, 576, 451, 577, 451, 576, 477, | |
| 173237 | - /* 1460 */ 1028, 576, 156, 576, 57, 57, 571, 576, 286, 229, | |
| 173238 | - /* 1470 */ 410, 336, 1028, 1028, 1030, 1031, 35, 59, 59, 219, | |
| 173239 | - /* 1480 */ 983, 60, 60, 220, 73, 73, 74, 74, 984, 451, | |
| 173240 | - /* 1490 */ 75, 75, 1028, 1028, 1030, 1031, 35, 96, 216, 291, | |
| 173241 | - /* 1500 */ 552, 565, 1188, 318, 395, 395, 394, 276, 392, 576, | |
| 173242 | - /* 1510 */ 485, 859, 474, 1311, 410, 541, 576, 417, 1530, 1144, | |
| 173243 | - /* 1520 */ 540, 399, 1188, 292, 237, 1153, 326, 38, 23, 576, | |
| 173244 | - /* 1530 */ 1040, 576, 20, 20, 325, 299, 119, 119, 164, 76, | |
| 173245 | - /* 1540 */ 76, 1529, 121, 568, 120, 4, 451, 577, 451, 203, | |
| 173246 | - /* 1550 */ 576, 1028, 141, 141, 142, 142, 576, 322, 39, 571, | |
| 173247 | - /* 1560 */ 341, 1021, 110, 264, 239, 901, 900, 423, 242, 908, | |
| 173248 | - /* 1570 */ 909, 370, 173, 77, 77, 43, 479, 1310, 264, 62, | |
| 173249 | - /* 1580 */ 62, 369, 451, 1028, 1028, 1030, 1031, 35, 1601, 1192, | |
| 173250 | - /* 1590 */ 453, 1092, 238, 291, 565, 163, 1309, 110, 395, 395, | |
| 173251 | - /* 1600 */ 394, 276, 392, 986, 987, 859, 481, 346, 264, 110, | |
| 173252 | - /* 1610 */ 1032, 489, 576, 1188, 503, 1088, 261, 261, 237, 576, | |
| 173253 | - /* 1620 */ 326, 121, 568, 1040, 4, 347, 1376, 413, 325, 119, | |
| 173254 | - /* 1630 */ 119, 948, 319, 567, 351, 78, 78, 120, 571, 451, | |
| 173255 | - /* 1640 */ 577, 451, 79, 79, 1028, 354, 356, 576, 360, 1092, | |
| 173256 | - /* 1650 */ 110, 576, 974, 942, 264, 123, 457, 358, 239, 576, | |
| 173257 | - /* 1660 */ 519, 451, 939, 1104, 123, 1104, 173, 576, 1032, 43, | |
| 173258 | - /* 1670 */ 63, 63, 1324, 565, 168, 168, 1028, 1028, 1030, 1031, | |
| 173259 | - /* 1680 */ 35, 576, 169, 169, 1308, 872, 238, 157, 1589, 576, | |
| 173260 | - /* 1690 */ 86, 86, 365, 89, 568, 375, 4, 1103, 941, 1103, | |
| 173261 | - /* 1700 */ 123, 576, 1040, 1389, 64, 64, 1188, 1434, 119, 119, | |
| 173262 | - /* 1710 */ 571, 576, 82, 82, 563, 576, 120, 165, 451, 577, | |
| 173263 | - /* 1720 */ 451, 413, 1362, 1028, 144, 144, 319, 567, 576, 1374, | |
| 173264 | - /* 1730 */ 562, 498, 279, 451, 83, 83, 1439, 576, 166, 166, | |
| 173265 | - /* 1740 */ 576, 1289, 554, 576, 1280, 565, 576, 12, 576, 1268, | |
| 173266 | - /* 1750 */ 457, 146, 146, 1267, 576, 1028, 1028, 1030, 1031, 35, | |
| 173267 | - /* 1760 */ 140, 140, 1269, 167, 167, 1609, 160, 160, 1359, 150, | |
| 173268 | - /* 1770 */ 150, 149, 149, 311, 1040, 576, 312, 147, 147, 313, | |
| 173269 | - /* 1780 */ 119, 119, 222, 235, 576, 1188, 396, 576, 120, 576, | |
| 173270 | - /* 1790 */ 451, 577, 451, 1192, 453, 1028, 508, 291, 148, 148, | |
| 173271 | - /* 1800 */ 1421, 1612, 395, 395, 394, 276, 392, 85, 85, 859, | |
| 173272 | - /* 1810 */ 87, 87, 84, 84, 553, 576, 294, 576, 1426, 338, | |
| 173273 | - /* 1820 */ 339, 1425, 237, 300, 326, 1416, 1409, 1028, 1028, 1030, | |
| 173274 | - /* 1830 */ 1031, 35, 325, 344, 403, 483, 226, 1307, 52, 52, | |
| 173275 | - /* 1840 */ 58, 58, 368, 1371, 1502, 566, 1501, 121, 568, 221, | |
| 173276 | - /* 1850 */ 4, 208, 268, 209, 390, 1244, 1549, 1188, 1372, 1370, | |
| 173277 | - /* 1860 */ 1369, 1547, 239, 184, 571, 233, 421, 1241, 95, 218, | |
| 173278 | - /* 1870 */ 173, 1507, 193, 43, 91, 94, 178, 186, 467, 188, | |
| 173279 | - /* 1880 */ 468, 1422, 13, 189, 190, 191, 501, 451, 245, 108, | |
| 173280 | - /* 1890 */ 238, 401, 1428, 1427, 1430, 475, 404, 1496, 197, 565, | |
| 173281 | - /* 1900 */ 14, 490, 249, 101, 1518, 496, 349, 280, 251, 201, | |
| 173282 | - /* 1910 */ 353, 499, 252, 406, 1270, 253, 517, 1327, 1326, 435, | |
| 173283 | - /* 1920 */ 1325, 1318, 103, 893, 1296, 413, 227, 407, 1040, 1626, | |
| 173284 | - /* 1930 */ 319, 567, 1625, 1297, 119, 119, 439, 367, 1317, 1295, | |
| 173285 | - /* 1940 */ 1624, 526, 120, 440, 451, 577, 451, 1594, 309, 1028, | |
| 173286 | - /* 1950 */ 310, 373, 266, 267, 457, 1580, 1579, 443, 138, 1394, | |
| 173287 | - /* 1960 */ 552, 1393, 11, 1483, 384, 115, 317, 1350, 109, 536, | |
| 173288 | - /* 1970 */ 42, 579, 382, 214, 1349, 388, 1198, 389, 275, 277, | |
| 173289 | - /* 1980 */ 278, 1028, 1028, 1030, 1031, 35, 580, 1265, 414, 1260, | |
| 173290 | - /* 1990 */ 170, 415, 183, 1534, 1535, 1533, 171, 154, 307, 1532, | |
| 173291 | - /* 2000 */ 846, 223, 224, 88, 452, 215, 172, 321, 234, 1102, | |
| 173292 | - /* 2010 */ 152, 1188, 1100, 329, 185, 174, 1223, 925, 187, 241, | |
| 173293 | - /* 2020 */ 337, 244, 1116, 192, 175, 176, 424, 426, 97, 194, | |
| 173294 | - /* 2030 */ 98, 99, 100, 177, 1119, 1115, 246, 247, 161, 24, | |
| 173295 | - /* 2040 */ 248, 348, 1238, 264, 1108, 250, 495, 199, 198, 15, | |
| 173296 | - /* 2050 */ 861, 500, 369, 254, 504, 509, 512, 200, 102, 25, | |
| 173297 | - /* 2060 */ 179, 361, 26, 364, 104, 891, 308, 162, 105, 904, | |
| 173298 | - /* 2070 */ 520, 106, 1185, 1069, 1155, 17, 228, 27, 1154, 283, | |
| 173299 | - /* 2080 */ 285, 263, 978, 202, 972, 123, 28, 1175, 29, 30, | |
| 173300 | - /* 2090 */ 1179, 1171, 31, 1173, 1160, 41, 32, 206, 548, 33, | |
| 173301 | - /* 2100 */ 110, 1178, 1083, 8, 112, 1070, 113, 1068, 1072, 34, | |
| 173302 | - /* 2110 */ 1073, 560, 1125, 269, 1124, 270, 36, 18, 1194, 1033, | |
| 173303 | - /* 2120 */ 873, 151, 122, 37, 393, 271, 272, 572, 181, 1193, | |
| 173304 | - /* 2130 */ 1256, 1256, 1256, 935, 1256, 1256, 1256, 1256, 1256, 1256, | |
| 173305 | - /* 2140 */ 1256, 1617, | |
| 173306 | + /* 0 */ 576, 130, 127, 234, 1622, 550, 576, 1290, 1281, 576, | |
| 173307 | + /* 10 */ 329, 576, 1300, 214, 576, 130, 127, 234, 578, 413, | |
| 173308 | + /* 20 */ 578, 392, 1542, 51, 51, 524, 406, 1293, 530, 51, | |
| 173309 | + /* 30 */ 51, 983, 51, 51, 82, 82, 1107, 61, 61, 984, | |
| 173310 | + /* 40 */ 1107, 1292, 381, 137, 138, 91, 1228, 1228, 1063, 1066, | |
| 173311 | + /* 50 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 1577, 413, | |
| 173312 | + /* 60 */ 288, 288, 7, 288, 288, 423, 1050, 1050, 1064, 1067, | |
| 173313 | + /* 70 */ 290, 557, 493, 573, 525, 562, 573, 498, 562, 483, | |
| 173314 | + /* 80 */ 531, 264, 231, 137, 138, 91, 1228, 1228, 1063, 1066, | |
| 173315 | + /* 90 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 130, 127, | |
| 173316 | + /* 100 */ 234, 1506, 134, 134, 134, 134, 133, 133, 132, 132, | |
| 173317 | + /* 110 */ 132, 131, 128, 451, 1204, 1255, 1, 1, 582, 2, | |
| 173318 | + /* 120 */ 1259, 1571, 421, 1582, 380, 321, 1174, 155, 1174, 1584, | |
| 173319 | + /* 130 */ 413, 379, 1582, 544, 1341, 331, 112, 570, 570, 570, | |
| 173320 | + /* 140 */ 294, 1054, 134, 134, 134, 134, 133, 133, 132, 132, | |
| 173321 | + /* 150 */ 132, 131, 128, 451, 137, 138, 91, 1228, 1228, 1063, | |
| 173322 | + /* 160 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 288, | |
| 173323 | + /* 170 */ 288, 1204, 1205, 1204, 257, 288, 288, 511, 508, 507, | |
| 173324 | + /* 180 */ 139, 456, 573, 214, 562, 448, 447, 506, 573, 1616, | |
| 173325 | + /* 190 */ 562, 136, 136, 136, 136, 129, 401, 245, 134, 134, | |
| 173326 | + /* 200 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, | |
| 173327 | + /* 210 */ 283, 472, 346, 134, 134, 134, 134, 133, 133, 132, | |
| 173328 | + /* 220 */ 132, 132, 131, 128, 451, 574, 157, 936, 936, 455, | |
| 173329 | + /* 230 */ 229, 522, 1236, 413, 1236, 136, 136, 136, 136, 134, | |
| 173330 | + /* 240 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128, | |
| 173331 | + /* 250 */ 451, 132, 132, 132, 131, 128, 451, 137, 138, 91, | |
| 173332 | + /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, | |
| 173333 | + /* 270 */ 136, 136, 130, 127, 234, 451, 576, 413, 398, 1249, | |
| 173334 | + /* 280 */ 182, 93, 94, 134, 134, 134, 134, 133, 133, 132, | |
| 173335 | + /* 290 */ 132, 132, 131, 128, 451, 382, 388, 1204, 384, 82, | |
| 173336 | + /* 300 */ 82, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, | |
| 173337 | + /* 310 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134, | |
| 173338 | + /* 320 */ 133, 133, 132, 132, 132, 131, 128, 451, 133, 133, | |
| 173339 | + /* 330 */ 132, 132, 132, 131, 128, 451, 557, 1204, 303, 320, | |
| 173340 | + /* 340 */ 567, 123, 568, 481, 4, 556, 1149, 1657, 1628, 1657, | |
| 173341 | + /* 350 */ 45, 130, 127, 234, 1204, 1205, 1204, 1250, 571, 1169, | |
| 173342 | + /* 360 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131, | |
| 173343 | + /* 370 */ 128, 451, 1169, 288, 288, 1169, 1019, 576, 423, 1019, | |
| 173344 | + /* 380 */ 413, 452, 1602, 582, 2, 1259, 573, 44, 562, 96, | |
| 173345 | + /* 390 */ 321, 111, 155, 565, 1204, 1205, 1204, 523, 523, 1341, | |
| 173346 | + /* 400 */ 82, 82, 7, 44, 137, 138, 91, 1228, 1228, 1063, | |
| 173347 | + /* 410 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296, | |
| 173348 | + /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 320, 567, 121, 121, | |
| 173349 | + /* 430 */ 344, 467, 332, 344, 288, 288, 122, 557, 452, 577, | |
| 173350 | + /* 440 */ 452, 1169, 1169, 1028, 320, 567, 439, 573, 212, 562, | |
| 173351 | + /* 450 */ 1339, 1451, 547, 532, 1169, 1169, 1598, 1169, 1169, 417, | |
| 173352 | + /* 460 */ 320, 567, 245, 134, 134, 134, 134, 133, 133, 132, | |
| 173353 | + /* 470 */ 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031, 35, | |
| 173354 | + /* 480 */ 44, 1204, 1205, 1204, 473, 288, 288, 1328, 413, 1307, | |
| 173355 | + /* 490 */ 373, 1595, 360, 227, 455, 1204, 197, 1328, 573, 1147, | |
| 173356 | + /* 500 */ 562, 1333, 1333, 275, 576, 1188, 576, 341, 46, 198, | |
| 173357 | + /* 510 */ 538, 219, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, | |
| 173358 | + /* 520 */ 1053, 135, 135, 136, 136, 136, 136, 19, 19, 19, | |
| 173359 | + /* 530 */ 19, 413, 581, 1204, 1259, 512, 1204, 320, 567, 321, | |
| 173360 | + /* 540 */ 944, 155, 426, 492, 431, 943, 1204, 489, 1341, 1450, | |
| 173361 | + /* 550 */ 533, 1277, 1204, 1205, 1204, 137, 138, 91, 1228, 1228, | |
| 173362 | + /* 560 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, | |
| 173363 | + /* 570 */ 575, 134, 134, 134, 134, 133, 133, 132, 132, 132, | |
| 173364 | + /* 580 */ 131, 128, 451, 288, 288, 529, 288, 288, 373, 1595, | |
| 173365 | + /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 487, 562, 573, | |
| 173366 | + /* 600 */ 889, 562, 413, 1204, 1205, 1204, 886, 40, 22, 22, | |
| 173367 | + /* 610 */ 222, 245, 526, 1449, 134, 134, 134, 134, 133, 133, | |
| 173368 | + /* 620 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, | |
| 173369 | + /* 630 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173370 | + /* 640 */ 136, 413, 182, 455, 1204, 879, 257, 288, 288, 511, | |
| 173371 | + /* 650 */ 508, 507, 373, 1595, 1568, 1331, 1331, 576, 889, 506, | |
| 173372 | + /* 660 */ 573, 44, 562, 560, 378, 137, 138, 91, 1228, 1228, | |
| 173373 | + /* 670 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, | |
| 173374 | + /* 680 */ 82, 82, 423, 576, 375, 134, 134, 134, 134, 133, | |
| 173375 | + /* 690 */ 133, 132, 132, 132, 131, 128, 451, 298, 288, 288, | |
| 173376 | + /* 700 */ 461, 1204, 1205, 1204, 1204, 535, 19, 19, 232, 550, | |
| 173377 | + /* 710 */ 1281, 573, 413, 562, 386, 437, 1187, 536, 320, 567, | |
| 173378 | + /* 720 */ 364, 433, 1279, 432, 134, 134, 134, 134, 133, 133, | |
| 173379 | + /* 730 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, | |
| 173380 | + /* 740 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173381 | + /* 750 */ 136, 413, 213, 949, 1169, 1041, 449, 449, 449, 548, | |
| 173382 | + /* 760 */ 548, 1204, 1205, 1204, 7, 540, 1570, 1169, 377, 576, | |
| 173383 | + /* 770 */ 1169, 5, 1204, 1552, 3, 137, 138, 91, 1228, 1228, | |
| 173384 | + /* 780 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, | |
| 173385 | + /* 790 */ 576, 514, 19, 19, 1554, 134, 134, 134, 134, 133, | |
| 173386 | + /* 800 */ 133, 132, 132, 132, 131, 128, 451, 306, 1204, 434, | |
| 173387 | + /* 810 */ 1435, 1204, 1435, 19, 19, 274, 291, 372, 517, 367, | |
| 173388 | + /* 820 */ 516, 262, 413, 539, 551, 551, 1024, 363, 438, 1204, | |
| 173389 | + /* 830 */ 1205, 1204, 1659, 399, 134, 134, 134, 134, 133, 133, | |
| 173390 | + /* 840 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, | |
| 173391 | + /* 850 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173392 | + /* 860 */ 136, 413, 481, 282, 282, 1204, 1205, 1204, 1204, 1205, | |
| 173393 | + /* 870 */ 1204, 131, 128, 451, 1568, 1568, 573, 1627, 562, 911, | |
| 173394 | + /* 880 */ 576, 428, 285, 429, 969, 137, 138, 91, 1228, 1228, | |
| 173395 | + /* 890 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, | |
| 173396 | + /* 900 */ 553, 576, 457, 19, 19, 134, 134, 134, 134, 133, | |
| 173397 | + /* 910 */ 133, 132, 132, 132, 131, 128, 451, 1345, 206, 158, | |
| 173398 | + /* 920 */ 1040, 1550, 48, 50, 19, 19, 1204, 289, 289, 573, | |
| 173399 | + /* 930 */ 1105, 562, 413, 1110, 1110, 495, 1125, 1029, 299, 207, | |
| 173400 | + /* 940 */ 573, 1028, 562, 403, 134, 134, 134, 134, 133, 133, | |
| 173401 | + /* 950 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, | |
| 173402 | + /* 960 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173403 | + /* 970 */ 136, 576, 375, 1028, 1028, 1030, 576, 233, 288, 288, | |
| 173404 | + /* 980 */ 481, 576, 1126, 1204, 1205, 1204, 1569, 1569, 377, 377, | |
| 173405 | + /* 990 */ 576, 573, 558, 562, 82, 82, 1204, 1127, 481, 82, | |
| 173406 | + /* 1000 */ 82, 115, 969, 1188, 82, 82, 576, 902, 141, 479, | |
| 173407 | + /* 1010 */ 971, 442, 1128, 81, 81, 134, 134, 134, 134, 133, | |
| 173408 | + /* 1020 */ 133, 132, 132, 132, 131, 128, 451, 288, 288, 19, | |
| 173409 | + /* 1030 */ 19, 316, 498, 922, 576, 413, 317, 1568, 515, 23, | |
| 173410 | + /* 1040 */ 573, 557, 562, 923, 552, 1575, 903, 472, 346, 7, | |
| 173411 | + /* 1050 */ 559, 532, 267, 1204, 1205, 1204, 302, 82, 82, 137, | |
| 173412 | + /* 1060 */ 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, | |
| 173413 | + /* 1070 */ 136, 136, 136, 136, 304, 576, 387, 1541, 424, 413, | |
| 173414 | + /* 1080 */ 970, 166, 460, 1204, 215, 47, 1568, 1224, 260, 259, | |
| 173415 | + /* 1090 */ 258, 487, 410, 409, 445, 1368, 315, 336, 82, 82, | |
| 173416 | + /* 1100 */ 460, 459, 435, 137, 138, 91, 1228, 1228, 1063, 1066, | |
| 173417 | + /* 1110 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134, | |
| 173418 | + /* 1120 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, | |
| 173419 | + /* 1130 */ 448, 447, 576, 358, 49, 446, 850, 851, 852, 1233, | |
| 173420 | + /* 1140 */ 1204, 1205, 1204, 487, 1235, 1224, 214, 108, 533, 1569, | |
| 173421 | + /* 1150 */ 498, 377, 1234, 1576, 498, 82, 82, 7, 333, 412, | |
| 173422 | + /* 1160 */ 335, 576, 134, 134, 134, 134, 133, 133, 132, 132, | |
| 173423 | + /* 1170 */ 132, 131, 128, 451, 460, 119, 534, 1236, 498, 1236, | |
| 173424 | + /* 1180 */ 111, 307, 413, 307, 145, 145, 1511, 10, 160, 267, | |
| 173425 | + /* 1190 */ 324, 343, 450, 1435, 353, 1505, 356, 325, 1569, 1340, | |
| 173426 | + /* 1200 */ 377, 498, 413, 520, 1511, 1513, 137, 138, 91, 1228, | |
| 173427 | + /* 1210 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173428 | + /* 1220 */ 136, 576, 413, 1336, 1224, 874, 137, 126, 91, 1228, | |
| 173429 | + /* 1230 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173430 | + /* 1240 */ 136, 862, 334, 305, 147, 147, 351, 138, 91, 1228, | |
| 173431 | + /* 1250 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, | |
| 173432 | + /* 1260 */ 136, 398, 1148, 6, 430, 134, 134, 134, 134, 133, | |
| 173433 | + /* 1270 */ 133, 132, 132, 132, 131, 128, 451, 882, 1511, 576, | |
| 173434 | + /* 1280 */ 1574, 893, 1224, 874, 7, 134, 134, 134, 134, 133, | |
| 173435 | + /* 1290 */ 133, 132, 132, 132, 131, 128, 451, 576, 546, 576, | |
| 173436 | + /* 1300 */ 470, 6, 66, 66, 576, 134, 134, 134, 134, 133, | |
| 173437 | + /* 1310 */ 133, 132, 132, 132, 131, 128, 451, 545, 1040, 1207, | |
| 173438 | + /* 1320 */ 67, 67, 21, 21, 576, 413, 1180, 53, 53, 969, | |
| 173439 | + /* 1330 */ 1282, 419, 328, 1435, 882, 1029, 1435, 1573, 503, 1028, | |
| 173440 | + /* 1340 */ 1250, 7, 488, 1085, 576, 463, 297, 68, 68, 463, | |
| 173441 | + /* 1350 */ 297, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, | |
| 173442 | + /* 1360 */ 136, 136, 136, 136, 576, 261, 576, 54, 54, 1126, | |
| 173443 | + /* 1370 */ 576, 1028, 1028, 1030, 576, 209, 238, 1207, 1180, 576, | |
| 173444 | + /* 1380 */ 471, 1498, 576, 1380, 1127, 287, 231, 69, 69, 70, | |
| 173445 | + /* 1390 */ 70, 569, 419, 71, 71, 420, 184, 72, 72, 1128, | |
| 173446 | + /* 1400 */ 576, 1188, 73, 73, 494, 55, 55, 443, 134, 134, | |
| 173447 | + /* 1410 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, | |
| 173448 | + /* 1420 */ 564, 1244, 233, 56, 56, 97, 218, 485, 123, 568, | |
| 173449 | + /* 1430 */ 576, 4, 576, 983, 418, 576, 227, 576, 161, 576, | |
| 173450 | + /* 1440 */ 16, 984, 477, 576, 1223, 571, 576, 969, 123, 568, | |
| 173451 | + /* 1450 */ 363, 4, 576, 57, 57, 59, 59, 9, 60, 60, | |
| 173452 | + /* 1460 */ 74, 74, 75, 75, 108, 571, 76, 76, 452, 20, | |
| 173453 | + /* 1470 */ 20, 464, 576, 465, 576, 77, 77, 221, 1379, 125, | |
| 173454 | + /* 1480 */ 565, 576, 411, 576, 411, 242, 261, 576, 452, 576, | |
| 173455 | + /* 1490 */ 519, 474, 478, 534, 542, 143, 143, 144, 144, 541, | |
| 173456 | + /* 1500 */ 565, 466, 411, 411, 78, 78, 62, 62, 576, 1040, | |
| 173457 | + /* 1510 */ 79, 79, 63, 63, 542, 121, 121, 944, 1144, 543, | |
| 173458 | + /* 1520 */ 400, 462, 943, 122, 486, 452, 577, 452, 1557, 1040, | |
| 173459 | + /* 1530 */ 1028, 80, 80, 319, 576, 121, 121, 337, 38, 123, | |
| 173460 | + /* 1540 */ 568, 1530, 4, 122, 411, 452, 577, 452, 576, 120, | |
| 173461 | + /* 1550 */ 1028, 117, 576, 528, 576, 418, 571, 64, 64, 293, | |
| 173462 | + /* 1560 */ 109, 222, 1028, 1028, 1030, 1031, 35, 475, 342, 39, | |
| 173463 | + /* 1570 */ 111, 170, 170, 901, 900, 171, 171, 87, 87, 452, | |
| 173464 | + /* 1580 */ 908, 909, 1028, 1028, 1030, 1031, 35, 986, 987, 292, | |
| 173465 | + /* 1590 */ 300, 565, 1188, 323, 396, 396, 395, 277, 393, 553, | |
| 173466 | + /* 1600 */ 1092, 859, 244, 1032, 1529, 542, 576, 371, 490, 1021, | |
| 173467 | + /* 1610 */ 541, 266, 1188, 480, 239, 266, 327, 370, 348, 576, | |
| 173468 | + /* 1620 */ 1040, 482, 1376, 266, 326, 352, 121, 121, 355, 65, | |
| 173469 | + /* 1630 */ 65, 1153, 123, 568, 122, 4, 452, 577, 452, 357, | |
| 173470 | + /* 1640 */ 576, 1028, 83, 83, 576, 347, 576, 111, 1311, 571, | |
| 173471 | + /* 1650 */ 504, 361, 263, 111, 241, 1366, 359, 165, 1092, 111, | |
| 173472 | + /* 1660 */ 1324, 1032, 175, 146, 146, 43, 1310, 84, 84, 168, | |
| 173473 | + /* 1670 */ 168, 1309, 452, 1028, 1028, 1030, 1031, 35, 1601, 1192, | |
| 173474 | + /* 1680 */ 454, 1308, 240, 292, 565, 366, 376, 1389, 396, 396, | |
| 173475 | + /* 1690 */ 395, 277, 393, 1434, 1088, 859, 263, 974, 942, 266, | |
| 173476 | + /* 1700 */ 125, 576, 939, 1188, 125, 1104, 1362, 1104, 239, 576, | |
| 173477 | + /* 1710 */ 327, 123, 568, 1040, 4, 205, 1374, 414, 326, 121, | |
| 173478 | + /* 1720 */ 121, 948, 320, 567, 148, 148, 576, 122, 571, 452, | |
| 173479 | + /* 1730 */ 577, 452, 142, 142, 1028, 563, 1103, 576, 1103, 1589, | |
| 173480 | + /* 1740 */ 1439, 576, 872, 941, 159, 125, 458, 1289, 241, 169, | |
| 173481 | + /* 1750 */ 169, 452, 1280, 1268, 1267, 1269, 175, 576, 1609, 43, | |
| 173482 | + /* 1760 */ 162, 162, 499, 565, 152, 152, 1028, 1028, 1030, 1031, | |
| 173483 | + /* 1770 */ 35, 576, 280, 167, 1359, 312, 240, 12, 313, 576, | |
| 173484 | + /* 1780 */ 151, 151, 314, 90, 568, 224, 4, 397, 237, 339, | |
| 173485 | + /* 1790 */ 509, 576, 1040, 1307, 149, 149, 1188, 1421, 121, 121, | |
| 173486 | + /* 1800 */ 571, 576, 150, 150, 1416, 576, 122, 1409, 452, 577, | |
| 173487 | + /* 1810 */ 452, 414, 295, 1028, 86, 86, 320, 567, 340, 576, | |
| 173488 | + /* 1820 */ 345, 1426, 1425, 452, 88, 88, 301, 576, 85, 85, | |
| 173489 | + /* 1830 */ 404, 484, 555, 228, 369, 565, 1502, 1501, 210, 1371, | |
| 173490 | + /* 1840 */ 458, 1372, 52, 52, 211, 1028, 1028, 1030, 1031, 35, | |
| 173491 | + /* 1850 */ 58, 58, 1370, 1369, 566, 391, 223, 1612, 1244, 270, | |
| 173492 | + /* 1860 */ 1549, 186, 1547, 1241, 1040, 422, 96, 235, 195, 180, | |
| 173493 | + /* 1870 */ 121, 121, 92, 220, 1507, 1188, 1422, 95, 122, 188, | |
| 173494 | + /* 1880 */ 452, 577, 452, 1192, 454, 1028, 468, 292, 190, 191, | |
| 173495 | + /* 1890 */ 13, 192, 396, 396, 395, 277, 393, 469, 502, 859, | |
| 173496 | + /* 1900 */ 193, 247, 109, 402, 554, 1428, 1427, 14, 1430, 491, | |
| 173497 | + /* 1910 */ 476, 199, 239, 405, 327, 1496, 251, 1028, 1028, 1030, | |
| 173498 | + /* 1920 */ 1031, 35, 326, 102, 497, 281, 253, 203, 1518, 350, | |
| 173499 | + /* 1930 */ 354, 500, 254, 407, 1270, 255, 518, 123, 568, 436, | |
| 173500 | + /* 1940 */ 4, 1327, 1318, 104, 1326, 893, 1325, 1188, 229, 1317, | |
| 173501 | + /* 1950 */ 1297, 440, 241, 1626, 571, 1625, 408, 1296, 368, 1295, | |
| 173502 | + /* 1960 */ 175, 1624, 1594, 43, 527, 441, 310, 311, 374, 268, | |
| 173503 | + /* 1970 */ 269, 444, 1580, 1394, 1579, 140, 553, 452, 11, 1393, | |
| 173504 | + /* 1980 */ 240, 1483, 385, 110, 318, 537, 116, 216, 1350, 565, | |
| 173505 | + /* 1990 */ 42, 383, 389, 579, 1349, 390, 1198, 276, 278, 279, | |
| 173506 | + /* 2000 */ 580, 1265, 1260, 415, 416, 172, 185, 1534, 1535, 1533, | |
| 173507 | + /* 2010 */ 1532, 156, 173, 89, 308, 414, 225, 846, 1040, 453, | |
| 173508 | + /* 2020 */ 320, 567, 174, 217, 121, 121, 226, 322, 154, 236, | |
| 173509 | + /* 2030 */ 1102, 1100, 122, 330, 452, 577, 452, 187, 176, 1028, | |
| 173510 | + /* 2040 */ 1223, 243, 189, 925, 458, 246, 338, 1116, 194, 177, | |
| 173511 | + /* 2050 */ 178, 425, 98, 196, 179, 427, 99, 100, 101, 1119, | |
| 173512 | + /* 2060 */ 248, 1115, 163, 249, 24, 250, 1108, 1238, 349, 266, | |
| 173513 | + /* 2070 */ 200, 1028, 1028, 1030, 1031, 35, 496, 252, 201, 15, | |
| 173514 | + /* 2080 */ 370, 861, 501, 256, 202, 513, 505, 103, 25, 510, | |
| 173515 | + /* 2090 */ 362, 26, 891, 105, 365, 309, 904, 164, 27, 521, | |
| 173516 | + /* 2100 */ 106, 1188, 1185, 1069, 978, 1155, 107, 17, 1154, 181, | |
| 173517 | + /* 2110 */ 230, 284, 286, 204, 972, 125, 1175, 265, 28, 1171, | |
| 173518 | + /* 2120 */ 29, 30, 1173, 1179, 1160, 1178, 31, 41, 32, 208, | |
| 173519 | + /* 2130 */ 549, 33, 111, 113, 1083, 1070, 114, 8, 1068, 1072, | |
| 173520 | + /* 2140 */ 34, 1073, 561, 1124, 118, 271, 36, 18, 1194, 1033, | |
| 173521 | + /* 2150 */ 873, 124, 394, 37, 1193, 935, 1256, 572, 183, 153, | |
| 173522 | + /* 2160 */ 1256, 1256, 272, 1256, 1256, 273, 1617, | |
| 173306 | 173523 | }; |
| 173307 | 173524 | static const YYCODETYPE yy_lookahead[] = { |
| 173308 | 173525 | /* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194, |
| 173309 | 173526 | /* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19, |
| 173310 | 173527 | /* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217, |
| @@ -173369,161 +173586,161 @@ | ||
| 173369 | 173586 | /* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107, |
| 173370 | 173587 | /* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173371 | 173588 | /* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173372 | 173589 | /* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122, |
| 173373 | 173590 | /* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132, |
| 173374 | - /* 660 */ 253, 81, 255, 205, 59, 43, 44, 45, 46, 47, | |
| 173591 | + /* 660 */ 253, 81, 255, 205, 194, 43, 44, 45, 46, 47, | |
| 173375 | 173592 | /* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173376 | 173593 | /* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106, |
| 173377 | 173594 | /* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241, |
| 173378 | - /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 211, 212, | |
| 173379 | - /* 710 */ 213, 253, 19, 255, 194, 19, 23, 254, 138, 139, | |
| 173380 | - /* 720 */ 24, 232, 117, 194, 102, 103, 104, 105, 106, 107, | |
| 173595 | + /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 194, 194, | |
| 173596 | + /* 710 */ 194, 253, 19, 255, 194, 19, 23, 254, 138, 139, | |
| 173597 | + /* 720 */ 24, 232, 206, 233, 102, 103, 104, 105, 106, 107, | |
| 173381 | 173598 | /* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173382 | 173599 | /* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173383 | - /* 750 */ 57, 19, 264, 108, 76, 23, 127, 128, 129, 311, | |
| 173600 | + /* 750 */ 57, 19, 264, 108, 76, 23, 211, 212, 213, 311, | |
| 173384 | 173601 | /* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194, |
| 173385 | 173602 | /* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47, |
| 173386 | 173603 | /* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173387 | - /* 790 */ 194, 95, 217, 218, 265, 102, 103, 104, 105, 106, | |
| 173604 | + /* 790 */ 194, 95, 217, 218, 194, 102, 103, 104, 105, 106, | |
| 173388 | 173605 | /* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113, |
| 173389 | - /* 810 */ 25, 59, 194, 217, 218, 119, 120, 121, 122, 123, | |
| 173390 | - /* 820 */ 124, 125, 19, 145, 194, 194, 23, 131, 232, 116, | |
| 173391 | - /* 830 */ 117, 118, 35, 194, 102, 103, 104, 105, 106, 107, | |
| 173606 | + /* 810 */ 194, 59, 194, 217, 218, 119, 120, 121, 122, 123, | |
| 173607 | + /* 820 */ 124, 125, 19, 145, 309, 310, 23, 131, 232, 116, | |
| 173608 | + /* 830 */ 117, 118, 303, 304, 102, 103, 104, 105, 106, 107, | |
| 173392 | 173609 | /* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173393 | 173610 | /* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173394 | - /* 860 */ 57, 19, 194, 66, 194, 116, 117, 118, 116, 117, | |
| 173395 | - /* 870 */ 118, 74, 242, 294, 194, 194, 206, 23, 194, 25, | |
| 173396 | - /* 880 */ 194, 111, 112, 113, 25, 43, 44, 45, 46, 47, | |
| 173611 | + /* 860 */ 57, 19, 194, 240, 241, 116, 117, 118, 116, 117, | |
| 173612 | + /* 870 */ 118, 111, 112, 113, 194, 194, 253, 23, 255, 25, | |
| 173613 | + /* 880 */ 194, 265, 23, 265, 25, 43, 44, 45, 46, 47, | |
| 173397 | 173614 | /* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173398 | - /* 900 */ 24, 194, 194, 217, 218, 102, 103, 104, 105, 106, | |
| 173399 | - /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 194, | |
| 173400 | - /* 920 */ 212, 213, 242, 242, 217, 218, 242, 130, 11, 253, | |
| 173401 | - /* 930 */ 194, 255, 19, 265, 149, 59, 306, 194, 308, 232, | |
| 173402 | - /* 940 */ 309, 310, 217, 218, 102, 103, 104, 105, 106, 107, | |
| 173615 | + /* 900 */ 145, 194, 194, 217, 218, 102, 103, 104, 105, 106, | |
| 173616 | + /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 164, | |
| 173617 | + /* 920 */ 100, 194, 242, 242, 217, 218, 59, 240, 241, 253, | |
| 173618 | + /* 930 */ 11, 255, 19, 127, 128, 129, 23, 117, 270, 232, | |
| 173619 | + /* 940 */ 253, 121, 255, 205, 102, 103, 104, 105, 106, 107, | |
| 173403 | 173620 | /* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173404 | 173621 | /* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173405 | - /* 970 */ 57, 194, 194, 59, 194, 239, 19, 194, 25, 254, | |
| 173406 | - /* 980 */ 303, 304, 23, 194, 25, 126, 306, 306, 308, 308, | |
| 173407 | - /* 990 */ 306, 271, 308, 117, 286, 217, 218, 217, 218, 194, | |
| 173408 | - /* 1000 */ 194, 159, 45, 46, 47, 48, 49, 50, 51, 52, | |
| 173409 | - /* 1010 */ 53, 54, 55, 56, 57, 102, 103, 104, 105, 106, | |
| 173410 | - /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 59, 239, 194, | |
| 173411 | - /* 1030 */ 116, 117, 118, 260, 254, 194, 240, 241, 194, 233, | |
| 173412 | - /* 1040 */ 205, 240, 241, 205, 239, 128, 129, 270, 265, 253, | |
| 173413 | - /* 1050 */ 194, 255, 217, 218, 253, 194, 255, 143, 280, 102, | |
| 173414 | - /* 1060 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, | |
| 173415 | - /* 1070 */ 113, 118, 159, 217, 218, 240, 241, 118, 240, 241, | |
| 173416 | - /* 1080 */ 194, 194, 194, 239, 116, 117, 118, 22, 253, 254, | |
| 173417 | - /* 1090 */ 255, 253, 19, 255, 233, 194, 143, 24, 263, 212, | |
| 173418 | - /* 1100 */ 213, 194, 143, 217, 218, 217, 218, 261, 262, 271, | |
| 173419 | - /* 1110 */ 254, 143, 19, 7, 8, 9, 43, 44, 45, 46, | |
| 173420 | - /* 1120 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173421 | - /* 1130 */ 57, 16, 19, 22, 23, 294, 43, 44, 45, 46, | |
| 173422 | - /* 1140 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173423 | - /* 1150 */ 57, 312, 194, 214, 21, 316, 43, 44, 45, 46, | |
| 173424 | - /* 1160 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173425 | - /* 1170 */ 57, 106, 107, 286, 194, 102, 103, 104, 105, 106, | |
| 173426 | - /* 1180 */ 107, 108, 109, 110, 111, 112, 113, 207, 158, 59, | |
| 173427 | - /* 1190 */ 160, 22, 77, 24, 79, 102, 103, 104, 105, 106, | |
| 173428 | - /* 1200 */ 107, 108, 109, 110, 111, 112, 113, 194, 194, 229, | |
| 173429 | - /* 1210 */ 194, 231, 101, 80, 22, 102, 103, 104, 105, 106, | |
| 173430 | - /* 1220 */ 107, 108, 109, 110, 111, 112, 113, 288, 59, 12, | |
| 173431 | - /* 1230 */ 217, 218, 293, 217, 218, 19, 106, 107, 59, 19, | |
| 173432 | - /* 1240 */ 16, 127, 128, 129, 27, 115, 116, 117, 118, 194, | |
| 173433 | - /* 1250 */ 120, 59, 22, 194, 24, 194, 123, 100, 128, 42, | |
| 173434 | - /* 1260 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, | |
| 173435 | - /* 1270 */ 54, 55, 56, 57, 117, 194, 217, 218, 121, 100, | |
| 173436 | - /* 1280 */ 63, 194, 245, 153, 194, 155, 117, 19, 115, 194, | |
| 173437 | - /* 1290 */ 73, 214, 194, 256, 161, 116, 117, 194, 217, 218, | |
| 173438 | - /* 1300 */ 121, 77, 194, 79, 217, 218, 194, 217, 218, 117, | |
| 173439 | - /* 1310 */ 153, 154, 155, 254, 46, 217, 218, 144, 102, 103, | |
| 173440 | - /* 1320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, | |
| 173441 | - /* 1330 */ 232, 270, 153, 154, 155, 115, 116, 66, 19, 20, | |
| 173442 | - /* 1340 */ 183, 22, 12, 312, 254, 194, 262, 316, 209, 210, | |
| 173443 | - /* 1350 */ 266, 239, 194, 194, 108, 36, 85, 27, 19, 20, | |
| 173444 | - /* 1360 */ 265, 22, 183, 245, 144, 94, 25, 48, 217, 218, | |
| 173445 | - /* 1370 */ 293, 194, 42, 270, 256, 36, 217, 218, 59, 194, | |
| 173446 | - /* 1380 */ 25, 135, 194, 115, 194, 161, 140, 194, 194, 15, | |
| 173447 | - /* 1390 */ 71, 194, 312, 63, 217, 218, 316, 194, 59, 131, | |
| 173448 | - /* 1400 */ 301, 302, 217, 218, 85, 217, 218, 217, 218, 90, | |
| 173449 | - /* 1410 */ 71, 217, 218, 19, 217, 218, 245, 146, 262, 100, | |
| 173450 | - /* 1420 */ 217, 218, 266, 265, 85, 106, 107, 256, 312, 90, | |
| 173451 | - /* 1430 */ 209, 210, 316, 114, 60, 116, 117, 118, 194, 100, | |
| 173452 | - /* 1440 */ 121, 194, 194, 145, 115, 106, 107, 19, 46, 19, | |
| 173453 | - /* 1450 */ 20, 24, 22, 114, 194, 116, 117, 118, 194, 245, | |
| 173454 | - /* 1460 */ 121, 194, 164, 194, 217, 218, 36, 194, 258, 259, | |
| 173455 | - /* 1470 */ 256, 194, 153, 154, 155, 156, 157, 217, 218, 150, | |
| 173456 | - /* 1480 */ 31, 217, 218, 142, 217, 218, 217, 218, 39, 59, | |
| 173457 | - /* 1490 */ 217, 218, 153, 154, 155, 156, 157, 149, 150, 5, | |
| 173458 | - /* 1500 */ 145, 71, 183, 245, 10, 11, 12, 13, 14, 194, | |
| 173459 | - /* 1510 */ 116, 17, 129, 227, 256, 85, 194, 115, 194, 23, | |
| 173460 | - /* 1520 */ 90, 25, 183, 99, 30, 97, 32, 22, 22, 194, | |
| 173461 | - /* 1530 */ 100, 194, 217, 218, 40, 152, 106, 107, 23, 217, | |
| 173462 | - /* 1540 */ 218, 194, 19, 20, 114, 22, 116, 117, 118, 257, | |
| 173463 | - /* 1550 */ 194, 121, 217, 218, 217, 218, 194, 133, 53, 36, | |
| 173464 | - /* 1560 */ 23, 23, 25, 25, 70, 120, 121, 61, 141, 7, | |
| 173465 | - /* 1570 */ 8, 121, 78, 217, 218, 81, 23, 227, 25, 217, | |
| 173466 | - /* 1580 */ 218, 131, 59, 153, 154, 155, 156, 157, 0, 1, | |
| 173467 | - /* 1590 */ 2, 59, 98, 5, 71, 23, 227, 25, 10, 11, | |
| 173468 | - /* 1600 */ 12, 13, 14, 83, 84, 17, 23, 23, 25, 25, | |
| 173469 | - /* 1610 */ 59, 194, 194, 183, 23, 23, 25, 25, 30, 194, | |
| 173470 | - /* 1620 */ 32, 19, 20, 100, 22, 194, 194, 133, 40, 106, | |
| 173471 | - /* 1630 */ 107, 108, 138, 139, 194, 217, 218, 114, 36, 116, | |
| 173472 | - /* 1640 */ 117, 118, 217, 218, 121, 194, 194, 194, 23, 117, | |
| 173473 | - /* 1650 */ 25, 194, 23, 23, 25, 25, 162, 194, 70, 194, | |
| 173474 | - /* 1660 */ 145, 59, 23, 153, 25, 155, 78, 194, 117, 81, | |
| 173475 | - /* 1670 */ 217, 218, 194, 71, 217, 218, 153, 154, 155, 156, | |
| 173476 | - /* 1680 */ 157, 194, 217, 218, 194, 23, 98, 25, 321, 194, | |
| 173477 | - /* 1690 */ 217, 218, 194, 19, 20, 194, 22, 153, 23, 155, | |
| 173478 | - /* 1700 */ 25, 194, 100, 194, 217, 218, 183, 194, 106, 107, | |
| 173479 | - /* 1710 */ 36, 194, 217, 218, 237, 194, 114, 243, 116, 117, | |
| 173480 | - /* 1720 */ 118, 133, 194, 121, 217, 218, 138, 139, 194, 194, | |
| 173481 | - /* 1730 */ 194, 290, 289, 59, 217, 218, 194, 194, 217, 218, | |
| 173482 | - /* 1740 */ 194, 194, 140, 194, 194, 71, 194, 244, 194, 194, | |
| 173483 | - /* 1750 */ 162, 217, 218, 194, 194, 153, 154, 155, 156, 157, | |
| 173484 | - /* 1760 */ 217, 218, 194, 217, 218, 194, 217, 218, 257, 217, | |
| 173485 | - /* 1770 */ 218, 217, 218, 257, 100, 194, 257, 217, 218, 257, | |
| 173486 | - /* 1780 */ 106, 107, 215, 299, 194, 183, 192, 194, 114, 194, | |
| 173487 | - /* 1790 */ 116, 117, 118, 1, 2, 121, 221, 5, 217, 218, | |
| 173488 | - /* 1800 */ 273, 197, 10, 11, 12, 13, 14, 217, 218, 17, | |
| 173489 | - /* 1810 */ 217, 218, 217, 218, 140, 194, 246, 194, 273, 295, | |
| 173490 | - /* 1820 */ 247, 273, 30, 247, 32, 269, 269, 153, 154, 155, | |
| 173491 | - /* 1830 */ 156, 157, 40, 246, 273, 295, 230, 226, 217, 218, | |
| 173492 | - /* 1840 */ 217, 218, 220, 261, 220, 282, 220, 19, 20, 244, | |
| 173493 | - /* 1850 */ 22, 250, 141, 250, 246, 60, 201, 183, 261, 261, | |
| 173494 | - /* 1860 */ 261, 201, 70, 299, 36, 299, 201, 38, 151, 150, | |
| 173495 | - /* 1870 */ 78, 285, 22, 81, 296, 296, 43, 235, 18, 238, | |
| 173496 | - /* 1880 */ 201, 274, 272, 238, 238, 238, 18, 59, 200, 149, | |
| 173497 | - /* 1890 */ 98, 247, 274, 274, 235, 247, 247, 247, 235, 71, | |
| 173498 | - /* 1900 */ 272, 201, 200, 158, 292, 62, 291, 201, 200, 22, | |
| 173499 | - /* 1910 */ 201, 222, 200, 222, 201, 200, 115, 219, 219, 64, | |
| 173500 | - /* 1920 */ 219, 228, 22, 126, 221, 133, 165, 222, 100, 225, | |
| 173501 | - /* 1930 */ 138, 139, 225, 219, 106, 107, 24, 219, 228, 219, | |
| 173502 | - /* 1940 */ 219, 307, 114, 113, 116, 117, 118, 315, 284, 121, | |
| 173503 | - /* 1950 */ 284, 222, 201, 91, 162, 320, 320, 82, 148, 267, | |
| 173504 | - /* 1960 */ 145, 267, 22, 279, 201, 158, 281, 251, 147, 146, | |
| 173505 | - /* 1970 */ 25, 203, 250, 249, 251, 248, 13, 247, 195, 195, | |
| 173506 | - /* 1980 */ 6, 153, 154, 155, 156, 157, 193, 193, 305, 193, | |
| 173507 | - /* 1990 */ 208, 305, 302, 214, 214, 214, 208, 223, 223, 214, | |
| 173508 | - /* 2000 */ 4, 215, 215, 214, 3, 22, 208, 163, 15, 23, | |
| 173509 | - /* 2010 */ 16, 183, 23, 139, 151, 130, 25, 20, 142, 24, | |
| 173510 | - /* 2020 */ 16, 144, 1, 142, 130, 130, 61, 37, 53, 151, | |
| 173511 | - /* 2030 */ 53, 53, 53, 130, 116, 1, 34, 141, 5, 22, | |
| 173512 | - /* 2040 */ 115, 161, 75, 25, 68, 141, 41, 115, 68, 24, | |
| 173513 | - /* 2050 */ 20, 19, 131, 125, 67, 67, 96, 22, 22, 22, | |
| 173514 | - /* 2060 */ 37, 23, 22, 24, 22, 59, 67, 23, 149, 28, | |
| 173515 | - /* 2070 */ 22, 25, 23, 23, 23, 22, 141, 34, 97, 23, | |
| 173516 | - /* 2080 */ 23, 34, 116, 22, 143, 25, 34, 75, 34, 34, | |
| 173517 | - /* 2090 */ 75, 88, 34, 86, 23, 22, 34, 25, 24, 34, | |
| 173518 | - /* 2100 */ 25, 93, 23, 44, 142, 23, 142, 23, 23, 22, | |
| 173519 | - /* 2110 */ 11, 25, 23, 25, 23, 22, 22, 22, 1, 23, | |
| 173520 | - /* 2120 */ 23, 23, 22, 22, 15, 141, 141, 25, 25, 1, | |
| 173521 | - /* 2130 */ 322, 322, 322, 135, 322, 322, 322, 322, 322, 322, | |
| 173522 | - /* 2140 */ 322, 141, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173523 | - /* 2150 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173524 | - /* 2160 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173622 | + /* 970 */ 57, 194, 194, 153, 154, 155, 194, 118, 240, 241, | |
| 173623 | + /* 980 */ 194, 194, 12, 116, 117, 118, 306, 306, 308, 308, | |
| 173624 | + /* 990 */ 194, 253, 205, 255, 217, 218, 59, 27, 194, 217, | |
| 173625 | + /* 1000 */ 218, 159, 143, 183, 217, 218, 194, 35, 22, 271, | |
| 173626 | + /* 1010 */ 143, 233, 42, 217, 218, 102, 103, 104, 105, 106, | |
| 173627 | + /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 240, 241, 217, | |
| 173628 | + /* 1030 */ 218, 254, 194, 63, 194, 19, 254, 194, 66, 22, | |
| 173629 | + /* 1040 */ 253, 254, 255, 73, 232, 312, 74, 128, 129, 316, | |
| 173630 | + /* 1050 */ 263, 19, 24, 116, 117, 118, 270, 217, 218, 43, | |
| 173631 | + /* 1060 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, | |
| 173632 | + /* 1070 */ 54, 55, 56, 57, 270, 194, 280, 239, 61, 19, | |
| 173633 | + /* 1080 */ 143, 23, 194, 59, 24, 242, 194, 59, 127, 128, | |
| 173634 | + /* 1090 */ 129, 194, 106, 107, 254, 261, 262, 16, 217, 218, | |
| 173635 | + /* 1100 */ 212, 213, 130, 43, 44, 45, 46, 47, 48, 49, | |
| 173636 | + /* 1110 */ 50, 51, 52, 53, 54, 55, 56, 57, 102, 103, | |
| 173637 | + /* 1120 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, | |
| 173638 | + /* 1130 */ 106, 107, 194, 16, 242, 254, 7, 8, 9, 115, | |
| 173639 | + /* 1140 */ 116, 117, 118, 194, 120, 117, 194, 115, 116, 306, | |
| 173640 | + /* 1150 */ 194, 308, 128, 312, 194, 217, 218, 316, 77, 207, | |
| 173641 | + /* 1160 */ 79, 194, 102, 103, 104, 105, 106, 107, 108, 109, | |
| 173642 | + /* 1170 */ 110, 111, 112, 113, 286, 159, 144, 153, 194, 155, | |
| 173643 | + /* 1180 */ 25, 229, 19, 231, 217, 218, 194, 22, 22, 24, | |
| 173644 | + /* 1190 */ 194, 294, 254, 194, 77, 239, 79, 194, 306, 239, | |
| 173645 | + /* 1200 */ 308, 194, 19, 145, 212, 213, 43, 44, 45, 46, | |
| 173646 | + /* 1210 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173647 | + /* 1220 */ 57, 194, 19, 239, 59, 59, 43, 44, 45, 46, | |
| 173648 | + /* 1230 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173649 | + /* 1240 */ 57, 21, 161, 294, 217, 218, 239, 44, 45, 46, | |
| 173650 | + /* 1250 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 173651 | + /* 1260 */ 57, 22, 23, 214, 265, 102, 103, 104, 105, 106, | |
| 173652 | + /* 1270 */ 107, 108, 109, 110, 111, 112, 113, 59, 286, 194, | |
| 173653 | + /* 1280 */ 312, 126, 117, 117, 316, 102, 103, 104, 105, 106, | |
| 173654 | + /* 1290 */ 107, 108, 109, 110, 111, 112, 113, 194, 66, 194, | |
| 173655 | + /* 1300 */ 80, 214, 217, 218, 194, 102, 103, 104, 105, 106, | |
| 173656 | + /* 1310 */ 107, 108, 109, 110, 111, 112, 113, 85, 100, 59, | |
| 173657 | + /* 1320 */ 217, 218, 217, 218, 194, 19, 94, 217, 218, 25, | |
| 173658 | + /* 1330 */ 209, 210, 194, 194, 116, 117, 194, 312, 19, 121, | |
| 173659 | + /* 1340 */ 101, 316, 293, 123, 194, 262, 262, 217, 218, 266, | |
| 173660 | + /* 1350 */ 266, 45, 46, 47, 48, 49, 50, 51, 52, 53, | |
| 173661 | + /* 1360 */ 54, 55, 56, 57, 194, 46, 194, 217, 218, 12, | |
| 173662 | + /* 1370 */ 194, 153, 154, 155, 194, 288, 15, 117, 146, 194, | |
| 173663 | + /* 1380 */ 293, 161, 194, 194, 27, 258, 259, 217, 218, 217, | |
| 173664 | + /* 1390 */ 218, 209, 210, 217, 218, 301, 302, 217, 218, 42, | |
| 173665 | + /* 1400 */ 194, 183, 217, 218, 265, 217, 218, 265, 102, 103, | |
| 173666 | + /* 1410 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, | |
| 173667 | + /* 1420 */ 63, 60, 118, 217, 218, 149, 150, 19, 19, 20, | |
| 173668 | + /* 1430 */ 194, 22, 194, 31, 115, 194, 25, 194, 22, 194, | |
| 173669 | + /* 1440 */ 24, 39, 115, 194, 25, 36, 194, 143, 19, 20, | |
| 173670 | + /* 1450 */ 131, 22, 194, 217, 218, 217, 218, 48, 217, 218, | |
| 173671 | + /* 1460 */ 217, 218, 217, 218, 115, 36, 217, 218, 59, 217, | |
| 173672 | + /* 1470 */ 218, 245, 194, 245, 194, 217, 218, 150, 194, 25, | |
| 173673 | + /* 1480 */ 71, 194, 256, 194, 256, 24, 46, 194, 59, 194, | |
| 173674 | + /* 1490 */ 108, 245, 245, 144, 85, 217, 218, 217, 218, 90, | |
| 173675 | + /* 1500 */ 71, 194, 256, 256, 217, 218, 217, 218, 194, 100, | |
| 173676 | + /* 1510 */ 217, 218, 217, 218, 85, 106, 107, 135, 23, 90, | |
| 173677 | + /* 1520 */ 25, 271, 140, 114, 116, 116, 117, 118, 194, 100, | |
| 173678 | + /* 1530 */ 121, 217, 218, 245, 194, 106, 107, 194, 22, 19, | |
| 173679 | + /* 1540 */ 20, 194, 22, 114, 256, 116, 117, 118, 194, 158, | |
| 173680 | + /* 1550 */ 121, 160, 194, 19, 194, 115, 36, 217, 218, 99, | |
| 173681 | + /* 1560 */ 149, 142, 153, 154, 155, 156, 157, 129, 23, 53, | |
| 173682 | + /* 1570 */ 25, 217, 218, 120, 121, 217, 218, 217, 218, 59, | |
| 173683 | + /* 1580 */ 7, 8, 153, 154, 155, 156, 157, 83, 84, 5, | |
| 173684 | + /* 1590 */ 152, 71, 183, 133, 10, 11, 12, 13, 14, 145, | |
| 173685 | + /* 1600 */ 59, 17, 141, 59, 194, 85, 194, 121, 194, 23, | |
| 173686 | + /* 1610 */ 90, 25, 183, 23, 30, 25, 32, 131, 194, 194, | |
| 173687 | + /* 1620 */ 100, 23, 194, 25, 40, 194, 106, 107, 194, 217, | |
| 173688 | + /* 1630 */ 218, 97, 19, 20, 114, 22, 116, 117, 118, 194, | |
| 173689 | + /* 1640 */ 194, 121, 217, 218, 194, 23, 194, 25, 227, 36, | |
| 173690 | + /* 1650 */ 23, 23, 25, 25, 70, 260, 194, 23, 117, 25, | |
| 173691 | + /* 1660 */ 194, 117, 78, 217, 218, 81, 227, 217, 218, 217, | |
| 173692 | + /* 1670 */ 218, 227, 59, 153, 154, 155, 156, 157, 0, 1, | |
| 173693 | + /* 1680 */ 2, 194, 98, 5, 71, 194, 194, 194, 10, 11, | |
| 173694 | + /* 1690 */ 12, 13, 14, 194, 23, 17, 25, 23, 23, 25, | |
| 173695 | + /* 1700 */ 25, 194, 23, 183, 25, 153, 194, 155, 30, 194, | |
| 173696 | + /* 1710 */ 32, 19, 20, 100, 22, 257, 194, 133, 40, 106, | |
| 173697 | + /* 1720 */ 107, 108, 138, 139, 217, 218, 194, 114, 36, 116, | |
| 173698 | + /* 1730 */ 117, 118, 217, 218, 121, 237, 153, 194, 155, 321, | |
| 173699 | + /* 1740 */ 194, 194, 23, 23, 25, 25, 162, 194, 70, 217, | |
| 173700 | + /* 1750 */ 218, 59, 194, 194, 194, 194, 78, 194, 194, 81, | |
| 173701 | + /* 1760 */ 217, 218, 290, 71, 217, 218, 153, 154, 155, 156, | |
| 173702 | + /* 1770 */ 157, 194, 289, 243, 257, 257, 98, 244, 257, 194, | |
| 173703 | + /* 1780 */ 217, 218, 257, 19, 20, 215, 22, 192, 299, 295, | |
| 173704 | + /* 1790 */ 221, 194, 100, 226, 217, 218, 183, 273, 106, 107, | |
| 173705 | + /* 1800 */ 36, 194, 217, 218, 269, 194, 114, 269, 116, 117, | |
| 173706 | + /* 1810 */ 118, 133, 246, 121, 217, 218, 138, 139, 247, 194, | |
| 173707 | + /* 1820 */ 246, 273, 273, 59, 217, 218, 247, 194, 217, 218, | |
| 173708 | + /* 1830 */ 273, 295, 140, 230, 220, 71, 220, 220, 250, 261, | |
| 173709 | + /* 1840 */ 162, 261, 217, 218, 250, 153, 154, 155, 156, 157, | |
| 173710 | + /* 1850 */ 217, 218, 261, 261, 282, 246, 244, 197, 60, 141, | |
| 173711 | + /* 1860 */ 201, 299, 201, 38, 100, 201, 151, 299, 22, 43, | |
| 173712 | + /* 1870 */ 106, 107, 296, 150, 285, 183, 274, 296, 114, 235, | |
| 173713 | + /* 1880 */ 116, 117, 118, 1, 2, 121, 18, 5, 238, 238, | |
| 173714 | + /* 1890 */ 272, 238, 10, 11, 12, 13, 14, 201, 18, 17, | |
| 173715 | + /* 1900 */ 238, 200, 149, 247, 140, 274, 274, 272, 235, 201, | |
| 173716 | + /* 1910 */ 247, 235, 30, 247, 32, 247, 200, 153, 154, 155, | |
| 173717 | + /* 1920 */ 156, 157, 40, 158, 62, 201, 200, 22, 292, 291, | |
| 173718 | + /* 1930 */ 201, 222, 200, 222, 201, 200, 115, 19, 20, 64, | |
| 173719 | + /* 1940 */ 22, 219, 228, 22, 219, 126, 219, 183, 165, 228, | |
| 173720 | + /* 1950 */ 219, 24, 70, 225, 36, 225, 222, 221, 219, 219, | |
| 173721 | + /* 1960 */ 78, 219, 315, 81, 307, 113, 284, 284, 222, 201, | |
| 173722 | + /* 1970 */ 91, 82, 320, 267, 320, 148, 145, 59, 22, 267, | |
| 173723 | + /* 1980 */ 98, 279, 201, 147, 281, 146, 158, 249, 251, 71, | |
| 173724 | + /* 1990 */ 25, 250, 248, 203, 251, 247, 13, 195, 195, 6, | |
| 173725 | + /* 2000 */ 193, 193, 193, 305, 305, 208, 302, 214, 214, 214, | |
| 173726 | + /* 2010 */ 214, 223, 208, 214, 223, 133, 215, 4, 100, 3, | |
| 173727 | + /* 2020 */ 138, 139, 208, 22, 106, 107, 215, 163, 16, 15, | |
| 173728 | + /* 2030 */ 23, 23, 114, 139, 116, 117, 118, 151, 130, 121, | |
| 173729 | + /* 2040 */ 25, 24, 142, 20, 162, 144, 16, 1, 142, 130, | |
| 173730 | + /* 2050 */ 130, 61, 53, 151, 130, 37, 53, 53, 53, 116, | |
| 173731 | + /* 2060 */ 34, 1, 5, 141, 22, 115, 68, 75, 161, 25, | |
| 173732 | + /* 2070 */ 68, 153, 154, 155, 156, 157, 41, 141, 115, 24, | |
| 173733 | + /* 2080 */ 131, 20, 19, 125, 22, 96, 67, 22, 22, 67, | |
| 173734 | + /* 2090 */ 23, 22, 59, 22, 24, 67, 28, 23, 34, 22, | |
| 173735 | + /* 2100 */ 149, 183, 23, 23, 116, 23, 25, 22, 97, 37, | |
| 173736 | + /* 2110 */ 141, 23, 23, 22, 143, 25, 75, 34, 34, 88, | |
| 173737 | + /* 2120 */ 34, 34, 86, 75, 23, 93, 34, 22, 34, 25, | |
| 173738 | + /* 2130 */ 24, 34, 25, 142, 23, 23, 142, 44, 23, 23, | |
| 173739 | + /* 2140 */ 22, 11, 25, 23, 25, 22, 22, 22, 1, 23, | |
| 173740 | + /* 2150 */ 23, 22, 15, 22, 1, 135, 322, 25, 25, 23, | |
| 173741 | + /* 2160 */ 322, 322, 141, 322, 322, 141, 141, 322, 322, 322, | |
| 173525 | 173742 | /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173526 | 173743 | /* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173527 | 173744 | /* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173528 | 173745 | /* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173529 | 173746 | /* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| @@ -173535,181 +173752,184 @@ | ||
| 173535 | 173752 | /* 2270 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173536 | 173753 | /* 2280 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173537 | 173754 | /* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173538 | 173755 | /* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173539 | 173756 | /* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173540 | - /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173757 | + /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173758 | + /* 2330 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173759 | + /* 2340 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, | |
| 173760 | + /* 2350 */ 322, 322, 322, | |
| 173541 | 173761 | }; |
| 173542 | 173762 | #define YY_SHIFT_COUNT (582) |
| 173543 | 173763 | #define YY_SHIFT_MIN (0) |
| 173544 | -#define YY_SHIFT_MAX (2128) | |
| 173764 | +#define YY_SHIFT_MAX (2153) | |
| 173545 | 173765 | static const unsigned short int yy_shift_ofst[] = { |
| 173546 | - /* 0 */ 1792, 1588, 1494, 322, 322, 399, 306, 1319, 1339, 1430, | |
| 173547 | - /* 10 */ 1828, 1828, 1828, 580, 399, 399, 399, 399, 399, 0, | |
| 173548 | - /* 20 */ 0, 214, 1093, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173549 | - /* 30 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1130, 1130, | |
| 173766 | + /* 0 */ 1882, 1678, 1584, 322, 322, 399, 306, 1409, 1429, 1520, | |
| 173767 | + /* 10 */ 1918, 1918, 1918, 580, 399, 399, 399, 399, 399, 0, | |
| 173768 | + /* 20 */ 0, 214, 1163, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173769 | + /* 30 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1024, 1024, | |
| 173550 | 173770 | /* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201, |
| 173551 | 173771 | /* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693, |
| 173552 | - /* 60 */ 732, 803, 842, 913, 1073, 1093, 1093, 1093, 1093, 1093, | |
| 173553 | - /* 70 */ 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, | |
| 173554 | - /* 80 */ 1093, 1093, 1093, 1113, 1093, 1216, 957, 957, 1523, 1602, | |
| 173555 | - /* 90 */ 1674, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173556 | - /* 100 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173557 | - /* 110 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173558 | - /* 120 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173559 | - /* 130 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, | |
| 173560 | - /* 140 */ 137, 181, 181, 181, 181, 181, 181, 181, 96, 222, | |
| 173561 | - /* 150 */ 143, 477, 713, 1133, 1268, 713, 713, 79, 79, 713, | |
| 173562 | - /* 160 */ 770, 83, 65, 65, 65, 288, 162, 162, 2142, 2142, | |
| 173563 | - /* 170 */ 696, 696, 696, 238, 474, 474, 474, 474, 1217, 1217, | |
| 173564 | - /* 180 */ 678, 477, 324, 398, 713, 713, 713, 713, 713, 713, | |
| 173772 | + /* 60 */ 732, 803, 842, 913, 1016, 1060, 1163, 1163, 1163, 1163, | |
| 173773 | + /* 70 */ 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, | |
| 173774 | + /* 80 */ 1163, 1163, 1163, 1163, 1183, 1163, 1203, 1306, 1306, 1613, | |
| 173775 | + /* 90 */ 1692, 1764, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173776 | + /* 100 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173777 | + /* 110 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173778 | + /* 120 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173779 | + /* 130 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, | |
| 173780 | + /* 140 */ 1918, 1918, 137, 181, 181, 181, 181, 181, 181, 181, | |
| 173781 | + /* 150 */ 96, 222, 143, 477, 713, 1220, 1319, 713, 713, 79, | |
| 173782 | + /* 160 */ 79, 713, 760, 83, 65, 65, 65, 288, 162, 162, | |
| 173783 | + /* 170 */ 2167, 2167, 696, 696, 696, 238, 474, 474, 474, 474, | |
| 173784 | + /* 180 */ 970, 970, 678, 477, 324, 398, 713, 713, 713, 713, | |
| 173565 | 173785 | /* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
| 173566 | - /* 200 */ 713, 713, 713, 1220, 366, 366, 713, 917, 283, 283, | |
| 173567 | - /* 210 */ 434, 434, 605, 605, 1298, 2142, 2142, 2142, 2142, 2142, | |
| 173568 | - /* 220 */ 2142, 2142, 1179, 1157, 1157, 487, 527, 585, 645, 749, | |
| 173569 | - /* 230 */ 914, 968, 752, 713, 713, 713, 713, 713, 713, 713, | |
| 173570 | - /* 240 */ 713, 713, 713, 303, 713, 713, 713, 713, 713, 713, | |
| 173571 | - /* 250 */ 713, 713, 713, 713, 713, 713, 797, 797, 797, 713, | |
| 173572 | - /* 260 */ 713, 713, 959, 713, 713, 713, 1169, 1271, 713, 713, | |
| 173573 | - /* 270 */ 1330, 713, 713, 713, 713, 713, 713, 713, 713, 629, | |
| 173574 | - /* 280 */ 7, 91, 876, 876, 876, 876, 953, 91, 91, 1246, | |
| 173575 | - /* 290 */ 1065, 1106, 1374, 1329, 1348, 468, 1348, 1394, 785, 1329, | |
| 173576 | - /* 300 */ 1329, 785, 1329, 468, 1394, 859, 854, 1402, 1449, 1449, | |
| 173577 | - /* 310 */ 1449, 1173, 1173, 1173, 1173, 1355, 1355, 1030, 1341, 405, | |
| 173578 | - /* 320 */ 1230, 1795, 1795, 1711, 1711, 1829, 1829, 1711, 1717, 1719, | |
| 173579 | - /* 330 */ 1850, 1833, 1860, 1860, 1860, 1860, 1711, 1868, 1740, 1719, | |
| 173580 | - /* 340 */ 1719, 1740, 1850, 1833, 1740, 1833, 1740, 1711, 1868, 1745, | |
| 173581 | - /* 350 */ 1843, 1711, 1868, 1887, 1711, 1868, 1711, 1868, 1887, 1801, | |
| 173582 | - /* 360 */ 1801, 1801, 1855, 1900, 1900, 1887, 1801, 1797, 1801, 1855, | |
| 173583 | - /* 370 */ 1801, 1801, 1761, 1912, 1830, 1830, 1887, 1711, 1862, 1862, | |
| 173584 | - /* 380 */ 1875, 1875, 1810, 1815, 1940, 1711, 1807, 1810, 1821, 1823, | |
| 173585 | - /* 390 */ 1740, 1945, 1963, 1963, 1974, 1974, 1974, 2142, 2142, 2142, | |
| 173586 | - /* 400 */ 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, | |
| 173587 | - /* 410 */ 2142, 2142, 20, 1224, 256, 1111, 1115, 1114, 1192, 1496, | |
| 173588 | - /* 420 */ 1424, 1505, 1427, 355, 1383, 1537, 1506, 1538, 1553, 1583, | |
| 173589 | - /* 430 */ 1584, 1591, 1625, 541, 1445, 1562, 1450, 1572, 1515, 1428, | |
| 173590 | - /* 440 */ 1532, 1592, 1629, 1520, 1630, 1639, 1510, 1544, 1662, 1675, | |
| 173591 | - /* 450 */ 1551, 48, 1996, 2001, 1983, 1844, 1993, 1994, 1986, 1989, | |
| 173592 | - /* 460 */ 1874, 1863, 1885, 1991, 1991, 1995, 1876, 1997, 1877, 2004, | |
| 173593 | - /* 470 */ 2021, 1881, 1894, 1991, 1895, 1965, 1990, 1991, 1878, 1975, | |
| 173594 | - /* 480 */ 1977, 1978, 1979, 1903, 1918, 2002, 1896, 2034, 2033, 2017, | |
| 173595 | - /* 490 */ 1925, 1880, 1976, 2018, 1980, 1967, 2005, 1904, 1932, 2025, | |
| 173596 | - /* 500 */ 2030, 2032, 1921, 1928, 2035, 1987, 2036, 2037, 2038, 2040, | |
| 173597 | - /* 510 */ 1988, 2006, 2039, 1960, 2041, 2042, 1999, 2023, 2044, 2043, | |
| 173598 | - /* 520 */ 1919, 2048, 2049, 2050, 2046, 2051, 2053, 1981, 1935, 2056, | |
| 173599 | - /* 530 */ 2057, 1966, 2047, 2061, 1941, 2060, 2052, 2054, 2055, 2058, | |
| 173600 | - /* 540 */ 2003, 2012, 2007, 2059, 2015, 2008, 2062, 2071, 2073, 2074, | |
| 173601 | - /* 550 */ 2072, 2075, 2065, 1962, 1964, 2079, 2060, 2082, 2084, 2085, | |
| 173602 | - /* 560 */ 2087, 2086, 2089, 2088, 2091, 2093, 2099, 2094, 2095, 2096, | |
| 173603 | - /* 570 */ 2097, 2100, 2101, 2102, 1998, 1984, 1985, 2000, 2103, 2098, | |
| 173604 | - /* 580 */ 2109, 2117, 2128, | |
| 173786 | + /* 200 */ 713, 713, 713, 713, 713, 1032, 366, 366, 713, 919, | |
| 173787 | + /* 210 */ 283, 283, 434, 434, 1260, 1260, 755, 2167, 2167, 2167, | |
| 173788 | + /* 220 */ 2167, 2167, 2167, 2167, 1218, 820, 820, 487, 527, 585, | |
| 173789 | + /* 230 */ 645, 749, 867, 937, 752, 713, 713, 713, 713, 713, | |
| 173790 | + /* 240 */ 713, 713, 713, 713, 713, 303, 713, 713, 713, 713, | |
| 173791 | + /* 250 */ 713, 713, 713, 713, 713, 713, 713, 713, 972, 972, | |
| 173792 | + /* 260 */ 972, 713, 713, 713, 859, 713, 713, 713, 1165, 1232, | |
| 173793 | + /* 270 */ 713, 1357, 713, 713, 713, 713, 713, 713, 713, 713, | |
| 173794 | + /* 280 */ 806, 7, 91, 1028, 1028, 1028, 1028, 1304, 91, 91, | |
| 173795 | + /* 290 */ 1382, 986, 1129, 1361, 1327, 1276, 468, 1276, 1408, 1411, | |
| 173796 | + /* 300 */ 1327, 1327, 1411, 1327, 468, 1408, 1155, 854, 1440, 1402, | |
| 173797 | + /* 310 */ 1402, 1402, 1349, 1349, 1349, 1349, 1454, 1454, 1391, 1419, | |
| 173798 | + /* 320 */ 405, 1416, 1798, 1798, 1718, 1718, 1825, 1825, 1718, 1715, | |
| 173799 | + /* 330 */ 1723, 1846, 1826, 1868, 1868, 1868, 1868, 1718, 1880, 1753, | |
| 173800 | + /* 340 */ 1723, 1723, 1753, 1846, 1826, 1753, 1826, 1753, 1718, 1880, | |
| 173801 | + /* 350 */ 1765, 1862, 1718, 1880, 1905, 1718, 1880, 1718, 1880, 1905, | |
| 173802 | + /* 360 */ 1821, 1821, 1821, 1875, 1921, 1921, 1905, 1821, 1819, 1821, | |
| 173803 | + /* 370 */ 1875, 1821, 1821, 1783, 1927, 1852, 1852, 1905, 1718, 1879, | |
| 173804 | + /* 380 */ 1879, 1889, 1889, 1827, 1831, 1956, 1718, 1828, 1827, 1836, | |
| 173805 | + /* 390 */ 1839, 1753, 1965, 1983, 1983, 1993, 1993, 1993, 2167, 2167, | |
| 173806 | + /* 400 */ 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, | |
| 173807 | + /* 410 */ 2167, 2167, 2167, 20, 1081, 256, 1239, 1117, 961, 1166, | |
| 173808 | + /* 420 */ 1495, 1460, 1516, 1461, 355, 1438, 1545, 1017, 1586, 1590, | |
| 173809 | + /* 430 */ 1598, 1622, 1627, 1628, 541, 1453, 1573, 1486, 1634, 1058, | |
| 173810 | + /* 440 */ 1534, 1541, 1671, 1674, 1504, 1675, 1679, 1552, 1583, 1719, | |
| 173811 | + /* 450 */ 1720, 1544, 48, 2013, 2016, 2001, 1864, 2014, 2012, 2007, | |
| 173812 | + /* 460 */ 2008, 1894, 1886, 1908, 2015, 2015, 2017, 1900, 2023, 1901, | |
| 173813 | + /* 470 */ 2030, 2046, 1906, 1919, 2015, 1920, 1990, 2018, 2015, 1902, | |
| 173814 | + /* 480 */ 1999, 2003, 2004, 2005, 1924, 1943, 2026, 1922, 2060, 2057, | |
| 173815 | + /* 490 */ 2042, 1950, 1907, 1998, 2044, 2002, 1992, 2035, 1936, 1963, | |
| 173816 | + /* 500 */ 2055, 2061, 2063, 1949, 1958, 2062, 2019, 2065, 2066, 2067, | |
| 173817 | + /* 510 */ 2069, 2022, 2033, 2070, 1989, 2068, 2071, 2028, 2072, 2074, | |
| 173818 | + /* 520 */ 2064, 1951, 2077, 2079, 2080, 2081, 2082, 2085, 2011, 1969, | |
| 173819 | + /* 530 */ 2088, 2089, 1988, 2083, 2091, 1971, 2090, 2084, 2086, 2087, | |
| 173820 | + /* 540 */ 2092, 2031, 2041, 2036, 2093, 2048, 2032, 2094, 2101, 2105, | |
| 173821 | + /* 550 */ 2106, 2104, 2107, 2097, 1991, 1994, 2111, 2090, 2112, 2115, | |
| 173822 | + /* 560 */ 2116, 2118, 2117, 2119, 2120, 2123, 2130, 2124, 2125, 2126, | |
| 173823 | + /* 570 */ 2127, 2129, 2131, 2132, 2020, 2021, 2024, 2025, 2133, 2136, | |
| 173824 | + /* 580 */ 2137, 2147, 2153, | |
| 173605 | 173825 | }; |
| 173606 | -#define YY_REDUCE_COUNT (411) | |
| 173826 | +#define YY_REDUCE_COUNT (412) | |
| 173607 | 173827 | #define YY_REDUCE_MIN (-275) |
| 173608 | -#define YY_REDUCE_MAX (1798) | |
| 173828 | +#define YY_REDUCE_MAX (1814) | |
| 173609 | 173829 | static const short yy_reduce_ofst[] = { |
| 173610 | - /* 0 */ -71, 194, 343, 835, -180, -177, 838, -194, -188, -185, | |
| 173830 | + /* 0 */ -71, 194, 343, 787, -180, -177, 738, -194, -188, -185, | |
| 173611 | 173831 | /* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178, |
| 173612 | 173832 | /* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686, |
| 173613 | - /* 30 */ 707, 725, 780, 1098, 856, 778, 1059, 1090, 708, 887, | |
| 173614 | - /* 40 */ 86, 448, 980, 630, 680, 681, 684, 796, 801, 796, | |
| 173615 | - /* 50 */ 801, -261, -261, -261, -261, -261, -261, -261, -261, -261, | |
| 173833 | + /* 30 */ 707, 777, 782, 812, 840, 796, 881, 938, 888, 992, | |
| 173834 | + /* 40 */ 86, 448, 952, 680, 681, 843, 892, 623, 687, 623, | |
| 173835 | + /* 50 */ 687, -261, -261, -261, -261, -261, -261, -261, -261, -261, | |
| 173616 | 173836 | /* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173617 | 173837 | /* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173618 | - /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, 391, 886, | |
| 173619 | - /* 90 */ 888, 1013, 1016, 1081, 1087, 1151, 1159, 1177, 1185, 1188, | |
| 173620 | - /* 100 */ 1190, 1194, 1197, 1203, 1247, 1260, 1264, 1267, 1269, 1273, | |
| 173621 | - /* 110 */ 1315, 1322, 1335, 1337, 1356, 1362, 1418, 1425, 1453, 1457, | |
| 173622 | - /* 120 */ 1465, 1473, 1487, 1495, 1507, 1517, 1521, 1534, 1543, 1546, | |
| 173623 | - /* 130 */ 1549, 1552, 1554, 1560, 1581, 1590, 1593, 1595, 1621, 1623, | |
| 173624 | - /* 140 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, | |
| 173625 | - /* 150 */ -261, -186, -117, 260, 263, 460, 631, -74, 497, -181, | |
| 173626 | - /* 160 */ -261, 939, 176, 274, 338, 676, -261, -261, -261, -261, | |
| 173627 | - /* 170 */ -212, -212, -212, -184, 149, 777, 1061, 1103, 265, 419, | |
| 173628 | - /* 180 */ -254, 670, 677, 677, -11, -129, 184, 488, 736, 789, | |
| 173629 | - /* 190 */ 805, 844, 403, 529, 579, 668, 783, 841, 1158, 1112, | |
| 173630 | - /* 200 */ 806, 861, 1095, 846, 839, 1031, -189, 1077, 1080, 1116, | |
| 173631 | - /* 210 */ 1084, 1156, 1139, 1221, 46, 1099, 1037, 1118, 1171, 1214, | |
| 173632 | - /* 220 */ 1210, 1258, -210, -190, -176, -115, 117, 262, 376, 490, | |
| 173633 | - /* 230 */ 511, 520, 618, 639, 743, 901, 907, 958, 1014, 1055, | |
| 173634 | - /* 240 */ 1108, 1193, 1244, 720, 1248, 1277, 1324, 1347, 1417, 1431, | |
| 173635 | - /* 250 */ 1432, 1440, 1451, 1452, 1463, 1478, 1286, 1350, 1369, 1490, | |
| 173636 | - /* 260 */ 1498, 1501, 773, 1509, 1513, 1528, 1292, 1367, 1535, 1536, | |
| 173637 | - /* 270 */ 1477, 1542, 376, 1547, 1550, 1555, 1559, 1568, 1571, 1441, | |
| 173638 | - /* 280 */ 1443, 1474, 1511, 1516, 1519, 1522, 773, 1474, 1474, 1503, | |
| 173639 | - /* 290 */ 1567, 1594, 1484, 1527, 1556, 1570, 1557, 1524, 1573, 1545, | |
| 173640 | - /* 300 */ 1548, 1576, 1561, 1587, 1540, 1575, 1606, 1611, 1622, 1624, | |
| 173641 | - /* 310 */ 1626, 1582, 1597, 1598, 1599, 1601, 1603, 1563, 1608, 1605, | |
| 173642 | - /* 320 */ 1604, 1564, 1566, 1655, 1660, 1578, 1579, 1665, 1586, 1607, | |
| 173643 | - /* 330 */ 1610, 1642, 1641, 1645, 1646, 1647, 1679, 1688, 1644, 1618, | |
| 173644 | - /* 340 */ 1619, 1648, 1628, 1659, 1649, 1663, 1650, 1700, 1702, 1612, | |
| 173645 | - /* 350 */ 1615, 1706, 1708, 1689, 1709, 1712, 1713, 1715, 1691, 1698, | |
| 173646 | - /* 360 */ 1699, 1701, 1693, 1704, 1707, 1705, 1714, 1703, 1718, 1710, | |
| 173647 | - /* 370 */ 1720, 1721, 1632, 1634, 1664, 1666, 1729, 1751, 1635, 1636, | |
| 173648 | - /* 380 */ 1692, 1694, 1716, 1722, 1684, 1763, 1685, 1723, 1724, 1727, | |
| 173649 | - /* 390 */ 1730, 1768, 1783, 1784, 1793, 1794, 1796, 1683, 1686, 1690, | |
| 173650 | - /* 400 */ 1782, 1779, 1780, 1781, 1785, 1788, 1774, 1775, 1786, 1787, | |
| 173651 | - /* 410 */ 1789, 1798, | |
| 173838 | + /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, 391, | |
| 173839 | + /* 90 */ 967, 1027, 1085, 1103, 1105, 1110, 1130, 1150, 1170, 1172, | |
| 173840 | + /* 100 */ 1176, 1180, 1185, 1188, 1206, 1236, 1238, 1241, 1243, 1245, | |
| 173841 | + /* 110 */ 1249, 1252, 1258, 1278, 1280, 1287, 1289, 1293, 1295, 1314, | |
| 173842 | + /* 120 */ 1340, 1354, 1358, 1360, 1412, 1425, 1446, 1450, 1452, 1507, | |
| 173843 | + /* 130 */ 1515, 1532, 1543, 1547, 1563, 1577, 1585, 1597, 1607, 1611, | |
| 173844 | + /* 140 */ 1625, 1633, -261, -261, -261, -261, -261, -261, -261, -261, | |
| 173845 | + /* 150 */ -261, -261, -261, -186, -117, 260, 263, 460, 515, -74, | |
| 173846 | + /* 160 */ 545, -181, -261, 1087, 176, 274, 338, 676, -261, -261, | |
| 173847 | + /* 170 */ -261, -261, -212, -212, -212, -184, 149, 668, 786, 804, | |
| 173848 | + /* 180 */ 265, 419, -254, 516, 529, 529, -11, -129, 184, 488, | |
| 173849 | + /* 190 */ 838, 956, 960, 984, 403, 616, 897, 618, 999, 949, | |
| 173850 | + /* 200 */ 1139, 1007, 490, 778, 1142, 834, 733, 841, -189, 1049, | |
| 173851 | + /* 210 */ 968, 1025, 1083, 1084, 1121, 1182, 46, 1094, 1226, 1228, | |
| 173852 | + /* 220 */ 1246, 1247, 1127, 1288, -210, -190, -176, -115, 117, 262, | |
| 173853 | + /* 230 */ 376, 470, 511, 514, 520, 579, 600, 708, 727, 996, | |
| 173854 | + /* 240 */ 1003, 1138, 1189, 1284, 1307, 1250, 1334, 1343, 1347, 1410, | |
| 173855 | + /* 250 */ 1414, 1424, 1428, 1431, 1434, 1445, 1462, 1466, 1421, 1439, | |
| 173856 | + /* 260 */ 1444, 1487, 1491, 1492, 1395, 1493, 1499, 1512, 1458, 1418, | |
| 173857 | + /* 270 */ 1522, 1498, 1546, 376, 1553, 1558, 1559, 1560, 1561, 1564, | |
| 173858 | + /* 280 */ 1472, 1483, 1530, 1517, 1518, 1521, 1525, 1395, 1530, 1530, | |
| 173859 | + /* 290 */ 1533, 1570, 1595, 1489, 1524, 1535, 1566, 1538, 1494, 1571, | |
| 173860 | + /* 300 */ 1548, 1549, 1579, 1557, 1574, 1536, 1569, 1603, 1567, 1614, | |
| 173861 | + /* 310 */ 1616, 1617, 1578, 1580, 1591, 1592, 1588, 1594, 1572, 1609, | |
| 173862 | + /* 320 */ 1612, 1660, 1562, 1568, 1659, 1661, 1576, 1581, 1664, 1589, | |
| 173863 | + /* 330 */ 1602, 1618, 1644, 1650, 1651, 1653, 1662, 1696, 1701, 1656, | |
| 173864 | + /* 340 */ 1631, 1632, 1663, 1635, 1673, 1666, 1676, 1668, 1708, 1716, | |
| 173865 | + /* 350 */ 1636, 1638, 1724, 1726, 1709, 1729, 1732, 1733, 1735, 1711, | |
| 173866 | + /* 360 */ 1722, 1725, 1727, 1714, 1728, 1730, 1734, 1731, 1736, 1739, | |
| 173867 | + /* 370 */ 1721, 1740, 1742, 1647, 1657, 1682, 1683, 1746, 1768, 1652, | |
| 173868 | + /* 380 */ 1654, 1706, 1712, 1737, 1741, 1702, 1781, 1703, 1743, 1738, | |
| 173869 | + /* 390 */ 1744, 1748, 1790, 1802, 1803, 1807, 1808, 1809, 1698, 1699, | |
| 173870 | + /* 400 */ 1704, 1797, 1793, 1794, 1795, 1796, 1804, 1788, 1791, 1801, | |
| 173871 | + /* 410 */ 1811, 1799, 1814, | |
| 173652 | 173872 | }; |
| 173653 | 173873 | static const YYACTIONTYPE yy_default[] = { |
| 173654 | 173874 | /* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254, |
| 173655 | 173875 | /* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397, |
| 173656 | 173876 | /* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173657 | 173877 | /* 30 */ 1254, 1254, 1254, 1254, 1254, 1490, 1254, 1254, 1254, 1254, |
| 173658 | 173878 | /* 40 */ 1578, 1578, 1254, 1254, 1254, 1254, 1254, 1563, 1562, 1254, |
| 173659 | 173879 | /* 50 */ 1254, 1254, 1406, 1254, 1413, 1254, 1254, 1254, 1254, 1254, |
| 173660 | - /* 60 */ 1492, 1493, 1254, 1254, 1254, 1543, 1545, 1508, 1420, 1419, | |
| 173661 | - /* 70 */ 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488, 1486, | |
| 173662 | - /* 80 */ 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254, 1254, | |
| 173880 | + /* 60 */ 1492, 1493, 1254, 1254, 1254, 1254, 1543, 1545, 1508, 1420, | |
| 173881 | + /* 70 */ 1419, 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488, | |
| 173882 | + /* 80 */ 1486, 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254, | |
| 173663 | 173883 | /* 90 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173664 | 173884 | /* 100 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173665 | 173885 | /* 110 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173666 | 173886 | /* 120 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173667 | 173887 | /* 130 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173668 | - /* 140 */ 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457, 1456, 1458, | |
| 173669 | - /* 150 */ 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254, 1254, 1254, | |
| 173670 | - /* 160 */ 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461, 1473, 1472, | |
| 173671 | - /* 170 */ 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173672 | - /* 180 */ 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173888 | + /* 140 */ 1254, 1254, 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457, | |
| 173889 | + /* 150 */ 1456, 1458, 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254, | |
| 173890 | + /* 160 */ 1254, 1254, 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461, | |
| 173891 | + /* 170 */ 1473, 1472, 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254, | |
| 173892 | + /* 180 */ 1254, 1254, 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173673 | 173893 | /* 190 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173674 | - /* 200 */ 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287, 1578, 1578, | |
| 173675 | - /* 210 */ 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358, 1358, 1358, | |
| 173676 | - /* 220 */ 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173677 | - /* 230 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548, 1546, 1254, | |
| 173678 | - /* 240 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173894 | + /* 200 */ 1254, 1254, 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287, | |
| 173895 | + /* 210 */ 1578, 1578, 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358, | |
| 173896 | + /* 220 */ 1358, 1358, 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173897 | + /* 230 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548, | |
| 173898 | + /* 240 */ 1546, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173679 | 173899 | /* 250 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173680 | - /* 260 */ 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254, 1254, 1254, | |
| 173681 | - /* 270 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608, 1254, | |
| 173682 | - /* 280 */ 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342, 1357, | |
| 173683 | - /* 290 */ 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410, 1423, | |
| 173684 | - /* 300 */ 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397, 1397, | |
| 173685 | - /* 310 */ 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364, 1357, | |
| 173686 | - /* 320 */ 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509, 1638, | |
| 173687 | - /* 330 */ 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410, 1638, | |
| 173688 | - /* 340 */ 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272, 1525, | |
| 173689 | - /* 350 */ 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499, 1330, | |
| 173690 | - /* 360 */ 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330, 1319, | |
| 173691 | - /* 370 */ 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588, 1588, | |
| 173692 | - /* 380 */ 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403, 1401, | |
| 173693 | - /* 390 */ 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660, 1558, | |
| 173694 | - /* 400 */ 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288, 1288, | |
| 173695 | - /* 410 */ 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618, 1254, | |
| 173696 | - /* 420 */ 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173697 | - /* 430 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1564, | |
| 173698 | - /* 440 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173699 | - /* 450 */ 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254, 1254, | |
| 173700 | - /* 460 */ 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254, 1254, | |
| 173701 | - /* 470 */ 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254, 1254, | |
| 173702 | - /* 480 */ 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254, 1254, | |
| 173703 | - /* 490 */ 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254, 1254, | |
| 173900 | + /* 260 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254, | |
| 173901 | + /* 270 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608, | |
| 173902 | + /* 280 */ 1254, 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342, | |
| 173903 | + /* 290 */ 1357, 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410, | |
| 173904 | + /* 300 */ 1423, 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397, | |
| 173905 | + /* 310 */ 1397, 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364, | |
| 173906 | + /* 320 */ 1357, 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509, | |
| 173907 | + /* 330 */ 1638, 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410, | |
| 173908 | + /* 340 */ 1638, 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272, | |
| 173909 | + /* 350 */ 1525, 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499, | |
| 173910 | + /* 360 */ 1330, 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330, | |
| 173911 | + /* 370 */ 1319, 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588, | |
| 173912 | + /* 380 */ 1588, 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403, | |
| 173913 | + /* 390 */ 1401, 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660, | |
| 173914 | + /* 400 */ 1558, 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288, | |
| 173915 | + /* 410 */ 1288, 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618, | |
| 173916 | + /* 420 */ 1254, 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173917 | + /* 430 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173918 | + /* 440 */ 1564, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173919 | + /* 450 */ 1254, 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254, | |
| 173920 | + /* 460 */ 1254, 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254, | |
| 173921 | + /* 470 */ 1254, 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254, | |
| 173922 | + /* 480 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254, | |
| 173923 | + /* 490 */ 1254, 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254, | |
| 173704 | 173924 | /* 500 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173705 | - /* 510 */ 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173925 | + /* 510 */ 1254, 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173706 | 173926 | /* 520 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173707 | - /* 530 */ 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254, 1254, | |
| 173927 | + /* 530 */ 1254, 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254, | |
| 173708 | 173928 | /* 540 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173709 | - /* 550 */ 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254, 1254, | |
| 173710 | - /* 560 */ 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173929 | + /* 550 */ 1254, 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254, | |
| 173930 | + /* 560 */ 1254, 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254, | |
| 173711 | 173931 | /* 570 */ 1254, 1254, 1254, 1634, 1346, 1438, 1254, 1441, 1276, 1254, |
| 173712 | 173932 | /* 580 */ 1266, 1254, 1254, |
| 173713 | 173933 | }; |
| 173714 | 173934 | /********** End of lemon-generated parsing tables *****************************/ |
| 173715 | 173935 | |
| @@ -174605,11 +174825,11 @@ | ||
| 174605 | 174825 | /* 275 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", |
| 174606 | 174826 | /* 276 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", |
| 174607 | 174827 | /* 277 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", |
| 174608 | 174828 | /* 278 */ "trigger_cmd ::= scanpt select scanpt", |
| 174609 | 174829 | /* 279 */ "expr ::= RAISE LP IGNORE RP", |
| 174610 | - /* 280 */ "expr ::= RAISE LP raisetype COMMA nm RP", | |
| 174830 | + /* 280 */ "expr ::= RAISE LP raisetype COMMA expr RP", | |
| 174611 | 174831 | /* 281 */ "raisetype ::= ROLLBACK", |
| 174612 | 174832 | /* 282 */ "raisetype ::= ABORT", |
| 174613 | 174833 | /* 283 */ "raisetype ::= FAIL", |
| 174614 | 174834 | /* 284 */ "cmd ::= DROP TRIGGER ifexists fullname", |
| 174615 | 174835 | /* 285 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", |
| @@ -175530,11 +175750,11 @@ | ||
| 175530 | 175750 | 293, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 175531 | 175751 | 293, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 175532 | 175752 | 293, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 175533 | 175753 | 293, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 175534 | 175754 | 218, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 175535 | - 218, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */ | |
| 175755 | + 218, /* (280) expr ::= RAISE LP raisetype COMMA expr RP */ | |
| 175536 | 175756 | 237, /* (281) raisetype ::= ROLLBACK */ |
| 175537 | 175757 | 237, /* (282) raisetype ::= ABORT */ |
| 175538 | 175758 | 237, /* (283) raisetype ::= FAIL */ |
| 175539 | 175759 | 191, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 175540 | 175760 | 191, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -175944,11 +176164,11 @@ | ||
| 175944 | 176164 | -9, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 175945 | 176165 | -8, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 175946 | 176166 | -6, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 175947 | 176167 | -3, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 175948 | 176168 | -4, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 175949 | - -6, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */ | |
| 176169 | + -6, /* (280) expr ::= RAISE LP raisetype COMMA expr RP */ | |
| 175950 | 176170 | -1, /* (281) raisetype ::= ROLLBACK */ |
| 175951 | 176171 | -1, /* (282) raisetype ::= ABORT */ |
| 175952 | 176172 | -1, /* (283) raisetype ::= FAIL */ |
| 175953 | 176173 | -4, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 175954 | 176174 | -6, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -177329,13 +177549,13 @@ | ||
| 177329 | 177549 | if( yymsp[-3].minor.yy454 ){ |
| 177330 | 177550 | yymsp[-3].minor.yy454->affExpr = OE_Ignore; |
| 177331 | 177551 | } |
| 177332 | 177552 | } |
| 177333 | 177553 | break; |
| 177334 | - case 280: /* expr ::= RAISE LP raisetype COMMA nm RP */ | |
| 177554 | + case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */ | |
| 177335 | 177555 | { |
| 177336 | - yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); | |
| 177556 | + yymsp[-5].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy454, 0); | |
| 177337 | 177557 | if( yymsp[-5].minor.yy454 ) { |
| 177338 | 177558 | yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144; |
| 177339 | 177559 | } |
| 177340 | 177560 | } |
| 177341 | 177561 | break; |
| @@ -208717,14 +208937,20 @@ | ||
| 208717 | 208937 | ** convenience. |
| 208718 | 208938 | ** |
| 208719 | 208939 | ** NUMBER ==> $[NUMBER] // PG compatible |
| 208720 | 208940 | ** LABEL ==> $.LABEL // PG compatible |
| 208721 | 208941 | ** [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience |
| 208942 | + ** | |
| 208943 | + ** Updated 2024-05-27: If the NUMBER is negative, then PG counts from | |
| 208944 | + ** the right of the array. Hence for negative NUMBER: | |
| 208945 | + ** | |
| 208946 | + ** NUMBER ==> $[#NUMBER] // PG compatible | |
| 208722 | 208947 | */ |
| 208723 | 208948 | jsonStringInit(&jx, ctx); |
| 208724 | 208949 | if( sqlite3_value_type(argv[i])==SQLITE_INTEGER ){ |
| 208725 | 208950 | jsonAppendRawNZ(&jx, "[", 1); |
| 208951 | + if( zPath[0]=='-' ) jsonAppendRawNZ(&jx,"#",1); | |
| 208726 | 208952 | jsonAppendRaw(&jx, zPath, nPath); |
| 208727 | 208953 | jsonAppendRawNZ(&jx, "]", 2); |
| 208728 | 208954 | }else if( jsonAllAlphanum(zPath, nPath) ){ |
| 208729 | 208955 | jsonAppendRawNZ(&jx, ".", 1); |
| 208730 | 208956 | jsonAppendRaw(&jx, zPath, nPath); |
| @@ -232196,10 +232422,19 @@ | ||
| 232196 | 232422 | ** Interface to code in fts5_config.c. fts5_config.c contains contains code |
| 232197 | 232423 | ** to parse the arguments passed to the CREATE VIRTUAL TABLE statement. |
| 232198 | 232424 | */ |
| 232199 | 232425 | |
| 232200 | 232426 | typedef struct Fts5Config Fts5Config; |
| 232427 | +typedef struct Fts5TokenizerConfig Fts5TokenizerConfig; | |
| 232428 | + | |
| 232429 | +struct Fts5TokenizerConfig { | |
| 232430 | + Fts5Tokenizer *pTok; | |
| 232431 | + fts5_tokenizer *pTokApi; | |
| 232432 | + const char **azArg; | |
| 232433 | + int nArg; | |
| 232434 | + int ePattern; /* FTS_PATTERN_XXX constant */ | |
| 232435 | +}; | |
| 232201 | 232436 | |
| 232202 | 232437 | /* |
| 232203 | 232438 | ** An instance of the following structure encodes all information that can |
| 232204 | 232439 | ** be gleaned from the CREATE VIRTUAL TABLE statement. |
| 232205 | 232440 | ** |
| @@ -232238,10 +232473,11 @@ | ||
| 232238 | 232473 | ** INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex); |
| 232239 | 232474 | ** |
| 232240 | 232475 | */ |
| 232241 | 232476 | struct Fts5Config { |
| 232242 | 232477 | sqlite3 *db; /* Database handle */ |
| 232478 | + Fts5Global *pGlobal; /* Global fts5 object for handle db */ | |
| 232243 | 232479 | char *zDb; /* Database holding FTS index (e.g. "main") */ |
| 232244 | 232480 | char *zName; /* Name of FTS index */ |
| 232245 | 232481 | int nCol; /* Number of columns */ |
| 232246 | 232482 | char **azCol; /* Column names */ |
| 232247 | 232483 | u8 *abUnindexed; /* True for unindexed columns */ |
| @@ -232253,14 +232489,12 @@ | ||
| 232253 | 232489 | char *zContentRowid; /* "content_rowid=" option value */ |
| 232254 | 232490 | int bColumnsize; /* "columnsize=" option value (dflt==1) */ |
| 232255 | 232491 | int bTokendata; /* "tokendata=" option value (dflt==0) */ |
| 232256 | 232492 | int eDetail; /* FTS5_DETAIL_XXX value */ |
| 232257 | 232493 | char *zContentExprlist; |
| 232258 | - Fts5Tokenizer *pTok; | |
| 232259 | - fts5_tokenizer *pTokApi; | |
| 232494 | + Fts5TokenizerConfig t; | |
| 232260 | 232495 | int bLock; /* True when table is preparing statement */ |
| 232261 | - int ePattern; /* FTS_PATTERN_XXX constant */ | |
| 232262 | 232496 | |
| 232263 | 232497 | /* Values loaded from the %_config table */ |
| 232264 | 232498 | int iVersion; /* fts5 file format 'version' */ |
| 232265 | 232499 | int iCookie; /* Incremented when %_config is modified */ |
| 232266 | 232500 | int pgsz; /* Approximate page size used in %_data */ |
| @@ -232651,17 +232885,11 @@ | ||
| 232651 | 232885 | sqlite3_vtab base; /* Base class used by SQLite core */ |
| 232652 | 232886 | Fts5Config *pConfig; /* Virtual table configuration */ |
| 232653 | 232887 | Fts5Index *pIndex; /* Full-text index */ |
| 232654 | 232888 | }; |
| 232655 | 232889 | |
| 232656 | -static int sqlite3Fts5GetTokenizer( | |
| 232657 | - Fts5Global*, | |
| 232658 | - const char **azArg, | |
| 232659 | - int nArg, | |
| 232660 | - Fts5Config*, | |
| 232661 | - char **pzErr | |
| 232662 | -); | |
| 232890 | +static int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig); | |
| 232663 | 232891 | |
| 232664 | 232892 | static Fts5Table *sqlite3Fts5TableFromCsrid(Fts5Global*, i64); |
| 232665 | 232893 | |
| 232666 | 232894 | static int sqlite3Fts5FlushToDisk(Fts5Table*); |
| 232667 | 232895 | |
| @@ -232920,10 +233148,11 @@ | ||
| 232920 | 233148 | static int sqlite3Fts5TokenizerInit(fts5_api*); |
| 232921 | 233149 | static int sqlite3Fts5TokenizerPattern( |
| 232922 | 233150 | int (*xCreate)(void*, const char**, int, Fts5Tokenizer**), |
| 232923 | 233151 | Fts5Tokenizer *pTok |
| 232924 | 233152 | ); |
| 233153 | +static int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig*); | |
| 232925 | 233154 | /* |
| 232926 | 233155 | ** End of interface to code in fts5_tokenizer.c. |
| 232927 | 233156 | **************************************************************************/ |
| 232928 | 233157 | |
| 232929 | 233158 | /************************************************************************** |
| @@ -235871,11 +236100,10 @@ | ||
| 235871 | 236100 | ** an error occurs, an SQLite error code is returned and an error message |
| 235872 | 236101 | ** may be left in *pzErr. It is the responsibility of the caller to |
| 235873 | 236102 | ** eventually free any such error message using sqlite3_free(). |
| 235874 | 236103 | */ |
| 235875 | 236104 | static int fts5ConfigParseSpecial( |
| 235876 | - Fts5Global *pGlobal, | |
| 235877 | 236105 | Fts5Config *pConfig, /* Configuration object to update */ |
| 235878 | 236106 | const char *zCmd, /* Special command to parse */ |
| 235879 | 236107 | const char *zArg, /* Argument to parse */ |
| 235880 | 236108 | char **pzErr /* OUT: Error message */ |
| 235881 | 236109 | ){ |
| @@ -235935,16 +236163,15 @@ | ||
| 235935 | 236163 | } |
| 235936 | 236164 | |
| 235937 | 236165 | if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){ |
| 235938 | 236166 | const char *p = (const char*)zArg; |
| 235939 | 236167 | sqlite3_int64 nArg = strlen(zArg) + 1; |
| 235940 | - char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg); | |
| 235941 | - char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2); | |
| 235942 | - char *pSpace = pDel; | |
| 236168 | + char **azArg = sqlite3Fts5MallocZero(&rc, (sizeof(char*) + 2) * nArg); | |
| 235943 | 236169 | |
| 235944 | - if( azArg && pSpace ){ | |
| 235945 | - if( pConfig->pTok ){ | |
| 236170 | + if( azArg ){ | |
| 236171 | + char *pSpace = (char*)&azArg[nArg]; | |
| 236172 | + if( pConfig->t.azArg ){ | |
| 235946 | 236173 | *pzErr = sqlite3_mprintf("multiple tokenize=... directives"); |
| 235947 | 236174 | rc = SQLITE_ERROR; |
| 235948 | 236175 | }else{ |
| 235949 | 236176 | for(nArg=0; p && *p; nArg++){ |
| 235950 | 236177 | const char *p2 = fts5ConfigSkipWhitespace(p); |
| @@ -235963,20 +236190,18 @@ | ||
| 235963 | 236190 | } |
| 235964 | 236191 | if( p==0 ){ |
| 235965 | 236192 | *pzErr = sqlite3_mprintf("parse error in tokenize directive"); |
| 235966 | 236193 | rc = SQLITE_ERROR; |
| 235967 | 236194 | }else{ |
| 235968 | - rc = sqlite3Fts5GetTokenizer(pGlobal, | |
| 235969 | - (const char**)azArg, (int)nArg, pConfig, | |
| 235970 | - pzErr | |
| 235971 | - ); | |
| 236195 | + pConfig->t.azArg = (const char**)azArg; | |
| 236196 | + pConfig->t.nArg = nArg; | |
| 236197 | + azArg = 0; | |
| 235972 | 236198 | } |
| 235973 | 236199 | } |
| 235974 | 236200 | } |
| 235975 | - | |
| 235976 | 236201 | sqlite3_free(azArg); |
| 235977 | - sqlite3_free(pDel); | |
| 236202 | + | |
| 235978 | 236203 | return rc; |
| 235979 | 236204 | } |
| 235980 | 236205 | |
| 235981 | 236206 | if( sqlite3_strnicmp("content", zCmd, nCmd)==0 ){ |
| 235982 | 236207 | if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){ |
| @@ -236049,20 +236274,10 @@ | ||
| 236049 | 236274 | |
| 236050 | 236275 | *pzErr = sqlite3_mprintf("unrecognized option: \"%.*s\"", nCmd, zCmd); |
| 236051 | 236276 | return SQLITE_ERROR; |
| 236052 | 236277 | } |
| 236053 | 236278 | |
| 236054 | -/* | |
| 236055 | -** Allocate an instance of the default tokenizer ("simple") at | |
| 236056 | -** Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error | |
| 236057 | -** code if an error occurs. | |
| 236058 | -*/ | |
| 236059 | -static int fts5ConfigDefaultTokenizer(Fts5Global *pGlobal, Fts5Config *pConfig){ | |
| 236060 | - assert( pConfig->pTok==0 && pConfig->pTokApi==0 ); | |
| 236061 | - return sqlite3Fts5GetTokenizer(pGlobal, 0, 0, pConfig, 0); | |
| 236062 | -} | |
| 236063 | - | |
| 236064 | 236279 | /* |
| 236065 | 236280 | ** Gobble up the first bareword or quoted word from the input buffer zIn. |
| 236066 | 236281 | ** Return a pointer to the character immediately following the last in |
| 236067 | 236282 | ** the gobbled word if successful, or a NULL pointer otherwise (failed |
| 236068 | 236283 | ** to find close-quote character). |
| @@ -236191,10 +236406,11 @@ | ||
| 236191 | 236406 | sqlite3_int64 nByte; |
| 236192 | 236407 | |
| 236193 | 236408 | *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config)); |
| 236194 | 236409 | if( pRet==0 ) return SQLITE_NOMEM; |
| 236195 | 236410 | memset(pRet, 0, sizeof(Fts5Config)); |
| 236411 | + pRet->pGlobal = pGlobal; | |
| 236196 | 236412 | pRet->db = db; |
| 236197 | 236413 | pRet->iCookie = -1; |
| 236198 | 236414 | |
| 236199 | 236415 | nByte = nArg * (sizeof(char*) + sizeof(u8)); |
| 236200 | 236416 | pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte); |
| @@ -236239,11 +236455,11 @@ | ||
| 236239 | 236455 | if( z==0 ){ |
| 236240 | 236456 | *pzErr = sqlite3_mprintf("parse error in \"%s\"", zOrig); |
| 236241 | 236457 | rc = SQLITE_ERROR; |
| 236242 | 236458 | }else{ |
| 236243 | 236459 | if( bOption ){ |
| 236244 | - rc = fts5ConfigParseSpecial(pGlobal, pRet, | |
| 236460 | + rc = fts5ConfigParseSpecial(pRet, | |
| 236245 | 236461 | ALWAYS(zOne)?zOne:"", |
| 236246 | 236462 | zTwo?zTwo:"", |
| 236247 | 236463 | pzErr |
| 236248 | 236464 | ); |
| 236249 | 236465 | }else{ |
| @@ -236277,17 +236493,10 @@ | ||
| 236277 | 236493 | "contentless_delete=1 is incompatible with columnsize=0" |
| 236278 | 236494 | ); |
| 236279 | 236495 | rc = SQLITE_ERROR; |
| 236280 | 236496 | } |
| 236281 | 236497 | |
| 236282 | - /* If a tokenizer= option was successfully parsed, the tokenizer has | |
| 236283 | - ** already been allocated. Otherwise, allocate an instance of the default | |
| 236284 | - ** tokenizer (unicode61) now. */ | |
| 236285 | - if( rc==SQLITE_OK && pRet->pTok==0 ){ | |
| 236286 | - rc = fts5ConfigDefaultTokenizer(pGlobal, pRet); | |
| 236287 | - } | |
| 236288 | - | |
| 236289 | 236498 | /* If no zContent option was specified, fill in the default values. */ |
| 236290 | 236499 | if( rc==SQLITE_OK && pRet->zContent==0 ){ |
| 236291 | 236500 | const char *zTail = 0; |
| 236292 | 236501 | assert( pRet->eContent==FTS5_CONTENT_NORMAL |
| 236293 | 236502 | || pRet->eContent==FTS5_CONTENT_NONE |
| @@ -236325,13 +236534,14 @@ | ||
| 236325 | 236534 | ** Free the configuration object passed as the only argument. |
| 236326 | 236535 | */ |
| 236327 | 236536 | static void sqlite3Fts5ConfigFree(Fts5Config *pConfig){ |
| 236328 | 236537 | if( pConfig ){ |
| 236329 | 236538 | int i; |
| 236330 | - if( pConfig->pTok ){ | |
| 236331 | - pConfig->pTokApi->xDelete(pConfig->pTok); | |
| 236539 | + if( pConfig->t.pTok ){ | |
| 236540 | + pConfig->t.pTokApi->xDelete(pConfig->t.pTok); | |
| 236332 | 236541 | } |
| 236542 | + sqlite3_free(pConfig->t.azArg); | |
| 236333 | 236543 | sqlite3_free(pConfig->zDb); |
| 236334 | 236544 | sqlite3_free(pConfig->zName); |
| 236335 | 236545 | for(i=0; i<pConfig->nCol; i++){ |
| 236336 | 236546 | sqlite3_free(pConfig->azCol[i]); |
| 236337 | 236547 | } |
| @@ -236402,14 +236612,22 @@ | ||
| 236402 | 236612 | int flags, /* FTS5_TOKENIZE_* flags */ |
| 236403 | 236613 | const char *pText, int nText, /* Text to tokenize */ |
| 236404 | 236614 | void *pCtx, /* Context passed to xToken() */ |
| 236405 | 236615 | int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 236406 | 236616 | ){ |
| 236407 | - if( pText==0 ) return SQLITE_OK; | |
| 236408 | - return pConfig->pTokApi->xTokenize( | |
| 236409 | - pConfig->pTok, pCtx, flags, pText, nText, xToken | |
| 236410 | - ); | |
| 236617 | + int rc = SQLITE_OK; | |
| 236618 | + if( pText ){ | |
| 236619 | + if( pConfig->t.pTok==0 ){ | |
| 236620 | + rc = sqlite3Fts5LoadTokenizer(pConfig); | |
| 236621 | + } | |
| 236622 | + if( rc==SQLITE_OK ){ | |
| 236623 | + rc = pConfig->t.pTokApi->xTokenize( | |
| 236624 | + pConfig->t.pTok, pCtx, flags, pText, nText, xToken | |
| 236625 | + ); | |
| 236626 | + } | |
| 236627 | + } | |
| 236628 | + return rc; | |
| 236411 | 236629 | } |
| 236412 | 236630 | |
| 236413 | 236631 | /* |
| 236414 | 236632 | ** Argument pIn points to the first character in what is expected to be |
| 236415 | 236633 | ** a comma-separated list of SQL literals followed by a ')' character. |
| @@ -237002,11 +237220,15 @@ | ||
| 237002 | 237220 | }else{ |
| 237003 | 237221 | sqlite3Fts5ParseNodeFree(sParse.pExpr); |
| 237004 | 237222 | } |
| 237005 | 237223 | |
| 237006 | 237224 | sqlite3_free(sParse.apPhrase); |
| 237007 | - *pzErr = sParse.zErr; | |
| 237225 | + if( 0==*pzErr ){ | |
| 237226 | + *pzErr = sParse.zErr; | |
| 237227 | + }else{ | |
| 237228 | + sqlite3_free(sParse.zErr); | |
| 237229 | + } | |
| 237008 | 237230 | return sParse.rc; |
| 237009 | 237231 | } |
| 237010 | 237232 | |
| 237011 | 237233 | /* |
| 237012 | 237234 | ** Assuming that buffer z is at least nByte bytes in size and contains a |
| @@ -249974,12 +250196,16 @@ | ||
| 249974 | 250196 | if( rc==SQLITE_OK ){ |
| 249975 | 250197 | rc = sqlite3Fts5ConfigParse(pGlobal, db, argc, azConfig, &pConfig, pzErr); |
| 249976 | 250198 | assert( (rc==SQLITE_OK && *pzErr==0) || pConfig==0 ); |
| 249977 | 250199 | } |
| 249978 | 250200 | if( rc==SQLITE_OK ){ |
| 250201 | + pConfig->pzErrmsg = pzErr; | |
| 249979 | 250202 | pTab->p.pConfig = pConfig; |
| 249980 | 250203 | pTab->pGlobal = pGlobal; |
| 250204 | + if( bCreate || sqlite3Fts5TokenizerPreload(&pConfig->t) ){ | |
| 250205 | + rc = sqlite3Fts5LoadTokenizer(pConfig); | |
| 250206 | + } | |
| 249981 | 250207 | } |
| 249982 | 250208 | |
| 249983 | 250209 | /* Open the index sub-system */ |
| 249984 | 250210 | if( rc==SQLITE_OK ){ |
| 249985 | 250211 | rc = sqlite3Fts5IndexOpen(pConfig, bCreate, &pTab->p.pIndex, pzErr); |
| @@ -249997,24 +250223,22 @@ | ||
| 249997 | 250223 | rc = sqlite3Fts5ConfigDeclareVtab(pConfig); |
| 249998 | 250224 | } |
| 249999 | 250225 | |
| 250000 | 250226 | /* Load the initial configuration */ |
| 250001 | 250227 | if( rc==SQLITE_OK ){ |
| 250002 | - assert( pConfig->pzErrmsg==0 ); | |
| 250003 | - pConfig->pzErrmsg = pzErr; | |
| 250004 | 250228 | rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex); |
| 250005 | 250229 | sqlite3Fts5IndexRollback(pTab->p.pIndex); |
| 250006 | - pConfig->pzErrmsg = 0; | |
| 250007 | 250230 | } |
| 250008 | 250231 | |
| 250009 | 250232 | if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){ |
| 250010 | 250233 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, (int)1); |
| 250011 | 250234 | } |
| 250012 | 250235 | if( rc==SQLITE_OK ){ |
| 250013 | 250236 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS); |
| 250014 | 250237 | } |
| 250015 | 250238 | |
| 250239 | + if( pConfig ) pConfig->pzErrmsg = 0; | |
| 250016 | 250240 | if( rc!=SQLITE_OK ){ |
| 250017 | 250241 | fts5FreeVtab(pTab); |
| 250018 | 250242 | pTab = 0; |
| 250019 | 250243 | }else if( bCreate ){ |
| 250020 | 250244 | fts5CheckTransactionState(pTab, FTS5_BEGIN, 0); |
| @@ -250078,14 +250302,14 @@ | ||
| 250078 | 250302 | Fts5Config *pConfig, |
| 250079 | 250303 | struct sqlite3_index_constraint *p |
| 250080 | 250304 | ){ |
| 250081 | 250305 | assert( FTS5_PATTERN_GLOB==SQLITE_INDEX_CONSTRAINT_GLOB ); |
| 250082 | 250306 | assert( FTS5_PATTERN_LIKE==SQLITE_INDEX_CONSTRAINT_LIKE ); |
| 250083 | - if( pConfig->ePattern==FTS5_PATTERN_GLOB && p->op==FTS5_PATTERN_GLOB ){ | |
| 250307 | + if( pConfig->t.ePattern==FTS5_PATTERN_GLOB && p->op==FTS5_PATTERN_GLOB ){ | |
| 250084 | 250308 | return 1; |
| 250085 | 250309 | } |
| 250086 | - if( pConfig->ePattern==FTS5_PATTERN_LIKE | |
| 250310 | + if( pConfig->t.ePattern==FTS5_PATTERN_LIKE | |
| 250087 | 250311 | && (p->op==FTS5_PATTERN_LIKE || p->op==FTS5_PATTERN_GLOB) |
| 250088 | 250312 | ){ |
| 250089 | 250313 | return 1; |
| 250090 | 250314 | } |
| 250091 | 250315 | return 0; |
| @@ -250223,10 +250447,11 @@ | ||
| 250223 | 250447 | idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G'; |
| 250224 | 250448 | sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol); |
| 250225 | 250449 | idxStr += strlen(&idxStr[iIdxStr]); |
| 250226 | 250450 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250227 | 250451 | assert( idxStr[iIdxStr]=='\0' ); |
| 250452 | + bSeenMatch = 1; | |
| 250228 | 250453 | }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){ |
| 250229 | 250454 | idxStr[iIdxStr++] = '='; |
| 250230 | 250455 | bSeenEq = 1; |
| 250231 | 250456 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250232 | 250457 | } |
| @@ -252457,11 +252682,11 @@ | ||
| 252457 | 252682 | } |
| 252458 | 252683 | |
| 252459 | 252684 | return rc; |
| 252460 | 252685 | } |
| 252461 | 252686 | |
| 252462 | -static int sqlite3Fts5GetTokenizer( | |
| 252687 | +int fts5GetTokenizer( | |
| 252463 | 252688 | Fts5Global *pGlobal, |
| 252464 | 252689 | const char **azArg, |
| 252465 | 252690 | int nArg, |
| 252466 | 252691 | Fts5Config *pConfig, |
| 252467 | 252692 | char **pzErr |
| @@ -252471,32 +252696,45 @@ | ||
| 252471 | 252696 | |
| 252472 | 252697 | pMod = fts5LocateTokenizer(pGlobal, nArg==0 ? 0 : azArg[0]); |
| 252473 | 252698 | if( pMod==0 ){ |
| 252474 | 252699 | assert( nArg>0 ); |
| 252475 | 252700 | rc = SQLITE_ERROR; |
| 252476 | - *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); | |
| 252701 | + if( pzErr ) *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); | |
| 252477 | 252702 | }else{ |
| 252478 | 252703 | rc = pMod->x.xCreate( |
| 252479 | - pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok | |
| 252704 | + pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->t.pTok | |
| 252480 | 252705 | ); |
| 252481 | - pConfig->pTokApi = &pMod->x; | |
| 252706 | + pConfig->t.pTokApi = &pMod->x; | |
| 252482 | 252707 | if( rc!=SQLITE_OK ){ |
| 252483 | - if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor"); | |
| 252708 | + if( pzErr && rc!=SQLITE_NOMEM ){ | |
| 252709 | + *pzErr = sqlite3_mprintf("error in tokenizer constructor"); | |
| 252710 | + } | |
| 252484 | 252711 | }else{ |
| 252485 | - pConfig->ePattern = sqlite3Fts5TokenizerPattern( | |
| 252486 | - pMod->x.xCreate, pConfig->pTok | |
| 252712 | + pConfig->t.ePattern = sqlite3Fts5TokenizerPattern( | |
| 252713 | + pMod->x.xCreate, pConfig->t.pTok | |
| 252487 | 252714 | ); |
| 252488 | 252715 | } |
| 252489 | 252716 | } |
| 252490 | 252717 | |
| 252491 | 252718 | if( rc!=SQLITE_OK ){ |
| 252492 | - pConfig->pTokApi = 0; | |
| 252493 | - pConfig->pTok = 0; | |
| 252719 | + pConfig->t.pTokApi = 0; | |
| 252720 | + pConfig->t.pTok = 0; | |
| 252494 | 252721 | } |
| 252495 | 252722 | |
| 252496 | 252723 | return rc; |
| 252497 | 252724 | } |
| 252725 | + | |
| 252726 | +/* | |
| 252727 | +** Attempt to instantiate the tokenizer. | |
| 252728 | +*/ | |
| 252729 | +static int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig){ | |
| 252730 | + return fts5GetTokenizer( | |
| 252731 | + pConfig->pGlobal, pConfig->t.azArg, pConfig->t.nArg, | |
| 252732 | + pConfig, pConfig->pzErrmsg | |
| 252733 | + ); | |
| 252734 | +} | |
| 252735 | + | |
| 252498 | 252736 | |
| 252499 | 252737 | static void fts5ModuleDestroy(void *pCtx){ |
| 252500 | 252738 | Fts5TokenizerModule *pTok, *pNextTok; |
| 252501 | 252739 | Fts5Auxiliary *pAux, *pNextAux; |
| 252502 | 252740 | Fts5Global *pGlobal = (Fts5Global*)pCtx; |
| @@ -252537,11 +252775,11 @@ | ||
| 252537 | 252775 | int nArg, /* Number of args */ |
| 252538 | 252776 | sqlite3_value **apUnused /* Function arguments */ |
| 252539 | 252777 | ){ |
| 252540 | 252778 | assert( nArg==0 ); |
| 252541 | 252779 | UNUSED_PARAM2(nArg, apUnused); |
| 252542 | - sqlite3_result_text(pCtx, "fts5: 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e", -1, SQLITE_TRANSIENT); | |
| 252780 | + sqlite3_result_text(pCtx, "fts5: 2024-05-30 11:14:16 ee92fa8366b743266b17c692499087c0d11b9302d096c3dfb4e6356b467e939e", -1, SQLITE_TRANSIENT); | |
| 252543 | 252781 | } |
| 252544 | 252782 | |
| 252545 | 252783 | /* |
| 252546 | 252784 | ** Return true if zName is the extension on one of the shadow tables used |
| 252547 | 252785 | ** by this module. |
| @@ -252572,21 +252810,27 @@ | ||
| 252572 | 252810 | Fts5FullTable *pTab = (Fts5FullTable*)pVtab; |
| 252573 | 252811 | int rc; |
| 252574 | 252812 | |
| 252575 | 252813 | assert( pzErr!=0 && *pzErr==0 ); |
| 252576 | 252814 | UNUSED_PARAM(isQuick); |
| 252815 | + assert( pTab->p.pConfig->pzErrmsg==0 ); | |
| 252816 | + pTab->p.pConfig->pzErrmsg = pzErr; | |
| 252577 | 252817 | rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0); |
| 252578 | - if( (rc&0xff)==SQLITE_CORRUPT ){ | |
| 252579 | - *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", | |
| 252580 | - zSchema, zTabname); | |
| 252581 | - rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; | |
| 252582 | - }else if( rc!=SQLITE_OK ){ | |
| 252583 | - *pzErr = sqlite3_mprintf("unable to validate the inverted index for" | |
| 252584 | - " FTS5 table %s.%s: %s", | |
| 252585 | - zSchema, zTabname, sqlite3_errstr(rc)); | |
| 252586 | - } | |
| 252818 | + if( *pzErr==0 && rc!=SQLITE_OK ){ | |
| 252819 | + if( (rc&0xff)==SQLITE_CORRUPT ){ | |
| 252820 | + *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", | |
| 252821 | + zSchema, zTabname); | |
| 252822 | + rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; | |
| 252823 | + }else{ | |
| 252824 | + *pzErr = sqlite3_mprintf("unable to validate the inverted index for" | |
| 252825 | + " FTS5 table %s.%s: %s", | |
| 252826 | + zSchema, zTabname, sqlite3_errstr(rc)); | |
| 252827 | + } | |
| 252828 | + } | |
| 252829 | + | |
| 252587 | 252830 | sqlite3Fts5IndexCloseReader(pTab->p.pIndex); |
| 252831 | + pTab->p.pConfig->pzErrmsg = 0; | |
| 252588 | 252832 | |
| 252589 | 252833 | return rc; |
| 252590 | 252834 | } |
| 252591 | 252835 | |
| 252592 | 252836 | static int fts5Init(sqlite3 *db){ |
| @@ -255364,10 +255608,20 @@ | ||
| 255364 | 255608 | return p->bFold ? FTS5_PATTERN_LIKE : FTS5_PATTERN_GLOB; |
| 255365 | 255609 | } |
| 255366 | 255610 | } |
| 255367 | 255611 | return FTS5_PATTERN_NONE; |
| 255368 | 255612 | } |
| 255613 | + | |
| 255614 | +/* | |
| 255615 | +** Return true if the tokenizer described by p->azArg[] is the trigram | |
| 255616 | +** tokenizer. This tokenizer needs to be loaded before xBestIndex is | |
| 255617 | +** called for the first time in order to correctly handle LIKE/GLOB. | |
| 255618 | +*/ | |
| 255619 | +static int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig *p){ | |
| 255620 | + return (p->nArg>=1 && 0==sqlite3_stricmp(p->azArg[0], "trigram")); | |
| 255621 | +} | |
| 255622 | + | |
| 255369 | 255623 | |
| 255370 | 255624 | /* |
| 255371 | 255625 | ** Register all built-in tokenizers with FTS5. |
| 255372 | 255626 | */ |
| 255373 | 255627 | static int sqlite3Fts5TokenizerInit(fts5_api *pApi){ |
| @@ -256584,10 +256838,11 @@ | ||
| 256584 | 256838 | Fts5IndexIter *pIter; /* Term/rowid iterator object */ |
| 256585 | 256839 | void *pStruct; /* From sqlite3Fts5StructureRef() */ |
| 256586 | 256840 | |
| 256587 | 256841 | int nLeTerm; /* Size of zLeTerm in bytes */ |
| 256588 | 256842 | char *zLeTerm; /* (term <= $zLeTerm) paramater, or NULL */ |
| 256843 | + int colUsed; /* Copy of sqlite3_index_info.colUsed */ | |
| 256589 | 256844 | |
| 256590 | 256845 | /* These are used by 'col' tables only */ |
| 256591 | 256846 | int iCol; |
| 256592 | 256847 | i64 *aCnt; |
| 256593 | 256848 | i64 *aDoc; |
| @@ -256610,13 +256865,15 @@ | ||
| 256610 | 256865 | #define FTS5_VOCAB_INST_SCHEMA "term, doc, col, offset" |
| 256611 | 256866 | |
| 256612 | 256867 | /* |
| 256613 | 256868 | ** Bits for the mask used as the idxNum value by xBestIndex/xFilter. |
| 256614 | 256869 | */ |
| 256615 | -#define FTS5_VOCAB_TERM_EQ 0x01 | |
| 256616 | -#define FTS5_VOCAB_TERM_GE 0x02 | |
| 256617 | -#define FTS5_VOCAB_TERM_LE 0x04 | |
| 256870 | +#define FTS5_VOCAB_TERM_EQ 0x0100 | |
| 256871 | +#define FTS5_VOCAB_TERM_GE 0x0200 | |
| 256872 | +#define FTS5_VOCAB_TERM_LE 0x0400 | |
| 256873 | + | |
| 256874 | +#define FTS5_VOCAB_COLUSED_MASK 0xFF | |
| 256618 | 256875 | |
| 256619 | 256876 | |
| 256620 | 256877 | /* |
| 256621 | 256878 | ** Translate a string containing an fts5vocab table type to an |
| 256622 | 256879 | ** FTS5_VOCAB_XXX constant. If successful, set *peType to the output |
| @@ -256789,14 +257046,16 @@ | ||
| 256789 | 257046 | ){ |
| 256790 | 257047 | int i; |
| 256791 | 257048 | int iTermEq = -1; |
| 256792 | 257049 | int iTermGe = -1; |
| 256793 | 257050 | int iTermLe = -1; |
| 256794 | - int idxNum = 0; | |
| 257051 | + int idxNum = (int)pInfo->colUsed; | |
| 256795 | 257052 | int nArg = 0; |
| 256796 | 257053 | |
| 256797 | 257054 | UNUSED_PARAM(pUnused); |
| 257055 | + | |
| 257056 | + assert( (pInfo->colUsed & FTS5_VOCAB_COLUSED_MASK)==pInfo->colUsed ); | |
| 256798 | 257057 | |
| 256799 | 257058 | for(i=0; i<pInfo->nConstraint; i++){ |
| 256800 | 257059 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 256801 | 257060 | if( p->usable==0 ) continue; |
| 256802 | 257061 | if( p->iColumn==0 ){ /* term column */ |
| @@ -256885,11 +257144,11 @@ | ||
| 256885 | 257144 | rc = sqlite3_finalize(pStmt); |
| 256886 | 257145 | pStmt = 0; |
| 256887 | 257146 | if( rc==SQLITE_OK ){ |
| 256888 | 257147 | pVTab->zErrMsg = sqlite3_mprintf( |
| 256889 | 257148 | "no such fts5 table: %s.%s", pTab->zFts5Db, pTab->zFts5Tbl |
| 256890 | - ); | |
| 257149 | + ); | |
| 256891 | 257150 | rc = SQLITE_ERROR; |
| 256892 | 257151 | } |
| 256893 | 257152 | }else{ |
| 256894 | 257153 | rc = sqlite3Fts5FlushToDisk(pFts5); |
| 256895 | 257154 | } |
| @@ -257045,13 +257304,23 @@ | ||
| 257045 | 257304 | pPos = pCsr->pIter->pData; |
| 257046 | 257305 | nPos = pCsr->pIter->nData; |
| 257047 | 257306 | |
| 257048 | 257307 | switch( pTab->eType ){ |
| 257049 | 257308 | case FTS5_VOCAB_ROW: |
| 257050 | - if( eDetail==FTS5_DETAIL_FULL ){ | |
| 257051 | - while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){ | |
| 257052 | - pCsr->aCnt[0]++; | |
| 257309 | + /* Do not bother counting the number of instances if the "cnt" | |
| 257310 | + ** column is not being read (according to colUsed). */ | |
| 257311 | + if( eDetail==FTS5_DETAIL_FULL && (pCsr->colUsed & 0x04) ){ | |
| 257312 | + while( iPos<nPos ){ | |
| 257313 | + u32 ii; | |
| 257314 | + fts5FastGetVarint32(pPos, iPos, ii); | |
| 257315 | + if( ii==1 ){ | |
| 257316 | + /* New column in the position list */ | |
| 257317 | + fts5FastGetVarint32(pPos, iPos, ii); | |
| 257318 | + }else{ | |
| 257319 | + /* An instance - increment pCsr->aCnt[] */ | |
| 257320 | + pCsr->aCnt[0]++; | |
| 257321 | + } | |
| 257053 | 257322 | } |
| 257054 | 257323 | } |
| 257055 | 257324 | pCsr->aDoc[0]++; |
| 257056 | 257325 | break; |
| 257057 | 257326 | |
| @@ -257145,10 +257414,11 @@ | ||
| 257145 | 257414 | |
| 257146 | 257415 | fts5VocabResetCursor(pCsr); |
| 257147 | 257416 | if( idxNum & FTS5_VOCAB_TERM_EQ ) pEq = apVal[iVal++]; |
| 257148 | 257417 | if( idxNum & FTS5_VOCAB_TERM_GE ) pGe = apVal[iVal++]; |
| 257149 | 257418 | if( idxNum & FTS5_VOCAB_TERM_LE ) pLe = apVal[iVal++]; |
| 257419 | + pCsr->colUsed = (idxNum & FTS5_VOCAB_COLUSED_MASK); | |
| 257150 | 257420 | |
| 257151 | 257421 | if( pEq ){ |
| 257152 | 257422 | zTerm = (const char *)sqlite3_value_text(pEq); |
| 257153 | 257423 | nTerm = sqlite3_value_bytes(pEq); |
| 257154 | 257424 | f = FTS5INDEX_QUERY_NOTOKENDATA; |
| 257155 | 257425 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.46.0. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** 96c92aba00c8375bc32fafcdf12429c58bd8. |
| 22 | */ |
| 23 | #define SQLITE_CORE 1 |
| 24 | #define SQLITE_AMALGAMATION 1 |
| 25 | #ifndef SQLITE_PRIVATE |
| 26 | # define SQLITE_PRIVATE static |
| @@ -457,13 +457,13 @@ | |
| 457 | ** |
| 458 | ** See also: [sqlite3_libversion()], |
| 459 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 460 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 461 | */ |
| 462 | #define SQLITE_VERSION "3.46.0" |
| 463 | #define SQLITE_VERSION_NUMBER 3046000 |
| 464 | #define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" |
| 465 | |
| 466 | /* |
| 467 | ** CAPI3REF: Run-Time Library Version Numbers |
| 468 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 469 | ** |
| @@ -3881,12 +3881,12 @@ | |
| 3881 | ** the default shared cache setting provided by |
| 3882 | ** [sqlite3_enable_shared_cache()].)^ |
| 3883 | ** |
| 3884 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3885 | ** <dd>The database connection comes up in "extended result code mode". |
| 3886 | ** In other words, the database behaves has if |
| 3887 | ** [sqlite3_extended_result_codes(db,1)] where called on the database |
| 3888 | ** connection as soon as the connection is created. In addition to setting |
| 3889 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3890 | ** to return an extended result code.</dd> |
| 3891 | ** |
| 3892 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| @@ -20996,10 +20996,11 @@ | |
| 20996 | SQLITE_PRIVATE int sqlite3WhereUsesDeferredSeek(WhereInfo*); |
| 20997 | SQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(Parse*, Index*, int, int, int); |
| 20998 | SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, u8); |
| 20999 | SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int); |
| 21000 | SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int); |
| 21001 | SQLITE_PRIVATE void sqlite3ExprCode(Parse*, Expr*, int); |
| 21002 | #ifndef SQLITE_OMIT_GENERATED_COLUMNS |
| 21003 | SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int); |
| 21004 | #endif |
| 21005 | SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int); |
| @@ -33402,11 +33403,12 @@ | |
| 33402 | case OE_Abort: zType = "abort"; break; |
| 33403 | case OE_Fail: zType = "fail"; break; |
| 33404 | case OE_Ignore: zType = "ignore"; break; |
| 33405 | } |
| 33406 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 33407 | sqlite3TreeViewLine(pView, "RAISE %s(%Q)", zType, pExpr->u.zToken); |
| 33408 | break; |
| 33409 | } |
| 33410 | #endif |
| 33411 | case TK_MATCH: { |
| 33412 | sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s", |
| @@ -78108,11 +78110,12 @@ | |
| 78108 | assert( i<iEnd ); |
| 78109 | j = get2byte(&aData[hdr+5]); |
| 78110 | if( j>(u32)usableSize ){ j = 0; } |
| 78111 | memcpy(&pTmp[j], &aData[j], usableSize - j); |
| 78112 | |
| 78113 | for(k=0; ALWAYS(k<NB*2) && pCArray->ixNx[k]<=i; k++){} |
| 78114 | pSrcEnd = pCArray->apEnd[k]; |
| 78115 | |
| 78116 | pData = pEnd; |
| 78117 | while( 1/*exit by break*/ ){ |
| 78118 | u8 *pCell = pCArray->apCell[i]; |
| @@ -78191,11 +78194,12 @@ | |
| 78191 | int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */ |
| 78192 | int k; /* Current slot in pCArray->apEnd[] */ |
| 78193 | u8 *pEnd; /* Maximum extent of cell data */ |
| 78194 | assert( CORRUPT_DB || pPg->hdrOffset==0 ); /* Never called on page 1 */ |
| 78195 | if( iEnd<=iFirst ) return 0; |
| 78196 | for(k=0; ALWAYS(k<NB*2) && pCArray->ixNx[k]<=i ; k++){} |
| 78197 | pEnd = pCArray->apEnd[k]; |
| 78198 | while( 1 /*Exit by break*/ ){ |
| 78199 | int sz, rc; |
| 78200 | u8 *pSlot; |
| 78201 | assert( pCArray->szCell[i]!=0 ); |
| @@ -78476,10 +78480,11 @@ | |
| 78476 | b.pRef = pPage; |
| 78477 | b.apCell = &pCell; |
| 78478 | b.szCell = &szCell; |
| 78479 | b.apEnd[0] = pPage->aDataEnd; |
| 78480 | b.ixNx[0] = 2; |
| 78481 | rc = rebuildPage(&b, 0, 1, pNew); |
| 78482 | if( NEVER(rc) ){ |
| 78483 | releasePage(pNew); |
| 78484 | return rc; |
| 78485 | } |
| @@ -78711,11 +78716,13 @@ | |
| 78711 | u8 abDone[NB+2]; /* True after i'th new page is populated */ |
| 78712 | Pgno aPgno[NB+2]; /* Page numbers of new pages before shuffling */ |
| 78713 | CellArray b; /* Parsed information on cells being balanced */ |
| 78714 | |
| 78715 | memset(abDone, 0, sizeof(abDone)); |
| 78716 | memset(&b, 0, sizeof(b)); |
| 78717 | pBt = pParent->pBt; |
| 78718 | assert( sqlite3_mutex_held(pBt->mutex) ); |
| 78719 | assert( sqlite3PagerIswriteable(pParent->pDbPage) ); |
| 78720 | |
| 78721 | /* At this point pParent may have at most one overflow cell. And if |
| @@ -79302,11 +79309,12 @@ | |
| 79302 | } |
| 79303 | } |
| 79304 | iOvflSpace += sz; |
| 79305 | assert( sz<=pBt->maxLocal+23 ); |
| 79306 | assert( iOvflSpace <= (int)pBt->pageSize ); |
| 79307 | for(k=0; ALWAYS(k<NB*2) && b.ixNx[k]<=j; k++){} |
| 79308 | pSrcEnd = b.apEnd[k]; |
| 79309 | if( SQLITE_OVERFLOW(pSrcEnd, pCell, pCell+sz) ){ |
| 79310 | rc = SQLITE_CORRUPT_BKPT; |
| 79311 | goto balance_cleanup; |
| 79312 | } |
| @@ -90171,11 +90179,12 @@ | |
| 90171 | */ |
| 90172 | SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){ |
| 90173 | assert( iVar>0 ); |
| 90174 | if( v ){ |
| 90175 | Mem *pMem = &v->aVar[iVar-1]; |
| 90176 | assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); |
| 90177 | if( 0==(pMem->flags & MEM_Null) ){ |
| 90178 | sqlite3_value *pRet = sqlite3ValueNew(v->db); |
| 90179 | if( pRet ){ |
| 90180 | sqlite3VdbeMemCopy((Mem *)pRet, pMem); |
| 90181 | sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8); |
| @@ -90191,11 +90200,12 @@ | |
| 90191 | ** to sqlite3_reoptimize() that re-preparing the statement may result |
| 90192 | ** in a better query plan. |
| 90193 | */ |
| 90194 | SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ |
| 90195 | assert( iVar>0 ); |
| 90196 | assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); |
| 90197 | if( iVar>=32 ){ |
| 90198 | v->expmask |= 0x80000000; |
| 90199 | }else{ |
| 90200 | v->expmask |= ((u32)1 << (iVar-1)); |
| 90201 | } |
| @@ -94323,11 +94333,11 @@ | |
| 94323 | if( (pIn3->flags & MEM_Null)==0 ) break; |
| 94324 | /* Fall through into OP_Halt */ |
| 94325 | /* no break */ deliberate_fall_through |
| 94326 | } |
| 94327 | |
| 94328 | /* Opcode: Halt P1 P2 * P4 P5 |
| 94329 | ** |
| 94330 | ** Exit immediately. All open cursors, etc are closed |
| 94331 | ** automatically. |
| 94332 | ** |
| 94333 | ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), |
| @@ -94336,22 +94346,26 @@ | |
| 94336 | ** whether or not to rollback the current transaction. Do not rollback |
| 94337 | ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, |
| 94338 | ** then back out all changes that have occurred during this execution of the |
| 94339 | ** VDBE, but do not rollback the transaction. |
| 94340 | ** |
| 94341 | ** If P4 is not null then it is an error message string. |
| 94342 | ** |
| 94343 | ** P5 is a value between 0 and 4, inclusive, that modifies the P4 string. |
| 94344 | ** |
| 94345 | ** 0: (no change) |
| 94346 | ** 1: NOT NULL constraint failed: P4 |
| 94347 | ** 2: UNIQUE constraint failed: P4 |
| 94348 | ** 3: CHECK constraint failed: P4 |
| 94349 | ** 4: FOREIGN KEY constraint failed: P4 |
| 94350 | ** |
| 94351 | ** If P5 is not zero and P4 is NULL, then everything after the ":" is |
| 94352 | ** omitted. |
| 94353 | ** |
| 94354 | ** There is an implied "Halt 0 0 0" instruction inserted at the very end of |
| 94355 | ** every program. So a jump past the last instruction of the program |
| 94356 | ** is the same as executing Halt. |
| 94357 | */ |
| @@ -94360,10 +94374,13 @@ | |
| 94360 | int pcx; |
| 94361 | |
| 94362 | #ifdef SQLITE_DEBUG |
| 94363 | if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); } |
| 94364 | #endif |
| 94365 | |
| 94366 | /* A deliberately coded "OP_Halt SQLITE_INTERNAL * * * *" opcode indicates |
| 94367 | ** something is wrong with the code generator. Raise an assertion in order |
| 94368 | ** to bring this to the attention of fuzzers and other testing tools. */ |
| 94369 | assert( pOp->p1!=SQLITE_INTERNAL ); |
| @@ -94390,11 +94407,16 @@ | |
| 94390 | } |
| 94391 | p->rc = pOp->p1; |
| 94392 | p->errorAction = (u8)pOp->p2; |
| 94393 | assert( pOp->p5<=4 ); |
| 94394 | if( p->rc ){ |
| 94395 | if( pOp->p5 ){ |
| 94396 | static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK", |
| 94397 | "FOREIGN KEY" }; |
| 94398 | testcase( pOp->p5==1 ); |
| 94399 | testcase( pOp->p5==2 ); |
| 94400 | testcase( pOp->p5==3 ); |
| @@ -97433,27 +97455,27 @@ | |
| 97433 | wrFlag = BTREE_WRCSR | (pOp->p5 & OPFLAG_FORDELETE); |
| 97434 | assert( sqlite3SchemaMutexHeld(db, iDb, 0) ); |
| 97435 | if( pDb->pSchema->file_format < p->minWriteFileFormat ){ |
| 97436 | p->minWriteFileFormat = pDb->pSchema->file_format; |
| 97437 | } |
| 97438 | }else{ |
| 97439 | wrFlag = 0; |
| 97440 | } |
| 97441 | if( pOp->p5 & OPFLAG_P2ISREG ){ |
| 97442 | assert( p2>0 ); |
| 97443 | assert( p2<=(u32)(p->nMem+1 - p->nCursor) ); |
| 97444 | assert( pOp->opcode==OP_OpenWrite ); |
| 97445 | pIn2 = &aMem[p2]; |
| 97446 | assert( memIsValid(pIn2) ); |
| 97447 | assert( (pIn2->flags & MEM_Int)!=0 ); |
| 97448 | sqlite3VdbeMemIntegerify(pIn2); |
| 97449 | p2 = (int)pIn2->u.i; |
| 97450 | /* The p2 value always comes from a prior OP_CreateBtree opcode and |
| 97451 | ** that opcode will always set the p2 value to 2 or more or else fail. |
| 97452 | ** If there were a failure, the prepared statement would have halted |
| 97453 | ** before reaching this instruction. */ |
| 97454 | assert( p2>=2 ); |
| 97455 | } |
| 97456 | if( pOp->p4type==P4_KEYINFO ){ |
| 97457 | pKeyInfo = pOp->p4.pKeyInfo; |
| 97458 | assert( pKeyInfo->enc==ENC(db) ); |
| 97459 | assert( pKeyInfo->db==db ); |
| @@ -113247,11 +113269,11 @@ | |
| 113247 | /* |
| 113248 | ** Convert a scalar expression node to a TK_REGISTER referencing |
| 113249 | ** register iReg. The caller must ensure that iReg already contains |
| 113250 | ** the correct value for the expression. |
| 113251 | */ |
| 113252 | static void exprToRegister(Expr *pExpr, int iReg){ |
| 113253 | Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr); |
| 113254 | if( NEVER(p==0) ) return; |
| 113255 | p->op2 = p->op; |
| 113256 | p->op = TK_REGISTER; |
| 113257 | p->iTable = iReg; |
| @@ -114256,11 +114278,11 @@ | |
| 114256 | if( db->mallocFailed ){ |
| 114257 | sqlite3ExprDelete(db, pDel); |
| 114258 | break; |
| 114259 | } |
| 114260 | testcase( pX->op==TK_COLUMN ); |
| 114261 | exprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); |
| 114262 | testcase( regFree1==0 ); |
| 114263 | memset(&opCompare, 0, sizeof(opCompare)); |
| 114264 | opCompare.op = TK_EQ; |
| 114265 | opCompare.pLeft = pDel; |
| 114266 | pTest = &opCompare; |
| @@ -114310,19 +114332,18 @@ | |
| 114310 | if( pExpr->affExpr==OE_Abort ){ |
| 114311 | sqlite3MayAbort(pParse); |
| 114312 | } |
| 114313 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 114314 | if( pExpr->affExpr==OE_Ignore ){ |
| 114315 | sqlite3VdbeAddOp4( |
| 114316 | v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0); |
| 114317 | VdbeCoverage(v); |
| 114318 | }else{ |
| 114319 | sqlite3HaltConstraint(pParse, |
| 114320 | pParse->pTriggerTab ? SQLITE_CONSTRAINT_TRIGGER : SQLITE_ERROR, |
| 114321 | pExpr->affExpr, pExpr->u.zToken, 0, 0); |
| 114322 | } |
| 114323 | |
| 114324 | break; |
| 114325 | } |
| 114326 | #endif |
| 114327 | } |
| 114328 | sqlite3ReleaseTempReg(pParse, regFree1); |
| @@ -114607,11 +114628,11 @@ | |
| 114607 | compLeft.pLeft = pDel; |
| 114608 | compLeft.pRight = pExpr->x.pList->a[0].pExpr; |
| 114609 | compRight.op = TK_LE; |
| 114610 | compRight.pLeft = pDel; |
| 114611 | compRight.pRight = pExpr->x.pList->a[1].pExpr; |
| 114612 | exprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); |
| 114613 | if( xJump ){ |
| 114614 | xJump(pParse, &exprAnd, dest, jumpIfNull); |
| 114615 | }else{ |
| 114616 | /* Mark the expression is being from the ON or USING clause of a join |
| 114617 | ** so that the sqlite3ExprCodeTarget() routine will not attempt to move |
| @@ -124424,12 +124445,13 @@ | |
| 124424 | #endif /* SQLITE_OMIT_VIEW */ |
| 124425 | |
| 124426 | #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) |
| 124427 | /* |
| 124428 | ** The Table structure pTable is really a VIEW. Fill in the names of |
| 124429 | ** the columns of the view in the pTable structure. Return the number |
| 124430 | ** of errors. If an error is seen leave an error message in pParse->zErrMsg. |
| 124431 | */ |
| 124432 | static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124433 | Table *pSelTab; /* A fake table from which we get the result set */ |
| 124434 | Select *pSel; /* Copy of the SELECT that implements the view */ |
| 124435 | int nErr = 0; /* Number of errors encountered */ |
| @@ -124548,11 +124570,11 @@ | |
| 124548 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 124549 | if( db->mallocFailed ){ |
| 124550 | sqlite3DeleteColumnNames(db, pTable); |
| 124551 | } |
| 124552 | #endif /* SQLITE_OMIT_VIEW */ |
| 124553 | return nErr; |
| 124554 | } |
| 124555 | SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124556 | assert( pTable!=0 ); |
| 124557 | if( !IsVirtual(pTable) && pTable->nCol>0 ) return 0; |
| 124558 | return viewGetColumnNames(pParse, pTable); |
| @@ -130846,10 +130868,12 @@ | |
| 130846 | StrAccum *pAccum = &pGCC->str; |
| 130847 | if( pAccum->accError==SQLITE_TOOBIG ){ |
| 130848 | sqlite3_result_error_toobig(context); |
| 130849 | }else if( pAccum->accError==SQLITE_NOMEM ){ |
| 130850 | sqlite3_result_error_nomem(context); |
| 130851 | }else{ |
| 130852 | const char *zText = sqlite3_str_value(pAccum); |
| 130853 | sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT); |
| 130854 | } |
| 130855 | } |
| @@ -132726,11 +132750,12 @@ | |
| 132726 | if( action==OE_Restrict ){ |
| 132727 | int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 132728 | SrcList *pSrc; |
| 132729 | Expr *pRaise; |
| 132730 | |
| 132731 | pRaise = sqlite3Expr(db, TK_RAISE, "FOREIGN KEY constraint failed"); |
| 132732 | if( pRaise ){ |
| 132733 | pRaise->affExpr = OE_Abort; |
| 132734 | } |
| 132735 | pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); |
| 132736 | if( pSrc ){ |
| @@ -150727,16 +150752,22 @@ | |
| 150727 | ** written the query must use a temp-table for at least one of the ORDER |
| 150728 | ** BY and DISTINCT, and an index or separate temp-table for the other. |
| 150729 | */ |
| 150730 | if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct |
| 150731 | && sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0 |
| 150732 | #ifndef SQLITE_OMIT_WINDOWFUNC |
| 150733 | && p->pWin==0 |
| 150734 | #endif |
| 150735 | ){ |
| 150736 | p->selFlags &= ~SF_Distinct; |
| 150737 | pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0); |
| 150738 | p->selFlags |= SF_Aggregate; |
| 150739 | /* Notice that even thought SF_Distinct has been cleared from p->selFlags, |
| 150740 | ** the sDistinct.isTnct is still set. Hence, isTnct represents the |
| 150741 | ** original setting of the SF_Distinct flag, not the current setting */ |
| 150742 | assert( sDistinct.isTnct ); |
| @@ -151195,16 +151226,22 @@ | |
| 151195 | if( groupBySort ){ |
| 151196 | sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx, |
| 151197 | sortOut, sortPTab); |
| 151198 | } |
| 151199 | for(j=0; j<pGroupBy->nExpr; j++){ |
| 151200 | if( groupBySort ){ |
| 151201 | sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j); |
| 151202 | }else{ |
| 151203 | pAggInfo->directMode = 1; |
| 151204 | sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j); |
| 151205 | } |
| 151206 | } |
| 151207 | sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr, |
| 151208 | (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO); |
| 151209 | addr1 = sqlite3VdbeCurrentAddr(v); |
| 151210 | sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v); |
| @@ -151216,13 +151253,13 @@ | |
| 151216 | ** This code copies current group by terms in b0,b1,b2,... |
| 151217 | ** over to a0,a1,a2. It then calls the output subroutine |
| 151218 | ** and resets the aggregate accumulator registers in preparation |
| 151219 | ** for the next GROUP BY batch. |
| 151220 | */ |
| 151221 | sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr); |
| 151222 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| 151223 | VdbeComment((v, "output one row")); |
| 151224 | sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd); VdbeCoverage(v); |
| 151225 | VdbeComment((v, "check abort flag")); |
| 151226 | sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset); |
| 151227 | VdbeComment((v, "reset accumulator")); |
| 151228 | |
| @@ -156939,10 +156976,12 @@ | |
| 156939 | u16 nLTerm; /* Number of entries in aLTerm[] */ |
| 156940 | u16 nSkip; /* Number of NULL aLTerm[] entries */ |
| 156941 | /**** whereLoopXfer() copies fields above ***********************/ |
| 156942 | # define WHERE_LOOP_XFER_SZ offsetof(WhereLoop,nLSlot) |
| 156943 | u16 nLSlot; /* Number of slots allocated for aLTerm[] */ |
| 156944 | WhereTerm **aLTerm; /* WhereTerms used */ |
| 156945 | WhereLoop *pNextLoop; /* Next WhereLoop object in the WhereClause */ |
| 156946 | WhereTerm *aLTermSpace[3]; /* Initial aLTerm[] space */ |
| 156947 | }; |
| 156948 | |
| @@ -157261,10 +157300,11 @@ | |
| 157261 | u8 eDistinct; /* One of the WHERE_DISTINCT_* values */ |
| 157262 | unsigned bDeferredSeek :1; /* Uses OP_DeferredSeek */ |
| 157263 | unsigned untestedTerms :1; /* Not all WHERE terms resolved by outer loop */ |
| 157264 | unsigned bOrderedInnerLoop:1;/* True if only the inner-most loop is ordered */ |
| 157265 | unsigned sorted :1; /* True if really sorted (not just grouped) */ |
| 157266 | LogEst nRowOut; /* Estimated number of output rows */ |
| 157267 | int iTop; /* The very beginning of the WHERE loop */ |
| 157268 | int iEndWhere; /* End of the WHERE clause itself */ |
| 157269 | WhereLoop *pLoops; /* List of all WhereLoop objects */ |
| 157270 | WhereMemBlock *pMemToFree;/* Memory to free when this object destroyed */ |
| @@ -157860,10 +157900,43 @@ | |
| 157860 | zAff[i] = SQLITE_AFF_BLOB; |
| 157861 | } |
| 157862 | } |
| 157863 | } |
| 157864 | |
| 157865 | |
| 157866 | /* |
| 157867 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 157868 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 157869 | ** LHS. But not all terms in the vector are indexable and the terms might |
| @@ -157923,10 +157996,11 @@ | |
| 157923 | assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 ); |
| 157924 | iField = pLoop->aLTerm[i]->u.x.iField - 1; |
| 157925 | if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */ |
| 157926 | pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr); |
| 157927 | pOrigRhs->a[iField].pExpr = 0; |
| 157928 | if( pOrigLhs ){ |
| 157929 | assert( pOrigLhs->a[iField].pExpr!=0 ); |
| 157930 | pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr); |
| 157931 | pOrigLhs->a[iField].pExpr = 0; |
| 157932 | } |
| @@ -157945,22 +158019,20 @@ | |
| 157945 | Expr *p = pLhs->a[0].pExpr; |
| 157946 | pLhs->a[0].pExpr = 0; |
| 157947 | sqlite3ExprDelete(db, pNew->pLeft); |
| 157948 | pNew->pLeft = p; |
| 157949 | } |
| 157950 | if( pSelect->pOrderBy ){ |
| 157951 | /* If the SELECT statement has an ORDER BY clause, zero the |
| 157952 | ** iOrderByCol variables. These are set to non-zero when an |
| 157953 | ** ORDER BY term exactly matches one of the terms of the |
| 157954 | ** result-set. Since the result-set of the SELECT statement may |
| 157955 | ** have been modified or reordered, these variables are no longer |
| 157956 | ** set correctly. Since setting them is just an optimization, |
| 157957 | ** it's easiest just to zero them here. */ |
| 157958 | ExprList *pOrderBy = pSelect->pOrderBy; |
| 157959 | for(i=0; i<pOrderBy->nExpr; i++){ |
| 157960 | pOrderBy->a[i].u.x.iOrderByCol = 0; |
| 157961 | } |
| 157962 | } |
| 157963 | |
| 157964 | #if 0 |
| 157965 | printf("For indexing, change the IN expr:\n"); |
| 157966 | sqlite3TreeViewExpr(0, pX, 0); |
| @@ -162946,10 +163018,44 @@ | |
| 162946 | return 0; |
| 162947 | } |
| 162948 | return 1; |
| 162949 | } |
| 162950 | |
| 162951 | |
| 162952 | |
| 162953 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| 162954 | /* |
| 162955 | ** Return TRUE if the WHERE clause term pTerm is of a form where it |
| @@ -162960,10 +163066,12 @@ | |
| 162960 | const WhereTerm *pTerm, /* WHERE clause term to check */ |
| 162961 | const SrcItem *pSrc, /* Table we are trying to access */ |
| 162962 | const Bitmask notReady /* Tables in outer loops of the join */ |
| 162963 | ){ |
| 162964 | char aff; |
| 162965 | if( pTerm->leftCursor!=pSrc->iCursor ) return 0; |
| 162966 | if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0; |
| 162967 | assert( (pSrc->fg.jointype & JT_RIGHT)==0 ); |
| 162968 | if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0 |
| 162969 | && !constraintCompatibleWithOuterJoin(pTerm,pSrc) |
| @@ -162970,15 +163078,16 @@ | |
| 162970 | ){ |
| 162971 | return 0; /* See https://sqlite.org/forum/forumpost/51e6959f61 */ |
| 162972 | } |
| 162973 | if( (pTerm->prereqRight & notReady)!=0 ) return 0; |
| 162974 | assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 ); |
| 162975 | if( pTerm->u.x.leftColumn<0 ) return 0; |
| 162976 | aff = pSrc->pTab->aCol[pTerm->u.x.leftColumn].affinity; |
| 162977 | if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0; |
| 162978 | testcase( pTerm->pExpr->op==TK_IS ); |
| 162979 | return 1; |
| 162980 | } |
| 162981 | #endif |
| 162982 | |
| 162983 | |
| 162984 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| @@ -165276,11 +165385,11 @@ | |
| 165276 | assert( saved_nEq==pNew->u.btree.nEq ); |
| 165277 | if( iCol==XN_ROWID |
| 165278 | || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1) |
| 165279 | ){ |
| 165280 | if( iCol==XN_ROWID || pProbe->uniqNotNull |
| 165281 | || (pProbe->nKeyCol==1 && pProbe->onError && eOp==WO_EQ) |
| 165282 | ){ |
| 165283 | pNew->wsFlags |= WHERE_ONEROW; |
| 165284 | }else{ |
| 165285 | pNew->wsFlags |= WHERE_UNQ_WANTED; |
| 165286 | } |
| @@ -167312,10 +167421,87 @@ | |
| 167312 | if( nRow>10 ){ nRow -= 10; assert( 10==sqlite3LogEst(2) ); } |
| 167313 | } |
| 167314 | rSortCost += estLog(nRow); |
| 167315 | return rSortCost; |
| 167316 | } |
| 167317 | |
| 167318 | /* |
| 167319 | ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine |
| 167320 | ** attempts to find the lowest cost path that visits each WhereLoop |
| 167321 | ** once. This path is then loaded into the pWInfo->a[].pWLoop fields. |
| @@ -167348,17 +167534,29 @@ | |
| 167348 | char *pSpace; /* Temporary memory used by this routine */ |
| 167349 | int nSpace; /* Bytes of space allocated at pSpace */ |
| 167350 | |
| 167351 | pParse = pWInfo->pParse; |
| 167352 | nLoop = pWInfo->nLevel; |
| 167353 | /* TUNING: For simple queries, only the best path is tracked. |
| 167354 | ** For 2-way joins, the 5 best paths are followed. |
| 167355 | ** For joins of 3 or more tables, track the 10 best paths */ |
| 167356 | mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 10); |
| 167357 | assert( nLoop<=pWInfo->pTabList->nSrc ); |
| 167358 | WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n", |
| 167359 | nRowEst, pParse->nQueryLoop)); |
| 167360 | |
| 167361 | /* If nRowEst is zero and there is an ORDER BY clause, ignore it. In this |
| 167362 | ** case the purpose of this call is to estimate the number of rows returned |
| 167363 | ** by the overall query. Once this estimate has been obtained, the caller |
| 167364 | ** will invoke this function a second time, passing the estimate as the |
| @@ -167437,11 +167635,14 @@ | |
| 167437 | continue; |
| 167438 | } |
| 167439 | |
| 167440 | /* At this point, pWLoop is a candidate to be the next loop. |
| 167441 | ** Compute its cost */ |
| 167442 | rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup,pWLoop->rRun + pFrom->nRow); |
| 167443 | rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted); |
| 167444 | nOut = pFrom->nRow + pWLoop->nOut; |
| 167445 | maskNew = pFrom->maskLoop | pWLoop->maskSelf; |
| 167446 | isOrdered = pFrom->isOrdered; |
| 167447 | if( isOrdered<0 ){ |
| @@ -167482,10 +167683,11 @@ | |
| 167482 | ** |
| 167483 | ** The term "((pTo->isOrdered^isOrdered)&0x80)==0" is equivalent |
| 167484 | ** to (pTo->isOrdered==(-1))==(isOrdered==(-1))" for the range |
| 167485 | ** of legal values for isOrdered, -1..64. |
| 167486 | */ |
| 167487 | for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){ |
| 167488 | if( pTo->maskLoop==maskNew |
| 167489 | && ((pTo->isOrdered^isOrdered)&0x80)==0 |
| 167490 | ){ |
| 167491 | testcase( jj==nTo-1 ); |
| @@ -167598,20 +167800,32 @@ | |
| 167598 | } |
| 167599 | } |
| 167600 | |
| 167601 | #ifdef WHERETRACE_ENABLED /* >=2 */ |
| 167602 | if( sqlite3WhereTrace & 0x02 ){ |
| 167603 | sqlite3DebugPrintf("---- after round %d ----\n", iLoop); |
| 167604 | for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ |
| 167605 | sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c", |
| 167606 | wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, |
| 167607 | pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?'); |
| 167608 | if( pTo->isOrdered>0 ){ |
| 167609 | sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop); |
| 167610 | }else{ |
| 167611 | sqlite3DebugPrintf("\n"); |
| 167612 | } |
| 167613 | } |
| 167614 | } |
| 167615 | #endif |
| 167616 | |
| 167617 | /* Swap the roles of aFrom and aTo for the next generation */ |
| @@ -167702,11 +167916,11 @@ | |
| 167702 | pWInfo->revMask = revMask; |
| 167703 | } |
| 167704 | } |
| 167705 | } |
| 167706 | |
| 167707 | pWInfo->nRowOut = pFrom->nRow; |
| 167708 | |
| 167709 | /* Free temporary memory and return success */ |
| 167710 | sqlite3StackFreeNN(pParse->db, pSpace); |
| 167711 | return SQLITE_OK; |
| 167712 | } |
| @@ -168092,10 +168306,11 @@ | |
| 168092 | pLoop->cId, (double)sqlite3LogEstToInt(nSearch), pTab->zName, |
| 168093 | (double)sqlite3LogEstToInt(pTab->nRowLogEst))); |
| 168094 | } |
| 168095 | } |
| 168096 | nSearch += pLoop->nOut; |
| 168097 | } |
| 168098 | } |
| 168099 | |
| 168100 | /* |
| 168101 | ** Expression Node callback for sqlite3ExprCanReturnSubtype(). |
| @@ -168607,11 +168822,11 @@ | |
| 168607 | |
| 168608 | wherePathSolver(pWInfo, 0); |
| 168609 | if( db->mallocFailed ) goto whereBeginError; |
| 168610 | if( pWInfo->pOrderBy ){ |
| 168611 | whereInterstageHeuristic(pWInfo); |
| 168612 | wherePathSolver(pWInfo, pWInfo->nRowOut+1); |
| 168613 | if( db->mallocFailed ) goto whereBeginError; |
| 168614 | } |
| 168615 | |
| 168616 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 168617 | ** the output size by a factor of 8 (LogEst -30). |
| @@ -173084,227 +173299,229 @@ | |
| 173084 | ** yy_reduce_ofst[] For each state, the offset into yy_action for |
| 173085 | ** shifting non-terminals after a reduce. |
| 173086 | ** yy_default[] Default action for each state. |
| 173087 | ** |
| 173088 | *********** Begin parsing tables **********************************************/ |
| 173089 | #define YY_ACTTAB_COUNT (2142) |
| 173090 | static const YYACTIONTYPE yy_action[] = { |
| 173091 | /* 0 */ 576, 128, 125, 232, 1622, 549, 576, 1290, 1281, 576, |
| 173092 | /* 10 */ 328, 576, 1300, 212, 576, 128, 125, 232, 578, 412, |
| 173093 | /* 20 */ 578, 391, 1542, 51, 51, 523, 405, 1293, 529, 51, |
| 173094 | /* 30 */ 51, 983, 51, 51, 81, 81, 1107, 61, 61, 984, |
| 173095 | /* 40 */ 1107, 1292, 380, 135, 136, 90, 1228, 1228, 1063, 1066, |
| 173096 | /* 50 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 1577, 412, |
| 173097 | /* 60 */ 287, 287, 7, 287, 287, 422, 1050, 1050, 1064, 1067, |
| 173098 | /* 70 */ 289, 556, 492, 573, 524, 561, 573, 497, 561, 482, |
| 173099 | /* 80 */ 530, 262, 229, 135, 136, 90, 1228, 1228, 1063, 1066, |
| 173100 | /* 90 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 128, 125, |
| 173101 | /* 100 */ 232, 1506, 132, 132, 132, 132, 131, 131, 130, 130, |
| 173102 | /* 110 */ 130, 129, 126, 450, 1204, 1255, 1, 1, 582, 2, |
| 173103 | /* 120 */ 1259, 1571, 420, 1582, 379, 320, 1174, 153, 1174, 1584, |
| 173104 | /* 130 */ 412, 378, 1582, 543, 1341, 330, 111, 570, 570, 570, |
| 173105 | /* 140 */ 293, 1054, 132, 132, 132, 132, 131, 131, 130, 130, |
| 173106 | /* 150 */ 130, 129, 126, 450, 135, 136, 90, 1228, 1228, 1063, |
| 173107 | /* 160 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 287, |
| 173108 | /* 170 */ 287, 1204, 1205, 1204, 255, 287, 287, 510, 507, 506, |
| 173109 | /* 180 */ 137, 455, 573, 212, 561, 447, 446, 505, 573, 1616, |
| 173110 | /* 190 */ 561, 134, 134, 134, 134, 127, 400, 243, 132, 132, |
| 173111 | /* 200 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450, |
| 173112 | /* 210 */ 282, 471, 345, 132, 132, 132, 132, 131, 131, 130, |
| 173113 | /* 220 */ 130, 130, 129, 126, 450, 574, 155, 936, 936, 454, |
| 173114 | /* 230 */ 227, 521, 1236, 412, 1236, 134, 134, 134, 134, 132, |
| 173115 | /* 240 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126, |
| 173116 | /* 250 */ 450, 130, 130, 130, 129, 126, 450, 135, 136, 90, |
| 173117 | /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, |
| 173118 | /* 270 */ 134, 134, 128, 125, 232, 450, 576, 412, 397, 1249, |
| 173119 | /* 280 */ 180, 92, 93, 132, 132, 132, 132, 131, 131, 130, |
| 173120 | /* 290 */ 130, 130, 129, 126, 450, 381, 387, 1204, 383, 81, |
| 173121 | /* 300 */ 81, 135, 136, 90, 1228, 1228, 1063, 1066, 1053, 1053, |
| 173122 | /* 310 */ 133, 133, 134, 134, 134, 134, 132, 132, 132, 132, |
| 173123 | /* 320 */ 131, 131, 130, 130, 130, 129, 126, 450, 131, 131, |
| 173124 | /* 330 */ 130, 130, 130, 129, 126, 450, 556, 1204, 302, 319, |
| 173125 | /* 340 */ 567, 121, 568, 480, 4, 555, 1149, 1657, 1628, 1657, |
| 173126 | /* 350 */ 45, 128, 125, 232, 1204, 1205, 1204, 1250, 571, 1169, |
| 173127 | /* 360 */ 132, 132, 132, 132, 131, 131, 130, 130, 130, 129, |
| 173128 | /* 370 */ 126, 450, 1169, 287, 287, 1169, 1019, 576, 422, 1019, |
| 173129 | /* 380 */ 412, 451, 1602, 582, 2, 1259, 573, 44, 561, 95, |
| 173130 | /* 390 */ 320, 110, 153, 565, 1204, 1205, 1204, 522, 522, 1341, |
| 173131 | /* 400 */ 81, 81, 7, 44, 135, 136, 90, 1228, 1228, 1063, |
| 173132 | /* 410 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 295, |
| 173133 | /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 319, 567, 119, 119, |
| 173134 | /* 430 */ 343, 466, 331, 343, 287, 287, 120, 556, 451, 577, |
| 173135 | /* 440 */ 451, 1169, 1169, 1028, 319, 567, 438, 573, 210, 561, |
| 173136 | /* 450 */ 1339, 1451, 546, 531, 1169, 1169, 1598, 1169, 1169, 416, |
| 173137 | /* 460 */ 319, 567, 243, 132, 132, 132, 132, 131, 131, 130, |
| 173138 | /* 470 */ 130, 130, 129, 126, 450, 1028, 1028, 1030, 1031, 35, |
| 173139 | /* 480 */ 44, 1204, 1205, 1204, 472, 287, 287, 1328, 412, 1307, |
| 173140 | /* 490 */ 372, 1595, 359, 225, 454, 1204, 195, 1328, 573, 1147, |
| 173141 | /* 500 */ 561, 1333, 1333, 274, 576, 1188, 576, 340, 46, 196, |
| 173142 | /* 510 */ 537, 217, 135, 136, 90, 1228, 1228, 1063, 1066, 1053, |
| 173143 | /* 520 */ 1053, 133, 133, 134, 134, 134, 134, 19, 19, 19, |
| 173144 | /* 530 */ 19, 412, 581, 1204, 1259, 511, 1204, 319, 567, 320, |
| 173145 | /* 540 */ 944, 153, 425, 491, 430, 943, 1204, 488, 1341, 1450, |
| 173146 | /* 550 */ 532, 1277, 1204, 1205, 1204, 135, 136, 90, 1228, 1228, |
| 173147 | /* 560 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, |
| 173148 | /* 570 */ 575, 132, 132, 132, 132, 131, 131, 130, 130, 130, |
| 173149 | /* 580 */ 129, 126, 450, 287, 287, 528, 287, 287, 372, 1595, |
| 173150 | /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 486, 561, 573, |
| 173151 | /* 600 */ 889, 561, 412, 1204, 1205, 1204, 886, 40, 22, 22, |
| 173152 | /* 610 */ 220, 243, 525, 1449, 132, 132, 132, 132, 131, 131, |
| 173153 | /* 620 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, |
| 173154 | /* 630 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173155 | /* 640 */ 134, 412, 180, 454, 1204, 879, 255, 287, 287, 510, |
| 173156 | /* 650 */ 507, 506, 372, 1595, 1568, 1331, 1331, 576, 889, 505, |
| 173157 | /* 660 */ 573, 44, 561, 559, 1207, 135, 136, 90, 1228, 1228, |
| 173158 | /* 670 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, |
| 173159 | /* 680 */ 81, 81, 422, 576, 377, 132, 132, 132, 132, 131, |
| 173160 | /* 690 */ 131, 130, 130, 130, 129, 126, 450, 297, 287, 287, |
| 173161 | /* 700 */ 460, 1204, 1205, 1204, 1204, 534, 19, 19, 448, 448, |
| 173162 | /* 710 */ 448, 573, 412, 561, 230, 436, 1187, 535, 319, 567, |
| 173163 | /* 720 */ 363, 432, 1207, 1435, 132, 132, 132, 132, 131, 131, |
| 173164 | /* 730 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, |
| 173165 | /* 740 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173166 | /* 750 */ 134, 412, 211, 949, 1169, 1041, 1110, 1110, 494, 547, |
| 173167 | /* 760 */ 547, 1204, 1205, 1204, 7, 539, 1570, 1169, 376, 576, |
| 173168 | /* 770 */ 1169, 5, 1204, 486, 3, 135, 136, 90, 1228, 1228, |
| 173169 | /* 780 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, |
| 173170 | /* 790 */ 576, 513, 19, 19, 427, 132, 132, 132, 132, 131, |
| 173171 | /* 800 */ 131, 130, 130, 130, 129, 126, 450, 305, 1204, 433, |
| 173172 | /* 810 */ 225, 1204, 385, 19, 19, 273, 290, 371, 516, 366, |
| 173173 | /* 820 */ 515, 260, 412, 538, 1568, 549, 1024, 362, 437, 1204, |
| 173174 | /* 830 */ 1205, 1204, 902, 1552, 132, 132, 132, 132, 131, 131, |
| 173175 | /* 840 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, |
| 173176 | /* 850 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173177 | /* 860 */ 134, 412, 1435, 514, 1281, 1204, 1205, 1204, 1204, 1205, |
| 173178 | /* 870 */ 1204, 903, 48, 342, 1568, 1568, 1279, 1627, 1568, 911, |
| 173179 | /* 880 */ 576, 129, 126, 450, 110, 135, 136, 90, 1228, 1228, |
| 173180 | /* 890 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, |
| 173181 | /* 900 */ 265, 576, 459, 19, 19, 132, 132, 132, 132, 131, |
| 173182 | /* 910 */ 131, 130, 130, 130, 129, 126, 450, 1345, 204, 576, |
| 173183 | /* 920 */ 459, 458, 50, 47, 19, 19, 49, 434, 1105, 573, |
| 173184 | /* 930 */ 497, 561, 412, 428, 108, 1224, 1569, 1554, 376, 205, |
| 173185 | /* 940 */ 550, 550, 81, 81, 132, 132, 132, 132, 131, 131, |
| 173186 | /* 950 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228, |
| 173187 | /* 960 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173188 | /* 970 */ 134, 480, 576, 1204, 576, 1541, 412, 1435, 969, 315, |
| 173189 | /* 980 */ 1659, 398, 284, 497, 969, 893, 1569, 1569, 376, 376, |
| 173190 | /* 990 */ 1569, 461, 376, 1224, 459, 80, 80, 81, 81, 497, |
| 173191 | /* 1000 */ 374, 114, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133, |
| 173192 | /* 1010 */ 133, 134, 134, 134, 134, 132, 132, 132, 132, 131, |
| 173193 | /* 1020 */ 131, 130, 130, 130, 129, 126, 450, 1204, 1505, 576, |
| 173194 | /* 1030 */ 1204, 1205, 1204, 1366, 316, 486, 281, 281, 497, 431, |
| 173195 | /* 1040 */ 557, 288, 288, 402, 1340, 471, 345, 298, 429, 573, |
| 173196 | /* 1050 */ 576, 561, 81, 81, 573, 374, 561, 971, 386, 132, |
| 173197 | /* 1060 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126, |
| 173198 | /* 1070 */ 450, 231, 117, 81, 81, 287, 287, 231, 287, 287, |
| 173199 | /* 1080 */ 576, 1511, 576, 1336, 1204, 1205, 1204, 139, 573, 556, |
| 173200 | /* 1090 */ 561, 573, 412, 561, 441, 456, 969, 213, 558, 1511, |
| 173201 | /* 1100 */ 1513, 1550, 969, 143, 143, 145, 145, 1368, 314, 478, |
| 173202 | /* 1110 */ 444, 970, 412, 850, 851, 852, 135, 136, 90, 1228, |
| 173203 | /* 1120 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173204 | /* 1130 */ 134, 357, 412, 397, 1148, 304, 135, 136, 90, 1228, |
| 173205 | /* 1140 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173206 | /* 1150 */ 134, 1575, 323, 6, 862, 7, 135, 124, 90, 1228, |
| 173207 | /* 1160 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, |
| 173208 | /* 1170 */ 134, 409, 408, 1511, 212, 132, 132, 132, 132, 131, |
| 173209 | /* 1180 */ 131, 130, 130, 130, 129, 126, 450, 411, 118, 1204, |
| 173210 | /* 1190 */ 116, 10, 352, 265, 355, 132, 132, 132, 132, 131, |
| 173211 | /* 1200 */ 131, 130, 130, 130, 129, 126, 450, 576, 324, 306, |
| 173212 | /* 1210 */ 576, 306, 1250, 469, 158, 132, 132, 132, 132, 131, |
| 173213 | /* 1220 */ 131, 130, 130, 130, 129, 126, 450, 207, 1224, 1126, |
| 173214 | /* 1230 */ 65, 65, 470, 66, 66, 412, 447, 446, 882, 531, |
| 173215 | /* 1240 */ 335, 258, 257, 256, 1127, 1233, 1204, 1205, 1204, 327, |
| 173216 | /* 1250 */ 1235, 874, 159, 576, 16, 480, 1085, 1040, 1234, 1128, |
| 173217 | /* 1260 */ 136, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133, 133, |
| 173218 | /* 1270 */ 134, 134, 134, 134, 1029, 576, 81, 81, 1028, 1040, |
| 173219 | /* 1280 */ 922, 576, 463, 1236, 576, 1236, 1224, 502, 107, 1435, |
| 173220 | /* 1290 */ 923, 6, 576, 410, 1498, 882, 1029, 480, 21, 21, |
| 173221 | /* 1300 */ 1028, 332, 1380, 334, 53, 53, 497, 81, 81, 874, |
| 173222 | /* 1310 */ 1028, 1028, 1030, 445, 259, 19, 19, 533, 132, 132, |
| 173223 | /* 1320 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450, |
| 173224 | /* 1330 */ 551, 301, 1028, 1028, 1030, 107, 532, 545, 121, 568, |
| 173225 | /* 1340 */ 1188, 4, 1126, 1576, 449, 576, 462, 7, 1282, 418, |
| 173226 | /* 1350 */ 462, 350, 1435, 576, 518, 571, 544, 1127, 121, 568, |
| 173227 | /* 1360 */ 442, 4, 1188, 464, 533, 1180, 1223, 9, 67, 67, |
| 173228 | /* 1370 */ 487, 576, 1128, 303, 410, 571, 54, 54, 451, 576, |
| 173229 | /* 1380 */ 123, 944, 576, 417, 576, 333, 943, 1379, 576, 236, |
| 173230 | /* 1390 */ 565, 576, 1574, 564, 68, 68, 7, 576, 451, 362, |
| 173231 | /* 1400 */ 419, 182, 69, 69, 541, 70, 70, 71, 71, 540, |
| 173232 | /* 1410 */ 565, 72, 72, 484, 55, 55, 473, 1180, 296, 1040, |
| 173233 | /* 1420 */ 56, 56, 296, 493, 541, 119, 119, 410, 1573, 542, |
| 173234 | /* 1430 */ 569, 418, 7, 120, 1244, 451, 577, 451, 465, 1040, |
| 173235 | /* 1440 */ 1028, 576, 1557, 552, 476, 119, 119, 527, 259, 121, |
| 173236 | /* 1450 */ 568, 240, 4, 120, 576, 451, 577, 451, 576, 477, |
| 173237 | /* 1460 */ 1028, 576, 156, 576, 57, 57, 571, 576, 286, 229, |
| 173238 | /* 1470 */ 410, 336, 1028, 1028, 1030, 1031, 35, 59, 59, 219, |
| 173239 | /* 1480 */ 983, 60, 60, 220, 73, 73, 74, 74, 984, 451, |
| 173240 | /* 1490 */ 75, 75, 1028, 1028, 1030, 1031, 35, 96, 216, 291, |
| 173241 | /* 1500 */ 552, 565, 1188, 318, 395, 395, 394, 276, 392, 576, |
| 173242 | /* 1510 */ 485, 859, 474, 1311, 410, 541, 576, 417, 1530, 1144, |
| 173243 | /* 1520 */ 540, 399, 1188, 292, 237, 1153, 326, 38, 23, 576, |
| 173244 | /* 1530 */ 1040, 576, 20, 20, 325, 299, 119, 119, 164, 76, |
| 173245 | /* 1540 */ 76, 1529, 121, 568, 120, 4, 451, 577, 451, 203, |
| 173246 | /* 1550 */ 576, 1028, 141, 141, 142, 142, 576, 322, 39, 571, |
| 173247 | /* 1560 */ 341, 1021, 110, 264, 239, 901, 900, 423, 242, 908, |
| 173248 | /* 1570 */ 909, 370, 173, 77, 77, 43, 479, 1310, 264, 62, |
| 173249 | /* 1580 */ 62, 369, 451, 1028, 1028, 1030, 1031, 35, 1601, 1192, |
| 173250 | /* 1590 */ 453, 1092, 238, 291, 565, 163, 1309, 110, 395, 395, |
| 173251 | /* 1600 */ 394, 276, 392, 986, 987, 859, 481, 346, 264, 110, |
| 173252 | /* 1610 */ 1032, 489, 576, 1188, 503, 1088, 261, 261, 237, 576, |
| 173253 | /* 1620 */ 326, 121, 568, 1040, 4, 347, 1376, 413, 325, 119, |
| 173254 | /* 1630 */ 119, 948, 319, 567, 351, 78, 78, 120, 571, 451, |
| 173255 | /* 1640 */ 577, 451, 79, 79, 1028, 354, 356, 576, 360, 1092, |
| 173256 | /* 1650 */ 110, 576, 974, 942, 264, 123, 457, 358, 239, 576, |
| 173257 | /* 1660 */ 519, 451, 939, 1104, 123, 1104, 173, 576, 1032, 43, |
| 173258 | /* 1670 */ 63, 63, 1324, 565, 168, 168, 1028, 1028, 1030, 1031, |
| 173259 | /* 1680 */ 35, 576, 169, 169, 1308, 872, 238, 157, 1589, 576, |
| 173260 | /* 1690 */ 86, 86, 365, 89, 568, 375, 4, 1103, 941, 1103, |
| 173261 | /* 1700 */ 123, 576, 1040, 1389, 64, 64, 1188, 1434, 119, 119, |
| 173262 | /* 1710 */ 571, 576, 82, 82, 563, 576, 120, 165, 451, 577, |
| 173263 | /* 1720 */ 451, 413, 1362, 1028, 144, 144, 319, 567, 576, 1374, |
| 173264 | /* 1730 */ 562, 498, 279, 451, 83, 83, 1439, 576, 166, 166, |
| 173265 | /* 1740 */ 576, 1289, 554, 576, 1280, 565, 576, 12, 576, 1268, |
| 173266 | /* 1750 */ 457, 146, 146, 1267, 576, 1028, 1028, 1030, 1031, 35, |
| 173267 | /* 1760 */ 140, 140, 1269, 167, 167, 1609, 160, 160, 1359, 150, |
| 173268 | /* 1770 */ 150, 149, 149, 311, 1040, 576, 312, 147, 147, 313, |
| 173269 | /* 1780 */ 119, 119, 222, 235, 576, 1188, 396, 576, 120, 576, |
| 173270 | /* 1790 */ 451, 577, 451, 1192, 453, 1028, 508, 291, 148, 148, |
| 173271 | /* 1800 */ 1421, 1612, 395, 395, 394, 276, 392, 85, 85, 859, |
| 173272 | /* 1810 */ 87, 87, 84, 84, 553, 576, 294, 576, 1426, 338, |
| 173273 | /* 1820 */ 339, 1425, 237, 300, 326, 1416, 1409, 1028, 1028, 1030, |
| 173274 | /* 1830 */ 1031, 35, 325, 344, 403, 483, 226, 1307, 52, 52, |
| 173275 | /* 1840 */ 58, 58, 368, 1371, 1502, 566, 1501, 121, 568, 221, |
| 173276 | /* 1850 */ 4, 208, 268, 209, 390, 1244, 1549, 1188, 1372, 1370, |
| 173277 | /* 1860 */ 1369, 1547, 239, 184, 571, 233, 421, 1241, 95, 218, |
| 173278 | /* 1870 */ 173, 1507, 193, 43, 91, 94, 178, 186, 467, 188, |
| 173279 | /* 1880 */ 468, 1422, 13, 189, 190, 191, 501, 451, 245, 108, |
| 173280 | /* 1890 */ 238, 401, 1428, 1427, 1430, 475, 404, 1496, 197, 565, |
| 173281 | /* 1900 */ 14, 490, 249, 101, 1518, 496, 349, 280, 251, 201, |
| 173282 | /* 1910 */ 353, 499, 252, 406, 1270, 253, 517, 1327, 1326, 435, |
| 173283 | /* 1920 */ 1325, 1318, 103, 893, 1296, 413, 227, 407, 1040, 1626, |
| 173284 | /* 1930 */ 319, 567, 1625, 1297, 119, 119, 439, 367, 1317, 1295, |
| 173285 | /* 1940 */ 1624, 526, 120, 440, 451, 577, 451, 1594, 309, 1028, |
| 173286 | /* 1950 */ 310, 373, 266, 267, 457, 1580, 1579, 443, 138, 1394, |
| 173287 | /* 1960 */ 552, 1393, 11, 1483, 384, 115, 317, 1350, 109, 536, |
| 173288 | /* 1970 */ 42, 579, 382, 214, 1349, 388, 1198, 389, 275, 277, |
| 173289 | /* 1980 */ 278, 1028, 1028, 1030, 1031, 35, 580, 1265, 414, 1260, |
| 173290 | /* 1990 */ 170, 415, 183, 1534, 1535, 1533, 171, 154, 307, 1532, |
| 173291 | /* 2000 */ 846, 223, 224, 88, 452, 215, 172, 321, 234, 1102, |
| 173292 | /* 2010 */ 152, 1188, 1100, 329, 185, 174, 1223, 925, 187, 241, |
| 173293 | /* 2020 */ 337, 244, 1116, 192, 175, 176, 424, 426, 97, 194, |
| 173294 | /* 2030 */ 98, 99, 100, 177, 1119, 1115, 246, 247, 161, 24, |
| 173295 | /* 2040 */ 248, 348, 1238, 264, 1108, 250, 495, 199, 198, 15, |
| 173296 | /* 2050 */ 861, 500, 369, 254, 504, 509, 512, 200, 102, 25, |
| 173297 | /* 2060 */ 179, 361, 26, 364, 104, 891, 308, 162, 105, 904, |
| 173298 | /* 2070 */ 520, 106, 1185, 1069, 1155, 17, 228, 27, 1154, 283, |
| 173299 | /* 2080 */ 285, 263, 978, 202, 972, 123, 28, 1175, 29, 30, |
| 173300 | /* 2090 */ 1179, 1171, 31, 1173, 1160, 41, 32, 206, 548, 33, |
| 173301 | /* 2100 */ 110, 1178, 1083, 8, 112, 1070, 113, 1068, 1072, 34, |
| 173302 | /* 2110 */ 1073, 560, 1125, 269, 1124, 270, 36, 18, 1194, 1033, |
| 173303 | /* 2120 */ 873, 151, 122, 37, 393, 271, 272, 572, 181, 1193, |
| 173304 | /* 2130 */ 1256, 1256, 1256, 935, 1256, 1256, 1256, 1256, 1256, 1256, |
| 173305 | /* 2140 */ 1256, 1617, |
| 173306 | }; |
| 173307 | static const YYCODETYPE yy_lookahead[] = { |
| 173308 | /* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194, |
| 173309 | /* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19, |
| 173310 | /* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217, |
| @@ -173369,161 +173586,161 @@ | |
| 173369 | /* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107, |
| 173370 | /* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173371 | /* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173372 | /* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122, |
| 173373 | /* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132, |
| 173374 | /* 660 */ 253, 81, 255, 205, 59, 43, 44, 45, 46, 47, |
| 173375 | /* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173376 | /* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106, |
| 173377 | /* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241, |
| 173378 | /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 211, 212, |
| 173379 | /* 710 */ 213, 253, 19, 255, 194, 19, 23, 254, 138, 139, |
| 173380 | /* 720 */ 24, 232, 117, 194, 102, 103, 104, 105, 106, 107, |
| 173381 | /* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173382 | /* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173383 | /* 750 */ 57, 19, 264, 108, 76, 23, 127, 128, 129, 311, |
| 173384 | /* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194, |
| 173385 | /* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47, |
| 173386 | /* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173387 | /* 790 */ 194, 95, 217, 218, 265, 102, 103, 104, 105, 106, |
| 173388 | /* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113, |
| 173389 | /* 810 */ 25, 59, 194, 217, 218, 119, 120, 121, 122, 123, |
| 173390 | /* 820 */ 124, 125, 19, 145, 194, 194, 23, 131, 232, 116, |
| 173391 | /* 830 */ 117, 118, 35, 194, 102, 103, 104, 105, 106, 107, |
| 173392 | /* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173393 | /* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173394 | /* 860 */ 57, 19, 194, 66, 194, 116, 117, 118, 116, 117, |
| 173395 | /* 870 */ 118, 74, 242, 294, 194, 194, 206, 23, 194, 25, |
| 173396 | /* 880 */ 194, 111, 112, 113, 25, 43, 44, 45, 46, 47, |
| 173397 | /* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173398 | /* 900 */ 24, 194, 194, 217, 218, 102, 103, 104, 105, 106, |
| 173399 | /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 194, |
| 173400 | /* 920 */ 212, 213, 242, 242, 217, 218, 242, 130, 11, 253, |
| 173401 | /* 930 */ 194, 255, 19, 265, 149, 59, 306, 194, 308, 232, |
| 173402 | /* 940 */ 309, 310, 217, 218, 102, 103, 104, 105, 106, 107, |
| 173403 | /* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173404 | /* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173405 | /* 970 */ 57, 194, 194, 59, 194, 239, 19, 194, 25, 254, |
| 173406 | /* 980 */ 303, 304, 23, 194, 25, 126, 306, 306, 308, 308, |
| 173407 | /* 990 */ 306, 271, 308, 117, 286, 217, 218, 217, 218, 194, |
| 173408 | /* 1000 */ 194, 159, 45, 46, 47, 48, 49, 50, 51, 52, |
| 173409 | /* 1010 */ 53, 54, 55, 56, 57, 102, 103, 104, 105, 106, |
| 173410 | /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 59, 239, 194, |
| 173411 | /* 1030 */ 116, 117, 118, 260, 254, 194, 240, 241, 194, 233, |
| 173412 | /* 1040 */ 205, 240, 241, 205, 239, 128, 129, 270, 265, 253, |
| 173413 | /* 1050 */ 194, 255, 217, 218, 253, 194, 255, 143, 280, 102, |
| 173414 | /* 1060 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, |
| 173415 | /* 1070 */ 113, 118, 159, 217, 218, 240, 241, 118, 240, 241, |
| 173416 | /* 1080 */ 194, 194, 194, 239, 116, 117, 118, 22, 253, 254, |
| 173417 | /* 1090 */ 255, 253, 19, 255, 233, 194, 143, 24, 263, 212, |
| 173418 | /* 1100 */ 213, 194, 143, 217, 218, 217, 218, 261, 262, 271, |
| 173419 | /* 1110 */ 254, 143, 19, 7, 8, 9, 43, 44, 45, 46, |
| 173420 | /* 1120 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173421 | /* 1130 */ 57, 16, 19, 22, 23, 294, 43, 44, 45, 46, |
| 173422 | /* 1140 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173423 | /* 1150 */ 57, 312, 194, 214, 21, 316, 43, 44, 45, 46, |
| 173424 | /* 1160 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173425 | /* 1170 */ 57, 106, 107, 286, 194, 102, 103, 104, 105, 106, |
| 173426 | /* 1180 */ 107, 108, 109, 110, 111, 112, 113, 207, 158, 59, |
| 173427 | /* 1190 */ 160, 22, 77, 24, 79, 102, 103, 104, 105, 106, |
| 173428 | /* 1200 */ 107, 108, 109, 110, 111, 112, 113, 194, 194, 229, |
| 173429 | /* 1210 */ 194, 231, 101, 80, 22, 102, 103, 104, 105, 106, |
| 173430 | /* 1220 */ 107, 108, 109, 110, 111, 112, 113, 288, 59, 12, |
| 173431 | /* 1230 */ 217, 218, 293, 217, 218, 19, 106, 107, 59, 19, |
| 173432 | /* 1240 */ 16, 127, 128, 129, 27, 115, 116, 117, 118, 194, |
| 173433 | /* 1250 */ 120, 59, 22, 194, 24, 194, 123, 100, 128, 42, |
| 173434 | /* 1260 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 173435 | /* 1270 */ 54, 55, 56, 57, 117, 194, 217, 218, 121, 100, |
| 173436 | /* 1280 */ 63, 194, 245, 153, 194, 155, 117, 19, 115, 194, |
| 173437 | /* 1290 */ 73, 214, 194, 256, 161, 116, 117, 194, 217, 218, |
| 173438 | /* 1300 */ 121, 77, 194, 79, 217, 218, 194, 217, 218, 117, |
| 173439 | /* 1310 */ 153, 154, 155, 254, 46, 217, 218, 144, 102, 103, |
| 173440 | /* 1320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, |
| 173441 | /* 1330 */ 232, 270, 153, 154, 155, 115, 116, 66, 19, 20, |
| 173442 | /* 1340 */ 183, 22, 12, 312, 254, 194, 262, 316, 209, 210, |
| 173443 | /* 1350 */ 266, 239, 194, 194, 108, 36, 85, 27, 19, 20, |
| 173444 | /* 1360 */ 265, 22, 183, 245, 144, 94, 25, 48, 217, 218, |
| 173445 | /* 1370 */ 293, 194, 42, 270, 256, 36, 217, 218, 59, 194, |
| 173446 | /* 1380 */ 25, 135, 194, 115, 194, 161, 140, 194, 194, 15, |
| 173447 | /* 1390 */ 71, 194, 312, 63, 217, 218, 316, 194, 59, 131, |
| 173448 | /* 1400 */ 301, 302, 217, 218, 85, 217, 218, 217, 218, 90, |
| 173449 | /* 1410 */ 71, 217, 218, 19, 217, 218, 245, 146, 262, 100, |
| 173450 | /* 1420 */ 217, 218, 266, 265, 85, 106, 107, 256, 312, 90, |
| 173451 | /* 1430 */ 209, 210, 316, 114, 60, 116, 117, 118, 194, 100, |
| 173452 | /* 1440 */ 121, 194, 194, 145, 115, 106, 107, 19, 46, 19, |
| 173453 | /* 1450 */ 20, 24, 22, 114, 194, 116, 117, 118, 194, 245, |
| 173454 | /* 1460 */ 121, 194, 164, 194, 217, 218, 36, 194, 258, 259, |
| 173455 | /* 1470 */ 256, 194, 153, 154, 155, 156, 157, 217, 218, 150, |
| 173456 | /* 1480 */ 31, 217, 218, 142, 217, 218, 217, 218, 39, 59, |
| 173457 | /* 1490 */ 217, 218, 153, 154, 155, 156, 157, 149, 150, 5, |
| 173458 | /* 1500 */ 145, 71, 183, 245, 10, 11, 12, 13, 14, 194, |
| 173459 | /* 1510 */ 116, 17, 129, 227, 256, 85, 194, 115, 194, 23, |
| 173460 | /* 1520 */ 90, 25, 183, 99, 30, 97, 32, 22, 22, 194, |
| 173461 | /* 1530 */ 100, 194, 217, 218, 40, 152, 106, 107, 23, 217, |
| 173462 | /* 1540 */ 218, 194, 19, 20, 114, 22, 116, 117, 118, 257, |
| 173463 | /* 1550 */ 194, 121, 217, 218, 217, 218, 194, 133, 53, 36, |
| 173464 | /* 1560 */ 23, 23, 25, 25, 70, 120, 121, 61, 141, 7, |
| 173465 | /* 1570 */ 8, 121, 78, 217, 218, 81, 23, 227, 25, 217, |
| 173466 | /* 1580 */ 218, 131, 59, 153, 154, 155, 156, 157, 0, 1, |
| 173467 | /* 1590 */ 2, 59, 98, 5, 71, 23, 227, 25, 10, 11, |
| 173468 | /* 1600 */ 12, 13, 14, 83, 84, 17, 23, 23, 25, 25, |
| 173469 | /* 1610 */ 59, 194, 194, 183, 23, 23, 25, 25, 30, 194, |
| 173470 | /* 1620 */ 32, 19, 20, 100, 22, 194, 194, 133, 40, 106, |
| 173471 | /* 1630 */ 107, 108, 138, 139, 194, 217, 218, 114, 36, 116, |
| 173472 | /* 1640 */ 117, 118, 217, 218, 121, 194, 194, 194, 23, 117, |
| 173473 | /* 1650 */ 25, 194, 23, 23, 25, 25, 162, 194, 70, 194, |
| 173474 | /* 1660 */ 145, 59, 23, 153, 25, 155, 78, 194, 117, 81, |
| 173475 | /* 1670 */ 217, 218, 194, 71, 217, 218, 153, 154, 155, 156, |
| 173476 | /* 1680 */ 157, 194, 217, 218, 194, 23, 98, 25, 321, 194, |
| 173477 | /* 1690 */ 217, 218, 194, 19, 20, 194, 22, 153, 23, 155, |
| 173478 | /* 1700 */ 25, 194, 100, 194, 217, 218, 183, 194, 106, 107, |
| 173479 | /* 1710 */ 36, 194, 217, 218, 237, 194, 114, 243, 116, 117, |
| 173480 | /* 1720 */ 118, 133, 194, 121, 217, 218, 138, 139, 194, 194, |
| 173481 | /* 1730 */ 194, 290, 289, 59, 217, 218, 194, 194, 217, 218, |
| 173482 | /* 1740 */ 194, 194, 140, 194, 194, 71, 194, 244, 194, 194, |
| 173483 | /* 1750 */ 162, 217, 218, 194, 194, 153, 154, 155, 156, 157, |
| 173484 | /* 1760 */ 217, 218, 194, 217, 218, 194, 217, 218, 257, 217, |
| 173485 | /* 1770 */ 218, 217, 218, 257, 100, 194, 257, 217, 218, 257, |
| 173486 | /* 1780 */ 106, 107, 215, 299, 194, 183, 192, 194, 114, 194, |
| 173487 | /* 1790 */ 116, 117, 118, 1, 2, 121, 221, 5, 217, 218, |
| 173488 | /* 1800 */ 273, 197, 10, 11, 12, 13, 14, 217, 218, 17, |
| 173489 | /* 1810 */ 217, 218, 217, 218, 140, 194, 246, 194, 273, 295, |
| 173490 | /* 1820 */ 247, 273, 30, 247, 32, 269, 269, 153, 154, 155, |
| 173491 | /* 1830 */ 156, 157, 40, 246, 273, 295, 230, 226, 217, 218, |
| 173492 | /* 1840 */ 217, 218, 220, 261, 220, 282, 220, 19, 20, 244, |
| 173493 | /* 1850 */ 22, 250, 141, 250, 246, 60, 201, 183, 261, 261, |
| 173494 | /* 1860 */ 261, 201, 70, 299, 36, 299, 201, 38, 151, 150, |
| 173495 | /* 1870 */ 78, 285, 22, 81, 296, 296, 43, 235, 18, 238, |
| 173496 | /* 1880 */ 201, 274, 272, 238, 238, 238, 18, 59, 200, 149, |
| 173497 | /* 1890 */ 98, 247, 274, 274, 235, 247, 247, 247, 235, 71, |
| 173498 | /* 1900 */ 272, 201, 200, 158, 292, 62, 291, 201, 200, 22, |
| 173499 | /* 1910 */ 201, 222, 200, 222, 201, 200, 115, 219, 219, 64, |
| 173500 | /* 1920 */ 219, 228, 22, 126, 221, 133, 165, 222, 100, 225, |
| 173501 | /* 1930 */ 138, 139, 225, 219, 106, 107, 24, 219, 228, 219, |
| 173502 | /* 1940 */ 219, 307, 114, 113, 116, 117, 118, 315, 284, 121, |
| 173503 | /* 1950 */ 284, 222, 201, 91, 162, 320, 320, 82, 148, 267, |
| 173504 | /* 1960 */ 145, 267, 22, 279, 201, 158, 281, 251, 147, 146, |
| 173505 | /* 1970 */ 25, 203, 250, 249, 251, 248, 13, 247, 195, 195, |
| 173506 | /* 1980 */ 6, 153, 154, 155, 156, 157, 193, 193, 305, 193, |
| 173507 | /* 1990 */ 208, 305, 302, 214, 214, 214, 208, 223, 223, 214, |
| 173508 | /* 2000 */ 4, 215, 215, 214, 3, 22, 208, 163, 15, 23, |
| 173509 | /* 2010 */ 16, 183, 23, 139, 151, 130, 25, 20, 142, 24, |
| 173510 | /* 2020 */ 16, 144, 1, 142, 130, 130, 61, 37, 53, 151, |
| 173511 | /* 2030 */ 53, 53, 53, 130, 116, 1, 34, 141, 5, 22, |
| 173512 | /* 2040 */ 115, 161, 75, 25, 68, 141, 41, 115, 68, 24, |
| 173513 | /* 2050 */ 20, 19, 131, 125, 67, 67, 96, 22, 22, 22, |
| 173514 | /* 2060 */ 37, 23, 22, 24, 22, 59, 67, 23, 149, 28, |
| 173515 | /* 2070 */ 22, 25, 23, 23, 23, 22, 141, 34, 97, 23, |
| 173516 | /* 2080 */ 23, 34, 116, 22, 143, 25, 34, 75, 34, 34, |
| 173517 | /* 2090 */ 75, 88, 34, 86, 23, 22, 34, 25, 24, 34, |
| 173518 | /* 2100 */ 25, 93, 23, 44, 142, 23, 142, 23, 23, 22, |
| 173519 | /* 2110 */ 11, 25, 23, 25, 23, 22, 22, 22, 1, 23, |
| 173520 | /* 2120 */ 23, 23, 22, 22, 15, 141, 141, 25, 25, 1, |
| 173521 | /* 2130 */ 322, 322, 322, 135, 322, 322, 322, 322, 322, 322, |
| 173522 | /* 2140 */ 322, 141, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173523 | /* 2150 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173524 | /* 2160 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173525 | /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173526 | /* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173527 | /* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173528 | /* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173529 | /* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| @@ -173535,181 +173752,184 @@ | |
| 173535 | /* 2270 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173536 | /* 2280 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173537 | /* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173538 | /* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173539 | /* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173540 | /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, |
| 173541 | }; |
| 173542 | #define YY_SHIFT_COUNT (582) |
| 173543 | #define YY_SHIFT_MIN (0) |
| 173544 | #define YY_SHIFT_MAX (2128) |
| 173545 | static const unsigned short int yy_shift_ofst[] = { |
| 173546 | /* 0 */ 1792, 1588, 1494, 322, 322, 399, 306, 1319, 1339, 1430, |
| 173547 | /* 10 */ 1828, 1828, 1828, 580, 399, 399, 399, 399, 399, 0, |
| 173548 | /* 20 */ 0, 214, 1093, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173549 | /* 30 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1130, 1130, |
| 173550 | /* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201, |
| 173551 | /* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693, |
| 173552 | /* 60 */ 732, 803, 842, 913, 1073, 1093, 1093, 1093, 1093, 1093, |
| 173553 | /* 70 */ 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, |
| 173554 | /* 80 */ 1093, 1093, 1093, 1113, 1093, 1216, 957, 957, 1523, 1602, |
| 173555 | /* 90 */ 1674, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173556 | /* 100 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173557 | /* 110 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173558 | /* 120 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173559 | /* 130 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, |
| 173560 | /* 140 */ 137, 181, 181, 181, 181, 181, 181, 181, 96, 222, |
| 173561 | /* 150 */ 143, 477, 713, 1133, 1268, 713, 713, 79, 79, 713, |
| 173562 | /* 160 */ 770, 83, 65, 65, 65, 288, 162, 162, 2142, 2142, |
| 173563 | /* 170 */ 696, 696, 696, 238, 474, 474, 474, 474, 1217, 1217, |
| 173564 | /* 180 */ 678, 477, 324, 398, 713, 713, 713, 713, 713, 713, |
| 173565 | /* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
| 173566 | /* 200 */ 713, 713, 713, 1220, 366, 366, 713, 917, 283, 283, |
| 173567 | /* 210 */ 434, 434, 605, 605, 1298, 2142, 2142, 2142, 2142, 2142, |
| 173568 | /* 220 */ 2142, 2142, 1179, 1157, 1157, 487, 527, 585, 645, 749, |
| 173569 | /* 230 */ 914, 968, 752, 713, 713, 713, 713, 713, 713, 713, |
| 173570 | /* 240 */ 713, 713, 713, 303, 713, 713, 713, 713, 713, 713, |
| 173571 | /* 250 */ 713, 713, 713, 713, 713, 713, 797, 797, 797, 713, |
| 173572 | /* 260 */ 713, 713, 959, 713, 713, 713, 1169, 1271, 713, 713, |
| 173573 | /* 270 */ 1330, 713, 713, 713, 713, 713, 713, 713, 713, 629, |
| 173574 | /* 280 */ 7, 91, 876, 876, 876, 876, 953, 91, 91, 1246, |
| 173575 | /* 290 */ 1065, 1106, 1374, 1329, 1348, 468, 1348, 1394, 785, 1329, |
| 173576 | /* 300 */ 1329, 785, 1329, 468, 1394, 859, 854, 1402, 1449, 1449, |
| 173577 | /* 310 */ 1449, 1173, 1173, 1173, 1173, 1355, 1355, 1030, 1341, 405, |
| 173578 | /* 320 */ 1230, 1795, 1795, 1711, 1711, 1829, 1829, 1711, 1717, 1719, |
| 173579 | /* 330 */ 1850, 1833, 1860, 1860, 1860, 1860, 1711, 1868, 1740, 1719, |
| 173580 | /* 340 */ 1719, 1740, 1850, 1833, 1740, 1833, 1740, 1711, 1868, 1745, |
| 173581 | /* 350 */ 1843, 1711, 1868, 1887, 1711, 1868, 1711, 1868, 1887, 1801, |
| 173582 | /* 360 */ 1801, 1801, 1855, 1900, 1900, 1887, 1801, 1797, 1801, 1855, |
| 173583 | /* 370 */ 1801, 1801, 1761, 1912, 1830, 1830, 1887, 1711, 1862, 1862, |
| 173584 | /* 380 */ 1875, 1875, 1810, 1815, 1940, 1711, 1807, 1810, 1821, 1823, |
| 173585 | /* 390 */ 1740, 1945, 1963, 1963, 1974, 1974, 1974, 2142, 2142, 2142, |
| 173586 | /* 400 */ 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, |
| 173587 | /* 410 */ 2142, 2142, 20, 1224, 256, 1111, 1115, 1114, 1192, 1496, |
| 173588 | /* 420 */ 1424, 1505, 1427, 355, 1383, 1537, 1506, 1538, 1553, 1583, |
| 173589 | /* 430 */ 1584, 1591, 1625, 541, 1445, 1562, 1450, 1572, 1515, 1428, |
| 173590 | /* 440 */ 1532, 1592, 1629, 1520, 1630, 1639, 1510, 1544, 1662, 1675, |
| 173591 | /* 450 */ 1551, 48, 1996, 2001, 1983, 1844, 1993, 1994, 1986, 1989, |
| 173592 | /* 460 */ 1874, 1863, 1885, 1991, 1991, 1995, 1876, 1997, 1877, 2004, |
| 173593 | /* 470 */ 2021, 1881, 1894, 1991, 1895, 1965, 1990, 1991, 1878, 1975, |
| 173594 | /* 480 */ 1977, 1978, 1979, 1903, 1918, 2002, 1896, 2034, 2033, 2017, |
| 173595 | /* 490 */ 1925, 1880, 1976, 2018, 1980, 1967, 2005, 1904, 1932, 2025, |
| 173596 | /* 500 */ 2030, 2032, 1921, 1928, 2035, 1987, 2036, 2037, 2038, 2040, |
| 173597 | /* 510 */ 1988, 2006, 2039, 1960, 2041, 2042, 1999, 2023, 2044, 2043, |
| 173598 | /* 520 */ 1919, 2048, 2049, 2050, 2046, 2051, 2053, 1981, 1935, 2056, |
| 173599 | /* 530 */ 2057, 1966, 2047, 2061, 1941, 2060, 2052, 2054, 2055, 2058, |
| 173600 | /* 540 */ 2003, 2012, 2007, 2059, 2015, 2008, 2062, 2071, 2073, 2074, |
| 173601 | /* 550 */ 2072, 2075, 2065, 1962, 1964, 2079, 2060, 2082, 2084, 2085, |
| 173602 | /* 560 */ 2087, 2086, 2089, 2088, 2091, 2093, 2099, 2094, 2095, 2096, |
| 173603 | /* 570 */ 2097, 2100, 2101, 2102, 1998, 1984, 1985, 2000, 2103, 2098, |
| 173604 | /* 580 */ 2109, 2117, 2128, |
| 173605 | }; |
| 173606 | #define YY_REDUCE_COUNT (411) |
| 173607 | #define YY_REDUCE_MIN (-275) |
| 173608 | #define YY_REDUCE_MAX (1798) |
| 173609 | static const short yy_reduce_ofst[] = { |
| 173610 | /* 0 */ -71, 194, 343, 835, -180, -177, 838, -194, -188, -185, |
| 173611 | /* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178, |
| 173612 | /* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686, |
| 173613 | /* 30 */ 707, 725, 780, 1098, 856, 778, 1059, 1090, 708, 887, |
| 173614 | /* 40 */ 86, 448, 980, 630, 680, 681, 684, 796, 801, 796, |
| 173615 | /* 50 */ 801, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173616 | /* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173617 | /* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173618 | /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, 391, 886, |
| 173619 | /* 90 */ 888, 1013, 1016, 1081, 1087, 1151, 1159, 1177, 1185, 1188, |
| 173620 | /* 100 */ 1190, 1194, 1197, 1203, 1247, 1260, 1264, 1267, 1269, 1273, |
| 173621 | /* 110 */ 1315, 1322, 1335, 1337, 1356, 1362, 1418, 1425, 1453, 1457, |
| 173622 | /* 120 */ 1465, 1473, 1487, 1495, 1507, 1517, 1521, 1534, 1543, 1546, |
| 173623 | /* 130 */ 1549, 1552, 1554, 1560, 1581, 1590, 1593, 1595, 1621, 1623, |
| 173624 | /* 140 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173625 | /* 150 */ -261, -186, -117, 260, 263, 460, 631, -74, 497, -181, |
| 173626 | /* 160 */ -261, 939, 176, 274, 338, 676, -261, -261, -261, -261, |
| 173627 | /* 170 */ -212, -212, -212, -184, 149, 777, 1061, 1103, 265, 419, |
| 173628 | /* 180 */ -254, 670, 677, 677, -11, -129, 184, 488, 736, 789, |
| 173629 | /* 190 */ 805, 844, 403, 529, 579, 668, 783, 841, 1158, 1112, |
| 173630 | /* 200 */ 806, 861, 1095, 846, 839, 1031, -189, 1077, 1080, 1116, |
| 173631 | /* 210 */ 1084, 1156, 1139, 1221, 46, 1099, 1037, 1118, 1171, 1214, |
| 173632 | /* 220 */ 1210, 1258, -210, -190, -176, -115, 117, 262, 376, 490, |
| 173633 | /* 230 */ 511, 520, 618, 639, 743, 901, 907, 958, 1014, 1055, |
| 173634 | /* 240 */ 1108, 1193, 1244, 720, 1248, 1277, 1324, 1347, 1417, 1431, |
| 173635 | /* 250 */ 1432, 1440, 1451, 1452, 1463, 1478, 1286, 1350, 1369, 1490, |
| 173636 | /* 260 */ 1498, 1501, 773, 1509, 1513, 1528, 1292, 1367, 1535, 1536, |
| 173637 | /* 270 */ 1477, 1542, 376, 1547, 1550, 1555, 1559, 1568, 1571, 1441, |
| 173638 | /* 280 */ 1443, 1474, 1511, 1516, 1519, 1522, 773, 1474, 1474, 1503, |
| 173639 | /* 290 */ 1567, 1594, 1484, 1527, 1556, 1570, 1557, 1524, 1573, 1545, |
| 173640 | /* 300 */ 1548, 1576, 1561, 1587, 1540, 1575, 1606, 1611, 1622, 1624, |
| 173641 | /* 310 */ 1626, 1582, 1597, 1598, 1599, 1601, 1603, 1563, 1608, 1605, |
| 173642 | /* 320 */ 1604, 1564, 1566, 1655, 1660, 1578, 1579, 1665, 1586, 1607, |
| 173643 | /* 330 */ 1610, 1642, 1641, 1645, 1646, 1647, 1679, 1688, 1644, 1618, |
| 173644 | /* 340 */ 1619, 1648, 1628, 1659, 1649, 1663, 1650, 1700, 1702, 1612, |
| 173645 | /* 350 */ 1615, 1706, 1708, 1689, 1709, 1712, 1713, 1715, 1691, 1698, |
| 173646 | /* 360 */ 1699, 1701, 1693, 1704, 1707, 1705, 1714, 1703, 1718, 1710, |
| 173647 | /* 370 */ 1720, 1721, 1632, 1634, 1664, 1666, 1729, 1751, 1635, 1636, |
| 173648 | /* 380 */ 1692, 1694, 1716, 1722, 1684, 1763, 1685, 1723, 1724, 1727, |
| 173649 | /* 390 */ 1730, 1768, 1783, 1784, 1793, 1794, 1796, 1683, 1686, 1690, |
| 173650 | /* 400 */ 1782, 1779, 1780, 1781, 1785, 1788, 1774, 1775, 1786, 1787, |
| 173651 | /* 410 */ 1789, 1798, |
| 173652 | }; |
| 173653 | static const YYACTIONTYPE yy_default[] = { |
| 173654 | /* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254, |
| 173655 | /* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397, |
| 173656 | /* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173657 | /* 30 */ 1254, 1254, 1254, 1254, 1254, 1490, 1254, 1254, 1254, 1254, |
| 173658 | /* 40 */ 1578, 1578, 1254, 1254, 1254, 1254, 1254, 1563, 1562, 1254, |
| 173659 | /* 50 */ 1254, 1254, 1406, 1254, 1413, 1254, 1254, 1254, 1254, 1254, |
| 173660 | /* 60 */ 1492, 1493, 1254, 1254, 1254, 1543, 1545, 1508, 1420, 1419, |
| 173661 | /* 70 */ 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488, 1486, |
| 173662 | /* 80 */ 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254, 1254, |
| 173663 | /* 90 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173664 | /* 100 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173665 | /* 110 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173666 | /* 120 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173667 | /* 130 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173668 | /* 140 */ 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457, 1456, 1458, |
| 173669 | /* 150 */ 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254, 1254, 1254, |
| 173670 | /* 160 */ 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461, 1473, 1472, |
| 173671 | /* 170 */ 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173672 | /* 180 */ 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173673 | /* 190 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173674 | /* 200 */ 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287, 1578, 1578, |
| 173675 | /* 210 */ 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358, 1358, 1358, |
| 173676 | /* 220 */ 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173677 | /* 230 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548, 1546, 1254, |
| 173678 | /* 240 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173679 | /* 250 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173680 | /* 260 */ 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254, 1254, 1254, |
| 173681 | /* 270 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608, 1254, |
| 173682 | /* 280 */ 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342, 1357, |
| 173683 | /* 290 */ 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410, 1423, |
| 173684 | /* 300 */ 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397, 1397, |
| 173685 | /* 310 */ 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364, 1357, |
| 173686 | /* 320 */ 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509, 1638, |
| 173687 | /* 330 */ 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410, 1638, |
| 173688 | /* 340 */ 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272, 1525, |
| 173689 | /* 350 */ 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499, 1330, |
| 173690 | /* 360 */ 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330, 1319, |
| 173691 | /* 370 */ 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588, 1588, |
| 173692 | /* 380 */ 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403, 1401, |
| 173693 | /* 390 */ 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660, 1558, |
| 173694 | /* 400 */ 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288, 1288, |
| 173695 | /* 410 */ 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618, 1254, |
| 173696 | /* 420 */ 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173697 | /* 430 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1564, |
| 173698 | /* 440 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173699 | /* 450 */ 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254, 1254, |
| 173700 | /* 460 */ 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254, 1254, |
| 173701 | /* 470 */ 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254, 1254, |
| 173702 | /* 480 */ 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254, 1254, |
| 173703 | /* 490 */ 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254, 1254, |
| 173704 | /* 500 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173705 | /* 510 */ 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173706 | /* 520 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173707 | /* 530 */ 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254, 1254, |
| 173708 | /* 540 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173709 | /* 550 */ 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254, 1254, |
| 173710 | /* 560 */ 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173711 | /* 570 */ 1254, 1254, 1254, 1634, 1346, 1438, 1254, 1441, 1276, 1254, |
| 173712 | /* 580 */ 1266, 1254, 1254, |
| 173713 | }; |
| 173714 | /********** End of lemon-generated parsing tables *****************************/ |
| 173715 | |
| @@ -174605,11 +174825,11 @@ | |
| 174605 | /* 275 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", |
| 174606 | /* 276 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", |
| 174607 | /* 277 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", |
| 174608 | /* 278 */ "trigger_cmd ::= scanpt select scanpt", |
| 174609 | /* 279 */ "expr ::= RAISE LP IGNORE RP", |
| 174610 | /* 280 */ "expr ::= RAISE LP raisetype COMMA nm RP", |
| 174611 | /* 281 */ "raisetype ::= ROLLBACK", |
| 174612 | /* 282 */ "raisetype ::= ABORT", |
| 174613 | /* 283 */ "raisetype ::= FAIL", |
| 174614 | /* 284 */ "cmd ::= DROP TRIGGER ifexists fullname", |
| 174615 | /* 285 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", |
| @@ -175530,11 +175750,11 @@ | |
| 175530 | 293, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 175531 | 293, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 175532 | 293, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 175533 | 293, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 175534 | 218, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 175535 | 218, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */ |
| 175536 | 237, /* (281) raisetype ::= ROLLBACK */ |
| 175537 | 237, /* (282) raisetype ::= ABORT */ |
| 175538 | 237, /* (283) raisetype ::= FAIL */ |
| 175539 | 191, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 175540 | 191, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -175944,11 +176164,11 @@ | |
| 175944 | -9, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 175945 | -8, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 175946 | -6, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 175947 | -3, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 175948 | -4, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 175949 | -6, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */ |
| 175950 | -1, /* (281) raisetype ::= ROLLBACK */ |
| 175951 | -1, /* (282) raisetype ::= ABORT */ |
| 175952 | -1, /* (283) raisetype ::= FAIL */ |
| 175953 | -4, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 175954 | -6, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -177329,13 +177549,13 @@ | |
| 177329 | if( yymsp[-3].minor.yy454 ){ |
| 177330 | yymsp[-3].minor.yy454->affExpr = OE_Ignore; |
| 177331 | } |
| 177332 | } |
| 177333 | break; |
| 177334 | case 280: /* expr ::= RAISE LP raisetype COMMA nm RP */ |
| 177335 | { |
| 177336 | yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); |
| 177337 | if( yymsp[-5].minor.yy454 ) { |
| 177338 | yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144; |
| 177339 | } |
| 177340 | } |
| 177341 | break; |
| @@ -208717,14 +208937,20 @@ | |
| 208717 | ** convenience. |
| 208718 | ** |
| 208719 | ** NUMBER ==> $[NUMBER] // PG compatible |
| 208720 | ** LABEL ==> $.LABEL // PG compatible |
| 208721 | ** [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience |
| 208722 | */ |
| 208723 | jsonStringInit(&jx, ctx); |
| 208724 | if( sqlite3_value_type(argv[i])==SQLITE_INTEGER ){ |
| 208725 | jsonAppendRawNZ(&jx, "[", 1); |
| 208726 | jsonAppendRaw(&jx, zPath, nPath); |
| 208727 | jsonAppendRawNZ(&jx, "]", 2); |
| 208728 | }else if( jsonAllAlphanum(zPath, nPath) ){ |
| 208729 | jsonAppendRawNZ(&jx, ".", 1); |
| 208730 | jsonAppendRaw(&jx, zPath, nPath); |
| @@ -232196,10 +232422,19 @@ | |
| 232196 | ** Interface to code in fts5_config.c. fts5_config.c contains contains code |
| 232197 | ** to parse the arguments passed to the CREATE VIRTUAL TABLE statement. |
| 232198 | */ |
| 232199 | |
| 232200 | typedef struct Fts5Config Fts5Config; |
| 232201 | |
| 232202 | /* |
| 232203 | ** An instance of the following structure encodes all information that can |
| 232204 | ** be gleaned from the CREATE VIRTUAL TABLE statement. |
| 232205 | ** |
| @@ -232238,10 +232473,11 @@ | |
| 232238 | ** INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex); |
| 232239 | ** |
| 232240 | */ |
| 232241 | struct Fts5Config { |
| 232242 | sqlite3 *db; /* Database handle */ |
| 232243 | char *zDb; /* Database holding FTS index (e.g. "main") */ |
| 232244 | char *zName; /* Name of FTS index */ |
| 232245 | int nCol; /* Number of columns */ |
| 232246 | char **azCol; /* Column names */ |
| 232247 | u8 *abUnindexed; /* True for unindexed columns */ |
| @@ -232253,14 +232489,12 @@ | |
| 232253 | char *zContentRowid; /* "content_rowid=" option value */ |
| 232254 | int bColumnsize; /* "columnsize=" option value (dflt==1) */ |
| 232255 | int bTokendata; /* "tokendata=" option value (dflt==0) */ |
| 232256 | int eDetail; /* FTS5_DETAIL_XXX value */ |
| 232257 | char *zContentExprlist; |
| 232258 | Fts5Tokenizer *pTok; |
| 232259 | fts5_tokenizer *pTokApi; |
| 232260 | int bLock; /* True when table is preparing statement */ |
| 232261 | int ePattern; /* FTS_PATTERN_XXX constant */ |
| 232262 | |
| 232263 | /* Values loaded from the %_config table */ |
| 232264 | int iVersion; /* fts5 file format 'version' */ |
| 232265 | int iCookie; /* Incremented when %_config is modified */ |
| 232266 | int pgsz; /* Approximate page size used in %_data */ |
| @@ -232651,17 +232885,11 @@ | |
| 232651 | sqlite3_vtab base; /* Base class used by SQLite core */ |
| 232652 | Fts5Config *pConfig; /* Virtual table configuration */ |
| 232653 | Fts5Index *pIndex; /* Full-text index */ |
| 232654 | }; |
| 232655 | |
| 232656 | static int sqlite3Fts5GetTokenizer( |
| 232657 | Fts5Global*, |
| 232658 | const char **azArg, |
| 232659 | int nArg, |
| 232660 | Fts5Config*, |
| 232661 | char **pzErr |
| 232662 | ); |
| 232663 | |
| 232664 | static Fts5Table *sqlite3Fts5TableFromCsrid(Fts5Global*, i64); |
| 232665 | |
| 232666 | static int sqlite3Fts5FlushToDisk(Fts5Table*); |
| 232667 | |
| @@ -232920,10 +233148,11 @@ | |
| 232920 | static int sqlite3Fts5TokenizerInit(fts5_api*); |
| 232921 | static int sqlite3Fts5TokenizerPattern( |
| 232922 | int (*xCreate)(void*, const char**, int, Fts5Tokenizer**), |
| 232923 | Fts5Tokenizer *pTok |
| 232924 | ); |
| 232925 | /* |
| 232926 | ** End of interface to code in fts5_tokenizer.c. |
| 232927 | **************************************************************************/ |
| 232928 | |
| 232929 | /************************************************************************** |
| @@ -235871,11 +236100,10 @@ | |
| 235871 | ** an error occurs, an SQLite error code is returned and an error message |
| 235872 | ** may be left in *pzErr. It is the responsibility of the caller to |
| 235873 | ** eventually free any such error message using sqlite3_free(). |
| 235874 | */ |
| 235875 | static int fts5ConfigParseSpecial( |
| 235876 | Fts5Global *pGlobal, |
| 235877 | Fts5Config *pConfig, /* Configuration object to update */ |
| 235878 | const char *zCmd, /* Special command to parse */ |
| 235879 | const char *zArg, /* Argument to parse */ |
| 235880 | char **pzErr /* OUT: Error message */ |
| 235881 | ){ |
| @@ -235935,16 +236163,15 @@ | |
| 235935 | } |
| 235936 | |
| 235937 | if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){ |
| 235938 | const char *p = (const char*)zArg; |
| 235939 | sqlite3_int64 nArg = strlen(zArg) + 1; |
| 235940 | char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg); |
| 235941 | char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2); |
| 235942 | char *pSpace = pDel; |
| 235943 | |
| 235944 | if( azArg && pSpace ){ |
| 235945 | if( pConfig->pTok ){ |
| 235946 | *pzErr = sqlite3_mprintf("multiple tokenize=... directives"); |
| 235947 | rc = SQLITE_ERROR; |
| 235948 | }else{ |
| 235949 | for(nArg=0; p && *p; nArg++){ |
| 235950 | const char *p2 = fts5ConfigSkipWhitespace(p); |
| @@ -235963,20 +236190,18 @@ | |
| 235963 | } |
| 235964 | if( p==0 ){ |
| 235965 | *pzErr = sqlite3_mprintf("parse error in tokenize directive"); |
| 235966 | rc = SQLITE_ERROR; |
| 235967 | }else{ |
| 235968 | rc = sqlite3Fts5GetTokenizer(pGlobal, |
| 235969 | (const char**)azArg, (int)nArg, pConfig, |
| 235970 | pzErr |
| 235971 | ); |
| 235972 | } |
| 235973 | } |
| 235974 | } |
| 235975 | |
| 235976 | sqlite3_free(azArg); |
| 235977 | sqlite3_free(pDel); |
| 235978 | return rc; |
| 235979 | } |
| 235980 | |
| 235981 | if( sqlite3_strnicmp("content", zCmd, nCmd)==0 ){ |
| 235982 | if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){ |
| @@ -236049,20 +236274,10 @@ | |
| 236049 | |
| 236050 | *pzErr = sqlite3_mprintf("unrecognized option: \"%.*s\"", nCmd, zCmd); |
| 236051 | return SQLITE_ERROR; |
| 236052 | } |
| 236053 | |
| 236054 | /* |
| 236055 | ** Allocate an instance of the default tokenizer ("simple") at |
| 236056 | ** Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error |
| 236057 | ** code if an error occurs. |
| 236058 | */ |
| 236059 | static int fts5ConfigDefaultTokenizer(Fts5Global *pGlobal, Fts5Config *pConfig){ |
| 236060 | assert( pConfig->pTok==0 && pConfig->pTokApi==0 ); |
| 236061 | return sqlite3Fts5GetTokenizer(pGlobal, 0, 0, pConfig, 0); |
| 236062 | } |
| 236063 | |
| 236064 | /* |
| 236065 | ** Gobble up the first bareword or quoted word from the input buffer zIn. |
| 236066 | ** Return a pointer to the character immediately following the last in |
| 236067 | ** the gobbled word if successful, or a NULL pointer otherwise (failed |
| 236068 | ** to find close-quote character). |
| @@ -236191,10 +236406,11 @@ | |
| 236191 | sqlite3_int64 nByte; |
| 236192 | |
| 236193 | *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config)); |
| 236194 | if( pRet==0 ) return SQLITE_NOMEM; |
| 236195 | memset(pRet, 0, sizeof(Fts5Config)); |
| 236196 | pRet->db = db; |
| 236197 | pRet->iCookie = -1; |
| 236198 | |
| 236199 | nByte = nArg * (sizeof(char*) + sizeof(u8)); |
| 236200 | pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte); |
| @@ -236239,11 +236455,11 @@ | |
| 236239 | if( z==0 ){ |
| 236240 | *pzErr = sqlite3_mprintf("parse error in \"%s\"", zOrig); |
| 236241 | rc = SQLITE_ERROR; |
| 236242 | }else{ |
| 236243 | if( bOption ){ |
| 236244 | rc = fts5ConfigParseSpecial(pGlobal, pRet, |
| 236245 | ALWAYS(zOne)?zOne:"", |
| 236246 | zTwo?zTwo:"", |
| 236247 | pzErr |
| 236248 | ); |
| 236249 | }else{ |
| @@ -236277,17 +236493,10 @@ | |
| 236277 | "contentless_delete=1 is incompatible with columnsize=0" |
| 236278 | ); |
| 236279 | rc = SQLITE_ERROR; |
| 236280 | } |
| 236281 | |
| 236282 | /* If a tokenizer= option was successfully parsed, the tokenizer has |
| 236283 | ** already been allocated. Otherwise, allocate an instance of the default |
| 236284 | ** tokenizer (unicode61) now. */ |
| 236285 | if( rc==SQLITE_OK && pRet->pTok==0 ){ |
| 236286 | rc = fts5ConfigDefaultTokenizer(pGlobal, pRet); |
| 236287 | } |
| 236288 | |
| 236289 | /* If no zContent option was specified, fill in the default values. */ |
| 236290 | if( rc==SQLITE_OK && pRet->zContent==0 ){ |
| 236291 | const char *zTail = 0; |
| 236292 | assert( pRet->eContent==FTS5_CONTENT_NORMAL |
| 236293 | || pRet->eContent==FTS5_CONTENT_NONE |
| @@ -236325,13 +236534,14 @@ | |
| 236325 | ** Free the configuration object passed as the only argument. |
| 236326 | */ |
| 236327 | static void sqlite3Fts5ConfigFree(Fts5Config *pConfig){ |
| 236328 | if( pConfig ){ |
| 236329 | int i; |
| 236330 | if( pConfig->pTok ){ |
| 236331 | pConfig->pTokApi->xDelete(pConfig->pTok); |
| 236332 | } |
| 236333 | sqlite3_free(pConfig->zDb); |
| 236334 | sqlite3_free(pConfig->zName); |
| 236335 | for(i=0; i<pConfig->nCol; i++){ |
| 236336 | sqlite3_free(pConfig->azCol[i]); |
| 236337 | } |
| @@ -236402,14 +236612,22 @@ | |
| 236402 | int flags, /* FTS5_TOKENIZE_* flags */ |
| 236403 | const char *pText, int nText, /* Text to tokenize */ |
| 236404 | void *pCtx, /* Context passed to xToken() */ |
| 236405 | int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 236406 | ){ |
| 236407 | if( pText==0 ) return SQLITE_OK; |
| 236408 | return pConfig->pTokApi->xTokenize( |
| 236409 | pConfig->pTok, pCtx, flags, pText, nText, xToken |
| 236410 | ); |
| 236411 | } |
| 236412 | |
| 236413 | /* |
| 236414 | ** Argument pIn points to the first character in what is expected to be |
| 236415 | ** a comma-separated list of SQL literals followed by a ')' character. |
| @@ -237002,11 +237220,15 @@ | |
| 237002 | }else{ |
| 237003 | sqlite3Fts5ParseNodeFree(sParse.pExpr); |
| 237004 | } |
| 237005 | |
| 237006 | sqlite3_free(sParse.apPhrase); |
| 237007 | *pzErr = sParse.zErr; |
| 237008 | return sParse.rc; |
| 237009 | } |
| 237010 | |
| 237011 | /* |
| 237012 | ** Assuming that buffer z is at least nByte bytes in size and contains a |
| @@ -249974,12 +250196,16 @@ | |
| 249974 | if( rc==SQLITE_OK ){ |
| 249975 | rc = sqlite3Fts5ConfigParse(pGlobal, db, argc, azConfig, &pConfig, pzErr); |
| 249976 | assert( (rc==SQLITE_OK && *pzErr==0) || pConfig==0 ); |
| 249977 | } |
| 249978 | if( rc==SQLITE_OK ){ |
| 249979 | pTab->p.pConfig = pConfig; |
| 249980 | pTab->pGlobal = pGlobal; |
| 249981 | } |
| 249982 | |
| 249983 | /* Open the index sub-system */ |
| 249984 | if( rc==SQLITE_OK ){ |
| 249985 | rc = sqlite3Fts5IndexOpen(pConfig, bCreate, &pTab->p.pIndex, pzErr); |
| @@ -249997,24 +250223,22 @@ | |
| 249997 | rc = sqlite3Fts5ConfigDeclareVtab(pConfig); |
| 249998 | } |
| 249999 | |
| 250000 | /* Load the initial configuration */ |
| 250001 | if( rc==SQLITE_OK ){ |
| 250002 | assert( pConfig->pzErrmsg==0 ); |
| 250003 | pConfig->pzErrmsg = pzErr; |
| 250004 | rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex); |
| 250005 | sqlite3Fts5IndexRollback(pTab->p.pIndex); |
| 250006 | pConfig->pzErrmsg = 0; |
| 250007 | } |
| 250008 | |
| 250009 | if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){ |
| 250010 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, (int)1); |
| 250011 | } |
| 250012 | if( rc==SQLITE_OK ){ |
| 250013 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS); |
| 250014 | } |
| 250015 | |
| 250016 | if( rc!=SQLITE_OK ){ |
| 250017 | fts5FreeVtab(pTab); |
| 250018 | pTab = 0; |
| 250019 | }else if( bCreate ){ |
| 250020 | fts5CheckTransactionState(pTab, FTS5_BEGIN, 0); |
| @@ -250078,14 +250302,14 @@ | |
| 250078 | Fts5Config *pConfig, |
| 250079 | struct sqlite3_index_constraint *p |
| 250080 | ){ |
| 250081 | assert( FTS5_PATTERN_GLOB==SQLITE_INDEX_CONSTRAINT_GLOB ); |
| 250082 | assert( FTS5_PATTERN_LIKE==SQLITE_INDEX_CONSTRAINT_LIKE ); |
| 250083 | if( pConfig->ePattern==FTS5_PATTERN_GLOB && p->op==FTS5_PATTERN_GLOB ){ |
| 250084 | return 1; |
| 250085 | } |
| 250086 | if( pConfig->ePattern==FTS5_PATTERN_LIKE |
| 250087 | && (p->op==FTS5_PATTERN_LIKE || p->op==FTS5_PATTERN_GLOB) |
| 250088 | ){ |
| 250089 | return 1; |
| 250090 | } |
| 250091 | return 0; |
| @@ -250223,10 +250447,11 @@ | |
| 250223 | idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G'; |
| 250224 | sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol); |
| 250225 | idxStr += strlen(&idxStr[iIdxStr]); |
| 250226 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250227 | assert( idxStr[iIdxStr]=='\0' ); |
| 250228 | }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){ |
| 250229 | idxStr[iIdxStr++] = '='; |
| 250230 | bSeenEq = 1; |
| 250231 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250232 | } |
| @@ -252457,11 +252682,11 @@ | |
| 252457 | } |
| 252458 | |
| 252459 | return rc; |
| 252460 | } |
| 252461 | |
| 252462 | static int sqlite3Fts5GetTokenizer( |
| 252463 | Fts5Global *pGlobal, |
| 252464 | const char **azArg, |
| 252465 | int nArg, |
| 252466 | Fts5Config *pConfig, |
| 252467 | char **pzErr |
| @@ -252471,32 +252696,45 @@ | |
| 252471 | |
| 252472 | pMod = fts5LocateTokenizer(pGlobal, nArg==0 ? 0 : azArg[0]); |
| 252473 | if( pMod==0 ){ |
| 252474 | assert( nArg>0 ); |
| 252475 | rc = SQLITE_ERROR; |
| 252476 | *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); |
| 252477 | }else{ |
| 252478 | rc = pMod->x.xCreate( |
| 252479 | pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok |
| 252480 | ); |
| 252481 | pConfig->pTokApi = &pMod->x; |
| 252482 | if( rc!=SQLITE_OK ){ |
| 252483 | if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor"); |
| 252484 | }else{ |
| 252485 | pConfig->ePattern = sqlite3Fts5TokenizerPattern( |
| 252486 | pMod->x.xCreate, pConfig->pTok |
| 252487 | ); |
| 252488 | } |
| 252489 | } |
| 252490 | |
| 252491 | if( rc!=SQLITE_OK ){ |
| 252492 | pConfig->pTokApi = 0; |
| 252493 | pConfig->pTok = 0; |
| 252494 | } |
| 252495 | |
| 252496 | return rc; |
| 252497 | } |
| 252498 | |
| 252499 | static void fts5ModuleDestroy(void *pCtx){ |
| 252500 | Fts5TokenizerModule *pTok, *pNextTok; |
| 252501 | Fts5Auxiliary *pAux, *pNextAux; |
| 252502 | Fts5Global *pGlobal = (Fts5Global*)pCtx; |
| @@ -252537,11 +252775,11 @@ | |
| 252537 | int nArg, /* Number of args */ |
| 252538 | sqlite3_value **apUnused /* Function arguments */ |
| 252539 | ){ |
| 252540 | assert( nArg==0 ); |
| 252541 | UNUSED_PARAM2(nArg, apUnused); |
| 252542 | sqlite3_result_text(pCtx, "fts5: 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e", -1, SQLITE_TRANSIENT); |
| 252543 | } |
| 252544 | |
| 252545 | /* |
| 252546 | ** Return true if zName is the extension on one of the shadow tables used |
| 252547 | ** by this module. |
| @@ -252572,21 +252810,27 @@ | |
| 252572 | Fts5FullTable *pTab = (Fts5FullTable*)pVtab; |
| 252573 | int rc; |
| 252574 | |
| 252575 | assert( pzErr!=0 && *pzErr==0 ); |
| 252576 | UNUSED_PARAM(isQuick); |
| 252577 | rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0); |
| 252578 | if( (rc&0xff)==SQLITE_CORRUPT ){ |
| 252579 | *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", |
| 252580 | zSchema, zTabname); |
| 252581 | rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; |
| 252582 | }else if( rc!=SQLITE_OK ){ |
| 252583 | *pzErr = sqlite3_mprintf("unable to validate the inverted index for" |
| 252584 | " FTS5 table %s.%s: %s", |
| 252585 | zSchema, zTabname, sqlite3_errstr(rc)); |
| 252586 | } |
| 252587 | sqlite3Fts5IndexCloseReader(pTab->p.pIndex); |
| 252588 | |
| 252589 | return rc; |
| 252590 | } |
| 252591 | |
| 252592 | static int fts5Init(sqlite3 *db){ |
| @@ -255364,10 +255608,20 @@ | |
| 255364 | return p->bFold ? FTS5_PATTERN_LIKE : FTS5_PATTERN_GLOB; |
| 255365 | } |
| 255366 | } |
| 255367 | return FTS5_PATTERN_NONE; |
| 255368 | } |
| 255369 | |
| 255370 | /* |
| 255371 | ** Register all built-in tokenizers with FTS5. |
| 255372 | */ |
| 255373 | static int sqlite3Fts5TokenizerInit(fts5_api *pApi){ |
| @@ -256584,10 +256838,11 @@ | |
| 256584 | Fts5IndexIter *pIter; /* Term/rowid iterator object */ |
| 256585 | void *pStruct; /* From sqlite3Fts5StructureRef() */ |
| 256586 | |
| 256587 | int nLeTerm; /* Size of zLeTerm in bytes */ |
| 256588 | char *zLeTerm; /* (term <= $zLeTerm) paramater, or NULL */ |
| 256589 | |
| 256590 | /* These are used by 'col' tables only */ |
| 256591 | int iCol; |
| 256592 | i64 *aCnt; |
| 256593 | i64 *aDoc; |
| @@ -256610,13 +256865,15 @@ | |
| 256610 | #define FTS5_VOCAB_INST_SCHEMA "term, doc, col, offset" |
| 256611 | |
| 256612 | /* |
| 256613 | ** Bits for the mask used as the idxNum value by xBestIndex/xFilter. |
| 256614 | */ |
| 256615 | #define FTS5_VOCAB_TERM_EQ 0x01 |
| 256616 | #define FTS5_VOCAB_TERM_GE 0x02 |
| 256617 | #define FTS5_VOCAB_TERM_LE 0x04 |
| 256618 | |
| 256619 | |
| 256620 | /* |
| 256621 | ** Translate a string containing an fts5vocab table type to an |
| 256622 | ** FTS5_VOCAB_XXX constant. If successful, set *peType to the output |
| @@ -256789,14 +257046,16 @@ | |
| 256789 | ){ |
| 256790 | int i; |
| 256791 | int iTermEq = -1; |
| 256792 | int iTermGe = -1; |
| 256793 | int iTermLe = -1; |
| 256794 | int idxNum = 0; |
| 256795 | int nArg = 0; |
| 256796 | |
| 256797 | UNUSED_PARAM(pUnused); |
| 256798 | |
| 256799 | for(i=0; i<pInfo->nConstraint; i++){ |
| 256800 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 256801 | if( p->usable==0 ) continue; |
| 256802 | if( p->iColumn==0 ){ /* term column */ |
| @@ -256885,11 +257144,11 @@ | |
| 256885 | rc = sqlite3_finalize(pStmt); |
| 256886 | pStmt = 0; |
| 256887 | if( rc==SQLITE_OK ){ |
| 256888 | pVTab->zErrMsg = sqlite3_mprintf( |
| 256889 | "no such fts5 table: %s.%s", pTab->zFts5Db, pTab->zFts5Tbl |
| 256890 | ); |
| 256891 | rc = SQLITE_ERROR; |
| 256892 | } |
| 256893 | }else{ |
| 256894 | rc = sqlite3Fts5FlushToDisk(pFts5); |
| 256895 | } |
| @@ -257045,13 +257304,23 @@ | |
| 257045 | pPos = pCsr->pIter->pData; |
| 257046 | nPos = pCsr->pIter->nData; |
| 257047 | |
| 257048 | switch( pTab->eType ){ |
| 257049 | case FTS5_VOCAB_ROW: |
| 257050 | if( eDetail==FTS5_DETAIL_FULL ){ |
| 257051 | while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){ |
| 257052 | pCsr->aCnt[0]++; |
| 257053 | } |
| 257054 | } |
| 257055 | pCsr->aDoc[0]++; |
| 257056 | break; |
| 257057 | |
| @@ -257145,10 +257414,11 @@ | |
| 257145 | |
| 257146 | fts5VocabResetCursor(pCsr); |
| 257147 | if( idxNum & FTS5_VOCAB_TERM_EQ ) pEq = apVal[iVal++]; |
| 257148 | if( idxNum & FTS5_VOCAB_TERM_GE ) pGe = apVal[iVal++]; |
| 257149 | if( idxNum & FTS5_VOCAB_TERM_LE ) pLe = apVal[iVal++]; |
| 257150 | |
| 257151 | if( pEq ){ |
| 257152 | zTerm = (const char *)sqlite3_value_text(pEq); |
| 257153 | nTerm = sqlite3_value_bytes(pEq); |
| 257154 | f = FTS5INDEX_QUERY_NOTOKENDATA; |
| 257155 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.47.0. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** a47c644fef71f3ab3dc584ea917eaab9a8e5. |
| 22 | */ |
| 23 | #define SQLITE_CORE 1 |
| 24 | #define SQLITE_AMALGAMATION 1 |
| 25 | #ifndef SQLITE_PRIVATE |
| 26 | # define SQLITE_PRIVATE static |
| @@ -457,13 +457,13 @@ | |
| 457 | ** |
| 458 | ** See also: [sqlite3_libversion()], |
| 459 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 460 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 461 | */ |
| 462 | #define SQLITE_VERSION "3.47.0" |
| 463 | #define SQLITE_VERSION_NUMBER 3047000 |
| 464 | #define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f" |
| 465 | |
| 466 | /* |
| 467 | ** CAPI3REF: Run-Time Library Version Numbers |
| 468 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 469 | ** |
| @@ -3881,12 +3881,12 @@ | |
| 3881 | ** the default shared cache setting provided by |
| 3882 | ** [sqlite3_enable_shared_cache()].)^ |
| 3883 | ** |
| 3884 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3885 | ** <dd>The database connection comes up in "extended result code mode". |
| 3886 | ** In other words, the database behaves as if |
| 3887 | ** [sqlite3_extended_result_codes(db,1)] were called on the database |
| 3888 | ** connection as soon as the connection is created. In addition to setting |
| 3889 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3890 | ** to return an extended result code.</dd> |
| 3891 | ** |
| 3892 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| @@ -20996,10 +20996,11 @@ | |
| 20996 | SQLITE_PRIVATE int sqlite3WhereUsesDeferredSeek(WhereInfo*); |
| 20997 | SQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(Parse*, Index*, int, int, int); |
| 20998 | SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, u8); |
| 20999 | SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int); |
| 21000 | SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int); |
| 21001 | SQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg); |
| 21002 | SQLITE_PRIVATE void sqlite3ExprCode(Parse*, Expr*, int); |
| 21003 | #ifndef SQLITE_OMIT_GENERATED_COLUMNS |
| 21004 | SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int); |
| 21005 | #endif |
| 21006 | SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int); |
| @@ -33402,11 +33403,12 @@ | |
| 33403 | case OE_Abort: zType = "abort"; break; |
| 33404 | case OE_Fail: zType = "fail"; break; |
| 33405 | case OE_Ignore: zType = "ignore"; break; |
| 33406 | } |
| 33407 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 33408 | sqlite3TreeViewLine(pView, "RAISE %s", zType); |
| 33409 | sqlite3TreeViewExpr(pView, pExpr->pLeft, 0); |
| 33410 | break; |
| 33411 | } |
| 33412 | #endif |
| 33413 | case TK_MATCH: { |
| 33414 | sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s", |
| @@ -78108,11 +78110,12 @@ | |
| 78110 | assert( i<iEnd ); |
| 78111 | j = get2byte(&aData[hdr+5]); |
| 78112 | if( j>(u32)usableSize ){ j = 0; } |
| 78113 | memcpy(&pTmp[j], &aData[j], usableSize - j); |
| 78114 | |
| 78115 | assert( pCArray->ixNx[NB*2-1]>i ); |
| 78116 | for(k=0; pCArray->ixNx[k]<=i; k++){} |
| 78117 | pSrcEnd = pCArray->apEnd[k]; |
| 78118 | |
| 78119 | pData = pEnd; |
| 78120 | while( 1/*exit by break*/ ){ |
| 78121 | u8 *pCell = pCArray->apCell[i]; |
| @@ -78191,11 +78194,12 @@ | |
| 78194 | int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */ |
| 78195 | int k; /* Current slot in pCArray->apEnd[] */ |
| 78196 | u8 *pEnd; /* Maximum extent of cell data */ |
| 78197 | assert( CORRUPT_DB || pPg->hdrOffset==0 ); /* Never called on page 1 */ |
| 78198 | if( iEnd<=iFirst ) return 0; |
| 78199 | assert( pCArray->ixNx[NB*2-1]>i ); |
| 78200 | for(k=0; pCArray->ixNx[k]<=i ; k++){} |
| 78201 | pEnd = pCArray->apEnd[k]; |
| 78202 | while( 1 /*Exit by break*/ ){ |
| 78203 | int sz, rc; |
| 78204 | u8 *pSlot; |
| 78205 | assert( pCArray->szCell[i]!=0 ); |
| @@ -78476,10 +78480,11 @@ | |
| 78480 | b.pRef = pPage; |
| 78481 | b.apCell = &pCell; |
| 78482 | b.szCell = &szCell; |
| 78483 | b.apEnd[0] = pPage->aDataEnd; |
| 78484 | b.ixNx[0] = 2; |
| 78485 | b.ixNx[NB*2-1] = 0x7fffffff; |
| 78486 | rc = rebuildPage(&b, 0, 1, pNew); |
| 78487 | if( NEVER(rc) ){ |
| 78488 | releasePage(pNew); |
| 78489 | return rc; |
| 78490 | } |
| @@ -78711,11 +78716,13 @@ | |
| 78716 | u8 abDone[NB+2]; /* True after i'th new page is populated */ |
| 78717 | Pgno aPgno[NB+2]; /* Page numbers of new pages before shuffling */ |
| 78718 | CellArray b; /* Parsed information on cells being balanced */ |
| 78719 | |
| 78720 | memset(abDone, 0, sizeof(abDone)); |
| 78721 | assert( sizeof(b) - sizeof(b.ixNx) == offsetof(CellArray,ixNx) ); |
| 78722 | memset(&b, 0, sizeof(b)-sizeof(b.ixNx[0])); |
| 78723 | b.ixNx[NB*2-1] = 0x7fffffff; |
| 78724 | pBt = pParent->pBt; |
| 78725 | assert( sqlite3_mutex_held(pBt->mutex) ); |
| 78726 | assert( sqlite3PagerIswriteable(pParent->pDbPage) ); |
| 78727 | |
| 78728 | /* At this point pParent may have at most one overflow cell. And if |
| @@ -79302,11 +79309,12 @@ | |
| 79309 | } |
| 79310 | } |
| 79311 | iOvflSpace += sz; |
| 79312 | assert( sz<=pBt->maxLocal+23 ); |
| 79313 | assert( iOvflSpace <= (int)pBt->pageSize ); |
| 79314 | assert( b.ixNx[NB*2-1]>j ); |
| 79315 | for(k=0; b.ixNx[k]<=j; k++){} |
| 79316 | pSrcEnd = b.apEnd[k]; |
| 79317 | if( SQLITE_OVERFLOW(pSrcEnd, pCell, pCell+sz) ){ |
| 79318 | rc = SQLITE_CORRUPT_BKPT; |
| 79319 | goto balance_cleanup; |
| 79320 | } |
| @@ -90171,11 +90179,12 @@ | |
| 90179 | */ |
| 90180 | SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){ |
| 90181 | assert( iVar>0 ); |
| 90182 | if( v ){ |
| 90183 | Mem *pMem = &v->aVar[iVar-1]; |
| 90184 | assert( (v->db->flags & SQLITE_EnableQPSG)==0 |
| 90185 | || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); |
| 90186 | if( 0==(pMem->flags & MEM_Null) ){ |
| 90187 | sqlite3_value *pRet = sqlite3ValueNew(v->db); |
| 90188 | if( pRet ){ |
| 90189 | sqlite3VdbeMemCopy((Mem *)pRet, pMem); |
| 90190 | sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8); |
| @@ -90191,11 +90200,12 @@ | |
| 90200 | ** to sqlite3_reoptimize() that re-preparing the statement may result |
| 90201 | ** in a better query plan. |
| 90202 | */ |
| 90203 | SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ |
| 90204 | assert( iVar>0 ); |
| 90205 | assert( (v->db->flags & SQLITE_EnableQPSG)==0 |
| 90206 | || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); |
| 90207 | if( iVar>=32 ){ |
| 90208 | v->expmask |= 0x80000000; |
| 90209 | }else{ |
| 90210 | v->expmask |= ((u32)1 << (iVar-1)); |
| 90211 | } |
| @@ -94323,11 +94333,11 @@ | |
| 94333 | if( (pIn3->flags & MEM_Null)==0 ) break; |
| 94334 | /* Fall through into OP_Halt */ |
| 94335 | /* no break */ deliberate_fall_through |
| 94336 | } |
| 94337 | |
| 94338 | /* Opcode: Halt P1 P2 P3 P4 P5 |
| 94339 | ** |
| 94340 | ** Exit immediately. All open cursors, etc are closed |
| 94341 | ** automatically. |
| 94342 | ** |
| 94343 | ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), |
| @@ -94336,22 +94346,26 @@ | |
| 94346 | ** whether or not to rollback the current transaction. Do not rollback |
| 94347 | ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, |
| 94348 | ** then back out all changes that have occurred during this execution of the |
| 94349 | ** VDBE, but do not rollback the transaction. |
| 94350 | ** |
| 94351 | ** If P3 is not zero and P4 is NULL, then P3 is a register that holds the |
| 94352 | ** text of an error message. |
| 94353 | ** |
| 94354 | ** If P3 is zero and P4 is not null then the error message string is held |
| 94355 | ** in P4. |
| 94356 | ** |
| 94357 | ** P5 is a value between 1 and 4, inclusive, then the P4 error message |
| 94358 | ** string is modified as follows: |
| 94359 | ** |
| 94360 | ** 1: NOT NULL constraint failed: P4 |
| 94361 | ** 2: UNIQUE constraint failed: P4 |
| 94362 | ** 3: CHECK constraint failed: P4 |
| 94363 | ** 4: FOREIGN KEY constraint failed: P4 |
| 94364 | ** |
| 94365 | ** If P3 is zero and P5 is not zero and P4 is NULL, then everything after |
| 94366 | ** the ":" is omitted. |
| 94367 | ** |
| 94368 | ** There is an implied "Halt 0 0 0" instruction inserted at the very end of |
| 94369 | ** every program. So a jump past the last instruction of the program |
| 94370 | ** is the same as executing Halt. |
| 94371 | */ |
| @@ -94360,10 +94374,13 @@ | |
| 94374 | int pcx; |
| 94375 | |
| 94376 | #ifdef SQLITE_DEBUG |
| 94377 | if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); } |
| 94378 | #endif |
| 94379 | assert( pOp->p4type==P4_NOTUSED |
| 94380 | || pOp->p4type==P4_STATIC |
| 94381 | || pOp->p4type==P4_DYNAMIC ); |
| 94382 | |
| 94383 | /* A deliberately coded "OP_Halt SQLITE_INTERNAL * * * *" opcode indicates |
| 94384 | ** something is wrong with the code generator. Raise an assertion in order |
| 94385 | ** to bring this to the attention of fuzzers and other testing tools. */ |
| 94386 | assert( pOp->p1!=SQLITE_INTERNAL ); |
| @@ -94390,11 +94407,16 @@ | |
| 94407 | } |
| 94408 | p->rc = pOp->p1; |
| 94409 | p->errorAction = (u8)pOp->p2; |
| 94410 | assert( pOp->p5<=4 ); |
| 94411 | if( p->rc ){ |
| 94412 | if( pOp->p3>0 && pOp->p4type==P4_NOTUSED ){ |
| 94413 | const char *zErr; |
| 94414 | assert( pOp->p3<=(p->nMem + 1 - p->nCursor) ); |
| 94415 | zErr = sqlite3ValueText(&aMem[pOp->p3], SQLITE_UTF8); |
| 94416 | sqlite3VdbeError(p, "%s", zErr); |
| 94417 | }else if( pOp->p5 ){ |
| 94418 | static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK", |
| 94419 | "FOREIGN KEY" }; |
| 94420 | testcase( pOp->p5==1 ); |
| 94421 | testcase( pOp->p5==2 ); |
| 94422 | testcase( pOp->p5==3 ); |
| @@ -97433,27 +97455,27 @@ | |
| 97455 | wrFlag = BTREE_WRCSR | (pOp->p5 & OPFLAG_FORDELETE); |
| 97456 | assert( sqlite3SchemaMutexHeld(db, iDb, 0) ); |
| 97457 | if( pDb->pSchema->file_format < p->minWriteFileFormat ){ |
| 97458 | p->minWriteFileFormat = pDb->pSchema->file_format; |
| 97459 | } |
| 97460 | if( pOp->p5 & OPFLAG_P2ISREG ){ |
| 97461 | assert( p2>0 ); |
| 97462 | assert( p2<=(u32)(p->nMem+1 - p->nCursor) ); |
| 97463 | pIn2 = &aMem[p2]; |
| 97464 | assert( memIsValid(pIn2) ); |
| 97465 | assert( (pIn2->flags & MEM_Int)!=0 ); |
| 97466 | sqlite3VdbeMemIntegerify(pIn2); |
| 97467 | p2 = (int)pIn2->u.i; |
| 97468 | /* The p2 value always comes from a prior OP_CreateBtree opcode and |
| 97469 | ** that opcode will always set the p2 value to 2 or more or else fail. |
| 97470 | ** If there were a failure, the prepared statement would have halted |
| 97471 | ** before reaching this instruction. */ |
| 97472 | assert( p2>=2 ); |
| 97473 | } |
| 97474 | }else{ |
| 97475 | wrFlag = 0; |
| 97476 | assert( (pOp->p5 & OPFLAG_P2ISREG)==0 ); |
| 97477 | } |
| 97478 | if( pOp->p4type==P4_KEYINFO ){ |
| 97479 | pKeyInfo = pOp->p4.pKeyInfo; |
| 97480 | assert( pKeyInfo->enc==ENC(db) ); |
| 97481 | assert( pKeyInfo->db==db ); |
| @@ -113247,11 +113269,11 @@ | |
| 113269 | /* |
| 113270 | ** Convert a scalar expression node to a TK_REGISTER referencing |
| 113271 | ** register iReg. The caller must ensure that iReg already contains |
| 113272 | ** the correct value for the expression. |
| 113273 | */ |
| 113274 | SQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg){ |
| 113275 | Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr); |
| 113276 | if( NEVER(p==0) ) return; |
| 113277 | p->op2 = p->op; |
| 113278 | p->op = TK_REGISTER; |
| 113279 | p->iTable = iReg; |
| @@ -114256,11 +114278,11 @@ | |
| 114278 | if( db->mallocFailed ){ |
| 114279 | sqlite3ExprDelete(db, pDel); |
| 114280 | break; |
| 114281 | } |
| 114282 | testcase( pX->op==TK_COLUMN ); |
| 114283 | sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); |
| 114284 | testcase( regFree1==0 ); |
| 114285 | memset(&opCompare, 0, sizeof(opCompare)); |
| 114286 | opCompare.op = TK_EQ; |
| 114287 | opCompare.pLeft = pDel; |
| 114288 | pTest = &opCompare; |
| @@ -114310,19 +114332,18 @@ | |
| 114332 | if( pExpr->affExpr==OE_Abort ){ |
| 114333 | sqlite3MayAbort(pParse); |
| 114334 | } |
| 114335 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 114336 | if( pExpr->affExpr==OE_Ignore ){ |
| 114337 | sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, OE_Ignore); |
| 114338 | VdbeCoverage(v); |
| 114339 | }else{ |
| 114340 | r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, ®Free1); |
| 114341 | sqlite3VdbeAddOp3(v, OP_Halt, |
| 114342 | pParse->pTriggerTab ? SQLITE_CONSTRAINT_TRIGGER : SQLITE_ERROR, |
| 114343 | pExpr->affExpr, r1); |
| 114344 | } |
| 114345 | break; |
| 114346 | } |
| 114347 | #endif |
| 114348 | } |
| 114349 | sqlite3ReleaseTempReg(pParse, regFree1); |
| @@ -114607,11 +114628,11 @@ | |
| 114628 | compLeft.pLeft = pDel; |
| 114629 | compLeft.pRight = pExpr->x.pList->a[0].pExpr; |
| 114630 | compRight.op = TK_LE; |
| 114631 | compRight.pLeft = pDel; |
| 114632 | compRight.pRight = pExpr->x.pList->a[1].pExpr; |
| 114633 | sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, ®Free1)); |
| 114634 | if( xJump ){ |
| 114635 | xJump(pParse, &exprAnd, dest, jumpIfNull); |
| 114636 | }else{ |
| 114637 | /* Mark the expression is being from the ON or USING clause of a join |
| 114638 | ** so that the sqlite3ExprCodeTarget() routine will not attempt to move |
| @@ -124424,12 +124445,13 @@ | |
| 124445 | #endif /* SQLITE_OMIT_VIEW */ |
| 124446 | |
| 124447 | #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) |
| 124448 | /* |
| 124449 | ** The Table structure pTable is really a VIEW. Fill in the names of |
| 124450 | ** the columns of the view in the pTable structure. Return non-zero if |
| 124451 | ** there are errors. If an error is seen an error message is left |
| 124452 | ** in pParse->zErrMsg. |
| 124453 | */ |
| 124454 | static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124455 | Table *pSelTab; /* A fake table from which we get the result set */ |
| 124456 | Select *pSel; /* Copy of the SELECT that implements the view */ |
| 124457 | int nErr = 0; /* Number of errors encountered */ |
| @@ -124548,11 +124570,11 @@ | |
| 124570 | pTable->pSchema->schemaFlags |= DB_UnresetViews; |
| 124571 | if( db->mallocFailed ){ |
| 124572 | sqlite3DeleteColumnNames(db, pTable); |
| 124573 | } |
| 124574 | #endif /* SQLITE_OMIT_VIEW */ |
| 124575 | return nErr + pParse->nErr; |
| 124576 | } |
| 124577 | SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ |
| 124578 | assert( pTable!=0 ); |
| 124579 | if( !IsVirtual(pTable) && pTable->nCol>0 ) return 0; |
| 124580 | return viewGetColumnNames(pParse, pTable); |
| @@ -130846,10 +130868,12 @@ | |
| 130868 | StrAccum *pAccum = &pGCC->str; |
| 130869 | if( pAccum->accError==SQLITE_TOOBIG ){ |
| 130870 | sqlite3_result_error_toobig(context); |
| 130871 | }else if( pAccum->accError==SQLITE_NOMEM ){ |
| 130872 | sqlite3_result_error_nomem(context); |
| 130873 | }else if( pGCC->nAccum>0 && pAccum->nChar==0 ){ |
| 130874 | sqlite3_result_text(context, "", 1, SQLITE_STATIC); |
| 130875 | }else{ |
| 130876 | const char *zText = sqlite3_str_value(pAccum); |
| 130877 | sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT); |
| 130878 | } |
| 130879 | } |
| @@ -132726,11 +132750,12 @@ | |
| 132750 | if( action==OE_Restrict ){ |
| 132751 | int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 132752 | SrcList *pSrc; |
| 132753 | Expr *pRaise; |
| 132754 | |
| 132755 | pRaise = sqlite3Expr(db, TK_STRING, "FOREIGN KEY constraint failed"), |
| 132756 | pRaise = sqlite3PExpr(pParse, TK_RAISE, pRaise, 0); |
| 132757 | if( pRaise ){ |
| 132758 | pRaise->affExpr = OE_Abort; |
| 132759 | } |
| 132760 | pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); |
| 132761 | if( pSrc ){ |
| @@ -150727,16 +150752,22 @@ | |
| 150752 | ** written the query must use a temp-table for at least one of the ORDER |
| 150753 | ** BY and DISTINCT, and an index or separate temp-table for the other. |
| 150754 | */ |
| 150755 | if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct |
| 150756 | && sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0 |
| 150757 | && OptimizationEnabled(db, SQLITE_GroupByOrder) |
| 150758 | #ifndef SQLITE_OMIT_WINDOWFUNC |
| 150759 | && p->pWin==0 |
| 150760 | #endif |
| 150761 | ){ |
| 150762 | p->selFlags &= ~SF_Distinct; |
| 150763 | pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0); |
| 150764 | if( pGroupBy ){ |
| 150765 | for(i=0; i<pGroupBy->nExpr; i++){ |
| 150766 | pGroupBy->a[i].u.x.iOrderByCol = i+1; |
| 150767 | } |
| 150768 | } |
| 150769 | p->selFlags |= SF_Aggregate; |
| 150770 | /* Notice that even thought SF_Distinct has been cleared from p->selFlags, |
| 150771 | ** the sDistinct.isTnct is still set. Hence, isTnct represents the |
| 150772 | ** original setting of the SF_Distinct flag, not the current setting */ |
| 150773 | assert( sDistinct.isTnct ); |
| @@ -151195,16 +151226,22 @@ | |
| 151226 | if( groupBySort ){ |
| 151227 | sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx, |
| 151228 | sortOut, sortPTab); |
| 151229 | } |
| 151230 | for(j=0; j<pGroupBy->nExpr; j++){ |
| 151231 | int iOrderByCol = pGroupBy->a[j].u.x.iOrderByCol; |
| 151232 | |
| 151233 | if( groupBySort ){ |
| 151234 | sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j); |
| 151235 | }else{ |
| 151236 | pAggInfo->directMode = 1; |
| 151237 | sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j); |
| 151238 | } |
| 151239 | |
| 151240 | if( iOrderByCol ){ |
| 151241 | sqlite3ExprToRegister(p->pEList->a[iOrderByCol-1].pExpr, iAMem+j); |
| 151242 | } |
| 151243 | } |
| 151244 | sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr, |
| 151245 | (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO); |
| 151246 | addr1 = sqlite3VdbeCurrentAddr(v); |
| 151247 | sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v); |
| @@ -151216,13 +151253,13 @@ | |
| 151253 | ** This code copies current group by terms in b0,b1,b2,... |
| 151254 | ** over to a0,a1,a2. It then calls the output subroutine |
| 151255 | ** and resets the aggregate accumulator registers in preparation |
| 151256 | ** for the next GROUP BY batch. |
| 151257 | */ |
| 151258 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| 151259 | VdbeComment((v, "output one row")); |
| 151260 | sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr); |
| 151261 | sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd); VdbeCoverage(v); |
| 151262 | VdbeComment((v, "check abort flag")); |
| 151263 | sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset); |
| 151264 | VdbeComment((v, "reset accumulator")); |
| 151265 | |
| @@ -156939,10 +156976,12 @@ | |
| 156976 | u16 nLTerm; /* Number of entries in aLTerm[] */ |
| 156977 | u16 nSkip; /* Number of NULL aLTerm[] entries */ |
| 156978 | /**** whereLoopXfer() copies fields above ***********************/ |
| 156979 | # define WHERE_LOOP_XFER_SZ offsetof(WhereLoop,nLSlot) |
| 156980 | u16 nLSlot; /* Number of slots allocated for aLTerm[] */ |
| 156981 | LogEst rStarDelta; /* Cost delta due to star-schema heuristic. Not |
| 156982 | ** initialized unless pWInfo->nOutStarDelta>0 */ |
| 156983 | WhereTerm **aLTerm; /* WhereTerms used */ |
| 156984 | WhereLoop *pNextLoop; /* Next WhereLoop object in the WhereClause */ |
| 156985 | WhereTerm *aLTermSpace[3]; /* Initial aLTerm[] space */ |
| 156986 | }; |
| 156987 | |
| @@ -157261,10 +157300,11 @@ | |
| 157300 | u8 eDistinct; /* One of the WHERE_DISTINCT_* values */ |
| 157301 | unsigned bDeferredSeek :1; /* Uses OP_DeferredSeek */ |
| 157302 | unsigned untestedTerms :1; /* Not all WHERE terms resolved by outer loop */ |
| 157303 | unsigned bOrderedInnerLoop:1;/* True if only the inner-most loop is ordered */ |
| 157304 | unsigned sorted :1; /* True if really sorted (not just grouped) */ |
| 157305 | LogEst nOutStarDelta; /* Artifical nOut reduction for star-query */ |
| 157306 | LogEst nRowOut; /* Estimated number of output rows */ |
| 157307 | int iTop; /* The very beginning of the WHERE loop */ |
| 157308 | int iEndWhere; /* End of the WHERE clause itself */ |
| 157309 | WhereLoop *pLoops; /* List of all WhereLoop objects */ |
| 157310 | WhereMemBlock *pMemToFree;/* Memory to free when this object destroyed */ |
| @@ -157860,10 +157900,43 @@ | |
| 157900 | zAff[i] = SQLITE_AFF_BLOB; |
| 157901 | } |
| 157902 | } |
| 157903 | } |
| 157904 | |
| 157905 | /* |
| 157906 | ** The pOrderBy->a[].u.x.iOrderByCol values might be incorrect because |
| 157907 | ** columns might have been rearranged in the result set. This routine |
| 157908 | ** fixes them up. |
| 157909 | ** |
| 157910 | ** pEList is the new result set. The pEList->a[].u.x.iOrderByCol values |
| 157911 | ** contain the *old* locations of each expression. This is a temporary |
| 157912 | ** use of u.x.iOrderByCol, not its intended use. The caller must reset |
| 157913 | ** u.x.iOrderByCol back to zero for all entries in pEList before the |
| 157914 | ** caller returns. |
| 157915 | ** |
| 157916 | ** This routine changes pOrderBy->a[].u.x.iOrderByCol values from |
| 157917 | ** pEList->a[N].u.x.iOrderByCol into N+1. (The "+1" is because of the 1-based |
| 157918 | ** indexing used by iOrderByCol.) Or if no match, iOrderByCol is set to zero. |
| 157919 | */ |
| 157920 | static void adjustOrderByCol(ExprList *pOrderBy, ExprList *pEList){ |
| 157921 | int i, j; |
| 157922 | if( pOrderBy==0 ) return; |
| 157923 | for(i=0; i<pOrderBy->nExpr; i++){ |
| 157924 | int t = pOrderBy->a[i].u.x.iOrderByCol; |
| 157925 | if( t==0 ) continue; |
| 157926 | for(j=0; j<pEList->nExpr; j++){ |
| 157927 | if( pEList->a[j].u.x.iOrderByCol==t ){ |
| 157928 | pOrderBy->a[i].u.x.iOrderByCol = j+1; |
| 157929 | break; |
| 157930 | } |
| 157931 | } |
| 157932 | if( j>=pEList->nExpr ){ |
| 157933 | pOrderBy->a[i].u.x.iOrderByCol = 0; |
| 157934 | } |
| 157935 | } |
| 157936 | } |
| 157937 | |
| 157938 | |
| 157939 | /* |
| 157940 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 157941 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 157942 | ** LHS. But not all terms in the vector are indexable and the terms might |
| @@ -157923,10 +157996,11 @@ | |
| 157996 | assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 ); |
| 157997 | iField = pLoop->aLTerm[i]->u.x.iField - 1; |
| 157998 | if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */ |
| 157999 | pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr); |
| 158000 | pOrigRhs->a[iField].pExpr = 0; |
| 158001 | if( pRhs ) pRhs->a[pRhs->nExpr-1].u.x.iOrderByCol = iField+1; |
| 158002 | if( pOrigLhs ){ |
| 158003 | assert( pOrigLhs->a[iField].pExpr!=0 ); |
| 158004 | pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr); |
| 158005 | pOrigLhs->a[iField].pExpr = 0; |
| 158006 | } |
| @@ -157945,22 +158019,20 @@ | |
| 158019 | Expr *p = pLhs->a[0].pExpr; |
| 158020 | pLhs->a[0].pExpr = 0; |
| 158021 | sqlite3ExprDelete(db, pNew->pLeft); |
| 158022 | pNew->pLeft = p; |
| 158023 | } |
| 158024 | |
| 158025 | /* If either the ORDER BY clause or the GROUP BY clause contains |
| 158026 | ** references to result-set columns, those references might now be |
| 158027 | ** obsolete. So fix them up. |
| 158028 | */ |
| 158029 | assert( pRhs!=0 || db->mallocFailed ); |
| 158030 | if( pRhs ){ |
| 158031 | adjustOrderByCol(pSelect->pOrderBy, pRhs); |
| 158032 | adjustOrderByCol(pSelect->pGroupBy, pRhs); |
| 158033 | for(i=0; i<pRhs->nExpr; i++) pRhs->a[i].u.x.iOrderByCol = 0; |
| 158034 | } |
| 158035 | |
| 158036 | #if 0 |
| 158037 | printf("For indexing, change the IN expr:\n"); |
| 158038 | sqlite3TreeViewExpr(0, pX, 0); |
| @@ -162946,10 +163018,44 @@ | |
| 163018 | return 0; |
| 163019 | } |
| 163020 | return 1; |
| 163021 | } |
| 163022 | |
| 163023 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| 163024 | /* |
| 163025 | ** Return true if column iCol of table pTab seem like it might be a |
| 163026 | ** good column to use as part of a query-time index. |
| 163027 | ** |
| 163028 | ** Current algorithm (subject to improvement!): |
| 163029 | ** |
| 163030 | ** 1. If iCol is already the left-most column of some other index, |
| 163031 | ** then return false. |
| 163032 | ** |
| 163033 | ** 2. If iCol is part of an existing index that has an aiRowLogEst of |
| 163034 | ** more than 20, then return false. |
| 163035 | ** |
| 163036 | ** 3. If no disqualifying conditions above are found, return true. |
| 163037 | */ |
| 163038 | static SQLITE_NOINLINE int columnIsGoodIndexCandidate( |
| 163039 | const Table *pTab, |
| 163040 | int iCol |
| 163041 | ){ |
| 163042 | const Index *pIdx; |
| 163043 | for(pIdx = pTab->pIndex; pIdx!=0; pIdx=pIdx->pNext){ |
| 163044 | int j; |
| 163045 | for(j=0; j<pIdx->nKeyCol; j++){ |
| 163046 | if( pIdx->aiColumn[j]==iCol ){ |
| 163047 | if( j==0 ) return 0; |
| 163048 | if( pIdx->hasStat1 && pIdx->aiRowLogEst[j+1]>20 ) return 0; |
| 163049 | break; |
| 163050 | } |
| 163051 | } |
| 163052 | } |
| 163053 | return 1; |
| 163054 | } |
| 163055 | #endif /* SQLITE_OMIT_AUTOMATIC_INDEX */ |
| 163056 | |
| 163057 | |
| 163058 | |
| 163059 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| 163060 | /* |
| 163061 | ** Return TRUE if the WHERE clause term pTerm is of a form where it |
| @@ -162960,10 +163066,12 @@ | |
| 163066 | const WhereTerm *pTerm, /* WHERE clause term to check */ |
| 163067 | const SrcItem *pSrc, /* Table we are trying to access */ |
| 163068 | const Bitmask notReady /* Tables in outer loops of the join */ |
| 163069 | ){ |
| 163070 | char aff; |
| 163071 | int leftCol; |
| 163072 | |
| 163073 | if( pTerm->leftCursor!=pSrc->iCursor ) return 0; |
| 163074 | if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0; |
| 163075 | assert( (pSrc->fg.jointype & JT_RIGHT)==0 ); |
| 163076 | if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0 |
| 163077 | && !constraintCompatibleWithOuterJoin(pTerm,pSrc) |
| @@ -162970,15 +163078,16 @@ | |
| 163078 | ){ |
| 163079 | return 0; /* See https://sqlite.org/forum/forumpost/51e6959f61 */ |
| 163080 | } |
| 163081 | if( (pTerm->prereqRight & notReady)!=0 ) return 0; |
| 163082 | assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 ); |
| 163083 | leftCol = pTerm->u.x.leftColumn; |
| 163084 | if( leftCol<0 ) return 0; |
| 163085 | aff = pSrc->pTab->aCol[leftCol].affinity; |
| 163086 | if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0; |
| 163087 | testcase( pTerm->pExpr->op==TK_IS ); |
| 163088 | return columnIsGoodIndexCandidate(pSrc->pTab, leftCol); |
| 163089 | } |
| 163090 | #endif |
| 163091 | |
| 163092 | |
| 163093 | #ifndef SQLITE_OMIT_AUTOMATIC_INDEX |
| @@ -165276,11 +165385,11 @@ | |
| 165385 | assert( saved_nEq==pNew->u.btree.nEq ); |
| 165386 | if( iCol==XN_ROWID |
| 165387 | || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1) |
| 165388 | ){ |
| 165389 | if( iCol==XN_ROWID || pProbe->uniqNotNull |
| 165390 | || (pProbe->nKeyCol==1 && pProbe->onError && (eOp & WO_EQ)) |
| 165391 | ){ |
| 165392 | pNew->wsFlags |= WHERE_ONEROW; |
| 165393 | }else{ |
| 165394 | pNew->wsFlags |= WHERE_UNQ_WANTED; |
| 165395 | } |
| @@ -167312,10 +167421,87 @@ | |
| 167421 | if( nRow>10 ){ nRow -= 10; assert( 10==sqlite3LogEst(2) ); } |
| 167422 | } |
| 167423 | rSortCost += estLog(nRow); |
| 167424 | return rSortCost; |
| 167425 | } |
| 167426 | |
| 167427 | /* |
| 167428 | ** Compute the maximum number of paths in the solver algorithm, for |
| 167429 | ** queries that have three or more terms in the FROM clause. Queries with |
| 167430 | ** two or fewer FROM clause terms are handled by the caller. |
| 167431 | ** |
| 167432 | ** Query planning is NP-hard. We must limit the number of paths at |
| 167433 | ** each step of the solver search algorithm to avoid exponential behavior. |
| 167434 | ** |
| 167435 | ** The value returned is a tuning parameter. Currently the value is: |
| 167436 | ** |
| 167437 | ** 18 for star queries |
| 167438 | ** 12 otherwise |
| 167439 | ** |
| 167440 | ** For the purposes of SQLite, a star-query is defined as a query |
| 167441 | ** with a large central table that is joined against four or more |
| 167442 | ** smaller tables. The central table is called the "fact" table. |
| 167443 | ** The smaller tables that get joined are "dimension tables". |
| 167444 | ** |
| 167445 | ** SIDE EFFECT: |
| 167446 | ** |
| 167447 | ** If pWInfo describes a star-query, then the cost on WhereLoops for the |
| 167448 | ** fact table is reduced. This heuristic helps keep fact tables in |
| 167449 | ** outer loops. Without this heuristic, paths with fact tables in outer |
| 167450 | ** loops tend to get pruned by the mxChoice limit on the number of paths, |
| 167451 | ** resulting in poor query plans. The total amount of heuristic cost |
| 167452 | ** adjustment is stored in pWInfo->nOutStarDelta and the cost adjustment |
| 167453 | ** for each WhereLoop is stored in its rStarDelta field. |
| 167454 | */ |
| 167455 | static int computeMxChoice(WhereInfo *pWInfo, LogEst nRowEst){ |
| 167456 | int nLoop = pWInfo->nLevel; /* Number of terms in the join */ |
| 167457 | if( nRowEst==0 && nLoop>=4 ){ |
| 167458 | /* Check to see if we are dealing with a star schema and if so, reduce |
| 167459 | ** the cost of fact tables relative to dimension tables, as a heuristic |
| 167460 | ** to help keep the fact tables in outer loops. |
| 167461 | */ |
| 167462 | int iLoop; /* Counter over join terms */ |
| 167463 | Bitmask m; /* Bitmask for current loop */ |
| 167464 | assert( pWInfo->nOutStarDelta==0 ); |
| 167465 | for(iLoop=0, m=1; iLoop<nLoop; iLoop++, m<<=1){ |
| 167466 | WhereLoop *pWLoop; /* For looping over WhereLoops */ |
| 167467 | int nDep = 0; /* Number of dimension tables */ |
| 167468 | LogEst rDelta; /* Heuristic cost adjustment */ |
| 167469 | Bitmask mSeen = 0; /* Mask of dimension tables */ |
| 167470 | for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ |
| 167471 | if( (pWLoop->prereq & m)!=0 && (pWLoop->maskSelf & mSeen)==0 ){ |
| 167472 | nDep++; |
| 167473 | mSeen |= pWLoop->maskSelf; |
| 167474 | } |
| 167475 | } |
| 167476 | if( nDep<=3 ) continue; |
| 167477 | rDelta = 15*(nDep-3); |
| 167478 | #ifdef WHERETRACE_ENABLED /* 0x4 */ |
| 167479 | if( sqlite3WhereTrace&0x4 ){ |
| 167480 | SrcItem *pItem = pWInfo->pTabList->a + iLoop; |
| 167481 | sqlite3DebugPrintf("Fact-table %s: %d dimensions, cost reduced %d\n", |
| 167482 | pItem->zAlias ? pItem->zAlias : pItem->pTab->zName, |
| 167483 | nDep, rDelta); |
| 167484 | } |
| 167485 | #endif |
| 167486 | if( pWInfo->nOutStarDelta==0 ){ |
| 167487 | for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ |
| 167488 | pWLoop->rStarDelta = 0; |
| 167489 | } |
| 167490 | } |
| 167491 | pWInfo->nOutStarDelta += rDelta; |
| 167492 | for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){ |
| 167493 | if( pWLoop->maskSelf==m ){ |
| 167494 | pWLoop->rRun -= rDelta; |
| 167495 | pWLoop->nOut -= rDelta; |
| 167496 | pWLoop->rStarDelta = rDelta; |
| 167497 | } |
| 167498 | } |
| 167499 | } |
| 167500 | } |
| 167501 | return pWInfo->nOutStarDelta>0 ? 18 : 12; |
| 167502 | } |
| 167503 | |
| 167504 | /* |
| 167505 | ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine |
| 167506 | ** attempts to find the lowest cost path that visits each WhereLoop |
| 167507 | ** once. This path is then loaded into the pWInfo->a[].pWLoop fields. |
| @@ -167348,17 +167534,29 @@ | |
| 167534 | char *pSpace; /* Temporary memory used by this routine */ |
| 167535 | int nSpace; /* Bytes of space allocated at pSpace */ |
| 167536 | |
| 167537 | pParse = pWInfo->pParse; |
| 167538 | nLoop = pWInfo->nLevel; |
| 167539 | WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n", |
| 167540 | nRowEst, pParse->nQueryLoop)); |
| 167541 | /* TUNING: mxChoice is the maximum number of possible paths to preserve |
| 167542 | ** at each step. Based on the number of loops in the FROM clause: |
| 167543 | ** |
| 167544 | ** nLoop mxChoice |
| 167545 | ** ----- -------- |
| 167546 | ** 1 1 // the most common case |
| 167547 | ** 2 5 |
| 167548 | ** 3+ 12 or 18 // see computeMxChoice() |
| 167549 | */ |
| 167550 | if( nLoop<=1 ){ |
| 167551 | mxChoice = 1; |
| 167552 | }else if( nLoop==2 ){ |
| 167553 | mxChoice = 5; |
| 167554 | }else{ |
| 167555 | mxChoice = computeMxChoice(pWInfo, nRowEst); |
| 167556 | } |
| 167557 | assert( nLoop<=pWInfo->pTabList->nSrc ); |
| 167558 | |
| 167559 | /* If nRowEst is zero and there is an ORDER BY clause, ignore it. In this |
| 167560 | ** case the purpose of this call is to estimate the number of rows returned |
| 167561 | ** by the overall query. Once this estimate has been obtained, the caller |
| 167562 | ** will invoke this function a second time, passing the estimate as the |
| @@ -167437,11 +167635,14 @@ | |
| 167635 | continue; |
| 167636 | } |
| 167637 | |
| 167638 | /* At this point, pWLoop is a candidate to be the next loop. |
| 167639 | ** Compute its cost */ |
| 167640 | rUnsorted = pWLoop->rRun + pFrom->nRow; |
| 167641 | if( pWLoop->rSetup ){ |
| 167642 | rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup, rUnsorted); |
| 167643 | } |
| 167644 | rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted); |
| 167645 | nOut = pFrom->nRow + pWLoop->nOut; |
| 167646 | maskNew = pFrom->maskLoop | pWLoop->maskSelf; |
| 167647 | isOrdered = pFrom->isOrdered; |
| 167648 | if( isOrdered<0 ){ |
| @@ -167482,10 +167683,11 @@ | |
| 167683 | ** |
| 167684 | ** The term "((pTo->isOrdered^isOrdered)&0x80)==0" is equivalent |
| 167685 | ** to (pTo->isOrdered==(-1))==(isOrdered==(-1))" for the range |
| 167686 | ** of legal values for isOrdered, -1..64. |
| 167687 | */ |
| 167688 | testcase( nTo==0 ); |
| 167689 | for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){ |
| 167690 | if( pTo->maskLoop==maskNew |
| 167691 | && ((pTo->isOrdered^isOrdered)&0x80)==0 |
| 167692 | ){ |
| 167693 | testcase( jj==nTo-1 ); |
| @@ -167598,20 +167800,32 @@ | |
| 167800 | } |
| 167801 | } |
| 167802 | |
| 167803 | #ifdef WHERETRACE_ENABLED /* >=2 */ |
| 167804 | if( sqlite3WhereTrace & 0x02 ){ |
| 167805 | LogEst rMin, rFloor = 0; |
| 167806 | int nDone = 0; |
| 167807 | sqlite3DebugPrintf("---- after round %d ----\n", iLoop); |
| 167808 | while( nDone<nTo ){ |
| 167809 | rMin = 0x7fff; |
| 167810 | for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ |
| 167811 | if( pTo->rCost>rFloor && pTo->rCost<rMin ) rMin = pTo->rCost; |
| 167812 | } |
| 167813 | for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){ |
| 167814 | if( pTo->rCost==rMin ){ |
| 167815 | sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c", |
| 167816 | wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow, |
| 167817 | pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?'); |
| 167818 | if( pTo->isOrdered>0 ){ |
| 167819 | sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop); |
| 167820 | }else{ |
| 167821 | sqlite3DebugPrintf("\n"); |
| 167822 | } |
| 167823 | nDone++; |
| 167824 | } |
| 167825 | } |
| 167826 | rFloor = rMin; |
| 167827 | } |
| 167828 | } |
| 167829 | #endif |
| 167830 | |
| 167831 | /* Swap the roles of aFrom and aTo for the next generation */ |
| @@ -167702,11 +167916,11 @@ | |
| 167916 | pWInfo->revMask = revMask; |
| 167917 | } |
| 167918 | } |
| 167919 | } |
| 167920 | |
| 167921 | pWInfo->nRowOut = pFrom->nRow + pWInfo->nOutStarDelta; |
| 167922 | |
| 167923 | /* Free temporary memory and return success */ |
| 167924 | sqlite3StackFreeNN(pParse->db, pSpace); |
| 167925 | return SQLITE_OK; |
| 167926 | } |
| @@ -168092,10 +168306,11 @@ | |
| 168306 | pLoop->cId, (double)sqlite3LogEstToInt(nSearch), pTab->zName, |
| 168307 | (double)sqlite3LogEstToInt(pTab->nRowLogEst))); |
| 168308 | } |
| 168309 | } |
| 168310 | nSearch += pLoop->nOut; |
| 168311 | if( pWInfo->nOutStarDelta ) nSearch += pLoop->rStarDelta; |
| 168312 | } |
| 168313 | } |
| 168314 | |
| 168315 | /* |
| 168316 | ** Expression Node callback for sqlite3ExprCanReturnSubtype(). |
| @@ -168607,11 +168822,11 @@ | |
| 168822 | |
| 168823 | wherePathSolver(pWInfo, 0); |
| 168824 | if( db->mallocFailed ) goto whereBeginError; |
| 168825 | if( pWInfo->pOrderBy ){ |
| 168826 | whereInterstageHeuristic(pWInfo); |
| 168827 | wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); |
| 168828 | if( db->mallocFailed ) goto whereBeginError; |
| 168829 | } |
| 168830 | |
| 168831 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 168832 | ** the output size by a factor of 8 (LogEst -30). |
| @@ -173084,227 +173299,229 @@ | |
| 173299 | ** yy_reduce_ofst[] For each state, the offset into yy_action for |
| 173300 | ** shifting non-terminals after a reduce. |
| 173301 | ** yy_default[] Default action for each state. |
| 173302 | ** |
| 173303 | *********** Begin parsing tables **********************************************/ |
| 173304 | #define YY_ACTTAB_COUNT (2167) |
| 173305 | static const YYACTIONTYPE yy_action[] = { |
| 173306 | /* 0 */ 576, 130, 127, 234, 1622, 550, 576, 1290, 1281, 576, |
| 173307 | /* 10 */ 329, 576, 1300, 214, 576, 130, 127, 234, 578, 413, |
| 173308 | /* 20 */ 578, 392, 1542, 51, 51, 524, 406, 1293, 530, 51, |
| 173309 | /* 30 */ 51, 983, 51, 51, 82, 82, 1107, 61, 61, 984, |
| 173310 | /* 40 */ 1107, 1292, 381, 137, 138, 91, 1228, 1228, 1063, 1066, |
| 173311 | /* 50 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 1577, 413, |
| 173312 | /* 60 */ 288, 288, 7, 288, 288, 423, 1050, 1050, 1064, 1067, |
| 173313 | /* 70 */ 290, 557, 493, 573, 525, 562, 573, 498, 562, 483, |
| 173314 | /* 80 */ 531, 264, 231, 137, 138, 91, 1228, 1228, 1063, 1066, |
| 173315 | /* 90 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 130, 127, |
| 173316 | /* 100 */ 234, 1506, 134, 134, 134, 134, 133, 133, 132, 132, |
| 173317 | /* 110 */ 132, 131, 128, 451, 1204, 1255, 1, 1, 582, 2, |
| 173318 | /* 120 */ 1259, 1571, 421, 1582, 380, 321, 1174, 155, 1174, 1584, |
| 173319 | /* 130 */ 413, 379, 1582, 544, 1341, 331, 112, 570, 570, 570, |
| 173320 | /* 140 */ 294, 1054, 134, 134, 134, 134, 133, 133, 132, 132, |
| 173321 | /* 150 */ 132, 131, 128, 451, 137, 138, 91, 1228, 1228, 1063, |
| 173322 | /* 160 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 288, |
| 173323 | /* 170 */ 288, 1204, 1205, 1204, 257, 288, 288, 511, 508, 507, |
| 173324 | /* 180 */ 139, 456, 573, 214, 562, 448, 447, 506, 573, 1616, |
| 173325 | /* 190 */ 562, 136, 136, 136, 136, 129, 401, 245, 134, 134, |
| 173326 | /* 200 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, |
| 173327 | /* 210 */ 283, 472, 346, 134, 134, 134, 134, 133, 133, 132, |
| 173328 | /* 220 */ 132, 132, 131, 128, 451, 574, 157, 936, 936, 455, |
| 173329 | /* 230 */ 229, 522, 1236, 413, 1236, 136, 136, 136, 136, 134, |
| 173330 | /* 240 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128, |
| 173331 | /* 250 */ 451, 132, 132, 132, 131, 128, 451, 137, 138, 91, |
| 173332 | /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, |
| 173333 | /* 270 */ 136, 136, 130, 127, 234, 451, 576, 413, 398, 1249, |
| 173334 | /* 280 */ 182, 93, 94, 134, 134, 134, 134, 133, 133, 132, |
| 173335 | /* 290 */ 132, 132, 131, 128, 451, 382, 388, 1204, 384, 82, |
| 173336 | /* 300 */ 82, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, |
| 173337 | /* 310 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134, |
| 173338 | /* 320 */ 133, 133, 132, 132, 132, 131, 128, 451, 133, 133, |
| 173339 | /* 330 */ 132, 132, 132, 131, 128, 451, 557, 1204, 303, 320, |
| 173340 | /* 340 */ 567, 123, 568, 481, 4, 556, 1149, 1657, 1628, 1657, |
| 173341 | /* 350 */ 45, 130, 127, 234, 1204, 1205, 1204, 1250, 571, 1169, |
| 173342 | /* 360 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131, |
| 173343 | /* 370 */ 128, 451, 1169, 288, 288, 1169, 1019, 576, 423, 1019, |
| 173344 | /* 380 */ 413, 452, 1602, 582, 2, 1259, 573, 44, 562, 96, |
| 173345 | /* 390 */ 321, 111, 155, 565, 1204, 1205, 1204, 523, 523, 1341, |
| 173346 | /* 400 */ 82, 82, 7, 44, 137, 138, 91, 1228, 1228, 1063, |
| 173347 | /* 410 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296, |
| 173348 | /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 320, 567, 121, 121, |
| 173349 | /* 430 */ 344, 467, 332, 344, 288, 288, 122, 557, 452, 577, |
| 173350 | /* 440 */ 452, 1169, 1169, 1028, 320, 567, 439, 573, 212, 562, |
| 173351 | /* 450 */ 1339, 1451, 547, 532, 1169, 1169, 1598, 1169, 1169, 417, |
| 173352 | /* 460 */ 320, 567, 245, 134, 134, 134, 134, 133, 133, 132, |
| 173353 | /* 470 */ 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031, 35, |
| 173354 | /* 480 */ 44, 1204, 1205, 1204, 473, 288, 288, 1328, 413, 1307, |
| 173355 | /* 490 */ 373, 1595, 360, 227, 455, 1204, 197, 1328, 573, 1147, |
| 173356 | /* 500 */ 562, 1333, 1333, 275, 576, 1188, 576, 341, 46, 198, |
| 173357 | /* 510 */ 538, 219, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, |
| 173358 | /* 520 */ 1053, 135, 135, 136, 136, 136, 136, 19, 19, 19, |
| 173359 | /* 530 */ 19, 413, 581, 1204, 1259, 512, 1204, 320, 567, 321, |
| 173360 | /* 540 */ 944, 155, 426, 492, 431, 943, 1204, 489, 1341, 1450, |
| 173361 | /* 550 */ 533, 1277, 1204, 1205, 1204, 137, 138, 91, 1228, 1228, |
| 173362 | /* 560 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, |
| 173363 | /* 570 */ 575, 134, 134, 134, 134, 133, 133, 132, 132, 132, |
| 173364 | /* 580 */ 131, 128, 451, 288, 288, 529, 288, 288, 373, 1595, |
| 173365 | /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 487, 562, 573, |
| 173366 | /* 600 */ 889, 562, 413, 1204, 1205, 1204, 886, 40, 22, 22, |
| 173367 | /* 610 */ 222, 245, 526, 1449, 134, 134, 134, 134, 133, 133, |
| 173368 | /* 620 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, |
| 173369 | /* 630 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173370 | /* 640 */ 136, 413, 182, 455, 1204, 879, 257, 288, 288, 511, |
| 173371 | /* 650 */ 508, 507, 373, 1595, 1568, 1331, 1331, 576, 889, 506, |
| 173372 | /* 660 */ 573, 44, 562, 560, 378, 137, 138, 91, 1228, 1228, |
| 173373 | /* 670 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, |
| 173374 | /* 680 */ 82, 82, 423, 576, 375, 134, 134, 134, 134, 133, |
| 173375 | /* 690 */ 133, 132, 132, 132, 131, 128, 451, 298, 288, 288, |
| 173376 | /* 700 */ 461, 1204, 1205, 1204, 1204, 535, 19, 19, 232, 550, |
| 173377 | /* 710 */ 1281, 573, 413, 562, 386, 437, 1187, 536, 320, 567, |
| 173378 | /* 720 */ 364, 433, 1279, 432, 134, 134, 134, 134, 133, 133, |
| 173379 | /* 730 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, |
| 173380 | /* 740 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173381 | /* 750 */ 136, 413, 213, 949, 1169, 1041, 449, 449, 449, 548, |
| 173382 | /* 760 */ 548, 1204, 1205, 1204, 7, 540, 1570, 1169, 377, 576, |
| 173383 | /* 770 */ 1169, 5, 1204, 1552, 3, 137, 138, 91, 1228, 1228, |
| 173384 | /* 780 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, |
| 173385 | /* 790 */ 576, 514, 19, 19, 1554, 134, 134, 134, 134, 133, |
| 173386 | /* 800 */ 133, 132, 132, 132, 131, 128, 451, 306, 1204, 434, |
| 173387 | /* 810 */ 1435, 1204, 1435, 19, 19, 274, 291, 372, 517, 367, |
| 173388 | /* 820 */ 516, 262, 413, 539, 551, 551, 1024, 363, 438, 1204, |
| 173389 | /* 830 */ 1205, 1204, 1659, 399, 134, 134, 134, 134, 133, 133, |
| 173390 | /* 840 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, |
| 173391 | /* 850 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173392 | /* 860 */ 136, 413, 481, 282, 282, 1204, 1205, 1204, 1204, 1205, |
| 173393 | /* 870 */ 1204, 131, 128, 451, 1568, 1568, 573, 1627, 562, 911, |
| 173394 | /* 880 */ 576, 428, 285, 429, 969, 137, 138, 91, 1228, 1228, |
| 173395 | /* 890 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, |
| 173396 | /* 900 */ 553, 576, 457, 19, 19, 134, 134, 134, 134, 133, |
| 173397 | /* 910 */ 133, 132, 132, 132, 131, 128, 451, 1345, 206, 158, |
| 173398 | /* 920 */ 1040, 1550, 48, 50, 19, 19, 1204, 289, 289, 573, |
| 173399 | /* 930 */ 1105, 562, 413, 1110, 1110, 495, 1125, 1029, 299, 207, |
| 173400 | /* 940 */ 573, 1028, 562, 403, 134, 134, 134, 134, 133, 133, |
| 173401 | /* 950 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228, |
| 173402 | /* 960 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173403 | /* 970 */ 136, 576, 375, 1028, 1028, 1030, 576, 233, 288, 288, |
| 173404 | /* 980 */ 481, 576, 1126, 1204, 1205, 1204, 1569, 1569, 377, 377, |
| 173405 | /* 990 */ 576, 573, 558, 562, 82, 82, 1204, 1127, 481, 82, |
| 173406 | /* 1000 */ 82, 115, 969, 1188, 82, 82, 576, 902, 141, 479, |
| 173407 | /* 1010 */ 971, 442, 1128, 81, 81, 134, 134, 134, 134, 133, |
| 173408 | /* 1020 */ 133, 132, 132, 132, 131, 128, 451, 288, 288, 19, |
| 173409 | /* 1030 */ 19, 316, 498, 922, 576, 413, 317, 1568, 515, 23, |
| 173410 | /* 1040 */ 573, 557, 562, 923, 552, 1575, 903, 472, 346, 7, |
| 173411 | /* 1050 */ 559, 532, 267, 1204, 1205, 1204, 302, 82, 82, 137, |
| 173412 | /* 1060 */ 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, |
| 173413 | /* 1070 */ 136, 136, 136, 136, 304, 576, 387, 1541, 424, 413, |
| 173414 | /* 1080 */ 970, 166, 460, 1204, 215, 47, 1568, 1224, 260, 259, |
| 173415 | /* 1090 */ 258, 487, 410, 409, 445, 1368, 315, 336, 82, 82, |
| 173416 | /* 1100 */ 460, 459, 435, 137, 138, 91, 1228, 1228, 1063, 1066, |
| 173417 | /* 1110 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134, |
| 173418 | /* 1120 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, |
| 173419 | /* 1130 */ 448, 447, 576, 358, 49, 446, 850, 851, 852, 1233, |
| 173420 | /* 1140 */ 1204, 1205, 1204, 487, 1235, 1224, 214, 108, 533, 1569, |
| 173421 | /* 1150 */ 498, 377, 1234, 1576, 498, 82, 82, 7, 333, 412, |
| 173422 | /* 1160 */ 335, 576, 134, 134, 134, 134, 133, 133, 132, 132, |
| 173423 | /* 1170 */ 132, 131, 128, 451, 460, 119, 534, 1236, 498, 1236, |
| 173424 | /* 1180 */ 111, 307, 413, 307, 145, 145, 1511, 10, 160, 267, |
| 173425 | /* 1190 */ 324, 343, 450, 1435, 353, 1505, 356, 325, 1569, 1340, |
| 173426 | /* 1200 */ 377, 498, 413, 520, 1511, 1513, 137, 138, 91, 1228, |
| 173427 | /* 1210 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173428 | /* 1220 */ 136, 576, 413, 1336, 1224, 874, 137, 126, 91, 1228, |
| 173429 | /* 1230 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173430 | /* 1240 */ 136, 862, 334, 305, 147, 147, 351, 138, 91, 1228, |
| 173431 | /* 1250 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, |
| 173432 | /* 1260 */ 136, 398, 1148, 6, 430, 134, 134, 134, 134, 133, |
| 173433 | /* 1270 */ 133, 132, 132, 132, 131, 128, 451, 882, 1511, 576, |
| 173434 | /* 1280 */ 1574, 893, 1224, 874, 7, 134, 134, 134, 134, 133, |
| 173435 | /* 1290 */ 133, 132, 132, 132, 131, 128, 451, 576, 546, 576, |
| 173436 | /* 1300 */ 470, 6, 66, 66, 576, 134, 134, 134, 134, 133, |
| 173437 | /* 1310 */ 133, 132, 132, 132, 131, 128, 451, 545, 1040, 1207, |
| 173438 | /* 1320 */ 67, 67, 21, 21, 576, 413, 1180, 53, 53, 969, |
| 173439 | /* 1330 */ 1282, 419, 328, 1435, 882, 1029, 1435, 1573, 503, 1028, |
| 173440 | /* 1340 */ 1250, 7, 488, 1085, 576, 463, 297, 68, 68, 463, |
| 173441 | /* 1350 */ 297, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, |
| 173442 | /* 1360 */ 136, 136, 136, 136, 576, 261, 576, 54, 54, 1126, |
| 173443 | /* 1370 */ 576, 1028, 1028, 1030, 576, 209, 238, 1207, 1180, 576, |
| 173444 | /* 1380 */ 471, 1498, 576, 1380, 1127, 287, 231, 69, 69, 70, |
| 173445 | /* 1390 */ 70, 569, 419, 71, 71, 420, 184, 72, 72, 1128, |
| 173446 | /* 1400 */ 576, 1188, 73, 73, 494, 55, 55, 443, 134, 134, |
| 173447 | /* 1410 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451, |
| 173448 | /* 1420 */ 564, 1244, 233, 56, 56, 97, 218, 485, 123, 568, |
| 173449 | /* 1430 */ 576, 4, 576, 983, 418, 576, 227, 576, 161, 576, |
| 173450 | /* 1440 */ 16, 984, 477, 576, 1223, 571, 576, 969, 123, 568, |
| 173451 | /* 1450 */ 363, 4, 576, 57, 57, 59, 59, 9, 60, 60, |
| 173452 | /* 1460 */ 74, 74, 75, 75, 108, 571, 76, 76, 452, 20, |
| 173453 | /* 1470 */ 20, 464, 576, 465, 576, 77, 77, 221, 1379, 125, |
| 173454 | /* 1480 */ 565, 576, 411, 576, 411, 242, 261, 576, 452, 576, |
| 173455 | /* 1490 */ 519, 474, 478, 534, 542, 143, 143, 144, 144, 541, |
| 173456 | /* 1500 */ 565, 466, 411, 411, 78, 78, 62, 62, 576, 1040, |
| 173457 | /* 1510 */ 79, 79, 63, 63, 542, 121, 121, 944, 1144, 543, |
| 173458 | /* 1520 */ 400, 462, 943, 122, 486, 452, 577, 452, 1557, 1040, |
| 173459 | /* 1530 */ 1028, 80, 80, 319, 576, 121, 121, 337, 38, 123, |
| 173460 | /* 1540 */ 568, 1530, 4, 122, 411, 452, 577, 452, 576, 120, |
| 173461 | /* 1550 */ 1028, 117, 576, 528, 576, 418, 571, 64, 64, 293, |
| 173462 | /* 1560 */ 109, 222, 1028, 1028, 1030, 1031, 35, 475, 342, 39, |
| 173463 | /* 1570 */ 111, 170, 170, 901, 900, 171, 171, 87, 87, 452, |
| 173464 | /* 1580 */ 908, 909, 1028, 1028, 1030, 1031, 35, 986, 987, 292, |
| 173465 | /* 1590 */ 300, 565, 1188, 323, 396, 396, 395, 277, 393, 553, |
| 173466 | /* 1600 */ 1092, 859, 244, 1032, 1529, 542, 576, 371, 490, 1021, |
| 173467 | /* 1610 */ 541, 266, 1188, 480, 239, 266, 327, 370, 348, 576, |
| 173468 | /* 1620 */ 1040, 482, 1376, 266, 326, 352, 121, 121, 355, 65, |
| 173469 | /* 1630 */ 65, 1153, 123, 568, 122, 4, 452, 577, 452, 357, |
| 173470 | /* 1640 */ 576, 1028, 83, 83, 576, 347, 576, 111, 1311, 571, |
| 173471 | /* 1650 */ 504, 361, 263, 111, 241, 1366, 359, 165, 1092, 111, |
| 173472 | /* 1660 */ 1324, 1032, 175, 146, 146, 43, 1310, 84, 84, 168, |
| 173473 | /* 1670 */ 168, 1309, 452, 1028, 1028, 1030, 1031, 35, 1601, 1192, |
| 173474 | /* 1680 */ 454, 1308, 240, 292, 565, 366, 376, 1389, 396, 396, |
| 173475 | /* 1690 */ 395, 277, 393, 1434, 1088, 859, 263, 974, 942, 266, |
| 173476 | /* 1700 */ 125, 576, 939, 1188, 125, 1104, 1362, 1104, 239, 576, |
| 173477 | /* 1710 */ 327, 123, 568, 1040, 4, 205, 1374, 414, 326, 121, |
| 173478 | /* 1720 */ 121, 948, 320, 567, 148, 148, 576, 122, 571, 452, |
| 173479 | /* 1730 */ 577, 452, 142, 142, 1028, 563, 1103, 576, 1103, 1589, |
| 173480 | /* 1740 */ 1439, 576, 872, 941, 159, 125, 458, 1289, 241, 169, |
| 173481 | /* 1750 */ 169, 452, 1280, 1268, 1267, 1269, 175, 576, 1609, 43, |
| 173482 | /* 1760 */ 162, 162, 499, 565, 152, 152, 1028, 1028, 1030, 1031, |
| 173483 | /* 1770 */ 35, 576, 280, 167, 1359, 312, 240, 12, 313, 576, |
| 173484 | /* 1780 */ 151, 151, 314, 90, 568, 224, 4, 397, 237, 339, |
| 173485 | /* 1790 */ 509, 576, 1040, 1307, 149, 149, 1188, 1421, 121, 121, |
| 173486 | /* 1800 */ 571, 576, 150, 150, 1416, 576, 122, 1409, 452, 577, |
| 173487 | /* 1810 */ 452, 414, 295, 1028, 86, 86, 320, 567, 340, 576, |
| 173488 | /* 1820 */ 345, 1426, 1425, 452, 88, 88, 301, 576, 85, 85, |
| 173489 | /* 1830 */ 404, 484, 555, 228, 369, 565, 1502, 1501, 210, 1371, |
| 173490 | /* 1840 */ 458, 1372, 52, 52, 211, 1028, 1028, 1030, 1031, 35, |
| 173491 | /* 1850 */ 58, 58, 1370, 1369, 566, 391, 223, 1612, 1244, 270, |
| 173492 | /* 1860 */ 1549, 186, 1547, 1241, 1040, 422, 96, 235, 195, 180, |
| 173493 | /* 1870 */ 121, 121, 92, 220, 1507, 1188, 1422, 95, 122, 188, |
| 173494 | /* 1880 */ 452, 577, 452, 1192, 454, 1028, 468, 292, 190, 191, |
| 173495 | /* 1890 */ 13, 192, 396, 396, 395, 277, 393, 469, 502, 859, |
| 173496 | /* 1900 */ 193, 247, 109, 402, 554, 1428, 1427, 14, 1430, 491, |
| 173497 | /* 1910 */ 476, 199, 239, 405, 327, 1496, 251, 1028, 1028, 1030, |
| 173498 | /* 1920 */ 1031, 35, 326, 102, 497, 281, 253, 203, 1518, 350, |
| 173499 | /* 1930 */ 354, 500, 254, 407, 1270, 255, 518, 123, 568, 436, |
| 173500 | /* 1940 */ 4, 1327, 1318, 104, 1326, 893, 1325, 1188, 229, 1317, |
| 173501 | /* 1950 */ 1297, 440, 241, 1626, 571, 1625, 408, 1296, 368, 1295, |
| 173502 | /* 1960 */ 175, 1624, 1594, 43, 527, 441, 310, 311, 374, 268, |
| 173503 | /* 1970 */ 269, 444, 1580, 1394, 1579, 140, 553, 452, 11, 1393, |
| 173504 | /* 1980 */ 240, 1483, 385, 110, 318, 537, 116, 216, 1350, 565, |
| 173505 | /* 1990 */ 42, 383, 389, 579, 1349, 390, 1198, 276, 278, 279, |
| 173506 | /* 2000 */ 580, 1265, 1260, 415, 416, 172, 185, 1534, 1535, 1533, |
| 173507 | /* 2010 */ 1532, 156, 173, 89, 308, 414, 225, 846, 1040, 453, |
| 173508 | /* 2020 */ 320, 567, 174, 217, 121, 121, 226, 322, 154, 236, |
| 173509 | /* 2030 */ 1102, 1100, 122, 330, 452, 577, 452, 187, 176, 1028, |
| 173510 | /* 2040 */ 1223, 243, 189, 925, 458, 246, 338, 1116, 194, 177, |
| 173511 | /* 2050 */ 178, 425, 98, 196, 179, 427, 99, 100, 101, 1119, |
| 173512 | /* 2060 */ 248, 1115, 163, 249, 24, 250, 1108, 1238, 349, 266, |
| 173513 | /* 2070 */ 200, 1028, 1028, 1030, 1031, 35, 496, 252, 201, 15, |
| 173514 | /* 2080 */ 370, 861, 501, 256, 202, 513, 505, 103, 25, 510, |
| 173515 | /* 2090 */ 362, 26, 891, 105, 365, 309, 904, 164, 27, 521, |
| 173516 | /* 2100 */ 106, 1188, 1185, 1069, 978, 1155, 107, 17, 1154, 181, |
| 173517 | /* 2110 */ 230, 284, 286, 204, 972, 125, 1175, 265, 28, 1171, |
| 173518 | /* 2120 */ 29, 30, 1173, 1179, 1160, 1178, 31, 41, 32, 208, |
| 173519 | /* 2130 */ 549, 33, 111, 113, 1083, 1070, 114, 8, 1068, 1072, |
| 173520 | /* 2140 */ 34, 1073, 561, 1124, 118, 271, 36, 18, 1194, 1033, |
| 173521 | /* 2150 */ 873, 124, 394, 37, 1193, 935, 1256, 572, 183, 153, |
| 173522 | /* 2160 */ 1256, 1256, 272, 1256, 1256, 273, 1617, |
| 173523 | }; |
| 173524 | static const YYCODETYPE yy_lookahead[] = { |
| 173525 | /* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194, |
| 173526 | /* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19, |
| 173527 | /* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217, |
| @@ -173369,161 +173586,161 @@ | |
| 173586 | /* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107, |
| 173587 | /* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173588 | /* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173589 | /* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122, |
| 173590 | /* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132, |
| 173591 | /* 660 */ 253, 81, 255, 205, 194, 43, 44, 45, 46, 47, |
| 173592 | /* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173593 | /* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106, |
| 173594 | /* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241, |
| 173595 | /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 194, 194, |
| 173596 | /* 710 */ 194, 253, 19, 255, 194, 19, 23, 254, 138, 139, |
| 173597 | /* 720 */ 24, 232, 206, 233, 102, 103, 104, 105, 106, 107, |
| 173598 | /* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173599 | /* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173600 | /* 750 */ 57, 19, 264, 108, 76, 23, 211, 212, 213, 311, |
| 173601 | /* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194, |
| 173602 | /* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47, |
| 173603 | /* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173604 | /* 790 */ 194, 95, 217, 218, 194, 102, 103, 104, 105, 106, |
| 173605 | /* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113, |
| 173606 | /* 810 */ 194, 59, 194, 217, 218, 119, 120, 121, 122, 123, |
| 173607 | /* 820 */ 124, 125, 19, 145, 309, 310, 23, 131, 232, 116, |
| 173608 | /* 830 */ 117, 118, 303, 304, 102, 103, 104, 105, 106, 107, |
| 173609 | /* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173610 | /* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173611 | /* 860 */ 57, 19, 194, 240, 241, 116, 117, 118, 116, 117, |
| 173612 | /* 870 */ 118, 111, 112, 113, 194, 194, 253, 23, 255, 25, |
| 173613 | /* 880 */ 194, 265, 23, 265, 25, 43, 44, 45, 46, 47, |
| 173614 | /* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 173615 | /* 900 */ 145, 194, 194, 217, 218, 102, 103, 104, 105, 106, |
| 173616 | /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 164, |
| 173617 | /* 920 */ 100, 194, 242, 242, 217, 218, 59, 240, 241, 253, |
| 173618 | /* 930 */ 11, 255, 19, 127, 128, 129, 23, 117, 270, 232, |
| 173619 | /* 940 */ 253, 121, 255, 205, 102, 103, 104, 105, 106, 107, |
| 173620 | /* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46, |
| 173621 | /* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173622 | /* 970 */ 57, 194, 194, 153, 154, 155, 194, 118, 240, 241, |
| 173623 | /* 980 */ 194, 194, 12, 116, 117, 118, 306, 306, 308, 308, |
| 173624 | /* 990 */ 194, 253, 205, 255, 217, 218, 59, 27, 194, 217, |
| 173625 | /* 1000 */ 218, 159, 143, 183, 217, 218, 194, 35, 22, 271, |
| 173626 | /* 1010 */ 143, 233, 42, 217, 218, 102, 103, 104, 105, 106, |
| 173627 | /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 240, 241, 217, |
| 173628 | /* 1030 */ 218, 254, 194, 63, 194, 19, 254, 194, 66, 22, |
| 173629 | /* 1040 */ 253, 254, 255, 73, 232, 312, 74, 128, 129, 316, |
| 173630 | /* 1050 */ 263, 19, 24, 116, 117, 118, 270, 217, 218, 43, |
| 173631 | /* 1060 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 173632 | /* 1070 */ 54, 55, 56, 57, 270, 194, 280, 239, 61, 19, |
| 173633 | /* 1080 */ 143, 23, 194, 59, 24, 242, 194, 59, 127, 128, |
| 173634 | /* 1090 */ 129, 194, 106, 107, 254, 261, 262, 16, 217, 218, |
| 173635 | /* 1100 */ 212, 213, 130, 43, 44, 45, 46, 47, 48, 49, |
| 173636 | /* 1110 */ 50, 51, 52, 53, 54, 55, 56, 57, 102, 103, |
| 173637 | /* 1120 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, |
| 173638 | /* 1130 */ 106, 107, 194, 16, 242, 254, 7, 8, 9, 115, |
| 173639 | /* 1140 */ 116, 117, 118, 194, 120, 117, 194, 115, 116, 306, |
| 173640 | /* 1150 */ 194, 308, 128, 312, 194, 217, 218, 316, 77, 207, |
| 173641 | /* 1160 */ 79, 194, 102, 103, 104, 105, 106, 107, 108, 109, |
| 173642 | /* 1170 */ 110, 111, 112, 113, 286, 159, 144, 153, 194, 155, |
| 173643 | /* 1180 */ 25, 229, 19, 231, 217, 218, 194, 22, 22, 24, |
| 173644 | /* 1190 */ 194, 294, 254, 194, 77, 239, 79, 194, 306, 239, |
| 173645 | /* 1200 */ 308, 194, 19, 145, 212, 213, 43, 44, 45, 46, |
| 173646 | /* 1210 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173647 | /* 1220 */ 57, 194, 19, 239, 59, 59, 43, 44, 45, 46, |
| 173648 | /* 1230 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173649 | /* 1240 */ 57, 21, 161, 294, 217, 218, 239, 44, 45, 46, |
| 173650 | /* 1250 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 173651 | /* 1260 */ 57, 22, 23, 214, 265, 102, 103, 104, 105, 106, |
| 173652 | /* 1270 */ 107, 108, 109, 110, 111, 112, 113, 59, 286, 194, |
| 173653 | /* 1280 */ 312, 126, 117, 117, 316, 102, 103, 104, 105, 106, |
| 173654 | /* 1290 */ 107, 108, 109, 110, 111, 112, 113, 194, 66, 194, |
| 173655 | /* 1300 */ 80, 214, 217, 218, 194, 102, 103, 104, 105, 106, |
| 173656 | /* 1310 */ 107, 108, 109, 110, 111, 112, 113, 85, 100, 59, |
| 173657 | /* 1320 */ 217, 218, 217, 218, 194, 19, 94, 217, 218, 25, |
| 173658 | /* 1330 */ 209, 210, 194, 194, 116, 117, 194, 312, 19, 121, |
| 173659 | /* 1340 */ 101, 316, 293, 123, 194, 262, 262, 217, 218, 266, |
| 173660 | /* 1350 */ 266, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 173661 | /* 1360 */ 54, 55, 56, 57, 194, 46, 194, 217, 218, 12, |
| 173662 | /* 1370 */ 194, 153, 154, 155, 194, 288, 15, 117, 146, 194, |
| 173663 | /* 1380 */ 293, 161, 194, 194, 27, 258, 259, 217, 218, 217, |
| 173664 | /* 1390 */ 218, 209, 210, 217, 218, 301, 302, 217, 218, 42, |
| 173665 | /* 1400 */ 194, 183, 217, 218, 265, 217, 218, 265, 102, 103, |
| 173666 | /* 1410 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, |
| 173667 | /* 1420 */ 63, 60, 118, 217, 218, 149, 150, 19, 19, 20, |
| 173668 | /* 1430 */ 194, 22, 194, 31, 115, 194, 25, 194, 22, 194, |
| 173669 | /* 1440 */ 24, 39, 115, 194, 25, 36, 194, 143, 19, 20, |
| 173670 | /* 1450 */ 131, 22, 194, 217, 218, 217, 218, 48, 217, 218, |
| 173671 | /* 1460 */ 217, 218, 217, 218, 115, 36, 217, 218, 59, 217, |
| 173672 | /* 1470 */ 218, 245, 194, 245, 194, 217, 218, 150, 194, 25, |
| 173673 | /* 1480 */ 71, 194, 256, 194, 256, 24, 46, 194, 59, 194, |
| 173674 | /* 1490 */ 108, 245, 245, 144, 85, 217, 218, 217, 218, 90, |
| 173675 | /* 1500 */ 71, 194, 256, 256, 217, 218, 217, 218, 194, 100, |
| 173676 | /* 1510 */ 217, 218, 217, 218, 85, 106, 107, 135, 23, 90, |
| 173677 | /* 1520 */ 25, 271, 140, 114, 116, 116, 117, 118, 194, 100, |
| 173678 | /* 1530 */ 121, 217, 218, 245, 194, 106, 107, 194, 22, 19, |
| 173679 | /* 1540 */ 20, 194, 22, 114, 256, 116, 117, 118, 194, 158, |
| 173680 | /* 1550 */ 121, 160, 194, 19, 194, 115, 36, 217, 218, 99, |
| 173681 | /* 1560 */ 149, 142, 153, 154, 155, 156, 157, 129, 23, 53, |
| 173682 | /* 1570 */ 25, 217, 218, 120, 121, 217, 218, 217, 218, 59, |
| 173683 | /* 1580 */ 7, 8, 153, 154, 155, 156, 157, 83, 84, 5, |
| 173684 | /* 1590 */ 152, 71, 183, 133, 10, 11, 12, 13, 14, 145, |
| 173685 | /* 1600 */ 59, 17, 141, 59, 194, 85, 194, 121, 194, 23, |
| 173686 | /* 1610 */ 90, 25, 183, 23, 30, 25, 32, 131, 194, 194, |
| 173687 | /* 1620 */ 100, 23, 194, 25, 40, 194, 106, 107, 194, 217, |
| 173688 | /* 1630 */ 218, 97, 19, 20, 114, 22, 116, 117, 118, 194, |
| 173689 | /* 1640 */ 194, 121, 217, 218, 194, 23, 194, 25, 227, 36, |
| 173690 | /* 1650 */ 23, 23, 25, 25, 70, 260, 194, 23, 117, 25, |
| 173691 | /* 1660 */ 194, 117, 78, 217, 218, 81, 227, 217, 218, 217, |
| 173692 | /* 1670 */ 218, 227, 59, 153, 154, 155, 156, 157, 0, 1, |
| 173693 | /* 1680 */ 2, 194, 98, 5, 71, 194, 194, 194, 10, 11, |
| 173694 | /* 1690 */ 12, 13, 14, 194, 23, 17, 25, 23, 23, 25, |
| 173695 | /* 1700 */ 25, 194, 23, 183, 25, 153, 194, 155, 30, 194, |
| 173696 | /* 1710 */ 32, 19, 20, 100, 22, 257, 194, 133, 40, 106, |
| 173697 | /* 1720 */ 107, 108, 138, 139, 217, 218, 194, 114, 36, 116, |
| 173698 | /* 1730 */ 117, 118, 217, 218, 121, 237, 153, 194, 155, 321, |
| 173699 | /* 1740 */ 194, 194, 23, 23, 25, 25, 162, 194, 70, 217, |
| 173700 | /* 1750 */ 218, 59, 194, 194, 194, 194, 78, 194, 194, 81, |
| 173701 | /* 1760 */ 217, 218, 290, 71, 217, 218, 153, 154, 155, 156, |
| 173702 | /* 1770 */ 157, 194, 289, 243, 257, 257, 98, 244, 257, 194, |
| 173703 | /* 1780 */ 217, 218, 257, 19, 20, 215, 22, 192, 299, 295, |
| 173704 | /* 1790 */ 221, 194, 100, 226, 217, 218, 183, 273, 106, 107, |
| 173705 | /* 1800 */ 36, 194, 217, 218, 269, 194, 114, 269, 116, 117, |
| 173706 | /* 1810 */ 118, 133, 246, 121, 217, 218, 138, 139, 247, 194, |
| 173707 | /* 1820 */ 246, 273, 273, 59, 217, 218, 247, 194, 217, 218, |
| 173708 | /* 1830 */ 273, 295, 140, 230, 220, 71, 220, 220, 250, 261, |
| 173709 | /* 1840 */ 162, 261, 217, 218, 250, 153, 154, 155, 156, 157, |
| 173710 | /* 1850 */ 217, 218, 261, 261, 282, 246, 244, 197, 60, 141, |
| 173711 | /* 1860 */ 201, 299, 201, 38, 100, 201, 151, 299, 22, 43, |
| 173712 | /* 1870 */ 106, 107, 296, 150, 285, 183, 274, 296, 114, 235, |
| 173713 | /* 1880 */ 116, 117, 118, 1, 2, 121, 18, 5, 238, 238, |
| 173714 | /* 1890 */ 272, 238, 10, 11, 12, 13, 14, 201, 18, 17, |
| 173715 | /* 1900 */ 238, 200, 149, 247, 140, 274, 274, 272, 235, 201, |
| 173716 | /* 1910 */ 247, 235, 30, 247, 32, 247, 200, 153, 154, 155, |
| 173717 | /* 1920 */ 156, 157, 40, 158, 62, 201, 200, 22, 292, 291, |
| 173718 | /* 1930 */ 201, 222, 200, 222, 201, 200, 115, 19, 20, 64, |
| 173719 | /* 1940 */ 22, 219, 228, 22, 219, 126, 219, 183, 165, 228, |
| 173720 | /* 1950 */ 219, 24, 70, 225, 36, 225, 222, 221, 219, 219, |
| 173721 | /* 1960 */ 78, 219, 315, 81, 307, 113, 284, 284, 222, 201, |
| 173722 | /* 1970 */ 91, 82, 320, 267, 320, 148, 145, 59, 22, 267, |
| 173723 | /* 1980 */ 98, 279, 201, 147, 281, 146, 158, 249, 251, 71, |
| 173724 | /* 1990 */ 25, 250, 248, 203, 251, 247, 13, 195, 195, 6, |
| 173725 | /* 2000 */ 193, 193, 193, 305, 305, 208, 302, 214, 214, 214, |
| 173726 | /* 2010 */ 214, 223, 208, 214, 223, 133, 215, 4, 100, 3, |
| 173727 | /* 2020 */ 138, 139, 208, 22, 106, 107, 215, 163, 16, 15, |
| 173728 | /* 2030 */ 23, 23, 114, 139, 116, 117, 118, 151, 130, 121, |
| 173729 | /* 2040 */ 25, 24, 142, 20, 162, 144, 16, 1, 142, 130, |
| 173730 | /* 2050 */ 130, 61, 53, 151, 130, 37, 53, 53, 53, 116, |
| 173731 | /* 2060 */ 34, 1, 5, 141, 22, 115, 68, 75, 161, 25, |
| 173732 | /* 2070 */ 68, 153, 154, 155, 156, 157, 41, 141, 115, 24, |
| 173733 | /* 2080 */ 131, 20, 19, 125, 22, 96, 67, 22, 22, 67, |
| 173734 | /* 2090 */ 23, 22, 59, 22, 24, 67, 28, 23, 34, 22, |
| 173735 | /* 2100 */ 149, 183, 23, 23, 116, 23, 25, 22, 97, 37, |
| 173736 | /* 2110 */ 141, 23, 23, 22, 143, 25, 75, 34, 34, 88, |
| 173737 | /* 2120 */ 34, 34, 86, 75, 23, 93, 34, 22, 34, 25, |
| 173738 | /* 2130 */ 24, 34, 25, 142, 23, 23, 142, 44, 23, 23, |
| 173739 | /* 2140 */ 22, 11, 25, 23, 25, 22, 22, 22, 1, 23, |
| 173740 | /* 2150 */ 23, 22, 15, 22, 1, 135, 322, 25, 25, 23, |
| 173741 | /* 2160 */ 322, 322, 141, 322, 322, 141, 141, 322, 322, 322, |
| 173742 | /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173743 | /* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173744 | /* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173745 | /* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173746 | /* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| @@ -173535,181 +173752,184 @@ | |
| 173752 | /* 2270 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173753 | /* 2280 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173754 | /* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173755 | /* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173756 | /* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173757 | /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173758 | /* 2330 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173759 | /* 2340 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, |
| 173760 | /* 2350 */ 322, 322, 322, |
| 173761 | }; |
| 173762 | #define YY_SHIFT_COUNT (582) |
| 173763 | #define YY_SHIFT_MIN (0) |
| 173764 | #define YY_SHIFT_MAX (2153) |
| 173765 | static const unsigned short int yy_shift_ofst[] = { |
| 173766 | /* 0 */ 1882, 1678, 1584, 322, 322, 399, 306, 1409, 1429, 1520, |
| 173767 | /* 10 */ 1918, 1918, 1918, 580, 399, 399, 399, 399, 399, 0, |
| 173768 | /* 20 */ 0, 214, 1163, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173769 | /* 30 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1024, 1024, |
| 173770 | /* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201, |
| 173771 | /* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693, |
| 173772 | /* 60 */ 732, 803, 842, 913, 1016, 1060, 1163, 1163, 1163, 1163, |
| 173773 | /* 70 */ 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, |
| 173774 | /* 80 */ 1163, 1163, 1163, 1163, 1183, 1163, 1203, 1306, 1306, 1613, |
| 173775 | /* 90 */ 1692, 1764, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173776 | /* 100 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173777 | /* 110 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173778 | /* 120 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173779 | /* 130 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, |
| 173780 | /* 140 */ 1918, 1918, 137, 181, 181, 181, 181, 181, 181, 181, |
| 173781 | /* 150 */ 96, 222, 143, 477, 713, 1220, 1319, 713, 713, 79, |
| 173782 | /* 160 */ 79, 713, 760, 83, 65, 65, 65, 288, 162, 162, |
| 173783 | /* 170 */ 2167, 2167, 696, 696, 696, 238, 474, 474, 474, 474, |
| 173784 | /* 180 */ 970, 970, 678, 477, 324, 398, 713, 713, 713, 713, |
| 173785 | /* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
| 173786 | /* 200 */ 713, 713, 713, 713, 713, 1032, 366, 366, 713, 919, |
| 173787 | /* 210 */ 283, 283, 434, 434, 1260, 1260, 755, 2167, 2167, 2167, |
| 173788 | /* 220 */ 2167, 2167, 2167, 2167, 1218, 820, 820, 487, 527, 585, |
| 173789 | /* 230 */ 645, 749, 867, 937, 752, 713, 713, 713, 713, 713, |
| 173790 | /* 240 */ 713, 713, 713, 713, 713, 303, 713, 713, 713, 713, |
| 173791 | /* 250 */ 713, 713, 713, 713, 713, 713, 713, 713, 972, 972, |
| 173792 | /* 260 */ 972, 713, 713, 713, 859, 713, 713, 713, 1165, 1232, |
| 173793 | /* 270 */ 713, 1357, 713, 713, 713, 713, 713, 713, 713, 713, |
| 173794 | /* 280 */ 806, 7, 91, 1028, 1028, 1028, 1028, 1304, 91, 91, |
| 173795 | /* 290 */ 1382, 986, 1129, 1361, 1327, 1276, 468, 1276, 1408, 1411, |
| 173796 | /* 300 */ 1327, 1327, 1411, 1327, 468, 1408, 1155, 854, 1440, 1402, |
| 173797 | /* 310 */ 1402, 1402, 1349, 1349, 1349, 1349, 1454, 1454, 1391, 1419, |
| 173798 | /* 320 */ 405, 1416, 1798, 1798, 1718, 1718, 1825, 1825, 1718, 1715, |
| 173799 | /* 330 */ 1723, 1846, 1826, 1868, 1868, 1868, 1868, 1718, 1880, 1753, |
| 173800 | /* 340 */ 1723, 1723, 1753, 1846, 1826, 1753, 1826, 1753, 1718, 1880, |
| 173801 | /* 350 */ 1765, 1862, 1718, 1880, 1905, 1718, 1880, 1718, 1880, 1905, |
| 173802 | /* 360 */ 1821, 1821, 1821, 1875, 1921, 1921, 1905, 1821, 1819, 1821, |
| 173803 | /* 370 */ 1875, 1821, 1821, 1783, 1927, 1852, 1852, 1905, 1718, 1879, |
| 173804 | /* 380 */ 1879, 1889, 1889, 1827, 1831, 1956, 1718, 1828, 1827, 1836, |
| 173805 | /* 390 */ 1839, 1753, 1965, 1983, 1983, 1993, 1993, 1993, 2167, 2167, |
| 173806 | /* 400 */ 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, |
| 173807 | /* 410 */ 2167, 2167, 2167, 20, 1081, 256, 1239, 1117, 961, 1166, |
| 173808 | /* 420 */ 1495, 1460, 1516, 1461, 355, 1438, 1545, 1017, 1586, 1590, |
| 173809 | /* 430 */ 1598, 1622, 1627, 1628, 541, 1453, 1573, 1486, 1634, 1058, |
| 173810 | /* 440 */ 1534, 1541, 1671, 1674, 1504, 1675, 1679, 1552, 1583, 1719, |
| 173811 | /* 450 */ 1720, 1544, 48, 2013, 2016, 2001, 1864, 2014, 2012, 2007, |
| 173812 | /* 460 */ 2008, 1894, 1886, 1908, 2015, 2015, 2017, 1900, 2023, 1901, |
| 173813 | /* 470 */ 2030, 2046, 1906, 1919, 2015, 1920, 1990, 2018, 2015, 1902, |
| 173814 | /* 480 */ 1999, 2003, 2004, 2005, 1924, 1943, 2026, 1922, 2060, 2057, |
| 173815 | /* 490 */ 2042, 1950, 1907, 1998, 2044, 2002, 1992, 2035, 1936, 1963, |
| 173816 | /* 500 */ 2055, 2061, 2063, 1949, 1958, 2062, 2019, 2065, 2066, 2067, |
| 173817 | /* 510 */ 2069, 2022, 2033, 2070, 1989, 2068, 2071, 2028, 2072, 2074, |
| 173818 | /* 520 */ 2064, 1951, 2077, 2079, 2080, 2081, 2082, 2085, 2011, 1969, |
| 173819 | /* 530 */ 2088, 2089, 1988, 2083, 2091, 1971, 2090, 2084, 2086, 2087, |
| 173820 | /* 540 */ 2092, 2031, 2041, 2036, 2093, 2048, 2032, 2094, 2101, 2105, |
| 173821 | /* 550 */ 2106, 2104, 2107, 2097, 1991, 1994, 2111, 2090, 2112, 2115, |
| 173822 | /* 560 */ 2116, 2118, 2117, 2119, 2120, 2123, 2130, 2124, 2125, 2126, |
| 173823 | /* 570 */ 2127, 2129, 2131, 2132, 2020, 2021, 2024, 2025, 2133, 2136, |
| 173824 | /* 580 */ 2137, 2147, 2153, |
| 173825 | }; |
| 173826 | #define YY_REDUCE_COUNT (412) |
| 173827 | #define YY_REDUCE_MIN (-275) |
| 173828 | #define YY_REDUCE_MAX (1814) |
| 173829 | static const short yy_reduce_ofst[] = { |
| 173830 | /* 0 */ -71, 194, 343, 787, -180, -177, 738, -194, -188, -185, |
| 173831 | /* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178, |
| 173832 | /* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686, |
| 173833 | /* 30 */ 707, 777, 782, 812, 840, 796, 881, 938, 888, 992, |
| 173834 | /* 40 */ 86, 448, 952, 680, 681, 843, 892, 623, 687, 623, |
| 173835 | /* 50 */ 687, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173836 | /* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173837 | /* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173838 | /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, 391, |
| 173839 | /* 90 */ 967, 1027, 1085, 1103, 1105, 1110, 1130, 1150, 1170, 1172, |
| 173840 | /* 100 */ 1176, 1180, 1185, 1188, 1206, 1236, 1238, 1241, 1243, 1245, |
| 173841 | /* 110 */ 1249, 1252, 1258, 1278, 1280, 1287, 1289, 1293, 1295, 1314, |
| 173842 | /* 120 */ 1340, 1354, 1358, 1360, 1412, 1425, 1446, 1450, 1452, 1507, |
| 173843 | /* 130 */ 1515, 1532, 1543, 1547, 1563, 1577, 1585, 1597, 1607, 1611, |
| 173844 | /* 140 */ 1625, 1633, -261, -261, -261, -261, -261, -261, -261, -261, |
| 173845 | /* 150 */ -261, -261, -261, -186, -117, 260, 263, 460, 515, -74, |
| 173846 | /* 160 */ 545, -181, -261, 1087, 176, 274, 338, 676, -261, -261, |
| 173847 | /* 170 */ -261, -261, -212, -212, -212, -184, 149, 668, 786, 804, |
| 173848 | /* 180 */ 265, 419, -254, 516, 529, 529, -11, -129, 184, 488, |
| 173849 | /* 190 */ 838, 956, 960, 984, 403, 616, 897, 618, 999, 949, |
| 173850 | /* 200 */ 1139, 1007, 490, 778, 1142, 834, 733, 841, -189, 1049, |
| 173851 | /* 210 */ 968, 1025, 1083, 1084, 1121, 1182, 46, 1094, 1226, 1228, |
| 173852 | /* 220 */ 1246, 1247, 1127, 1288, -210, -190, -176, -115, 117, 262, |
| 173853 | /* 230 */ 376, 470, 511, 514, 520, 579, 600, 708, 727, 996, |
| 173854 | /* 240 */ 1003, 1138, 1189, 1284, 1307, 1250, 1334, 1343, 1347, 1410, |
| 173855 | /* 250 */ 1414, 1424, 1428, 1431, 1434, 1445, 1462, 1466, 1421, 1439, |
| 173856 | /* 260 */ 1444, 1487, 1491, 1492, 1395, 1493, 1499, 1512, 1458, 1418, |
| 173857 | /* 270 */ 1522, 1498, 1546, 376, 1553, 1558, 1559, 1560, 1561, 1564, |
| 173858 | /* 280 */ 1472, 1483, 1530, 1517, 1518, 1521, 1525, 1395, 1530, 1530, |
| 173859 | /* 290 */ 1533, 1570, 1595, 1489, 1524, 1535, 1566, 1538, 1494, 1571, |
| 173860 | /* 300 */ 1548, 1549, 1579, 1557, 1574, 1536, 1569, 1603, 1567, 1614, |
| 173861 | /* 310 */ 1616, 1617, 1578, 1580, 1591, 1592, 1588, 1594, 1572, 1609, |
| 173862 | /* 320 */ 1612, 1660, 1562, 1568, 1659, 1661, 1576, 1581, 1664, 1589, |
| 173863 | /* 330 */ 1602, 1618, 1644, 1650, 1651, 1653, 1662, 1696, 1701, 1656, |
| 173864 | /* 340 */ 1631, 1632, 1663, 1635, 1673, 1666, 1676, 1668, 1708, 1716, |
| 173865 | /* 350 */ 1636, 1638, 1724, 1726, 1709, 1729, 1732, 1733, 1735, 1711, |
| 173866 | /* 360 */ 1722, 1725, 1727, 1714, 1728, 1730, 1734, 1731, 1736, 1739, |
| 173867 | /* 370 */ 1721, 1740, 1742, 1647, 1657, 1682, 1683, 1746, 1768, 1652, |
| 173868 | /* 380 */ 1654, 1706, 1712, 1737, 1741, 1702, 1781, 1703, 1743, 1738, |
| 173869 | /* 390 */ 1744, 1748, 1790, 1802, 1803, 1807, 1808, 1809, 1698, 1699, |
| 173870 | /* 400 */ 1704, 1797, 1793, 1794, 1795, 1796, 1804, 1788, 1791, 1801, |
| 173871 | /* 410 */ 1811, 1799, 1814, |
| 173872 | }; |
| 173873 | static const YYACTIONTYPE yy_default[] = { |
| 173874 | /* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254, |
| 173875 | /* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397, |
| 173876 | /* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173877 | /* 30 */ 1254, 1254, 1254, 1254, 1254, 1490, 1254, 1254, 1254, 1254, |
| 173878 | /* 40 */ 1578, 1578, 1254, 1254, 1254, 1254, 1254, 1563, 1562, 1254, |
| 173879 | /* 50 */ 1254, 1254, 1406, 1254, 1413, 1254, 1254, 1254, 1254, 1254, |
| 173880 | /* 60 */ 1492, 1493, 1254, 1254, 1254, 1254, 1543, 1545, 1508, 1420, |
| 173881 | /* 70 */ 1419, 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488, |
| 173882 | /* 80 */ 1486, 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254, |
| 173883 | /* 90 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173884 | /* 100 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173885 | /* 110 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173886 | /* 120 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173887 | /* 130 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173888 | /* 140 */ 1254, 1254, 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457, |
| 173889 | /* 150 */ 1456, 1458, 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254, |
| 173890 | /* 160 */ 1254, 1254, 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461, |
| 173891 | /* 170 */ 1473, 1472, 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254, |
| 173892 | /* 180 */ 1254, 1254, 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173893 | /* 190 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173894 | /* 200 */ 1254, 1254, 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287, |
| 173895 | /* 210 */ 1578, 1578, 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358, |
| 173896 | /* 220 */ 1358, 1358, 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173897 | /* 230 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548, |
| 173898 | /* 240 */ 1546, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173899 | /* 250 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173900 | /* 260 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254, |
| 173901 | /* 270 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608, |
| 173902 | /* 280 */ 1254, 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342, |
| 173903 | /* 290 */ 1357, 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410, |
| 173904 | /* 300 */ 1423, 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397, |
| 173905 | /* 310 */ 1397, 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364, |
| 173906 | /* 320 */ 1357, 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509, |
| 173907 | /* 330 */ 1638, 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410, |
| 173908 | /* 340 */ 1638, 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272, |
| 173909 | /* 350 */ 1525, 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499, |
| 173910 | /* 360 */ 1330, 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330, |
| 173911 | /* 370 */ 1319, 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588, |
| 173912 | /* 380 */ 1588, 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403, |
| 173913 | /* 390 */ 1401, 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660, |
| 173914 | /* 400 */ 1558, 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288, |
| 173915 | /* 410 */ 1288, 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618, |
| 173916 | /* 420 */ 1254, 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173917 | /* 430 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173918 | /* 440 */ 1564, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173919 | /* 450 */ 1254, 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254, |
| 173920 | /* 460 */ 1254, 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254, |
| 173921 | /* 470 */ 1254, 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254, |
| 173922 | /* 480 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254, |
| 173923 | /* 490 */ 1254, 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254, |
| 173924 | /* 500 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173925 | /* 510 */ 1254, 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173926 | /* 520 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173927 | /* 530 */ 1254, 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254, |
| 173928 | /* 540 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173929 | /* 550 */ 1254, 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254, |
| 173930 | /* 560 */ 1254, 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254, |
| 173931 | /* 570 */ 1254, 1254, 1254, 1634, 1346, 1438, 1254, 1441, 1276, 1254, |
| 173932 | /* 580 */ 1266, 1254, 1254, |
| 173933 | }; |
| 173934 | /********** End of lemon-generated parsing tables *****************************/ |
| 173935 | |
| @@ -174605,11 +174825,11 @@ | |
| 174825 | /* 275 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", |
| 174826 | /* 276 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", |
| 174827 | /* 277 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", |
| 174828 | /* 278 */ "trigger_cmd ::= scanpt select scanpt", |
| 174829 | /* 279 */ "expr ::= RAISE LP IGNORE RP", |
| 174830 | /* 280 */ "expr ::= RAISE LP raisetype COMMA expr RP", |
| 174831 | /* 281 */ "raisetype ::= ROLLBACK", |
| 174832 | /* 282 */ "raisetype ::= ABORT", |
| 174833 | /* 283 */ "raisetype ::= FAIL", |
| 174834 | /* 284 */ "cmd ::= DROP TRIGGER ifexists fullname", |
| 174835 | /* 285 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", |
| @@ -175530,11 +175750,11 @@ | |
| 175750 | 293, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 175751 | 293, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 175752 | 293, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 175753 | 293, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 175754 | 218, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 175755 | 218, /* (280) expr ::= RAISE LP raisetype COMMA expr RP */ |
| 175756 | 237, /* (281) raisetype ::= ROLLBACK */ |
| 175757 | 237, /* (282) raisetype ::= ABORT */ |
| 175758 | 237, /* (283) raisetype ::= FAIL */ |
| 175759 | 191, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 175760 | 191, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -175944,11 +176164,11 @@ | |
| 176164 | -9, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ |
| 176165 | -8, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ |
| 176166 | -6, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ |
| 176167 | -3, /* (278) trigger_cmd ::= scanpt select scanpt */ |
| 176168 | -4, /* (279) expr ::= RAISE LP IGNORE RP */ |
| 176169 | -6, /* (280) expr ::= RAISE LP raisetype COMMA expr RP */ |
| 176170 | -1, /* (281) raisetype ::= ROLLBACK */ |
| 176171 | -1, /* (282) raisetype ::= ABORT */ |
| 176172 | -1, /* (283) raisetype ::= FAIL */ |
| 176173 | -4, /* (284) cmd ::= DROP TRIGGER ifexists fullname */ |
| 176174 | -6, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| @@ -177329,13 +177549,13 @@ | |
| 177549 | if( yymsp[-3].minor.yy454 ){ |
| 177550 | yymsp[-3].minor.yy454->affExpr = OE_Ignore; |
| 177551 | } |
| 177552 | } |
| 177553 | break; |
| 177554 | case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */ |
| 177555 | { |
| 177556 | yymsp[-5].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy454, 0); |
| 177557 | if( yymsp[-5].minor.yy454 ) { |
| 177558 | yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144; |
| 177559 | } |
| 177560 | } |
| 177561 | break; |
| @@ -208717,14 +208937,20 @@ | |
| 208937 | ** convenience. |
| 208938 | ** |
| 208939 | ** NUMBER ==> $[NUMBER] // PG compatible |
| 208940 | ** LABEL ==> $.LABEL // PG compatible |
| 208941 | ** [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience |
| 208942 | ** |
| 208943 | ** Updated 2024-05-27: If the NUMBER is negative, then PG counts from |
| 208944 | ** the right of the array. Hence for negative NUMBER: |
| 208945 | ** |
| 208946 | ** NUMBER ==> $[#NUMBER] // PG compatible |
| 208947 | */ |
| 208948 | jsonStringInit(&jx, ctx); |
| 208949 | if( sqlite3_value_type(argv[i])==SQLITE_INTEGER ){ |
| 208950 | jsonAppendRawNZ(&jx, "[", 1); |
| 208951 | if( zPath[0]=='-' ) jsonAppendRawNZ(&jx,"#",1); |
| 208952 | jsonAppendRaw(&jx, zPath, nPath); |
| 208953 | jsonAppendRawNZ(&jx, "]", 2); |
| 208954 | }else if( jsonAllAlphanum(zPath, nPath) ){ |
| 208955 | jsonAppendRawNZ(&jx, ".", 1); |
| 208956 | jsonAppendRaw(&jx, zPath, nPath); |
| @@ -232196,10 +232422,19 @@ | |
| 232422 | ** Interface to code in fts5_config.c. fts5_config.c contains contains code |
| 232423 | ** to parse the arguments passed to the CREATE VIRTUAL TABLE statement. |
| 232424 | */ |
| 232425 | |
| 232426 | typedef struct Fts5Config Fts5Config; |
| 232427 | typedef struct Fts5TokenizerConfig Fts5TokenizerConfig; |
| 232428 | |
| 232429 | struct Fts5TokenizerConfig { |
| 232430 | Fts5Tokenizer *pTok; |
| 232431 | fts5_tokenizer *pTokApi; |
| 232432 | const char **azArg; |
| 232433 | int nArg; |
| 232434 | int ePattern; /* FTS_PATTERN_XXX constant */ |
| 232435 | }; |
| 232436 | |
| 232437 | /* |
| 232438 | ** An instance of the following structure encodes all information that can |
| 232439 | ** be gleaned from the CREATE VIRTUAL TABLE statement. |
| 232440 | ** |
| @@ -232238,10 +232473,11 @@ | |
| 232473 | ** INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex); |
| 232474 | ** |
| 232475 | */ |
| 232476 | struct Fts5Config { |
| 232477 | sqlite3 *db; /* Database handle */ |
| 232478 | Fts5Global *pGlobal; /* Global fts5 object for handle db */ |
| 232479 | char *zDb; /* Database holding FTS index (e.g. "main") */ |
| 232480 | char *zName; /* Name of FTS index */ |
| 232481 | int nCol; /* Number of columns */ |
| 232482 | char **azCol; /* Column names */ |
| 232483 | u8 *abUnindexed; /* True for unindexed columns */ |
| @@ -232253,14 +232489,12 @@ | |
| 232489 | char *zContentRowid; /* "content_rowid=" option value */ |
| 232490 | int bColumnsize; /* "columnsize=" option value (dflt==1) */ |
| 232491 | int bTokendata; /* "tokendata=" option value (dflt==0) */ |
| 232492 | int eDetail; /* FTS5_DETAIL_XXX value */ |
| 232493 | char *zContentExprlist; |
| 232494 | Fts5TokenizerConfig t; |
| 232495 | int bLock; /* True when table is preparing statement */ |
| 232496 | |
| 232497 | /* Values loaded from the %_config table */ |
| 232498 | int iVersion; /* fts5 file format 'version' */ |
| 232499 | int iCookie; /* Incremented when %_config is modified */ |
| 232500 | int pgsz; /* Approximate page size used in %_data */ |
| @@ -232651,17 +232885,11 @@ | |
| 232885 | sqlite3_vtab base; /* Base class used by SQLite core */ |
| 232886 | Fts5Config *pConfig; /* Virtual table configuration */ |
| 232887 | Fts5Index *pIndex; /* Full-text index */ |
| 232888 | }; |
| 232889 | |
| 232890 | static int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig); |
| 232891 | |
| 232892 | static Fts5Table *sqlite3Fts5TableFromCsrid(Fts5Global*, i64); |
| 232893 | |
| 232894 | static int sqlite3Fts5FlushToDisk(Fts5Table*); |
| 232895 | |
| @@ -232920,10 +233148,11 @@ | |
| 233148 | static int sqlite3Fts5TokenizerInit(fts5_api*); |
| 233149 | static int sqlite3Fts5TokenizerPattern( |
| 233150 | int (*xCreate)(void*, const char**, int, Fts5Tokenizer**), |
| 233151 | Fts5Tokenizer *pTok |
| 233152 | ); |
| 233153 | static int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig*); |
| 233154 | /* |
| 233155 | ** End of interface to code in fts5_tokenizer.c. |
| 233156 | **************************************************************************/ |
| 233157 | |
| 233158 | /************************************************************************** |
| @@ -235871,11 +236100,10 @@ | |
| 236100 | ** an error occurs, an SQLite error code is returned and an error message |
| 236101 | ** may be left in *pzErr. It is the responsibility of the caller to |
| 236102 | ** eventually free any such error message using sqlite3_free(). |
| 236103 | */ |
| 236104 | static int fts5ConfigParseSpecial( |
| 236105 | Fts5Config *pConfig, /* Configuration object to update */ |
| 236106 | const char *zCmd, /* Special command to parse */ |
| 236107 | const char *zArg, /* Argument to parse */ |
| 236108 | char **pzErr /* OUT: Error message */ |
| 236109 | ){ |
| @@ -235935,16 +236163,15 @@ | |
| 236163 | } |
| 236164 | |
| 236165 | if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){ |
| 236166 | const char *p = (const char*)zArg; |
| 236167 | sqlite3_int64 nArg = strlen(zArg) + 1; |
| 236168 | char **azArg = sqlite3Fts5MallocZero(&rc, (sizeof(char*) + 2) * nArg); |
| 236169 | |
| 236170 | if( azArg ){ |
| 236171 | char *pSpace = (char*)&azArg[nArg]; |
| 236172 | if( pConfig->t.azArg ){ |
| 236173 | *pzErr = sqlite3_mprintf("multiple tokenize=... directives"); |
| 236174 | rc = SQLITE_ERROR; |
| 236175 | }else{ |
| 236176 | for(nArg=0; p && *p; nArg++){ |
| 236177 | const char *p2 = fts5ConfigSkipWhitespace(p); |
| @@ -235963,20 +236190,18 @@ | |
| 236190 | } |
| 236191 | if( p==0 ){ |
| 236192 | *pzErr = sqlite3_mprintf("parse error in tokenize directive"); |
| 236193 | rc = SQLITE_ERROR; |
| 236194 | }else{ |
| 236195 | pConfig->t.azArg = (const char**)azArg; |
| 236196 | pConfig->t.nArg = nArg; |
| 236197 | azArg = 0; |
| 236198 | } |
| 236199 | } |
| 236200 | } |
| 236201 | sqlite3_free(azArg); |
| 236202 | |
| 236203 | return rc; |
| 236204 | } |
| 236205 | |
| 236206 | if( sqlite3_strnicmp("content", zCmd, nCmd)==0 ){ |
| 236207 | if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){ |
| @@ -236049,20 +236274,10 @@ | |
| 236274 | |
| 236275 | *pzErr = sqlite3_mprintf("unrecognized option: \"%.*s\"", nCmd, zCmd); |
| 236276 | return SQLITE_ERROR; |
| 236277 | } |
| 236278 | |
| 236279 | /* |
| 236280 | ** Gobble up the first bareword or quoted word from the input buffer zIn. |
| 236281 | ** Return a pointer to the character immediately following the last in |
| 236282 | ** the gobbled word if successful, or a NULL pointer otherwise (failed |
| 236283 | ** to find close-quote character). |
| @@ -236191,10 +236406,11 @@ | |
| 236406 | sqlite3_int64 nByte; |
| 236407 | |
| 236408 | *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config)); |
| 236409 | if( pRet==0 ) return SQLITE_NOMEM; |
| 236410 | memset(pRet, 0, sizeof(Fts5Config)); |
| 236411 | pRet->pGlobal = pGlobal; |
| 236412 | pRet->db = db; |
| 236413 | pRet->iCookie = -1; |
| 236414 | |
| 236415 | nByte = nArg * (sizeof(char*) + sizeof(u8)); |
| 236416 | pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte); |
| @@ -236239,11 +236455,11 @@ | |
| 236455 | if( z==0 ){ |
| 236456 | *pzErr = sqlite3_mprintf("parse error in \"%s\"", zOrig); |
| 236457 | rc = SQLITE_ERROR; |
| 236458 | }else{ |
| 236459 | if( bOption ){ |
| 236460 | rc = fts5ConfigParseSpecial(pRet, |
| 236461 | ALWAYS(zOne)?zOne:"", |
| 236462 | zTwo?zTwo:"", |
| 236463 | pzErr |
| 236464 | ); |
| 236465 | }else{ |
| @@ -236277,17 +236493,10 @@ | |
| 236493 | "contentless_delete=1 is incompatible with columnsize=0" |
| 236494 | ); |
| 236495 | rc = SQLITE_ERROR; |
| 236496 | } |
| 236497 | |
| 236498 | /* If no zContent option was specified, fill in the default values. */ |
| 236499 | if( rc==SQLITE_OK && pRet->zContent==0 ){ |
| 236500 | const char *zTail = 0; |
| 236501 | assert( pRet->eContent==FTS5_CONTENT_NORMAL |
| 236502 | || pRet->eContent==FTS5_CONTENT_NONE |
| @@ -236325,13 +236534,14 @@ | |
| 236534 | ** Free the configuration object passed as the only argument. |
| 236535 | */ |
| 236536 | static void sqlite3Fts5ConfigFree(Fts5Config *pConfig){ |
| 236537 | if( pConfig ){ |
| 236538 | int i; |
| 236539 | if( pConfig->t.pTok ){ |
| 236540 | pConfig->t.pTokApi->xDelete(pConfig->t.pTok); |
| 236541 | } |
| 236542 | sqlite3_free(pConfig->t.azArg); |
| 236543 | sqlite3_free(pConfig->zDb); |
| 236544 | sqlite3_free(pConfig->zName); |
| 236545 | for(i=0; i<pConfig->nCol; i++){ |
| 236546 | sqlite3_free(pConfig->azCol[i]); |
| 236547 | } |
| @@ -236402,14 +236612,22 @@ | |
| 236612 | int flags, /* FTS5_TOKENIZE_* flags */ |
| 236613 | const char *pText, int nText, /* Text to tokenize */ |
| 236614 | void *pCtx, /* Context passed to xToken() */ |
| 236615 | int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 236616 | ){ |
| 236617 | int rc = SQLITE_OK; |
| 236618 | if( pText ){ |
| 236619 | if( pConfig->t.pTok==0 ){ |
| 236620 | rc = sqlite3Fts5LoadTokenizer(pConfig); |
| 236621 | } |
| 236622 | if( rc==SQLITE_OK ){ |
| 236623 | rc = pConfig->t.pTokApi->xTokenize( |
| 236624 | pConfig->t.pTok, pCtx, flags, pText, nText, xToken |
| 236625 | ); |
| 236626 | } |
| 236627 | } |
| 236628 | return rc; |
| 236629 | } |
| 236630 | |
| 236631 | /* |
| 236632 | ** Argument pIn points to the first character in what is expected to be |
| 236633 | ** a comma-separated list of SQL literals followed by a ')' character. |
| @@ -237002,11 +237220,15 @@ | |
| 237220 | }else{ |
| 237221 | sqlite3Fts5ParseNodeFree(sParse.pExpr); |
| 237222 | } |
| 237223 | |
| 237224 | sqlite3_free(sParse.apPhrase); |
| 237225 | if( 0==*pzErr ){ |
| 237226 | *pzErr = sParse.zErr; |
| 237227 | }else{ |
| 237228 | sqlite3_free(sParse.zErr); |
| 237229 | } |
| 237230 | return sParse.rc; |
| 237231 | } |
| 237232 | |
| 237233 | /* |
| 237234 | ** Assuming that buffer z is at least nByte bytes in size and contains a |
| @@ -249974,12 +250196,16 @@ | |
| 250196 | if( rc==SQLITE_OK ){ |
| 250197 | rc = sqlite3Fts5ConfigParse(pGlobal, db, argc, azConfig, &pConfig, pzErr); |
| 250198 | assert( (rc==SQLITE_OK && *pzErr==0) || pConfig==0 ); |
| 250199 | } |
| 250200 | if( rc==SQLITE_OK ){ |
| 250201 | pConfig->pzErrmsg = pzErr; |
| 250202 | pTab->p.pConfig = pConfig; |
| 250203 | pTab->pGlobal = pGlobal; |
| 250204 | if( bCreate || sqlite3Fts5TokenizerPreload(&pConfig->t) ){ |
| 250205 | rc = sqlite3Fts5LoadTokenizer(pConfig); |
| 250206 | } |
| 250207 | } |
| 250208 | |
| 250209 | /* Open the index sub-system */ |
| 250210 | if( rc==SQLITE_OK ){ |
| 250211 | rc = sqlite3Fts5IndexOpen(pConfig, bCreate, &pTab->p.pIndex, pzErr); |
| @@ -249997,24 +250223,22 @@ | |
| 250223 | rc = sqlite3Fts5ConfigDeclareVtab(pConfig); |
| 250224 | } |
| 250225 | |
| 250226 | /* Load the initial configuration */ |
| 250227 | if( rc==SQLITE_OK ){ |
| 250228 | rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex); |
| 250229 | sqlite3Fts5IndexRollback(pTab->p.pIndex); |
| 250230 | } |
| 250231 | |
| 250232 | if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){ |
| 250233 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, (int)1); |
| 250234 | } |
| 250235 | if( rc==SQLITE_OK ){ |
| 250236 | rc = sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS); |
| 250237 | } |
| 250238 | |
| 250239 | if( pConfig ) pConfig->pzErrmsg = 0; |
| 250240 | if( rc!=SQLITE_OK ){ |
| 250241 | fts5FreeVtab(pTab); |
| 250242 | pTab = 0; |
| 250243 | }else if( bCreate ){ |
| 250244 | fts5CheckTransactionState(pTab, FTS5_BEGIN, 0); |
| @@ -250078,14 +250302,14 @@ | |
| 250302 | Fts5Config *pConfig, |
| 250303 | struct sqlite3_index_constraint *p |
| 250304 | ){ |
| 250305 | assert( FTS5_PATTERN_GLOB==SQLITE_INDEX_CONSTRAINT_GLOB ); |
| 250306 | assert( FTS5_PATTERN_LIKE==SQLITE_INDEX_CONSTRAINT_LIKE ); |
| 250307 | if( pConfig->t.ePattern==FTS5_PATTERN_GLOB && p->op==FTS5_PATTERN_GLOB ){ |
| 250308 | return 1; |
| 250309 | } |
| 250310 | if( pConfig->t.ePattern==FTS5_PATTERN_LIKE |
| 250311 | && (p->op==FTS5_PATTERN_LIKE || p->op==FTS5_PATTERN_GLOB) |
| 250312 | ){ |
| 250313 | return 1; |
| 250314 | } |
| 250315 | return 0; |
| @@ -250223,10 +250447,11 @@ | |
| 250447 | idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G'; |
| 250448 | sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol); |
| 250449 | idxStr += strlen(&idxStr[iIdxStr]); |
| 250450 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250451 | assert( idxStr[iIdxStr]=='\0' ); |
| 250452 | bSeenMatch = 1; |
| 250453 | }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){ |
| 250454 | idxStr[iIdxStr++] = '='; |
| 250455 | bSeenEq = 1; |
| 250456 | pInfo->aConstraintUsage[i].argvIndex = ++iCons; |
| 250457 | } |
| @@ -252457,11 +252682,11 @@ | |
| 252682 | } |
| 252683 | |
| 252684 | return rc; |
| 252685 | } |
| 252686 | |
| 252687 | int fts5GetTokenizer( |
| 252688 | Fts5Global *pGlobal, |
| 252689 | const char **azArg, |
| 252690 | int nArg, |
| 252691 | Fts5Config *pConfig, |
| 252692 | char **pzErr |
| @@ -252471,32 +252696,45 @@ | |
| 252696 | |
| 252697 | pMod = fts5LocateTokenizer(pGlobal, nArg==0 ? 0 : azArg[0]); |
| 252698 | if( pMod==0 ){ |
| 252699 | assert( nArg>0 ); |
| 252700 | rc = SQLITE_ERROR; |
| 252701 | if( pzErr ) *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); |
| 252702 | }else{ |
| 252703 | rc = pMod->x.xCreate( |
| 252704 | pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->t.pTok |
| 252705 | ); |
| 252706 | pConfig->t.pTokApi = &pMod->x; |
| 252707 | if( rc!=SQLITE_OK ){ |
| 252708 | if( pzErr && rc!=SQLITE_NOMEM ){ |
| 252709 | *pzErr = sqlite3_mprintf("error in tokenizer constructor"); |
| 252710 | } |
| 252711 | }else{ |
| 252712 | pConfig->t.ePattern = sqlite3Fts5TokenizerPattern( |
| 252713 | pMod->x.xCreate, pConfig->t.pTok |
| 252714 | ); |
| 252715 | } |
| 252716 | } |
| 252717 | |
| 252718 | if( rc!=SQLITE_OK ){ |
| 252719 | pConfig->t.pTokApi = 0; |
| 252720 | pConfig->t.pTok = 0; |
| 252721 | } |
| 252722 | |
| 252723 | return rc; |
| 252724 | } |
| 252725 | |
| 252726 | /* |
| 252727 | ** Attempt to instantiate the tokenizer. |
| 252728 | */ |
| 252729 | static int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig){ |
| 252730 | return fts5GetTokenizer( |
| 252731 | pConfig->pGlobal, pConfig->t.azArg, pConfig->t.nArg, |
| 252732 | pConfig, pConfig->pzErrmsg |
| 252733 | ); |
| 252734 | } |
| 252735 | |
| 252736 | |
| 252737 | static void fts5ModuleDestroy(void *pCtx){ |
| 252738 | Fts5TokenizerModule *pTok, *pNextTok; |
| 252739 | Fts5Auxiliary *pAux, *pNextAux; |
| 252740 | Fts5Global *pGlobal = (Fts5Global*)pCtx; |
| @@ -252537,11 +252775,11 @@ | |
| 252775 | int nArg, /* Number of args */ |
| 252776 | sqlite3_value **apUnused /* Function arguments */ |
| 252777 | ){ |
| 252778 | assert( nArg==0 ); |
| 252779 | UNUSED_PARAM2(nArg, apUnused); |
| 252780 | sqlite3_result_text(pCtx, "fts5: 2024-05-30 11:14:16 ee92fa8366b743266b17c692499087c0d11b9302d096c3dfb4e6356b467e939e", -1, SQLITE_TRANSIENT); |
| 252781 | } |
| 252782 | |
| 252783 | /* |
| 252784 | ** Return true if zName is the extension on one of the shadow tables used |
| 252785 | ** by this module. |
| @@ -252572,21 +252810,27 @@ | |
| 252810 | Fts5FullTable *pTab = (Fts5FullTable*)pVtab; |
| 252811 | int rc; |
| 252812 | |
| 252813 | assert( pzErr!=0 && *pzErr==0 ); |
| 252814 | UNUSED_PARAM(isQuick); |
| 252815 | assert( pTab->p.pConfig->pzErrmsg==0 ); |
| 252816 | pTab->p.pConfig->pzErrmsg = pzErr; |
| 252817 | rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0); |
| 252818 | if( *pzErr==0 && rc!=SQLITE_OK ){ |
| 252819 | if( (rc&0xff)==SQLITE_CORRUPT ){ |
| 252820 | *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", |
| 252821 | zSchema, zTabname); |
| 252822 | rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; |
| 252823 | }else{ |
| 252824 | *pzErr = sqlite3_mprintf("unable to validate the inverted index for" |
| 252825 | " FTS5 table %s.%s: %s", |
| 252826 | zSchema, zTabname, sqlite3_errstr(rc)); |
| 252827 | } |
| 252828 | } |
| 252829 | |
| 252830 | sqlite3Fts5IndexCloseReader(pTab->p.pIndex); |
| 252831 | pTab->p.pConfig->pzErrmsg = 0; |
| 252832 | |
| 252833 | return rc; |
| 252834 | } |
| 252835 | |
| 252836 | static int fts5Init(sqlite3 *db){ |
| @@ -255364,10 +255608,20 @@ | |
| 255608 | return p->bFold ? FTS5_PATTERN_LIKE : FTS5_PATTERN_GLOB; |
| 255609 | } |
| 255610 | } |
| 255611 | return FTS5_PATTERN_NONE; |
| 255612 | } |
| 255613 | |
| 255614 | /* |
| 255615 | ** Return true if the tokenizer described by p->azArg[] is the trigram |
| 255616 | ** tokenizer. This tokenizer needs to be loaded before xBestIndex is |
| 255617 | ** called for the first time in order to correctly handle LIKE/GLOB. |
| 255618 | */ |
| 255619 | static int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig *p){ |
| 255620 | return (p->nArg>=1 && 0==sqlite3_stricmp(p->azArg[0], "trigram")); |
| 255621 | } |
| 255622 | |
| 255623 | |
| 255624 | /* |
| 255625 | ** Register all built-in tokenizers with FTS5. |
| 255626 | */ |
| 255627 | static int sqlite3Fts5TokenizerInit(fts5_api *pApi){ |
| @@ -256584,10 +256838,11 @@ | |
| 256838 | Fts5IndexIter *pIter; /* Term/rowid iterator object */ |
| 256839 | void *pStruct; /* From sqlite3Fts5StructureRef() */ |
| 256840 | |
| 256841 | int nLeTerm; /* Size of zLeTerm in bytes */ |
| 256842 | char *zLeTerm; /* (term <= $zLeTerm) paramater, or NULL */ |
| 256843 | int colUsed; /* Copy of sqlite3_index_info.colUsed */ |
| 256844 | |
| 256845 | /* These are used by 'col' tables only */ |
| 256846 | int iCol; |
| 256847 | i64 *aCnt; |
| 256848 | i64 *aDoc; |
| @@ -256610,13 +256865,15 @@ | |
| 256865 | #define FTS5_VOCAB_INST_SCHEMA "term, doc, col, offset" |
| 256866 | |
| 256867 | /* |
| 256868 | ** Bits for the mask used as the idxNum value by xBestIndex/xFilter. |
| 256869 | */ |
| 256870 | #define FTS5_VOCAB_TERM_EQ 0x0100 |
| 256871 | #define FTS5_VOCAB_TERM_GE 0x0200 |
| 256872 | #define FTS5_VOCAB_TERM_LE 0x0400 |
| 256873 | |
| 256874 | #define FTS5_VOCAB_COLUSED_MASK 0xFF |
| 256875 | |
| 256876 | |
| 256877 | /* |
| 256878 | ** Translate a string containing an fts5vocab table type to an |
| 256879 | ** FTS5_VOCAB_XXX constant. If successful, set *peType to the output |
| @@ -256789,14 +257046,16 @@ | |
| 257046 | ){ |
| 257047 | int i; |
| 257048 | int iTermEq = -1; |
| 257049 | int iTermGe = -1; |
| 257050 | int iTermLe = -1; |
| 257051 | int idxNum = (int)pInfo->colUsed; |
| 257052 | int nArg = 0; |
| 257053 | |
| 257054 | UNUSED_PARAM(pUnused); |
| 257055 | |
| 257056 | assert( (pInfo->colUsed & FTS5_VOCAB_COLUSED_MASK)==pInfo->colUsed ); |
| 257057 | |
| 257058 | for(i=0; i<pInfo->nConstraint; i++){ |
| 257059 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 257060 | if( p->usable==0 ) continue; |
| 257061 | if( p->iColumn==0 ){ /* term column */ |
| @@ -256885,11 +257144,11 @@ | |
| 257144 | rc = sqlite3_finalize(pStmt); |
| 257145 | pStmt = 0; |
| 257146 | if( rc==SQLITE_OK ){ |
| 257147 | pVTab->zErrMsg = sqlite3_mprintf( |
| 257148 | "no such fts5 table: %s.%s", pTab->zFts5Db, pTab->zFts5Tbl |
| 257149 | ); |
| 257150 | rc = SQLITE_ERROR; |
| 257151 | } |
| 257152 | }else{ |
| 257153 | rc = sqlite3Fts5FlushToDisk(pFts5); |
| 257154 | } |
| @@ -257045,13 +257304,23 @@ | |
| 257304 | pPos = pCsr->pIter->pData; |
| 257305 | nPos = pCsr->pIter->nData; |
| 257306 | |
| 257307 | switch( pTab->eType ){ |
| 257308 | case FTS5_VOCAB_ROW: |
| 257309 | /* Do not bother counting the number of instances if the "cnt" |
| 257310 | ** column is not being read (according to colUsed). */ |
| 257311 | if( eDetail==FTS5_DETAIL_FULL && (pCsr->colUsed & 0x04) ){ |
| 257312 | while( iPos<nPos ){ |
| 257313 | u32 ii; |
| 257314 | fts5FastGetVarint32(pPos, iPos, ii); |
| 257315 | if( ii==1 ){ |
| 257316 | /* New column in the position list */ |
| 257317 | fts5FastGetVarint32(pPos, iPos, ii); |
| 257318 | }else{ |
| 257319 | /* An instance - increment pCsr->aCnt[] */ |
| 257320 | pCsr->aCnt[0]++; |
| 257321 | } |
| 257322 | } |
| 257323 | } |
| 257324 | pCsr->aDoc[0]++; |
| 257325 | break; |
| 257326 | |
| @@ -257145,10 +257414,11 @@ | |
| 257414 | |
| 257415 | fts5VocabResetCursor(pCsr); |
| 257416 | if( idxNum & FTS5_VOCAB_TERM_EQ ) pEq = apVal[iVal++]; |
| 257417 | if( idxNum & FTS5_VOCAB_TERM_GE ) pGe = apVal[iVal++]; |
| 257418 | if( idxNum & FTS5_VOCAB_TERM_LE ) pLe = apVal[iVal++]; |
| 257419 | pCsr->colUsed = (idxNum & FTS5_VOCAB_COLUSED_MASK); |
| 257420 | |
| 257421 | if( pEq ){ |
| 257422 | zTerm = (const char *)sqlite3_value_text(pEq); |
| 257423 | nTerm = sqlite3_value_bytes(pEq); |
| 257424 | f = FTS5INDEX_QUERY_NOTOKENDATA; |
| 257425 |
+5
-5
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -144,13 +144,13 @@ | ||
| 144 | 144 | ** |
| 145 | 145 | ** See also: [sqlite3_libversion()], |
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | -#define SQLITE_VERSION "3.46.0" | |
| 150 | -#define SQLITE_VERSION_NUMBER 3046000 | |
| 151 | -#define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" | |
| 149 | +#define SQLITE_VERSION "3.47.0" | |
| 150 | +#define SQLITE_VERSION_NUMBER 3047000 | |
| 151 | +#define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| @@ -3568,12 +3568,12 @@ | ||
| 3568 | 3568 | ** the default shared cache setting provided by |
| 3569 | 3569 | ** [sqlite3_enable_shared_cache()].)^ |
| 3570 | 3570 | ** |
| 3571 | 3571 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3572 | 3572 | ** <dd>The database connection comes up in "extended result code mode". |
| 3573 | -** In other words, the database behaves has if | |
| 3574 | -** [sqlite3_extended_result_codes(db,1)] where called on the database | |
| 3573 | +** In other words, the database behaves as if | |
| 3574 | +** [sqlite3_extended_result_codes(db,1)] were called on the database | |
| 3575 | 3575 | ** connection as soon as the connection is created. In addition to setting |
| 3576 | 3576 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3577 | 3577 | ** to return an extended result code.</dd> |
| 3578 | 3578 | ** |
| 3579 | 3579 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| 3580 | 3580 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -144,13 +144,13 @@ | |
| 144 | ** |
| 145 | ** See also: [sqlite3_libversion()], |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.46.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3046000 |
| 151 | #define SQLITE_SOURCE_ID "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -3568,12 +3568,12 @@ | |
| 3568 | ** the default shared cache setting provided by |
| 3569 | ** [sqlite3_enable_shared_cache()].)^ |
| 3570 | ** |
| 3571 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3572 | ** <dd>The database connection comes up in "extended result code mode". |
| 3573 | ** In other words, the database behaves has if |
| 3574 | ** [sqlite3_extended_result_codes(db,1)] where called on the database |
| 3575 | ** connection as soon as the connection is created. In addition to setting |
| 3576 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3577 | ** to return an extended result code.</dd> |
| 3578 | ** |
| 3579 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| 3580 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -144,13 +144,13 @@ | |
| 144 | ** |
| 145 | ** See also: [sqlite3_libversion()], |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.47.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3047000 |
| 151 | #define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -3568,12 +3568,12 @@ | |
| 3568 | ** the default shared cache setting provided by |
| 3569 | ** [sqlite3_enable_shared_cache()].)^ |
| 3570 | ** |
| 3571 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3572 | ** <dd>The database connection comes up in "extended result code mode". |
| 3573 | ** In other words, the database behaves as if |
| 3574 | ** [sqlite3_extended_result_codes(db,1)] were called on the database |
| 3575 | ** connection as soon as the connection is created. In addition to setting |
| 3576 | ** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
| 3577 | ** to return an extended result code.</dd> |
| 3578 | ** |
| 3579 | ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
| 3580 |