/ Check-in [03e7019e]
Login

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

Overview
Comment:Make sure the query planner knows that the PRIMARY KEY index of a WITHOUT ROWID table is always a covering index.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | omit-rowid
Files: files | file ages | folders
SHA1:03e7019e14255dbeb85bb299569c82ef48ac4a98
User & Date: drh 2013-11-05 22:39:17
Context
2013-11-06
02:36
Remove an unused variable. check-in: e9c1e419 user: drh tags: omit-rowid
2013-11-05
22:39
Make sure the query planner knows that the PRIMARY KEY index of a WITHOUT ROWID table is always a covering index. check-in: 03e7019e user: drh tags: omit-rowid
19:41
Fix conflict handling for the case when the rowid uses REPLACE but other unique constraints use FAIL or IGNORE. check-in: 573cc274 user: drh tags: omit-rowid
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

1654
1655
1656
1657
1658
1659
1660

1661
1662
1663
1664
1665
1666
1667
    pPk = sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0);
    if( pPk==0 ) return;
    pPk->autoIndex = 2;
    pTab->iPKey = -1;
  }else{
    pPk = sqlite3PrimaryKeyIndex(pTab);
  }

  assert( pPk!=0 );
  nPk = pPk->nKeyCol;

  /* Make sure every column of the PRIMARY KEY is NOT NULL */
  for(i=0; i<nPk; i++){
    pTab->aCol[pPk->aiColumn[i]].notNull = 1;
  }







>







1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
    pPk = sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0);
    if( pPk==0 ) return;
    pPk->autoIndex = 2;
    pTab->iPKey = -1;
  }else{
    pPk = sqlite3PrimaryKeyIndex(pTab);
  }
  pPk->isCovering = 1;
  assert( pPk!=0 );
  nPk = pPk->nKeyCol;

  /* Make sure every column of the PRIMARY KEY is NOT NULL */
  for(i=0; i<nPk; i++){
    pTab->aCol[pPk->aiColumn[i]].notNull = 1;
  }