SQLite

Check-in [361ea81a]
Login

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

Overview
Comment:Add a missing translation from table column numbers to storage table numbers while processing constraints on an UPDATE statement. Ticket [9621dd78a024d07a]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 361ea81ae8a13e7d2ec4c2412f30e049bb6ee320980d502c86bedc315cdd3bc0
User & Date: drh 2019-10-29 03:30:26
Context
2019-10-29
03:39
Tighten the generated column requirement such that every table must have at least one non-generated column. Ticket [166347c6fc994155]. (check-in: 4fba090e user: drh tags: trunk)
03:30
Add a missing translation from table column numbers to storage table numbers while processing constraints on an UPDATE statement. Ticket [9621dd78a024d07a] (check-in: 361ea81a user: drh tags: trunk)
01:26
Disallow tables that have only virtual columns. (check-in: 59197321 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/insert.c.

1978
1979
1980
1981
1982
1983
1984

1985
1986
1987
1988
1989
1990
1991
            char *p4 = (char*)sqlite3LocateCollSeq(pParse, pPk->azColl[i]);
            x = pPk->aiColumn[i];
            assert( x>=0 );
            if( i==(pPk->nKeyCol-1) ){
              addrJump = addrUniqueOk;
              op = OP_Eq;
            }

            sqlite3VdbeAddOp4(v, op, 
                regOldData+1+x, addrJump, regCmp+i, p4, P4_COLLSEQ
            );
            sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);
            VdbeCoverageIf(v, op==OP_Eq);
            VdbeCoverageIf(v, op==OP_Ne);
          }







>







1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
            char *p4 = (char*)sqlite3LocateCollSeq(pParse, pPk->azColl[i]);
            x = pPk->aiColumn[i];
            assert( x>=0 );
            if( i==(pPk->nKeyCol-1) ){
              addrJump = addrUniqueOk;
              op = OP_Eq;
            }
            x = sqlite3TableColumnToStorage(pTab, x);
            sqlite3VdbeAddOp4(v, op, 
                regOldData+1+x, addrJump, regCmp+i, p4, P4_COLLSEQ
            );
            sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);
            VdbeCoverageIf(v, op==OP_Eq);
            VdbeCoverageIf(v, op==OP_Ne);
          }