Index: Doc/Extra/version.html
==================================================================
--- Doc/Extra/version.html
+++ Doc/Extra/version.html
@@ -46,10 +46,11 @@
1.0.87.0 - June XX, 2013 (release scheduled)
- Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be].
- The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].
- Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.
+ - Modify the index introspection code so that it does not treat PRAGMA table_info "pk" column values as boolean. Fix for [f2c47a01eb].
- Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].
- Rename the ReturnCode property of the SQLiteException class to ResultCode. ** Potentially Incompatible Change **
1.0.86.0 - May 23, 2013
Index: System.Data.SQLite/SQLiteConnection.cs
==================================================================
--- System.Data.SQLite/SQLiteConnection.cs
+++ System.Data.SQLite/SQLiteConnection.cs
@@ -3046,11 +3046,11 @@
using (SQLiteCommand cmdTable = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, rdTables.GetString(2)), this))
using (SQLiteDataReader rdTable = cmdTable.ExecuteReader())
{
while (rdTable.Read())
{
- if (rdTable.GetInt32(5) == 1)
+ if (rdTable.GetInt32(5) != 0)
{
primaryKeys.Add(rdTable.GetInt32(0));
// If the primary key is of type INTEGER, then its a rowid and we need to make a fake index entry for it.
if (String.Compare(rdTable.GetString(2), "INTEGER", StringComparison.OrdinalIgnoreCase) == 0)
ADDED Tests/tkt-f2c47a01eb.eagle
Index: Tests/tkt-f2c47a01eb.eagle
==================================================================
--- /dev/null
+++ Tests/tkt-f2c47a01eb.eagle
@@ -0,0 +1,84 @@
+###############################################################################
+#
+# tkt-f2c47a01eb.eagle --
+#
+# Written by Joe Mistachkin.
+# Released to the public domain, use at your own risk!
+#
+###############################################################################
+
+package require Eagle
+package require Eagle.Library
+package require Eagle.Test
+
+runTestPrologue
+
+###############################################################################
+
+package require System.Data.SQLite.Test
+runSQLiteTestPrologue
+
+###############################################################################
+
+runTest {test tkt-f2c47a01eb-1.1 {GetSchema w/INDEXES, PK} -setup {
+ setupDb [set fileName tkt-f2c47a01eb-1.1.db]
+} -body {
+ set connection [getDbConnection]
+
+ sql execute $db "CREATE TABLE t1(x TEXT PRIMARY KEY, y TEXT);"
+ sql execute $db "CREATE INDEX t1_1 ON t1(x, y);"
+ sql execute $db "CREATE UNIQUE INDEX t1_2 ON t1(x, y);"
+
+ set dataTable [$connection -alias GetSchema INDEXES]
+ set results [list]
+
+ object foreach -alias dataRow [set dataRows [$dataTable -alias Rows]] {
+ lappend results [list [$dataRow Item TABLE_NAME] \
+ [$dataRow Item INDEX_NAME] [$dataRow Item PRIMARY_KEY]]
+ }
+
+ set results
+} -cleanup {
+ cleanupDb $fileName
+
+ freeDbConnection
+
+ unset -nocomplain dataRow dataRows dataTable results connection db fileName
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-result {{t1 t1_2 False} {t1 t1_1 False} {t1 sqlite_autoindex_t1_1 True}}}
+
+###############################################################################
+
+runTest {test tkt-f2c47a01eb-1.2 {GetSchema w/INDEXES, composite PK} -setup {
+ setupDb [set fileName tkt-f2c47a01eb-1.2.db]
+} -body {
+ set connection [getDbConnection]
+
+ sql execute $db "CREATE TABLE t1(x TEXT, y TEXT, PRIMARY KEY(x, y));"
+ sql execute $db "CREATE INDEX t1_1 ON t1(x, y);"
+ sql execute $db "CREATE UNIQUE INDEX t1_2 ON t1(x, y);"
+
+ set dataTable [$connection -alias GetSchema INDEXES]
+ set results [list]
+
+ object foreach -alias dataRow [set dataRows [$dataTable -alias Rows]] {
+ lappend results [list [$dataRow Item TABLE_NAME] \
+ [$dataRow Item INDEX_NAME] [$dataRow Item PRIMARY_KEY]]
+ }
+
+ set results
+} -cleanup {
+ cleanupDb $fileName
+
+ freeDbConnection
+
+ unset -nocomplain dataRow dataRows dataTable results connection db fileName
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
+-result {{t1 t1_2 False} {t1 t1_1 False} {t1 sqlite_autoindex_t1_1 True}}}
+
+###############################################################################
+
+runSQLiteTestEpilogue
+runTestEpilogue
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -191,10 +191,11 @@
- Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be].
- The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].
- Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.
+ - Modify the index introspection code so that it does not treat PRAGMA table_info "pk" column values as boolean. Fix for [f2c47a01eb].
- Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].
- Rename the ReturnCode property of the SQLiteException class to ResultCode. ** Potentially Incompatible Change **
1.0.86.0 - May 23, 2013
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -7,10 +7,11 @@
- Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be].
- The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].
- Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.
+ - Modify the index introspection code so that it does not treat PRAGMA table_info 'pk' column values as boolean. Fix for [f2c47a01eb].
- Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].
- Rename the ReturnCode property of the SQLiteException class to ResultCode. ** Potentially Incompatible Change **
1.0.86.0 - May 23, 2013