SQLite

Check-in [0b3174e0b1]
Login

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

Overview
Comment:Do not do affinity transformations on inserts into an index for the manifestation of a view or subquery. Fix for ticket [91e2e8ba6ff2e2].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0b3174e0b1364ccc31853dce02bce5f7d3d431db
User & Date: drh 2011-06-23 16:18:26.708
References
2017-01-16
18:10
Back out check-in [0b3174e0b1364c] and replace it with a better fix for \ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem identified by ticket [7ffd1ca1d2ad4ec]. Add new test cases for both tickets. (check-in: 9b64af7b52 user: drh tags: trunk)
16:43
Back out check-in [0b3174e0b1364c] and replace it with a better fix for ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem identified by ticket [7ffd1ca1d2ad4ec]. (Closed-Leaf check-in: 0613665274 user: drh tags: automatic-index-affinity)
15:10 New ticket [7ffd1ca1d2] Incorrect affinity when using automatic indexes. (artifact: 9ce8b972f7 user: drh)
Context
2011-06-23
16:40
Add a test for ticket [91e2e8ba6f]. No changes to code. (check-in: c271f7e88f user: dan tags: trunk)
16:18
Do not do affinity transformations on inserts into an index for the manifestation of a view or subquery. Fix for ticket [91e2e8ba6ff2e2]. (check-in: 0b3174e0b1 user: drh tags: trunk)
01:42
Provide the SQLITE_MAX_SCHEMA_RETRY compile-time parameter for adjusting the number of reparse attempts after a schema change. (check-in: 8dca748b23 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/delete.c.
632
633
634
635
636
637
638

639
640
641
642
643
644
      sqlite3VdbeAddOp2(v, OP_SCopy, regBase+nCol, regBase+j);
    }else{
      sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
      sqlite3ColumnDefault(v, pTab, idx, -1);
    }
  }
  if( doMakeRec ){

    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
    sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
  }
  sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
  return regBase;
}







>

|




632
633
634
635
636
637
638
639
640
641
642
643
644
645
      sqlite3VdbeAddOp2(v, OP_SCopy, regBase+nCol, regBase+j);
    }else{
      sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
      sqlite3ColumnDefault(v, pTab, idx, -1);
    }
  }
  if( doMakeRec ){
    const char *zAff = pTab->pSelect ? 0 : sqlite3IndexAffinityStr(v, pIdx);
    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
    sqlite3VdbeChangeP4(v, -1, zAff, P4_TRANSIENT);
  }
  sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
  return regBase;
}