update to sphinx (search) 2.2.11

This commit is contained in:
sthen 2020-11-20 14:18:21 +00:00
parent f4a0c4cdbc
commit f7bff3aa66
16 changed files with 41 additions and 1907 deletions

View File

@ -1,18 +1,17 @@
# $OpenBSD: Makefile,v 1.28 2019/07/12 20:50:15 sthen Exp $
# $OpenBSD: Makefile,v 1.29 2020/11/20 14:18:21 sthen Exp $
COMMENT = free open-source SQL full-text search engine
BROKEN-hppa = internal compiler error: internal consistency failure
# Note: this is not Sphinx (the Python documentation generator) -
# see also textproc/py-sphinx.
# see textproc/py-sphinx.
VERSION = 2.2.9
VERSION = 2.2.11
DISTNAME = sphinx-${VERSION}-release
PKGNAME = sphinx-${VERSION}
CATEGORIES = textproc
REVISION = 2
HOMEPAGE = http://www.sphinxsearch.com/
HOMEPAGE = https://www.sphinxsearch.com/
# GPLv2+
PERMIT_PACKAGE = Yes
@ -21,7 +20,7 @@ WANTLIB = c expat iconv m pthread ${COMPILER_LIBCXX} z
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES = ${HOMEPAGE}/files/
MASTER_SITES = ${HOMEPAGE}files/
MODULES = lang/php
@ -51,13 +50,14 @@ WANTLIB += pq
.else
CONFIGURE_ARGS += --with-mysql
LIB_DEPENDS += databases/mariadb
WANTLIB += crypto ssl mariadb
WANTLIB += mariadb
.endif
# Needs php with mysqli setup and mariadb listening on 127.0.0.1.
# Needs php with mysqli setup, mariadb listening on 127.0.0.1, and maybe
# a database named "test" pre-created.
TEST_IS_INTERACTIVE = Yes
TEST_DEPENDS = lang/php/${MODPHP_VERSION},-mysql \
TEST_DEPENDS = lang/php/${MODPHP_VERSION} \
lang/php/${MODPHP_VERSION},-mysqli \
databases/mariadb,-server
MAKE_ENV = MODPHP_BIN=${MODPHP_BIN}

View File

@ -1,2 +1,2 @@
SHA256 (sphinx-2.2.9-release.tar.gz) = eby5/KBpumMP1x+0D7oFuxbhm0dZBvtq4CYzTVCmvzo=
SIZE (sphinx-2.2.9-release.tar.gz) = 2992905
SHA256 (sphinx-2.2.11-release.tar.gz) = ZmIDnwkzFPiWlQUZ+ngbyHYQ+Sb2Sz00kikALwasQak=
SIZE (sphinx-2.2.11-release.tar.gz) = 3061998

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-Makefile_in,v 1.4 2015/06/22 08:00:07 jasper Exp $
--- Makefile.in.orig Wed Nov 20 14:49:43 2013
+++ Makefile.in Fri Jun 19 10:39:57 2015
$OpenBSD: patch-Makefile_in,v 1.5 2020/11/20 14:18:22 sthen Exp $
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
@@ -304,15 +304,15 @@ sphinx-min.conf.dist: $(top_builddir)/config.status $(
cd $(top_builddir) && $(SHELL) ./config.status $@
install-sysconfDATA: $(sysconf_DATA)

View File

@ -1,6 +1,9 @@
--- configure.orig Mon Mar 9 19:53:05 2015
+++ configure Fri Jun 19 10:40:54 2015
@@ -8338,11 +8338,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
$OpenBSD: patch-configure,v 1.5 2020/11/20 14:18:22 sthen Exp $
Index: configure
--- configure.orig
+++ configure
@@ -8342,11 +8342,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
@ -14,7 +17,7 @@
;
return 0;
}
@@ -8407,7 +8407,7 @@ main ()
@@ -8411,7 +8411,7 @@ main ()
{
const char * inbuf;
iconv_t cd;

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_indexer_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
Index: src/indexer.cpp
--- src/indexer.cpp.orig
+++ src/indexer.cpp
@@ -1291,7 +1291,7 @@ bool DoIndex ( const CSphConfigSection & hIndex, const
iTotalBytes += tSource.m_iTotalBytes;
}
- fprintf ( stdout, "total "INT64_FMT" docs, "INT64_FMT" bytes\n", iTotalDocs, iTotalBytes );
+ fprintf ( stdout, "total " INT64_FMT " docs, " INT64_FMT " bytes\n", iTotalDocs, iTotalBytes );
fprintf ( stdout, "total %d.%03d sec, %d bytes/sec, %d.%02d docs/sec\n",
(int)(tmTime/1000000), (int)(tmTime%1000000)/1000, // sec

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-src_indextool_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
Index: src/indextool.cpp
--- src/indextool.cpp.orig
+++ src/indextool.cpp
@@ -490,7 +490,7 @@ bool BuildIDF ( const CSphString & sFilename, const CS
break;
}
- fprintf ( stdout, INT64_FMT" documents, "INT64_FMT" words ("INT64_FMT" read, "INT64_FMT" merged, "INT64_FMT" skipped)\n",
+ fprintf ( stdout, INT64_FMT " documents, " INT64_FMT " words (" INT64_FMT" read, " INT64_FMT " merged, " INT64_FMT " skipped)\n",
iTotalDocuments, iTotalWords, iReadWords, iMergedWords, iSkippedWords );
// write to disk
@@ -643,7 +643,7 @@ bool MergeIDF ( const CSphString & sFilename, const CS
ARRAY_FOREACH ( i, dFiles )
SafeDeleteArray ( dBuffers[i] );
- fprintf ( stdout, INT64_FMT" documents, "INT64_FMT" words ("INT64_FMT" read, "INT64_FMT" merged, "INT64_FMT" skipped)\n",
+ fprintf ( stdout, INT64_FMT " documents, " INT64_FMT " words (" INT64_FMT " read, " INT64_FMT " merged, " INT64_FMT " skipped)\n",
iTotalDocuments, iTotalWords, iReadWords, iMergedWords, iSkippedWords );
int tmWallMsec = (int)( ( sphMicroTimer() - tmStart )/1000 );
@@ -1170,7 +1170,7 @@ int main ( int argc, char ** argv )
fprintf ( stdout, "dumping dictionary for index '%s'...\n", sIndex.cstr() );
if ( bStats )
- fprintf ( stdout, "total-documents: "INT64_FMT"\n", pIndex->GetStats().m_iTotalDocuments );
+ fprintf ( stdout, "total-documents: " INT64_FMT "\n", pIndex->GetStats().m_iTotalDocuments );
pIndex->DebugDumpDict ( stdout );
break;
}

View File

@ -1,274 +0,0 @@
$OpenBSD: patch-src_searchd_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
Index: src/searchd.cpp
--- src/searchd.cpp.orig
+++ src/searchd.cpp
@@ -3927,7 +3927,7 @@ struct MetaAgentDesc_t (public)
// only one node with lowest error rating. Return it.
if ( !dCandidates.GetLength() )
{
- sphLogDebug ( "HA selected %d node with best num of errors a row ("INT64_FMT")", iBestAgent, iErrARow );
+ sphLogDebug ( "HA selected %d node with best num of errors a row (" INT64_FMT ")", iBestAgent, iErrARow );
return &m_dAgents[iBestAgent];
}
@@ -3940,7 +3940,7 @@ struct MetaAgentDesc_t (public)
{
const HostDashboard_t & dDash = GetCommonStat ( iBestAgent );
fAge = ( dDash.m_iLastAnswerTime-dDash.m_iLastQueryTime ) / 1000.0f;
- sLogStr = "HA selected %d node by weighted random, with best EaR ("INT64_FMT"), last answered in %f milliseconds";
+ sLogStr = "HA selected %d node by weighted random, with best EaR (" INT64_FMT "), last answered in %f milliseconds";
}
sphLogDebug ( sLogStr, iBestAgent, iErrARow, fAge );
@@ -6935,7 +6935,7 @@ void LogQueryPlain ( const CSphQuery & tQuery, const C
// [matchmode/numfilters/sortmode matches (offset,limit)
static const char * sModes [ SPH_MATCH_TOTAL ] = { "all", "any", "phr", "bool", "ext", "scan", "ext2" };
static const char * sSort [ SPH_SORT_TOTAL ] = { "rel", "attr-", "attr+", "tsegs", "ext", "expr" };
- tBuf.Appendf ( " [%s/%d/%s "INT64_FMT" (%d,%d)",
+ tBuf.Appendf ( " [%s/%d/%s " INT64_FMT " (%d,%d)",
sModes [ tQuery.m_eMode ], tQuery.m_dFilters.GetLength(), sSort [ tQuery.m_eSort ],
tRes.m_iTotalMatches, tQuery.m_iOffset, tQuery.m_iLimit );
@@ -7045,10 +7045,10 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
tBuf += sTimeBuf;
if ( tRes.m_iMultiplier>1 )
- tBuf.Appendf ( " conn %d real %d.%03d wall %d.%03d x%d found "INT64_FMT" *""/ ",
+ tBuf.Appendf ( " conn %d real %d.%03d wall %d.%03d x%d found " INT64_FMT " *""/ ",
iCid, iRealTime/1000, iRealTime%1000, iQueryTime/1000, iQueryTime%1000, tRes.m_iMultiplier, tRes.m_iTotalMatches );
else
- tBuf.Appendf ( " conn %d real %d.%03d wall %d.%03d found "INT64_FMT" *""/ ",
+ tBuf.Appendf ( " conn %d real %d.%03d wall %d.%03d found " INT64_FMT " *""/ ",
iCid, iRealTime/1000, iRealTime%1000, iQueryTime/1000, iQueryTime%1000, tRes.m_iTotalMatches );
///////////////////////////////////
@@ -7089,9 +7089,9 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
if ( f.m_dValues.GetLength()==1 )
{
if ( f.m_bExclude )
- tBuf.Appendf ( " %s!="INT64_FMT, f.m_sAttrName.cstr(), (int64_t)f.m_dValues[0] );
+ tBuf.Appendf ( " %s!=" INT64_FMT, f.m_sAttrName.cstr(), (int64_t)f.m_dValues[0] );
else
- tBuf.Appendf ( " %s="INT64_FMT, f.m_sAttrName.cstr(), (int64_t)f.m_dValues[0] );
+ tBuf.Appendf ( " %s=" INT64_FMT, f.m_sAttrName.cstr(), (int64_t)f.m_dValues[0] );
} else
{
if ( f.m_bExclude )
@@ -7106,7 +7106,7 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
for ( int j=0; j<iLimit; ++j )
{
if ( j )
- tBuf.Appendf ( ","INT64_FMT, (int64_t)f.m_dValues[j] );
+ tBuf.Appendf ( "," INT64_FMT, (int64_t)f.m_dValues[j] );
else
tBuf.Appendf ( INT64_FMT, (int64_t)f.m_dValues[j] );
}
@@ -7115,7 +7115,7 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
for ( int j=iLimit-3; j<iLimit; ++j )
{
if ( j )
- tBuf.Appendf ( ","INT64_FMT, (int64_t)f.m_dValues[j] );
+ tBuf.Appendf ( "," INT64_FMT, (int64_t)f.m_dValues[j] );
else
tBuf.Appendf ( INT64_FMT, (int64_t)f.m_dValues[j] );
}
@@ -7124,7 +7124,7 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
ARRAY_FOREACH ( j, f.m_dValues )
{
if ( j )
- tBuf.Appendf ( ","INT64_FMT, (int64_t)f.m_dValues[j] );
+ tBuf.Appendf ( "," INT64_FMT, (int64_t)f.m_dValues[j] );
else
tBuf.Appendf ( INT64_FMT, (int64_t)f.m_dValues[j] );
}
@@ -7137,17 +7137,17 @@ static void LogQuerySphinxql ( const CSphQuery & q, co
{
// no min, thus (attr<maxval)
const char * sOps[2][2] = { { "<", "<=" }, { ">=", ">" } };
- tBuf.Appendf ( " %s%s"INT64_FMT, f.m_sAttrName.cstr(),
+ tBuf.Appendf ( " %s%s" INT64_FMT, f.m_sAttrName.cstr(),
sOps [ f.m_bExclude ][ f.m_bHasEqual ], f.m_iMaxValue );
} else if ( f.m_iMaxValue==INT64_MAX || ( f.m_iMaxValue==-1 && f.m_sAttrName=="@id" ) )
{
// mo max, thus (attr>minval)
const char * sOps[2][2] = { { ">", ">=" }, { "<", "<=" } };
- tBuf.Appendf ( " %s%s"INT64_FMT, f.m_sAttrName.cstr(),
+ tBuf.Appendf ( " %s%s" INT64_FMT, f.m_sAttrName.cstr(),
sOps [ f.m_bExclude ][ f.m_bHasEqual ], f.m_iMinValue );
} else
{
- tBuf.Appendf ( " %s%s BETWEEN "INT64_FMT" AND "INT64_FMT,
+ tBuf.Appendf ( " %s%s BETWEEN " INT64_FMT " AND " INT64_FMT,
f.m_sAttrName.cstr(), f.m_bExclude ? " NOT" : "",
f.m_iMinValue + !f.m_bHasEqual, f.m_iMaxValue - !f.m_bHasEqual );
}
@@ -14320,7 +14320,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
DWORD uServer = htonl ( SPHINX_SEARCHD_PROTO );
if ( sphSockSend ( iSock, (char*)&uServer, sizeof(DWORD) )!=sizeof(DWORD) )
{
- sphWarning ( "failed to send server version (client=%s("INT64_FMT"))", sClientIP, iCID );
+ sphWarning ( "failed to send server version (client=%s(" INT64_FMT "))", sClientIP, iCID );
return;
}
@@ -14328,10 +14328,10 @@ void HandleClientSphinx ( int iSock, const char * sCli
tBuf.ReadFrom ( 4 ); // FIXME! magic
int iMagic = tBuf.GetInt (); // client version is for now unused
- sphLogDebugv ( "conn %s("INT64_FMT"): got handshake, major v.%d, err %d", sClientIP, iCID, iMagic, (int)tBuf.GetError() );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): got handshake, major v.%d, err %d", sClientIP, iCID, iMagic, (int)tBuf.GetError() );
if ( tBuf.GetError() )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): exiting on handshake error", sClientIP, iCID );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): exiting on handshake error", sClientIP, iCID );
return;
}
@@ -14350,14 +14350,14 @@ void HandleClientSphinx ( int iSock, const char * sCli
// on SIGTERM, bail unconditionally and immediately, at all times
if ( !bCommand && g_bGotSigterm )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing on SIGTERM", sClientIP, iCID );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing on SIGTERM", sClientIP, iCID );
break;
}
// on SIGHUP vs pconn, bail if a pconn was idle for 1 sec
if ( bPersist && !bCommand && g_bGotSighup && sphSockPeekErrno()==ETIMEDOUT )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing idle pconn on SIGHUP", sClientIP, iCID );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing idle pconn on SIGHUP", sClientIP, iCID );
break;
}
@@ -14367,7 +14367,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
iPconnIdle += iTimeout;
if ( iPconnIdle>=g_iClientTimeout )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing idle pconn on client_timeout", sClientIP, iCID );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing idle pconn on client_timeout", sClientIP, iCID );
break;
}
continue;
@@ -14391,7 +14391,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
// lets avoid agent log flood
//
// sphWarning ( "failed to receive client version and request (client=%s, error=%s)", sClientIP, sphSockError() );
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing on failed request header (sockerr=%s)", sClientIP, iCID, sphSockError() );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing on failed request header (sockerr=%s)", sClientIP, iCID, sphSockError() );
if ( bPersist )
DecPersCount();
return;
@@ -14425,7 +14425,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
assert ( iLength>=0 && iLength<=g_iMaxPacketSize );
if ( iLength && !tBuf.ReadFrom ( iLength ) )
{
- sphWarning ( "failed to receive client request body (client=%s("INT64_FMT"), exp=%d, error='%s')",
+ sphWarning ( "failed to receive client request body (client=%s(" INT64_FMT "), exp=%d, error='%s')",
sClientIP, iCID, iLength, sphSockError() );
if ( bPersist )
@@ -14450,7 +14450,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
pThd->m_sCommand = g_dApiCommands[iCommand];
THD_STATE ( THD_QUERY );
- sphLogDebugv ( "conn %s("INT64_FMT"): got command %d, handling", sClientIP, iCID, iCommand );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): got command %d, handling", sClientIP, iCID, iCommand );
switch ( iCommand )
{
case SEARCHD_COMMAND_SEARCH: HandleCommandSearch ( iSock, iCommandVer, tBuf, pThd ); break;
@@ -14461,7 +14461,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
{
bPersist = ( tBuf.GetInt()!=0 );
iTimeout = 1;
- sphLogDebugv ( "conn %s("INT64_FMT"): pconn is now %s", sClientIP, iCID, bPersist ? "on" : "off" );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): pconn is now %s", sClientIP, iCID, bPersist ? "on" : "off" );
CSphScopedLockedShare<InterWorkerStorage> dPersNum ( *g_pPersistentInUse );
DWORD uMaxChildren = (g_eWorkers==MPM_PREFORK)?g_iPreforkChildren:g_iMaxChildren;
DWORD& uPers = dPersNum.SharedValue<DWORD>();
@@ -14493,7 +14493,7 @@ void HandleClientSphinx ( int iSock, const char * sCli
if ( bPersist )
DecPersCount();
- sphLogDebugv ( "conn %s("INT64_FMT"): exiting", sClientIP, iCID );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): exiting", sClientIP, iCID );
}
//////////////////////////////////////////////////////////////////////////
@@ -18437,7 +18437,7 @@ static void HandleClientMySQL ( int iSock, const char
if ( sphSockSend ( iSock, g_sMysqlHandshake, g_iMysqlHandshake )!=g_iMysqlHandshake )
{
int iErrno = sphSockGetErrno ();
- sphWarning ( "failed to send server version (client=%s("INT64_FMT"), error: %d '%s')", sClientIP, iCID, iErrno, sphSockError ( iErrno ) );
+ sphWarning ( "failed to send server version (client=%s(" INT64_FMT "), error: %d '%s')", sClientIP, iCID, iErrno, sphSockError ( iErrno ) );
return;
}
@@ -18460,7 +18460,7 @@ static void HandleClientMySQL ( int iSock, const char
THD_STATE ( THD_NET_IDLE );
if ( !tIn.ReadFrom ( 4, INTERACTIVE_TIMEOUT, true ) )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing on failed MySQL header (sockerr=%s)", sClientIP, iCID, sphSockError() );
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing on failed MySQL header (sockerr=%s)", sClientIP, iCID, sphSockError() );
break;
}
@@ -18480,7 +18480,7 @@ static void HandleClientMySQL ( int iSock, const char
int iPacketLen = ( uPacketHeader & MAX_PACKET_LEN );
if ( !tIn.ReadFrom ( iPacketLen, INTERACTIVE_TIMEOUT, true ) )
{
- sphWarning ( "failed to receive MySQL request body (client=%s("INT64_FMT"), exp=%d, error='%s')",
+ sphWarning ( "failed to receive MySQL request body (client=%s(" INT64_FMT "), exp=%d, error='%s')",
sClientIP, iCID, iPacketLen, sphSockError() );
break;
}
@@ -18500,7 +18500,7 @@ static void HandleClientMySQL ( int iSock, const char
{
if ( !tIn2.ReadFrom ( 4, INTERACTIVE_TIMEOUT, true ) )
{
- sphLogDebugv ( "conn %s("INT64_FMT"): bailing on failed MySQL header2 (sockerr=%s)",
+ sphLogDebugv ( "conn %s(" INT64_FMT "): bailing on failed MySQL header2 (sockerr=%s)",
sClientIP, iCID, sphSockError() );
break;
}
@@ -18510,7 +18510,7 @@ static void HandleClientMySQL ( int iSock, const char
iAddonLen = ( uAddon & MAX_PACKET_LEN );
if ( !tIn.ReadFrom ( iAddonLen, INTERACTIVE_TIMEOUT, true, true ) )
{
- sphWarning ( "failed to receive MySQL request body2 (client=%s("INT64_FMT"), exp=%d, error='%s')",
+ sphWarning ( "failed to receive MySQL request body2 (client=%s(" INT64_FMT "), exp=%d, error='%s')",
sClientIP, iCID, iAddonLen, sphSockError() );
iAddonLen = -1;
break;
@@ -19446,10 +19446,10 @@ static void SphinxqlStateThreadFunc ( void * )
ARRAY_FOREACH_COND ( i, dUservars, tmLast==g_tmSphinxqlState )
{
const CSphVector<SphAttr_t> & dVals = *dUservars[i].m_pVal;
- int iLen = snprintf ( dBuf, sizeof ( dBuf ), "SET GLOBAL %s = ( "INT64_FMT, dUservars[i].m_sName.cstr(), dVals[0] );
+ int iLen = snprintf ( dBuf, sizeof ( dBuf ), "SET GLOBAL %s = ( " INT64_FMT, dUservars[i].m_sName.cstr(), dVals[0] );
for ( int j=1; j<dVals.GetLength(); j++ )
{
- iLen += snprintf ( dBuf+iLen, sizeof ( dBuf ), ", "INT64_FMT, dVals[j] );
+ iLen += snprintf ( dBuf+iLen, sizeof ( dBuf ), ", " INT64_FMT, dVals[j] );
if ( iLen>=iMaxString && j<dVals.GetLength()-1 )
{
@@ -19966,7 +19966,7 @@ bool ValidateAgentDesc ( MetaAgentDesc_t & tAgent, con
g_tStatsMutex.Lock();
pAgent->m_iStatsIndex = g_pStats->m_dAgentStats.AllocItem();
if ( pAgent->m_iStatsIndex<0 )
- sphWarning ( "index '%s': agent '%s': failed to allocate slot for stats",
+ sphWarning ( "index '%s': agent '%s': failed to allocate slot for stats%s",
szIndexName, pLine->cstr(), ( tAgent.IsHA() ? ", HA might be wrong" : "" ) );
if ( g_pStats->m_hDashBoard.Exists ( sHashKey ) )
@@ -19978,7 +19978,7 @@ bool ValidateAgentDesc ( MetaAgentDesc_t & tAgent, con
pAgent->m_iDashIndex = g_pStats->m_dDashboard.AllocItem();
if ( pAgent->m_iDashIndex<0 )
{
- sphWarning ( "index '%s': agent '%s': failed to allocate slot for stat-dashboard",
+ sphWarning ( "index '%s': agent '%s': failed to allocate slot for stat-dashboard%s",
szIndexName, pLine->cstr(), ( tAgent.IsHA() ? ", HA might be wrong" : "" ) );
} else
{

View File

@ -1,844 +1,9 @@
$OpenBSD: patch-src_sphinx_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
$OpenBSD: patch-src_sphinx_cpp,v 1.2 2020/11/20 14:18:22 sthen Exp $
Index: src/sphinx.cpp
--- src/sphinx.cpp.orig
+++ src/sphinx.cpp
@@ -468,7 +468,7 @@ SphOffset_t CSphAutofile::GetSize ( SphOffset_t iMinSi
}
if ( st.st_size<iMinSize )
{
- sError.SetSprintf ( "failed to load %s: bad size "INT64_FMT" (at least "INT64_FMT" bytes expected)",
+ sError.SetSprintf ( "failed to load %s: bad size " INT64_FMT " (at least " INT64_FMT " bytes expected)",
GetFilename(), (int64_t)st.st_size, (int64_t)iMinSize );
return -1;
}
@@ -477,7 +477,7 @@ SphOffset_t CSphAutofile::GetSize ( SphOffset_t iMinSi
size_t uCheck = (size_t)st.st_size;
if ( st.st_size!=SphOffset_t(uCheck) )
{
- sError.SetSprintf ( "failed to load %s: bad size "INT64_FMT" (out of size_t; 4 GB limit on 32-bit machine hit?)",
+ sError.SetSprintf ( "failed to load %s: bad size " INT64_FMT " (out of size_t; 4 GB limit on 32-bit machine hit?)",
GetFilename(), (int64_t)st.st_size );
return -1;
}
@@ -510,7 +510,7 @@ bool CSphAutofile::Read ( void * pBuf, int64_t iCount,
if ( errno==EINTR )
continue;
- sError.SetSprintf ( "read error in %s (%s); "INT64_FMT" of "INT64_FMT" bytes read",
+ sError.SetSprintf ( "read error in %s (%s); " INT64_FMT " of " INT64_FMT " bytes read",
GetFilename(), strerror(errno), iCount-iToRead, iCount );
return false;
}
@@ -518,7 +518,7 @@ bool CSphAutofile::Read ( void * pBuf, int64_t iCount,
// EOF
if ( iGot==0 )
{
- sError.SetSprintf ( "unexpected EOF in %s (%s); "INT64_FMT" of "INT64_FMT" bytes read",
+ sError.SetSprintf ( "unexpected EOF in %s (%s); " INT64_FMT " of " INT64_FMT " bytes read",
GetFilename(), strerror(errno), iCount-iToRead, iCount );
return false;
}
@@ -535,7 +535,7 @@ bool CSphAutofile::Read ( void * pBuf, int64_t iCount,
if ( iToRead!=0 )
{
- sError.SetSprintf ( "read error in %s (%s); "INT64_FMT" of "INT64_FMT" bytes read",
+ sError.SetSprintf ( "read error in %s (%s); " INT64_FMT " of " INT64_FMT " bytes read",
GetFilename(), strerror(errno), iCount-iToRead, iCount );
return false;
}
@@ -8168,7 +8168,7 @@ void CSphReader::UpdateCache ()
{
m_iBuffUsed = m_iBuffPos = 0;
m_bError = true;
- m_sError.SetSprintf ( "pread error in %s: pos="INT64_FMT", len=%d, code=%d, msg=%s",
+ m_sError.SetSprintf ( "pread error in %s: pos=" INT64_FMT ", len=%d, code=%d, msg=%s",
m_sFilename.cstr(), (int64_t)iNewPos, iReadLen, errno, strerror(errno) );
if ( m_pProfile )
m_pProfile->Switch ( eOld );
@@ -8749,7 +8749,7 @@ int CSphBin::ReadHit ( CSphAggregateHit * pOut, int iR
// FIXME?! move this under PARANOID or something?
// or just introduce an assert() checked release build?
if ( uDelta>=sizeof(m_sKeyword) )
- sphDie ( "INTERNAL ERROR: corrupted keyword length (len="UINT64_FMT", deltapos="UINT64_FMT")",
+ sphDie ( "INTERNAL ERROR: corrupted keyword length (len=" UINT64_FMT ", deltapos=" UINT64_FMT ")",
(uint64_t)uDelta, (uint64_t)(m_iFilePos-m_iLeft) );
#else
assert ( uDelta>0 && uDelta<sizeof(m_sKeyword)-1 );
@@ -9870,7 +9870,7 @@ int CSphIndex_VLN::UpdateAttributes ( const CSphAttrUp
}
if ( ( tCol.m_eAttrType==SPH_ATTR_UINT32SET || tCol.m_eAttrType==SPH_ATTR_INT64SET ) && m_bArenaProhibit )
{
- sError.SetSprintf ( "MVA attribute '%s' can not be updated (already so many MVA "INT64_FMT", should be less %d)",
+ sError.SetSprintf ( "MVA attribute '%s' can not be updated (already so many MVA " INT64_FMT ", should be less %d)",
tCol.m_sName.cstr(), m_tMva.GetNumEntries(), INT_MAX );
return -1;
}
@@ -10254,7 +10254,7 @@ bool CSphIndex_VLN::LoadPersistentMVA ( CSphString & s
}
if ( m_bArenaProhibit )
{
- sError.SetSprintf ( "MVA update disabled (already so many MVA "INT64_FMT", should be less %d)", m_tMva.GetNumEntries(), INT_MAX );
+ sError.SetSprintf ( "MVA update disabled (already so many MVA " INT64_FMT ", should be less %d)", m_tMva.GetNumEntries(), INT_MAX );
return false;
}
@@ -13230,7 +13230,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource
if ( m_tStats.m_iTotalDocuments>=INT_MAX )
{
- m_sLastError.SetSprintf ( "index over %d documents not supported (got documents count="INT64_FMT")", INT_MAX, m_tStats.m_iTotalDocuments );
+ m_sLastError.SetSprintf ( "index over %d documents not supported (got documents count=" INT64_FMT ")", INT_MAX, m_tStats.m_iTotalDocuments );
return 0;
}
@@ -13399,7 +13399,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource
int64_t iMinMaxSize = tMinMax.GetExpectedSize ( m_tStats.m_iTotalDocuments );
if ( iMinMaxSize>INT_MAX || m_tStats.m_iTotalDocuments>INT_MAX )
{
- m_sLastError.SetSprintf ( "attribute files (.spa) over 128 GB are not supported (min-max approximate="INT64_FMT", documents count="INT64_FMT")",
+ m_sLastError.SetSprintf ( "attribute files (.spa) over 128 GB are not supported (min-max approximate=" INT64_FMT ", documents count=" INT64_FMT ")",
iMinMaxSize, m_tStats.m_iTotalDocuments );
return 0;
}
@@ -13432,7 +13432,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource
{
// dupe, report it
if ( m_tSettings.m_bVerbose && uLastDupe!=uLastId )
- sphWarn ( "duplicated document id="DOCID_FMT, uLastId );
+ sphWarn ( "duplicated document id=" DOCID_FMT, uLastId );
uLastDupe = uLastId;
iDupes++;
@@ -13473,7 +13473,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource
uLastMvaOff = rdMva.GetPos()/sizeof(DWORD);
int iPoolOff = dMvaPool.GetLength();
if ( uLastMvaOff>UINT_MAX )
- sphDie ( "MVA counter overflows "UINT64_FMT" at document "DOCID_FMT", total MVA entries "UINT64_FMT" ( try to index less documents )", uLastMvaOff, uMvaID, rdMva.GetFilesize() );
+ sphDie ( "MVA counter overflows " UINT64_FMT " at document " DOCID_FMT ", total MVA entries " UINT64_FMT " ( try to index less documents )", uLastMvaOff, uMvaID, rdMva.GetFilesize() );
sphSetRowAttr ( pAttr, dMvaLocators[i], uLastMvaOff );
// there is the cloned row at the beginning of MVA pool, lets skip it
@@ -13576,7 +13576,7 @@ int CSphIndex_VLN::Build ( const CSphVector<CSphSource
dBins.Reset ();
if ( uLastMvaOff>INT_MAX )
- sphWarning ( "MVA update disabled (collected MVA "INT64_FMT", should be less %d)", uLastMvaOff, INT_MAX );
+ sphWarning ( "MVA update disabled (collected MVA " INT64_FMT ", should be less %d)", uLastMvaOff, INT_MAX );
}
dDocinfos.Reset ( 0 );
@@ -13997,7 +13997,7 @@ static bool CopyFile ( const char * sSrc, const char *
size_t iRead = sphReadThrottled ( tSrcFile.GetFD(), dData.Begin(), iSize, pThrottle );
if ( iRead!=iSize )
{
- sErrStr.SetSprintf ( "read error in %s; "INT64_FMT" of %d bytes read", sSrc, (int64_t)iRead, iSize );
+ sErrStr.SetSprintf ( "read error in %s; " INT64_FMT " of %d bytes read", sSrc, (int64_t)iRead, iSize );
break;
}
@@ -14281,7 +14281,7 @@ static bool CheckDocsCount ( int64_t iDocs, CSphString
if ( iDocs<INT_MAX )
return true;
- sError.SetSprintf ( "index over %d documents not supported (got "INT64_FMT" documents)", INT_MAX, iDocs );
+ sError.SetSprintf ( "index over %d documents not supported (got " INT64_FMT " documents)", INT_MAX, iDocs );
return false;
}
@@ -14769,7 +14769,7 @@ bool CSphIndex_VLN::DoMerge ( const CSphIndex_VLN * pD
int64_t iMinMaxSize = tMinMax.GetExpectedSize ( iExpectedDocs );
if ( iMinMaxSize>INT_MAX || iExpectedDocs>INT_MAX )
{
- sError.SetSprintf ( "attribute files (.spa) over 128 GB are not supported (min-max approximate="INT64_FMT", documents count="INT64_FMT")",
+ sError.SetSprintf ( "attribute files (.spa) over 128 GB are not supported (min-max approximate=" INT64_FMT ", documents count=" INT64_FMT ")",
iMinMaxSize, iExpectedDocs );
return false;
}
@@ -15275,7 +15275,7 @@ bool CSphIndex_VLN::BuildDocList ( SphAttr_t ** ppDocL
int64_t iSizeMax = (size_t)m_iDocinfo;
if ( iSizeMax!=m_iDocinfo )
{
- pError->SetSprintf ( "doc-list build size_t overflow (docs count="INT64_FMT", size max="INT64_FMT")", m_iDocinfo, iSizeMax );
+ pError->SetSprintf ( "doc-list build size_t overflow (docs count=" INT64_FMT ", size max=" INT64_FMT ")", m_iDocinfo, iSizeMax );
return false;
}
@@ -16688,8 +16688,8 @@ void CSphIndex_VLN::DebugDumpHeader ( FILE * fp, const
}
// skipped min doc, wordlist checkpoints
- fprintf ( fp, "total-documents: "INT64_FMT"\n", m_tStats.m_iTotalDocuments );
- fprintf ( fp, "total-bytes: "INT64_FMT"\n", int64_t(m_tStats.m_iTotalBytes) );
+ fprintf ( fp, "total-documents: " INT64_FMT "\n", m_tStats.m_iTotalDocuments );
+ fprintf ( fp, "total-bytes: " INT64_FMT "\n", int64_t(m_tStats.m_iTotalBytes) );
fprintf ( fp, "total-duplicates: %d\n", m_iTotalDups );
fprintf ( fp, "min-prefix-len: %d\n", m_tSettings.m_iMinPrefixLen );
@@ -16735,7 +16735,7 @@ void CSphIndex_VLN::DebugDumpHeader ( FILE * fp, const
if ( tEmbeddedFiles.m_bEmbeddedStopwords )
{
ARRAY_FOREACH ( i, tEmbeddedFiles.m_dStopwords )
- fprintf ( fp, "\tdictionary-embedded-stopword [%d]: "DOCID_FMT"\n", i, tEmbeddedFiles.m_dStopwords[i] );
+ fprintf ( fp, "\tdictionary-embedded-stopword [%d]: " DOCID_FMT "\n", i, tEmbeddedFiles.m_dStopwords[i] );
}
ARRAY_FOREACH ( i, tSettings.m_dWordforms )
@@ -16752,7 +16752,7 @@ void CSphIndex_VLN::DebugDumpHeader ( FILE * fp, const
}
fprintf ( fp, "killlist-size: %u\n", m_uKillListSize );
- fprintf ( fp, "min-max-index: "INT64_FMT"\n", m_iMinMaxIndex );
+ fprintf ( fp, "min-max-index: " INT64_FMT "\n", m_iMinMaxIndex );
if ( m_pFieldFilter )
{
@@ -16780,18 +16780,18 @@ void CSphIndex_VLN::DebugDumpDocids ( FILE * fp )
const int64_t iDocinfoSize = iRowStride*m_iDocinfo*sizeof(DWORD);
const int64_t iMinmaxSize = iNumMinMaxRow*sizeof(CSphRowitem);
- fprintf ( fp, "docinfo-bytes: docinfo="INT64_FMT", min-max="INT64_FMT", total="UINT64_FMT"\n"
+ fprintf ( fp, "docinfo-bytes: docinfo=" INT64_FMT ", min-max=" INT64_FMT ", total=" UINT64_FMT "\n"
, iDocinfoSize, iMinmaxSize, (uint64_t)m_tAttr.GetLengthBytes() );
fprintf ( fp, "docinfo-stride: %d\n", (int)(iRowStride*sizeof(DWORD)) );
- fprintf ( fp, "docinfo-rows: "INT64_FMT"\n", iNumRows );
+ fprintf ( fp, "docinfo-rows: " INT64_FMT "\n", iNumRows );
if ( !m_tAttr.GetNumEntries() )
return;
DWORD * pDocinfo = m_tAttr.GetWritePtr();
for ( int64_t iRow=0; iRow<iNumRows; iRow++, pDocinfo+=iRowStride )
- printf ( INT64_FMT". id=" DOCID_FMT "\n", iRow+1, DOCINFO2ID ( pDocinfo ) );
- printf ( "--- min-max="INT64_FMT" ---\n", iNumMinMaxRow );
+ printf ( INT64_FMT ". id=" DOCID_FMT "\n", iRow+1, DOCINFO2ID ( pDocinfo ) );
+ printf ( "--- min-max=" INT64_FMT " ---\n", iNumMinMaxRow );
for ( int64_t iRow=0; iRow<(m_iDocinfoIndex+1)*2; iRow++, pDocinfo+=iRowStride )
printf ( "id=" DOCID_FMT "\n", DOCINFO2ID ( pDocinfo ) );
}
@@ -16823,7 +16823,7 @@ void CSphIndex_VLN::DumpHitlist ( FILE * fp, const cha
if ( !uWordID )
sphDie ( "keyword=%s, tok=%s, no wordid (stopped?)", sKeyword, sTok );
- fprintf ( fp, "keyword=%s, tok=%s, wordid="UINT64_FMT"\n", sKeyword, sTok, uint64_t(uWordID) );
+ fprintf ( fp, "keyword=%s, tok=%s, wordid=" UINT64_FMT "\n", sKeyword, sTok, uint64_t(uWordID) );
} else
{
@@ -16831,7 +16831,7 @@ void CSphIndex_VLN::DumpHitlist ( FILE * fp, const cha
if ( !uWordID )
sphDie ( "failed to convert keyword=%s to id (must be integer)", sKeyword );
- fprintf ( fp, "wordid="UINT64_FMT"\n", uint64_t(uWordID) );
+ fprintf ( fp, "wordid=" UINT64_FMT "\n", uint64_t(uWordID) );
}
// open files
@@ -16874,14 +16874,14 @@ void CSphIndex_VLN::DumpHitlist ( FILE * fp, const cha
if ( tKeyword.m_bHasHitlist )
for ( Hitpos_t uHit = tKeyword.GetNextHit(); uHit!=EMPTY_HIT; uHit = tKeyword.GetNextHit() )
{
- fprintf ( fp, "doc="DOCID_FMT", hit=0x%08x\n", tKeyword.m_tDoc.m_uDocID, uHit ); // FIXME?
+ fprintf ( fp, "doc=" DOCID_FMT ", hit=0x%08x\n", tKeyword.m_tDoc.m_uDocID, uHit ); // FIXME?
iHits++;
}
if ( !iHits )
{
uint64_t uOff = tKeyword.m_iHitlistPos;
- fprintf ( fp, "doc="DOCID_FMT", NO HITS, inline=%d, off="UINT64_FMT"\n",
+ fprintf ( fp, "doc=" DOCID_FMT ", NO HITS, inline=%d, off=" UINT64_FMT "\n",
tKeyword.m_tDoc.m_uDocID, (int)(uOff>>63), (uOff<<1)>>1 );
}
}
@@ -16974,7 +16974,7 @@ bool CSphIndex_VLN::Prealloc ( bool bMlock, bool bStri
m_bIsEmpty = ( m_tWordlist.m_iSize<=1 );
if ( ( m_tWordlist.m_iSize<=1 )!=( m_tWordlist.m_dCheckpoints.GetLength()==0 ) )
- sphWarning ( "wordlist size mismatch (size="INT64_FMT", checkpoints=%d)", m_tWordlist.m_iSize, m_tWordlist.m_dCheckpoints.GetLength() );
+ sphWarning ( "wordlist size mismatch (size=" INT64_FMT ", checkpoints=%d)", m_tWordlist.m_iSize, m_tWordlist.m_dCheckpoints.GetLength() );
// make sure checkpoints are loadable
// pre-11 indices use different offset type (this is fixed up later during the loading)
@@ -17029,7 +17029,7 @@ bool CSphIndex_VLN::Prealloc ( bool bMlock, bool bStri
if ( iDocinfoSize < iRealDocinfoSize )
{
m_sLastError.SetSprintf ( "precomputed chunk size check mismatch" );
- sphLogDebug ( "precomputed chunk size check mismatch (size="INT64_FMT", real="INT64_FMT", min-max="INT64_FMT", count="INT64_FMT")",
+ sphLogDebug ( "precomputed chunk size check mismatch (size=" INT64_FMT ", real=" INT64_FMT ", min-max=" INT64_FMT ", count=" INT64_FMT ")",
iDocinfoSize, iRealDocinfoSize, m_iMinMaxIndex, m_iDocinfo );
return false;
}
@@ -17082,7 +17082,7 @@ bool CSphIndex_VLN::Prealloc ( bool bMlock, bool bStri
if ( iDocinfoSize < iRealDocinfoSize )
{
m_sLastError.SetSprintf ( "precomputed chunk size check mismatch" );
- sphLogDebug ( "precomputed chunk size check mismatch (size="INT64_FMT", real="INT64_FMT", min-max="INT64_FMT", count="INT64_FMT")",
+ sphLogDebug ( "precomputed chunk size check mismatch (size=" INT64_FMT ", real=" INT64_FMT ", min-max=" INT64_FMT ", count=" INT64_FMT ")",
iDocinfoSize, iRealDocinfoSize, m_iMinMaxIndex, m_iDocinfo );
return false;
}
@@ -17139,7 +17139,7 @@ bool CSphIndex_VLN::Prealloc ( bool bMlock, bool bStri
if ( m_tMva.GetNumEntries()>INT_MAX )
{
m_bArenaProhibit = true;
- sphWarning ( "MVA update disabled (loaded MVA "INT64_FMT", should be less %d)", m_tMva.GetNumEntries(), INT_MAX );
+ sphWarning ( "MVA update disabled (loaded MVA " INT64_FMT ", should be less %d)", m_tMva.GetNumEntries(), INT_MAX );
}
}
@@ -19669,7 +19669,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
rdDict.UnzipOffset();
if ( ( iWordsTotal%iWordPerCP )!=0 && rdDict.GetPos()!=iWordsEnd )
- LOC_FAIL(( fp, "unexpected checkpoint (pos="INT64_FMT", word=%d, words=%d, expected=%d)",
+ LOC_FAIL(( fp, "unexpected checkpoint (pos=" INT64_FMT ", word=%d, words=%d, expected=%d)",
iDictPos, iWordsTotal, ( iWordsTotal%iWordPerCP ), iWordPerCP ));
uWordid = 0;
@@ -19701,7 +19701,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
const int iLastWordLen = strlen(sLastWord);
if ( iMatch+iDelta>=(int)sizeof(sLastWord)-1 || iMatch>iLastWordLen )
{
- LOC_FAIL(( fp, "wrong word-delta (pos="INT64_FMT", word=%s, len=%d, begin=%d, delta=%d)",
+ LOC_FAIL(( fp, "wrong word-delta (pos=" INT64_FMT ", word=%s, len=%d, begin=%d, delta=%d)",
iDictPos, sLastWord, iLastWordLen, iMatch, iDelta ));
rdDict.SkipBytes ( iDelta );
} else
@@ -19729,20 +19729,20 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
const int iNewWordLen = strlen(sWord);
if ( iNewWordLen==0 )
- LOC_FAIL(( fp, "empty word in dictionary (pos="INT64_FMT")",
+ LOC_FAIL(( fp, "empty word in dictionary (pos=" INT64_FMT ")",
iDictPos ));
if ( iLastWordLen && iNewWordLen )
if ( sphDictCmpStrictly ( sWord, iNewWordLen, sLastWord, iLastWordLen )<=0 )
- LOC_FAIL(( fp, "word order decreased (pos="INT64_FMT", word=%s, prev=%s)",
+ LOC_FAIL(( fp, "word order decreased (pos=" INT64_FMT ", word=%s, prev=%s)",
iDictPos, sLastWord, sWord ));
if ( iHint<0 )
- LOC_FAIL(( fp, "invalid word hint (pos="INT64_FMT", word=%s, hint=%d)",
+ LOC_FAIL(( fp, "invalid word hint (pos=" INT64_FMT ", word=%s, hint=%d)",
iDictPos, sWord, iHint ));
if ( iDocs<=0 || iHits<=0 || iHits<iDocs )
- LOC_FAIL(( fp, "invalid docs/hits (pos="INT64_FMT", word=%s, docs="INT64_FMT", hits="INT64_FMT")",
+ LOC_FAIL(( fp, "invalid docs/hits (pos=" INT64_FMT ", word=%s, docs=" INT64_FMT ", hits=" INT64_FMT ")",
(int64_t)iDictPos, sWord, (int64_t)iDocs, (int64_t)iHits ));
memcpy ( sLastWord, sWord, sizeof(sLastWord) );
@@ -19758,15 +19758,15 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
iDocs = ( iDocs & HITLESS_DOC_MASK );
if ( uNewWordid<=uWordid )
- LOC_FAIL(( fp, "wordid decreased (pos="INT64_FMT", wordid="UINT64_FMT", previd="UINT64_FMT")",
+ LOC_FAIL(( fp, "wordid decreased (pos=" INT64_FMT ", wordid=" UINT64_FMT ", previd=" UINT64_FMT ")",
(int64_t)iDictPos, (uint64_t)uNewWordid, (uint64_t)uWordid ));
if ( iNewDoclistOffset<=iDoclistOffset )
- LOC_FAIL(( fp, "doclist offset decreased (pos="INT64_FMT", wordid="UINT64_FMT")",
+ LOC_FAIL(( fp, "doclist offset decreased (pos=" INT64_FMT ", wordid=" UINT64_FMT ")",
(int64_t)iDictPos, (uint64_t)uNewWordid ));
if ( iDocs<=0 || iHits<=0 || iHits<iDocs )
- LOC_FAIL(( fp, "invalid docs/hits (pos="INT64_FMT", wordid="UINT64_FMT", docs="INT64_FMT", hits="INT64_FMT", hitless=%s)",
+ LOC_FAIL(( fp, "invalid docs/hits (pos=" INT64_FMT ", wordid=" UINT64_FMT ", docs=" INT64_FMT ", hits=" INT64_FMT ", hitless=%s)",
(int64_t)iDictPos, (uint64_t)uNewWordid, (int64_t)iDocs, (int64_t)iHits, ( bHitless?"true":"false" ) ));
}
@@ -19818,7 +19818,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
tRefCP.m_sWord = dCheckpointWords.Begin() + tRefCP.m_uWordID;
if ( bWordDict && ( tRefCP.m_sWord[0]=='\0' || tCP.m_sWord[0]=='\0' ) )
{
- LOC_FAIL(( fp, "empty checkpoint %d (read_word=%s, read_len=%u, readpos="INT64_FMT", calc_word=%s, calc_len=%u, calcpos="INT64_FMT")",
+ LOC_FAIL(( fp, "empty checkpoint %d (read_word=%s, read_len=%u, readpos=" INT64_FMT ", calc_word=%s, calc_len=%u, calcpos=" INT64_FMT ")",
i, tCP.m_sWord, (DWORD)strlen ( tCP.m_sWord ), (int64_t)tCP.m_iWordlistOffset,
tRefCP.m_sWord, (DWORD)strlen ( tRefCP.m_sWord ), (int64_t)tRefCP.m_iWordlistOffset ));
@@ -19827,7 +19827,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
{
if ( bWordDict )
{
- LOC_FAIL(( fp, "checkpoint %d differs (read_word=%s, readpos="INT64_FMT", calc_word=%s, calcpos="INT64_FMT")",
+ LOC_FAIL(( fp, "checkpoint %d differs (read_word=%s, readpos=" INT64_FMT ", calc_word=%s, calcpos=" INT64_FMT ")",
i,
tCP.m_sWord,
(int64_t)tCP.m_iWordlistOffset,
@@ -19835,7 +19835,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
(int64_t)tRefCP.m_iWordlistOffset ));
} else
{
- LOC_FAIL(( fp, "checkpoint %d differs (readid="UINT64_FMT", readpos="INT64_FMT", calcid="UINT64_FMT", calcpos="INT64_FMT")",
+ LOC_FAIL(( fp, "checkpoint %d differs (readid=" UINT64_FMT ", readpos=" INT64_FMT ", calcid=" UINT64_FMT ", calcpos=" INT64_FMT ")",
i,
(uint64_t)tCP.m_uWordID,
(int64_t)tCP.m_iWordlistOffset,
@@ -19963,12 +19963,12 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( iDoclistOffset!=rdDocs.GetPos() )
{
if ( !bWordDict )
- LOC_FAIL(( fp, "unexpected doclist offset (wordid="UINT64_FMT"(%s)(%d), dictpos="INT64_FMT", doclistpos="INT64_FMT")",
+ LOC_FAIL(( fp, "unexpected doclist offset (wordid=" UINT64_FMT "(%s)(%d), dictpos=" INT64_FMT ", doclistpos=" INT64_FMT ")",
(uint64_t)uWordid, sWord, iWordsChecked, iDoclistOffset, (int64_t)rdDocs.GetPos() ));
if ( iDoclistOffset>=iDocsSize || iDoclistOffset<0 )
{
- LOC_FAIL(( fp, "unexpected doclist offset, off the file (wordid="UINT64_FMT"(%s)(%d), dictpos="INT64_FMT", doclistsize="INT64_FMT")",
+ LOC_FAIL(( fp, "unexpected doclist offset, off the file (wordid=" UINT64_FMT "(%s)(%d), dictpos=" INT64_FMT ", doclistsize=" INT64_FMT ")",
(uint64_t)uWordid, sWord, iWordsChecked, iDoclistOffset, iDocsSize ));
iWordsChecked++;
continue;
@@ -20047,17 +20047,17 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
const SphDocID_t * pID = sphBinarySearch ( dID.GetWritePtr(), dID.GetWritePtr() + dID.GetNumEntries() - 1, uDocID );
if ( !pID )
{
- LOC_FAIL(( fp, "row not found (wordid="UINT64_FMT"(%s), docid="DOCID_FMT")",
+ LOC_FAIL(( fp, "row not found (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ")",
uint64_t(uWordid), sWord, tDoc.m_uDocID ));
} else if ( tDoc.m_uDocID!=*pID )
{
- LOC_FAIL(( fp, "row found but id mismatches (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", found="DOCID_FMT")",
+ LOC_FAIL(( fp, "row found but id mismatches (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", found=" DOCID_FMT ")",
uint64_t(uWordid), sWord, tDoc.m_uDocID, *pID ));
}
}
if ( tDoc.m_uDocID<=uLastDocid )
- LOC_FAIL(( fp, "docid decreased (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", lastid="DOCID_FMT")",
+ LOC_FAIL(( fp, "docid decreased (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", lastid=" DOCID_FMT ")",
uint64_t(uWordid), sWord, tDoc.m_uDocID, uLastDocid ));
uLastDocid = tDoc.m_uDocID;
@@ -20068,7 +20068,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if (!( pQword->m_iHitlistPos>>63 ))
{
if ( !bWordDict && pQword->m_iHitlistPos!=pQword->m_rdHitlist.GetPos() )
- LOC_FAIL(( fp, "unexpected hitlist offset (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", expected="INT64_FMT", actual="INT64_FMT")",
+ LOC_FAIL(( fp, "unexpected hitlist offset (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", expected=" INT64_FMT ", actual=" INT64_FMT ")",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID,
(int64_t)pQword->m_iHitlistPos, (int64_t)pQword->m_rdHitlist.GetPos() ));
}
@@ -20089,21 +20089,21 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
break;
if ( !( uLastHit<uHit ) )
- LOC_FAIL(( fp, "hit entries sorting order decreased (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", hit=%u, last=%u)",
+ LOC_FAIL(( fp, "hit entries sorting order decreased (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", hit=%u, last=%u)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, uHit, uLastHit ));
if ( HITMAN::GetField ( uLastHit )==HITMAN::GetField ( uHit ) )
{
if ( !( HITMAN::GetPos ( uLastHit )<HITMAN::GetPos ( uHit ) ) )
- LOC_FAIL(( fp, "hit decreased (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", hit=%u, last=%u)",
+ LOC_FAIL(( fp, "hit decreased (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", hit=%u, last=%u)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, HITMAN::GetPos ( uHit ), HITMAN::GetPos ( uLastHit ) ));
if ( HITMAN::IsEnd ( uLastHit ) )
- LOC_FAIL(( fp, "multiple tail hits (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", hit=0x%x, last=0x%x)",
+ LOC_FAIL(( fp, "multiple tail hits (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", hit=0x%x, last=0x%x)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, uHit, uLastHit ));
} else
{
if ( !( HITMAN::GetField ( uLastHit )<HITMAN::GetField ( uHit ) ) )
- LOC_FAIL(( fp, "hit field decreased (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", hit field=%u, last field=%u)",
+ LOC_FAIL(( fp, "hit field decreased (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", hit field=%u, last field=%u)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, HITMAN::GetField ( uHit ), HITMAN::GetField ( uLastHit ) ));
}
@@ -20112,12 +20112,12 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
int iField = HITMAN::GetField ( uHit );
if ( iField<0 || iField>=SPH_MAX_FIELDS )
{
- LOC_FAIL(( fp, "hit field out of bounds (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", field=%d)",
+ LOC_FAIL(( fp, "hit field out of bounds (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", field=%d)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, iField ));
} else if ( iField>=m_tSchema.m_dFields.GetLength() )
{
- LOC_FAIL(( fp, "hit field out of schema (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", field=%d)",
+ LOC_FAIL(( fp, "hit field out of schema (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", field=%d)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, iField ));
} else
{
@@ -20130,7 +20130,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check hit count
if ( iDocHits!=(int)pQword->m_uMatchHits && !bHitless )
- LOC_FAIL(( fp, "doc hit count mismatch (wordid="UINT64_FMT"(%s), docid="DOCID_FMT", doclist=%d, hitlist=%d)",
+ LOC_FAIL(( fp, "doc hit count mismatch (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ", doclist=%d, hitlist=%d)",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID, pQword->m_uMatchHits, iDocHits ));
if ( GetMatchSchema().m_dFields.GetLength()>32 )
@@ -20138,7 +20138,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check the mask
if ( memcmp ( dFieldMask.m_dMask, pQword->m_dQwordFields.m_dMask, sizeof(dFieldMask.m_dMask) ) && !bHitless )
- LOC_FAIL(( fp, "field mask mismatch (wordid="UINT64_FMT"(%s), docid="DOCID_FMT")",
+ LOC_FAIL(( fp, "field mask mismatch (wordid=" UINT64_FMT "(%s), docid=" DOCID_FMT ")",
(uint64_t)uWordid, sWord, pQword->m_tDoc.m_uDocID ));
// update my hitlist reader
@@ -20147,11 +20147,11 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// do checks
if ( iDictDocs!=iDoclistDocs )
- LOC_FAIL(( fp, "doc count mismatch (wordid="UINT64_FMT"(%s), dict=%d, doclist=%d, hitless=%s)",
+ LOC_FAIL(( fp, "doc count mismatch (wordid=" UINT64_FMT "(%s), dict=%d, doclist=%d, hitless=%s)",
uint64_t(uWordid), sWord, iDictDocs, iDoclistDocs, ( bHitless?"true":"false" ) ));
if ( ( iDictHits!=iDoclistHits || iDictHits!=iHitlistHits ) && !bHitless )
- LOC_FAIL(( fp, "hit count mismatch (wordid="UINT64_FMT"(%s), dict=%d, doclist=%d, hitlist=%d)",
+ LOC_FAIL(( fp, "hit count mismatch (wordid=" UINT64_FMT "(%s), dict=%d, doclist=%d, hitlist=%d)",
uint64_t(uWordid), sWord, iDictHits, iDoclistHits, iHitlistHits ));
while ( m_bHaveSkips && iDoclistDocs>SPH_SKIPLIST_BLOCK && !bHitless )
@@ -20231,7 +20231,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
iAllRowsTotal += (m_iDocinfoIndex+1)*2; // should had been fixed up to v.20 by the loader
if ( iAllRowsTotal*uStride!=(int64_t)m_tAttr.GetNumEntries() )
- LOC_FAIL(( fp, "rowitems count mismatch (expected="INT64_FMT", loaded="INT64_FMT")",
+ LOC_FAIL(( fp, "rowitems count mismatch (expected=" INT64_FMT ", loaded=" INT64_FMT ")",
iAllRowsTotal*uStride, (int64_t)m_tAttr.GetNumEntries() ));
iStrEnd = rdString.GetFilesize();
@@ -20291,7 +20291,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// 4 bytes must be enough to encode string length, hence pCur+4
if ( rdString.GetPos()+iLen>iStrEnd || rdString.GetPos()>iLastPos+4 )
{
- LOC_FAIL(( fp, "string length out of bounds (offset="INT64_FMT", len=%d)", iLastPos, iLen ));
+ LOC_FAIL(( fp, "string length out of bounds (offset=" INT64_FMT ", len=%d)", iLastPos, iLen ));
break;
}
@@ -20313,7 +20313,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check that ids are ascending
bool bIsSpaValid = ( uLastID<uCurID );
if ( !bIsSpaValid )
- LOC_FAIL(( fp, "docid decreased (row="INT64_FMT", id="DOCID_FMT", lastid="DOCID_FMT")",
+ LOC_FAIL(( fp, "docid decreased (row=" INT64_FMT ", id=" DOCID_FMT ", lastid=" DOCID_FMT ")",
iRow, uCurID, uLastID ));
uLastID = uCurID;
@@ -20338,7 +20338,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( uOffset && !bArena && uOffset>=iMvaEnd )
{
bIsSpaValid = false;
- LOC_FAIL(( fp, "MVA index out of bounds (row="INT64_FMT", mvaattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "MVA index out of bounds (row=" INT64_FMT ", mvaattr=%d, docid=" DOCID_FMT ", index=%u)",
iRow, iItem, uLastID, uOffset ));
}
@@ -20360,11 +20360,11 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
break;
if ( bLastIDChecked && uLastID==uMvaID )
- LOC_FAIL(( fp, "duplicate docid found (row="INT64_FMT", docid expected="DOCID_FMT", got="DOCID_FMT", index="INT64_FMT")",
+ LOC_FAIL(( fp, "duplicate docid found (row=" INT64_FMT ", docid expected=" DOCID_FMT ", got=" DOCID_FMT ", index=" INT64_FMT ")",
iRow, uLastID, uMvaID, iLastPos ));
if ( uMvaID<uLastMvaID )
- LOC_FAIL(( fp, "MVA docid decreased (row="INT64_FMT", spa docid="DOCID_FMT", last MVA docid="DOCID_FMT", MVA docid="DOCID_FMT", index="INT64_FMT")",
+ LOC_FAIL(( fp, "MVA docid decreased (row=" INT64_FMT ", spa docid=" DOCID_FMT ", last MVA docid=" DOCID_FMT ", MVA docid=" DOCID_FMT ", index=" INT64_FMT ")",
iRow, uLastID, uLastMvaID, uMvaID, iLastPos ));
bool bIsMvaCorrect = ( uLastMvaID<=uMvaID && uMvaID<=uLastID );
@@ -20389,7 +20389,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check offset (index)
if ( uMvaID==uLastID && bIsSpaValid && rdMva.GetPos()!=sizeof(DWORD)*uSpaOffset )
{
- LOC_FAIL(( fp, "unexpected MVA docid (row="INT64_FMT", mvaattr=%d, docid expected="DOCID_FMT", got="DOCID_FMT", expected="INT64_FMT", got=%u)",
+ LOC_FAIL(( fp, "unexpected MVA docid (row=" INT64_FMT ", mvaattr=%d, docid expected=" DOCID_FMT ", got=" DOCID_FMT ", expected=" INT64_FMT ", got=%u)",
iRow, iItem, uLastID, uMvaID, rdMva.GetPos()/sizeof(DWORD), uSpaOffset ));
// it's unexpected but it's our best guess
// but do fix up only once, to prevent infinite loop
@@ -20399,7 +20399,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( rdMva.GetPos()>=iMvaEnd )
{
- LOC_FAIL(( fp, "MVA index out of bounds (row="INT64_FMT", mvaattr=%d, docid expected="DOCID_FMT", got="DOCID_FMT", index="INT64_FMT")",
+ LOC_FAIL(( fp, "MVA index out of bounds (row=" INT64_FMT ", mvaattr=%d, docid expected=" DOCID_FMT ", got=" DOCID_FMT ", index=" INT64_FMT ")",
iRow, iItem, uLastID, uMvaID, rdMva.GetPos()/sizeof(DWORD) ));
bIsMvaCorrect = false;
continue;
@@ -20410,7 +20410,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( rdMva.GetPos()+sizeof(DWORD)*uValues-1>=iMvaEnd )
{
- LOC_FAIL(( fp, "MVA count out of bounds (row="INT64_FMT", mvaattr=%d, docid expected="DOCID_FMT", got="DOCID_FMT", count=%u)",
+ LOC_FAIL(( fp, "MVA count out of bounds (row=" INT64_FMT ", mvaattr=%d, docid expected=" DOCID_FMT ", got=" DOCID_FMT ", count=%u)",
iRow, iItem, uLastID, uMvaID, uValues ));
rdMva.SeekTo ( rdMva.GetPos() + sizeof(DWORD)*uValues, READ_NO_SIZE_HINT );
bIsMvaCorrect = false;
@@ -20438,7 +20438,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( iCur<=iPrev )
{
- LOC_FAIL(( fp, "unsorted MVA values (row="INT64_FMT", mvaattr=%d, docid expected="DOCID_FMT", got="DOCID_FMT", val[%u]=%u, val[%u]=%u)",
+ LOC_FAIL(( fp, "unsorted MVA values (row=" INT64_FMT ", mvaattr=%d, docid expected=" DOCID_FMT ", got=" DOCID_FMT ", val[%u]=%u, val[%u]=%u)",
iRow, iItem, uLastID, uMvaID, ( iItem>=iMva64 ? uVal-2 : uVal-1 ), (unsigned int)iPrev, uVal, (unsigned int)iCur ));
bIsMvaCorrect = false;
}
@@ -20458,7 +20458,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
}
if ( !bLastIDChecked && bHasValues && !bHasArena )
- LOC_FAIL(( fp, "missed or damaged MVA (row="INT64_FMT", docid expected="DOCID_FMT")",
+ LOC_FAIL(( fp, "missed or damaged MVA (row=" INT64_FMT ", docid expected=" DOCID_FMT ")",
iRow, uLastID ));
}
@@ -20475,12 +20475,12 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check normalized
if ( uExp==0 && uMantissa!=0 )
- LOC_FAIL(( fp, "float attribute value is unnormalized (row="INT64_FMT", attr=%d, id="DOCID_FMT", raw=0x%x, value=%f)",
+ LOC_FAIL(( fp, "float attribute value is unnormalized (row=" INT64_FMT ", attr=%d, id=" DOCID_FMT ", raw=0x%x, value=%f)",
iRow, iItem, uLastID, uValue, sphDW2F ( uValue ) ));
// check +-inf
if ( uExp==0xff && uMantissa==0 )
- LOC_FAIL(( fp, "float attribute is infinity (row="INT64_FMT", attr=%d, id="DOCID_FMT", raw=0x%x, value=%f)",
+ LOC_FAIL(( fp, "float attribute is infinity (row=" INT64_FMT ", attr=%d, id=" DOCID_FMT ", raw=0x%x, value=%f)",
iRow, iItem, uLastID, uValue, sphDW2F ( uValue ) ));
}
@@ -20495,7 +20495,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
const DWORD uOffset = (DWORD)sphGetRowAttr ( pAttrs, dStrItems[ iItem ] );
if ( uOffset>=iStrEnd )
{
- LOC_FAIL(( fp, "string offset out of bounds (row="INT64_FMT", stringattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "string offset out of bounds (row=" INT64_FMT ", stringattr=%d, docid=" DOCID_FMT ", index=%u)",
iRow, iItem, uLastID, uOffset ));
continue;
}
@@ -20509,7 +20509,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check that length is sane
if ( rdString.GetPos()+iLen-1>=iStrEnd )
{
- LOC_FAIL(( fp, "string length out of bounds (row="INT64_FMT", stringattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "string length out of bounds (row=" INT64_FMT ", stringattr=%d, docid=" DOCID_FMT ", index=%u)",
iRow, iItem, uLastID, uOffset ));
continue;
}
@@ -20518,7 +20518,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// (that is, that we don't point in the middle of some other data)
if ( !dStringOffsets.BinarySearch ( uOffset ) )
{
- LOC_FAIL(( fp, "string offset is not a string start (row="INT64_FMT", stringattr=%d, docid="DOCID_FMT", offset=%u)",
+ LOC_FAIL(( fp, "string offset is not a string start (row=" INT64_FMT ", stringattr=%d, docid=" DOCID_FMT ", offset=%u)",
iRow, iItem, uLastID, uOffset ));
}
}
@@ -20526,7 +20526,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// progress bar
if ( iRow%1000==0 && bProgress )
{
- fprintf ( fp, INT64_FMT"/"INT64_FMT"\r", iRow, iRowsTotal );
+ fprintf ( fp, INT64_FMT"/" INT64_FMT "\r", iRow, iRowsTotal );
fflush ( fp );
}
}
@@ -20543,7 +20543,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check size
const int64_t iTempDocinfoIndex = ( m_iDocinfo+DOCINFO_INDEX_FREQ-1 ) / DOCINFO_INDEX_FREQ;
if ( iTempDocinfoIndex!=m_iDocinfoIndex )
- LOC_FAIL(( fp, "block count differs (expected="INT64_FMT", got="INT64_FMT")",
+ LOC_FAIL(( fp, "block count differs (expected=" INT64_FMT ", got=" INT64_FMT ")",
iTempDocinfoIndex, m_iDocinfoIndex ));
const DWORD uMinMaxStride = DOCINFO_IDSIZE + m_tSchema.GetRowSize();
@@ -20569,12 +20569,12 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check docid vs global range
if ( pMaxEntry+uMinMaxStride > pDocinfoIndexMax )
- LOC_FAIL(( fp, "unexpected block index end (row="INT64_FMT", docid="DOCID_FMT", block="INT64_FMT", max="INT64_FMT", cur="INT64_FMT")",
+ LOC_FAIL(( fp, "unexpected block index end (row=" INT64_FMT ", docid=" DOCID_FMT ", block=" INT64_FMT ", max=" INT64_FMT ", cur=" INT64_FMT ")",
iIndexEntry, uDocID, iBlock, int64_t ( pDocinfoIndexMax-m_pDocinfoIndex ), int64_t ( pMaxEntry+uMinMaxStride-m_pDocinfoIndex ) ));
// check attribute location vs global range
if ( pMaxAttrs+uMinMaxStride > pDocinfoIndexMax )
- LOC_FAIL(( fp, "attribute position out of blocks index (row="INT64_FMT", docid="DOCID_FMT", block="INT64_FMT", expected<"INT64_FMT", got="INT64_FMT")",
+ LOC_FAIL(( fp, "attribute position out of blocks index (row=" INT64_FMT ", docid=" DOCID_FMT ", block=" INT64_FMT ", expected<" INT64_FMT ", got=" INT64_FMT ")",
iIndexEntry, uDocID, iBlock, int64_t ( pDocinfoIndexMax-m_pDocinfoIndex ), int64_t ( pMaxAttrs+uMinMaxStride-m_pDocinfoIndex ) ));
const SphDocID_t uMinDocID = DOCINFO2ID ( pMinEntry );
@@ -20582,12 +20582,12 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// checks is docid min max range valid
if ( uMinDocID > uMaxDocID && bIsBordersCheckTime )
- LOC_FAIL(( fp, "invalid docid range (row="INT64_FMT", block="INT64_FMT", min="DOCID_FMT", max="DOCID_FMT")",
+ LOC_FAIL(( fp, "invalid docid range (row=" INT64_FMT ", block=" INT64_FMT ", min=" DOCID_FMT ", max=" DOCID_FMT ")",
iIndexEntry, iBlock, uMinDocID, uMaxDocID ));
// checks docid vs blocks range
if ( uDocID < uMinDocID || uDocID > uMaxDocID )
- LOC_FAIL(( fp, "unexpected docid range (row="INT64_FMT", docid="DOCID_FMT", block="INT64_FMT", min="DOCID_FMT", max="DOCID_FMT")",
+ LOC_FAIL(( fp, "unexpected docid range (row=" INT64_FMT ", docid=" DOCID_FMT ", block=" INT64_FMT ", min=" DOCID_FMT ", max=" DOCID_FMT ")",
iIndexEntry, uDocID, iBlock, uMinDocID, uMaxDocID ));
bool bIsFirstMva = true;
@@ -20611,11 +20611,11 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// checks is attribute min max range valid
if ( uMin > uMax && bIsBordersCheckTime )
- LOC_FAIL(( fp, "invalid attribute range (row="INT64_FMT", block="INT64_FMT", min="INT64_FMT", max="INT64_FMT")",
+ LOC_FAIL(( fp, "invalid attribute range (row=" INT64_FMT ", block=" INT64_FMT ", min=" INT64_FMT ", max=" INT64_FMT ")",
iIndexEntry, iBlock, uMin, uMax ));
if ( uVal < uMin || uVal > uMax )
- LOC_FAIL(( fp, "unexpected attribute value (row="INT64_FMT", attr=%u, docid="DOCID_FMT", block="INT64_FMT", value=0x"UINT64_FMT", min=0x"UINT64_FMT", max=0x"UINT64_FMT")",
+ LOC_FAIL(( fp, "unexpected attribute value (row=" INT64_FMT ", attr=%u, docid=" DOCID_FMT ", block=" INT64_FMT ", value=0x" UINT64_FMT ", min=0x" UINT64_FMT ", max=0x" UINT64_FMT ")",
iIndexEntry, iItem, uDocID, iBlock, uint64_t(uVal), uint64_t(uMin), uint64_t(uMax) ));
}
break;
@@ -20628,11 +20628,11 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// checks is attribute min max range valid
if ( fMin > fMax && bIsBordersCheckTime )
- LOC_FAIL(( fp, "invalid attribute range (row="INT64_FMT", block="INT64_FMT", min=%f, max=%f)",
+ LOC_FAIL(( fp, "invalid attribute range (row=" INT64_FMT ", block=" INT64_FMT ", min=%f, max=%f)",
iIndexEntry, iBlock, fMin, fMax ));
if ( fVal < fMin || fVal > fMax )
- LOC_FAIL(( fp, "unexpected attribute value (row="INT64_FMT", attr=%u, docid="DOCID_FMT", block="INT64_FMT", value=%f, min=%f, max=%f)",
+ LOC_FAIL(( fp, "unexpected attribute value (row=" INT64_FMT ", attr=%u, docid=" DOCID_FMT ", block=" INT64_FMT ", value=%f, min=%f, max=%f)",
iIndexEntry, iItem, uDocID, iBlock, fVal, fMin, fMax ));
}
break;
@@ -20644,7 +20644,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// checks is MVA attribute min max range valid
if ( uMin > uMax && bIsBordersCheckTime && uMin!=0xffffffff && uMax!=0 )
- LOC_FAIL(( fp, "invalid MVA range (row="INT64_FMT", block="INT64_FMT", min=0x%x, max=0x%x)",
+ LOC_FAIL(( fp, "invalid MVA range (row=" INT64_FMT ", block=" INT64_FMT ", min=0x%x, max=0x%x)",
iIndexEntry, iBlock, uMin, uMax ));
SphAttr_t uOff = sphGetRowAttr ( pSpaRow, tCol.m_tLocator );
@@ -20667,7 +20667,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( uMvaDocID && uMvaDocID!=uDocID )
{
- LOC_FAIL(( fp, "unexpected MVA docid (row="INT64_FMT", mvaattr=%d, expected="DOCID_FMT", got="DOCID_FMT", block="INT64_FMT", index=%u)",
+ LOC_FAIL(( fp, "unexpected MVA docid (row=" INT64_FMT ", mvaattr=%d, expected=" DOCID_FMT ", got=" DOCID_FMT ", block=" INT64_FMT ", index=%u)",
iIndexEntry, iItem, uDocID, uMvaDocID, iBlock, (DWORD)uOff ));
break;
}
@@ -20684,7 +20684,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
{
const DWORD uVal = dMva[iVal];
if ( uVal < uMin || uVal > uMax )
- LOC_FAIL(( fp, "unexpected MVA value (row="INT64_FMT", attr=%u, docid="DOCID_FMT", block="INT64_FMT", index=%u, value=0x%x, min=0x%x, max=0x%x)",
+ LOC_FAIL(( fp, "unexpected MVA value (row=" INT64_FMT ", attr=%u, docid=" DOCID_FMT ", block=" INT64_FMT ", index=%u, value=0x%x, min=0x%x, max=0x%x)",
iIndexEntry, iItem, uDocID, iBlock, iVal, (DWORD)uVal, (DWORD)uMin, (DWORD)uMax ));
}
}
@@ -20698,7 +20698,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// progress bar
if ( iIndexEntry%1000==0 && bProgress )
{
- fprintf ( fp, INT64_FMT"/"INT64_FMT"\r", iIndexEntry, m_iDocinfo );
+ fprintf ( fp, INT64_FMT"/" INT64_FMT "\r", iIndexEntry, m_iDocinfo );
fflush ( fp );
}
}
@@ -20712,7 +20712,7 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
// check size
if ( m_pKillList.GetNumEntries()!=m_uKillListSize )
- LOC_FAIL(( fp, "kill-list size differs (expected=%d, got="INT64_FMT")",
+ LOC_FAIL(( fp, "kill-list size differs (expected=%d, got=" INT64_FMT ")",
m_uKillListSize, (int64_t)m_pKillList.GetNumEntries() ));
// check that ids are ascending
@@ -20730,9 +20730,9 @@ int CSphIndex_VLN::DebugCheck ( FILE * fp )
if ( !iFails )
fprintf ( fp, "check passed" );
else if ( iFails!=iFailsPrinted )
- fprintf ( fp, "check FAILED, %d of "INT64_FMT" failures reported", iFailsPrinted, iFails );
+ fprintf ( fp, "check FAILED, %d of " INT64_FMT " failures reported", iFailsPrinted, iFails );
else
- fprintf ( fp, "check FAILED, "INT64_FMT" failures reported", iFails );
+ fprintf ( fp, "check FAILED, " INT64_FMT " failures reported", iFails );
fprintf ( fp, ", %d.%d sec elapsed\n", (int)(tmCheck/1000000), (int)((tmCheck/100000)%10) );
return (int)Min ( iFails, 255 ); // this is the exitcode; so cap it
@@ -22978,7 +22978,7 @@ void InfixBuilder_c<SIZE>::SaveEntries ( CSphWriter &
m_dBlocks[i].m_sInfix = pBlockWords+m_dBlocks[i].m_iInfixOffset;
if ( wrDict.GetPos()>UINT_MAX ) // FIXME!!! change to int64
- sphDie ( "INTERNAL ERROR: dictionary size "INT64_FMT" overflow at infix save", wrDict.GetPos() );
+ sphDie ( "INTERNAL ERROR: dictionary size " INT64_FMT " overflow at infix save", wrDict.GetPos() );
}
@@ -23603,7 +23603,7 @@ bool CSphDictKeywords::DictEnd ( DictHeader_t * pHeade
pHeader->m_iInfixBlocksOffset = pInfixer->SaveEntryBlocks ( m_wrDict );
pHeader->m_iInfixBlocksWordsSize = pInfixer->GetBlocksWordsSize();
if ( pHeader->m_iInfixBlocksOffset>UINT_MAX ) // FIXME!!! change to int64
- sphDie ( "INTERNAL ERROR: dictionary size "INT64_FMT" overflow at dictend save", pHeader->m_iInfixBlocksOffset );
+ sphDie ( "INTERNAL ERROR: dictionary size " INT64_FMT " overflow at dictend save", pHeader->m_iInfixBlocksOffset );
}
// flush header
@@ -23970,7 +23970,7 @@ const char * CSphDictKeywords::HitblockGetKeyword ( Sp
if ( m_dExceptions[i].m_pEntry->m_uWordid==uWordID )
return m_dExceptions[i].m_pEntry->m_pKeyword;
- sphWarning ( "hash missing value in operator [] (wordid="INT64_FMT", hash=%d)", (int64_t)uWordID, uHash );
+ sphWarning ( "hash missing value in operator [] (wordid=" INT64_FMT ", hash=%d)", (int64_t)uWordID, uHash );
assert ( 0 && "hash missing value in operator []" );
return "\31oops";
}
@@ -25934,7 +25934,7 @@ bool CSphSource_Document::CheckFileField ( const BYTE
int64_t iFileSize = tFileSource.GetSize();
if ( iFileSize+16 > m_iMaxFileBufferSize )
{
- sphWarning ( "docid=" DOCID_FMT ": file '%s' too big for a field (size="INT64_FMT", max_file_field_buffer=%d)",
+ sphWarning ( "docid=" DOCID_FMT ": file '%s' too big for a field (size=" INT64_FMT ", max_file_field_buffer=%d)",
m_tDocInfo.m_uDocID, (const char *)sField, iFileSize, m_iMaxFileBufferSize );
return false;
}
@@ -25959,7 +25959,7 @@ int CSphSource_Document::LoadFileField ( BYTE ** ppFie
int64_t iFileSize = tFileSource.GetSize();
if ( iFileSize+16 > m_iMaxFileBufferSize )
{
- sphWarning ( "docid=" DOCID_FMT ": file '%s' too big for a field (size="INT64_FMT", max_file_field_buffer=%d)",
+ sphWarning ( "docid=" DOCID_FMT ": file '%s' too big for a field (size=" INT64_FMT ", max_file_field_buffer=%d)",
m_tDocInfo.m_uDocID, (const char *)sField, iFileSize, m_iMaxFileBufferSize );
return -1;
}
@@ -26825,10 +26825,10 @@ bool CSphSource_SQL::SetupRanges ( const char * sRange
{
// check step
if ( m_tParams.m_iRangeStep<=0 )
- LOC_ERROR ( "sql_range_step="INT64_FMT": must be non-zero positive", m_tParams.m_iRangeStep );
+ LOC_ERROR ( "sql_range_step=" INT64_FMT ": must be non-zero positive", m_tParams.m_iRangeStep );
if ( m_tParams.m_iRangeStep<128 )
- sphWarn ( "sql_range_step="INT64_FMT": too small; might hurt indexing performance!", m_tParams.m_iRangeStep );
+ sphWarn ( "sql_range_step=" INT64_FMT ": too small; might hurt indexing performance!", m_tParams.m_iRangeStep );
// check query for macros
for ( int i=0; i<MACRO_COUNT; i++ )
@@ -26884,11 +26884,11 @@ bool CSphSource_SQL::SetupRanges ( const char * sRange
if ( !HookQueryRange ( m_tParams.m_sHookQueryRange.cstr(), &m_uMinID, &m_uMaxID ) )
LOC_ERROR ( "hook_query_range: runtime error %s when running external hook", strerror(errno) );
if ( m_uMinID<=0 )
- LOC_ERROR ( "hook_query_range: min_id="DOCID_FMT": must be positive 32/64-bit unsigned integer", m_uMinID );
+ LOC_ERROR ( "hook_query_range: min_id=" DOCID_FMT ": must be positive 32/64-bit unsigned integer", m_uMinID );
if ( m_uMaxID<=0 )
- LOC_ERROR ( "hook_query_range: max_id="DOCID_FMT": must be positive 32/64-bit unsigned integer", m_uMaxID );
+ LOC_ERROR ( "hook_query_range: max_id=" DOCID_FMT ": must be positive 32/64-bit unsigned integer", m_uMaxID );
if ( m_uMinID>m_uMaxID )
- LOC_ERROR2 ( "hook_query_range: min_id="DOCID_FMT", max_id="DOCID_FMT": min_id must be less than max_id", m_uMinID, m_uMaxID );
+ LOC_ERROR2 ( "hook_query_range: min_id=" DOCID_FMT ", max_id=" DOCID_FMT ": min_id must be less than max_id", m_uMinID, m_uMaxID );
}
return true;
@@ -27491,7 +27491,7 @@ const char * CSphSource_SQL::SqlUnpackColumn ( int iFi
@@ -27817,7 +27817,7 @@ const char * CSphSource_SQL::SqlUnpackColumn ( int iFi
{
m_bUnpackFailed = true;
sphWarn ( "failed to unpack '%s', invalid column size (size=%d), "
@ -847,7 +12,7 @@ Index: src/sphinx.cpp
}
return NULL;
}
@@ -27507,7 +27507,7 @@ const char * CSphSource_SQL::SqlUnpackColumn ( int iFi
@@ -27833,7 +27833,7 @@ const char * CSphSource_SQL::SqlUnpackColumn ( int iFi
{
m_bUnpackOverflow = true;
sphWarn ( "failed to unpack '%s', column size limit exceeded (size=%d),"
@ -856,39 +21,3 @@ Index: src/sphinx.cpp
}
return NULL;
}
@@ -31110,7 +31110,7 @@ const char * CSphIndexProgress::BuildMessage() const
switch ( m_ePhase )
{
case PHASE_COLLECT:
- snprintf ( sBuf, sizeof(sBuf), "collected "INT64_FMT" docs, %.1f MB", m_iDocuments,
+ snprintf ( sBuf, sizeof(sBuf), "collected " INT64_FMT " docs, %.1f MB", m_iDocuments,
float(m_iBytes)/1000000.0f );
break;
@@ -31120,7 +31120,7 @@ const char * CSphIndexProgress::BuildMessage() const
break;
case PHASE_COLLECT_MVA:
- snprintf ( sBuf, sizeof(sBuf), "collected "INT64_FMT" attr values", m_iAttrs );
+ snprintf ( sBuf, sizeof(sBuf), "collected " INT64_FMT " attr values", m_iAttrs );
break;
case PHASE_SORT_MVA:
@@ -32095,7 +32095,7 @@ void sphDictBuildInfixes ( const char * sPath )
tDictHeader.m_iInfixBlocksOffset = pInfixer->SaveEntryBlocks ( wrDict );
tDictHeader.m_iInfixBlocksWordsSize = pInfixer->GetBlocksWordsSize();
if ( tDictHeader.m_iInfixBlocksOffset>UINT_MAX ) // FIXME!!! change to int64
- sphDie ( "INTERNAL ERROR: dictionary size "INT64_FMT" overflow at build infixes save", tDictHeader.m_iInfixBlocksOffset );
+ sphDie ( "INTERNAL ERROR: dictionary size " INT64_FMT " overflow at build infixes save", tDictHeader.m_iInfixBlocksOffset );
// flush header
@@ -32579,7 +32579,7 @@ void sphDictBuildSkiplists ( const char * sPath )
wrDict.PutBytes ( g_sTagInfixBlocks, strlen ( g_sTagInfixBlocks ) );
tDictHeader.m_iInfixBlocksOffset = wrDict.GetPos();
if ( tDictHeader.m_iInfixBlocksOffset>UINT_MAX ) // FIXME!!! change to int64
- sphDie ( "INTERNAL ERROR: dictionary size "INT64_FMT" overflow at infix blocks save", wrDict.GetPos() );
+ sphDie ( "INTERNAL ERROR: dictionary size " INT64_FMT " overflow at infix blocks save", wrDict.GetPos() );
wrDict.ZipInt ( iBlocks );
for ( int i=0; i<iBlocks; i++ )

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_sphinxjson_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
Index: src/sphinxjson.cpp
--- src/sphinxjson.cpp.orig
+++ src/sphinxjson.cpp
@@ -414,7 +414,7 @@ class JsonParser_c : ISphNoncopyable (public)
switch ( eType )
{
case JSON_INT32: printf ( "JSON_INT32 %d\n", sphJsonLoadInt ( &p ) ); break;
- case JSON_INT64: printf ( "JSON_INT64 "INT64_FMT"\n", sphJsonLoadBigint ( &p ) ); break;
+ case JSON_INT64: printf ( "JSON_INT64 " INT64_FMT "\n", sphJsonLoadBigint ( &p ) ); break;
case JSON_DOUBLE: printf ( "JSON_DOUBLE %lf\n", sphQW2D ( sphJsonLoadBigint ( &p ) ) ); break;
case JSON_STRING:
{

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_sphinxplugin_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
$OpenBSD: patch-src_sphinxplugin_cpp,v 1.2 2020/11/20 14:18:22 sthen Exp $
Index: src/sphinxplugin.cpp
--- src/sphinxplugin.cpp.orig

View File

@ -1,71 +1,9 @@
$OpenBSD: patch-src_sphinxrt_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
$OpenBSD: patch-src_sphinxrt_cpp,v 1.2 2020/11/20 14:18:22 sthen Exp $
Index: src/sphinxrt.cpp
--- src/sphinxrt.cpp.orig
+++ src/sphinxrt.cpp
@@ -1391,7 +1391,7 @@ void RtIndex_t::ForceRamFlush ( bool bPeriodic )
Verify ( m_tWriting.Unlock() );
tmSave = sphMicroTimer() - tmSave;
- sphInfo ( "rt: index %s: ramchunk saved ok (mode=%s, last TID="INT64_FMT", current TID="INT64_FMT", "
+ sphInfo ( "rt: index %s: ramchunk saved ok (mode=%s, last TID=" INT64_FMT ", current TID=" INT64_FMT ", "
"ram=%d.%03d Mb, time delta=%d sec, took=%d.%03d sec)"
, m_sIndexName.cstr(), bPeriodic ? "periodic" : "forced"
, iWasTID, m_iTID, (int)(iUsedRam/1024/1024), (int)((iUsedRam/1024)%1000)
@@ -1488,7 +1488,7 @@ bool RtIndex_t::AddDocument ( int iFields, const char
if ( bGotID )
{
- sError.SetSprintf ( "duplicate id '"UINT64_FMT"'", (uint64_t)tDoc.m_uDocID );
+ sError.SetSprintf ( "duplicate id '" UINT64_FMT "'", (uint64_t)tDoc.m_uDocID );
return false; // already exists and not deleted; INSERT fails
}
}
@@ -3734,7 +3734,7 @@ void RtIndex_t::SaveDiskDataImpl ( const char * sFilen
iInfixCheckpointWordsSize = pInfixer->GetBlocksWordsSize();
if ( iInfixBlockOffset>UINT_MAX )
- sphWarning ( "INTERNAL ERROR: dictionary size "INT64_FMT" overflow at infix save", iInfixBlockOffset );
+ sphWarning ( "INTERNAL ERROR: dictionary size " INT64_FMT " overflow at infix save", iInfixBlockOffset );
}
// flush header
@@ -4523,7 +4523,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
LOC_FAIL(( fp, "wrong attribute stride (current=%d, should_be=%d)", m_iStride, DOCINFO_IDSIZE+m_tSchema.GetRowSize() ));
if ( m_iSoftRamLimit<=0 )
- LOC_FAIL(( fp, "wrong RAM limit (current="INT64_FMT")", m_iSoftRamLimit ));
+ LOC_FAIL(( fp, "wrong RAM limit (current=" INT64_FMT ")", m_iSoftRamLimit ));
if ( m_iLockFD<0 )
LOC_FAIL(( fp, "index lock file id < 0" ));
@@ -4532,13 +4532,13 @@ int RtIndex_t::DebugCheck ( FILE * fp )
LOC_FAIL(( fp, "disk chunk base < 0" ));
if ( m_iTID<0 )
- LOC_FAIL(( fp, "index TID < 0 (current="INT64_FMT")", m_iTID ));
+ LOC_FAIL(( fp, "index TID < 0 (current=" INT64_FMT ")", m_iTID ));
if ( m_iSavedTID<0 )
- LOC_FAIL(( fp, "index saved TID < 0 (current="INT64_FMT")", m_iSavedTID ));
+ LOC_FAIL(( fp, "index saved TID < 0 (current=" INT64_FMT ")", m_iSavedTID ));
if ( m_iTID<m_iSavedTID )
- LOC_FAIL(( fp, "index TID < index saved TID (current="INT64_FMT", saved="INT64_FMT")", m_iTID, m_iSavedTID ));
+ LOC_FAIL(( fp, "index TID < index saved TID (current=" INT64_FMT ", saved=" INT64_FMT ")", m_iTID, m_iSavedTID ));
if ( m_iWordsCheckpoint!=RTDICT_CHECKPOINT_V3 && m_iWordsCheckpoint!=RTDICT_CHECKPOINT_V5 )
LOC_FAIL(( fp, "unexpected number of words per checkpoint (expected 1024 or 48, got %d)", m_iWordsCheckpoint ));
@@ -4706,7 +4706,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( tWord.m_uWordID<=uPrevWordID )
{
- LOC_FAIL(( fp, "wordid decreased (segment=%d, word=%d, wordid="UINT64_FMT", previd="UINT64_FMT")",
+ LOC_FAIL(( fp, "wordid decreased (segment=%d, word=%d, wordid=" UINT64_FMT ", previd=" UINT64_FMT ")",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)uPrevWordID ));
}
@@ -4735,7 +4735,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
@@ -4796,7 +4796,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( !tWord.m_uDocs || !tWord.m_uHits || tWord.m_uHits<tWord.m_uDocs )
{
sWord[sizeof(sWord)-1] = '\0';
@ -74,529 +12,3 @@ Index: src/sphinxrt.cpp
", read_word=%s, docs=%u, hits=%u)",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID,
sWord+1, tWord.m_uDocs, tWord.m_uHits ));
@@ -4758,7 +4758,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( uPrevDocOffset && tWord.m_uDoc<=uPrevDocOffset )
LOC_FAIL(( fp, "doclist offset decreased (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, prev_doclist_offset=%u)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, prev_doclist_offset=%u)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, tWord.m_uDoc, uPrevDocOffset ));
@@ -4766,7 +4766,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
DWORD uDocOffset = pCurDoc-tSegment.m_dDocs.Begin();
if ( tWord.m_uDoc!=uDocOffset )
{
- LOC_FAIL(( fp, "unexpected doclist offset (wordid="UINT64_FMT"(%s)(%d), "
+ LOC_FAIL(( fp, "unexpected doclist offset (wordid=" UINT64_FMT "(%s)(%d), "
"doclist_offset=%u, expected_offset=%u)",
(uint64_t)tWord.m_uWordID, sWord+1, nWordsRead,
tWord.m_uDoc, uDocOffset ));
@@ -4799,7 +4799,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>=pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4811,7 +4811,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>=pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4822,7 +4822,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>=pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4837,7 +4837,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>=pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4847,7 +4847,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4860,7 +4860,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pIn>pMaxDoc )
{
LOC_FAIL(( fp, "reading past doclist end (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, doclist_offset=%u, doclist_size=%d)",
+ "read_wordid=" UINT64_FMT ", read_word=%s, doclist_offset=%u, doclist_size=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, uDocOffset, tSegment.m_dDocs.GetLength() ));
break;
@@ -4871,14 +4871,14 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( tDoc.m_uDocID<=uPrevDocID )
{
LOC_FAIL(( fp, "docid decreased (segment=%d, word=%d, "
- "read_wordid="UINT64_FMT", read_word=%s, docid="UINT64_FMT", prev_docid="UINT64_FMT")",
+ "read_wordid=" UINT64_FMT ", read_word=%s, docid=" UINT64_FMT ", prev_docid=" UINT64_FMT ")",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, sWord+1, (uint64_t)tDoc.m_uDocID, (uint64_t)uPrevDocID ));
}
if ( !tSegment.FindRow ( tDoc.m_uDocID ) )
LOC_FAIL(( fp, "no attributes found (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT")",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ")",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID ));
@@ -4893,14 +4893,14 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( iCounter!=1 || tDoc.m_uHits!=1 )
{
LOC_FAIL(( fp, "embedded hit with multiple occurences in a document found "
- "(segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT")",
+ "(segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ")",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID ));
}
if ( (int)uFieldId>m_tSchema.m_dFields.GetLength() || uFieldId>SPH_MAX_FIELDS )
{
LOC_FAIL(( fp, "invalid field id in an embedded hit (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT", field_id=%u, total_fields=%d)",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ", field_id=%u, total_fields=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, uFieldId, m_tSchema.m_dFields.GetLength() ));
}
@@ -4908,7 +4908,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( !( tDoc.m_uDocFields & ( 1 << uFieldId ) ) )
{
LOC_FAIL(( fp, "invalid field id: not in doclist mask (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT", field_id=%u, field_mask=%u)",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ", field_id=%u, field_mask=%u)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, uFieldId, tDoc.m_uDocFields ));
}
@@ -4918,14 +4918,14 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( tDoc.m_uHit!=uExpectedHitOffset )
{
LOC_FAIL(( fp, "unexpected hitlist offset (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT", offset=%u, expected_offset=%u",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ", offset=%u, expected_offset=%u",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, tDoc.m_uHit, uExpectedHitOffset ));
}
if ( tDoc.m_uHit && tDoc.m_uHit<=uPrevHitOffset )
{
- LOC_FAIL(( fp, "hitlist offset decreased (segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT", offset=%u, prev_offset=%u",
+ LOC_FAIL(( fp, "hitlist offset decreased (segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ", offset=%u, prev_offset=%u",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, tDoc.m_uHit, uPrevHitOffset ));
}
@@ -4941,7 +4941,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
pCurHit = UnzipDword ( &uValue, pCurHit );
if ( pCurHit>pMaxHit )
{
- LOC_FAIL(( fp, "reading past hitlist end (segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT")",
+ LOC_FAIL(( fp, "reading past hitlist end (segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ")",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID ));
break;
}
@@ -4955,7 +4955,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( (int)uFieldId>m_tSchema.m_dFields.GetLength() || uFieldId>SPH_MAX_FIELDS )
{
LOC_FAIL(( fp, "invalid field id in a hitlist (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT", field_id=%u, total_fields=%d)",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ", field_id=%u, total_fields=%d)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, uFieldId, m_tSchema.m_dFields.GetLength() ));
}
@@ -4963,7 +4963,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( !( tDoc.m_uDocFields & ( 1 << uFieldId ) ) )
{
LOC_FAIL(( fp, "invalid field id: not in doclist mask (segment=%d, word=%d, "
- "wordid="UINT64_FMT", docid="UINT64_FMT", field_id=%u, field_mask=%u)",
+ "wordid=" UINT64_FMT ", docid=" UINT64_FMT ", field_id=%u, field_mask=%u)",
iSegment, nWordsRead,
(uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, uFieldId, tDoc.m_uDocFields ));
}
@@ -4976,13 +4976,13 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( uLastPosInField && uPosInField<=uLastPosInField )
{
- LOC_FAIL(( fp, "hit position in field decreased (segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT", pos=%u, last_pos=%u)",
+ LOC_FAIL(( fp, "hit position in field decreased (segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ", pos=%u, last_pos=%u)",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, uPosInField, uLastPosInField ));
}
if ( bLastInField && bLastInFieldFound )
{
- LOC_FAIL(( fp, "duplicate last-in-field hit found (segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT")",
+ LOC_FAIL(( fp, "duplicate last-in-field hit found (segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ")",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID ));
}
@@ -4997,7 +4997,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
DWORD uAvailFieldMask = ( 1 << m_tSchema.m_dFields.GetLength() ) - 1;
if ( tDoc.m_uDocFields & ~uAvailFieldMask )
{
- LOC_FAIL(( fp, "wrong document field mask (segment=%d, word=%d, wordid="UINT64_FMT", docid="UINT64_FMT", mask=%u, total_fields=%d",
+ LOC_FAIL(( fp, "wrong document field mask (segment=%d, word=%d, wordid=" UINT64_FMT ", docid=" UINT64_FMT ", mask=%u, total_fields=%d",
iSegment, nWordsRead, (uint64_t)tWord.m_uWordID, (uint64_t)tDoc.m_uDocID, tDoc.m_uDocFields, m_tSchema.m_dFields.GetLength() ));
}
@@ -5041,7 +5041,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
i, iSegment, tCP.m_sWord, tCP.m_iOffset, tRefCP.m_sWord, tRefCP.m_iOffset ));
} else
{
- LOC_FAIL(( fp, "word checkpoint %d differs (segment=%d, readid="UINT64_FMT", readpos=%d, calcid="UINT64_FMT", calcpos=%d)",
+ LOC_FAIL(( fp, "word checkpoint %d differs (segment=%d, readid=" UINT64_FMT ", readpos=%d, calcid=" UINT64_FMT ", calcpos=%d)",
i, iSegment, (uint64_t)tCP.m_uWordID, tCP.m_iOffset, (int64_t)tRefCP.m_uWordID, tRefCP.m_iOffset ));
}
}
@@ -5151,7 +5151,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
for ( DWORD uRow=0; pRow<pRowMax; uRow++, pRow+=m_iStride )
{
if ( uLastID>=DOCINFO2ID(pRow) )
- LOC_FAIL(( fp, "docid decreased in attributes (segment=%d, row=%u, docid="DOCID_FMT", lastid="DOCID_FMT")",
+ LOC_FAIL(( fp, "docid decreased in attributes (segment=%d, row=%u, docid=" DOCID_FMT ", lastid=" DOCID_FMT ")",
iSegment, uRow, DOCINFO2ID(pRow), uLastID ));
uLastID = DOCINFO2ID(pRow);
@@ -5172,14 +5172,14 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pMvaBase+uOffset>=pMvaMax )
{
- LOC_FAIL(( fp, "MVA index out of bounds (segment=%d, row=%u, mvaattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "MVA index out of bounds (segment=%d, row=%u, mvaattr=%d, docid=" DOCID_FMT ", index=%u)",
iSegment, uRow, iItem, uLastID, uOffset ));
continue;
}
if ( pMvaCur!=pMvaBase+uOffset )
{
- LOC_FAIL(( fp, "wrong MVA offset (segment=%d, row=%u, mvaattr=%d, docid="DOCID_FMT", expected=%u, got=%u)",
+ LOC_FAIL(( fp, "wrong MVA offset (segment=%d, row=%u, mvaattr=%d, docid=" DOCID_FMT ", expected=%u, got=%u)",
iSegment, uRow, iItem, uLastID, (DWORD)(pMvaCur-pMvaBase), uOffset ));
pMvaCur = pMvaBase+uOffset;
@@ -5190,7 +5190,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( pMvaCur+uValues-1>=pMvaMax )
{
- LOC_FAIL(( fp, "MVA count out of bounds (segment=%d, row=%u, mvaattr=%d, docid="DOCID_FMT", count=%u)",
+ LOC_FAIL(( fp, "MVA count out of bounds (segment=%d, row=%u, mvaattr=%d, docid=" DOCID_FMT ", count=%u)",
iSegment, uRow, iItem, uLastID, uValues ));
pMvaCur += uValues;
continue;
@@ -5214,7 +5214,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
if ( iCur<=iPrev )
{
- LOC_FAIL(( fp, "unsorted MVA values (segment=%d, row=%u, mvaattr=%d, docid="DOCID_FMT", val[%u]="INT64_FMT", val[%u]="INT64_FMT")",
+ LOC_FAIL(( fp, "unsorted MVA values (segment=%d, row=%u, mvaattr=%d, docid=" DOCID_FMT ", val[%u]=" INT64_FMT ", val[%u]=" INT64_FMT ")",
iSegment, uRow, iItem, uLastID, ( iItem>=iMva64 ? uVal-2 : uVal-1 ), iPrev, uVal, iCur ));
}
@@ -5238,12 +5238,12 @@ int RtIndex_t::DebugCheck ( FILE * fp )
// check normalized
if ( uExp==0 && uMantissa!=0 )
- LOC_FAIL(( fp, "float attribute value is unnormalized (segment=%d, row=%u, attr=%d, id="DOCID_FMT", raw=0x%x, value=%f)",
+ LOC_FAIL(( fp, "float attribute value is unnormalized (segment=%d, row=%u, attr=%d, id=" DOCID_FMT ", raw=0x%x, value=%f)",
iSegment, uRow, iItem, uLastID, uValue, sphDW2F ( uValue ) ));
// check +-inf
if ( uExp==0xff && uMantissa==0 )
- LOC_FAIL(( fp, "float attribute is infinity (segment=%d, row=%u, attr=%d, id="DOCID_FMT", raw=0x%x, value=%f)",
+ LOC_FAIL(( fp, "float attribute is infinity (segment=%d, row=%u, attr=%d, id=" DOCID_FMT ", raw=0x%x, value=%f)",
iSegment, uRow, iItem, uLastID, uValue, sphDW2F ( uValue ) ));
}
@@ -5258,7 +5258,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
const DWORD uOffset = (DWORD)sphGetRowAttr ( pAttrs, dStrItems[iItem] );
if ( uOffset>=(DWORD)tSegment.m_dStrings.GetLength() )
{
- LOC_FAIL(( fp, "string offset out of bounds (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "string offset out of bounds (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", index=%u)",
iSegment, uRow, iItem, uLastID, uOffset ));
continue;
}
@@ -5267,12 +5267,12 @@ int RtIndex_t::DebugCheck ( FILE * fp )
continue;
if ( uLastStrOffset>=uOffset )
- LOC_FAIL(( fp, "string offset decreased (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", offset=%u, last_offset=%u)",
+ LOC_FAIL(( fp, "string offset decreased (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", offset=%u, last_offset=%u)",
iSegment, uRow, iItem, uLastID, uOffset, uLastStrOffset ));
if ( !dStringOffsets.BinarySearch ( uOffset ) )
{
- LOC_FAIL(( fp, "string offset is not a string start (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", offset=%u)",
+ LOC_FAIL(( fp, "string offset is not a string start (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", offset=%u)",
iSegment, uRow, iItem, uLastID, uOffset ));
} else
nUsedStrings++;
@@ -5307,7 +5307,7 @@ int RtIndex_t::DebugCheck ( FILE * fp )
const DWORD uOffset = (DWORD)sphGetRowAttr ( pAttrs, dJsonItems[iItem] );
if ( uOffset>=(DWORD)tSegment.m_dStrings.GetLength() )
{
- LOC_FAIL(( fp, "string(JSON) offset out of bounds (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", index=%u)",
+ LOC_FAIL(( fp, "string(JSON) offset out of bounds (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", index=%u)",
iSegment, uRow, iItem, uLastID, uOffset ));
continue;
}
@@ -5316,12 +5316,12 @@ int RtIndex_t::DebugCheck ( FILE * fp )
continue;
if ( uLastStrOffset>=uOffset )
- LOC_FAIL(( fp, "string(JSON) offset decreased (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", offset=%u, last_offset=%u)",
+ LOC_FAIL(( fp, "string(JSON) offset decreased (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", offset=%u, last_offset=%u)",
iSegment, uRow, iItem, uLastID, uOffset, uLastStrOffset ));
if ( !dStringOffsets.BinarySearch ( uOffset ) )
{
- LOC_FAIL(( fp, "string(JSON) offset is not a string start (segment=%d, row=%u, stringattr=%d, docid="DOCID_FMT", offset=%u)",
+ LOC_FAIL(( fp, "string(JSON) offset is not a string start (segment=%d, row=%u, stringattr=%d, docid=" DOCID_FMT ", offset=%u)",
iSegment, uRow, iItem, uLastID, uOffset ));
} else
nUsedJsons++;
@@ -8106,7 +8106,7 @@ bool RtIndex_t::AttachDiskIndex ( CSphIndex * pIndex,
if ( iCount + pIndex->GetKillListSize()!=iSizeMax )
{
SafeDeleteArray ( pIndexDocList );
- sError.SetSprintf ( "ATTACH failed, documents overflow (count="INT64_FMT", size max="INT64_FMT")", iCount + pIndex->GetKillListSize(), iSizeMax );
+ sError.SetSprintf ( "ATTACH failed, documents overflow (count=" INT64_FMT ", size max=" INT64_FMT ")", iCount + pIndex->GetKillListSize(), iSizeMax );
return false;
}
@@ -8158,7 +8158,7 @@ bool RtIndex_t::AttachDiskIndex ( CSphIndex * pIndex,
if ( iCount!=iSizeMax )
{
SafeDeleteArray ( pCombined );
- sError.SetSprintf ( "ATTACH failed, kill-list overflow (size="INT64_FMT", size max="INT64_FMT")", iCount, iSizeMax );
+ sError.SetSprintf ( "ATTACH failed, kill-list overflow (size=" INT64_FMT ", size max=" INT64_FMT ")", iCount, iSizeMax );
return false;
}
@@ -8755,7 +8755,7 @@ bool BinlogReader_c::CheckCrc ( const char * sOp, cons
ResetCrc();
bool bPassed = ( uRef==uCRC );
if ( !bPassed )
- sphWarning ( "binlog: %s: CRC mismatch (index=%s, tid="INT64_FMT", pos="INT64_FMT")", sOp, sIndexName ? sIndexName : "", iTid, iTxnPos );
+ sphWarning ( "binlog: %s: CRC mismatch (index=%s, tid=" INT64_FMT ", pos=" INT64_FMT ")", sOp, sIndexName ? sIndexName : "", iTid, iTxnPos );
return bPassed;
}
@@ -8977,7 +8977,7 @@ void RtBinlog_c::BinlogReconfigure ( int64_t * pTID, c
void RtBinlog_c::NotifyIndexFlush ( const char * sIndexName, int64_t iTID, bool bShutdown )
{
if ( m_bReplayMode )
- sphInfo ( "index '%s': ramchunk saved. TID="INT64_FMT"", sIndexName, iTID );
+ sphInfo ( "index '%s': ramchunk saved. TID=" INT64_FMT "", sIndexName, iTID );
if ( m_bReplayMode || m_bDisabled )
return;
@@ -9451,7 +9451,7 @@ int RtBinlog_c::ReplayBinlog ( const SmallStringHash_T
iPos = tReader.GetPos();
if ( tReader.GetDword()!=BLOP_MAGIC )
{
- sphDie ( "binlog: log missing txn marker at pos="INT64_FMT" (corrupted?)", iPos );
+ sphDie ( "binlog: log missing txn marker at pos=" INT64_FMT " (corrupted?)", iPos );
break;
}
@@ -9459,7 +9459,7 @@ int RtBinlog_c::ReplayBinlog ( const SmallStringHash_T
const uint64_t uOp = tReader.UnzipOffset ();
if ( uOp<=0 || uOp>=BLOP_TOTAL )
- sphDie ( "binlog: unexpected entry (blop="UINT64_FMT", pos="INT64_FMT")", uOp, iPos );
+ sphDie ( "binlog: unexpected entry (blop=" UINT64_FMT ", pos=" INT64_FMT ")", uOp, iPos );
// FIXME! blop might be OK but skipped (eg. index that is no longer)
switch ( uOp )
@@ -9498,10 +9498,10 @@ int RtBinlog_c::ReplayBinlog ( const SmallStringHash_T
tmReplay = sphMicroTimer() - tmReplay;
if ( tReader.GetErrorFlag() )
- sphWarning ( "binlog: log io error at pos="INT64_FMT": %s", iPos, sError.cstr() );
+ sphWarning ( "binlog: log io error at pos=" INT64_FMT ": %s", iPos, sError.cstr() );
if ( !bReplayOK )
- sphWarning ( "binlog: replay error at pos="INT64_FMT")", iPos );
+ sphWarning ( "binlog: replay error at pos=" INT64_FMT ")", iPos );
// show additional replay statistics
ARRAY_FOREACH ( i, tLog.m_dIndexInfos )
@@ -9509,17 +9509,17 @@ int RtBinlog_c::ReplayBinlog ( const SmallStringHash_T
const BinlogIndexInfo_t & tIndex = tLog.m_dIndexInfos[i];
if ( !hIndexes ( tIndex.m_sName.cstr() ) )
{
- sphWarning ( "binlog: index %s: missing; tids "INT64_FMT" to "INT64_FMT" skipped!",
+ sphWarning ( "binlog: index %s: missing; tids " INT64_FMT " to " INT64_FMT " skipped!",
tIndex.m_sName.cstr(), tIndex.m_iMinTID, tIndex.m_iMaxTID );
} else if ( tIndex.m_iPreReplayTID < tIndex.m_iMaxTID )
{
- sphInfo ( "binlog: index %s: recovered from tid "INT64_FMT" to tid "INT64_FMT,
+ sphInfo ( "binlog: index %s: recovered from tid " INT64_FMT " to tid " INT64_FMT,
tIndex.m_sName.cstr(), tIndex.m_iPreReplayTID, tIndex.m_iMaxTID );
} else
{
- sphInfo ( "binlog: index %s: skipped at tid "INT64_FMT" and max binlog tid "INT64_FMT,
+ sphInfo ( "binlog: index %s: skipped at tid " INT64_FMT " and max binlog tid " INT64_FMT,
tIndex.m_sName.cstr(), tIndex.m_iPreReplayTID, tIndex.m_iMaxTID );
}
}
@@ -9544,7 +9544,7 @@ static BinlogIndexInfo_t & ReplayIndexID ( BinlogReade
const int iVal = (int)tReader.UnzipOffset();
if ( iVal<0 || iVal>=tLog.m_dIndexInfos.GetLength() )
- sphDie ( "binlog: %s: unexpected index id (id=%d, max=%d, pos="INT64_FMT")",
+ sphDie ( "binlog: %s: unexpected index id (id=%d, max=%d, pos=" INT64_FMT ")",
sPlace, iVal, tLog.m_dIndexInfos.GetLength(), iTxnPos );
return tLog.m_dIndexInfos[iVal];
@@ -9594,18 +9594,18 @@ bool RtBinlog_c::ReplayCommit ( int iBinlog, DWORD uRe
// check TID
if ( iTID<tIndex.m_iMaxTID )
- sphDie ( "binlog: commit: descending tid (index=%s, lasttid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: commit: descending tid (index=%s, lasttid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_iMaxTID, iTID, iTxnPos );
// check timestamp
if ( tmStamp<tIndex.m_tmMax )
{
if (!( uReplayFlags & SPH_REPLAY_ACCEPT_DESC_TIMESTAMP ))
- sphDie ( "binlog: commit: descending time (index=%s, lasttime="INT64_FMT", logtime="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: commit: descending time (index=%s, lasttime=" INT64_FMT ", logtime=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_tmMax, tmStamp, iTxnPos );
sphWarning ( "binlog: commit: replaying txn despite descending time "
- "(index=%s, logtid="INT64_FMT", lasttime="INT64_FMT", logtime="INT64_FMT", pos="INT64_FMT")",
+ "(index=%s, logtid=" INT64_FMT ", lasttime=" INT64_FMT ", logtime=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), iTID, tIndex.m_tmMax, tmStamp, iTxnPos );
tIndex.m_tmMax = tmStamp;
}
@@ -9616,7 +9616,7 @@ bool RtBinlog_c::ReplayCommit ( int iBinlog, DWORD uRe
// we normally expect per-index TIDs to be sequential
// but let's be graceful about that
if ( iTID!=tIndex.m_pRT->m_iTID+1 )
- sphWarning ( "binlog: commit: unexpected tid (index=%s, indextid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphWarning ( "binlog: commit: unexpected tid (index=%s, indextid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_pRT->m_iTID, iTID, iTxnPos );
// in case dict=keywords
@@ -9651,7 +9651,7 @@ bool RtBinlog_c::ReplayIndexAdd ( int iBinlog, const S
uint64_t uVal = tReader.UnzipOffset();
if ( (int)uVal!=tLog.m_dIndexInfos.GetLength() )
- sphDie ( "binlog: indexadd: unexpected index id (id="UINT64_FMT", expected=%d, pos="INT64_FMT")",
+ sphDie ( "binlog: indexadd: unexpected index id (id=" UINT64_FMT ", expected=%d, pos=" INT64_FMT ")",
uVal, tLog.m_dIndexInfos.GetLength(), iTxnPos );
// load data
@@ -9667,7 +9667,7 @@ bool RtBinlog_c::ReplayIndexAdd ( int iBinlog, const S
// check for index name dupes
ARRAY_FOREACH ( i, tLog.m_dIndexInfos )
if ( tLog.m_dIndexInfos[i].m_sName==sName )
- sphDie ( "binlog: duplicate index name (name=%s, dupeid=%d, pos="INT64_FMT")",
+ sphDie ( "binlog: duplicate index name (name=%s, dupeid=%d, pos=" INT64_FMT ")",
sName.cstr(), i, iTxnPos );
// not a dupe, lets add
@@ -9724,10 +9724,10 @@ bool RtBinlog_c::ReplayUpdateAttributes ( int iBinlog,
// check TID, time order in log
if ( iTID<tIndex.m_iMaxTID )
- sphDie ( "binlog: update: descending tid (index=%s, lasttid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: update: descending tid (index=%s, lasttid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_iMaxTID, iTID, iTxnPos );
if ( tmStamp<tIndex.m_tmMax )
- sphDie ( "binlog: update: descending time (index=%s, lasttime="INT64_FMT", logtime="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: update: descending time (index=%s, lasttime=" INT64_FMT ", logtime=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_tmMax, tmStamp, iTxnPos );
if ( tIndex.m_pIndex && iTID > tIndex.m_pIndex->m_iTID )
@@ -9735,7 +9735,7 @@ bool RtBinlog_c::ReplayUpdateAttributes ( int iBinlog,
// we normally expect per-index TIDs to be sequential
// but let's be graceful about that
if ( iTID!=tIndex.m_pIndex->m_iTID+1 )
- sphWarning ( "binlog: update: unexpected tid (index=%s, indextid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphWarning ( "binlog: update: unexpected tid (index=%s, indextid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_pIndex->m_iTID, iTID, iTxnPos );
tUpd.m_dRows.Resize ( tUpd.m_dDocids.GetLength() );
@@ -9803,7 +9803,7 @@ bool RtBinlog_c::ReplayCacheAdd ( int iBinlog, BinlogR
if ( tCache.m_iMinTID!=tIndex.m_iMinTID || tCache.m_iMaxTID!=tIndex.m_iMaxTID )
{
sphWarning ( "binlog: cache mismatch: index %s tid ranges mismatch "
- "(cached "INT64_FMT" to "INT64_FMT", replayed "INT64_FMT" to "INT64_FMT")",
+ "(cached " INT64_FMT " to " INT64_FMT ", replayed " INT64_FMT " to " INT64_FMT ")",
tCache.m_sName.cstr(),
tCache.m_iMinTID, tCache.m_iMaxTID, tIndex.m_iMinTID, tIndex.m_iMaxTID );
}
@@ -9831,7 +9831,7 @@ bool RtBinlog_c::ReplayReconfigure ( int iBinlog, DWOR
CSphReconfigureSettings tSettings;
LoadIndexSettings ( tSettings.m_tIndex, tReader, INDEX_FORMAT_VERSION );
if ( !LoadTokenizerSettings ( tReader, tSettings.m_tTokenizer, tEmbeddedFiles, INDEX_FORMAT_VERSION, sError ) )
- sphDie ( "binlog: reconfigure: failed to load settings (index=%s, lasttid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT", error=%s)",
+ sphDie ( "binlog: reconfigure: failed to load settings (index=%s, lasttid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ", error=%s)",
tIndex.m_sName.cstr(), tIndex.m_iMaxTID, iTID, iTxnPos, sError.cstr() );
LoadDictionarySettings ( tReader, tSettings.m_tDict, tEmbeddedFiles, INDEX_FORMAT_VERSION, sError );
@@ -9841,18 +9841,18 @@ bool RtBinlog_c::ReplayReconfigure ( int iBinlog, DWOR
// check TID
if ( iTID<tIndex.m_iMaxTID )
- sphDie ( "binlog: reconfigure: descending tid (index=%s, lasttid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: reconfigure: descending tid (index=%s, lasttid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_iMaxTID, iTID, iTxnPos );
// check timestamp
if ( tmStamp<tIndex.m_tmMax )
{
if (!( uReplayFlags & SPH_REPLAY_ACCEPT_DESC_TIMESTAMP ))
- sphDie ( "binlog: reconfigure: descending time (index=%s, lasttime="INT64_FMT", logtime="INT64_FMT", pos="INT64_FMT")",
+ sphDie ( "binlog: reconfigure: descending time (index=%s, lasttime=" INT64_FMT ", logtime=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_tmMax, tmStamp, iTxnPos );
sphWarning ( "binlog: reconfigure: replaying txn despite descending time "
- "(index=%s, logtid="INT64_FMT", lasttime="INT64_FMT", logtime="INT64_FMT", pos="INT64_FMT")",
+ "(index=%s, logtid=" INT64_FMT ", lasttime=" INT64_FMT ", logtime=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), iTID, tIndex.m_tmMax, tmStamp, iTxnPos );
tIndex.m_tmMax = tmStamp;
}
@@ -9863,7 +9863,7 @@ bool RtBinlog_c::ReplayReconfigure ( int iBinlog, DWOR
// we normally expect per-index TIDs to be sequential
// but let's be graceful about that
if ( iTID!=tIndex.m_pRT->m_iTID+1 )
- sphWarning ( "binlog: reconfigure: unexpected tid (index=%s, indextid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT")",
+ sphWarning ( "binlog: reconfigure: unexpected tid (index=%s, indextid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ")",
tIndex.m_sName.cstr(), tIndex.m_pRT->m_iTID, iTID, iTxnPos );
sError = "";
@@ -9871,7 +9871,7 @@ bool RtBinlog_c::ReplayReconfigure ( int iBinlog, DWOR
bool bSame = tIndex.m_pRT->IsSameSettings ( tSettings, tSetup, sError );
if ( !sError.IsEmpty() )
- sphWarning ( "binlog: reconfigure: wrong settings (index=%s, indextid="INT64_FMT", logtid="INT64_FMT", pos="INT64_FMT", error=%s)",
+ sphWarning ( "binlog: reconfigure: wrong settings (index=%s, indextid=" INT64_FMT ", logtid=" INT64_FMT ", pos=" INT64_FMT ", error=%s)",
tIndex.m_sName.cstr(), tIndex.m_pRT->m_iTID, iTID, iTxnPos, sError.cstr() );
if ( !bSame )

View File

@ -1,36 +1,19 @@
$OpenBSD: patch-src_sphinxstd_cpp,v 1.3 2018/04/10 22:04:52 sthen Exp $
$OpenBSD: patch-src_sphinxstd_cpp,v 1.4 2020/11/20 14:18:22 sthen Exp $
Index: src/sphinxstd.cpp
--- src/sphinxstd.cpp.orig
+++ src/sphinxstd.cpp
@@ -630,7 +630,7 @@ void * operator new ( size_t iSize )
{
void * pResult = ::malloc ( iSize );
if ( !pResult )
- sphDieRestart ( "out of memory (unable to allocate "UINT64_FMT" bytes)", (uint64_t)iSize ); // FIXME! this may fail with malloc error too
+ sphDieRestart ( "out of memory (unable to allocate " UINT64_FMT " bytes)", (uint64_t)iSize ); // FIXME! this may fail with malloc error too
return pResult;
}
@@ -639,7 +639,7 @@ void * operator new [] ( size_t iSize )
{
void * pResult = ::malloc ( iSize );
if ( !pResult )
- sphDieRestart ( "out of memory (unable to allocate "UINT64_FMT" bytes)", (uint64_t)iSize ); // FIXME! this may fail with malloc error too
+ sphDieRestart ( "out of memory (unable to allocate " UINT64_FMT " bytes)", (uint64_t)iSize ); // FIXME! this may fail with malloc error too
return pResult;
}
@@ -825,13 +825,6 @@ CSphProcessSharedMutex::CSphProcessSharedMutex ( int i
if ( iRes )
{
@@ -827,13 +827,6 @@ CSphProcessSharedMutex::CSphProcessSharedMutex ( int i
m_sError.SetSprintf ( "pthread_mutexattr_init, errno=%d", iRes );
- return;
- }
return;
}
- iRes = pthread_mutexattr_setpshared ( &tAttr, PTHREAD_PROCESS_SHARED );
- if ( iRes )
- {
- m_sError.SetSprintf ( "pthread_mutexattr_setpshared, errno = %d", iRes );
- pthread_mutexattr_destroy ( &tAttr );
return;
}
- return;
- }
CSphString sError, sWarning;
if ( !m_pStorage.Alloc ( sizeof(pthread_mutex_t) + iExtraSize, sError, sWarning ) )

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-src_sphinxstd_h,v 1.1 2018/04/10 22:04:52 sthen Exp $
Index: src/sphinxstd.h
--- src/sphinxstd.h.orig
+++ src/sphinxstd.h
@@ -2391,10 +2391,10 @@ class CSphSharedBuffer : public CSphBufferTrait < T >
if ( pData==MAP_FAILED )
{
if ( iLength>(int64_t)0x7fffffffUL )
- sError.SetSprintf ( "mmap() failed: %s (length="INT64_FMT" is over 2GB, impossible on some 32-bit systems)",
+ sError.SetSprintf ( "mmap() failed: %s (length=" INT64_FMT " is over 2GB, impossible on some 32-bit systems)",
strerror(errno), iLength );
else
- sError.SetSprintf ( "mmap() failed: %s (length="INT64_FMT")", strerror(errno), iLength );
+ sError.SetSprintf ( "mmap() failed: %s (length=" INT64_FMT ")", strerror(errno), iLength );
return false;
}
@@ -2430,9 +2430,9 @@ class CSphSharedBuffer : public CSphBufferTrait < T >
return true;
if ( sError.IsEmpty() )
- sError.SetSprintf ( "%s mlock() failed: bytes="INT64_FMT", error=%s", sPrefix, (int64_t)this->GetLengthBytes(), strerror(errno) );
+ sError.SetSprintf ( "%s mlock() failed: bytes=" INT64_FMT ", error=%s", sPrefix, (int64_t)this->GetLengthBytes(), strerror(errno) );
else
- sError.SetSprintf ( "%s; %s mlock() failed: bytes="INT64_FMT", error=%s", sError.cstr(), sPrefix, (int64_t)this->GetLengthBytes(), strerror(errno) );
+ sError.SetSprintf ( "%s; %s mlock() failed: bytes=" INT64_FMT ", error=%s", sError.cstr(), sPrefix, (int64_t)this->GetLengthBytes(), strerror(errno) );
return false;
}
#endif
@@ -2559,7 +2559,7 @@ class CSphMappedBuffer : public CSphBufferTrait < T >
pData = (T *)mmap ( NULL, iFileSize, PROT_READ, MAP_PRIVATE, iFD, 0 );
if ( pData==MAP_FAILED )
{
- sError.SetSprintf ( "failed to mmap file '%s': %s (length="INT64_FMT")", sFile, strerror(errno), iFileSize );
+ sError.SetSprintf ( "failed to mmap file '%s': %s (length=" INT64_FMT ")", sFile, strerror(errno), iFileSize );
Close();
return false;
}

View File

@ -1,18 +1,9 @@
$OpenBSD: patch-src_sphinxutils_cpp,v 1.1 2018/04/10 22:04:52 sthen Exp $
$OpenBSD: patch-src_sphinxutils_cpp,v 1.2 2020/11/20 14:18:22 sthen Exp $
Index: src/sphinxutils.cpp
--- src/sphinxutils.cpp.orig
+++ src/sphinxutils.cpp
@@ -274,7 +274,7 @@ int CSphConfigSection::GetSize ( const char * sKey, in
if ( iSize>INT_MAX )
{
iSize = INT_MAX;
- sphWarning ( "'%s = "INT64_FMT"' clamped to %d(INT_MAX)", sKey, iSize, INT_MAX );
+ sphWarning ( "'%s = " INT64_FMT "' clamped to %d(INT_MAX)", sKey, iSize, INT_MAX );
}
return (int)iSize;
}
@@ -1980,11 +1980,11 @@ void sphBacktrace ( int iFD, bool bSafe )
@@ -2103,11 +2103,11 @@ void sphBacktrace ( int iFD, bool bSafe )
#endif
#ifdef CONFIGURE_FLAGS

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-test_Makefile,v 1.1 2012/07/19 14:56:59 giovanni Exp $
--- test/Makefile.orig Fri May 25 18:22:09 2012
+++ test/Makefile Fri May 25 18:22:28 2012
@@ -7,7 +7,7 @@ info:
dist:
check:
- php ubertest.php t -u test
+ ${MODPHP_BIN} ubertest.php t -u test
clean:
sh clean.sh

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.3 2015/06/22 08:00:07 jasper Exp $
@comment $OpenBSD: PLIST,v 1.4 2020/11/20 14:18:22 sthen Exp $
@bin bin/indexer
@bin bin/indextool
@bin bin/searchd
@ -6,7 +6,6 @@
@bin bin/wordbreaker
@man man/man1/indexer.1
@man man/man1/indextool.1
@man man/man1/search.1
@man man/man1/searchd.1
@man man/man1/spelldump.1
share/doc/sphinx/