49
49
** VectorIdxParams utilities
50
50
****************************************************************************/
51
51
52
- // VACUUM creates tables and indices first and only then populate data
53
- // we need to ignore inserts from 'INSERT INTO vacuum.t SELECT * FROM t' statements because
54
- // all shadow tables will be populated by VACUUM process during regular process of table copy
55
- #define IsVacuum (db ) ((db->mDbFlags&DBFLAG_Vacuum)!=0)
56
-
57
52
void vectorIdxParamsInit (VectorIdxParams * pParams , u8 * pBinBuf , int nBinSize ) {
58
53
assert ( nBinSize <= VECTOR_INDEX_PARAMS_BUF_SIZE );
59
54
@@ -772,10 +767,6 @@ int vectorIndexDrop(sqlite3 *db, const char *zDbSName, const char *zIdxName) {
772
767
// this is done to prevent unrecoverable situations where index were dropped but index parameters deletion failed and second attempt will fail on first step
773
768
int rcIdx , rcParams ;
774
769
775
- if ( IsVacuum (db ) ){
776
- return SQLITE_OK ;
777
- }
778
-
779
770
assert ( zDbSName != NULL );
780
771
781
772
rcIdx = diskAnnDropIndex (db , zDbSName , zIdxName );
@@ -786,10 +777,6 @@ int vectorIndexDrop(sqlite3 *db, const char *zDbSName, const char *zIdxName) {
786
777
int vectorIndexClear (sqlite3 * db , const char * zDbSName , const char * zIdxName ) {
787
778
assert ( zDbSName != NULL );
788
779
789
- if ( IsVacuum (db ) ){
790
- return SQLITE_OK ;
791
- }
792
-
793
780
return diskAnnClearIndex (db , zDbSName , zIdxName );
794
781
}
795
782
@@ -799,7 +786,7 @@ int vectorIndexClear(sqlite3 *db, const char *zDbSName, const char *zIdxName) {
799
786
* this made intentionally in order to natively support upload of SQLite dumps
800
787
*
801
788
* dump populates tables first and create indices after
802
- * so we must omit them because shadow tables already filled
789
+ * so we must omit index refill setp because shadow tables already filled
803
790
*
804
791
* 1. in case of any error :-1 returned (and pParse errMsg is populated with some error message)
805
792
* 2. if vector index must not be created : 0 returned
@@ -817,10 +804,6 @@ int vectorIndexCreate(Parse *pParse, const Index *pIdx, const char *zDbSName, co
817
804
int hasLibsqlVectorIdxFn = 0 , hasCollation = 0 ;
818
805
const char * pzErrMsg ;
819
806
820
- if ( IsVacuum (pParse -> db ) ){
821
- return CREATE_IGNORE ;
822
- }
823
-
824
807
assert ( zDbSName != NULL );
825
808
826
809
sqlite3 * db = pParse -> db ;
@@ -970,7 +953,6 @@ int vectorIndexSearch(
970
953
VectorIdxParams idxParams ;
971
954
vectorIdxParamsInit (& idxParams , NULL , 0 );
972
955
973
- assert ( !IsVacuum (db ) );
974
956
assert ( zDbSName != NULL );
975
957
976
958
if ( argc != 3 ){
@@ -1055,10 +1037,6 @@ int vectorIndexInsert(
1055
1037
int rc ;
1056
1038
VectorInRow vectorInRow ;
1057
1039
1058
- if ( IsVacuum (pCur -> db ) ){
1059
- return SQLITE_OK ;
1060
- }
1061
-
1062
1040
rc = vectorInRowAlloc (pCur -> db , pRecord , & vectorInRow , pzErrMsg );
1063
1041
if ( rc != SQLITE_OK ){
1064
1042
return rc ;
@@ -1078,10 +1056,6 @@ int vectorIndexDelete(
1078
1056
){
1079
1057
VectorInRow payload ;
1080
1058
1081
- if ( IsVacuum (pCur -> db ) ){
1082
- return SQLITE_OK ;
1083
- }
1084
-
1085
1059
payload .pVector = NULL ;
1086
1060
payload .nKeys = r -> nField - 1 ;
1087
1061
payload .pKeyValues = r -> aMem + 1 ;
0 commit comments