System.Data.SQLite
Check-in [99b0ca713e]
Not logged in

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

Overview
Comment:Correct cursor type checking in the sqlite3_cursor_rowid_interop() function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 99b0ca713ea00267229b33f5b80f65c3b2ab9a94
User & Date: mistachkin 2017-06-10 00:51:26
Context
2017-06-10
17:38
Merge updates from trunk. check-in: 091bc3a48a user: mistachkin tags: branch-1.0.105
00:56
Fix issue that prevented SQLiteBlob creation from succeeding for tables that did not have an integer primary key. check-in: a47688aca5 user: mistachkin tags: trunk
00:51
Correct cursor type checking in the sqlite3_cursor_rowid_interop() function. check-in: 99b0ca713e user: mistachkin tags: trunk
2017-06-09
23:49
Update a couple method visibility modifiers. check-in: 6ccd600582 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
....
1071
1072
1073
1074
1075
1076
1077

1078

1079
1080
1081
1082
1083
1084
1085
    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 (pC->pCursor == NULL)
#endif
      {
        ret = SQLITE_ERROR;
        break;
      }
#if SQLITE_VERSION_NUMBER >= 3014000

      *prowid = sqlite3BtreeIntegerKey(pC->uc.pCursor);

#elif SQLITE_VERSION_NUMBER >= 3010000
      sqlite3BtreeKeySize(pC->uc.pCursor, prowid);
#else
      sqlite3BtreeKeySize(pC->pCursor, prowid);
#endif
      if (prowid) *prowid = *prowid;
    }







|







 







>

>







1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
....
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
    if(pC->rowidIsValid)
    {
      if (prowid) *prowid = pC->lastRowid;
    }
    else
#endif
#if SQLITE_VERSION_NUMBER >= 3010000
    if(pC->eCurType != CURTYPE_BTREE)
#else
    if(pC->pseudoTableReg > 0)
#endif
    {
      ret = SQLITE_ERROR;
      break;
    }
................................................................................
      if (pC->pCursor == NULL)
#endif
      {
        ret = SQLITE_ERROR;
        break;
      }
#if SQLITE_VERSION_NUMBER >= 3014000
      sqlite3BtreeEnterCursor(pC->uc.pCursor);
      *prowid = sqlite3BtreeIntegerKey(pC->uc.pCursor);
      sqlite3BtreeLeaveCursor(pC->uc.pCursor);
#elif SQLITE_VERSION_NUMBER >= 3010000
      sqlite3BtreeKeySize(pC->uc.pCursor, prowid);
#else
      sqlite3BtreeKeySize(pC->pCursor, prowid);
#endif
      if (prowid) *prowid = *prowid;
    }