From 341da64b11e9f1eeaccfe39e7bd94f86a49a63da Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 23 Aug 2020 11:14:10 -0700 Subject: [PATCH 1/4] Stop using nested folders for tests --- SQLite.sln | 88 ++++++++--------- tests/SQLite.Tests.csproj | 94 ------------------- tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj | 52 +--------- tests/{ => SQLite.Tests}/AsyncTests.cs | 0 tests/{ => SQLite.Tests}/BackupTest.cs | 0 tests/{ => SQLite.Tests}/BooleanTest.cs | 0 tests/{ => SQLite.Tests}/ByteArrayTest.cs | 0 tests/{ => SQLite.Tests}/CollateTest.cs | 0 tests/{ => SQLite.Tests}/ConcurrencyTest.cs | 0 tests/{ => SQLite.Tests}/ContainsTest.cs | 0 .../CreateTableImplicitTest.cs | 0 tests/{ => SQLite.Tests}/CreateTableTest.cs | 0 .../{ => SQLite.Tests}/DateTimeOffsetTest.cs | 0 tests/{ => SQLite.Tests}/DateTimeTest.cs | 0 tests/{ => SQLite.Tests}/DeleteTest.cs | 0 tests/{ => SQLite.Tests}/DropTableTest.cs | 0 tests/{ => SQLite.Tests}/EnumCacheTest.cs | 0 tests/{ => SQLite.Tests}/EnumNullableTest.cs | 0 tests/{ => SQLite.Tests}/EnumTest.cs | 0 tests/{ => SQLite.Tests}/EqualsTest.cs | 0 tests/{ => SQLite.Tests}/ExceptionAssert.cs | 0 tests/{ => SQLite.Tests}/GuidTests.cs | 0 tests/{ => SQLite.Tests}/IgnoreTest.cs | 0 tests/{ => SQLite.Tests}/InheritanceTest.cs | 0 tests/{ => SQLite.Tests}/InsertTest.cs | 0 tests/{ => SQLite.Tests}/JoinTest.cs | 0 tests/{ => SQLite.Tests}/LinqTest.cs | 0 tests/{ => SQLite.Tests}/MappingTest.cs | 0 tests/{ => SQLite.Tests}/MigrationTest.cs | 0 .../NotNullAttributeTest.cs | 0 tests/{ => SQLite.Tests}/NullableTest.cs | 0 tests/{ => SQLite.Tests}/OpenTests.cs | 0 tests/{ => SQLite.Tests}/QueryTest.cs | 0 tests/{ => SQLite.Tests}/ReadmeTest.cs | 0 tests/{ => SQLite.Tests}/SQLCipherTest.cs | 0 tests/SQLite.Tests/SQLite.Tests.csproj | 23 +++++ tests/{ => SQLite.Tests}/ScalarTest.cs | 0 tests/{ => SQLite.Tests}/SkipTest.cs | 0 tests/{ => SQLite.Tests}/StringQueryTest.cs | 0 tests/{ => SQLite.Tests}/TableChangedTest.cs | 0 tests/{ => SQLite.Tests}/TestDb.cs | 0 tests/{ => SQLite.Tests}/TimeSpanTest.cs | 0 tests/{ => SQLite.Tests}/TransactionTest.cs | 0 tests/{ => SQLite.Tests}/UnicodeTest.cs | 0 tests/{ => SQLite.Tests}/UniqueTest.cs | 0 45 files changed, 72 insertions(+), 185 deletions(-) delete mode 100644 tests/SQLite.Tests.csproj rename tests/{ => SQLite.Tests}/AsyncTests.cs (100%) rename tests/{ => SQLite.Tests}/BackupTest.cs (100%) rename tests/{ => SQLite.Tests}/BooleanTest.cs (100%) rename tests/{ => SQLite.Tests}/ByteArrayTest.cs (100%) rename tests/{ => SQLite.Tests}/CollateTest.cs (100%) rename tests/{ => SQLite.Tests}/ConcurrencyTest.cs (100%) rename tests/{ => SQLite.Tests}/ContainsTest.cs (100%) rename tests/{ => SQLite.Tests}/CreateTableImplicitTest.cs (100%) rename tests/{ => SQLite.Tests}/CreateTableTest.cs (100%) rename tests/{ => SQLite.Tests}/DateTimeOffsetTest.cs (100%) rename tests/{ => SQLite.Tests}/DateTimeTest.cs (100%) rename tests/{ => SQLite.Tests}/DeleteTest.cs (100%) rename tests/{ => SQLite.Tests}/DropTableTest.cs (100%) rename tests/{ => SQLite.Tests}/EnumCacheTest.cs (100%) rename tests/{ => SQLite.Tests}/EnumNullableTest.cs (100%) rename tests/{ => SQLite.Tests}/EnumTest.cs (100%) rename tests/{ => SQLite.Tests}/EqualsTest.cs (100%) rename tests/{ => SQLite.Tests}/ExceptionAssert.cs (100%) rename tests/{ => SQLite.Tests}/GuidTests.cs (100%) rename tests/{ => SQLite.Tests}/IgnoreTest.cs (100%) rename tests/{ => SQLite.Tests}/InheritanceTest.cs (100%) rename tests/{ => SQLite.Tests}/InsertTest.cs (100%) rename tests/{ => SQLite.Tests}/JoinTest.cs (100%) rename tests/{ => SQLite.Tests}/LinqTest.cs (100%) rename tests/{ => SQLite.Tests}/MappingTest.cs (100%) rename tests/{ => SQLite.Tests}/MigrationTest.cs (100%) rename tests/{ => SQLite.Tests}/NotNullAttributeTest.cs (100%) rename tests/{ => SQLite.Tests}/NullableTest.cs (100%) rename tests/{ => SQLite.Tests}/OpenTests.cs (100%) rename tests/{ => SQLite.Tests}/QueryTest.cs (100%) rename tests/{ => SQLite.Tests}/ReadmeTest.cs (100%) rename tests/{ => SQLite.Tests}/SQLCipherTest.cs (100%) create mode 100644 tests/SQLite.Tests/SQLite.Tests.csproj rename tests/{ => SQLite.Tests}/ScalarTest.cs (100%) rename tests/{ => SQLite.Tests}/SkipTest.cs (100%) rename tests/{ => SQLite.Tests}/StringQueryTest.cs (100%) rename tests/{ => SQLite.Tests}/TableChangedTest.cs (100%) rename tests/{ => SQLite.Tests}/TestDb.cs (100%) rename tests/{ => SQLite.Tests}/TimeSpanTest.cs (100%) rename tests/{ => SQLite.Tests}/TransactionTest.cs (100%) rename tests/{ => SQLite.Tests}/UnicodeTest.cs (100%) rename tests/{ => SQLite.Tests}/UniqueTest.cs (100%) diff --git a/SQLite.sln b/SQLite.sln index 8d3b56933..b0dc095b2 100644 --- a/SQLite.sln +++ b/SQLite.sln @@ -1,8 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite.Tests", "tests\SQLite.Tests.csproj", "{6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A0E59A10-7BD0-4554-B133-66FA850159BE}" ProjectSection(SolutionItems) = preProject sqlite-net-pcl.nuspec = sqlite-net-pcl.nuspec @@ -15,16 +13,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteTestsiOS", "tests\SQLite.Tests.iOS\SQLiteTestsiOS.csproj", "{81850129-71C3-40C7-A48B-AA5D2C2E365E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-std", "nuget\SQLite-net-std\SQLite-net-std.csproj", "{081D08D6-10F1-431B-88FE-469FD9FE898C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiDiff", "tests\ApiDiff\ApiDiff.csproj", "{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-base", "nuget\SQLite-net-base\SQLite-net-base.csproj", "{53D1953C-3641-47D0-BE08-14DB853CC576}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-sqlcipher", "nuget\SQLite-net-sqlcipher\SQLite-net-sqlcipher.csproj", "{59DB03EF-E28D-431E-9058-74AF316800EE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite.Tests", "tests\SQLite.Tests\SQLite.Tests.csproj", "{D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiDiff", "tests\ApiDiff\ApiDiff.csproj", "{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteTestsiOS", "tests\SQLite.Tests.iOS\SQLiteTestsiOS.csproj", "{81850129-71C3-40C7-A48B-AA5D2C2E365E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,30 +35,6 @@ Global Debug|iPhone = Debug|iPhone EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|Any CPU.Build.0 = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|iPhone.ActiveCfg = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|iPhone.Build.0 = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2}.Debug|iPhone.Build.0 = Debug|Any CPU - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.ActiveCfg = Release|iPhone - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.Build.0 = Release|iPhone - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.ActiveCfg = Release|iPhone - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.Build.0 = Release|iPhone - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.ActiveCfg = Debug|iPhone - {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.Build.0 = Debug|iPhone {081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.Build.0 = Debug|Any CPU {081D08D6-10F1-431B-88FE-469FD9FE898C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -71,18 +47,6 @@ Global {081D08D6-10F1-431B-88FE-469FD9FE898C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|iPhone.ActiveCfg = Debug|Any CPU {081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|iPhone.Build.0 = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|Any CPU.Build.0 = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhone.ActiveCfg = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhone.Build.0 = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhone.Build.0 = Debug|Any CPU {53D1953C-3641-47D0-BE08-14DB853CC576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {53D1953C-3641-47D0-BE08-14DB853CC576}.Debug|Any CPU.Build.0 = Debug|Any CPU {53D1953C-3641-47D0-BE08-14DB853CC576}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -107,11 +71,47 @@ Global {59DB03EF-E28D-431E-9058-74AF316800EE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {59DB03EF-E28D-431E-9058-74AF316800EE}.Debug|iPhone.ActiveCfg = Debug|Any CPU {59DB03EF-E28D-431E-9058-74AF316800EE}.Debug|iPhone.Build.0 = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|Any CPU.Build.0 = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhone.ActiveCfg = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhone.Build.0 = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhone.Build.0 = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|Any CPU.Build.0 = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhone.ActiveCfg = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhone.Build.0 = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|iPhone.Build.0 = Debug|Any CPU + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.ActiveCfg = Release|iPhone + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.Build.0 = Release|iPhone + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.ActiveCfg = Release|iPhone + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.Build.0 = Release|iPhone + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.ActiveCfg = Debug|iPhone + {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.Build.0 = Debug|iPhone EndGlobalSection GlobalSection(NestedProjects) = preSolution - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} - {81850129-71C3-40C7-A48B-AA5D2C2E365E} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} + {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} {1DEF735C-B973-4ED9-8446-7FFA6D0B410B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} + {81850129-71C3-40C7-A48B-AA5D2C2E365E} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = tests\SQLite.Tests.csproj diff --git a/tests/SQLite.Tests.csproj b/tests/SQLite.Tests.csproj deleted file mode 100644 index 0c539cfda..000000000 --- a/tests/SQLite.Tests.csproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {6947A8F1-99BE-4DD1-AD4D-D89425CE67A2} - Library - SQLite.Tests - SQLite.Tests - v4.5 - - - True - full - False - bin\Debug - DEBUG - prompt - 4 - False - - - none - False - bin\Release - prompt - 4 - False - - - - - - - ..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll - - - - - - - SQLite.cs - - - - - - - - - - - - - - - - - - - - - - - - - - SQLiteAsync.cs - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj b/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj index 65c2bb89d..231eabaab 100644 --- a/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj +++ b/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj @@ -101,58 +101,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ConcurrencyTest.cs - + + SQLite.cs SQLiteAsync.cs - - BackupTest.cs - - - ReadmeTest.cs - - - QueryTest.cs - - \ No newline at end of file + + + diff --git a/tests/AsyncTests.cs b/tests/SQLite.Tests/AsyncTests.cs similarity index 100% rename from tests/AsyncTests.cs rename to tests/SQLite.Tests/AsyncTests.cs diff --git a/tests/BackupTest.cs b/tests/SQLite.Tests/BackupTest.cs similarity index 100% rename from tests/BackupTest.cs rename to tests/SQLite.Tests/BackupTest.cs diff --git a/tests/BooleanTest.cs b/tests/SQLite.Tests/BooleanTest.cs similarity index 100% rename from tests/BooleanTest.cs rename to tests/SQLite.Tests/BooleanTest.cs diff --git a/tests/ByteArrayTest.cs b/tests/SQLite.Tests/ByteArrayTest.cs similarity index 100% rename from tests/ByteArrayTest.cs rename to tests/SQLite.Tests/ByteArrayTest.cs diff --git a/tests/CollateTest.cs b/tests/SQLite.Tests/CollateTest.cs similarity index 100% rename from tests/CollateTest.cs rename to tests/SQLite.Tests/CollateTest.cs diff --git a/tests/ConcurrencyTest.cs b/tests/SQLite.Tests/ConcurrencyTest.cs similarity index 100% rename from tests/ConcurrencyTest.cs rename to tests/SQLite.Tests/ConcurrencyTest.cs diff --git a/tests/ContainsTest.cs b/tests/SQLite.Tests/ContainsTest.cs similarity index 100% rename from tests/ContainsTest.cs rename to tests/SQLite.Tests/ContainsTest.cs diff --git a/tests/CreateTableImplicitTest.cs b/tests/SQLite.Tests/CreateTableImplicitTest.cs similarity index 100% rename from tests/CreateTableImplicitTest.cs rename to tests/SQLite.Tests/CreateTableImplicitTest.cs diff --git a/tests/CreateTableTest.cs b/tests/SQLite.Tests/CreateTableTest.cs similarity index 100% rename from tests/CreateTableTest.cs rename to tests/SQLite.Tests/CreateTableTest.cs diff --git a/tests/DateTimeOffsetTest.cs b/tests/SQLite.Tests/DateTimeOffsetTest.cs similarity index 100% rename from tests/DateTimeOffsetTest.cs rename to tests/SQLite.Tests/DateTimeOffsetTest.cs diff --git a/tests/DateTimeTest.cs b/tests/SQLite.Tests/DateTimeTest.cs similarity index 100% rename from tests/DateTimeTest.cs rename to tests/SQLite.Tests/DateTimeTest.cs diff --git a/tests/DeleteTest.cs b/tests/SQLite.Tests/DeleteTest.cs similarity index 100% rename from tests/DeleteTest.cs rename to tests/SQLite.Tests/DeleteTest.cs diff --git a/tests/DropTableTest.cs b/tests/SQLite.Tests/DropTableTest.cs similarity index 100% rename from tests/DropTableTest.cs rename to tests/SQLite.Tests/DropTableTest.cs diff --git a/tests/EnumCacheTest.cs b/tests/SQLite.Tests/EnumCacheTest.cs similarity index 100% rename from tests/EnumCacheTest.cs rename to tests/SQLite.Tests/EnumCacheTest.cs diff --git a/tests/EnumNullableTest.cs b/tests/SQLite.Tests/EnumNullableTest.cs similarity index 100% rename from tests/EnumNullableTest.cs rename to tests/SQLite.Tests/EnumNullableTest.cs diff --git a/tests/EnumTest.cs b/tests/SQLite.Tests/EnumTest.cs similarity index 100% rename from tests/EnumTest.cs rename to tests/SQLite.Tests/EnumTest.cs diff --git a/tests/EqualsTest.cs b/tests/SQLite.Tests/EqualsTest.cs similarity index 100% rename from tests/EqualsTest.cs rename to tests/SQLite.Tests/EqualsTest.cs diff --git a/tests/ExceptionAssert.cs b/tests/SQLite.Tests/ExceptionAssert.cs similarity index 100% rename from tests/ExceptionAssert.cs rename to tests/SQLite.Tests/ExceptionAssert.cs diff --git a/tests/GuidTests.cs b/tests/SQLite.Tests/GuidTests.cs similarity index 100% rename from tests/GuidTests.cs rename to tests/SQLite.Tests/GuidTests.cs diff --git a/tests/IgnoreTest.cs b/tests/SQLite.Tests/IgnoreTest.cs similarity index 100% rename from tests/IgnoreTest.cs rename to tests/SQLite.Tests/IgnoreTest.cs diff --git a/tests/InheritanceTest.cs b/tests/SQLite.Tests/InheritanceTest.cs similarity index 100% rename from tests/InheritanceTest.cs rename to tests/SQLite.Tests/InheritanceTest.cs diff --git a/tests/InsertTest.cs b/tests/SQLite.Tests/InsertTest.cs similarity index 100% rename from tests/InsertTest.cs rename to tests/SQLite.Tests/InsertTest.cs diff --git a/tests/JoinTest.cs b/tests/SQLite.Tests/JoinTest.cs similarity index 100% rename from tests/JoinTest.cs rename to tests/SQLite.Tests/JoinTest.cs diff --git a/tests/LinqTest.cs b/tests/SQLite.Tests/LinqTest.cs similarity index 100% rename from tests/LinqTest.cs rename to tests/SQLite.Tests/LinqTest.cs diff --git a/tests/MappingTest.cs b/tests/SQLite.Tests/MappingTest.cs similarity index 100% rename from tests/MappingTest.cs rename to tests/SQLite.Tests/MappingTest.cs diff --git a/tests/MigrationTest.cs b/tests/SQLite.Tests/MigrationTest.cs similarity index 100% rename from tests/MigrationTest.cs rename to tests/SQLite.Tests/MigrationTest.cs diff --git a/tests/NotNullAttributeTest.cs b/tests/SQLite.Tests/NotNullAttributeTest.cs similarity index 100% rename from tests/NotNullAttributeTest.cs rename to tests/SQLite.Tests/NotNullAttributeTest.cs diff --git a/tests/NullableTest.cs b/tests/SQLite.Tests/NullableTest.cs similarity index 100% rename from tests/NullableTest.cs rename to tests/SQLite.Tests/NullableTest.cs diff --git a/tests/OpenTests.cs b/tests/SQLite.Tests/OpenTests.cs similarity index 100% rename from tests/OpenTests.cs rename to tests/SQLite.Tests/OpenTests.cs diff --git a/tests/QueryTest.cs b/tests/SQLite.Tests/QueryTest.cs similarity index 100% rename from tests/QueryTest.cs rename to tests/SQLite.Tests/QueryTest.cs diff --git a/tests/ReadmeTest.cs b/tests/SQLite.Tests/ReadmeTest.cs similarity index 100% rename from tests/ReadmeTest.cs rename to tests/SQLite.Tests/ReadmeTest.cs diff --git a/tests/SQLCipherTest.cs b/tests/SQLite.Tests/SQLCipherTest.cs similarity index 100% rename from tests/SQLCipherTest.cs rename to tests/SQLite.Tests/SQLCipherTest.cs diff --git a/tests/SQLite.Tests/SQLite.Tests.csproj b/tests/SQLite.Tests/SQLite.Tests.csproj new file mode 100644 index 000000000..40f736438 --- /dev/null +++ b/tests/SQLite.Tests/SQLite.Tests.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp3.1 + + + + + + + + + + + + + SQLiteAsync.cs + + + SQLite.cs + + + diff --git a/tests/ScalarTest.cs b/tests/SQLite.Tests/ScalarTest.cs similarity index 100% rename from tests/ScalarTest.cs rename to tests/SQLite.Tests/ScalarTest.cs diff --git a/tests/SkipTest.cs b/tests/SQLite.Tests/SkipTest.cs similarity index 100% rename from tests/SkipTest.cs rename to tests/SQLite.Tests/SkipTest.cs diff --git a/tests/StringQueryTest.cs b/tests/SQLite.Tests/StringQueryTest.cs similarity index 100% rename from tests/StringQueryTest.cs rename to tests/SQLite.Tests/StringQueryTest.cs diff --git a/tests/TableChangedTest.cs b/tests/SQLite.Tests/TableChangedTest.cs similarity index 100% rename from tests/TableChangedTest.cs rename to tests/SQLite.Tests/TableChangedTest.cs diff --git a/tests/TestDb.cs b/tests/SQLite.Tests/TestDb.cs similarity index 100% rename from tests/TestDb.cs rename to tests/SQLite.Tests/TestDb.cs diff --git a/tests/TimeSpanTest.cs b/tests/SQLite.Tests/TimeSpanTest.cs similarity index 100% rename from tests/TimeSpanTest.cs rename to tests/SQLite.Tests/TimeSpanTest.cs diff --git a/tests/TransactionTest.cs b/tests/SQLite.Tests/TransactionTest.cs similarity index 100% rename from tests/TransactionTest.cs rename to tests/SQLite.Tests/TransactionTest.cs diff --git a/tests/UnicodeTest.cs b/tests/SQLite.Tests/UnicodeTest.cs similarity index 100% rename from tests/UnicodeTest.cs rename to tests/SQLite.Tests/UnicodeTest.cs diff --git a/tests/UniqueTest.cs b/tests/SQLite.Tests/UniqueTest.cs similarity index 100% rename from tests/UniqueTest.cs rename to tests/SQLite.Tests/UniqueTest.cs From ff00d03013acaab5e794bd045d4eaa750a71f7ce Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 23 Aug 2020 10:48:00 -0700 Subject: [PATCH 2/4] Add regression test --- tests/Regression655.sqlite | Bin 0 -> 3072 bytes tests/SQLite.Tests/SQLCipherTest.cs | 31 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/Regression655.sqlite diff --git a/tests/Regression655.sqlite b/tests/Regression655.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..3d1b1c04389e6a7fb5d58d6b3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HjrX!5YUL{y6bxB~2&?=EGYnXTPOO=*|fuZ@vRP}I6htz+AL=ToB9_1We4RnMy z7BFf;hwyjK*pkf&hbs(h{6%9c2!GUdnZ!_!W&=R($D{9giaFcp1p<%^vaSZTqNO@1 zU8rCe(K_GdnLqt6a3fRpXfgxw;!@?oU$vFNt4G;($;7(f^Z2v{eh^dqX5 zDcs@6l{y1*uR(kFY%$l~0s=VAowa!jjBqd$j{g>$VuYz;C2*FOV|jL#J0Xvo1v0o` zil6~Yhii7`VR{rl6oue1bd!Y0D!Me>H*WHXh6}`4=Ee_yp~tDyqhFkVbj;V2i6?Ot z5P2RH#_LD~`_~45R=E!51wZ&{;LwpN8v^x`|A|?E&`BLG_FD+dxO(H>VxB=Fw^akd z8YyZ(t^r(HMr|atf5=E`3bI@X4W OeWb@12{FkQ09_WXzU^-S literal 0 HcmV?d00001 diff --git a/tests/SQLite.Tests/SQLCipherTest.cs b/tests/SQLite.Tests/SQLCipherTest.cs index 665c82eaf..d73315b20 100644 --- a/tests/SQLite.Tests/SQLCipherTest.cs +++ b/tests/SQLite.Tests/SQLCipherTest.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.IO; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; @@ -148,5 +149,35 @@ public void CheckJournalModeForNonKeyed () Assert.AreEqual ("wal", db.ExecuteScalar ("PRAGMA journal_mode;")); } } + + class TestData + { + [PrimaryKey, AutoIncrement] + public int Id { get; set; } + + public string Stuff { get; set; } = ""; + } + + [Test] + public void Regression655 () + { + // Encrypted DBs with v1.6 cannot be opened in v1.7 + var tempPath = System.IO.Path.GetTempFileName (); + var res = GetType ().Assembly.GetManifestResourceNames (); + using (var ins = GetType ().Assembly.GetManifestResourceStream ("SQLite.Tests.Regression655.sqlite")) + using (var outs = new System.IO.FileStream (tempPath, FileMode.Create, FileAccess.Write)) { + ins.CopyTo (outs); + } + + var key = "FRANK"; + var cstring = new SQLiteConnectionString (tempPath, storeDateTimeAsTicks: true, key: key); + using var db = new SQLiteConnection (cstring); + + db.CreateTable (); + + var results = db.Table ().ToList (); + + Assert.AreEqual ("???", results[0].Stuff); + } } } From b27417054077278d46d4f3bcf1995b96c0104eef Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 23 Aug 2020 11:25:10 -0700 Subject: [PATCH 3/4] Fix regression 655 test --- SQLite.sln | 30 +- .../mono_crash.11a6748113.0.json | 731 ++++++++++++++++++ tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj | 1 + tests/{ => SQLite.Tests}/Regression655.sqlite | Bin tests/SQLite.Tests/SQLite.Tests.csproj | 7 + 5 files changed, 754 insertions(+), 15 deletions(-) create mode 100644 nuget/SQLite-net-base/mono_crash.11a6748113.0.json rename tests/{ => SQLite.Tests}/Regression655.sqlite (100%) diff --git a/SQLite.sln b/SQLite.sln index b0dc095b2..69e56da0d 100644 --- a/SQLite.sln +++ b/SQLite.sln @@ -19,12 +19,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-base", "nuget\SQ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-sqlcipher", "nuget\SQLite-net-sqlcipher\SQLite-net-sqlcipher.csproj", "{59DB03EF-E28D-431E-9058-74AF316800EE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite.Tests", "tests\SQLite.Tests\SQLite.Tests.csproj", "{D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiDiff", "tests\ApiDiff\ApiDiff.csproj", "{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteTestsiOS", "tests\SQLite.Tests.iOS\SQLiteTestsiOS.csproj", "{81850129-71C3-40C7-A48B-AA5D2C2E365E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite.Tests", "tests\SQLite.Tests\SQLite.Tests.csproj", "{773DFA58-92E3-4153-A9BE-3EA2B2123B4D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -71,18 +71,6 @@ Global {59DB03EF-E28D-431E-9058-74AF316800EE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {59DB03EF-E28D-431E-9058-74AF316800EE}.Debug|iPhone.ActiveCfg = Debug|Any CPU {59DB03EF-E28D-431E-9058-74AF316800EE}.Debug|iPhone.Build.0 = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|Any CPU.Build.0 = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhone.ActiveCfg = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhone.Build.0 = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B}.Debug|iPhone.Build.0 = Debug|Any CPU {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEF735C-B973-4ED9-8446-7FFA6D0B410B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -107,11 +95,23 @@ Global {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.ActiveCfg = Debug|iPhone {81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.Build.0 = Debug|iPhone + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|Any CPU.Build.0 = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|iPhone.ActiveCfg = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|iPhone.Build.0 = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D}.Debug|iPhone.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D3DD3B60-05AC-4EF4-B34F-C3A01F867E4B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} {1DEF735C-B973-4ED9-8446-7FFA6D0B410B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} {81850129-71C3-40C7-A48B-AA5D2C2E365E} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} + {773DFA58-92E3-4153-A9BE-3EA2B2123B4D} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = tests\SQLite.Tests.csproj diff --git a/nuget/SQLite-net-base/mono_crash.11a6748113.0.json b/nuget/SQLite-net-base/mono_crash.11a6748113.0.json new file mode 100644 index 000000000..e37b49acb --- /dev/null +++ b/nuget/SQLite-net-base/mono_crash.11a6748113.0.json @@ -0,0 +1,731 @@ +{ + "protocol_version" : "0.0.6", + "configuration" : { + "version" : "(6.12.0.90) (2020-02/d3daacdaa80)", + "tlc" : "normal", + "sigsgev" : "altstack", + "notifications" : "kqueue", + "architecture" : "amd64", + "disabled_features" : "none", + "smallconfig" : "disabled", + "bigarrays" : "disabled", + "softdebug" : "enabled", + "interpreter" : "enabled", + "llvm_support" : "0", + "suspend" : "hybrid" + }, + "memory" : { + "Resident Size" : "144220160", + "Virtual Size" : "6126149632", + "minor_gc_time" : "0", + "major_gc_time" : "0", + "minor_gc_count" : "0", + "major_gc_count" : "0", + "major_gc_time_concurrent" : "0" + }, + "threads" : [ + { + "is_managed" : true, + "offset_free_hash" : "0x11a6748113", + "offset_rich_hash" : "0x11a6807eea", + "crashed" : true, + "native_thread_id" : "0x700012632000", + "thread_info_addr" : "0x7fc62a02a200", + "thread_name" : "tid_9803", + "ctx" : { + "IP" : "0x7fff6abe433a", + "SP" : "0x70001262aba8", + "BP" : "0x70001262abd0" + }, + "managed_frames" : [ + { + "is_managed" : "false", + "native_address" : "unregistered" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00015" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x6004287", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x0026a" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x6004487", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00043" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed4", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00071" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed2", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x5fc61" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed1", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x0002b" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x6004286", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00093" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0xffffffff" + } +, + { + "is_managed" : "false", + "native_address" : "unregistered" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x600447f", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x0003a" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001f2c", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00025" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed4", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00071" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed2", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x5fc61" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed1", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x0002b" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x0002a" + } + + ], + "unmanaged_frames" : [ + { + "is_managed" : "false", + "native_address" : "0x10b7d2ec6", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96e135", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96e7aa", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b840087", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b7d7bfe", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b83f382", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ac955fd", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "unregistered" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ab6b808", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba2bf37", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba0cdbf", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba2c3ce", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba2c54f", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba2c58a", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba20d5e", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b9686c1", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96f31d", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96cf8c", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x6004287", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x6004487", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed4", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed2", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff32116993", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff32115dfe", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff32115cf7", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff3211892b", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff30a27b05", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff309f9304", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff309f9250", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff309f7d79", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff309f6e3e", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff30a7f489", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x1126b8fcc", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x00000", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "3B74EB7E-72BA-49D0-ADF6-22008AA5CB32", + "token" : "0x600447f", + "native_offset" : "0x0", + "filename" : "System.dll", + "sizeofimage" : "0x292000", + "timestamp" : "0xcbf565c7", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001f2c", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "true", + "guid" : "B18E5763-EC3F-41E6-8A8F-E16D7F5E0BEE", + "token" : "0x6001ed2", + "native_offset" : "0x0", + "filename" : "mscorlib.dll", + "sizeofimage" : "0x472000", + "timestamp" : "0xd1b6814b", + "il_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b734ed2", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b943f87", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b94a830", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96edbd", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6aca1109", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ac9cb8b", + "native_offset" : "0x00000" + } + + ] +}, +{ + "is_managed" : false, + "offset_free_hash" : "0x0", + "offset_rich_hash" : "0x0", + "crashed" : false, + "native_thread_id" : "0x70000faaa000", + "thread_info_addr" : "0x7fc648008a00", + "thread_name" : "Finalizer", + "ctx" : { + "IP" : "0x7fff6abdde36", + "SP" : "0x70000faa9eb8", + "BP" : "0x70000faa9f00" + }, + "unmanaged_frames" : [ + { + "is_managed" : "false", + "native_address" : "0x10b7d2ec6", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96e135", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96de67", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b83efc3", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ac955fd", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "unregistered" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96ed7d", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6aca1109", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ac9cb8b", + "native_offset" : "0x00000" + } + + ] +}, +{ + "is_managed" : false, + "offset_free_hash" : "0x0", + "offset_rich_hash" : "0x0", + "crashed" : false, + "native_thread_id" : "0x11a079dc0", + "thread_info_addr" : "0x7fc63f809a00", + "thread_name" : "tid_307", + "ctx" : { + "IP" : "0x7fff6abe0882", + "SP" : "0x7ffee44dd988", + "BP" : "0x7ffee44dda20" + }, + "unmanaged_frames" : [ + { + "is_managed" : "false", + "native_address" : "0x10b7d2ec6", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96e135", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96de67", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b83efc3", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6ac955fd", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7ffee44dd678", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba08eb0", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10ba20f91", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96b074", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b96ae7a", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b7985fa", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x10b724209", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x7fff6aa9ccc9", + "native_offset" : "0x00000" + } +, + { + "is_managed" : "false", + "native_address" : "0x5", + "native_offset" : "0x00000" + } + + ] +} +] +} \ No newline at end of file diff --git a/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj b/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj index 231eabaab..c477d759a 100644 --- a/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj +++ b/tests/SQLite.Tests.iOS/SQLiteTestsiOS.csproj @@ -11,6 +11,7 @@ SQLite.Tests.iOS SQLiteTestsiOS Resources + 8.0 true diff --git a/tests/Regression655.sqlite b/tests/SQLite.Tests/Regression655.sqlite similarity index 100% rename from tests/Regression655.sqlite rename to tests/SQLite.Tests/Regression655.sqlite diff --git a/tests/SQLite.Tests/SQLite.Tests.csproj b/tests/SQLite.Tests/SQLite.Tests.csproj index 40f736438..6977d905d 100644 --- a/tests/SQLite.Tests/SQLite.Tests.csproj +++ b/tests/SQLite.Tests/SQLite.Tests.csproj @@ -2,6 +2,7 @@ netcoreapp3.1 + 8.0 @@ -20,4 +21,10 @@ SQLite.cs + + + + + + From 0f2640e76b0272bc06c124f9c1293788dc12e2ce Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 23 Aug 2020 13:08:08 -0700 Subject: [PATCH 4/4] Test loading v3 cipher using compat mode --- src/SQLite.cs | 2 +- src/SQLiteAsync.cs | 2 +- tests/SQLite.Tests/EncryptedV3.sqlite | Bin 0 -> 3072 bytes tests/SQLite.Tests/Regression655.sqlite | Bin 3072 -> 0 bytes tests/SQLite.Tests/SQLCipherTest.cs | 54 +++++++++++++++++++++--- tests/SQLite.Tests/SQLite.Tests.csproj | 9 +++- 6 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 tests/SQLite.Tests/EncryptedV3.sqlite delete mode 100644 tests/SQLite.Tests/Regression655.sqlite diff --git a/src/SQLite.cs b/src/SQLite.cs index 5ed96f2ce..9057df8bd 100644 --- a/src/SQLite.cs +++ b/src/SQLite.cs @@ -1,5 +1,5 @@ // -// Copyright (c) 2009-2019 Krueger Systems, Inc. +// Copyright (c) 2009-2020 Krueger Systems, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/SQLiteAsync.cs b/src/SQLiteAsync.cs index b981d00e8..e5b08cfab 100644 --- a/src/SQLiteAsync.cs +++ b/src/SQLiteAsync.cs @@ -1,5 +1,5 @@ // -// Copyright (c) 2012-2019 Krueger Systems, Inc. +// Copyright (c) 2012-2020 Krueger Systems, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/tests/SQLite.Tests/EncryptedV3.sqlite b/tests/SQLite.Tests/EncryptedV3.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..985e9a0daf9ef5a9d51f260d00b164262b74a0a4 GIT binary patch literal 3072 zcmV+b4FB_^pp2447$fE^*DWxA3vkBn`<@&IH6Rq>)Wo(_dwFbWKB4Ku^D>mG>0C7Z zE;hGgVnI9-PV;XzEzI8$5c69$H6`D;1^0X~p+L;k_0>SDH}?LP&}jm6|0WJgyv)h> zMBjHIAJJXV)5n1E6TGjcn~_gk1?0QkxViX7WN$d_h;BN0<&oP|M7P&H;UZF3aWD}E zu=H9qi5m|vkvVPWbd(xjY(3n-XDG?Aa^EMrJz?>y;FMlErBLjdXPmKE;&;-2s zV&tSAI;32dRKyI5YJH~yE>njP6B ziH1ua`dI^?TXaOzc6XIGc5bh^&!HaT9NU?EhYl@30%&#@*frEc@i<@YS5J5j3FJ5x zy?NUkI5MM=wdq@@7O0~TBb~4FyU+?W>)#2HRbIdU-Oa?2)hUpLsi+y;`DX{Xn4TZ| zmt%ThjvpIF^nT`veIp4h!B6k8vh@>{+$uS(n*MdHbU}Q4gH29P%M%(SnS&-wE9C!d+)_T)gITfJ zjY$TF!fu01RrNh>I7tlx>iJ>cZPx$Y3E8keo$HGnhvj2Id$rsBh%f& z*LX^`r#2g!e|19|_ZNi-JxQ9gdI}qyja`9`o4;k@-FOmW2mCh%+z}6*cm3OOg{v*n z6oqIcQtz$2E~g$u+`J6S3y7yH(){xOz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I)y2`zcF*H>so@o<@PA5WmjB(;Zz0)3abmL3RCs@MrR<5&>B+;lmYR!w?eCjeG z#?%>g`KyQFMEu!`Ps>O10_6Ti-+MRTZnpR$k%VPRLE8A}1 z$1kHjrX!5YUL{y6bxB~2&?=EGYnXTPOO=*|fuZ@vRP}I6htz+AL=ToB9_1We4RnMy z7BFf;hwyjK*pkf&hbs(h{6%9c2!GUdnZ!_!W&=R($D{9giaFcp1p<%^vaSZTqNO@1 zU8rCe(K_GdnLqt6a3fRpXfgxw;!@?oU$vFNt4G;($;7(f^Z2v{eh^dqX5 zDcs@6l{y1*uR(kFY%$l~0s=VAowa!jjBqd$j{g>$VuYz;C2*FOV|jL#J0Xvo1v0o` zil6~Yhii7`VR{rl6oue1bd!Y0D!Me>H*WHXh6}`4=Ee_yp~tDyqhFkVbj;V2i6?Ot z5P2RH#_LD~`_~45R=E!51wZ&{;LwpN8v^x`|A|?E&`BLG_FD+dxO(H>VxB=Fw^akd z8YyZ(t^r(HMr|atf5=E`3bI@X4W OeWb@12{FkQ09_WXzU^-S diff --git a/tests/SQLite.Tests/SQLCipherTest.cs b/tests/SQLite.Tests/SQLCipherTest.cs index d73315b20..bf8257637 100644 --- a/tests/SQLite.Tests/SQLCipherTest.cs +++ b/tests/SQLite.Tests/SQLCipherTest.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.IO; +using System.Security.Cryptography; +using System.Net.Sockets; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; @@ -159,25 +161,63 @@ class TestData } [Test] - public void Regression655 () + public void CanOpenV3 () { + // Issue #655 + // SQLCipher switched defaults from v3 to v4 + // Cannot load v3 without some action: + // 1. Migrating the DB + // 2. Compatibility mode + + var resName = "SQLite.Tests.EncryptedV3.sqlite"; + // Encrypted DBs with v1.6 cannot be opened in v1.7 var tempPath = System.IO.Path.GetTempFileName (); var res = GetType ().Assembly.GetManifestResourceNames (); - using (var ins = GetType ().Assembly.GetManifestResourceStream ("SQLite.Tests.Regression655.sqlite")) + using (var ins = GetType ().Assembly.GetManifestResourceStream (resName)) using (var outs = new System.IO.FileStream (tempPath, FileMode.Create, FileAccess.Write)) { ins.CopyTo (outs); } + //var path = "/Users/fak/Projects/Repro655/MakeDB/Version1.6.sqlite"; + var path = tempPath; + var key = "FRANK"; - var cstring = new SQLiteConnectionString (tempPath, storeDateTimeAsTicks: true, key: key); - using var db = new SQLiteConnection (cstring); + var cstring = new SQLiteConnectionString ( + path, + storeDateTimeAsTicks: true, + key: key, + //preKeyAction: c => { + // c.Execute ("PRAGMA cipher_compatibility = 3"); + //} + postKeyAction: c => { + //var res = c.ExecuteScalar ("PRAGMA cipher_migrate"); + c.Execute ("PRAGMA cipher_compatibility = 3"); + } + ); + Console.WriteLine ("Copied to " + path); + + using (var db = new SQLiteConnection (cstring)) { - db.CreateTable (); + //Console.ReadLine (); - var results = db.Table ().ToList (); + db.CreateTable (); - Assert.AreEqual ("???", results[0].Stuff); + var results = db.Table ().ToList (); + + Assert.AreEqual ("Hello Chatroom!", results[0].Stuff); + } + + // + // Assert the database has not changed + // + var md5 = MD5.Create (); + var origMD5 = new byte[0]; + using (var ins = GetType ().Assembly.GetManifestResourceStream (resName)) { + origMD5 = md5.ComputeHash (ins); + } + var newMD5 = md5.ComputeHash (File.ReadAllBytes (tempPath)); + Assert.True (origMD5.SequenceEqual (newMD5)); } } } diff --git a/tests/SQLite.Tests/SQLite.Tests.csproj b/tests/SQLite.Tests/SQLite.Tests.csproj index 6977d905d..b3ebc462f 100644 --- a/tests/SQLite.Tests/SQLite.Tests.csproj +++ b/tests/SQLite.Tests/SQLite.Tests.csproj @@ -5,6 +5,13 @@ 8.0 + + TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;USE_SQLITEPCL_RAW + + + + TRACE;RELEASE;NETCOREAPP;NETCOREAPP3_1;USE_SQLITEPCL_RAW + @@ -25,6 +32,6 @@ - +