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

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

Overview
Comment:Merge System.Data.SQLite changes necessary to integrate with SQLite 3.10.0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | updates
Files: files | file ages | folders
SHA1: b70f7a74f85183c5f0b83bd90f66d8793a650d6c
User & Date: mistachkin 2015-12-31 22:58:12
Context
2015-12-31
22:58
Merge fix for [5251bd0878]. Update SQLite core library to the latest trunk code. Bump version to 1.0.100.0. Update version history docs. check-in: 59a224a9cf user: mistachkin tags: trunk
22:58
Merge System.Data.SQLite changes necessary to integrate with SQLite 3.10.0. Closed-Leaf check-in: b70f7a74f8 user: mistachkin tags: updates
22:50
Merge fix for [5251bd0878]. Update SQLite core library to the latest trunk code. Bump version to 1.0.100.0. Update version history docs. check-in: 9f0c9b796f user: mistachkin tags: updates
2015-12-04
20:07
Update SQLite core library to the latest trunk code. Adapt the interop assembly code to deal with the changes. Closed-Leaf check-in: 7536d45bed user: mistachkin tags: core310
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
...
947
948
949
950
951
952
953



954

955
956
957
958
959
960
961
...
993
994
995
996
997
998
999



1000

1001
1002
1003
1004



1005

1006
1007
1008
1009
1010
1011



1012

1013
1014
1015
1016



1017

1018
1019
1020
1021
1022
1023
1024

  if (pdtLen) *pdtLen = (pzDataType && *pzDataType) ? strlen(*pzDataType) : 0;
  if (pcsLen) *pcsLen = (pzCollSeq && *pzCollSeq) ? strlen(*pzCollSeq) : 0;

  return n;
}

SQLITE_API int WINAPI sqlite3_index_column_info_interop(sqlite3 *db, const char *zDb, const char *zIndexName, const char *zColumnName, int *sortOrder, int *onError, char **pzColl, int *plen)
{
  Index *pIdx;
  Table *pTab;
  int n;

  if (!db) return SQLITE_ERROR;
  sqlite3_mutex_enter(db->mutex);
................................................................................

  if (!p || !db) return ret;
  sqlite3_mutex_enter(db->mutex);
  for (n = 0; n < p->nCursor && p->apCsr[n] != NULL; n++)
  {
    if (p->apCsr[n]->isTable == FALSE) continue;
    if (p->apCsr[n]->iDb != iDb) continue;



    if (p->apCsr[n]->pCursor->pgnoRoot == tableRootPage)

    {
      ret = n;
      break;
    }
  }
  sqlite3_mutex_leave(db->mutex);

................................................................................
#if SQLITE_VERSION_NUMBER < 3008007
    if(pC->rowidIsValid)
    {
      if (prowid) *prowid = pC->lastRowid;
    }
    else
#endif



    if(pC->pseudoTableReg > 0)

    {
      ret = SQLITE_ERROR;
      break;
    }



    else if(pC->nullRow || pC->pCursor==0)

    {
      ret = SQLITE_ERROR;
      break;
    }
    else
    {



      if (pC->pCursor == NULL)

      {
        ret = SQLITE_ERROR;
        break;
      }



      sqlite3BtreeKeySize(pC->pCursor, prowid);

      if (prowid) *prowid = *prowid;
    }
    break;
  }
  sqlite3_mutex_leave(db->mutex);

  return ret;







|







 







>
>
>

>







 







>
>
>

>




>
>
>

>






>
>
>

>




>
>
>

>







900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
...
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
...
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044

  if (pdtLen) *pdtLen = (pzDataType && *pzDataType) ? strlen(*pzDataType) : 0;
  if (pcsLen) *pcsLen = (pzCollSeq && *pzCollSeq) ? strlen(*pzCollSeq) : 0;

  return n;
}

SQLITE_API int WINAPI sqlite3_index_column_info_interop(sqlite3 *db, const char *zDb, const char *zIndexName, const char *zColumnName, int *sortOrder, int *onError, const char **pzColl, int *plen)
{
  Index *pIdx;
  Table *pTab;
  int n;

  if (!db) return SQLITE_ERROR;
  sqlite3_mutex_enter(db->mutex);
................................................................................

  if (!p || !db) return ret;
  sqlite3_mutex_enter(db->mutex);
  for (n = 0; n < p->nCursor && p->apCsr[n] != NULL; n++)
  {
    if (p->apCsr[n]->isTable == FALSE) continue;
    if (p->apCsr[n]->iDb != iDb) continue;
#if SQLITE_VERSION_NUMBER >= 3010000
    if (p->apCsr[n]->uc.pCursor->pgnoRoot == tableRootPage)
#else
    if (p->apCsr[n]->pCursor->pgnoRoot == tableRootPage)
#endif
    {
      ret = n;
      break;
    }
  }
  sqlite3_mutex_leave(db->mutex);

................................................................................
#if SQLITE_VERSION_NUMBER < 3008007
    if(pC->rowidIsValid)
    {
      if (prowid) *prowid = pC->lastRowid;
    }
    else
#endif
#if SQLITE_VERSION_NUMBER >= 3010000
    if(pC->uc.pseudoTableReg > 0)
#else
    if(pC->pseudoTableReg > 0)
#endif
    {
      ret = SQLITE_ERROR;
      break;
    }
#if SQLITE_VERSION_NUMBER >= 3010000
    else if(pC->nullRow || pC->uc.pCursor==0)
#else
    else if(pC->nullRow || pC->pCursor==0)
#endif
    {
      ret = SQLITE_ERROR;
      break;
    }
    else
    {
#if SQLITE_VERSION_NUMBER >= 3010000
      if (pC->uc.pCursor == NULL)
#else
      if (pC->pCursor == NULL)
#endif
      {
        ret = SQLITE_ERROR;
        break;
      }
#if SQLITE_VERSION_NUMBER >= 3010000
      sqlite3BtreeKeySize(pC->uc.pCursor, prowid);
#else
      sqlite3BtreeKeySize(pC->pCursor, prowid);
#endif
      if (prowid) *prowid = *prowid;
    }
    break;
  }
  sqlite3_mutex_leave(db->mutex);

  return ret;