Fix sqlite3ColumnOfIndex() to account for virtual columns.
FossilOrigin-Name: 447271123e3b467d9271a4c0cf27f47af2f865c9298b8c355d9e766411a1f422
This commit is contained in:
parent
463e76ff8f
commit
01ef55e0f5
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Get\sindexes\sworking\son\svirtual\scolumns.
|
||||
D 2019-10-18T10:05:06.425
|
||||
C Fix\ssqlite3ColumnOfIndex()\sto\saccount\sfor\svirtual\scolumns.
|
||||
D 2019-10-18T12:14:48.871
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -469,7 +469,7 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c a8a9c2ce62bdf54c8cf9795143d7cb10b7473a1230a0572f702d061ffcceefe5
|
||||
F src/btree.h f27a33c49280209a93385e218306c4ee5f46ba8d7649d2f81a7166b282232484
|
||||
F src/btreeInt.h 91806f01fd1145a9a86ba3042f25c38d8faf6002701bf5e780742cf88bcff437
|
||||
F src/build.c a6424bece3662d57b19f8ead1541c959036bc632ac57f7f6f7801833c8e544da
|
||||
F src/build.c 5e5fc50bda07b83d8f602218dae3099c9b7ee7b71d6d59dfa642dc074877ec35
|
||||
F src/callback.c 25dda5e1c2334a367b94a64077b1d06b2553369f616261ca6783c48bcb6bda73
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 1b0724e66f95f33b160b1af85caaf9cceb325d22abf39bd24df4f54a73982251
|
||||
@ -1847,7 +1847,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 0d236698e64b2a4b46f91a25279c406e0bf392fe66116678456f0a034c11d7b4
|
||||
R 8109a098652bad982748ade2c7597bbf
|
||||
P 450c48766c8e62653d074c95f69b0576de3880d183a1d1e5992d88b6fce6cc39
|
||||
R b12f2d235ff67ce42b63b55b4cb45601
|
||||
U drh
|
||||
Z 4e41794c6cc4f099bab016eb4fec67c3
|
||||
Z c0d073b04d67e49c297ac9c42fae3a3a
|
||||
|
@ -1 +1 @@
|
||||
450c48766c8e62653d074c95f69b0576de3880d183a1d1e5992d88b6fce6cc39
|
||||
447271123e3b467d9271a4c0cf27f47af2f865c9298b8c355d9e766411a1f422
|
@ -882,6 +882,14 @@ Index *sqlite3PrimaryKeyIndex(Table *pTab){
|
||||
*/
|
||||
i16 sqlite3ColumnOfIndex(Index *pIdx, i16 iCol){
|
||||
int i;
|
||||
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
Table *pTab = pIdx->pTable;
|
||||
if( pTab->tabFlags & TF_HasVirtual ){
|
||||
for(i=0; i<=iCol; i++){
|
||||
if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ) iCol++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for(i=0; i<pIdx->nColumn; i++){
|
||||
if( iCol==pIdx->aiColumn[i] ) return i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user