System.Data.SQLite
Check-in [b1750e5eba]
Not logged in

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

Overview
Comment:Add experimental support for the FTS5 loadable extension.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b1750e5eba1b41964a8f58b7d49b55dee44f23fe
User & Date: mistachkin 2015-07-14 22:03:43
Context
2015-07-16
00:56
Extend OnChanged notifications to handle basic connection pool integration. check-in: b2cffa5974 user: mistachkin tags: trunk
2015-07-14
22:03
Add experimental support for the FTS5 loadable extension. check-in: b1750e5eba user: mistachkin tags: trunk
20:08
Improvements to the download page. check-in: d354cfb193 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to SQLite.Interop/SQLite.Interop.2005.vcproj.

   939    939   						Name="VCCLCompilerTool"
   940    940   					/>
   941    941   				</FileConfiguration>
   942    942   			</File>
   943    943   			<File
   944    944   				RelativePath=".\src\contrib\extension-functions.c"
   945    945   				>
          946  +				<FileConfiguration
          947  +					Name="Debug|Win32"
          948  +					ExcludedFromBuild="true"
          949  +					>
          950  +					<Tool
          951  +						Name="VCCLCompilerTool"
          952  +					/>
          953  +				</FileConfiguration>
          954  +				<FileConfiguration
          955  +					Name="Debug|x64"
          956  +					ExcludedFromBuild="true"
          957  +					>
          958  +					<Tool
          959  +						Name="VCCLCompilerTool"
          960  +					/>
          961  +				</FileConfiguration>
          962  +				<FileConfiguration
          963  +					Name="DebugNativeOnly|Win32"
          964  +					ExcludedFromBuild="true"
          965  +					>
          966  +					<Tool
          967  +						Name="VCCLCompilerTool"
          968  +					/>
          969  +				</FileConfiguration>
          970  +				<FileConfiguration
          971  +					Name="DebugNativeOnly|x64"
          972  +					ExcludedFromBuild="true"
          973  +					>
          974  +					<Tool
          975  +						Name="VCCLCompilerTool"
          976  +					/>
          977  +				</FileConfiguration>
          978  +				<FileConfiguration
          979  +					Name="Release|Win32"
          980  +					ExcludedFromBuild="true"
          981  +					>
          982  +					<Tool
          983  +						Name="VCCLCompilerTool"
          984  +					/>
          985  +				</FileConfiguration>
          986  +				<FileConfiguration
          987  +					Name="Release|x64"
          988  +					ExcludedFromBuild="true"
          989  +					>
          990  +					<Tool
          991  +						Name="VCCLCompilerTool"
          992  +					/>
          993  +				</FileConfiguration>
          994  +				<FileConfiguration
          995  +					Name="ReleaseNativeOnly|Win32"
          996  +					ExcludedFromBuild="true"
          997  +					>
          998  +					<Tool
          999  +						Name="VCCLCompilerTool"
         1000  +					/>
         1001  +				</FileConfiguration>
         1002  +				<FileConfiguration
         1003  +					Name="ReleaseNativeOnly|x64"
         1004  +					ExcludedFromBuild="true"
         1005  +					>
         1006  +					<Tool
         1007  +						Name="VCCLCompilerTool"
         1008  +					/>
         1009  +				</FileConfiguration>
         1010  +			</File>
         1011  +			<File
         1012  +				RelativePath=".\src\ext\fts5.c"
         1013  +				>
   946   1014   				<FileConfiguration
   947   1015   					Name="Debug|Win32"
   948   1016   					ExcludedFromBuild="true"
   949   1017   					>
   950   1018   					<Tool
   951   1019   						Name="VCCLCompilerTool"
   952   1020   					/>

Changes to SQLite.Interop/SQLite.Interop.2008.vcproj.

   939    939   						Name="VCCLCompilerTool"
   940    940   					/>
   941    941   				</FileConfiguration>
   942    942   			</File>
   943    943   			<File
   944    944   				RelativePath=".\src\contrib\extension-functions.c"
   945    945   				>
          946  +				<FileConfiguration
          947  +					Name="Debug|Win32"
          948  +					ExcludedFromBuild="true"
          949  +					>
          950  +					<Tool
          951  +						Name="VCCLCompilerTool"
          952  +					/>
          953  +				</FileConfiguration>
          954  +				<FileConfiguration
          955  +					Name="Debug|x64"
          956  +					ExcludedFromBuild="true"
          957  +					>
          958  +					<Tool
          959  +						Name="VCCLCompilerTool"
          960  +					/>
          961  +				</FileConfiguration>
          962  +				<FileConfiguration
          963  +					Name="DebugNativeOnly|Win32"
          964  +					ExcludedFromBuild="true"
          965  +					>
          966  +					<Tool
          967  +						Name="VCCLCompilerTool"
          968  +					/>
          969  +				</FileConfiguration>
          970  +				<FileConfiguration
          971  +					Name="DebugNativeOnly|x64"
          972  +					ExcludedFromBuild="true"
          973  +					>
          974  +					<Tool
          975  +						Name="VCCLCompilerTool"
          976  +					/>
          977  +				</FileConfiguration>
          978  +				<FileConfiguration
          979  +					Name="Release|Win32"
          980  +					ExcludedFromBuild="true"
          981  +					>
          982  +					<Tool
          983  +						Name="VCCLCompilerTool"
          984  +					/>
          985  +				</FileConfiguration>
          986  +				<FileConfiguration
          987  +					Name="Release|x64"
          988  +					ExcludedFromBuild="true"
          989  +					>
          990  +					<Tool
          991  +						Name="VCCLCompilerTool"
          992  +					/>
          993  +				</FileConfiguration>
          994  +				<FileConfiguration
          995  +					Name="ReleaseNativeOnly|Win32"
          996  +					ExcludedFromBuild="true"
          997  +					>
          998  +					<Tool
          999  +						Name="VCCLCompilerTool"
         1000  +					/>
         1001  +				</FileConfiguration>
         1002  +				<FileConfiguration
         1003  +					Name="ReleaseNativeOnly|x64"
         1004  +					ExcludedFromBuild="true"
         1005  +					>
         1006  +					<Tool
         1007  +						Name="VCCLCompilerTool"
         1008  +					/>
         1009  +				</FileConfiguration>
         1010  +			</File>
         1011  +			<File
         1012  +				RelativePath=".\src\ext\fts5.c"
         1013  +				>
   946   1014   				<FileConfiguration
   947   1015   					Name="Debug|Win32"
   948   1016   					ExcludedFromBuild="true"
   949   1017   					>
   950   1018   					<Tool
   951   1019   						Name="VCCLCompilerTool"
   952   1020   					/>

Changes to SQLite.Interop/SQLite.Interop.2010.vcxproj.

   473    473       </ClCompile>
   474    474       <ClCompile Include="src\win\crypt.c">
   475    475         <ExcludedFromBuild>true</ExcludedFromBuild>
   476    476       </ClCompile>
   477    477       <ClCompile Include="src\contrib\extension-functions.c">
   478    478         <ExcludedFromBuild>true</ExcludedFromBuild>
   479    479       </ClCompile>
          480  +    <ClCompile Include="src\ext\fts5.c">
          481  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          482  +    </ClCompile>
   480    483       <ClCompile Include="src\ext\percentile.c">
   481    484         <ExcludedFromBuild>true</ExcludedFromBuild>
   482    485       </ClCompile>
   483    486       <ClCompile Include="src\ext\regexp.c">
   484    487         <ExcludedFromBuild>true</ExcludedFromBuild>
   485    488       </ClCompile>
   486    489       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.2010.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.2012.vcxproj.

   480    480       </ClCompile>
   481    481       <ClCompile Include="src\win\crypt.c">
   482    482         <ExcludedFromBuild>true</ExcludedFromBuild>
   483    483       </ClCompile>
   484    484       <ClCompile Include="src\contrib\extension-functions.c">
   485    485         <ExcludedFromBuild>true</ExcludedFromBuild>
   486    486       </ClCompile>
          487  +    <ClCompile Include="src\ext\fts5.c">
          488  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          489  +    </ClCompile>
   487    490       <ClCompile Include="src\ext\percentile.c">
   488    491         <ExcludedFromBuild>true</ExcludedFromBuild>
   489    492       </ClCompile>
   490    493       <ClCompile Include="src\ext\regexp.c">
   491    494         <ExcludedFromBuild>true</ExcludedFromBuild>
   492    495       </ClCompile>
   493    496       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.2012.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.2013.vcxproj.

   480    480       </ClCompile>
   481    481       <ClCompile Include="src\win\crypt.c">
   482    482         <ExcludedFromBuild>true</ExcludedFromBuild>
   483    483       </ClCompile>
   484    484       <ClCompile Include="src\contrib\extension-functions.c">
   485    485         <ExcludedFromBuild>true</ExcludedFromBuild>
   486    486       </ClCompile>
          487  +    <ClCompile Include="src\ext\fts5.c">
          488  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          489  +    </ClCompile>
   487    490       <ClCompile Include="src\ext\percentile.c">
   488    491         <ExcludedFromBuild>true</ExcludedFromBuild>
   489    492       </ClCompile>
   490    493       <ClCompile Include="src\ext\regexp.c">
   491    494         <ExcludedFromBuild>true</ExcludedFromBuild>
   492    495       </ClCompile>
   493    496       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.2013.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.CE.2005.vcproj.

   733    733   						Name="VCCLCompilerTool"
   734    734   					/>
   735    735   				</FileConfiguration>
   736    736   			</File>
   737    737   			<File
   738    738   				RelativePath=".\src\contrib\extension-functions.c"
   739    739   				>
          740  +				<FileConfiguration
          741  +					Name="Debug|Pocket PC 2003 (ARMV4)"
          742  +					ExcludedFromBuild="true"
          743  +					>
          744  +					<Tool
          745  +						Name="VCCLCompilerTool"
          746  +					/>
          747  +				</FileConfiguration>
          748  +				<FileConfiguration
          749  +					Name="Release|Pocket PC 2003 (ARMV4)"
          750  +					ExcludedFromBuild="true"
          751  +					>
          752  +					<Tool
          753  +						Name="VCCLCompilerTool"
          754  +					/>
          755  +				</FileConfiguration>
          756  +				<FileConfiguration
          757  +					Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
          758  +					ExcludedFromBuild="true"
          759  +					>
          760  +					<Tool
          761  +						Name="VCCLCompilerTool"
          762  +					/>
          763  +				</FileConfiguration>
          764  +				<FileConfiguration
          765  +					Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
          766  +					ExcludedFromBuild="true"
          767  +					>
          768  +					<Tool
          769  +						Name="VCCLCompilerTool"
          770  +					/>
          771  +				</FileConfiguration>
          772  +				<FileConfiguration
          773  +					Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
          774  +					ExcludedFromBuild="true"
          775  +					>
          776  +					<Tool
          777  +						Name="VCCLCompilerTool"
          778  +					/>
          779  +				</FileConfiguration>
          780  +				<FileConfiguration
          781  +					Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
          782  +					ExcludedFromBuild="true"
          783  +					>
          784  +					<Tool
          785  +						Name="VCCLCompilerTool"
          786  +					/>
          787  +				</FileConfiguration>
          788  +			</File>
          789  +			<File
          790  +				RelativePath=".\src\ext\fts5.c"
          791  +				>
   740    792   				<FileConfiguration
   741    793   					Name="Debug|Pocket PC 2003 (ARMV4)"
   742    794   					ExcludedFromBuild="true"
   743    795   					>
   744    796   					<Tool
   745    797   						Name="VCCLCompilerTool"
   746    798   					/>

Changes to SQLite.Interop/SQLite.Interop.CE.2008.vcproj.

   733    733   						Name="VCCLCompilerTool"
   734    734   					/>
   735    735   				</FileConfiguration>
   736    736   			</File>
   737    737   			<File
   738    738   				RelativePath=".\src\contrib\extension-functions.c"
   739    739   				>
          740  +				<FileConfiguration
          741  +					Name="Debug|Pocket PC 2003 (ARMV4)"
          742  +					ExcludedFromBuild="true"
          743  +					>
          744  +					<Tool
          745  +						Name="VCCLCompilerTool"
          746  +					/>
          747  +				</FileConfiguration>
          748  +				<FileConfiguration
          749  +					Name="Release|Pocket PC 2003 (ARMV4)"
          750  +					ExcludedFromBuild="true"
          751  +					>
          752  +					<Tool
          753  +						Name="VCCLCompilerTool"
          754  +					/>
          755  +				</FileConfiguration>
          756  +				<FileConfiguration
          757  +					Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
          758  +					ExcludedFromBuild="true"
          759  +					>
          760  +					<Tool
          761  +						Name="VCCLCompilerTool"
          762  +					/>
          763  +				</FileConfiguration>
          764  +				<FileConfiguration
          765  +					Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
          766  +					ExcludedFromBuild="true"
          767  +					>
          768  +					<Tool
          769  +						Name="VCCLCompilerTool"
          770  +					/>
          771  +				</FileConfiguration>
          772  +				<FileConfiguration
          773  +					Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
          774  +					ExcludedFromBuild="true"
          775  +					>
          776  +					<Tool
          777  +						Name="VCCLCompilerTool"
          778  +					/>
          779  +				</FileConfiguration>
          780  +				<FileConfiguration
          781  +					Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
          782  +					ExcludedFromBuild="true"
          783  +					>
          784  +					<Tool
          785  +						Name="VCCLCompilerTool"
          786  +					/>
          787  +				</FileConfiguration>
          788  +			</File>
          789  +			<File
          790  +				RelativePath=".\src\ext\fts5.c"
          791  +				>
   740    792   				<FileConfiguration
   741    793   					Name="Debug|Pocket PC 2003 (ARMV4)"
   742    794   					ExcludedFromBuild="true"
   743    795   					>
   744    796   					<Tool
   745    797   						Name="VCCLCompilerTool"
   746    798   					/>

Changes to SQLite.Interop/SQLite.Interop.CE.2012.vcxproj.

   179    179       </ClCompile>
   180    180       <ClCompile Include="src\win\crypt.c">
   181    181         <ExcludedFromBuild>true</ExcludedFromBuild>
   182    182       </ClCompile>
   183    183       <ClCompile Include="src\contrib\extension-functions.c">
   184    184         <ExcludedFromBuild>true</ExcludedFromBuild>
   185    185       </ClCompile>
          186  +    <ClCompile Include="src\ext\fts5.c">
          187  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          188  +    </ClCompile>
   186    189       <ClCompile Include="src\ext\percentile.c">
   187    190         <ExcludedFromBuild>true</ExcludedFromBuild>
   188    191       </ClCompile>
   189    192       <ClCompile Include="src\ext\regexp.c">
   190    193         <ExcludedFromBuild>true</ExcludedFromBuild>
   191    194       </ClCompile>
   192    195       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.CE.2012.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.Static.2005.vcproj.

   939    939   						Name="VCCLCompilerTool"
   940    940   					/>
   941    941   				</FileConfiguration>
   942    942   			</File>
   943    943   			<File
   944    944   				RelativePath=".\src\contrib\extension-functions.c"
   945    945   				>
          946  +				<FileConfiguration
          947  +					Name="Debug|Win32"
          948  +					ExcludedFromBuild="true"
          949  +					>
          950  +					<Tool
          951  +						Name="VCCLCompilerTool"
          952  +					/>
          953  +				</FileConfiguration>
          954  +				<FileConfiguration
          955  +					Name="Debug|x64"
          956  +					ExcludedFromBuild="true"
          957  +					>
          958  +					<Tool
          959  +						Name="VCCLCompilerTool"
          960  +					/>
          961  +				</FileConfiguration>
          962  +				<FileConfiguration
          963  +					Name="DebugNativeOnly|Win32"
          964  +					ExcludedFromBuild="true"
          965  +					>
          966  +					<Tool
          967  +						Name="VCCLCompilerTool"
          968  +					/>
          969  +				</FileConfiguration>
          970  +				<FileConfiguration
          971  +					Name="DebugNativeOnly|x64"
          972  +					ExcludedFromBuild="true"
          973  +					>
          974  +					<Tool
          975  +						Name="VCCLCompilerTool"
          976  +					/>
          977  +				</FileConfiguration>
          978  +				<FileConfiguration
          979  +					Name="Release|Win32"
          980  +					ExcludedFromBuild="true"
          981  +					>
          982  +					<Tool
          983  +						Name="VCCLCompilerTool"
          984  +					/>
          985  +				</FileConfiguration>
          986  +				<FileConfiguration
          987  +					Name="Release|x64"
          988  +					ExcludedFromBuild="true"
          989  +					>
          990  +					<Tool
          991  +						Name="VCCLCompilerTool"
          992  +					/>
          993  +				</FileConfiguration>
          994  +				<FileConfiguration
          995  +					Name="ReleaseNativeOnly|Win32"
          996  +					ExcludedFromBuild="true"
          997  +					>
          998  +					<Tool
          999  +						Name="VCCLCompilerTool"
         1000  +					/>
         1001  +				</FileConfiguration>
         1002  +				<FileConfiguration
         1003  +					Name="ReleaseNativeOnly|x64"
         1004  +					ExcludedFromBuild="true"
         1005  +					>
         1006  +					<Tool
         1007  +						Name="VCCLCompilerTool"
         1008  +					/>
         1009  +				</FileConfiguration>
         1010  +			</File>
         1011  +			<File
         1012  +				RelativePath=".\src\ext\fts5.c"
         1013  +				>
   946   1014   				<FileConfiguration
   947   1015   					Name="Debug|Win32"
   948   1016   					ExcludedFromBuild="true"
   949   1017   					>
   950   1018   					<Tool
   951   1019   						Name="VCCLCompilerTool"
   952   1020   					/>

Changes to SQLite.Interop/SQLite.Interop.Static.2008.vcproj.

   939    939   						Name="VCCLCompilerTool"
   940    940   					/>
   941    941   				</FileConfiguration>
   942    942   			</File>
   943    943   			<File
   944    944   				RelativePath=".\src\contrib\extension-functions.c"
   945    945   				>
          946  +				<FileConfiguration
          947  +					Name="Debug|Win32"
          948  +					ExcludedFromBuild="true"
          949  +					>
          950  +					<Tool
          951  +						Name="VCCLCompilerTool"
          952  +					/>
          953  +				</FileConfiguration>
          954  +				<FileConfiguration
          955  +					Name="Debug|x64"
          956  +					ExcludedFromBuild="true"
          957  +					>
          958  +					<Tool
          959  +						Name="VCCLCompilerTool"
          960  +					/>
          961  +				</FileConfiguration>
          962  +				<FileConfiguration
          963  +					Name="DebugNativeOnly|Win32"
          964  +					ExcludedFromBuild="true"
          965  +					>
          966  +					<Tool
          967  +						Name="VCCLCompilerTool"
          968  +					/>
          969  +				</FileConfiguration>
          970  +				<FileConfiguration
          971  +					Name="DebugNativeOnly|x64"
          972  +					ExcludedFromBuild="true"
          973  +					>
          974  +					<Tool
          975  +						Name="VCCLCompilerTool"
          976  +					/>
          977  +				</FileConfiguration>
          978  +				<FileConfiguration
          979  +					Name="Release|Win32"
          980  +					ExcludedFromBuild="true"
          981  +					>
          982  +					<Tool
          983  +						Name="VCCLCompilerTool"
          984  +					/>
          985  +				</FileConfiguration>
          986  +				<FileConfiguration
          987  +					Name="Release|x64"
          988  +					ExcludedFromBuild="true"
          989  +					>
          990  +					<Tool
          991  +						Name="VCCLCompilerTool"
          992  +					/>
          993  +				</FileConfiguration>
          994  +				<FileConfiguration
          995  +					Name="ReleaseNativeOnly|Win32"
          996  +					ExcludedFromBuild="true"
          997  +					>
          998  +					<Tool
          999  +						Name="VCCLCompilerTool"
         1000  +					/>
         1001  +				</FileConfiguration>
         1002  +				<FileConfiguration
         1003  +					Name="ReleaseNativeOnly|x64"
         1004  +					ExcludedFromBuild="true"
         1005  +					>
         1006  +					<Tool
         1007  +						Name="VCCLCompilerTool"
         1008  +					/>
         1009  +				</FileConfiguration>
         1010  +			</File>
         1011  +			<File
         1012  +				RelativePath=".\src\ext\fts5.c"
         1013  +				>
   946   1014   				<FileConfiguration
   947   1015   					Name="Debug|Win32"
   948   1016   					ExcludedFromBuild="true"
   949   1017   					>
   950   1018   					<Tool
   951   1019   						Name="VCCLCompilerTool"
   952   1020   					/>

Changes to SQLite.Interop/SQLite.Interop.Static.2010.vcxproj.

   473    473       </ClCompile>
   474    474       <ClCompile Include="src\win\crypt.c">
   475    475         <ExcludedFromBuild>true</ExcludedFromBuild>
   476    476       </ClCompile>
   477    477       <ClCompile Include="src\contrib\extension-functions.c">
   478    478         <ExcludedFromBuild>true</ExcludedFromBuild>
   479    479       </ClCompile>
          480  +    <ClCompile Include="src\ext\fts5.c">
          481  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          482  +    </ClCompile>
   480    483       <ClCompile Include="src\ext\percentile.c">
   481    484         <ExcludedFromBuild>true</ExcludedFromBuild>
   482    485       </ClCompile>
   483    486       <ClCompile Include="src\ext\regexp.c">
   484    487         <ExcludedFromBuild>true</ExcludedFromBuild>
   485    488       </ClCompile>
   486    489       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.Static.2010.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.Static.2012.vcxproj.

   480    480       </ClCompile>
   481    481       <ClCompile Include="src\win\crypt.c">
   482    482         <ExcludedFromBuild>true</ExcludedFromBuild>
   483    483       </ClCompile>
   484    484       <ClCompile Include="src\contrib\extension-functions.c">
   485    485         <ExcludedFromBuild>true</ExcludedFromBuild>
   486    486       </ClCompile>
          487  +    <ClCompile Include="src\ext\fts5.c">
          488  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          489  +    </ClCompile>
   487    490       <ClCompile Include="src\ext\percentile.c">
   488    491         <ExcludedFromBuild>true</ExcludedFromBuild>
   489    492       </ClCompile>
   490    493       <ClCompile Include="src\ext\regexp.c">
   491    494         <ExcludedFromBuild>true</ExcludedFromBuild>
   492    495       </ClCompile>
   493    496       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.Static.2012.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/SQLite.Interop.Static.2013.vcxproj.

   480    480       </ClCompile>
   481    481       <ClCompile Include="src\win\crypt.c">
   482    482         <ExcludedFromBuild>true</ExcludedFromBuild>
   483    483       </ClCompile>
   484    484       <ClCompile Include="src\contrib\extension-functions.c">
   485    485         <ExcludedFromBuild>true</ExcludedFromBuild>
   486    486       </ClCompile>
          487  +    <ClCompile Include="src\ext\fts5.c">
          488  +      <ExcludedFromBuild>true</ExcludedFromBuild>
          489  +    </ClCompile>
   487    490       <ClCompile Include="src\ext\percentile.c">
   488    491         <ExcludedFromBuild>true</ExcludedFromBuild>
   489    492       </ClCompile>
   490    493       <ClCompile Include="src\ext\regexp.c">
   491    494         <ExcludedFromBuild>true</ExcludedFromBuild>
   492    495       </ClCompile>
   493    496       <ClCompile Include="src\ext\totype.c">

Changes to SQLite.Interop/SQLite.Interop.Static.2013.vcxproj.filters.

    30     30         <Filter>Source Files</Filter>
    31     31       </ClCompile>
    32     32       <ClCompile Include="src\win\crypt.c">
    33     33         <Filter>Source Files</Filter>
    34     34       </ClCompile>
    35     35       <ClCompile Include="src\contrib\extension-functions.c">
    36     36         <Filter>Source Files</Filter>
           37  +    </ClCompile>
           38  +    <ClCompile Include="src\ext\fts5.c">
           39  +      <Filter>Source Files</Filter>
    37     40       </ClCompile>
    38     41       <ClCompile Include="src\ext\percentile.c">
    39     42         <Filter>Source Files</Filter>
    40     43       </ClCompile>
    41     44       <ClCompile Include="src\ext\regexp.c">
    42     45         <Filter>Source Files</Filter>
    43     46       </ClCompile>

Changes to SQLite.Interop/props/SQLite.Interop.2005.vsprops.

    55     55   	<UserMacro
    56     56   		Name="INTEROP_DEBUG_DEFINES"
    57     57   		Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1"
    58     58   		PerformEnvironmentSet="true"
    59     59   	/>
    60     60   	<UserMacro
    61     61   		Name="INTEROP_EXTRA_DEFINES"
    62         -		Value="INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1"
           62  +		Value="INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_FTS5_EXTENSION=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1"
    63     63   		PerformEnvironmentSet="true"
    64     64   	/>
    65     65   	<UserMacro
    66     66   		Name="INTEROP_ASSEMBLY_RESOURCES"
    67     67   		Value="/ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp"
    68     68   		PerformEnvironmentSet="true"
    69     69   	/>

Changes to SQLite.Interop/props/SQLite.Interop.2008.vsprops.

    55     55   	<UserMacro
    56     56   		Name="INTEROP_DEBUG_DEFINES"
    57     57   		Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1"
    58     58   		PerformEnvironmentSet="true"
    59     59   	/>
    60     60   	<UserMacro
    61     61   		Name="INTEROP_EXTRA_DEFINES"
    62         -		Value="INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1"
           62  +		Value="INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_FTS5_EXTENSION=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1"
    63     63   		PerformEnvironmentSet="true"
    64     64   	/>
    65     65   	<UserMacro
    66     66   		Name="INTEROP_ASSEMBLY_RESOURCES"
    67     67   		Value="/ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp"
    68     68   		PerformEnvironmentSet="true"
    69     69   	/>

Changes to SQLite.Interop/props/SQLite.Interop.2010.props.

    14     14       <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION>
    15     15       <INTEROP_MANIFEST_VERSION>1.0.98.0</INTEROP_MANIFEST_VERSION>
    16     16       <INTEROP_RC_VERSION>1,0,98,0</INTEROP_RC_VERSION>
    17     17       <INTEROP_INCLUDE_DIRECTORIES>src\core</INTEROP_INCLUDE_DIRECTORIES>
    18     18       <INTEROP_LIBRARY_DIRECTORIES></INTEROP_LIBRARY_DIRECTORIES>
    19     19       <INTEROP_LIBRARY_DEPENDENCIES></INTEROP_LIBRARY_DEPENDENCIES>
    20     20       <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES>
    21         -    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
           21  +    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_FTS5_EXTENSION=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
    22     22       <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES>
    23     23       <INTEROP_KEY_FILE>$(ProjectDir)..\Keys\System.Data.SQLite.snk</INTEROP_KEY_FILE>
    24     24       <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME>
    25     25       <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME>
    26     26     </PropertyGroup>
    27     27     <ItemGroup>
    28     28       <BuildMacro Include="ConfigurationYear">

Changes to SQLite.Interop/props/SQLite.Interop.2012.props.

    14     14       <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION>
    15     15       <INTEROP_MANIFEST_VERSION>1.0.98.0</INTEROP_MANIFEST_VERSION>
    16     16       <INTEROP_RC_VERSION>1,0,98,0</INTEROP_RC_VERSION>
    17     17       <INTEROP_INCLUDE_DIRECTORIES>src\core</INTEROP_INCLUDE_DIRECTORIES>
    18     18       <INTEROP_LIBRARY_DIRECTORIES></INTEROP_LIBRARY_DIRECTORIES>
    19     19       <INTEROP_LIBRARY_DEPENDENCIES></INTEROP_LIBRARY_DEPENDENCIES>
    20     20       <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES>
    21         -    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
           21  +    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_FTS5_EXTENSION=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
    22     22       <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES>
    23     23       <INTEROP_KEY_FILE>$(ProjectDir)..\Keys\System.Data.SQLite.snk</INTEROP_KEY_FILE>
    24     24       <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME>
    25     25       <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME>
    26     26     </PropertyGroup>
    27     27     <ItemGroup>
    28     28       <BuildMacro Include="ConfigurationYear">

Changes to SQLite.Interop/props/SQLite.Interop.2013.props.

    14     14       <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION>
    15     15       <INTEROP_MANIFEST_VERSION>1.0.98.0</INTEROP_MANIFEST_VERSION>
    16     16       <INTEROP_RC_VERSION>1,0,98,0</INTEROP_RC_VERSION>
    17     17       <INTEROP_INCLUDE_DIRECTORIES>src\core</INTEROP_INCLUDE_DIRECTORIES>
    18     18       <INTEROP_LIBRARY_DIRECTORIES></INTEROP_LIBRARY_DIRECTORIES>
    19     19       <INTEROP_LIBRARY_DEPENDENCIES></INTEROP_LIBRARY_DEPENDENCIES>
    20     20       <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES>
    21         -    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
           21  +    <INTEROP_EXTRA_DEFINES>INTEROP_PLACEHOLDER=1;INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1;INTEROP_FTS5_EXTENSION=1;INTEROP_PERCENTILE_EXTENSION=1;INTEROP_TOTYPE_EXTENSION=1;INTEROP_REGEXP_EXTENSION=1</INTEROP_EXTRA_DEFINES>
    22     22       <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\Resources\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES>
    23     23       <INTEROP_KEY_FILE>$(ProjectDir)..\Keys\System.Data.SQLite.snk</INTEROP_KEY_FILE>
    24     24       <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME>
    25     25       <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME>
    26     26     </PropertyGroup>
    27     27     <ItemGroup>
    28     28       <BuildMacro Include="ConfigurationYear">

Changes to SQLite.Interop/props/sqlite3.props.

     7      7    * Released to the public domain, use at your own risk!
     8      8    *
     9      9   -->
    10     10   <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
    11     11     <PropertyGroup Label="UserMacros">
    12     12       <SQLITE_MANIFEST_VERSION>3.8.11.0</SQLITE_MANIFEST_VERSION>
    13     13       <SQLITE_RC_VERSION>3,8,11,0</SQLITE_RC_VERSION>
    14         -    <SQLITE_COMMON_DEFINES>_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;SQLITE_THREADSAFE=1;SQLITE_USE_URI=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT4=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1;SQLITE_ENABLE_MEMORY_MANAGEMENT=1</SQLITE_COMMON_DEFINES>
           14  +    <SQLITE_COMMON_DEFINES>_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;SQLITE_THREADSAFE=1;SQLITE_USE_URI=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT4=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_FTS5=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1;SQLITE_ENABLE_MEMORY_MANAGEMENT=1</SQLITE_COMMON_DEFINES>
    15     15       <SQLITE_EXTRA_DEFINES>SQLITE_PLACEHOLDER=1;SQLITE_HAS_CODEC=1</SQLITE_EXTRA_DEFINES>
    16     16       <SQLITE_WINCE_200X_DEFINES>SQLITE_OMIT_WAL=1</SQLITE_WINCE_200X_DEFINES>
    17     17       <SQLITE_WINCE_2013_DEFINES>HAVE_ERRNO_H=1;SQLITE_MSVC_LOCALTIME_API=1</SQLITE_WINCE_2013_DEFINES>
    18     18       <SQLITE_DEBUG_DEFINES>SQLITE_DEBUG=1;SQLITE_MEMDEBUG=1;SQLITE_ENABLE_EXPENSIVE_ASSERT=1</SQLITE_DEBUG_DEFINES>
    19     19       <SQLITE_RELEASE_DEFINES>SQLITE_WIN32_MALLOC=1</SQLITE_RELEASE_DEFINES>
    20     20       <SQLITE_DISABLE_WARNINGS>4055;4100;4127;4146;4210;4232;4244;4245;4267;4306;4389;4701;4703;4706</SQLITE_DISABLE_WARNINGS>
    21     21       <SQLITE_DISABLE_X64_WARNINGS></SQLITE_DISABLE_X64_WARNINGS>

Changes to SQLite.Interop/props/sqlite3.vsprops.

    20     20   	<UserMacro
    21     21   		Name="SQLITE_RC_VERSION"
    22     22   		Value="3,8,11,0"
    23     23   		PerformEnvironmentSet="true"
    24     24   	/>
    25     25   	<UserMacro
    26     26   		Name="SQLITE_COMMON_DEFINES"
    27         -		Value="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;SQLITE_THREADSAFE=1;SQLITE_USE_URI=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT4=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1;SQLITE_ENABLE_MEMORY_MANAGEMENT=1"
           27  +		Value="_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;SQLITE_THREADSAFE=1;SQLITE_USE_URI=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT4=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_FTS5=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1;SQLITE_ENABLE_MEMORY_MANAGEMENT=1"
    28     28   		PerformEnvironmentSet="true"
    29     29   	/>
    30     30   	<UserMacro
    31     31   		Name="SQLITE_EXTRA_DEFINES"
    32     32   		Value="SQLITE_PLACEHOLDER=1;SQLITE_HAS_CODEC=1"
    33     33   		PerformEnvironmentSet="true"
    34     34   	/>

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

   323    323   **
   324    324   ** See also: [sqlite3_libversion()],
   325    325   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   326    326   ** [sqlite_version()] and [sqlite_source_id()].
   327    327   */
   328    328   #define SQLITE_VERSION        "3.8.11"
   329    329   #define SQLITE_VERSION_NUMBER 3008011
   330         -#define SQLITE_SOURCE_ID      "2015-07-03 21:38:09 b202e2a1d73d104d795d2252b1c6f61d65bfb295"
          330  +#define SQLITE_SOURCE_ID      "2015-07-14 21:56:53 b53a95063cf6b8ee8cad77e9fff4c50a356c43bb"
   331    331   
   332    332   /*
   333    333   ** CAPI3REF: Run-Time Library Version Numbers
   334    334   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   335    335   **
   336    336   ** These interfaces provide the same information as the [SQLITE_VERSION],
   337    337   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
  8359   8359   #  define SQLITE_NOINLINE
  8360   8360   #endif
  8361   8361   
  8362   8362   /*
  8363   8363   ** Make sure that the compiler intrinsics we desire are enabled when
  8364   8364   ** compiling with an appropriate version of MSVC.
  8365   8365   */
  8366         -#if defined(_MSC_VER) && _MSC_VER>=1300
         8366  +#if defined(_MSC_VER) && _MSC_VER>=1300 && !defined(_WIN32_WCE)
  8367   8367   #  include <intrin.h>
  8368   8368   #  pragma intrinsic(_byteswap_ushort)
  8369   8369   #  pragma intrinsic(_byteswap_ulong)
  8370   8370   #endif
  8371   8371   
  8372   8372   /*
  8373   8373   ** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
................................................................................
  8942   8942   # define SQLITE_DEFAULT_WORKER_THREADS 0
  8943   8943   #endif
  8944   8944   #if SQLITE_DEFAULT_WORKER_THREADS>SQLITE_MAX_WORKER_THREADS
  8945   8945   # undef SQLITE_MAX_WORKER_THREADS
  8946   8946   # define SQLITE_MAX_WORKER_THREADS SQLITE_DEFAULT_WORKER_THREADS
  8947   8947   #endif
  8948   8948   
         8949  +/*
         8950  +** The default initial allocation for the pagecache when using separate
         8951  +** pagecaches for each database connection.  A positive number is the
         8952  +** number of pages.  A negative number N translations means that a buffer
         8953  +** of -1024*N bytes is allocated and used for as many pages as it will hold.
         8954  +*/
         8955  +#ifndef SQLITE_DEFAULT_PCACHE_INITSZ
         8956  +# define SQLITE_DEFAULT_PCACHE_INITSZ 100
         8957  +#endif
         8958  +
  8949   8959   
  8950   8960   /*
  8951   8961   ** GCC does not define the offsetof() macro so we'll have to do it
  8952   8962   ** ourselves.
  8953   8963   */
  8954   8964   #ifndef offsetof
  8955   8965   #define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
................................................................................
 14044  14054      SQLITE_DEFAULT_MMAP_SIZE,  /* szMmap */
 14045  14055      SQLITE_MAX_MMAP_SIZE,      /* mxMmap */
 14046  14056      (void*)0,                  /* pScratch */
 14047  14057      0,                         /* szScratch */
 14048  14058      0,                         /* nScratch */
 14049  14059      (void*)0,                  /* pPage */
 14050  14060      0,                         /* szPage */
 14051         -   0,                         /* nPage */
        14061  +   SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */
 14052  14062      0,                         /* mxParserStack */
 14053  14063      0,                         /* sharedCacheEnabled */
 14054  14064      SQLITE_SORTER_PMASZ,       /* szPma */
 14055  14065      /* All the rest should always be initialized to zero */
 14056  14066      0,                         /* isInit */
 14057  14067      0,                         /* inProgress */
 14058  14068      0,                         /* isMutexInit */
................................................................................
 20806  20816     }else{
 20807  20817       mem0.pScratchEnd = 0;
 20808  20818       sqlite3GlobalConfig.pScratch = 0;
 20809  20819       sqlite3GlobalConfig.szScratch = 0;
 20810  20820       sqlite3GlobalConfig.nScratch = 0;
 20811  20821     }
 20812  20822     if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
 20813         -      || sqlite3GlobalConfig.nPage<1 ){
        20823  +      || sqlite3GlobalConfig.nPage<=0 ){
 20814  20824       sqlite3GlobalConfig.pPage = 0;
 20815  20825       sqlite3GlobalConfig.szPage = 0;
 20816         -    sqlite3GlobalConfig.nPage = 0;
 20817  20826     }
 20818  20827     rc = sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
 20819  20828     if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));
 20820  20829     return rc;
 20821  20830   }
 20822  20831   
 20823  20832   /*
................................................................................
 40412  40421   *************************************************************************
 40413  40422   **
 40414  40423   ** This file implements the default page cache implementation (the
 40415  40424   ** sqlite3_pcache interface). It also contains part of the implementation
 40416  40425   ** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.
 40417  40426   ** If the default page cache implementation is overridden, then neither of
 40418  40427   ** these two features are available.
        40428  +**
        40429  +** A Page cache line looks like this:
        40430  +**
        40431  +**  -------------------------------------------------------------
        40432  +**  |  database page content   |  PgHdr1  |  MemPage  |  PgHdr  |
        40433  +**  -------------------------------------------------------------
        40434  +**
        40435  +** The database page content is up front (so that buffer overreads tend to
        40436  +** flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions).   MemPage
        40437  +** is the extension added by the btree.c module containing information such
        40438  +** as the database page number and how that database page is used.  PgHdr
        40439  +** is added by the pcache.c layer and contains information used to keep track
        40440  +** of which pages are "dirty".  PgHdr1 is an extension added by this
        40441  +** module (pcache1.c).  The PgHdr1 header is a subclass of sqlite3_pcache_page.
        40442  +** PgHdr1 contains information needed to look up a page by its page number.
        40443  +** The superclass sqlite3_pcache_page.pBuf points to the start of the
        40444  +** database page content and sqlite3_pcache_page.pExtra points to PgHdr.
        40445  +**
        40446  +** The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at
        40447  +** runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size).  The
        40448  +** sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this
        40449  +** size can vary according to architecture, compile-time options, and
        40450  +** SQLite library version number.
        40451  +**
        40452  +** If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained
        40453  +** using a separate memory allocation from the database page content.  This
        40454  +** seeks to overcome the "clownshoe" problem (also called "internal
        40455  +** fragmentation" in academic literature) of allocating a few bytes more
        40456  +** than a power of two with the memory allocator rounding up to the next
        40457  +** power of two, and leaving the rounded-up space unused.
        40458  +**
        40459  +** This module tracks pointers to PgHdr1 objects.  Only pcache.c communicates
        40460  +** with this module.  Information is passed back and forth as PgHdr1 pointers.
        40461  +**
        40462  +** The pcache.c and pager.c modules deal pointers to PgHdr objects.
        40463  +** The btree.c module deals with pointers to MemPage objects.
        40464  +**
        40465  +** SOURCE OF PAGE CACHE MEMORY:
        40466  +**
        40467  +** Memory for a page might come from any of three sources:
        40468  +**
        40469  +**    (1)  The general-purpose memory allocator - sqlite3Malloc()
        40470  +**    (2)  Global page-cache memory provided using sqlite3_config() with
        40471  +**         SQLITE_CONFIG_PAGECACHE.
        40472  +**    (3)  PCache-local bulk allocation.
        40473  +**
        40474  +** The third case is a chunk of heap memory (defaulting to 100 pages worth)
        40475  +** that is allocated when the page cache is created.  The size of the local
        40476  +** bulk allocation can be adjusted using 
        40477  +**
        40478  +**     sqlite3_config(SQLITE_CONFIG_PCACHE, 0, 0, N).
        40479  +**
        40480  +** If N is positive, then N pages worth of memory are allocated using a single
        40481  +** sqlite3Malloc() call and that memory is used for the first N pages allocated.
        40482  +** Or if N is negative, then -1024*N bytes of memory are allocated and used
        40483  +** for as many pages as can be accomodated.
        40484  +**
        40485  +** Only one of (2) or (3) can be used.  Once the memory available to (2) or
        40486  +** (3) is exhausted, subsequent allocations fail over to the general-purpose
        40487  +** memory allocator (1).
        40488  +**
        40489  +** Earlier versions of SQLite used only methods (1) and (2).  But experiments
        40490  +** show that method (3) with N==100 provides about a 5% performance boost for
        40491  +** common workloads.
 40419  40492   */
 40420         -
 40421  40493   
 40422  40494   typedef struct PCache1 PCache1;
 40423  40495   typedef struct PgHdr1 PgHdr1;
 40424  40496   typedef struct PgFreeslot PgFreeslot;
 40425  40497   typedef struct PGroup PGroup;
 40426  40498   
 40427  40499   /* Each page cache (or PCache) belongs to a PGroup.  A PGroup is a set 
................................................................................
 40466  40538   struct PCache1 {
 40467  40539     /* Cache configuration parameters. Page size (szPage) and the purgeable
 40468  40540     ** flag (bPurgeable) are set when the cache is created. nMax may be 
 40469  40541     ** modified at any time by a call to the pcache1Cachesize() method.
 40470  40542     ** The PGroup mutex must be held when accessing nMax.
 40471  40543     */
 40472  40544     PGroup *pGroup;                     /* PGroup this cache belongs to */
 40473         -  int szPage;                         /* Size of allocated pages in bytes */
 40474         -  int szExtra;                        /* Size of extra space in bytes */
        40545  +  int szPage;                         /* Size of database content section */
        40546  +  int szExtra;                        /* sizeof(MemPage)+sizeof(PgHdr) */
        40547  +  int szAlloc;                        /* Total size of one pcache line */
 40475  40548     int bPurgeable;                     /* True if cache is purgeable */
 40476  40549     unsigned int nMin;                  /* Minimum number of pages reserved */
 40477  40550     unsigned int nMax;                  /* Configured "cache_size" value */
 40478  40551     unsigned int n90pct;                /* nMax*9/10 */
 40479  40552     unsigned int iMaxKey;               /* Largest key seen since xTruncate() */
 40480  40553   
 40481  40554     /* Hash table of all pages. The following variables may only be accessed
 40482  40555     ** when the accessor is holding the PGroup mutex.
 40483  40556     */
 40484  40557     unsigned int nRecyclable;           /* Number of pages in the LRU list */
 40485  40558     unsigned int nPage;                 /* Total number of pages in apHash */
 40486  40559     unsigned int nHash;                 /* Number of slots in apHash[] */
 40487  40560     PgHdr1 **apHash;                    /* Hash table for fast lookup by key */
        40561  +  PgHdr1 *pFree;                      /* List of unused pcache-local pages */
        40562  +  void *pBulk;                        /* Bulk memory used by pcache-local */
 40488  40563   };
 40489  40564   
 40490  40565   /*
 40491  40566   ** Each cache entry is represented by an instance of the following 
 40492  40567   ** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
 40493  40568   ** PgHdr1.pCache->szPage bytes is allocated directly before this structure 
 40494  40569   ** in memory.
 40495  40570   */
 40496  40571   struct PgHdr1 {
 40497  40572     sqlite3_pcache_page page;
 40498  40573     unsigned int iKey;             /* Key value (page number) */
 40499  40574     u8 isPinned;                   /* Page in use, not on the LRU list */
        40575  +  u8 isBulkLocal;                /* This page from bulk local storage */
 40500  40576     PgHdr1 *pNext;                 /* Next in hash table chain */
 40501  40577     PCache1 *pCache;               /* Cache that currently owns this page */
 40502  40578     PgHdr1 *pLruNext;              /* Next in LRU list of unpinned pages */
 40503  40579     PgHdr1 *pLruPrev;              /* Previous in LRU list of unpinned pages */
 40504  40580   };
 40505  40581   
 40506  40582   /*
 40507         -** Free slots in the allocator used to divide up the buffer provided using
 40508         -** the SQLITE_CONFIG_PAGECACHE mechanism.
        40583  +** Free slots in the allocator used to divide up the global page cache
        40584  +** buffer provided using the SQLITE_CONFIG_PAGECACHE mechanism.
 40509  40585   */
 40510  40586   struct PgFreeslot {
 40511  40587     PgFreeslot *pNext;  /* Next free slot */
 40512  40588   };
 40513  40589   
 40514  40590   /*
 40515  40591   ** Global data used by this cache.
................................................................................
 40519  40595   
 40520  40596     /* Variables related to SQLITE_CONFIG_PAGECACHE settings.  The
 40521  40597     ** szSlot, nSlot, pStart, pEnd, nReserve, and isInit values are all
 40522  40598     ** fixed at sqlite3_initialize() time and do not require mutex protection.
 40523  40599     ** The nFreeSlot and pFree values do require mutex protection.
 40524  40600     */
 40525  40601     int isInit;                    /* True if initialized */
        40602  +  int separateCache;             /* Use a new PGroup for each PCache */
 40526  40603     int szSlot;                    /* Size of each free slot */
 40527  40604     int nSlot;                     /* The number of pcache slots */
 40528  40605     int nReserve;                  /* Try to keep nFreeSlot above this */
 40529         -  void *pStart, *pEnd;           /* Bounds of pagecache malloc range */
        40606  +  void *pStart, *pEnd;           /* Bounds of global page cache memory */
 40530  40607     /* Above requires no mutex.  Use mutex below for variable that follow. */
 40531  40608     sqlite3_mutex *mutex;          /* Mutex for accessing the following: */
 40532  40609     PgFreeslot *pFree;             /* Free page blocks */
 40533  40610     int nFreeSlot;                 /* Number of unused pcache slots */
 40534  40611     /* The following value requires a mutex to change.  We skip the mutex on
 40535  40612     ** reading because (1) most platforms read a 32-bit integer atomically and
 40536  40613     ** (2) even if an incorrect value is read, no great harm is done since this
................................................................................
 40569  40646   **
 40570  40647   ** This routine is called from sqlite3_initialize() and so it is guaranteed
 40571  40648   ** to be serialized already.  There is no need for further mutexing.
 40572  40649   */
 40573  40650   SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
 40574  40651     if( pcache1.isInit ){
 40575  40652       PgFreeslot *p;
        40653  +    if( pBuf==0 ) sz = n = 0;
 40576  40654       sz = ROUNDDOWN8(sz);
 40577  40655       pcache1.szSlot = sz;
 40578  40656       pcache1.nSlot = pcache1.nFreeSlot = n;
 40579  40657       pcache1.nReserve = n>90 ? 10 : (n/10 + 1);
 40580  40658       pcache1.pStart = pBuf;
 40581  40659       pcache1.pFree = 0;
 40582  40660       pcache1.bUnderPressure = 0;
................................................................................
 40633  40711     }
 40634  40712     return p;
 40635  40713   }
 40636  40714   
 40637  40715   /*
 40638  40716   ** Free an allocated buffer obtained from pcache1Alloc().
 40639  40717   */
 40640         -static int pcache1Free(void *p){
        40718  +static void pcache1Free(void *p){
 40641  40719     int nFreed = 0;
 40642         -  if( p==0 ) return 0;
        40720  +  if( p==0 ) return;
 40643  40721     if( p>=pcache1.pStart && p<pcache1.pEnd ){
 40644  40722       PgFreeslot *pSlot;
 40645  40723       sqlite3_mutex_enter(pcache1.mutex);
 40646  40724       sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_USED, 1);
 40647  40725       pSlot = (PgFreeslot*)p;
 40648  40726       pSlot->pNext = pcache1.pFree;
 40649  40727       pcache1.pFree = pSlot;
................................................................................
 40650  40728       pcache1.nFreeSlot++;
 40651  40729       pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve;
 40652  40730       assert( pcache1.nFreeSlot<=pcache1.nSlot );
 40653  40731       sqlite3_mutex_leave(pcache1.mutex);
 40654  40732     }else{
 40655  40733       assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
 40656  40734       sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
 40657         -    nFreed = sqlite3MallocSize(p);
 40658  40735   #ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
        40736  +    nFreed = sqlite3MallocSize(p);
 40659  40737       sqlite3_mutex_enter(pcache1.mutex);
 40660  40738       sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
 40661  40739       sqlite3_mutex_leave(pcache1.mutex);
 40662  40740   #endif
 40663  40741       sqlite3_free(p);
 40664  40742     }
 40665         -  return nFreed;
 40666  40743   }
 40667  40744   
 40668  40745   #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
 40669  40746   /*
 40670  40747   ** Return the size of a pcache allocation
 40671  40748   */
 40672  40749   static int pcache1MemSize(void *p){
................................................................................
 40686  40763   /*
 40687  40764   ** Allocate a new page object initially associated with cache pCache.
 40688  40765   */
 40689  40766   static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
 40690  40767     PgHdr1 *p = 0;
 40691  40768     void *pPg;
 40692  40769   
 40693         -  /* The group mutex must be released before pcache1Alloc() is called. This
 40694         -  ** is because it may call sqlite3_release_memory(), which assumes that 
 40695         -  ** this mutex is not held. */
 40696  40770     assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
 40697         -  pcache1LeaveMutex(pCache->pGroup);
        40771  +  if( pCache->pFree ){
        40772  +    p = pCache->pFree;
        40773  +    pCache->pFree = p->pNext;
        40774  +    p->pNext = 0;
        40775  +  }else{
        40776  +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
        40777  +    /* The group mutex must be released before pcache1Alloc() is called. This
        40778  +    ** is because it might call sqlite3_release_memory(), which assumes that 
        40779  +    ** this mutex is not held. */
        40780  +    assert( pcache1.separateCache==0 );
        40781  +    assert( pCache->pGroup==&pcache1.grp );
        40782  +    pcache1LeaveMutex(pCache->pGroup);
        40783  +#endif
 40698  40784   #ifdef SQLITE_PCACHE_SEPARATE_HEADER
 40699         -  pPg = pcache1Alloc(pCache->szPage);
 40700         -  p = sqlite3Malloc(sizeof(PgHdr1) + pCache->szExtra);
 40701         -  if( !pPg || !p ){
 40702         -    pcache1Free(pPg);
 40703         -    sqlite3_free(p);
 40704         -    pPg = 0;
 40705         -  }
        40785  +    pPg = pcache1Alloc(pCache->szPage);
        40786  +    p = sqlite3Malloc(sizeof(PgHdr1) + pCache->szExtra);
        40787  +    if( !pPg || !p ){
        40788  +      pcache1Free(pPg);
        40789  +      sqlite3_free(p);
        40790  +      pPg = 0;
        40791  +    }
 40706  40792   #else
 40707         -  pPg = pcache1Alloc(ROUND8(sizeof(PgHdr1)) + pCache->szPage + pCache->szExtra);
 40708         -  p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];
        40793  +    pPg = pcache1Alloc(pCache->szAlloc);
        40794  +    p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];
 40709  40795   #endif
 40710         -  pcache1EnterMutex(pCache->pGroup);
 40711         -
 40712         -  if( pPg ){
        40796  +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
        40797  +    pcache1EnterMutex(pCache->pGroup);
        40798  +#endif
        40799  +    if( pPg==0 ) return 0;
 40713  40800       p->page.pBuf = pPg;
 40714  40801       p->page.pExtra = &p[1];
 40715         -    if( pCache->bPurgeable ){
 40716         -      pCache->pGroup->nCurrentPage++;
 40717         -    }
 40718         -    return p;
        40802  +    p->isBulkLocal = 0;
 40719  40803     }
 40720         -  return 0;
        40804  +  if( pCache->bPurgeable ){
        40805  +    pCache->pGroup->nCurrentPage++;
        40806  +  }
        40807  +  return p;
 40721  40808   }
 40722  40809   
 40723  40810   /*
 40724  40811   ** Free a page object allocated by pcache1AllocPage().
 40725         -**
 40726         -** The pointer is allowed to be NULL, which is prudent.  But it turns out
 40727         -** that the current implementation happens to never call this routine
 40728         -** with a NULL pointer, so we mark the NULL test with ALWAYS().
 40729  40812   */
 40730  40813   static void pcache1FreePage(PgHdr1 *p){
 40731         -  if( ALWAYS(p) ){
 40732         -    PCache1 *pCache = p->pCache;
 40733         -    assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
        40814  +  PCache1 *pCache;
        40815  +  assert( p!=0 );
        40816  +  pCache = p->pCache;
        40817  +  assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
        40818  +  if( p->isBulkLocal ){
        40819  +    p->pNext = pCache->pFree;
        40820  +    pCache->pFree = p;
        40821  +  }else{
 40734  40822       pcache1Free(p->page.pBuf);
 40735  40823   #ifdef SQLITE_PCACHE_SEPARATE_HEADER
 40736  40824       sqlite3_free(p);
 40737  40825   #endif
 40738         -    if( pCache->bPurgeable ){
 40739         -      pCache->pGroup->nCurrentPage--;
 40740         -    }
        40826  +  }
        40827  +  if( pCache->bPurgeable ){
        40828  +    pCache->pGroup->nCurrentPage--;
 40741  40829     }
 40742  40830   }
 40743  40831   
 40744  40832   /*
 40745  40833   ** Malloc function used by SQLite to obtain space from the buffer configured
 40746  40834   ** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
 40747  40835   ** exists, this function falls back to sqlite3Malloc().
................................................................................
 40933  41021   /*
 40934  41022   ** Implementation of the sqlite3_pcache.xInit method.
 40935  41023   */
 40936  41024   static int pcache1Init(void *NotUsed){
 40937  41025     UNUSED_PARAMETER(NotUsed);
 40938  41026     assert( pcache1.isInit==0 );
 40939  41027     memset(&pcache1, 0, sizeof(pcache1));
        41028  +
        41029  +
        41030  +  /*
        41031  +  ** The pcache1.separateCache variable is true if each PCache has its own
        41032  +  ** private PGroup (mode-1).  pcache1.separateCache is false if the single
        41033  +  ** PGroup in pcache1.grp is used for all page caches (mode-2).
        41034  +  **
        41035  +  **   *  Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
        41036  +  **
        41037  +  **   *  Use a unified cache in single-threaded applications that have
        41038  +  **      configured a start-time buffer for use as page-cache memory using
        41039  +  **      sqlite3_config(SQLITE_CONFIG_PAGECACHE, pBuf, sz, N) with non-NULL 
        41040  +  **      pBuf argument.
        41041  +  **
        41042  +  **   *  Otherwise use separate caches (mode-1)
        41043  +  */
        41044  +#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
        41045  +  pcache1.separateCache = 0;
        41046  +#elif SQLITE_THREADSAFE
        41047  +  pcache1.separateCache = sqlite3GlobalConfig.pPage==0
        41048  +                          || sqlite3GlobalConfig.bCoreMutex>0;
        41049  +#else
        41050  +  pcache1.separateCache = sqlite3GlobalConfig.pPage==0;
        41051  +#endif
        41052  +
 40940  41053   #if SQLITE_THREADSAFE
 40941  41054     if( sqlite3GlobalConfig.bCoreMutex ){
 40942  41055       pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
 40943  41056       pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
 40944  41057     }
 40945  41058   #endif
 40946  41059     pcache1.grp.mxPinned = 10;
................................................................................
 40968  41081   ** Allocate a new cache.
 40969  41082   */
 40970  41083   static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
 40971  41084     PCache1 *pCache;      /* The newly created page cache */
 40972  41085     PGroup *pGroup;       /* The group the new page cache will belong to */
 40973  41086     int sz;               /* Bytes of memory required to allocate the new cache */
 40974  41087   
 40975         -  /*
 40976         -  ** The separateCache variable is true if each PCache has its own private
 40977         -  ** PGroup.  In other words, separateCache is true for mode (1) where no
 40978         -  ** mutexing is required.
 40979         -  **
 40980         -  **   *  Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
 40981         -  **
 40982         -  **   *  Always use a unified cache in single-threaded applications
 40983         -  **
 40984         -  **   *  Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
 40985         -  **      use separate caches (mode-1)
 40986         -  */
 40987         -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
 40988         -  const int separateCache = 0;
 40989         -#else
 40990         -  int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
 40991         -#endif
 40992         -
 40993  41088     assert( (szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536 );
 40994  41089     assert( szExtra < 300 );
 40995  41090   
 40996         -  sz = sizeof(PCache1) + sizeof(PGroup)*separateCache;
        41091  +  sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;
 40997  41092     pCache = (PCache1 *)sqlite3MallocZero(sz);
 40998  41093     if( pCache ){
 40999         -    if( separateCache ){
        41094  +    if( pcache1.separateCache ){
 41000  41095         pGroup = (PGroup*)&pCache[1];
 41001  41096         pGroup->mxPinned = 10;
 41002  41097       }else{
 41003  41098         pGroup = &pcache1.grp;
 41004  41099       }
 41005  41100       pCache->pGroup = pGroup;
 41006  41101       pCache->szPage = szPage;
 41007  41102       pCache->szExtra = szExtra;
        41103  +    pCache->szAlloc = szPage + szExtra + ROUND8(sizeof(PgHdr1));
 41008  41104       pCache->bPurgeable = (bPurgeable ? 1 : 0);
 41009  41105       pcache1EnterMutex(pGroup);
 41010  41106       pcache1ResizeHash(pCache);
 41011  41107       if( bPurgeable ){
 41012  41108         pCache->nMin = 10;
 41013  41109         pGroup->nMinPage += pCache->nMin;
 41014  41110         pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
 41015  41111       }
 41016  41112       pcache1LeaveMutex(pGroup);
        41113  +    /* Try to initialize the local bulk pagecache line allocation if using
        41114  +    ** separate caches and if nPage!=0 */
        41115  +    if( pcache1.separateCache
        41116  +     && sqlite3GlobalConfig.nPage!=0
        41117  +     && sqlite3GlobalConfig.pPage==0
        41118  +    ){
        41119  +      int szBulk;
        41120  +      char *zBulk;
        41121  +      sqlite3BeginBenignMalloc();
        41122  +      if( sqlite3GlobalConfig.nPage>0 ){
        41123  +        szBulk = pCache->szAlloc * sqlite3GlobalConfig.nPage;
        41124  +      }else{
        41125  +        szBulk = -1024*sqlite3GlobalConfig.nPage;
        41126  +      }
        41127  +      zBulk = pCache->pBulk = sqlite3Malloc( szBulk );
        41128  +      sqlite3EndBenignMalloc();
        41129  +      if( zBulk ){
        41130  +        int nBulk = sqlite3MallocSize(zBulk)/pCache->szAlloc;
        41131  +        int i;
        41132  +        for(i=0; i<nBulk; i++){
        41133  +          PgHdr1 *pX = (PgHdr1*)&zBulk[szPage];
        41134  +          pX->page.pBuf = zBulk;
        41135  +          pX->page.pExtra = &pX[1];
        41136  +          pX->isBulkLocal = 1;
        41137  +          pX->pNext = pCache->pFree;
        41138  +          pCache->pFree = pX;
        41139  +          zBulk += pCache->szAlloc;
        41140  +        }
        41141  +      }
        41142  +    }
 41017  41143       if( pCache->nHash==0 ){
 41018  41144         pcache1Destroy((sqlite3_pcache*)pCache);
 41019  41145         pCache = 0;
 41020  41146       }
 41021  41147     }
 41022  41148     return (sqlite3_pcache *)pCache;
 41023  41149   }
................................................................................
 41103  41229       return 0;
 41104  41230     }
 41105  41231   
 41106  41232     if( pCache->nPage>=pCache->nHash ) pcache1ResizeHash(pCache);
 41107  41233     assert( pCache->nHash>0 && pCache->apHash );
 41108  41234   
 41109  41235     /* Step 4. Try to recycle a page. */
 41110         -  if( pCache->bPurgeable && pGroup->pLruTail && (
 41111         -         (pCache->nPage+1>=pCache->nMax)
 41112         -      || pGroup->nCurrentPage>=pGroup->nMaxPage
 41113         -      || pcache1UnderMemoryPressure(pCache)
 41114         -  )){
        41236  +  if( pCache->bPurgeable
        41237  +   && pGroup->pLruTail
        41238  +   && ((pCache->nPage+1>=pCache->nMax) || pcache1UnderMemoryPressure(pCache))
        41239  +  ){
 41115  41240       PCache1 *pOther;
 41116  41241       pPage = pGroup->pLruTail;
 41117  41242       assert( pPage->isPinned==0 );
 41118  41243       pcache1RemoveFromHash(pPage, 0);
 41119  41244       pcache1PinPage(pPage);
 41120  41245       pOther = pPage->pCache;
 41121         -
 41122         -    /* We want to verify that szPage and szExtra are the same for pOther
 41123         -    ** and pCache.  Assert that we can verify this by comparing sums. */
 41124         -    assert( (pCache->szPage & (pCache->szPage-1))==0 && pCache->szPage>=512 );
 41125         -    assert( pCache->szExtra<512 );
 41126         -    assert( (pOther->szPage & (pOther->szPage-1))==0 && pOther->szPage>=512 );
 41127         -    assert( pOther->szExtra<512 );
 41128         -
 41129         -    if( pOther->szPage+pOther->szExtra != pCache->szPage+pCache->szExtra ){
        41246  +    if( pOther->szAlloc != pCache->szAlloc ){
 41130  41247         pcache1FreePage(pPage);
 41131  41248         pPage = 0;
 41132  41249       }else{
 41133  41250         pGroup->nCurrentPage -= (pOther->bPurgeable - pCache->bPurgeable);
 41134  41251       }
 41135  41252     }
 41136  41253   
................................................................................
 41398  41515     assert( pGroup->nMaxPage >= pCache->nMax );
 41399  41516     pGroup->nMaxPage -= pCache->nMax;
 41400  41517     assert( pGroup->nMinPage >= pCache->nMin );
 41401  41518     pGroup->nMinPage -= pCache->nMin;
 41402  41519     pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
 41403  41520     pcache1EnforceMaxPage(pGroup);
 41404  41521     pcache1LeaveMutex(pGroup);
        41522  +  sqlite3_free(pCache->pBulk);
 41405  41523     sqlite3_free(pCache->apHash);
 41406  41524     sqlite3_free(pCache);
 41407  41525   }
 41408  41526   
 41409  41527   /*
 41410  41528   ** This function is called during initialization (sqlite3_initialize()) to
 41411  41529   ** install the default pluggable cache module, assuming the user has not
................................................................................
 41453  41571   ** been released, the function returns. The return value is the total number 
 41454  41572   ** of bytes of memory released.
 41455  41573   */
 41456  41574   SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
 41457  41575     int nFree = 0;
 41458  41576     assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
 41459  41577     assert( sqlite3_mutex_notheld(pcache1.mutex) );
 41460         -  if( pcache1.pStart==0 ){
        41578  +  if( sqlite3GlobalConfig.nPage==0 ){
 41461  41579       PgHdr1 *p;
 41462  41580       pcache1EnterMutex(&pcache1.grp);
 41463  41581       while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){
 41464  41582         nFree += pcache1MemSize(p->page.pBuf);
 41465  41583   #ifdef SQLITE_PCACHE_SEPARATE_HEADER
 41466  41584         nFree += sqlite3MemSize(p);
 41467  41585   #endif
................................................................................
 62555  62673     u32 usableSize;          /* Usable size of the page */
 62556  62674     u32 contentOffset;       /* Offset to the start of the cell content area */
 62557  62675     u32 *heap = 0;           /* Min-heap used for checking cell coverage */
 62558  62676     u32 x, prev = 0;         /* Next and previous entry on the min-heap */
 62559  62677     const char *saved_zPfx = pCheck->zPfx;
 62560  62678     int saved_v1 = pCheck->v1;
 62561  62679     int saved_v2 = pCheck->v2;
        62680  +  u8 savedIsInit = 0;
 62562  62681   
 62563  62682     /* Check that the page exists
 62564  62683     */
 62565  62684     pBt = pCheck->pBt;
 62566  62685     usableSize = pBt->usableSize;
 62567  62686     if( iPage==0 ) return 0;
 62568  62687     if( checkRef(pCheck, iPage) ) return 0;
................................................................................
 62572  62691       checkAppendMsg(pCheck,
 62573  62692          "unable to get the page. error code=%d", rc);
 62574  62693       goto end_of_check;
 62575  62694     }
 62576  62695   
 62577  62696     /* Clear MemPage.isInit to make sure the corruption detection code in
 62578  62697     ** btreeInitPage() is executed.  */
        62698  +  savedIsInit = pPage->isInit;
 62579  62699     pPage->isInit = 0;
 62580  62700     if( (rc = btreeInitPage(pPage))!=0 ){
 62581  62701       assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
 62582  62702       checkAppendMsg(pCheck,
 62583  62703                      "btreeInitPage() returns error code %d", rc);
 62584  62704       goto end_of_check;
 62585  62705     }
................................................................................
 62713  62833       */
 62714  62834       i = get2byte(&data[hdr+1]);
 62715  62835       while( i>0 ){
 62716  62836         int size, j;
 62717  62837         assert( (u32)i<=usableSize-4 );     /* Enforced by btreeInitPage() */
 62718  62838         size = get2byte(&data[i+2]);
 62719  62839         assert( (u32)(i+size)<=usableSize );  /* Enforced by btreeInitPage() */
 62720         -      btreeHeapInsert(heap, (i<<16)|(i+size-1));
        62840  +      btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
 62721  62841         /* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
 62722  62842         ** big-endian integer which is the offset in the b-tree page of the next
 62723  62843         ** freeblock in the chain, or zero if the freeblock is the last on the
 62724  62844         ** chain. */
 62725  62845         j = get2byte(&data[i]);
 62726  62846         /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
 62727  62847         ** increasing offset. */
................................................................................
 62764  62884         checkAppendMsg(pCheck,
 62765  62885             "Fragmentation of %d bytes reported as %d on page %d",
 62766  62886             nFrag, data[hdr+7], iPage);
 62767  62887       }
 62768  62888     }
 62769  62889   
 62770  62890   end_of_check:
        62891  +  if( !doCoverageCheck ) pPage->isInit = savedIsInit;
 62771  62892     releasePage(pPage);
 62772  62893     pCheck->zPfx = saved_zPfx;
 62773  62894     pCheck->v1 = saved_v1;
 62774  62895     pCheck->v2 = saved_v2;
 62775  62896     return depth+1;
 62776  62897   }
 62777  62898   #endif /* SQLITE_OMIT_INTEGRITY_CHECK */
................................................................................
 69033  69154     ** the unnecessary initialization has a measurable negative performance
 69034  69155     ** impact, since this routine is a very high runner.  And so, we choose
 69035  69156     ** to ignore the compiler warnings and leave this variable uninitialized.
 69036  69157     */
 69037  69158     /*  mem1.u.i = 0;  // not needed, here to silence compiler warning */
 69038  69159     
 69039  69160     idx1 = getVarint32(aKey1, szHdr1);
        69161  +  if( szHdr1>98307 ) return SQLITE_CORRUPT;
 69040  69162     d1 = szHdr1;
 69041  69163     assert( pKeyInfo->nField+pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB );
 69042  69164     assert( pKeyInfo->aSortOrder!=0 );
 69043  69165     assert( pKeyInfo->nField>0 );
 69044  69166     assert( idx1<=szHdr1 || CORRUPT_DB );
 69045  69167     do{
 69046  69168       u32 serial_type1;
................................................................................
 69988  70110       sqlite3_log(SQLITE_MISUSE, "API called with NULL prepared statement");
 69989  70111       return 1;
 69990  70112     }else{
 69991  70113       return vdbeSafety(p);
 69992  70114     }
 69993  70115   }
 69994  70116   
        70117  +#ifndef SQLITE_OMIT_TRACE
        70118  +/*
        70119  +** Invoke the profile callback.  This routine is only called if we already
        70120  +** know that the profile callback is defined and needs to be invoked.
        70121  +*/
        70122  +static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){
        70123  +  sqlite3_int64 iNow;
        70124  +  assert( p->startTime>0 );
        70125  +  assert( db->xProfile!=0 );
        70126  +  assert( db->init.busy==0 );
        70127  +  assert( p->zSql!=0 );
        70128  +  sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
        70129  +  db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
        70130  +  p->startTime = 0;
        70131  +}
        70132  +/*
        70133  +** The checkProfileCallback(DB,P) macro checks to see if a profile callback
        70134  +** is needed, and it invokes the callback if it is needed.
        70135  +*/
        70136  +# define checkProfileCallback(DB,P) \
        70137  +   if( ((P)->startTime)>0 ){ invokeProfileCallback(DB,P); }
        70138  +#else
        70139  +# define checkProfileCallback(DB,P)  /*no-op*/
        70140  +#endif
        70141  +
 69995  70142   /*
 69996  70143   ** The following routine destroys a virtual machine that is created by
 69997  70144   ** the sqlite3_compile() routine. The integer returned is an SQLITE_
 69998  70145   ** success/failure code that describes the result of executing the virtual
 69999  70146   ** machine.
 70000  70147   **
 70001  70148   ** This routine sets the error code and string returned by
................................................................................
 70008  70155       ** pointer is a harmless no-op. */
 70009  70156       rc = SQLITE_OK;
 70010  70157     }else{
 70011  70158       Vdbe *v = (Vdbe*)pStmt;
 70012  70159       sqlite3 *db = v->db;
 70013  70160       if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
 70014  70161       sqlite3_mutex_enter(db->mutex);
        70162  +    checkProfileCallback(db, v);
 70015  70163       rc = sqlite3VdbeFinalize(v);
 70016  70164       rc = sqlite3ApiExit(db, rc);
 70017  70165       sqlite3LeaveMutexAndCloseZombie(db);
 70018  70166     }
 70019  70167     return rc;
 70020  70168   }
 70021  70169   
................................................................................
 70029  70177   */
 70030  70178   SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
 70031  70179     int rc;
 70032  70180     if( pStmt==0 ){
 70033  70181       rc = SQLITE_OK;
 70034  70182     }else{
 70035  70183       Vdbe *v = (Vdbe*)pStmt;
 70036         -    sqlite3_mutex_enter(v->db->mutex);
        70184  +    sqlite3 *db = v->db;
        70185  +    sqlite3_mutex_enter(db->mutex);
        70186  +    checkProfileCallback(db, v);
 70037  70187       rc = sqlite3VdbeReset(v);
 70038  70188       sqlite3VdbeRewind(v);
 70039         -    assert( (rc & (v->db->errMask))==rc );
 70040         -    rc = sqlite3ApiExit(v->db, rc);
 70041         -    sqlite3_mutex_leave(v->db->mutex);
        70189  +    assert( (rc & (db->errMask))==rc );
        70190  +    rc = sqlite3ApiExit(db, rc);
        70191  +    sqlite3_mutex_leave(db->mutex);
 70042  70192     }
 70043  70193     return rc;
 70044  70194   }
 70045  70195   
 70046  70196   /*
 70047  70197   ** Set all the parameters in the compiled SQL statement to NULL.
 70048  70198   */
................................................................................
 70384  70534           rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
 70385  70535         }
 70386  70536       }
 70387  70537     }
 70388  70538   #endif
 70389  70539     return rc;
 70390  70540   }
        70541  +
 70391  70542   
 70392  70543   /*
 70393  70544   ** Execute the statement pStmt, either until a row of data is ready, the
 70394  70545   ** statement is completely executed or an error occurs.
 70395  70546   **
 70396  70547   ** This routine implements the bulk of the logic behind the sqlite_step()
 70397  70548   ** API.  The only thing omitted is the automatic recompile if a 
................................................................................
 70453  70604       }
 70454  70605   
 70455  70606       assert( db->nVdbeWrite>0 || db->autoCommit==0 
 70456  70607           || (db->nDeferredCons==0 && db->nDeferredImmCons==0)
 70457  70608       );
 70458  70609   
 70459  70610   #ifndef SQLITE_OMIT_TRACE
 70460         -    if( db->xProfile && !db->init.busy ){
        70611  +    if( db->xProfile && !db->init.busy && p->zSql ){
 70461  70612         sqlite3OsCurrentTimeInt64(db->pVfs, &p->startTime);
        70613  +    }else{
        70614  +      assert( p->startTime==0 );
 70462  70615       }
 70463  70616   #endif
 70464  70617   
 70465  70618       db->nVdbeActive++;
 70466  70619       if( p->readOnly==0 ) db->nVdbeWrite++;
 70467  70620       if( p->bIsReader ) db->nVdbeRead++;
 70468  70621       p->pc = 0;
................................................................................
 70478  70631     {
 70479  70632       db->nVdbeExec++;
 70480  70633       rc = sqlite3VdbeExec(p);
 70481  70634       db->nVdbeExec--;
 70482  70635     }
 70483  70636   
 70484  70637   #ifndef SQLITE_OMIT_TRACE
 70485         -  /* Invoke the profile callback if there is one
 70486         -  */
 70487         -  if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){
 70488         -    sqlite3_int64 iNow;
 70489         -    sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
 70490         -    db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
 70491         -  }
        70638  +  /* If the statement completed successfully, invoke the profile callback */
        70639  +  if( rc!=SQLITE_ROW ) checkProfileCallback(db, p);
 70492  70640   #endif
 70493  70641   
 70494  70642     if( rc==SQLITE_DONE ){
 70495  70643       assert( p->rc==SQLITE_OK );
 70496  70644       p->rc = doWalCallbacks(db);
 70497  70645       if( p->rc!=SQLITE_OK ){
 70498  70646         rc = SQLITE_ERROR;
................................................................................
109392 109540       VdbeCoverage(v);
109393 109541     }
109394 109542     sqlite3VdbeResolveLabel(v, addrCont);
109395 109543   
109396 109544     /* Execute the recursive SELECT taking the single row in Current as
109397 109545     ** the value for the recursive-table. Store the results in the Queue.
109398 109546     */
109399         -  p->pPrior = 0;
109400         -  sqlite3Select(pParse, p, &destQueue);
109401         -  assert( p->pPrior==0 );
109402         -  p->pPrior = pSetup;
       109547  +  if( p->selFlags & SF_Aggregate ){
       109548  +    sqlite3ErrorMsg(pParse, "recursive aggregate queries not supported");
       109549  +  }else{
       109550  +    p->pPrior = 0;
       109551  +    sqlite3Select(pParse, p, &destQueue);
       109552  +    assert( p->pPrior==0 );
       109553  +    p->pPrior = pSetup;
       109554  +  }
109403 109555   
109404 109556     /* Keep running the loop until the Queue is empty */
109405 109557     sqlite3VdbeAddOp2(v, OP_Goto, 0, addrTop);
109406 109558     sqlite3VdbeResolveLabel(v, addrBreak);
109407 109559   
109408 109560   end_of_recursive_query:
109409 109561     sqlite3ExprListDelete(pParse->db, p->pOrderBy);
................................................................................
138478 138630     assert( !p || (p>=aDoclist && p<=&aDoclist[nDoclist]) );
138479 138631   
138480 138632     if( p==0 ){
138481 138633       p = aDoclist;
138482 138634       p += sqlite3Fts3GetVarint(p, piDocid);
138483 138635     }else{
138484 138636       fts3PoslistCopy(0, &p);
       138637  +    while( p<&aDoclist[nDoclist] && *p==0 ) p++; 
138485 138638       if( p>=&aDoclist[nDoclist] ){
138486 138639         *pbEof = 1;
138487 138640       }else{
138488 138641         sqlite3_int64 iVar;
138489 138642         p += sqlite3Fts3GetVarint(p, &iVar);
138490 138643         *piDocid += ((bDescIdx ? -1 : 1) * iVar);
138491 138644       }
................................................................................
139884 140037   
139885 140038     iDocid = pExpr->iDocid;
139886 140039     pIter = pPhrase->doclist.pList;
139887 140040     if( iDocid!=pCsr->iPrevId || pExpr->bEof ){
139888 140041       int rc = SQLITE_OK;
139889 140042       int bDescDoclist = pTab->bDescIdx;      /* For DOCID_CMP macro */
139890 140043       int bOr = 0;
139891         -    u8 bEof = 0;
139892 140044       u8 bTreeEof = 0;
139893 140045       Fts3Expr *p;                  /* Used to iterate from pExpr to root */
139894 140046       Fts3Expr *pNear;              /* Most senior NEAR ancestor (or pExpr) */
       140047  +    int bMatch;
139895 140048   
139896 140049       /* Check if this phrase descends from an OR expression node. If not, 
139897 140050       ** return NULL. Otherwise, the entry that corresponds to docid 
139898 140051       ** pCsr->iPrevId may lie earlier in the doclist buffer. Or, if the
139899 140052       ** tree that the node is part of has been marked as EOF, but the node
139900 140053       ** itself is not EOF, then it may point to an earlier entry. */
139901 140054       pNear = pExpr;
................................................................................
139921 140074       if( bTreeEof ){
139922 140075         while( rc==SQLITE_OK && !pNear->bEof ){
139923 140076           fts3EvalNextRow(pCsr, pNear, &rc);
139924 140077         }
139925 140078       }
139926 140079       if( rc!=SQLITE_OK ) return rc;
139927 140080   
139928         -    pIter = pPhrase->pOrPoslist;
139929         -    iDocid = pPhrase->iOrDocid;
139930         -    if( pCsr->bDesc==bDescDoclist ){
139931         -      bEof = !pPhrase->doclist.nAll ||
139932         -                 (pIter >= (pPhrase->doclist.aAll + pPhrase->doclist.nAll));
139933         -      while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
139934         -        sqlite3Fts3DoclistNext(
139935         -            bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
139936         -            &pIter, &iDocid, &bEof
139937         -        );
139938         -      }
139939         -    }else{
139940         -      bEof = !pPhrase->doclist.nAll || (pIter && pIter<=pPhrase->doclist.aAll);
139941         -      while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
139942         -        int dummy;
139943         -        sqlite3Fts3DoclistPrev(
139944         -            bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
139945         -            &pIter, &iDocid, &dummy, &bEof
139946         -        );
139947         -      }
139948         -    }
139949         -    pPhrase->pOrPoslist = pIter;
139950         -    pPhrase->iOrDocid = iDocid;
139951         -
139952         -    if( bEof || iDocid!=pCsr->iPrevId ) pIter = 0;
       140081  +    bMatch = 1;
       140082  +    for(p=pNear; p; p=p->pLeft){
       140083  +      u8 bEof = 0;
       140084  +      Fts3Expr *pTest = p;
       140085  +      Fts3Phrase *pPh;
       140086  +      assert( pTest->eType==FTSQUERY_NEAR || pTest->eType==FTSQUERY_PHRASE );
       140087  +      if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;
       140088  +      assert( pTest->eType==FTSQUERY_PHRASE );
       140089  +      pPh = pTest->pPhrase;
       140090  +
       140091  +      pIter = pPh->pOrPoslist;
       140092  +      iDocid = pPh->iOrDocid;
       140093  +      if( pCsr->bDesc==bDescDoclist ){
       140094  +        bEof = !pPh->doclist.nAll ||
       140095  +          (pIter >= (pPh->doclist.aAll + pPh->doclist.nAll));
       140096  +        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
       140097  +          sqlite3Fts3DoclistNext(
       140098  +              bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll, 
       140099  +              &pIter, &iDocid, &bEof
       140100  +          );
       140101  +        }
       140102  +      }else{
       140103  +        bEof = !pPh->doclist.nAll || (pIter && pIter<=pPh->doclist.aAll);
       140104  +        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
       140105  +          int dummy;
       140106  +          sqlite3Fts3DoclistPrev(
       140107  +              bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll, 
       140108  +              &pIter, &iDocid, &dummy, &bEof
       140109  +              );
       140110  +        }
       140111  +      }
       140112  +      pPh->pOrPoslist = pIter;
       140113  +      pPh->iOrDocid = iDocid;
       140114  +      if( bEof || iDocid!=pCsr->iPrevId ) bMatch = 0;
       140115  +    }
       140116  +
       140117  +    if( bMatch ){
       140118  +      pIter = pPhrase->pOrPoslist;
       140119  +    }else{
       140120  +      pIter = 0;
       140121  +    }
139953 140122     }
139954 140123     if( pIter==0 ) return SQLITE_OK;
139955 140124   
139956 140125     if( *pIter==0x01 ){
139957 140126       pIter++;
139958 140127       pIter += fts3GetVarint32(pIter, &iThis);
139959 140128     }else{

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

   109    109   **
   110    110   ** See also: [sqlite3_libversion()],
   111    111   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   112    112   ** [sqlite_version()] and [sqlite_source_id()].
   113    113   */
   114    114   #define SQLITE_VERSION        "3.8.11"
   115    115   #define SQLITE_VERSION_NUMBER 3008011
   116         -#define SQLITE_SOURCE_ID      "2015-07-03 21:38:09 b202e2a1d73d104d795d2252b1c6f61d65bfb295"
          116  +#define SQLITE_SOURCE_ID      "2015-07-14 21:56:53 b53a95063cf6b8ee8cad77e9fff4c50a356c43bb"
   117    117   
   118    118   /*
   119    119   ** CAPI3REF: Run-Time Library Version Numbers
   120    120   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   121    121   **
   122    122   ** These interfaces provide the same information as the [SQLITE_VERSION],
   123    123   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros

Added SQLite.Interop/src/ext/fts5.c.

more than 10,000 changes

Changes to SQLite.Interop/src/win/interop.c.

    25     25   #include "../ext/zipvfs.c"
    26     26   #include "../ext/algorithms.c"
    27     27   #endif
    28     28   
    29     29   #if defined(INTEROP_VIRTUAL_TABLE) && SQLITE_VERSION_NUMBER >= 3004001
    30     30   #include "../ext/vtshim.c"
    31     31   #endif
           32  +
           33  +#if defined(INTEROP_FTS5_EXTENSION)
           34  +#include "../ext/fts5.c"
           35  +#endif
    32     36   
    33     37   #if defined(INTEROP_PERCENTILE_EXTENSION)
    34     38   #include "../ext/percentile.c"
    35     39   #endif
    36     40   
    37     41   #if defined(INTEROP_TOTYPE_EXTENSION)
    38     42   #include "../ext/totype.c"

Changes to Setup/data/verify.lst.

   472    472     SQLite.Interop/src/contrib/
   473    473     SQLite.Interop/src/contrib/extension-functions.c
   474    474     SQLite.Interop/src/core/
   475    475     SQLite.Interop/src/core/sqlite3.c
   476    476     SQLite.Interop/src/core/sqlite3.h
   477    477     SQLite.Interop/src/core/sqlite3ext.h
   478    478     SQLite.Interop/src/ext/
          479  +  SQLite.Interop/src/ext/fts5.c
   479    480     SQLite.Interop/src/ext/percentile.c
   480    481     SQLite.Interop/src/ext/regexp.c
   481    482     SQLite.Interop/src/ext/totype.c
   482    483     SQLite.Interop/src/ext/vtshim.c
   483    484     SQLite.Interop/src/win/
   484    485     SQLite.Interop/src/win/AssemblyInfo.cpp
   485    486     SQLite.Interop/src/win/crypt.c

Changes to Tests/basic.eagle.

  3239   3239   file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \
  3240   3240   -result {0 {True True True True True True True True True True True True True\
  3241   3241   True True True True True True True True True True True True True True True True\
  3242   3242   True True True True True True True True True True True True True True True True\
  3243   3243   True True True True True True True True True True True True True True True True\
  3244   3244   True True True True True True True True True True True True True True True True\
  3245   3245   True True True True True True True True True True True True True True}}}
         3246  +
         3247  +###############################################################################
         3248  +
         3249  +runTest {test data-1.71 {fts5 extension} -setup {
         3250  +  setupDb [set fileName data-1.71.db]
         3251  +} -body {
         3252  +  set connection [getDbConnection]
         3253  +  set result [list]
         3254  +
         3255  +  $connection EnableExtensions true
         3256  +  $connection LoadExtension [getCoreBinaryFileName] sqlite3_fts5_init
         3257  +
         3258  +  lappend result [sql execute -execute scalar $db "SELECT fts5_source_id();"]
         3259  +
         3260  +  lappend result [sql execute -execute scalar $db \
         3261  +      "CREATE VIRTUAL TABLE t1 USING fts5(x, prefix=\"1\");"]
         3262  +
         3263  +  foreach x [list cat dog horse house] {
         3264  +    lappend result [sql execute -execute scalar $db \
         3265  +        [appendArgs "INSERT INTO t1(x) VALUES('" $x "');"]]
         3266  +  }
         3267  +
         3268  +  lappend result [sql execute -execute reader -format dictionary $db \
         3269  +      "SELECT rowid, x FROM t1 WHERE t1 MATCH 'h*';"]
         3270  +
         3271  +  set result
         3272  +} -cleanup {
         3273  +  freeDbConnection
         3274  +
         3275  +  unset -nocomplain x result connection
         3276  +
         3277  +  cleanupDb $fileName
         3278  +
         3279  +  unset -nocomplain db fileName
         3280  +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
         3281  +System.Data.SQLite} -match regexp -result {^\{fts5: \d{4}-\d{2}-\d{2}\
         3282  +\d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\} \{\} \{\} \{rowid 3 x horse\
         3283  +rowid 4 x house\}$}}
  3246   3284   
  3247   3285   ###############################################################################
  3248   3286   
  3249   3287   reportSQLiteResources $test_channel
  3250   3288   
  3251   3289   ###############################################################################
  3252   3290   
  3253   3291   runSQLiteTestFilesEpilogue
  3254   3292   runSQLiteTestEpilogue
  3255   3293   runTestEpilogue