Skip to content

Commit

Permalink
rt_mem_limit is now saved in the index header; rt_mem_limit is now re…
Browse files Browse the repository at this point in the history
…configurable in rt mode
  • Loading branch information
glookka committed May 27, 2020
1 parent bcde09c commit 5813d63
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 58 deletions.
32 changes: 29 additions & 3 deletions src/searchd.cpp
Expand Up @@ -11819,6 +11819,25 @@ static const CSphSchema & GetSchemaForCreateTable ( CSphIndex * pIndex )
}


static CSphString BuildCreateTableRt ( const CSphString & sName, const CSphIndex * pIndex, const CSphSchema & tSchema )
{
assert(pIndex);

CSphString sCreateTable = BuildCreateTable ( sName, pIndex, tSchema );

// FIXME: create a separate struct (and move it to indexsettings.cpp) when there are more RT-specific settings
if ( pIndex->IsRT() )
{
auto * pRt = (RtIndex_i*)pIndex;
int64_t iMemLimit = pRt->GetMemLimit();
if ( iMemLimit!=DEFAULT_RT_MEM_LIMIT )
sCreateTable.SetSprintf ( "%s rt_mem_limit='" INT64_FMT "'", sCreateTable.cstr(), iMemLimit );
}

return sCreateTable;
}


static void HandleMysqlCreateTableLike ( RowBuffer_i & tOut, const SqlStmt_t & tStmt, CSphString & sWarning )
{
SearchFailuresLog_c dErrors;
Expand Down Expand Up @@ -11858,7 +11877,7 @@ static void HandleMysqlCreateTableLike ( RowBuffer_i & tOut, const SqlStmt_t & t

CSphString sCreateTable;
if ( pServed )
sCreateTable = BuildCreateTable ( tStmt.m_sIndex, pServed->m_pIndex, GetSchemaForCreateTable ( pServed->m_pIndex ) );
sCreateTable = BuildCreateTableRt ( tStmt.m_sIndex, pServed->m_pIndex, GetSchemaForCreateTable ( pServed->m_pIndex ) );
else
sCreateTable = BuildCreateTableDistr ( tStmt.m_sIndex, *pDist );

Expand Down Expand Up @@ -11924,7 +11943,7 @@ void HandleMysqlShowCreateTable ( RowBuffer_i & tOut, const SqlStmt_t & tStmt )
tOut.HeadTuplet ( "Table", "Create Table" );
CSphString sCreateTable;
if ( pServed )
sCreateTable = BuildCreateTable ( pServed->m_pIndex->GetName(), pServed->m_pIndex, GetSchemaForCreateTable ( pServed->m_pIndex ) );
sCreateTable = BuildCreateTableRt ( pServed->m_pIndex->GetName(), pServed->m_pIndex, GetSchemaForCreateTable ( pServed->m_pIndex ) );
else
sCreateTable = BuildCreateTableDistr ( tStmt.m_sIndex, *pDist );

Expand Down Expand Up @@ -14594,6 +14613,7 @@ static bool PrepareReconfigure ( const CSphString & sIndex, const CSphConfigSect
tSettings.m_tTokenizer.Setup ( hIndex, sWarning );
tSettings.m_tDict.Setup ( hIndex, pFilenameBuilder.Ptr(), sWarning );
tSettings.m_tFieldFilter.Setup ( hIndex, sWarning );
tSettings.m_iMemLimit = hIndex.GetSize64 ( "rt_mem_limit", DEFAULT_RT_MEM_LIMIT );

sphRTSchemaConfigure ( hIndex, tSettings.m_tSchema, sError, true );

Expand Down Expand Up @@ -14644,6 +14664,12 @@ static void HandleMysqlReconfigure ( RowBuffer_i & tOut, const SqlStmt_t & tStmt
{
MEMORY ( MEM_SQL_ALTER );

if ( IsConfigless() )
{
tOut.Error ( tStmt.m_sStmt, "ALTER RECONFIGURE is not supported in RT mode" );
return;
}

const CSphString & sIndex = tStmt.m_sIndex.cstr();
CSphString sError;
CSphReconfigureSettings tSettings;
Expand Down Expand Up @@ -17066,7 +17092,7 @@ ESphAddIndex AddRTIndex ( GuardedHash_c & dPost, const char * szIndexName, const
}

// RAM chunk size
int64_t iRamSize = hIndex.GetSize64 ( "rt_mem_limit", 128 * 1024 * 1024 );
int64_t iRamSize = hIndex.GetSize64 ( "rt_mem_limit", DEFAULT_RT_MEM_LIMIT );
if ( iRamSize<128 * 1024 )
{
sphWarning ( "index '%s': rt_mem_limit extremely low, using 128K instead", szIndexName );
Expand Down
4 changes: 3 additions & 1 deletion src/sphinxint.h
Expand Up @@ -1595,15 +1595,17 @@ struct CSphReconfigureSettings
CSphIndexSettings m_tIndex;
CSphFieldFilterSettings m_tFieldFilter;
CSphSchema m_tSchema;
int64_t m_iMemLimit = 0;
};

struct CSphReconfigureSetup
{
TokenizerRefPtr_c m_pTokenizer;
DictRefPtr_c m_pDict;
CSphIndexSettings m_tIndex;
CSphIndexSettings m_tIndex;
FieldFilterRefPtr_c m_pFieldFilter;
CSphSchema m_tSchema;
int64_t m_iMemLimit = 0;
};

uint64_t sphGetSettingsFNV ( const CSphIndexSettings & tSettings );
Expand Down
4 changes: 3 additions & 1 deletion src/sphinxpq.cpp
Expand Up @@ -144,6 +144,8 @@ class PercolateIndex_c : public PercolateIndex_i

const CSphSchema &GetMatchSchema () const override { return m_tMatchSchema; }

int64_t GetMemLimit() const final { return 0; }

private:
static const DWORD META_HEADER_MAGIC = 0x50535451; ///< magic 'PSTQ' header
static const DWORD META_VERSION = 8; ///< current version, new index format
Expand Down Expand Up @@ -2394,7 +2396,7 @@ bool PercolateIndex_c::IsSameSettings ( CSphReconfigureSettings & tSettings, CSp
bool bSameSchema = m_tSchema.CompareTo ( tSettings.m_tSchema, sTmp, false );

return CreateReconfigure ( m_sIndexName, IsStarDict ( m_pDict->GetSettings().m_bWordDict ), m_pFieldFilter, m_tSettings, m_pTokenizer->GetSettingsFNV(),
m_pDict->GetSettingsFNV(), m_pTokenizer->GetMaxCodepointLength(),
m_pDict->GetSettingsFNV(), m_pTokenizer->GetMaxCodepointLength(), GetMemLimit(),
bSameSchema, tSettings, tSetup, dWarnings, sError );
}

Expand Down
123 changes: 74 additions & 49 deletions src/sphinxrt.cpp
Expand Up @@ -1174,7 +1174,7 @@ class RtIndex_c final : public RtIndex_i, public ISphNoncopyable, public ISphWor

private:
static const DWORD META_HEADER_MAGIC = 0x54525053; ///< my magic 'SPRT' header
static const DWORD META_VERSION = 16; ///< current version
static const DWORD META_VERSION = 17; ///< current version

int m_iStride;
LazyVector_T<RtSegmentRefPtf_t> m_dRamChunks GUARDED_BY ( m_tChunkLock );
Expand Down Expand Up @@ -1237,6 +1237,8 @@ class RtIndex_c final : public RtIndex_i, public ISphNoncopyable, public ISphWor
RtSegment_t * MergeSegments ( const RtSegment_t * pSeg1, const RtSegment_t * pSeg2, bool bHasMorphology ) const;
void CopyWord ( RtSegment_t & tDst, const RtSegment_t & tSrc, RtDocWriter_t & tOutDoc, RtDocReader_t & tInDoc, RtWord_t & tWord, const CSphVector<RowID_t> & tRowMap ) const;

bool LoadMeta ( FilenameBuilder_i * pFilenameBuilder, bool bStripPath, DWORD & uVersion, bool & bRebuildInfixes );
bool LoadDiskChunks ( FilenameBuilder_i * pFilenameBuilder );
void SaveMeta ( int64_t iTID, const VecTraits_T<int> & dChunkNames );
void SaveDiskHeader ( SaveDiskDataContext_t & tCtx, const ChunkStats_t & tStats ) const;
void SaveDiskData ( const char * sFilename, const SphChunkGuard_t & tGuard, const ChunkStats_t & tStats ) const;
Expand Down Expand Up @@ -1276,6 +1278,7 @@ class RtIndex_c final : public RtIndex_i, public ISphNoncopyable, public ISphWor
bool MergeSegments ( CSphVector<RtSegmentRefPtf_t> & dSegments, bool bForceDump, int64_t iMemLimit, bool bHasNewSegment );
RtSegmentRefPtf_t MergeDoubleBufSegments ( CSphVector<RtSegmentRefPtf_t> & dSegments ) const;
bool NeedStoreWordID () const override;
int64_t GetMemLimit() const final { return m_iSoftRamLimit; }
};


Expand Down Expand Up @@ -3654,6 +3657,9 @@ void RtIndex_c::SaveMeta ( int64_t iTID, const VecTraits_T<int> & dChunkNames )
wrMeta.PutDword ( dChunkNames.GetLength () );
wrMeta.PutBytes ( dChunkNames.Begin(), dChunkNames.GetLengthBytes() );

// meta v.17+
wrMeta.PutOffset(m_iSoftRamLimit);

wrMeta.CloseFile();

// no need to remove old but good meta in case new meta failed to save
Expand Down Expand Up @@ -3822,41 +3828,8 @@ CSphIndex * RtIndex_c::LoadDiskChunk ( const char * sChunk, int iChunk, Filename
}


bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder )
bool RtIndex_c::LoadMeta ( FilenameBuilder_i * pFilenameBuilder, bool bStripPath, DWORD & uVersion, bool & bRebuildInfixes )
{
MEMORY ( MEM_INDEX_RT );

// locking uber alles
// in RT backend case, we just must be multi-threaded
// so we simply lock here, and ignore Lock/Unlock hassle caused by forks
assert ( m_iLockFD<0 );

CSphString sLock;
sLock.SetSprintf ( "%s.lock", m_sPath.cstr() );
m_iLockFD = ::open ( sLock.cstr(), SPH_O_NEW, 0644 );
if ( m_iLockFD<0 )
{
m_sLastError.SetSprintf ( "failed to open %s: %s", sLock.cstr(), strerrorm(errno) );
return false;
}

if ( !sphLockEx ( m_iLockFD, false ) )
{
if ( !m_bDebugCheck )
{
m_sLastError.SetSprintf ( "failed to lock %s: %s", sLock.cstr(), strerrorm(errno) );
SafeClose ( m_iLockFD );
return false;
} else
{
SafeClose ( m_iLockFD );
}
}

/////////////
// load meta
/////////////

// check if we have a meta file (kinda-header)
CSphString sMeta;
sMeta.SetSprintf ( "%s.meta", m_sPath.cstr() );
Expand All @@ -3875,7 +3848,8 @@ bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder
m_sLastError.SetSprintf ( "invalid meta file %s", sMeta.cstr() );
return false;
}
DWORD uVersion = rdMeta.GetDword();

uVersion = rdMeta.GetDword();
if ( uVersion==0 || uVersion>META_VERSION )
{
m_sLastError.SetSprintf ( "%s is v.%d, binary is v.%d", sMeta.cstr(), uVersion, META_VERSION );
Expand Down Expand Up @@ -3952,15 +3926,14 @@ bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder
m_iWordsCheckpoint = rdMeta.GetDword();

// check that infixes definition changed - going to rebuild infixes
bool bRebuildInfixes = false;
m_iMaxCodepointLength = rdMeta.GetDword();
int iBloomKeyLen = rdMeta.GetByte();
int iBloomHashesCount = rdMeta.GetByte();
bRebuildInfixes = ( iBloomKeyLen!=BLOOM_PER_ENTRY_VALS_COUNT || iBloomHashesCount!=BLOOM_HASHES_COUNT );

if ( bRebuildInfixes )
sphWarning ( "infix definition changed (from len=%d, hashes=%d to len=%d, hashes=%d) - rebuilding...",
(int)BLOOM_PER_ENTRY_VALS_COUNT, (int)BLOOM_HASHES_COUNT, iBloomKeyLen, iBloomHashesCount );
(int)BLOOM_PER_ENTRY_VALS_COUNT, (int)BLOOM_HASHES_COUNT, iBloomKeyLen, iBloomHashesCount );

FieldFilterRefPtr_c pFieldFilter;
CSphFieldFilterSettings tFieldFilterSettings;
Expand All @@ -3976,15 +3949,16 @@ bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder
int iLen = (int)rdMeta.GetDword();
m_dChunkNames.Reset ( iLen );
rdMeta.GetBytes ( m_dChunkNames.Begin(), iLen*sizeof(int) );
if ( m_bDebugCheck )
return true;

///////////////
// load chunks
///////////////
if ( uVersion>=17 )
m_iSoftRamLimit = rdMeta.GetOffset();

return true;
}

m_bPathStripped = bStripPath;

bool RtIndex_c::LoadDiskChunks ( FilenameBuilder_i * pFilenameBuilder )
{
// load disk chunks, if any
ARRAY_FOREACH ( iName, m_dChunkNames )
{
Expand Down Expand Up @@ -4012,7 +3986,55 @@ bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder
}
}

m_dChunkNames.Reset ( 0 );
m_dChunkNames.Reset(0);

return true;
}


bool RtIndex_c::Prealloc ( bool bStripPath, FilenameBuilder_i * pFilenameBuilder )
{
MEMORY ( MEM_INDEX_RT );

// locking uber alles
// in RT backend case, we just must be multi-threaded
// so we simply lock here, and ignore Lock/Unlock hassle caused by forks
assert ( m_iLockFD<0 );

CSphString sLock;
sLock.SetSprintf ( "%s.lock", m_sPath.cstr() );
m_iLockFD = ::open ( sLock.cstr(), SPH_O_NEW, 0644 );
if ( m_iLockFD<0 )
{
m_sLastError.SetSprintf ( "failed to open %s: %s", sLock.cstr(), strerrorm(errno) );
return false;
}

if ( !sphLockEx ( m_iLockFD, false ) )
{
if ( !m_bDebugCheck )
{
m_sLastError.SetSprintf ( "failed to lock %s: %s", sLock.cstr(), strerrorm(errno) );
SafeClose ( m_iLockFD );
return false;
} else
{
SafeClose ( m_iLockFD );
}
}

DWORD uVersion = 0;
bool bRebuildInfixes = false;
if ( !LoadMeta ( pFilenameBuilder, bStripPath, uVersion, bRebuildInfixes ) )
return false;

if ( m_bDebugCheck )
return true;

m_bPathStripped = bStripPath;

if ( !LoadDiskChunks ( pFilenameBuilder ) )
return false;

// load ram chunk
bool bRamLoaded = LoadRamChunk ( uVersion, bRebuildInfixes );
Expand Down Expand Up @@ -7830,7 +7852,7 @@ void RtIndex_c::GetStatus ( CSphIndexStatus * pRes ) const
//////////////////////////////////////////////////////////////////////////

bool CreateReconfigure ( const CSphString & sIndexName, bool bIsStarDict, const ISphFieldFilter * pFieldFilter,
const CSphIndexSettings & tIndexSettings, uint64_t uTokHash, uint64_t uDictHash, int iMaxCodepointLength,
const CSphIndexSettings & tIndexSettings, uint64_t uTokHash, uint64_t uDictHash, int iMaxCodepointLength, int64_t iMemLimit,
bool bSame, CSphReconfigureSettings & tSettings, CSphReconfigureSetup & tSetup, StrVec_t & dWarnings, CSphString & sError )
{
CreateFilenameBuilder_fn fnCreateFilenameBuilder = GetIndexFilenameBuilder();
Expand Down Expand Up @@ -7926,12 +7948,13 @@ bool CreateReconfigure ( const CSphString & sIndexName, bool bIsStarDict, const
// compare options
if ( !bSame || uTokHash!=pTokenizer->GetSettingsFNV() || uDictHash!=tDict->GetSettingsFNV() ||
iMaxCodepointLength!=pTokenizer->GetMaxCodepointLength() || sphGetSettingsFNV ( tIndexSettings )!=sphGetSettingsFNV ( tSettings.m_tIndex ) ||
!bReFilterSame || !bIcuSame )
!bReFilterSame || !bIcuSame || iMemLimit!=tSettings.m_iMemLimit )
{
tSetup.m_pTokenizer = pTokenizer.Leak();
tSetup.m_pDict = tDict.Leak();
tSetup.m_tIndex = tSettings.m_tIndex;
tSetup.m_pFieldFilter = tFieldFilter.Leak();
tSetup.m_iMemLimit = tSettings.m_iMemLimit;
return false;
}

Expand All @@ -7941,15 +7964,17 @@ bool CreateReconfigure ( const CSphString & sIndexName, bool bIsStarDict, const

bool RtIndex_c::IsSameSettings ( CSphReconfigureSettings & tSettings, CSphReconfigureSetup & tSetup, StrVec_t & dWarnings, CSphString & sError ) const
{
return CreateReconfigure ( m_sIndexName, IsStarDict ( m_bKeywordDict ), m_pFieldFilter, m_tSettings,
m_pTokenizer->GetSettingsFNV(), m_pDict->GetSettingsFNV(), m_pTokenizer->GetMaxCodepointLength(), true, tSettings, tSetup, dWarnings, sError );
return CreateReconfigure ( m_sIndexName, IsStarDict ( m_bKeywordDict ), m_pFieldFilter, m_tSettings, m_pTokenizer->GetSettingsFNV(), m_pDict->GetSettingsFNV(), m_pTokenizer->GetMaxCodepointLength(),
GetMemLimit(), true, tSettings, tSetup, dWarnings, sError );
}

bool RtIndex_c::Reconfigure ( CSphReconfigureSetup & tSetup )
{
if ( !ForceDiskChunk() )
return false;

m_iSoftRamLimit = tSetup.m_iMemLimit;

Setup ( tSetup.m_tIndex );
SetTokenizer ( tSetup.m_pTokenizer );
SetDictionary ( tSetup.m_pDict );
Expand Down
7 changes: 5 additions & 2 deletions src/sphinxrt.h
Expand Up @@ -25,6 +25,8 @@ struct CSphReconfigureSettings;
struct CSphReconfigureSetup;
class RtAccum_t;

const int64_t DEFAULT_RT_MEM_LIMIT = 128 * 1024 * 1024;


/// RAM based updateable backend interface
class RtIndex_i : public CSphIndex
Expand Down Expand Up @@ -96,7 +98,8 @@ class RtIndex_i : public CSphIndex
/// returns NULL if another index already uses it in an open txn
RtAccum_t * AcquireAccum ( CSphDict * pDict, RtAccum_t * pAccExt=nullptr, bool bWordDict=true, bool bSetTLS = true, CSphString * sError=nullptr );

virtual bool NeedStoreWordID () const = 0;
virtual bool NeedStoreWordID () const = 0;
virtual int64_t GetMemLimit() const = 0;
};

/// initialize subsystem
Expand Down Expand Up @@ -359,7 +362,7 @@ void SetupExactDict ( DictRefPtr_c &pDict, ISphTokenizer * pTokenizer, bool bAdd
void SetupStarDict ( DictRefPtr_c &pDict, ISphTokenizer * pTokenizer );

bool CreateReconfigure ( const CSphString & sIndexName, bool bIsStarDict, const ISphFieldFilter * pFieldFilter,
const CSphIndexSettings & tIndexSettings, uint64_t uTokHash, uint64_t uDictHash, int iMaxCodepointLength,
const CSphIndexSettings & tIndexSettings, uint64_t uTokHash, uint64_t uDictHash, int iMaxCodepointLength, int64_t iMemLimit,
bool bSame, CSphReconfigureSettings & tSettings, CSphReconfigureSetup & tSetup, StrVec_t & dWarnings, CSphString & sError );

// Get global flag of w-available RT
Expand Down
10 changes: 8 additions & 2 deletions test/test_405/model.bin
@@ -1,2 +1,8 @@
a:1:{i:0;a:14:{i:0;a:2:{s:8:"sphinxql";s:46:"create table test1 ( title text, tag integer )";s:14:"total_affected";i:0;}i:1;a:2:{s:8:"sphinxql";s:45:"insert into test1 values (1, 'word form', 11)";s:14:"total_affected";i:1;}i:2;a:2:{s:8:"sphinxql";s:46:"select * from test1 where match ( 'wordform' )";s:10:"total_rows";i:0;}i:3;a:2:{s:8:"sphinxql";s:45:"alter table test1 wordforms = 'wordforms.txt'";s:14:"total_affected";i:0;}i:4;a:2:{s:8:"sphinxql";s:45:"insert into test1 values (2, 'word form', 11)";s:14:"total_affected";i:1;}i:5;a:3:{s:8:"sphinxql";s:46:"select * from test1 where match ( 'wordform' )";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:3:{s:2:"id";s:1:"2";s:3:"tag";s:2:"11";s:5:"title";s:9:"word form";}}}i:6;a:2:{s:8:"sphinxql";s:64:"CREATE TABLE test11 (title TEXT, category INT) min_infix_len='4'";s:14:"total_affected";i:0;}i:7;a:2:{s:8:"sphinxql";s:31:"CREATE TABLE test12 LIKE test11";s:14:"total_affected";i:0;}i:8;a:2:{s:8:"sphinxql";s:35:"ALTER TABLE test11 ignore_chars='.'";s:14:"total_affected";i:0;}i:9;a:3:{s:8:"sphinxql";s:26:"SHOW INDEX test11 SETTINGS";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:13:"Variable_name";s:8:"settings";s:5:"Value";s:34:"min_infix_len = 4
ignore_chars = .";}}}i:10;a:3:{s:8:"sphinxql";s:26:"SHOW INDEX test12 SETTINGS";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:13:"Variable_name";s:8:"settings";s:5:"Value";s:17:"min_infix_len = 4";}}}i:11;a:2:{s:8:"sphinxql";s:16:"drop table test1";s:14:"total_affected";i:0;}i:12;a:2:{s:8:"sphinxql";s:17:"drop table test11";s:14:"total_affected";i:0;}i:13;a:2:{s:8:"sphinxql";s:17:"drop table test12";s:14:"total_affected";i:0;}}}
a:1:{i:0;a:23:{i:0;a:2:{s:8:"sphinxql";s:46:"create table test1 ( title text, tag integer )";s:14:"total_affected";i:0;}i:1;a:2:{s:8:"sphinxql";s:45:"insert into test1 values (1, 'word form', 11)";s:14:"total_affected";i:1;}i:2;a:2:{s:8:"sphinxql";s:46:"select * from test1 where match ( 'wordform' )";s:10:"total_rows";i:0;}i:3;a:2:{s:8:"sphinxql";s:45:"alter table test1 wordforms = 'wordforms.txt'";s:14:"total_affected";i:0;}i:4;a:2:{s:8:"sphinxql";s:45:"insert into test1 values (2, 'word form', 11)";s:14:"total_affected";i:1;}i:5;a:3:{s:8:"sphinxql";s:46:"select * from test1 where match ( 'wordform' )";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:3:{s:2:"id";s:1:"2";s:3:"tag";s:2:"11";s:5:"title";s:9:"word form";}}}i:6;a:2:{s:8:"sphinxql";s:64:"CREATE TABLE test11 (title TEXT, category INT) min_infix_len='4'";s:14:"total_affected";i:0;}i:7;a:2:{s:8:"sphinxql";s:31:"CREATE TABLE test12 LIKE test11";s:14:"total_affected";i:0;}i:8;a:2:{s:8:"sphinxql";s:35:"ALTER TABLE test11 ignore_chars='.'";s:14:"total_affected";i:0;}i:9;a:3:{s:8:"sphinxql";s:26:"SHOW INDEX test11 SETTINGS";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:13:"Variable_name";s:8:"settings";s:5:"Value";s:34:"min_infix_len = 4
ignore_chars = .";}}}i:10;a:3:{s:8:"sphinxql";s:26:"SHOW INDEX test12 SETTINGS";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:13:"Variable_name";s:8:"settings";s:5:"Value";s:17:"min_infix_len = 4";}}}i:11;a:2:{s:8:"sphinxql";s:16:"drop table test1";s:14:"total_affected";i:0;}i:12;a:2:{s:8:"sphinxql";s:17:"drop table test11";s:14:"total_affected";i:0;}i:13;a:2:{s:8:"sphinxql";s:17:"drop table test12";s:14:"total_affected";i:0;}i:14;a:2:{s:8:"sphinxql";s:49:"CREATE TABLE test1 (title text) rt_mem_limit='2G'";s:14:"total_affected";i:0;}i:15;a:2:{s:8:"sphinxql";s:29:"CREATE TABLE test2 LIKE test1";s:14:"total_affected";i:0;}i:16;a:3:{s:8:"sphinxql";s:23:"SHOW CREATE TABLE test1";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:5:"Table";s:5:"test1";s:12:"Create Table";s:59:"CREATE TABLE test1 (
title text
) rt_mem_limit='2147483648'";}}}i:17;a:3:{s:8:"sphinxql";s:23:"SHOW CREATE TABLE test2";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:5:"Table";s:5:"test2";s:12:"Create Table";s:59:"CREATE TABLE test2 (
title text
) rt_mem_limit='2147483648'";}}}i:18;a:2:{s:8:"sphinxql";s:35:"ALTER TABLE test1 rt_mem_limit='1G'";s:14:"total_affected";i:0;}i:19;a:3:{s:8:"sphinxql";s:23:"SHOW CREATE TABLE test1";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:2:{s:5:"Table";s:5:"test1";s:12:"Create Table";s:59:"CREATE TABLE test1 (
title text
) rt_mem_limit='1073741824'";}}}i:20;a:2:{s:8:"sphinxql";s:16:"drop table test1";s:14:"total_affected";i:0;}i:21;a:2:{s:8:"sphinxql";s:16:"drop table test2";s:14:"total_affected";i:0;}i:22;a:3:{s:8:"sphinxql";s:29:"ALTER TABLE test1 RECONFIGURE";s:5:"error";s:45:"ALTER RECONFIGURE is not supported in RT mode";s:5:"errno";i:1064;}}}

0 comments on commit 5813d63

Please sign in to comment.