|
|
@@ -1137,7 +1137,7 @@ public:
|
|
|
class CSphHitBuilder;
|
|
|
|
|
|
/// this is my actual VLN-compressed phrase index implementation
|
|
|
-class CSphIndex_VLN : public CSphIndex, public IndexAlterHelper_c, public DebugCheckHelper_c
|
|
|
+class CSphIndex_VLN : public CSphIndex, public IndexAlterHelper_c
|
|
|
{
|
|
|
friend class DiskIndexQwordSetup_c;
|
|
|
friend class CSphMerger;
|
|
|
@@ -11612,18 +11612,18 @@ size_t strnlen ( const char * s, size_t iMaxLen )
|
|
|
|
|
|
int CSphIndex_VLN::DebugCheck ( DebugCheckError_i & tReporter, FilenameBuilder_i * pFilenameBuilder )
|
|
|
{
|
|
|
- auto pIndexChecker = std::make_unique<DiskIndexChecker_c> ( *this, tReporter );
|
|
|
+ DiskIndexChecker_c tIndexChecker { *this, tReporter };
|
|
|
|
|
|
- pIndexChecker->Setup ( m_iDocinfo, m_iDocinfoIndex, m_iMinMaxIndex, m_bCheckIdDups );
|
|
|
+ tIndexChecker.Setup ( m_iDocinfo, m_iDocinfoIndex, m_iMinMaxIndex, m_bCheckIdDups );
|
|
|
|
|
|
// check if index is ready
|
|
|
if ( !m_bPassedAlloc )
|
|
|
tReporter.Fail ( "table not preread" );
|
|
|
|
|
|
- if ( !pIndexChecker->OpenFiles() )
|
|
|
+ if ( !tIndexChecker.OpenFiles() )
|
|
|
return 1;
|
|
|
|
|
|
- if ( !LoadHitlessWords ( m_tSettings.m_sHitlessFiles, m_pTokenizer, m_pDict, pIndexChecker->GetHitlessWords(), m_sLastError ) )
|
|
|
+ if ( !LoadHitlessWords ( m_tSettings.m_sHitlessFiles, m_pTokenizer, m_pDict, tIndexChecker.GetHitlessWords(), m_sLastError ) )
|
|
|
tReporter.Fail ( "unable to load hitless words: %s", m_sLastError.cstr() );
|
|
|
|
|
|
CSphSavedFile tStat;
|
|
|
@@ -11674,8 +11674,7 @@ int CSphIndex_VLN::DebugCheck ( DebugCheckError_i & tReporter, FilenameBuilder_i
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- pIndexChecker->Check();
|
|
|
-
|
|
|
+ tIndexChecker.Check();
|
|
|
tReporter.Done();
|
|
|
|
|
|
return (int)Min ( tReporter.GetNumFails(), 255 ); // this is the exitcode; so cap it
|
|
|
@@ -12252,30 +12251,6 @@ bool ParseMorphFields ( const CSphString & sMorphology, const CSphString & sMorp
|
|
|
return ( !sMissed.GetLength() );
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-bool SchemaConfigureCheckAttribute ( const CSphSchema & tSchema, const CSphColumnInfo & tCol, CSphString & sError )
|
|
|
-{
|
|
|
- if ( tCol.m_sName.IsEmpty() )
|
|
|
- {
|
|
|
- sError.SetSprintf ( "column number %d has no name", tCol.m_iIndex );
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if ( tSchema.GetAttr ( tCol.m_sName.cstr() ) )
|
|
|
- {
|
|
|
- sError.SetSprintf ( "can not add multiple attributes with same name '%s'", tCol.m_sName.cstr () );
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if ( CSphSchema::IsReserved ( tCol.m_sName.cstr() ) )
|
|
|
- {
|
|
|
- sError.SetSprintf ( "%s is not a valid attribute name", tCol.m_sName.cstr() );
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|