diff options
author | drh <drh@noemail.net> | 2013-11-11 22:55:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-11-11 22:55:26 +0000 |
commit | cbf1b8ef7d20e0281eaa218023450d33b0b1a138 (patch) | |
tree | e6da66a1c54ab2f11fa150ad989271ccc80b8b63 /src/vdbeblob.c | |
parent | d63d4b7bd7a5c84972dd16524610782fe301556c (diff) | |
parent | 14ec33f73be78acb450dfeb66bda59c1993bc7a5 (diff) | |
download | sqlite-cbf1b8ef7d20e0281eaa218023450d33b0b1a138.tar.gz sqlite-cbf1b8ef7d20e0281eaa218023450d33b0b1a138.zip |
Merge in the WITHOUT ROWID changes. A few tests are failing now. They will
be fixed in a follow-on check-in.
FossilOrigin-Name: 5addd1234ded59ce60fb633b76ac87d483377edd
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r-- | src/vdbeblob.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c index 044e7a897..ee660603e 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -180,6 +180,10 @@ int sqlite3_blob_open( pTab = 0; sqlite3ErrorMsg(pParse, "cannot open virtual table: %s", zTable); } + if( pTab && !HasRowid(pTab) ){ + pTab = 0; + sqlite3ErrorMsg(pParse, "cannot open table without rowid: %s", zTable); + } #ifndef SQLITE_OMIT_VIEW if( pTab && pTab->pSelect ){ pTab = 0; @@ -239,7 +243,7 @@ int sqlite3_blob_open( #endif for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){ int j; - for(j=0; j<pIdx->nColumn; j++){ + for(j=0; j<pIdx->nKeyCol; j++){ if( pIdx->aiColumn[j]==iCol ){ zFault = "indexed"; } |