System.Data.SQLite
Check-in [6cb6f18893]
Not logged in

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

Overview
Comment:Update SQLite core library to the latest trunk code. Add test to verify that the 'totype' extension can be loaded and used.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6cb6f188934acd5955f85d97e21d70cbbebf0a0e
User & Date: mistachkin 2013-10-17 02:48:33
Context
2013-10-17
02:57
Minor style fix to new test. check-in: 27a2e59d56 user: mistachkin tags: trunk
02:48
Update SQLite core library to the latest trunk code. Add test to verify that the 'totype' extension can be loaded and used. check-in: 6cb6f18893 user: mistachkin tags: trunk
2013-10-15
06:52
Add AutoCommit property to the SQLiteConnection class. Fix for [9ba9346f75]. check-in: a6dfd19657 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to SQLite.Interop/src/core/sqlite3.c.

   133    133   **
   134    134   ** See also: [sqlite3_libversion()],
   135    135   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   136    136   ** [sqlite_version()] and [sqlite_source_id()].
   137    137   */
   138    138   #define SQLITE_VERSION        "3.8.1"
   139    139   #define SQLITE_VERSION_NUMBER 3008001
   140         -#define SQLITE_SOURCE_ID      "2013-10-14 22:35:40 73238f655a58c810876f46cc04eab1ac2d5b8ef7"
          140  +#define SQLITE_SOURCE_ID      "2013-10-16 09:49:10 2470d1bb08b2661bcfde7a605208eb6044836d5c"
   141    141   
   142    142   /*
   143    143   ** CAPI3REF: Run-Time Library Version Numbers
   144    144   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   145    145   **
   146    146   ** These interfaces provide the same information as the [SQLITE_VERSION],
   147    147   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
 33013  33013   #ifndef SQLITE_OMIT_WAL
 33014  33014     assert( pFile->pShm==0 );
 33015  33015   #endif
 33016  33016     assert( pFile->h!=NULL && pFile->h!=INVALID_HANDLE_VALUE );
 33017  33017     OSTRACE(("CLOSE file=%p\n", pFile->h));
 33018  33018   
 33019  33019   #if SQLITE_MAX_MMAP_SIZE>0
 33020         -  rc = winUnmapfile(pFile);
 33021         -  if( rc!=SQLITE_OK ) return rc;
        33020  +  winUnmapfile(pFile);
 33022  33021   #endif
 33023  33022   
 33024  33023     do{
 33025  33024       rc = osCloseHandle(pFile->h);
 33026  33025       /* SimulateIOError( rc=0; cnt=MX_CLOSE_ATTEMPT; ); */
 33027  33026     }while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (sqlite3_win32_sleep(100), 1) );
 33028  33027   #if SQLITE_OS_WINCE
................................................................................
 33820  33819         if( newLimit>sqlite3GlobalConfig.mxMmap ){
 33821  33820           newLimit = sqlite3GlobalConfig.mxMmap;
 33822  33821         }
 33823  33822         *(i64*)pArg = pFile->mmapSizeMax;
 33824  33823         if( newLimit>=0 && newLimit!=pFile->mmapSizeMax && pFile->nFetchOut==0 ){
 33825  33824           pFile->mmapSizeMax = newLimit;
 33826  33825           if( pFile->mmapSize>0 ){
 33827         -          (void)winUnmapfile(pFile);
        33826  +          winUnmapfile(pFile);
 33828  33827             rc = winMapfile(pFile, -1);
 33829  33828           }
 33830  33829         }
 33831  33830         OSTRACE(("FCNTL file=%p, rc=%s\n", pFile->h, sqlite3ErrName(rc)));
 33832  33831         return rc;
 33833  33832       }
 33834  33833   #endif
................................................................................
 34890  34889         ** character, assume it is already a native Win32 path; otherwise,
 34891  34890         ** it must be converted to a native Win32 path prior via the Cygwin
 34892  34891         ** API prior to using it.
 34893  34892         */
 34894  34893         if( winIsDriveLetterAndColon(zDir) ){
 34895  34894           zConverted = winConvertFromUtf8Filename(zDir);
 34896  34895           if( !zConverted ){
        34896  +          sqlite3_free(zBuf);
 34897  34897             OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
 34898  34898             return SQLITE_IOERR_NOMEM;
 34899  34899           }
 34900  34900           if( winIsDir(zConverted) ){
 34901  34901             sqlite3_snprintf(nBuf-30, zBuf, "%s", zDir);
 34902  34902             sqlite3_free(zConverted);
 34903  34903             break;
 34904  34904           }
 34905  34905           sqlite3_free(zConverted);
 34906  34906         }else{
 34907  34907           zConverted = sqlite3MallocZero( nBuf+1 );
 34908  34908           if( !zConverted ){
        34909  +          sqlite3_free(zBuf);
 34909  34910             OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
 34910  34911             return SQLITE_IOERR_NOMEM;
 34911  34912           }
 34912  34913           if( cygwin_conv_path(
 34913  34914                   osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A, zDir,
 34914  34915                   zConverted, nBuf+1)<0 ){
 34915  34916             sqlite3_free(zConverted);
        34917  +          sqlite3_free(zBuf);
 34916  34918             OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_CONVPATH\n"));
 34917  34919             return winLogError(SQLITE_IOERR_CONVPATH, (DWORD)errno,
 34918  34920                                "winGetTempname1", zDir);
 34919  34921           }
 34920  34922           if( winIsDir(zConverted) ){
 34921  34923             /* At this point, we know the candidate directory exists and should
 34922  34924             ** be used.  However, we may need to convert the string containing
 34923  34925             ** its name into UTF-8 (i.e. if it is UTF-16 right now).
 34924  34926             */
 34925  34927             if( osIsNT() ){
 34926  34928               char *zUtf8 = winUnicodeToUtf8(zConverted);
 34927  34929               if( !zUtf8 ){
 34928  34930                 sqlite3_free(zConverted);
        34931  +              sqlite3_free(zBuf);
 34929  34932                 OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
 34930  34933                 return SQLITE_IOERR_NOMEM;
 34931  34934               }
 34932  34935               sqlite3_snprintf(nBuf-30, zBuf, "%s", zUtf8);
 34933  34936               sqlite3_free(zUtf8);
 34934  34937               sqlite3_free(zConverted);
 34935  34938               break;
................................................................................
 34937  34940               sqlite3_snprintf(nBuf-30, zBuf, "%s", zConverted);
 34938  34941               sqlite3_free(zConverted);
 34939  34942               break;
 34940  34943             }
 34941  34944           }
 34942  34945           sqlite3_free(zConverted);
 34943  34946         }
 34944         -      break;
 34945  34947       }
 34946  34948     }
 34947  34949   #elif !SQLITE_OS_WINRT && !defined(__CYGWIN__)
 34948  34950     else if( osIsNT() ){
 34949  34951       char *zMulti;
 34950  34952       LPWSTR zWidePath = sqlite3MallocZero( nBuf*sizeof(WCHAR) );
 34951  34953       if( !zWidePath ){
................................................................................
 35307  35309     }
 35308  35310     if( isTemp ){
 35309  35311       pFile->zDeleteOnClose = zConverted;
 35310  35312     }else
 35311  35313   #endif
 35312  35314     {
 35313  35315       sqlite3_free(zConverted);
 35314         -    sqlite3_free(zTmpname);
 35315  35316     }
 35316  35317   
        35318  +  sqlite3_free(zTmpname);
 35317  35319     pFile->pMethod = &winIoMethod;
 35318  35320     pFile->pVfs = pVfs;
 35319  35321     pFile->h = h;
 35320  35322     if( isReadonly ){
 35321  35323       pFile->ctrlFlags |= WINFILE_RDONLY;
 35322  35324     }
 35323  35325     if( sqlite3_uri_boolean(zName, "psow", SQLITE_POWERSAFE_OVERWRITE) ){
................................................................................
127743 127745   
127744 127746   struct Fts3auxCursor {
127745 127747     sqlite3_vtab_cursor base;       /* Base class used by SQLite core */
127746 127748     Fts3MultiSegReader csr;        /* Must be right after "base" */
127747 127749     Fts3SegFilter filter;
127748 127750     char *zStop;
127749 127751     int nStop;                      /* Byte-length of string zStop */
       127752  +  int iLangid;                    /* Language id to query */
127750 127753     int isEof;                      /* True if cursor is at EOF */
127751 127754     sqlite3_int64 iRowid;           /* Current rowid */
127752 127755   
127753 127756     int iCol;                       /* Current value of 'col' column */
127754 127757     int nStat;                      /* Size of aStat[] array */
127755 127758     struct Fts3auxColstats {
127756 127759       sqlite3_int64 nDoc;           /* 'documents' values for current csr row */
................................................................................
127757 127760       sqlite3_int64 nOcc;           /* 'occurrences' values for current csr row */
127758 127761     } *aStat;
127759 127762   };
127760 127763   
127761 127764   /*
127762 127765   ** Schema of the terms table.
127763 127766   */
127764         -#define FTS3_TERMS_SCHEMA "CREATE TABLE x(term, col, documents, occurrences)"
       127767  +#define FTS3_AUX_SCHEMA \
       127768  +  "CREATE TABLE x(term, col, documents, occurrences, languageid HIDDEN)"
127765 127769   
127766 127770   /*
127767 127771   ** This function does all the work for both the xConnect and xCreate methods.
127768 127772   ** These tables have no persistent representation of their own, so xConnect
127769 127773   ** and xCreate are identical operations.
127770 127774   */
127771 127775   static int fts3auxConnectMethod(
................................................................................
127804 127808         goto bad_args;
127805 127809       }
127806 127810     }else{
127807 127811       zFts3 = argv[3];
127808 127812     }
127809 127813     nFts3 = (int)strlen(zFts3);
127810 127814   
127811         -  rc = sqlite3_declare_vtab(db, FTS3_TERMS_SCHEMA);
       127815  +  rc = sqlite3_declare_vtab(db, FTS3_AUX_SCHEMA);
127812 127816     if( rc!=SQLITE_OK ) return rc;
127813 127817   
127814 127818     nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
127815 127819     p = (Fts3auxTable *)sqlite3_malloc(nByte);
127816 127820     if( !p ) return SQLITE_NOMEM;
127817 127821     memset(p, 0, nByte);
127818 127822   
................................................................................
127864 127868     sqlite3_vtab *pVTab, 
127865 127869     sqlite3_index_info *pInfo
127866 127870   ){
127867 127871     int i;
127868 127872     int iEq = -1;
127869 127873     int iGe = -1;
127870 127874     int iLe = -1;
       127875  +  int iLangid = -1;
       127876  +  int iNext = 1;                  /* Next free argvIndex value */
127871 127877   
127872 127878     UNUSED_PARAMETER(pVTab);
127873 127879   
127874 127880     /* This vtab delivers always results in "ORDER BY term ASC" order. */
127875 127881     if( pInfo->nOrderBy==1 
127876 127882      && pInfo->aOrderBy[0].iColumn==0 
127877 127883      && pInfo->aOrderBy[0].desc==0
127878 127884     ){
127879 127885       pInfo->orderByConsumed = 1;
127880 127886     }
127881 127887   
127882         -  /* Search for equality and range constraints on the "term" column. */
       127888  +  /* Search for equality and range constraints on the "term" column. 
       127889  +  ** And equality constraints on the hidden "languageid" column. */
127883 127890     for(i=0; i<pInfo->nConstraint; i++){
127884         -    if( pInfo->aConstraint[i].usable && pInfo->aConstraint[i].iColumn==0 ){
       127891  +    if( pInfo->aConstraint[i].usable ){
127885 127892         int op = pInfo->aConstraint[i].op;
127886         -      if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iEq = i;
127887         -      if( op==SQLITE_INDEX_CONSTRAINT_LT ) iLe = i;
127888         -      if( op==SQLITE_INDEX_CONSTRAINT_LE ) iLe = i;
127889         -      if( op==SQLITE_INDEX_CONSTRAINT_GT ) iGe = i;
127890         -      if( op==SQLITE_INDEX_CONSTRAINT_GE ) iGe = i;
       127893  +      int iCol = pInfo->aConstraint[i].iColumn;
       127894  +
       127895  +      if( iCol==0 ){
       127896  +        if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iEq = i;
       127897  +        if( op==SQLITE_INDEX_CONSTRAINT_LT ) iLe = i;
       127898  +        if( op==SQLITE_INDEX_CONSTRAINT_LE ) iLe = i;
       127899  +        if( op==SQLITE_INDEX_CONSTRAINT_GT ) iGe = i;
       127900  +        if( op==SQLITE_INDEX_CONSTRAINT_GE ) iGe = i;
       127901  +      }
       127902  +      if( iCol==4 ){
       127903  +        if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iLangid = i;
       127904  +      }
127891 127905       }
127892 127906     }
127893 127907   
127894 127908     if( iEq>=0 ){
127895 127909       pInfo->idxNum = FTS4AUX_EQ_CONSTRAINT;
127896         -    pInfo->aConstraintUsage[iEq].argvIndex = 1;
       127910  +    pInfo->aConstraintUsage[iEq].argvIndex = iNext++;
127897 127911       pInfo->estimatedCost = 5;
127898 127912     }else{
127899 127913       pInfo->idxNum = 0;
127900 127914       pInfo->estimatedCost = 20000;
127901 127915       if( iGe>=0 ){
127902 127916         pInfo->idxNum += FTS4AUX_GE_CONSTRAINT;
127903         -      pInfo->aConstraintUsage[iGe].argvIndex = 1;
       127917  +      pInfo->aConstraintUsage[iGe].argvIndex = iNext++;
127904 127918         pInfo->estimatedCost /= 2;
127905 127919       }
127906 127920       if( iLe>=0 ){
127907 127921         pInfo->idxNum += FTS4AUX_LE_CONSTRAINT;
127908         -      pInfo->aConstraintUsage[iLe].argvIndex = 1 + (iGe>=0);
       127922  +      pInfo->aConstraintUsage[iLe].argvIndex = iNext++;
127909 127923         pInfo->estimatedCost /= 2;
127910 127924       }
127911 127925     }
       127926  +  if( iLangid>=0 ){
       127927  +    pInfo->aConstraintUsage[iLangid].argvIndex = iNext++;
       127928  +    pInfo->estimatedCost--;
       127929  +  }
127912 127930   
127913 127931     return SQLITE_OK;
127914 127932   }
127915 127933   
127916 127934   /*
127917 127935   ** xOpen - Open a cursor.
127918 127936   */
................................................................................
128064 128082     const char *idxStr,             /* Unused */
128065 128083     int nVal,                       /* Number of elements in apVal */
128066 128084     sqlite3_value **apVal           /* Arguments for the indexing scheme */
128067 128085   ){
128068 128086     Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
128069 128087     Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
128070 128088     int rc;
128071         -  int isScan;
       128089  +  int isScan = 0;
       128090  +  int iLangVal = 0;               /* Language id to query */
       128091  +
       128092  +  int iEq = -1;                   /* Index of term=? value in apVal */
       128093  +  int iGe = -1;                   /* Index of term>=? value in apVal */
       128094  +  int iLe = -1;                   /* Index of term<=? value in apVal */
       128095  +  int iLangid = -1;               /* Index of languageid=? value in apVal */
       128096  +  int iNext = 0;
128072 128097   
128073 128098     UNUSED_PARAMETER(nVal);
128074 128099     UNUSED_PARAMETER(idxStr);
128075 128100   
128076 128101     assert( idxStr==0 );
128077 128102     assert( idxNum==FTS4AUX_EQ_CONSTRAINT || idxNum==0
128078 128103          || idxNum==FTS4AUX_LE_CONSTRAINT || idxNum==FTS4AUX_GE_CONSTRAINT
128079 128104          || idxNum==(FTS4AUX_LE_CONSTRAINT|FTS4AUX_GE_CONSTRAINT)
128080 128105     );
128081         -  isScan = (idxNum!=FTS4AUX_EQ_CONSTRAINT);
       128106  +
       128107  +  if( idxNum==FTS4AUX_EQ_CONSTRAINT ){
       128108  +    iEq = iNext++;
       128109  +  }else{
       128110  +    isScan = 1;
       128111  +    if( idxNum & FTS4AUX_GE_CONSTRAINT ){
       128112  +      iGe = iNext++;
       128113  +    }
       128114  +    if( idxNum & FTS4AUX_LE_CONSTRAINT ){
       128115  +      iLe = iNext++;
       128116  +    }
       128117  +  }
       128118  +  if( iNext<nVal ){
       128119  +    iLangid = iNext++;
       128120  +  }
128082 128121   
128083 128122     /* In case this cursor is being reused, close and zero it. */
128084 128123     testcase(pCsr->filter.zTerm);
128085 128124     sqlite3Fts3SegReaderFinish(&pCsr->csr);
128086 128125     sqlite3_free((void *)pCsr->filter.zTerm);
128087 128126     sqlite3_free(pCsr->aStat);
128088 128127     memset(&pCsr->csr, 0, ((u8*)&pCsr[1]) - (u8*)&pCsr->csr);
128089 128128   
128090 128129     pCsr->filter.flags = FTS3_SEGMENT_REQUIRE_POS|FTS3_SEGMENT_IGNORE_EMPTY;
128091 128130     if( isScan ) pCsr->filter.flags |= FTS3_SEGMENT_SCAN;
128092 128131   
128093         -  if( idxNum&(FTS4AUX_EQ_CONSTRAINT|FTS4AUX_GE_CONSTRAINT) ){
       128132  +  if( iEq>=0 || iGe>=0 ){
128094 128133       const unsigned char *zStr = sqlite3_value_text(apVal[0]);
       128134  +    assert( (iEq==0 && iGe==-1) || (iEq==-1 && iGe==0) );
128095 128135       if( zStr ){
128096 128136         pCsr->filter.zTerm = sqlite3_mprintf("%s", zStr);
128097 128137         pCsr->filter.nTerm = sqlite3_value_bytes(apVal[0]);
128098 128138         if( pCsr->filter.zTerm==0 ) return SQLITE_NOMEM;
128099 128139       }
128100 128140     }
128101         -  if( idxNum&FTS4AUX_LE_CONSTRAINT ){
128102         -    int iIdx = (idxNum&FTS4AUX_GE_CONSTRAINT) ? 1 : 0;
128103         -    pCsr->zStop = sqlite3_mprintf("%s", sqlite3_value_text(apVal[iIdx]));
128104         -    pCsr->nStop = sqlite3_value_bytes(apVal[iIdx]);
       128141  +
       128142  +  if( iLe>=0 ){
       128143  +    pCsr->zStop = sqlite3_mprintf("%s", sqlite3_value_text(apVal[iLe]));
       128144  +    pCsr->nStop = sqlite3_value_bytes(apVal[iLe]);
128105 128145       if( pCsr->zStop==0 ) return SQLITE_NOMEM;
128106 128146     }
       128147  +  
       128148  +  if( iLangid>=0 ){
       128149  +    iLangVal = sqlite3_value_int(apVal[iLangid]);
128107 128150   
128108         -  rc = sqlite3Fts3SegReaderCursor(pFts3, 0, 0, FTS3_SEGCURSOR_ALL,
       128151  +    /* If the user specified a negative value for the languageid, use zero
       128152  +    ** instead. This works, as the "languageid=?" constraint will also
       128153  +    ** be tested by the VDBE layer. The test will always be false (since
       128154  +    ** this module will not return a row with a negative languageid), and
       128155  +    ** so the overall query will return zero rows.  */
       128156  +    if( iLangVal<0 ) iLangVal = 0;
       128157  +  }
       128158  +  pCsr->iLangid = iLangVal;
       128159  +
       128160  +  rc = sqlite3Fts3SegReaderCursor(pFts3, iLangVal, 0, FTS3_SEGCURSOR_ALL,
128109 128161         pCsr->filter.zTerm, pCsr->filter.nTerm, 0, isScan, &pCsr->csr
128110 128162     );
128111 128163     if( rc==SQLITE_OK ){
128112 128164       rc = sqlite3Fts3SegReaderStart(pFts3, &pCsr->csr, &pCsr->filter);
128113 128165     }
128114 128166   
128115 128167     if( rc==SQLITE_OK ) rc = fts3auxNextMethod(pCursor);
................................................................................
128125 128177   }
128126 128178   
128127 128179   /*
128128 128180   ** xColumn - Return a column value.
128129 128181   */
128130 128182   static int fts3auxColumnMethod(
128131 128183     sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */
128132         -  sqlite3_context *pContext,      /* Context for sqlite3_result_xxx() calls */
       128184  +  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */
128133 128185     int iCol                        /* Index of column to read value from */
128134 128186   ){
128135 128187     Fts3auxCursor *p = (Fts3auxCursor *)pCursor;
128136 128188   
128137 128189     assert( p->isEof==0 );
128138         -  if( iCol==0 ){        /* Column "term" */
128139         -    sqlite3_result_text(pContext, p->csr.zTerm, p->csr.nTerm, SQLITE_TRANSIENT);
128140         -  }else if( iCol==1 ){  /* Column "col" */
128141         -    if( p->iCol ){
128142         -      sqlite3_result_int(pContext, p->iCol-1);
128143         -    }else{
128144         -      sqlite3_result_text(pContext, "*", -1, SQLITE_STATIC);
128145         -    }
128146         -  }else if( iCol==2 ){  /* Column "documents" */
128147         -    sqlite3_result_int64(pContext, p->aStat[p->iCol].nDoc);
128148         -  }else{                /* Column "occurrences" */
128149         -    sqlite3_result_int64(pContext, p->aStat[p->iCol].nOcc);
       128190  +  switch( iCol ){
       128191  +    case 0: /* term */
       128192  +      sqlite3_result_text(pCtx, p->csr.zTerm, p->csr.nTerm, SQLITE_TRANSIENT);
       128193  +      break;
       128194  +
       128195  +    case 1: /* col */
       128196  +      if( p->iCol ){
       128197  +        sqlite3_result_int(pCtx, p->iCol-1);
       128198  +      }else{
       128199  +        sqlite3_result_text(pCtx, "*", -1, SQLITE_STATIC);
       128200  +      }
       128201  +      break;
       128202  +
       128203  +    case 2: /* documents */
       128204  +      sqlite3_result_int64(pCtx, p->aStat[p->iCol].nDoc);
       128205  +      break;
       128206  +
       128207  +    case 3: /* occurrences */
       128208  +      sqlite3_result_int64(pCtx, p->aStat[p->iCol].nOcc);
       128209  +      break;
       128210  +
       128211  +    default: /* languageid */
       128212  +      assert( iCol==4 );
       128213  +      sqlite3_result_int(pCtx, p->iLangid);
       128214  +      break;
128150 128215     }
128151 128216   
128152 128217     return SQLITE_OK;
128153 128218   }
128154 128219   
128155 128220   /*
128156 128221   ** xRowid - Return the current rowid for the cursor.

Changes to SQLite.Interop/src/core/sqlite3.h.

   105    105   **
   106    106   ** See also: [sqlite3_libversion()],
   107    107   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   108    108   ** [sqlite_version()] and [sqlite_source_id()].
   109    109   */
   110    110   #define SQLITE_VERSION        "3.8.1"
   111    111   #define SQLITE_VERSION_NUMBER 3008001
   112         -#define SQLITE_SOURCE_ID      "2013-10-14 22:35:40 73238f655a58c810876f46cc04eab1ac2d5b8ef7"
          112  +#define SQLITE_SOURCE_ID      "2013-10-16 09:49:10 2470d1bb08b2661bcfde7a605208eb6044836d5c"
   113    113   
   114    114   /*
   115    115   ** CAPI3REF: Run-Time Library Version Numbers
   116    116   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   117    117   **
   118    118   ** These interfaces provide the same information as the [SQLITE_VERSION],
   119    119   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros

Changes to Tests/basic.eagle.

  2520   2520   {SMALLINT Int16} {SMALLUINT UInt16} {STRING String} {TEXT String} {TIME\
  2521   2521   DateTime} {TIMESTAMP DateTime} {TINYINT Byte} {TINYSINT SByte} {UINT UInt32}\
  2522   2522   {UINT8 Byte} {UINT16 UInt16} {UINT32 UInt32} {UINT64 UInt64} {ULONG UInt64}\
  2523   2523   {UNIQUEIDENTIFIER Guid} {UNSIGNEDINTEGER UInt64} {UNSIGNEDINTEGER8 Byte}\
  2524   2524   {UNSIGNEDINTEGER16 UInt16} {UNSIGNEDINTEGER32 UInt32} {UNSIGNEDINTEGER64\
  2525   2525   UInt64} {VARBINARY Binary} {VARCHAR AnsiString} {VARCHAR2 AnsiString} {YESNO\
  2526   2526   Boolean}}}
         2527  +
         2528  +###############################################################################
         2529  +
         2530  +runTest {test data-1.52 {totype extension} -setup {
         2531  +  setupDb [set fileName data-1.52.db]
         2532  +} -body {
         2533  +  set connection [getDbConnection]
         2534  +
         2535  +  $connection EnableExtensions true
         2536  +  $connection LoadExtension [getCoreBinaryFileName] sqlite3_totype_init
         2537  +
         2538  +  lappend result [sql execute -execute scalar $db "SELECT tointeger('1');"]
         2539  +  lappend result [sql execute -execute scalar $db "SELECT tointeger('1x');"]
         2540  +  lappend result [sql execute -execute scalar $db "SELECT toreal('1.01');"]
         2541  +  lappend result [sql execute -execute scalar $db "SELECT toreal('1.0x');"]
         2542  +
         2543  +  set result
         2544  +} -cleanup {
         2545  +  freeDbConnection
         2546  +
         2547  +  unset -nocomplain result connection
         2548  +
         2549  +  cleanupDb $fileName
         2550  +
         2551  +  unset -nocomplain db fileName
         2552  +} -constraints \
         2553  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
         2554  +{1 {} 1.01 {}}}
  2527   2555   
  2528   2556   ###############################################################################
  2529   2557   
  2530   2558   unset -nocomplain systemDataSQLiteDllFile systemDataSQLiteLinqDllFile \
  2531   2559       testExeFile testLinqExeFile northwindEfDbFile testLinqOutFile
  2532   2560   
  2533   2561   ###############################################################################
  2534   2562   
  2535   2563   runSQLiteTestEpilogue
  2536   2564   runTestEpilogue