From a2ee36b0431c76475e413cd51a5d0d48c2c6ec01 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Thu, 4 May 2023 21:01:32 +0200 Subject: [PATCH 1/2] keep original attr/field order --- src/schema/helper.h | 2 ++ src/schema/ischema.h | 3 ++ src/schema/rset.cpp | 7 ++++- src/schema/rset.h | 1 + src/searchd.cpp | 58 +++++++++++++++++++++++++++++++++++-- src/sphinxsort.cpp | 4 +++ test/helpers.inc | 34 ---------------------- test/test_188/model.bin | 2 +- test/test_199/model.bin | 2 +- test/test_227/model.bin | 4 +-- test/test_233/model.bin | 12 ++++---- test/test_234/model.bin | 2 +- test/test_246/model.bin | 64 ++++++++++++++++++++--------------------- test/test_248/model.bin | 32 ++++++++++----------- test/test_250/model.bin | 12 ++++---- test/test_252/model.bin | 8 +++--- test/test_255/model.bin | 16 +++++------ test/test_260/model.bin | 16 +++++------ test/test_317/model.bin | 32 ++++++++++----------- test/test_371/model.bin | 2 +- test/test_373/model.bin | 4 +-- test/test_445/model.bin | 2 +- 22 files changed, 177 insertions(+), 142 deletions(-) diff --git a/src/schema/helper.h b/src/schema/helper.h index a35fb22a99..a8f7fa5e08 100644 --- a/src/schema/helper.h +++ b/src/schema/helper.h @@ -19,6 +19,8 @@ class CSphSchemaHelper : public ISphSchema { public: void FreeDataPtrs ( CSphMatch & tMatch ) const final; + int GetAttrIndexOriginal ( const char * szName ) const { return GetAttrIndex(szName); } + void CloneMatch ( CSphMatch & tDst, const CSphMatch & rhs ) const final; /// clone all raw attrs and only specified ptrs diff --git a/src/schema/ischema.h b/src/schema/ischema.h index ccfbbe3134..8e4c51caf8 100644 --- a/src/schema/ischema.h +++ b/src/schema/ischema.h @@ -69,6 +69,9 @@ class ISphSchema /// free all allocated attibures. Does NOT free m_pDynamic of match itself! virtual void FreeDataPtrs ( CSphMatch & tMatch ) const = 0; + /// return original attribute id (for compound schemas) + virtual int GetAttrIndexOriginal ( const char * szName ) const = 0; + /// simple copy; clones either the entire dynamic part, or a part thereof virtual void CloneMatch ( CSphMatch & tDst, const CSphMatch & rhs ) const = 0; diff --git a/src/schema/rset.cpp b/src/schema/rset.cpp index 8e324a0d97..deb17f707c 100644 --- a/src/schema/rset.cpp +++ b/src/schema/rset.cpp @@ -92,6 +92,12 @@ int CSphRsetSchema::GetAttrIndex ( const char* sName ) const } +int CSphRsetSchema::GetAttrIndexOriginal ( const char * szName ) const +{ + return m_pIndexSchema->GetAttrIndex ( szName ); +} + + int CSphRsetSchema::GetFieldIndex ( const char * szName ) const { if ( !m_pIndexSchema ) @@ -204,7 +210,6 @@ CSphRsetSchema::CSphRsetSchema ( const CSphRsetSchema& rhs ) m_dRemoved = rhs.m_dRemoved; } - void CSphRsetSchema::RemoveStaticAttr ( int iAttr ) { assert ( m_pIndexSchema ); diff --git a/src/schema/rset.h b/src/schema/rset.h index c7eb86d1da..48229156f3 100644 --- a/src/schema/rset.h +++ b/src/schema/rset.h @@ -50,6 +50,7 @@ class CSphRsetSchema: public CSphSchemaHelper int GetAttrsCount() const final; int GetFieldsCount() const final; int GetAttrIndex ( const char* sName ) const final; + int GetAttrIndexOriginal ( const char * szName ) const final; int GetFieldIndex ( const char* sName ) const final; const CSphColumnInfo & GetField ( int iIndex ) const final; const CSphColumnInfo * GetField ( const char * szName ) const final; diff --git a/src/searchd.cpp b/src/searchd.cpp index 583d2f2782..34c9d3737c 100644 --- a/src/searchd.cpp +++ b/src/searchd.cpp @@ -3881,6 +3881,55 @@ bool GetItemsLeftInSchema ( const ISphSchema & tSchema, bool bOnlyPlain, const C } +struct AttrSort_fn +{ + const ISphSchema & m_tSchema; + + AttrSort_fn ( const ISphSchema & tSchema ) + : m_tSchema ( tSchema ) + {} + + bool IsLess ( int iA, int iB ) const + { + const auto & sNameA = m_tSchema.GetAttr(iA).m_sName; + const auto & sNameB = m_tSchema.GetAttr(iB).m_sName; + bool bDocIdA = sNameA==sphGetDocidName(); + bool bDocIdB = sNameB==sphGetDocidName(); + if ( bDocIdA || bDocIdB ) + return bDocIdA || !bDocIdB; + + bool bBlobLocA = sNameA==sphGetBlobLocatorName(); + bool bBlobLocB = sNameB==sphGetBlobLocatorName(); + if ( bBlobLocA ||bBlobLocB ) + return bBlobLocA || !bBlobLocB; + + bool bFieldA = !!m_tSchema.GetField ( sNameA.cstr() ); + bool bFieldB = !!m_tSchema.GetField ( sNameB.cstr() ); + if ( bFieldA || bFieldB ) + { + if ( bFieldA && bFieldB ) + { + int iFieldIdA = m_tSchema.GetFieldIndex ( sNameA.cstr() ); + int iFieldIdB = m_tSchema.GetFieldIndex ( sNameB.cstr() ); + return iFieldIdA < iFieldIdB; + } + + return bFieldA || !bFieldB; + } + + int iIndexA = m_tSchema.GetAttr(iA).m_iIndex; + int iIndexB = m_tSchema.GetAttr(iB).m_iIndex; + if ( iIndexA==-1 ) + iIndexA = iA; + + if ( iIndexB==-1 ) + iIndexB = iB; + + return iIndexA < iIndexB; + } +}; + + void DoExpansion ( const ISphSchema & tSchema, const CSphVector & dAttrsInSchema, const CSphVector & dItems, CSphVector & dExpanded ) { bool bExpandedAsterisk = false; @@ -3893,7 +3942,10 @@ void DoExpansion ( const ISphSchema & tSchema, const CSphVector & dAttrsInS bExpandedAsterisk = true; - for ( auto iAttr : dAttrsInSchema ) + IntVec_t dSortedAttrsInSchema = dAttrsInSchema; + dSortedAttrsInSchema.Sort ( AttrSort_fn(tSchema) ); + + for ( auto iAttr : dSortedAttrsInSchema ) { const CSphColumnInfo & tCol = tSchema.GetAttr(iAttr); CSphQueryItem & tExpanded = dExpanded.Add(); @@ -4741,7 +4793,9 @@ void FrontendSchemaBuilder_c::Finalize() tFrontend.m_tLocator = s.m_tLocator; tFrontend.m_eAttrType = s.m_eAttrType; tFrontend.m_eAggrFunc = s.m_eAggrFunc; // for a sort loop just below - tFrontend.m_iIndex = i; // to make the aggr sort loop just below stable + if ( !m_bAgent ) + tFrontend.m_iIndex = i; // to make the aggr sort loop just below stable + tFrontend.m_uFieldFlags = s.m_uFieldFlags; } diff --git a/src/sphinxsort.cpp b/src/sphinxsort.cpp index ce92053f21..c7d2c5f177 100644 --- a/src/sphinxsort.cpp +++ b/src/sphinxsort.cpp @@ -135,6 +135,9 @@ void TransformedSchemaBuilder_c::AddAttr ( const CSphString & sName ) CSphColumnInfo tAttr = *pAttr; tAttr.m_tLocator.Reset(); + if ( tAttr.m_iIndex==-1 ) + tAttr.m_iIndex = m_tOldSchema.GetAttrIndexOriginal ( tAttr.m_sName.cstr() ); + // check if new columnar attributes were added (that were not in the select list originally) if ( tAttr.IsColumnar() ) ReplaceColumnarAttrWithExpression ( tAttr, m_tNewSchema.GetAttrsCount() ); @@ -6146,6 +6149,7 @@ bool QueueCreator_c::ParseQueryItem ( const CSphQueryItem & tItem ) m_bZonespanlist |= bHasZonespanlist; m_bExprsNeedDocids |= bExprsNeedDocids; tExprCol.m_eAggrFunc = tItem.m_eAggrFunc; + tExprCol.m_iIndex = iSorterAttr>= 0 ? m_pSorterSchema->GetAttrIndexOriginal ( tItem.m_sAlias.cstr() ) : -1; if ( !tExprCol.m_pExpr ) return Err ( "parse error: %s", m_sError.cstr() ); diff --git a/test/helpers.inc b/test/helpers.inc index c5df114aac..253d7f1ae2 100644 --- a/test/helpers.inc +++ b/test/helpers.inc @@ -924,40 +924,6 @@ function JsonRsetFixup ( &$set, $columnar, $keep_json_ctrls ) $entry["Properties"] = RemoveColumnarProperty ( $entry["Properties"] ); } } - - if ( isset ( $row["data"] ) && is_array($row["data"]) ) - { - foreach ( $row["data"] as &$data_row ) - ksort($data_row); - } - - if ( isset ( $row["columns"] ) && is_array($row["columns"]) ) - usort ( $row["columns"], "CompareColumns" ); - } - - $set["rows"] = $keep_json_ctrls ? $json_handler->Encode ( $rows ) : json_encode ( $rows ); - } - - if ( isset ( $set["http_endpoint"] ) && $set["http_endpoint"]=="cli_json" ) - { - if ( $keep_json_ctrls ) - { - $json_handler = new SafeJsonHandler(); - $rows = $json_handler->Decode ( $set["rows"], 1, 512, JSON_BIGINT_AS_STRING ); - } - else - $rows = json_decode ( $set["rows"], 1, 512, JSON_BIGINT_AS_STRING ); - - foreach ( $rows as &$row ) - { - if ( isset ( $row["data"] ) && is_array($row["data"]) ) - { - foreach ( $row["data"] as &$data_row ) - ksort($data_row); - } - - if ( isset ( $row["columns"] ) && is_array($row["columns"]) ) - usort($row["columns"], function($a, $b) { return strcmp ( key($a), key($b) ); } ); } $set["rows"] = $keep_json_ctrls ? $json_handler->Encode ( $rows ) : json_encode ( $rows ); diff --git a/test/test_188/model.bin b/test/test_188/model.bin index 95558d7302..1f937eb654 100644 --- a/test/test_188/model.bin +++ b/test/test_188/model.bin @@ -1 +1 @@ -a:1:{i:0;a:1:{i:0;a:21:{i:0;s:42:"CALL KEYWORDS ( 'apple', 'plain_stem', 1 )";i:1;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 1 hits = 1 ";i:2;s:39:"CALL KEYWORDS ( 'apple', 'rt_stem', 1 )";i:3;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 0 hits = 0 ";i:4;s:42:"ATTACH INDEX plain_stem TO RTINDEX rt_stem";i:5;s:37:"UPDATE rt_stem SET gid=111 WHERE id=1";i:6;s:24:"SELECT * FROM plain_stem";i:7;s:59:"1064; unknown local table(s) 'plain_stem' in search request";i:8;s:24:"SELECT * FROM plain_stem";i:9;s:59:"1064; unknown local table(s) 'plain_stem' in search request";i:10;s:10:"started=ok";i:11;s:39:"CALL KEYWORDS ( 'apple', 'rt_stem', 1 )";i:12;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 1 hits = 1 ";i:13;s:21:"SELECT * FROM rt_stem";i:14;s:31:"id = 1 gid = 111 title = apple ";i:15;s:30:"DELETE FROM rt_stem WHERE id=1";i:16;s:21:"SELECT * FROM rt_stem";i:17;s:24:"TRUNCATE RTINDEX rt_stem";i:18;s:42:"ATTACH INDEX plain_stem TO RTINDEX rt_stem";i:19;s:21:"SELECT * FROM rt_stem";i:20;s:30:"id = 1 gid = 11 title = apple ";}}} \ No newline at end of file +a:1:{i:0;a:1:{i:0;a:21:{i:0;s:42:"CALL KEYWORDS ( 'apple', 'plain_stem', 1 )";i:1;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 1 hits = 1 ";i:2;s:39:"CALL KEYWORDS ( 'apple', 'rt_stem', 1 )";i:3;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 0 hits = 0 ";i:4;s:42:"ATTACH INDEX plain_stem TO RTINDEX rt_stem";i:5;s:37:"UPDATE rt_stem SET gid=111 WHERE id=1";i:6;s:24:"SELECT * FROM plain_stem";i:7;s:59:"1064; unknown local table(s) 'plain_stem' in search request";i:8;s:24:"SELECT * FROM plain_stem";i:9;s:59:"1064; unknown local table(s) 'plain_stem' in search request";i:10;s:10:"started=ok";i:11;s:39:"CALL KEYWORDS ( 'apple', 'rt_stem', 1 )";i:12;s:63:"qpos = 1 tokenized = apple normalized = appl docs = 1 hits = 1 ";i:13;s:21:"SELECT * FROM rt_stem";i:14;s:31:"id = 1 title = apple gid = 111 ";i:15;s:30:"DELETE FROM rt_stem WHERE id=1";i:16;s:21:"SELECT * FROM rt_stem";i:17;s:24:"TRUNCATE RTINDEX rt_stem";i:18;s:42:"ATTACH INDEX plain_stem TO RTINDEX rt_stem";i:19;s:21:"SELECT * FROM rt_stem";i:20;s:30:"id = 1 title = apple gid = 11 ";}}} \ No newline at end of file diff --git a/test/test_199/model.bin b/test/test_199/model.bin index bb768acf48..fc08fc8702 100644 --- a/test/test_199/model.bin +++ b/test/test_199/model.bin @@ -1 +1 @@ -a:1:{i:0;a:1:{i:0;a:99:{i:0;s:79:" insert into rt1 values(1,'this is the test', 11), (2,'this is thes test', 22) ";i:1;s:79:" insert into rt2 values(1,'this is the test', 11), (2,'this is thes test', 22) ";i:2;s:47:"SELECT * FROM rt1 WHERE MATCH ( 'the test' );";i:3;s:40:"id = 1 idd = 11 text = this is the test ";i:4;s:41:"id = 2 idd = 22 text = this is thes test ";i:5;s:9:"SHOW META";i:6;s:9:"total = 2";i:7;s:15:"total_found = 2";i:8;s:19:"total_relation = eq";i:9;s:17:"keyword[0] = test";i:10;s:11:"docs[0] = 2";i:11;s:11:"hits[0] = 2";i:12;s:47:"SELECT * FROM rt2 WHERE MATCH ( 'the test' );";i:13;s:40:"id = 1 idd = 11 text = this is the test ";i:14;s:41:"id = 2 idd = 22 text = this is thes test ";i:15;s:9:"SHOW META";i:16;s:9:"total = 2";i:17;s:15:"total_found = 2";i:18;s:19:"total_relation = eq";i:19;s:17:"keyword[0] = test";i:20;s:11:"docs[0] = 2";i:21;s:11:"hits[0] = 2";i:22;s:46:"SELECT * FROM i1 WHERE MATCH ( 'the test' );";i:23;s:40:"id = 1 idd = 11 text = this is the test ";i:24;s:41:"id = 2 idd = 22 text = this is thes test ";i:25;s:9:"SHOW META";i:26;s:9:"total = 2";i:27;s:15:"total_found = 2";i:28;s:19:"total_relation = eq";i:29;s:17:"keyword[0] = test";i:30;s:11:"docs[0] = 2";i:31;s:11:"hits[0] = 2";i:32;s:46:"SELECT * FROM i2 WHERE MATCH ( 'the test' );";i:33;s:40:"id = 1 idd = 11 text = this is the test ";i:34;s:41:"id = 2 idd = 22 text = this is thes test ";i:35;s:9:"SHOW META";i:36;s:9:"total = 2";i:37;s:15:"total_found = 2";i:38;s:19:"total_relation = eq";i:39;s:17:"keyword[0] = test";i:40;s:11:"docs[0] = 2";i:41;s:11:"hits[0] = 2";i:42;s:29:"SET GLOBAL @filter1 = ( 101 )";i:43;s:39:"SELECT * FROM idx WHERE idd IN @filter1";i:44;s:30:"id = 1 idd = 101 text = test1 ";i:45;s:9:"SHOW META";i:46;s:9:"total = 1";i:47;s:15:"total_found = 1";i:48;s:19:"total_relation = eq";i:49;s:33:"SET GLOBAL @filter1 = ( 22, 102 )";i:50;s:10:"started=ok";i:51;s:39:"SELECT * FROM idx WHERE idd IN @filter1";i:52;s:30:"id = 2 idd = 102 text = test2 ";i:53;s:9:"SHOW META";i:54;s:9:"total = 1";i:55;s:15:"total_found = 1";i:56;s:19:"total_relation = eq";i:57;s:33:"SET GLOBAL @filter1 = ( 22, 103 )";i:58;s:10:"started=ok";i:59;s:47:"SELECT * FROM rt1 WHERE MATCH ( 'the test' );";i:60;s:40:"id = 1 idd = 11 text = this is the test ";i:61;s:41:"id = 2 idd = 22 text = this is thes test ";i:62;s:9:"SHOW META";i:63;s:9:"total = 2";i:64;s:15:"total_found = 2";i:65;s:19:"total_relation = eq";i:66;s:17:"keyword[0] = test";i:67;s:11:"docs[0] = 2";i:68;s:11:"hits[0] = 2";i:69;s:47:"SELECT * FROM rt2 WHERE MATCH ( 'the test' );";i:70;s:40:"id = 1 idd = 11 text = this is the test ";i:71;s:41:"id = 2 idd = 22 text = this is thes test ";i:72;s:9:"SHOW META";i:73;s:9:"total = 2";i:74;s:15:"total_found = 2";i:75;s:19:"total_relation = eq";i:76;s:17:"keyword[0] = test";i:77;s:11:"docs[0] = 2";i:78;s:11:"hits[0] = 2";i:79;s:46:"SELECT * FROM i1 WHERE MATCH ( 'the test' );";i:80;s:40:"id = 1 idd = 11 text = this is the test ";i:81;s:41:"id = 2 idd = 22 text = this is thes test ";i:82;s:9:"SHOW META";i:83;s:9:"total = 2";i:84;s:15:"total_found = 2";i:85;s:19:"total_relation = eq";i:86;s:17:"keyword[0] = test";i:87;s:11:"docs[0] = 2";i:88;s:11:"hits[0] = 2";i:89;s:46:"SELECT * FROM i2 WHERE MATCH ( 'the test' );";i:90;s:40:"id = 1 idd = 11 text = this is the test ";i:91;s:41:"id = 2 idd = 22 text = this is thes test ";i:92;s:9:"SHOW META";i:93;s:9:"total = 2";i:94;s:15:"total_found = 2";i:95;s:19:"total_relation = eq";i:96;s:17:"keyword[0] = test";i:97;s:11:"docs[0] = 2";i:98;s:11:"hits[0] = 2";}}} \ No newline at end of file +a:1:{i:0;a:1:{i:0;a:99:{i:0;s:79:" insert into rt1 values(1,'this is the test', 11), (2,'this is thes test', 22) ";i:1;s:79:" insert into rt2 values(1,'this is the test', 11), (2,'this is thes test', 22) ";i:2;s:47:"SELECT * FROM rt1 WHERE MATCH ( 'the test' );";i:3;s:40:"id = 1 text = this is the test idd = 11 ";i:4;s:41:"id = 2 text = this is thes test idd = 22 ";i:5;s:9:"SHOW META";i:6;s:9:"total = 2";i:7;s:15:"total_found = 2";i:8;s:19:"total_relation = eq";i:9;s:17:"keyword[0] = test";i:10;s:11:"docs[0] = 2";i:11;s:11:"hits[0] = 2";i:12;s:47:"SELECT * FROM rt2 WHERE MATCH ( 'the test' );";i:13;s:40:"id = 1 text = this is the test idd = 11 ";i:14;s:41:"id = 2 text = this is thes test idd = 22 ";i:15;s:9:"SHOW META";i:16;s:9:"total = 2";i:17;s:15:"total_found = 2";i:18;s:19:"total_relation = eq";i:19;s:17:"keyword[0] = test";i:20;s:11:"docs[0] = 2";i:21;s:11:"hits[0] = 2";i:22;s:46:"SELECT * FROM i1 WHERE MATCH ( 'the test' );";i:23;s:40:"id = 1 text = this is the test idd = 11 ";i:24;s:41:"id = 2 text = this is thes test idd = 22 ";i:25;s:9:"SHOW META";i:26;s:9:"total = 2";i:27;s:15:"total_found = 2";i:28;s:19:"total_relation = eq";i:29;s:17:"keyword[0] = test";i:30;s:11:"docs[0] = 2";i:31;s:11:"hits[0] = 2";i:32;s:46:"SELECT * FROM i2 WHERE MATCH ( 'the test' );";i:33;s:40:"id = 1 text = this is the test idd = 11 ";i:34;s:41:"id = 2 text = this is thes test idd = 22 ";i:35;s:9:"SHOW META";i:36;s:9:"total = 2";i:37;s:15:"total_found = 2";i:38;s:19:"total_relation = eq";i:39;s:17:"keyword[0] = test";i:40;s:11:"docs[0] = 2";i:41;s:11:"hits[0] = 2";i:42;s:29:"SET GLOBAL @filter1 = ( 101 )";i:43;s:39:"SELECT * FROM idx WHERE idd IN @filter1";i:44;s:30:"id = 1 text = test1 idd = 101 ";i:45;s:9:"SHOW META";i:46;s:9:"total = 1";i:47;s:15:"total_found = 1";i:48;s:19:"total_relation = eq";i:49;s:33:"SET GLOBAL @filter1 = ( 22, 102 )";i:50;s:10:"started=ok";i:51;s:39:"SELECT * FROM idx WHERE idd IN @filter1";i:52;s:30:"id = 2 text = test2 idd = 102 ";i:53;s:9:"SHOW META";i:54;s:9:"total = 1";i:55;s:15:"total_found = 1";i:56;s:19:"total_relation = eq";i:57;s:33:"SET GLOBAL @filter1 = ( 22, 103 )";i:58;s:10:"started=ok";i:59;s:47:"SELECT * FROM rt1 WHERE MATCH ( 'the test' );";i:60;s:40:"id = 1 text = this is the test idd = 11 ";i:61;s:41:"id = 2 text = this is thes test idd = 22 ";i:62;s:9:"SHOW META";i:63;s:9:"total = 2";i:64;s:15:"total_found = 2";i:65;s:19:"total_relation = eq";i:66;s:17:"keyword[0] = test";i:67;s:11:"docs[0] = 2";i:68;s:11:"hits[0] = 2";i:69;s:47:"SELECT * FROM rt2 WHERE MATCH ( 'the test' );";i:70;s:40:"id = 1 text = this is the test idd = 11 ";i:71;s:41:"id = 2 text = this is thes test idd = 22 ";i:72;s:9:"SHOW META";i:73;s:9:"total = 2";i:74;s:15:"total_found = 2";i:75;s:19:"total_relation = eq";i:76;s:17:"keyword[0] = test";i:77;s:11:"docs[0] = 2";i:78;s:11:"hits[0] = 2";i:79;s:46:"SELECT * FROM i1 WHERE MATCH ( 'the test' );";i:80;s:40:"id = 1 text = this is the test idd = 11 ";i:81;s:41:"id = 2 text = this is thes test idd = 22 ";i:82;s:9:"SHOW META";i:83;s:9:"total = 2";i:84;s:15:"total_found = 2";i:85;s:19:"total_relation = eq";i:86;s:17:"keyword[0] = test";i:87;s:11:"docs[0] = 2";i:88;s:11:"hits[0] = 2";i:89;s:46:"SELECT * FROM i2 WHERE MATCH ( 'the test' );";i:90;s:40:"id = 1 text = this is the test idd = 11 ";i:91;s:41:"id = 2 text = this is thes test idd = 22 ";i:92;s:9:"SHOW META";i:93;s:9:"total = 2";i:94;s:15:"total_found = 2";i:95;s:19:"total_relation = eq";i:96;s:17:"keyword[0] = test";i:97;s:11:"docs[0] = 2";i:98;s:11:"hits[0] = 2";}}} \ No newline at end of file diff --git a/test/test_227/model.bin b/test/test_227/model.bin index a0745ab6da..103268dfb9 100644 --- a/test/test_227/model.bin +++ b/test/test_227/model.bin @@ -1,7 +1,7 @@ -a:1:{i:0;a:1:{i:0;a:15:{i:0;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";i:1073741825;s:5:"title";i:7;}s:7:"matches";a:8:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test one";}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test two";}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:10:"test three";}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:9:"test four";}}i:12;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test two";}}i:13;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:10:"test three";}}i:14;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:9:"test four";}}i:11;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test one";}}}s:5:"total";s:1:"8";s:11:"total_found";s:1:"8";}i:1;i:1;i:2;i:2;i:3;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";i:1073741825;s:5:"title";i:7;}s:7:"matches";a:8:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test one";}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test two";}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:10:"test three";}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:1001;i:1;i:1002;}s:5:"title";s:9:"test four";}}i:12;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test two";}}i:13;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:10:"test three";}}i:14;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:9:"test four";}}i:11;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:123;s:3:"mva";a:2:{i:0;i:1011;i:1;i:1012;}s:5:"title";s:8:"test one";}}}s:5:"total";s:1:"8";s:11:"total_found";s:1:"8";}i:4;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";i:1073741825;s:5:"title";i:7;}s:7:"matches";a:4:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test one";}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:8:"test two";}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:10:"test three";}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}s:5:"title";s:9:"test four";}}}s:5:"total";s:1:"4";s:11:"total_found";s:1:"4";}i:5;s:22:"connections | 8 +a:1:{i:0;a:1:{i:0;a:15:{i:0;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:5:"title";i:7;s:8:"group_id";i:1;s:3:"mva";i:1073741825;}s:7:"matches";a:8:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test one";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test two";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:10:"test three";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:9:"test four";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:12;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test two";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:13;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:10:"test three";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:14;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:9:"test four";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:11;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test one";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}}s:5:"total";s:1:"8";s:11:"total_found";s:1:"8";}i:1;i:1;i:2;i:2;i:3;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:5:"title";i:7;s:8:"group_id";i:1;s:3:"mva";i:1073741825;}s:7:"matches";a:8:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test one";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test two";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:10:"test three";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:9:"test four";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:1001;i:1;i:1002;}}}i:12;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test two";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:13;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:10:"test three";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:14;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:9:"test four";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:11;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test one";s:8:"group_id";i:123;s:3:"mva";a:2:{i:0;i:1011;i:1;i:1012;}}}}s:5:"total";s:1:"8";s:11:"total_found";s:1:"8";}i:4;a:8:{s:5:"error";s:0:"";s:7:"warning";s:0:"";s:6:"status";i:0;s:6:"fields";a:1:{i:0;s:5:"title";}s:5:"attrs";a:3:{s:5:"title";i:7;s:8:"group_id";i:1;s:3:"mva";i:1073741825;}s:7:"matches";a:4:{i:1;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test one";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:2;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:8:"test two";s:8:"group_id";i:1;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:3;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:10:"test three";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}i:4;a:2:{s:6:"weight";s:1:"1";s:5:"attrs";a:3:{s:5:"title";s:9:"test four";s:8:"group_id";i:2;s:3:"mva";a:2:{i:0;i:10;i:1;i:11;}}}}s:5:"total";s:1:"4";s:11:"total_found";s:1:"4";}i:5;s:22:"connections | 8 1 rows";i:6;s:25:"command_status | 2 1 rows";i:7;s:18:"queries | 3 1 rows";i:8;s:22:"connections | 9 1 rows";i:9;s:25:"command_status | 5 1 rows";i:10;s:18:"queries | 3 -1 rows";i:11;s:2:"OK";i:12;s:15:"length 16778070";i:13;s:131:"1 | 0 | 0 | 1553088425 | 0.000000 | | Title1 | scscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscsc...";i:14;s:47:"searchd error: 'id' attribute cannot be updated";}}} \ No newline at end of file +1 rows";i:11;s:2:"OK";i:12;s:15:"length 16778070";i:13;s:131:"1 | Title1 | scscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscscs...";i:14;s:47:"searchd error: 'id' attribute cannot be updated";}}} \ No newline at end of file diff --git a/test/test_233/model.bin b/test/test_233/model.bin index e70395c53b..9dfa9da6bd 100644 --- a/test/test_233/model.bin +++ b/test/test_233/model.bin @@ -1,7 +1,7 @@ -a:2:{i:0;a:1:{i:0;a:5:{i:0;s:28:"1 | 123 | hello world -1 rows";i:1;s:2:"OK";i:2;s:34:"2 | 123 | RELOAD INDEX FROM -1 rows";i:3;s:2:"OK";i:4;s:29:"3 | 123 | RELOAD INDEX -1 rows";}}i:1;a:1:{i:0;a:5:{i:0;s:28:"1 | 123 | hello world -1 rows";i:1;s:2:"OK";i:2;s:34:"2 | 123 | RELOAD INDEX FROM -1 rows";i:3;s:2:"OK";i:4;s:29:"3 | 123 | RELOAD INDEX +a:2:{i:0;a:1:{i:0;a:5:{i:0;s:28:"1 | hello world | 123 +1 rows";i:1;s:2:"OK";i:2;s:34:"2 | RELOAD INDEX FROM | 123 +1 rows";i:3;s:2:"OK";i:4;s:29:"3 | RELOAD INDEX | 123 +1 rows";}}i:1;a:1:{i:0;a:5:{i:0;s:28:"1 | hello world | 123 +1 rows";i:1;s:2:"OK";i:2;s:34:"2 | RELOAD INDEX FROM | 123 +1 rows";i:3;s:2:"OK";i:4;s:29:"3 | RELOAD INDEX | 123 1 rows";}}} \ No newline at end of file diff --git a/test/test_234/model.bin b/test/test_234/model.bin index 83d3cf06f1..1f0b3752d3 100644 --- a/test/test_234/model.bin +++ b/test/test_234/model.bin @@ -1 +1 @@ -a:1:{i:0;a:22:{i:0;a:2:{s:8:"sphinxql";s:25:"set global threads_ex='8'";s:14:"total_affected";i:0;}i:1;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:32:"query=select+*+from+test+limit+2";s:4:"rows";s:269:"{"timed_out":false,"hits":{"total":2,"total_relation":"gte","hits":[{"_id":"1","_score":1,"_source":{"gid":1,"title":"test one и я","j":{"name":"Alice","uid":123}}},{"_id":"2","_score":1,"_source":{"gid":1,"title":"test two","j":{"name":"Bob","uid":234,"gid":12}}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:2;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:60:"query=select%20%2A+from+test%20where+match('tes%2a')+limit+5";s:4:"rows";s:406:"{"timed_out":false,"hits":{"total":3,"total_relation":"eq","hits":[{"_id":"1","_score":1616,"_source":{"gid":1,"title":"test one и я","j":{"name":"Alice","uid":123}}},{"_id":"2","_score":1616,"_source":{"gid":1,"title":"test two","j":{"name":"Bob","uid":234,"gid":12}}},{"_id":"8","_score":1616,"_source":{"gid":3,"title":"stringvector test","j":{"sv":["one","two","three","четыре"],"gid":315}}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:3;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:57:"query=select%20%2A+from+test%20order+by+j.uid+asc+limit+5";s:4:"rows";s:532:"{"timed_out":false,"hits":{"total":14,"total_relation":"eq","hits":[{"_id":"5","_score":1,"_source":{"gid":3,"title":"numeric fixup","j":{"12":345,"34":"567"}}},{"_id":"6","_score":1,"_source":{"gid":3,"title":"numeric fixup contd","j":{"12":"346","179":"971"}}},{"_id":"8","_score":1,"_source":{"gid":3,"title":"stringvector test","j":{"sv":["one","two","three","четыре"],"gid":315}}},{"_id":"9","_score":1,"_source":{"gid":3,"title":"empty","j":{}}},{"_id":"10","_score":1,"_source":{"gid":3,"title":"empty v2","j":null}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:4;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:95:"query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:5;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:95:"query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:35:"{"error":"invalid constant string"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:6;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:104:"mode=raw&query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:7;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:112:"mode=raw&query=select id,1+2 as a, packedfactors({json=1}) from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:8;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:105:"mode=raw&query=select * from test order by id asc limit 3;select id,j from test order by id desc limit 10";s:4:"rows";s:1111:"[{"columns":[{"id":{"type":"long long"}},{"gid":{"type":"long"}},{"title":{"type":"string"}},{"j":{"type":"string"}}],"data":[{"id":1,"gid":1,"title":"test one и я","j":"{\"name\":\"Alice\",\"uid\":123}"},{"id":2,"gid":1,"title":"test two","j":"{\"name\":\"Bob\",\"uid\":234,\"gid\":12}"},{"id":3,"gid":2,"title":"another doc","j":"{\"name\":\"Charlie\",\"uid\":345}"}],"total":3,"error":"","warning":""},{"columns":[{"id":{"type":"long long"}},{"j":{"type":"string"}}],"data":[{"id":18,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":17,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":16,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":12,"j":"{\"sv\":[\"\\nMary had a little lamb, whose fleece was white as snow.\\nanother time, the age of wonders\"],\"gid\":316}"},{"id":11,"j":"{\"t1\":123456789,\"t2\":-123456789,\"t3\":3123456789,\"t4\":-3123456789,\"t5\":9876543210,\"t6\":-9876543210}"},{"id":10,"j":""},{"id":9,"j":"{}"},{"id":8,"j":"{\"sv\":[\"one\",\"two\",\"three\",\"четыре\"],\"gid\":315}"},{"id":6,"j":"{\"12\":\"346\",\"179\":\"971\"}"},{"id":5,"j":"{\"12\":345,\"34\":\"567\"}"}],"total":10,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:9;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:89:"select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:1289:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors()":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":2,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":8,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=2, min_best_span_pos=2, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:10;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:97:"select id,1+2 as a, packedfactors({json=1}) from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:1666:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors({json=1})":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":1, \"min_best_span_pos\":1, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"},{"id":2,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":1, \"min_best_span_pos\":1, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"},{"id":8,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":2, \"min_best_span_pos\":2, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:11;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:90:"select * from test order by id asc limit 3;select id,j from test order by id desc limit 10";s:4:"rows";s:1111:"[{"columns":[{"id":{"type":"long long"}},{"gid":{"type":"long"}},{"title":{"type":"string"}},{"j":{"type":"string"}}],"data":[{"id":1,"gid":1,"title":"test one и я","j":"{\"name\":\"Alice\",\"uid\":123}"},{"id":2,"gid":1,"title":"test two","j":"{\"name\":\"Bob\",\"uid\":234,\"gid\":12}"},{"id":3,"gid":2,"title":"another doc","j":"{\"name\":\"Charlie\",\"uid\":345}"}],"total":3,"error":"","warning":""},{"columns":[{"id":{"type":"long long"}},{"j":{"type":"string"}}],"data":[{"id":18,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":17,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":16,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":12,"j":"{\"sv\":[\"\\nMary had a little lamb, whose fleece was white as snow.\\nanother time, the age of wonders\"],\"gid\":316}"},{"id":11,"j":"{\"t1\":123456789,\"t2\":-123456789,\"t3\":3123456789,\"t4\":-3123456789,\"t5\":9876543210,\"t6\":-9876543210}"},{"id":10,"j":""},{"id":9,"j":"{}"},{"id":8,"j":"{\"sv\":[\"one\",\"two\",\"three\",\"четыре\"],\"gid\":315}"},{"id":6,"j":"{\"12\":\"346\",\"179\":\"971\"}"},{"id":5,"j":"{\"12\":345,\"34\":\"567\"}"}],"total":10,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:12;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:0:"";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:13;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:3:"GET";s:12:"http_request";s:117:"select%20id,1+2%20as%20a,%20packedfactors()%20from%20test%20where%20match(%27tes*%27)%20option%20ranker=expr(%271%27)";s:4:"rows";s:1289:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors()":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":2,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":8,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=2, min_best_span_pos=2, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:14;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:24:"mode=raw&query=desc test";s:4:"rows";s:357:"[{"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],"data":[{"Field":"id","Type":"bigint","Properties":""},{"Field":"title","Type":"string","Properties":"indexed stored attribute"},{"Field":"gid","Type":"uint","Properties":""},{"Field":"j","Type":"json","Properties":""}],"total":4,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:15;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:55:"mode=raw&query=alter table test add column new1 integer";s:4:"rows";s:37:"[{"total":0,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:16;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:24:"mode=raw&query=desc test";s:4:"rows";s:404:"[{"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],"data":[{"Field":"id","Type":"bigint","Properties":""},{"Field":"title","Type":"string","Properties":"indexed stored attribute"},{"Field":"gid","Type":"uint","Properties":""},{"Field":"j","Type":"json","Properties":""},{"Field":"new1","Type":"uint","Properties":""}],"total":5,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:17;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:70:"mode=raw&query=select avg(id) x from test group by gid order by x desc";s:4:"rows";s:126:"[{"columns":[{"x":{"type":"double"}}],"data":[{"x":17},{"x":8.714286},{"x":3.5},{"x":1.5}],"total":4,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:18;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:87:"query=select%20avg%28id%29%20x%20from%20test%20group%20by%20gid%20order%20by%20x%20desc";s:4:"rows";s:207:"{"timed_out":false,"hits":{"total":4,"total_relation":"eq","hits":[{"_score":1,"_source":{"x":17}},{"_score":1,"_source":{"x":8.71428571}},{"_score":1,"_source":{"x":3.5}},{"_score":1,"_source":{"x":1.5}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:19;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:10:"desc testt";s:4:"rows";s:33:"{"error":"no such table 'testt'"}";s:9:"http_code";i:500;s:4:"http";i:1;}i:20;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:25:"mode=raw&query=desc testt";s:4:"rows";s:33:"{"error":"no such table 'testt'"}";s:9:"http_code";i:500;s:4:"http";i:1;}i:21;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:38:"mode=raw&query=select concat('"', 'a')";s:4:"rows";s:126:"[{"columns":[{"concat('\"', 'a')":{"type":"string"}}],"data":[{"concat('\"', 'a')":"\"a"}],"total":1,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}}} \ No newline at end of file +a:1:{i:0;a:22:{i:0;a:2:{s:8:"sphinxql";s:25:"set global threads_ex='8'";s:14:"total_affected";i:0;}i:1;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:32:"query=select+*+from+test+limit+2";s:4:"rows";s:269:"{"timed_out":false,"hits":{"total":2,"total_relation":"gte","hits":[{"_id":"1","_score":1,"_source":{"title":"test one и я","gid":1,"j":{"name":"Alice","uid":123}}},{"_id":"2","_score":1,"_source":{"title":"test two","gid":1,"j":{"name":"Bob","uid":234,"gid":12}}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:2;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:60:"query=select%20%2A+from+test%20where+match('tes%2a')+limit+5";s:4:"rows";s:406:"{"timed_out":false,"hits":{"total":3,"total_relation":"eq","hits":[{"_id":"1","_score":1616,"_source":{"title":"test one и я","gid":1,"j":{"name":"Alice","uid":123}}},{"_id":"2","_score":1616,"_source":{"title":"test two","gid":1,"j":{"name":"Bob","uid":234,"gid":12}}},{"_id":"8","_score":1616,"_source":{"title":"stringvector test","gid":3,"j":{"sv":["one","two","three","четыре"],"gid":315}}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:3;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:57:"query=select%20%2A+from+test%20order+by+j.uid+asc+limit+5";s:4:"rows";s:532:"{"timed_out":false,"hits":{"total":14,"total_relation":"eq","hits":[{"_id":"5","_score":1,"_source":{"title":"numeric fixup","gid":3,"j":{"12":345,"34":"567"}}},{"_id":"6","_score":1,"_source":{"title":"numeric fixup contd","gid":3,"j":{"12":"346","179":"971"}}},{"_id":"8","_score":1,"_source":{"title":"stringvector test","gid":3,"j":{"sv":["one","two","three","четыре"],"gid":315}}},{"_id":"9","_score":1,"_source":{"title":"empty","gid":3,"j":{}}},{"_id":"10","_score":1,"_source":{"title":"empty v2","gid":3,"j":null}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:4;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:95:"query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:5;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:3:"GET";s:12:"http_request";s:95:"query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:35:"{"error":"invalid constant string"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:6;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:104:"mode=raw&query=select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:7;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:112:"mode=raw&query=select id,1+2 as a, packedfactors({json=1}) from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:8;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:105:"mode=raw&query=select * from test order by id asc limit 3;select id,j from test order by id desc limit 10";s:4:"rows";s:1111:"[{"columns":[{"id":{"type":"long long"}},{"title":{"type":"string"}},{"gid":{"type":"long"}},{"j":{"type":"string"}}],"data":[{"id":1,"title":"test one и я","gid":1,"j":"{\"name\":\"Alice\",\"uid\":123}"},{"id":2,"title":"test two","gid":1,"j":"{\"name\":\"Bob\",\"uid\":234,\"gid\":12}"},{"id":3,"title":"another doc","gid":2,"j":"{\"name\":\"Charlie\",\"uid\":345}"}],"total":3,"error":"","warning":""},{"columns":[{"id":{"type":"long long"}},{"j":{"type":"string"}}],"data":[{"id":18,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":17,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":16,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":12,"j":"{\"sv\":[\"\\nMary had a little lamb, whose fleece was white as snow.\\nanother time, the age of wonders\"],\"gid\":316}"},{"id":11,"j":"{\"t1\":123456789,\"t2\":-123456789,\"t3\":3123456789,\"t4\":-3123456789,\"t5\":9876543210,\"t6\":-9876543210}"},{"id":10,"j":""},{"id":9,"j":"{}"},{"id":8,"j":"{\"sv\":[\"one\",\"two\",\"three\",\"четыре\"],\"gid\":315}"},{"id":6,"j":"{\"12\":\"346\",\"179\":\"971\"}"},{"id":5,"j":"{\"12\":345,\"34\":\"567\"}"}],"total":10,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:9;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:89:"select id,1+2 as a, packedfactors() from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:1289:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors()":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":2,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":8,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=2, min_best_span_pos=2, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:10;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:97:"select id,1+2 as a, packedfactors({json=1}) from test where match('tes*') option ranker=expr('1')";s:4:"rows";s:1666:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors({json=1})":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":1, \"min_best_span_pos\":1, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"},{"id":2,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":1, \"min_best_span_pos\":1, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"},{"id":8,"a":3,"packedfactors({json=1})":"{\"bm25\":616, \"bm25a\":0.69689077, \"field_mask\":1, \"doc_word_count\":1, \"fields\":[{\"field\":0, \"lcs\":1, \"hit_count\":1, \"word_count\":1, \"tf_idf\":0.25595802, \"min_idf\":0.25595802, \"max_idf\":0.25595802, \"sum_idf\":0.25595802, \"min_hit_pos\":2, \"min_best_span_pos\":2, \"exact_hit\":0, \"max_window_hits\":1, \"min_gaps\":0, \"exact_order\":1, \"lccs\":1, \"wlccs\":0.25595802, \"atc\":0.000000}], \"words\":[{\"tf\":1, \"idf\":0.25595802}]}"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:11;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:90:"select * from test order by id asc limit 3;select id,j from test order by id desc limit 10";s:4:"rows";s:1111:"[{"columns":[{"id":{"type":"long long"}},{"title":{"type":"string"}},{"gid":{"type":"long"}},{"j":{"type":"string"}}],"data":[{"id":1,"title":"test one и я","gid":1,"j":"{\"name\":\"Alice\",\"uid\":123}"},{"id":2,"title":"test two","gid":1,"j":"{\"name\":\"Bob\",\"uid\":234,\"gid\":12}"},{"id":3,"title":"another doc","gid":2,"j":"{\"name\":\"Charlie\",\"uid\":345}"}],"total":3,"error":"","warning":""},{"columns":[{"id":{"type":"long long"}},{"j":{"type":"string"}}],"data":[{"id":18,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":17,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":16,"j":"{\"nick\":\"One\\nTwo\"}"},{"id":12,"j":"{\"sv\":[\"\\nMary had a little lamb, whose fleece was white as snow.\\nanother time, the age of wonders\"],\"gid\":316}"},{"id":11,"j":"{\"t1\":123456789,\"t2\":-123456789,\"t3\":3123456789,\"t4\":-3123456789,\"t5\":9876543210,\"t6\":-9876543210}"},{"id":10,"j":""},{"id":9,"j":"{}"},{"id":8,"j":"{\"sv\":[\"one\",\"two\",\"three\",\"четыре\"],\"gid\":315}"},{"id":6,"j":"{\"12\":\"346\",\"179\":\"971\"}"},{"id":5,"j":"{\"12\":345,\"34\":\"567\"}"}],"total":10,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:12;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:0:"";s:4:"rows";s:25:"{"error":"query missing"}";s:9:"http_code";i:400;s:4:"http";i:1;}i:13;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:3:"GET";s:12:"http_request";s:117:"select%20id,1+2%20as%20a,%20packedfactors()%20from%20test%20where%20match(%27tes*%27)%20option%20ranker=expr(%271%27)";s:4:"rows";s:1289:"[{"columns":[{"id":{"type":"long long"}},{"a":{"type":"long"}},{"packedfactors()":{"type":"string"}}],"data":[{"id":1,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":2,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=1, min_best_span_pos=1, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"},{"id":8,"a":3,"packedfactors()":"bm25=616, bm25a=0.69689077, field_mask=1, doc_word_count=1, field0=(lcs=1, hit_count=1, word_count=1, tf_idf=0.25595802, min_idf=0.25595802, max_idf=0.25595802, sum_idf=0.25595802, min_hit_pos=2, min_best_span_pos=2, exact_hit=0, max_window_hits=1, min_gaps=0, exact_order=1, lccs=1, wlccs=0.25595802, atc=0.000000), word0=(tf=1, idf=0.25595802)"}],"total":3,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:14;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:24:"mode=raw&query=desc test";s:4:"rows";s:357:"[{"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],"data":[{"Field":"id","Type":"bigint","Properties":""},{"Field":"title","Type":"string","Properties":"indexed stored attribute"},{"Field":"gid","Type":"uint","Properties":""},{"Field":"j","Type":"json","Properties":""}],"total":4,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:15;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:55:"mode=raw&query=alter table test add column new1 integer";s:4:"rows";s:37:"[{"total":0,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:16;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:24:"mode=raw&query=desc test";s:4:"rows";s:404:"[{"columns":[{"Field":{"type":"string"}},{"Type":{"type":"string"}},{"Properties":{"type":"string"}}],"data":[{"Field":"id","Type":"bigint","Properties":""},{"Field":"title","Type":"string","Properties":"indexed stored attribute"},{"Field":"gid","Type":"uint","Properties":""},{"Field":"j","Type":"json","Properties":""},{"Field":"new1","Type":"uint","Properties":""}],"total":5,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:17;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:70:"mode=raw&query=select avg(id) x from test group by gid order by x desc";s:4:"rows";s:126:"[{"columns":[{"x":{"type":"double"}}],"data":[{"x":17},{"x":8.714286},{"x":3.5},{"x":1.5}],"total":4,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}i:18;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:87:"query=select%20avg%28id%29%20x%20from%20test%20group%20by%20gid%20order%20by%20x%20desc";s:4:"rows";s:207:"{"timed_out":false,"hits":{"total":4,"total_relation":"eq","hits":[{"_score":1,"_source":{"x":17}},{"_score":1,"_source":{"x":8.71428571}},{"_score":1,"_source":{"x":3.5}},{"_score":1,"_source":{"x":1.5}}]}}";s:9:"http_code";i:200;s:4:"http";i:1;}i:19;a:6:{s:13:"http_endpoint";s:8:"cli_json";s:11:"http_method";s:4:"POST";s:12:"http_request";s:10:"desc testt";s:4:"rows";s:33:"{"error":"no such table 'testt'"}";s:9:"http_code";i:500;s:4:"http";i:1;}i:20;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:25:"mode=raw&query=desc testt";s:4:"rows";s:33:"{"error":"no such table 'testt'"}";s:9:"http_code";i:500;s:4:"http";i:1;}i:21;a:6:{s:13:"http_endpoint";s:3:"sql";s:11:"http_method";s:4:"POST";s:12:"http_request";s:38:"mode=raw&query=select concat('"', 'a')";s:4:"rows";s:126:"[{"columns":[{"concat('\"', 'a')":{"type":"string"}}],"data":[{"concat('\"', 'a')":"\"a"}],"total":1,"error":"","warning":""}]";s:9:"http_code";i:200;s:4:"http";i:1;}}} \ No newline at end of file diff --git a/test/test_246/model.bin b/test/test_246/model.bin index 4693c317e0..983bec81a2 100644 --- a/test/test_246/model.bin +++ b/test/test_246/model.bin @@ -2,52 +2,52 @@ a:2:{i:0;a:1:{i:0;a:8:{i:0;s:18:"all index presents";i:1;s:37:" plain1 | local plain2 | local 2 rows";i:2;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";i:3;s:15:"plain2 disabled";i:4;s:22:" plain1 | local 1 rows";i:5;s:17:"plain2 re-enabled";i:6;s:37:" plain1 | local plain2 | local 2 rows";i:7;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";}}i:1;a:1:{i:0;a:8:{i:0;s:18:"all index presents";i:1;s:37:" plain1 | local plain2 | local 2 rows";i:2;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";i:3;s:15:"plain2 disabled";i:4;s:22:" plain1 | local 1 rows";i:5;s:17:"plain2 re-enabled";i:6;s:37:" plain1 | local plain2 | local 2 rows";i:7;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";}}} \ No newline at end of file diff --git a/test/test_248/model.bin b/test/test_248/model.bin index ce58c26012..eb36e80421 100644 --- a/test/test_248/model.bin +++ b/test/test_248/model.bin @@ -4,14 +4,14 @@ plain1 | local plain2 | local plain3 | local 4 rows";i:2;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";i:3;s:15:"plain2 disabled";i:4;s:61:" dist_hung | distributed plain1 | local @@ -22,12 +22,12 @@ plain1 | local plain2 | local plain3 | local 4 rows";i:7;s:120:" -10 | 2 | one -1 | 1 | first -2 | 1 | second -11 | 2 | two -3 | 1 | third -12 | 2 | three -4 | 1 | fourth -5 | 1 | fifth +10 | one | 2 +1 | first | 1 +2 | second | 1 +11 | two | 2 +3 | third | 1 +12 | three | 2 +4 | fourth | 1 +5 | fifth | 1 8 rows";}}} \ No newline at end of file diff --git a/test/test_250/model.bin b/test/test_250/model.bin index c2ea7b7ebf..638b20a499 100644 --- a/test/test_250/model.bin +++ b/test/test_250/model.bin @@ -4,14 +4,14 @@ plain2 | local plain3 | local plain4 | local 4 rows";i:1;s:6:"plain2";i:2;s:36:" -3 | 2 | third -4 | 2 | fourth +3 | third | 2 +4 | fourth | 2 2 rows";i:3;s:6:"plain3";i:4;s:33:" -5 | 3 | fifth -6 | 3 | six +5 | fifth | 3 +6 | six | 3 2 rows";i:5;s:6:"plain4";i:6;s:35:" -10 | 4 | many -11 | 4 | more +10 | many | 4 +11 | more | 4 2 rows";i:7;s:31:"plain3 and plain4 changed paths";i:8;s:6:"plain3";i:9;s:19:" 3 | 2 4 | 2 diff --git a/test/test_252/model.bin b/test/test_252/model.bin index acd7c623a6..077af4a986 100644 --- a/test/test_252/model.bin +++ b/test/test_252/model.bin @@ -1,12 +1,12 @@ a:1:{i:0;a:1:{i:0;a:14:{i:0;s:8:"insert 1";i:1;s:3:" OK";i:2;s:18:"query: color table";i:3;s:7:" 0 rows";i:4;s:17:"query: blue table";i:5;s:27:" -1 | 11 | blue table +1 | blue table | 11 1 rows";i:6;s:5:"alter";i:7;s:3:" OK";i:8;s:8:"insert 2";i:9;s:3:" OK";i:10;s:18:"query: color table";i:11;s:27:" -2 | 11 | blue table +2 | blue table | 11 1 rows";i:12;s:17:"query: blue table";i:13;s:47:" -2 | 11 | blue table -1 | 11 | blue table +2 | blue table | 11 +1 | blue table | 11 2 rows";}}} \ No newline at end of file diff --git a/test/test_255/model.bin b/test/test_255/model.bin index 33bcace631..c99e627e00 100644 --- a/test/test_255/model.bin +++ b/test/test_255/model.bin @@ -1,20 +1,20 @@ a:1:{i:0;a:1:{i:0;a:29:{i:0;s:14:"initial commit";i:1;s:3:" OK";i:2;s:9:"query SOY";i:3;s:20:" -1 | 1 | TOFU +1 | TOFU | 1 1 rows";i:4;s:10:"query TOFU";i:5;s:20:" -1 | 1 | TOFU +1 | TOFU | 1 1 rows";i:6;s:3:" OK";i:7;s:11:"add 2nd doc";i:8;s:3:" OK";i:9;s:9:"query SOY";i:10;s:20:" -1 | 1 | TOFU +1 | TOFU | 1 1 rows";i:11;s:10:"query TOFU";i:12;s:33:" -2 | 1 | TOFU -1 | 1 | TOFU +2 | TOFU | 1 +1 | TOFU | 1 2 rows";i:13;s:15:"replace 1st doc";i:14;s:3:" OK";i:15;s:9:"query SOY";i:16;s:7:" 0 rows";i:17;s:10:"query TOFU";i:18;s:33:" -1 | 1 | TOFU -2 | 1 | TOFU +1 | TOFU | 1 +2 | TOFU | 1 2 rows";i:19;s:8:"DESC rt1";i:20;s:65:" id | bigint | name | text | indexed stored @@ -28,5 +28,5 @@ count | uint | idd | uint | 5 rows";i:25;s:80:"REPLACE INTO rt1 (id, name, title, idd, count) VALUES (1, 'TOFU', 'food', 1, 11)";i:26;s:3:" OK";i:27;s:17:"SELECT * FROM rt1";i:28;s:25:" -1 | 11 | 1 | TOFU +1 | TOFU | 11 | 1 1 rows";}}} \ No newline at end of file diff --git a/test/test_260/model.bin b/test/test_260/model.bin index ee46c971a1..cf6497fc95 100644 --- a/test/test_260/model.bin +++ b/test/test_260/model.bin @@ -7,14 +7,14 @@ plain1 | local plain2 | local tmp1 | template 3 rows";i:4;s:6:"plain1";i:5;s:119:" -1 | 1 | first -2 | 1 | second -3 | 2 | third -4 | 2 | fourth -5 | 3 | fifth -6 | 3 | six -10 | 4 | many -11 | 4 | more +1 | first | 1 +2 | second | 1 +3 | third | 2 +4 | fourth | 2 +5 | fifth | 3 +6 | six | 3 +10 | many | 4 +11 | more | 4 8 rows";i:6;s:4:"tmp1";i:7;s:38:" Kph on Europe road 1110 1 rows";}}} \ No newline at end of file diff --git a/test/test_317/model.bin b/test/test_317/model.bin index 03e5adf052..83bb2bf0ab 100644 --- a/test/test_317/model.bin +++ b/test/test_317/model.bin @@ -1,32 +1,32 @@ a:1:{i:0;a:1:{i:0;a:22:{i:0;s:14:"initial commit";i:1;s:3:" OK";i:2;s:3:" OK";i:3;s:10:"query test";i:4;s:33:" -1 | 1 | test -2 | 2 | test +1 | test | 1 +2 | test | 2 2 rows";i:5;s:10:"query tes*";i:6;s:7:" 0 rows";i:7;s:3:" OK";i:8;s:3:" OK";i:9;s:3:" OK";i:10;s:10:"query test";i:11;s:63:" -1 | 1 | test -2 | 2 | test -11 | 11 | test -12 | 12 | test +1 | test | 1 +2 | test | 2 +11 | test | 11 +12 | test | 12 4 rows";i:12;s:10:"query tes*";i:13;s:37:" -12 | 12 | test -11 | 11 | test +12 | test | 12 +11 | test | 11 2 rows";i:14;s:3:" OK";i:15;s:3:" OK";i:16;s:10:"query test";i:17;s:63:" -1 | 1 | test -2 | 2 | test -11 | 11 | test -12 | 12 | test +1 | test | 1 +2 | test | 2 +11 | test | 11 +12 | test | 12 4 rows";i:18;s:10:"query tes*";i:19;s:63:" -1 | 1 | test -2 | 2 | test -11 | 11 | test -12 | 12 | test +1 | test | 1 +2 | test | 2 +11 | test | 11 +12 | test | 12 4 rows";i:20;s:3:" OK";i:21;s:7:" 0 rows";}}} \ No newline at end of file diff --git a/test/test_371/model.bin b/test/test_371/model.bin index c31be90d4b..368c8c9f2b 100644 --- a/test/test_371/model.bin +++ b/test/test_371/model.bin @@ -1,7 +1,7 @@ a:1:{i:0;a:86:{i:0;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:1;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:2;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:3;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:4;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:5;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:6;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:7;a:3:{s:8:"sphinxql";s:116:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:8;a:3:{s:8:"sphinxql";s:57:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:9;a:3:{s:8:"sphinxql";s:108:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:10;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:11;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:12;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:13;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:14;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:15;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:16;a:2:{s:8:"sphinxql";s:582:"INSERT INTO rt (id, gid, title, j) VALUES (1,2,'test one','{"name":"Alice","uid":123, "lon":-0.08, "lat":0.93, "coord":"-0.08 0.93", "pct":12.4, "sq":9, "poly":"1,2,3,4,5,6.0", "points":[1,2,3,4,5,6.0]}'), (2,3,'test two','{"name":"Bob","uid":234,"gid":12, "lon":-0.0799989, "lat":0.891975, "coord":"-0.079999 0.891975", "pct":-103.7, "sq":16, "poly":"1,-2,1,2,-5,6", "points":[1,-2,1,2,-5,6]}'), -(3,4,'another doc','{"name":"Charlie","uid":345, "lon":-0.0721455, "lat":0.926761, "coord":"-0.072146 0.926761", "pct":4.1, "sq":225, "poly":"-1,2,12,4,5,6", "points":[-1,2,12,4,5,6]}')";s:14:"total_affected";i:3;}i:17;a:3:{s:8:"sphinxql";s:21:"select gid, * from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:8:"test one";}i:1;a:4:{s:3:"gid";s:1:"3";s:2:"id";s:1:"2";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:8:"test two";}i:2;a:4:{s:3:"gid";s:1:"4";s:2:"id";s:1:"3";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:11:"another doc";}}}i:18;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:19;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:20;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:21;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:22;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:23;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:24;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:25;a:3:{s:8:"sphinxql";s:109:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:26;a:3:{s:8:"sphinxql";s:50:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:27;a:3:{s:8:"sphinxql";s:101:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:28;a:3:{s:8:"sphinxql";s:134:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:29;a:3:{s:8:"sphinxql";s:134:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:30;a:3:{s:8:"sphinxql";s:70:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:31;a:3:{s:8:"sphinxql";s:70:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:32;a:3:{s:8:"sphinxql";s:71:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:33;a:3:{s:8:"sphinxql";s:72:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:34;a:3:{s:8:"sphinxql";s:28:"select gid, * from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:8:"test one";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:8:"test two";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:11:"another doc";}}}i:35;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:36;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:37;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:38;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:39;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:40;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:41;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:42;a:3:{s:8:"sphinxql";s:116:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:43;a:3:{s:8:"sphinxql";s:57:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:44;a:3:{s:8:"sphinxql";s:108:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:45;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:46;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:47;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:48;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:49;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:50;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:51;a:3:{s:8:"sphinxql";s:29:"select gid, * from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:0:"";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:0:"";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:0:"";}}}i:52;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:53;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:54;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:55;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:56;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:57;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:58;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:59;a:3:{s:8:"sphinxql";s:117:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:60;a:3:{s:8:"sphinxql";s:58:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:61;a:3:{s:8:"sphinxql";s:109:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:62;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:63;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:64;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:65;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:66;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:67;a:3:{s:8:"sphinxql";s:80:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:68;a:3:{s:8:"sphinxql";s:29:"select gid, * from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:8:"test one";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:8:"test two";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:11:"another doc";}}}i:69;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:70;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:71;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:72;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:73;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:74;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:75;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:76;a:3:{s:8:"sphinxql";s:117:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:77;a:3:{s:8:"sphinxql";s:58:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:78;a:3:{s:8:"sphinxql";s:109:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:79;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:80;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:81;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test2_dist";s:5:"errno";i:1064;s:5:"error";s:215:"index test2_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric; +(3,4,'another doc','{"name":"Charlie","uid":345, "lon":-0.0721455, "lat":0.926761, "coord":"-0.072146 0.926761", "pct":4.1, "sq":225, "poly":"-1,2,12,4,5,6", "points":[-1,2,12,4,5,6]}')";s:14:"total_affected";i:3;}i:17;a:3:{s:8:"sphinxql";s:21:"select gid, * from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:3:"gid";s:1:"3";s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:3:"gid";s:1:"4";s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:18;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:19;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:20;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:21;a:3:{s:8:"sphinxql";s:68:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:22;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:23;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:24;a:3:{s:8:"sphinxql";s:69:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:25;a:3:{s:8:"sphinxql";s:109:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:26;a:3:{s:8:"sphinxql";s:50:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:27;a:3:{s:8:"sphinxql";s:101:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:28;a:3:{s:8:"sphinxql";s:134:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:29;a:3:{s:8:"sphinxql";s:134:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:30;a:3:{s:8:"sphinxql";s:70:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:31;a:3:{s:8:"sphinxql";s:70:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:32;a:3:{s:8:"sphinxql";s:71:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:33;a:3:{s:8:"sphinxql";s:72:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from rt";s:5:"errno";i:1064;s:5:"error";s:68:"index rt: parse error: substring_index() arguments 3 must be numeric";}i:34;a:3:{s:8:"sphinxql";s:28:"select gid, * from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:35;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:36;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:37;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:38;a:3:{s:8:"sphinxql";s:75:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:39;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:40;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:41;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:42;a:3:{s:8:"sphinxql";s:116:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:43;a:3:{s:8:"sphinxql";s:57:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:44;a:3:{s:8:"sphinxql";s:108:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:45;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:46;a:3:{s:8:"sphinxql";s:141:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:47;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:48;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:49;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:50;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test1_loc";s:5:"errno";i:1064;s:5:"error";s:75:"index test_json: parse error: substring_index() arguments 3 must be numeric";}i:51;a:3:{s:8:"sphinxql";s:29:"select gid, * from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:52;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:53;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:54;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:55;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:56;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:57;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:58;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:59;a:3:{s:8:"sphinxql";s:117:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:60;a:3:{s:8:"sphinxql";s:58:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:61;a:3:{s:8:"sphinxql";s:109:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:62;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:63;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:64;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:65;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:66;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:67;a:3:{s:8:"sphinxql";s:80:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test1_dist";s:5:"errno";i:1064;s:5:"error";s:138:"index test1_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric";}i:68;a:3:{s:8:"sphinxql";s:29:"select gid, * from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:1:"j";s:160:"{"name":"Charlie","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:69;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 0) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:0:"";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:0:"";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:0:"";}}}i:70;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";}}}i:71;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 2) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"aaa.bbb";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"aaa.bbb";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"aaa.bbb";}}}i:72;a:3:{s:8:"sphinxql";s:76:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 5) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:73;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -1) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ddd";}}}i:74;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -2) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"ccc.ddd";}}}i:75;a:3:{s:8:"sphinxql";s:77:"select id, substring_index('aaa.bbb.ccc.ddd', '.', -5) as res from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:15:"aaa.bbb.ccc.ddd";}}}i:76;a:3:{s:8:"sphinxql";s:117:"select id, j.coord, substring_index(j.coord, ' ', 1), j.lon, substring_index(j.coord, ' ', -1), j.lat from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:6:{s:2:"id";s:1:"1";s:7:"j.coord";s:10:"-0.08 0.93";s:32:"substring_index(j.coord, ' ', 1)";s:5:"-0.08";s:5:"j.lon";s:9:"-0.080000";s:33:"substring_index(j.coord, ' ', -1)";s:4:"0.93";s:5:"j.lat";s:8:"0.930000";}i:1;a:6:{s:2:"id";s:1:"2";s:7:"j.coord";s:18:"-0.079999 0.891975";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.079999";s:5:"j.lon";s:9:"-0.079999";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.891975";s:5:"j.lat";s:8:"0.891975";}i:2;a:6:{s:2:"id";s:1:"3";s:7:"j.coord";s:18:"-0.072146 0.926761";s:32:"substring_index(j.coord, ' ', 1)";s:9:"-0.072146";s:5:"j.lon";s:9:"-0.072146";s:33:"substring_index(j.coord, ' ', -1)";s:8:"0.926761";s:5:"j.lat";s:8:"0.926761";}}}i:77;a:3:{s:8:"sphinxql";s:58:"select geodist(j.lat, j.lon, 0.93, -0.08 ) from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:35:"geodist(j.lat, j.lon, 0.93, -0.08 )";s:12:"36488.562500";}}}i:78;a:3:{s:8:"sphinxql";s:109:"select geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:1:{s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:79;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), j.lat, j.lon) as gd from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:80;a:3:{s:8:"sphinxql";s:142:"select id, j.lat, j.lon, j.coord, geodist(j.lat, j.lon, substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1)) as gd from test2_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:5:"j.lat";s:8:"0.930000";s:5:"j.lon";s:9:"-0.080000";s:7:"j.coord";s:10:"-0.08 0.93";s:2:"gd";s:8:"0.000000";}i:1;a:5:{s:2:"id";s:1:"2";s:5:"j.lat";s:8:"0.891975";s:5:"j.lon";s:9:"-0.079999";s:7:"j.coord";s:18:"-0.079999 0.891975";s:2:"gd";s:10:"0.40076858";}i:2;a:5:{s:2:"id";s:1:"3";s:5:"j.lat";s:8:"0.926761";s:5:"j.lon";s:9:"-0.072146";s:7:"j.coord";s:18:"-0.072146 0.926761";s:2:"gd";s:10:"1.91646039";}}}i:81;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '0') as res from test2_dist";s:5:"errno";i:1064;s:5:"error";s:215:"index test2_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric; index test_json: parse error: substring_index() arguments 3 must be numeric";}i:82;a:3:{s:8:"sphinxql";s:78:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '1') as res from test2_dist";s:5:"errno";i:1064;s:5:"error";s:215:"index test2_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric; index test_json: parse error: substring_index() arguments 3 must be numeric";}i:83;a:3:{s:8:"sphinxql";s:79:"select id, substring_index('aaa.bbb.ccc.ddd', '.', '-1') as res from test2_dist";s:5:"errno";i:1064;s:5:"error";s:215:"index test2_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric; index test_json: parse error: substring_index() arguments 3 must be numeric";}i:84;a:3:{s:8:"sphinxql";s:80:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 'aaa') as res from test2_dist";s:5:"errno";i:1064;s:5:"error";s:215:"index test2_dist: agent : remote query error: index test_json: parse error: substring_index() arguments 3 must be numeric; diff --git a/test/test_373/model.bin b/test/test_373/model.bin index 04018e8535..aa269a7c5b 100755 --- a/test/test_373/model.bin +++ b/test/test_373/model.bin @@ -6,8 +6,8 @@ rt2 | rt idx2 | local rt1 | rt rt2 | rt -4 rows";i:4;s:51:"ERROR: SHOW TABLE STATUS requires an existing table";i:5;s:14:"binlog removal";i:6;s:2:"OK";i:7;s:2:"OK";i:8;s:9:"flush rt1";i:9;s:2:"OK";i:10;s:18:"inserting into rt1";i:11;s:2:"OK";i:12;s:17:"check of rt index";i:13;s:34:"2 | 12 | test -1 | 11 | test +4 rows";i:4;s:51:"ERROR: SHOW TABLE STATUS requires an existing table";i:5;s:14:"binlog removal";i:6;s:2:"OK";i:7;s:2:"OK";i:8;s:9:"flush rt1";i:9;s:2:"OK";i:10;s:18:"inserting into rt1";i:11;s:2:"OK";i:12;s:17:"check of rt index";i:13;s:34:"2 | test | 12 +1 | test | 11 2 rows";i:14;s:42:"dummy | local idx2 | local rt1 | rt diff --git a/test/test_445/model.bin b/test/test_445/model.bin index c1595080e1..afec6b9984 100644 --- a/test/test_445/model.bin +++ b/test/test_445/model.bin @@ -1,4 +1,4 @@ a:1:{i:0;a:48:{i:0;a:3:{s:8:"sphinxql";s:53:"select id, upper('abcdefghijk') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:11:"ABCDEFGHIJK";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:11:"ABCDEFGHIJK";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:11:"ABCDEFGHIJK";}}}i:1;a:3:{s:8:"sphinxql";s:52:"select id, lower('ABCJNSJNJN') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:10:"abcjnsjnjn";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:10:"abcjnsjnjn";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:10:"abcjnsjnjn";}}}i:2;a:2:{s:8:"sphinxql";s:216:"INSERT INTO rt (id, gid, title, j) VALUES (1,2,'test one','{"name":"alice", "job":"DEVLEOPER",}'), (2,3,'test two','{"name":"bob", "job":"TESTER",}'), - (3,4,'another doc','{"name":"charlie","job":"PROFESSOR",}')";s:14:"total_affected";i:3;}i:3;a:3:{s:8:"sphinxql";s:16:"select * from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:2:"id";s:1:"1";s:3:"gid";s:1:"2";s:1:"j";N;s:5:"title";s:8:"test one";}i:1;a:4:{s:2:"id";s:1:"2";s:3:"gid";s:1:"3";s:1:"j";N;s:5:"title";s:8:"test two";}i:2;a:4:{s:2:"id";s:1:"3";s:3:"gid";s:1:"4";s:1:"j";N;s:5:"title";s:11:"another doc";}}}i:4;a:3:{s:8:"sphinxql";s:51:"select id, upper('hello12323 world') as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:16:"HELLO12323 WORLD";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:16:"HELLO12323 WORLD";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:16:"HELLO12323 WORLD";}}}i:5;a:3:{s:8:"sphinxql";s:56:"select id, upper('aaa..jjdjwew.-192933' ) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}}}i:6;a:3:{s:8:"sphinxql";s:52:"select id, lower('HELLO123423 world') as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:17:"hello123423 world";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:17:"hello123423 world";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:17:"hello123423 world";}}}i:7;a:3:{s:8:"sphinxql";s:59:"select id, lower('AAADJD.jSBDBSBD.-192933' ) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}}}i:8;a:3:{s:8:"sphinxql";s:29:"select gid, * from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:0:"";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:0:"";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:1:"j";s:160:"{"name":"CHARLIE","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:0:"";}}}i:9;a:3:{s:8:"sphinxql";s:64:"select id, upper('aaa..jjdjwew .-192933') as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}}}i:10;a:3:{s:8:"sphinxql";s:67:"select id, lower('AAA..JDHJDHIWEH .-192933') as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}}}i:11;a:3:{s:8:"sphinxql";s:70:"select id, concat('hello', ' ', 'world') as v0, upper(v0) as v from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}i:1;a:3:{s:2:"id";s:1:"2";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}i:2;a:3:{s:2:"id";s:1:"3";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}}}i:12;a:3:{s:8:"sphinxql";s:70:"select id, concat('HELLO', ' ', 'WORLD') as v0, lower(v0) as v from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}i:1;a:3:{s:2:"id";s:1:"2";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}i:2;a:3:{s:2:"id";s:1:"3";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}}}i:13;a:3:{s:8:"sphinxql";s:51:"select id, upper(abcdefghijk) as res from test_json";s:5:"errno";i:1064;s:5:"error";s:57:"index test_json: parse error: unknown column: abcdefghijk";}i:14;a:3:{s:8:"sphinxql";s:59:"select id, upper('abcdefghijk','cde') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:73:"index test_json: parse error: upper() called with 2 args, 1 args expected";}i:15;a:3:{s:8:"sphinxql";s:51:"select id, lower(SDMSJDNJSAS) as res from test_json";s:5:"errno";i:1064;s:5:"error";s:57:"index test_json: parse error: unknown column: sdmsjdnjsas";}i:16;a:3:{s:8:"sphinxql";s:61:"select id, lower('ABCDSNDNSW','SDNSDN') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:73:"index test_json: parse error: lower() called with 2 args, 1 args expected";}i:17;a:3:{s:8:"sphinxql";s:23:"select * from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:2:"id";s:1:"1";s:3:"gid";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";s:5:"title";s:8:"test one";}i:1;a:4:{s:2:"id";s:1:"2";s:3:"gid";s:1:"1";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";s:5:"title";s:8:"test two";}i:2;a:4:{s:2:"id";s:1:"3";s:3:"gid";s:1:"2";s:1:"j";s:160:"{"name":"CHARLIE","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";s:5:"title";s:11:"another doc";}}}i:18;a:3:{s:8:"sphinxql";s:43:"select upper(j.name) as name from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:4:"name";s:5:"ALICE";}i:1;a:1:{s:4:"name";s:3:"BOB";}i:2;a:1:{s:4:"name";s:7:"CHARLIE";}}}i:19;a:3:{s:8:"sphinxql";s:131:"select upper(j.name) as name, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:4:"name";s:5:"ALICE";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:2:{s:4:"name";s:3:"BOB";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:2:{s:4:"name";s:7:"CHARLIE";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:20;a:3:{s:8:"sphinxql";s:42:"select lower(j.name) as job from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:3:"job";s:5:"alice";}i:1;a:1:{s:3:"job";s:3:"bob";}i:2;a:1:{s:3:"job";s:7:"charlie";}}}i:21;a:3:{s:8:"sphinxql";s:130:"select lower(j.name) as job, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:3:"job";s:5:"alice";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:2:{s:3:"job";s:3:"bob";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:2:{s:3:"job";s:7:"charlie";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:22;a:3:{s:8:"sphinxql";s:95:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res, upper(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}}}i:23;a:3:{s:8:"sphinxql";s:93:"select id, concat('aaa.bbb.ccc.ddd', '.','eee.fff') as res, upper(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}}}i:24;a:3:{s:8:"sphinxql";s:92:"select id, substring_index('AAA.BBB.CCCC', '.', 1) as res, lower(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}}}i:25;a:3:{s:8:"sphinxql";s:94:"select id, concat('AAAA.BBBB.CCCsae', '.','eee.fff') as res, lower(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}}}i:26;a:3:{s:8:"sphinxql";s:21:"select * from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:12:"string_value";s:4:"asdf";s:5:"dummy";s:5:"dummy";}i:1;a:3:{s:2:"id";s:1:"2";s:12:"string_value";s:4:"ASDF";s:5:"dummy";s:5:"dummy";}i:2;a:3:{s:2:"id";s:1:"3";s:12:"string_value";s:4:"qwer";s:5:"dummy";s:5:"dummy";}i:3;a:3:{s:2:"id";s:1:"4";s:12:"string_value";s:0:"";s:5:"dummy";s:5:"dummy";}}}i:27;a:3:{s:8:"sphinxql";s:57:"select id, string_value, upper(string_value) from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:12:"string_value";s:4:"asdf";s:19:"upper(string_value)";s:4:"ASDF";}i:1;a:3:{s:2:"id";s:1:"2";s:12:"string_value";s:4:"ASDF";s:19:"upper(string_value)";s:4:"ASDF";}i:2;a:3:{s:2:"id";s:1:"3";s:12:"string_value";s:4:"qwer";s:19:"upper(string_value)";s:4:"QWER";}i:3;a:3:{s:2:"id";s:1:"4";s:12:"string_value";s:0:"";s:19:"upper(string_value)";s:0:"";}}}i:28;a:3:{s:8:"sphinxql";s:57:"select id, string_value, lower(string_value) from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:12:"string_value";s:4:"asdf";s:19:"lower(string_value)";s:4:"asdf";}i:1;a:3:{s:2:"id";s:1:"2";s:12:"string_value";s:4:"ASDF";s:19:"lower(string_value)";s:4:"asdf";}i:2;a:3:{s:2:"id";s:1:"3";s:12:"string_value";s:4:"qwer";s:19:"lower(string_value)";s:4:"qwer";}i:3;a:3:{s:2:"id";s:1:"4";s:12:"string_value";s:0:"";s:19:"lower(string_value)";s:0:"";}}}i:29;a:3:{s:8:"sphinxql";s:30:"select * from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:4:{s:2:"id";s:1:"1";s:3:"gid";s:1:"1";s:1:"j";s:53:"{"name":"Alice","uid":123,"jobs":["aaa","bbb","ccc"]}";s:5:"title";s:8:"test one";}i:1;a:4:{s:2:"id";s:1:"2";s:3:"gid";s:1:"1";s:1:"j";s:60:"{"name":"Bob","uid":234,"gid":12,"jobs":["aaa","bbb","ccc"]}";s:5:"title";s:8:"test two";}}}i:30;a:3:{s:8:"sphinxql";s:57:"select id, j.jobs, upper(j.jobs[1]) from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"upper(j.jobs[1])";s:3:"BBB";}i:1;a:3:{s:2:"id";s:1:"2";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"upper(j.jobs[1])";s:3:"BBB";}}}i:31;a:3:{s:8:"sphinxql";s:57:"select id, j.jobs, lower(j.jobs[1]) from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"lower(j.jobs[1])";s:3:"bbb";}i:1;a:3:{s:2:"id";s:1:"2";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"lower(j.jobs[1])";s:3:"bbb";}}}i:32;a:3:{s:8:"sphinxql";s:45:"select id, upper('abc') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ABC";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ABC";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ABC";}}}i:33;a:3:{s:8:"sphinxql";s:19:"select upper('abc')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:12:"upper('abc')";s:3:"ABC";}}}i:34;a:3:{s:8:"sphinxql";s:48:"select id, upper('абв') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:6:"АБВ";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:6:"АБВ";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:6:"АБВ";}}}i:35;a:3:{s:8:"sphinxql";s:22:"select upper('абв')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:15:"upper('абв')";s:6:"АБВ";}}}i:36;a:3:{s:8:"sphinxql";s:46:"select id, upper('öö') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:4:"ÖÖ";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:4:"ÖÖ";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:4:"ÖÖ";}}}i:37;a:3:{s:8:"sphinxql";s:20:"select upper('öö')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:13:"upper('öö')";s:4:"ÖÖ";}}}i:38;a:3:{s:8:"sphinxql";s:49:"select id, upper('Straße') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"STRASSE";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"STRASSE";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"STRASSE";}}}i:39;a:3:{s:8:"sphinxql";s:23:"select upper('Straße')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:16:"upper('Straße')";s:7:"STRASSE";}}}i:40;a:3:{s:8:"sphinxql";s:45:"select id, lower('ABC') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"abc";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"abc";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"abc";}}}i:41;a:3:{s:8:"sphinxql";s:19:"select lower('ABC')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:12:"lower('ABC')";s:3:"abc";}}}i:42;a:3:{s:8:"sphinxql";s:48:"select id, lower('АБВ') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:6:"абв";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:6:"абв";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:6:"абв";}}}i:43;a:3:{s:8:"sphinxql";s:22:"select lower('АБВ')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:15:"lower('АБВ')";s:6:"абв";}}}i:44;a:3:{s:8:"sphinxql";s:46:"select id, lower('ÖÖ') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:4:"öö";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:4:"öö";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:4:"öö";}}}i:45;a:3:{s:8:"sphinxql";s:20:"select lower('ÖÖ')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:13:"lower('ÖÖ')";s:4:"öö";}}}i:46;a:3:{s:8:"sphinxql";s:49:"select id, lower('STRAßE') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"straße";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"straße";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"straße";}}}i:47;a:3:{s:8:"sphinxql";s:23:"select lower('STRAßE')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:16:"lower('STRAßE')";s:7:"straße";}}}}} \ No newline at end of file + (3,4,'another doc','{"name":"charlie","job":"PROFESSOR",}')";s:14:"total_affected";i:3;}i:3;a:3:{s:8:"sphinxql";s:16:"select * from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:3:"gid";s:1:"2";s:1:"j";N;}i:1;a:4:{s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:3:"gid";s:1:"3";s:1:"j";N;}i:2;a:4:{s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:3:"gid";s:1:"4";s:1:"j";N;}}}i:4;a:3:{s:8:"sphinxql";s:51:"select id, upper('hello12323 world') as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:16:"HELLO12323 WORLD";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:16:"HELLO12323 WORLD";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:16:"HELLO12323 WORLD";}}}i:5;a:3:{s:8:"sphinxql";s:56:"select id, upper('aaa..jjdjwew.-192933' ) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:20:"AAA..JJDJWEW.-192933";}}}i:6;a:3:{s:8:"sphinxql";s:52:"select id, lower('HELLO123423 world') as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:17:"hello123423 world";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:17:"hello123423 world";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:17:"hello123423 world";}}}i:7;a:3:{s:8:"sphinxql";s:59:"select id, lower('AAADJD.jSBDBSBD.-192933' ) as res from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:23:"aaadjd.jsbdbsbd.-192933";}}}i:8;a:3:{s:8:"sphinxql";s:29:"select gid, * from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:3:"gid";s:1:"1";s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:3:"gid";s:1:"2";s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:1:"j";s:160:"{"name":"CHARLIE","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:9;a:3:{s:8:"sphinxql";s:64:"select id, upper('aaa..jjdjwew .-192933') as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:21:"AAA..JJDJWEW .-192933";}}}i:10;a:3:{s:8:"sphinxql";s:67:"select id, lower('AAA..JDHJDHIWEH .-192933') as res from test1_dist";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:24:"aaa..jdhjdhiweh .-192933";}}}i:11;a:3:{s:8:"sphinxql";s:70:"select id, concat('hello', ' ', 'world') as v0, upper(v0) as v from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}i:1;a:3:{s:2:"id";s:1:"2";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}i:2;a:3:{s:2:"id";s:1:"3";s:2:"v0";s:11:"hello world";s:1:"v";s:11:"HELLO WORLD";}}}i:12;a:3:{s:8:"sphinxql";s:70:"select id, concat('HELLO', ' ', 'WORLD') as v0, lower(v0) as v from rt";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}i:1;a:3:{s:2:"id";s:1:"2";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}i:2;a:3:{s:2:"id";s:1:"3";s:2:"v0";s:11:"HELLO WORLD";s:1:"v";s:11:"hello world";}}}i:13;a:3:{s:8:"sphinxql";s:51:"select id, upper(abcdefghijk) as res from test_json";s:5:"errno";i:1064;s:5:"error";s:57:"index test_json: parse error: unknown column: abcdefghijk";}i:14;a:3:{s:8:"sphinxql";s:59:"select id, upper('abcdefghijk','cde') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:73:"index test_json: parse error: upper() called with 2 args, 1 args expected";}i:15;a:3:{s:8:"sphinxql";s:51:"select id, lower(SDMSJDNJSAS) as res from test_json";s:5:"errno";i:1064;s:5:"error";s:57:"index test_json: parse error: unknown column: sdmsjdnjsas";}i:16;a:3:{s:8:"sphinxql";s:61:"select id, lower('ABCDSNDNSW','SDNSDN') as res from test_json";s:5:"errno";i:1064;s:5:"error";s:73:"index test_json: parse error: lower() called with 2 args, 1 args expected";}i:17;a:3:{s:8:"sphinxql";s:23:"select * from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:4:{s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:3:"gid";s:1:"1";s:1:"j";s:154:"{"name":"Alice","uid":123,"lon":-0.080000,"lat":0.930000,"coord":"-0.08 0.93","pct":12.400000,"sq":9,"poly":"1,2,3,4,5,6.0","points":[1,2,3,4,5,6.000000]}";}i:1;a:4:{s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:3:"gid";s:1:"1";s:1:"j";s:167:"{"name":"Bob","uid":234,"gid":12,"lon":-0.079999,"lat":0.891975,"coord":"-0.079999 0.891975","pct":-103.700000,"sq":16,"poly":"1,-2,1,2,-5,6","points":[1,-2,1,2,-5,6]}";}i:2;a:4:{s:2:"id";s:1:"3";s:5:"title";s:11:"another doc";s:3:"gid";s:1:"2";s:1:"j";s:160:"{"name":"CHARLIE","uid":345,"lon":-0.072146,"lat":0.926761,"coord":"-0.072146 0.926761","pct":4.100000,"sq":225,"poly":"-1,2,12,4,5,6","points":[-1,2,12,4,5,6]}";}}}i:18;a:3:{s:8:"sphinxql";s:43:"select upper(j.name) as name from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:4:"name";s:5:"ALICE";}i:1;a:1:{s:4:"name";s:3:"BOB";}i:2;a:1:{s:4:"name";s:7:"CHARLIE";}}}i:19;a:3:{s:8:"sphinxql";s:131:"select upper(j.name) as name, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:4:"name";s:5:"ALICE";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:2:{s:4:"name";s:3:"BOB";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:2:{s:4:"name";s:7:"CHARLIE";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:20;a:3:{s:8:"sphinxql";s:42:"select lower(j.name) as job from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:1:{s:3:"job";s:5:"alice";}i:1;a:1:{s:3:"job";s:3:"bob";}i:2;a:1:{s:3:"job";s:7:"charlie";}}}i:21;a:3:{s:8:"sphinxql";s:130:"select lower(j.name) as job, geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 ) from test1_loc";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:3:"job";s:5:"alice";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:8:"0.000000";}i:1;a:2:{s:3:"job";s:3:"bob";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:13:"242424.687500";}i:2;a:2:{s:3:"job";s:7:"charlie";s:86:"geodist(substring_index(j.coord,' ',-1), substring_index(j.coord,' ',1), 0.93, -0.08 )";s:12:"36486.984375";}}}i:22;a:3:{s:8:"sphinxql";s:95:"select id, substring_index('aaa.bbb.ccc.ddd', '.', 1) as res, upper(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:3:"aaa";s:4:"res1";s:3:"AAA";}}}i:23;a:3:{s:8:"sphinxql";s:93:"select id, concat('aaa.bbb.ccc.ddd', '.','eee.fff') as res, upper(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:23:"aaa.bbb.ccc.ddd.eee.fff";s:4:"res1";s:23:"AAA.BBB.CCC.DDD.EEE.FFF";}}}i:24;a:3:{s:8:"sphinxql";s:92:"select id, substring_index('AAA.BBB.CCCC', '.', 1) as res, lower(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:3:"AAA";s:4:"res1";s:3:"aaa";}}}i:25;a:3:{s:8:"sphinxql";s:94:"select id, concat('AAAA.BBBB.CCCsae', '.','eee.fff') as res, lower(res) as res1 from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"res";s:24:"AAAA.BBBB.CCCsae.eee.fff";s:4:"res1";s:24:"aaaa.bbbb.cccsae.eee.fff";}}}i:26;a:3:{s:8:"sphinxql";s:21:"select * from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:5:"dummy";s:5:"dummy";s:12:"string_value";s:4:"asdf";}i:1;a:3:{s:2:"id";s:1:"2";s:5:"dummy";s:5:"dummy";s:12:"string_value";s:4:"ASDF";}i:2;a:3:{s:2:"id";s:1:"3";s:5:"dummy";s:5:"dummy";s:12:"string_value";s:4:"qwer";}i:3;a:3:{s:2:"id";s:1:"4";s:5:"dummy";s:5:"dummy";s:12:"string_value";s:0:"";}}}i:27;a:3:{s:8:"sphinxql";s:57:"select id, string_value, upper(string_value) from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:12:"string_value";s:4:"asdf";s:19:"upper(string_value)";s:4:"ASDF";}i:1;a:3:{s:2:"id";s:1:"2";s:12:"string_value";s:4:"ASDF";s:19:"upper(string_value)";s:4:"ASDF";}i:2;a:3:{s:2:"id";s:1:"3";s:12:"string_value";s:4:"qwer";s:19:"upper(string_value)";s:4:"QWER";}i:3;a:3:{s:2:"id";s:1:"4";s:12:"string_value";s:0:"";s:19:"upper(string_value)";s:0:"";}}}i:28;a:3:{s:8:"sphinxql";s:57:"select id, string_value, lower(string_value) from strings";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:12:"string_value";s:4:"asdf";s:19:"lower(string_value)";s:4:"asdf";}i:1;a:3:{s:2:"id";s:1:"2";s:12:"string_value";s:4:"ASDF";s:19:"lower(string_value)";s:4:"asdf";}i:2;a:3:{s:2:"id";s:1:"3";s:12:"string_value";s:4:"qwer";s:19:"lower(string_value)";s:4:"qwer";}i:3;a:3:{s:2:"id";s:1:"4";s:12:"string_value";s:0:"";s:19:"lower(string_value)";s:0:"";}}}i:29;a:3:{s:8:"sphinxql";s:30:"select * from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:4:{s:2:"id";s:1:"1";s:5:"title";s:8:"test one";s:3:"gid";s:1:"1";s:1:"j";s:53:"{"name":"Alice","uid":123,"jobs":["aaa","bbb","ccc"]}";}i:1;a:4:{s:2:"id";s:1:"2";s:5:"title";s:8:"test two";s:3:"gid";s:1:"1";s:1:"j";s:60:"{"name":"Bob","uid":234,"gid":12,"jobs":["aaa","bbb","ccc"]}";}}}i:30;a:3:{s:8:"sphinxql";s:57:"select id, j.jobs, upper(j.jobs[1]) from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"upper(j.jobs[1])";s:3:"BBB";}i:1;a:3:{s:2:"id";s:1:"2";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"upper(j.jobs[1])";s:3:"BBB";}}}i:31;a:3:{s:8:"sphinxql";s:57:"select id, j.jobs, lower(j.jobs[1]) from test_json_string";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"lower(j.jobs[1])";s:3:"bbb";}i:1;a:3:{s:2:"id";s:1:"2";s:6:"j.jobs";s:19:"["aaa","bbb","ccc"]";s:16:"lower(j.jobs[1])";s:3:"bbb";}}}i:32;a:3:{s:8:"sphinxql";s:45:"select id, upper('abc') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"ABC";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"ABC";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"ABC";}}}i:33;a:3:{s:8:"sphinxql";s:19:"select upper('abc')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:12:"upper('abc')";s:3:"ABC";}}}i:34;a:3:{s:8:"sphinxql";s:48:"select id, upper('абв') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:6:"АБВ";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:6:"АБВ";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:6:"АБВ";}}}i:35;a:3:{s:8:"sphinxql";s:22:"select upper('абв')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:15:"upper('абв')";s:6:"АБВ";}}}i:36;a:3:{s:8:"sphinxql";s:46:"select id, upper('öö') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:4:"ÖÖ";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:4:"ÖÖ";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:4:"ÖÖ";}}}i:37;a:3:{s:8:"sphinxql";s:20:"select upper('öö')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:13:"upper('öö')";s:4:"ÖÖ";}}}i:38;a:3:{s:8:"sphinxql";s:49:"select id, upper('Straße') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"STRASSE";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"STRASSE";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"STRASSE";}}}i:39;a:3:{s:8:"sphinxql";s:23:"select upper('Straße')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:16:"upper('Straße')";s:7:"STRASSE";}}}i:40;a:3:{s:8:"sphinxql";s:45:"select id, lower('ABC') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:3:"abc";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:3:"abc";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:3:"abc";}}}i:41;a:3:{s:8:"sphinxql";s:19:"select lower('ABC')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:12:"lower('ABC')";s:3:"abc";}}}i:42;a:3:{s:8:"sphinxql";s:48:"select id, lower('АБВ') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:6:"абв";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:6:"абв";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:6:"абв";}}}i:43;a:3:{s:8:"sphinxql";s:22:"select lower('АБВ')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:15:"lower('АБВ')";s:6:"абв";}}}i:44;a:3:{s:8:"sphinxql";s:46:"select id, lower('ÖÖ') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:4:"öö";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:4:"öö";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:4:"öö";}}}i:45;a:3:{s:8:"sphinxql";s:20:"select lower('ÖÖ')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:13:"lower('ÖÖ')";s:4:"öö";}}}i:46;a:3:{s:8:"sphinxql";s:49:"select id, lower('STRAßE') as res from test_json";s:10:"total_rows";i:3;s:4:"rows";a:3:{i:0;a:2:{s:2:"id";s:1:"1";s:3:"res";s:7:"straße";}i:1;a:2:{s:2:"id";s:1:"2";s:3:"res";s:7:"straße";}i:2;a:2:{s:2:"id";s:1:"3";s:3:"res";s:7:"straße";}}}i:47;a:3:{s:8:"sphinxql";s:23:"select lower('STRAßE')";s:10:"total_rows";i:1;s:4:"rows";a:1:{i:0;a:1:{s:16:"lower('STRAßE')";s:7:"straße";}}}}} \ No newline at end of file From 9822955154d1c6b959a01b396a15035153810c10 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Fri, 5 May 2023 08:50:03 +0200 Subject: [PATCH 2/2] fixed test_182 --- test/test_182/model.bin | 2 +- test/test_182/test.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_182/model.bin b/test/test_182/model.bin index 5d7072a385..188c0599a0 100644 --- a/test/test_182/model.bin +++ b/test/test_182/model.bin @@ -1 +1 @@ -a:2:{i:0;a:1:{i:0;a:11:{i:0;s:47:"stop=ok, return code=0; start=ok, return code=0";i:1;s:18:"1; 1; 1,2; test1; ";i:2;s:29:"2; 1; 1002,1023,4456; test2; ";i:3;s:29:"3; 1; 1003,1008,1010; test3; ";i:4;s:29:"4; 1; 1004,1005,1006; test4; ";i:5;s:7:"up.ok=2";i:6;s:47:"stop=ok, return code=0; start=ok, return code=0";i:7;s:20:"1; 1; 2,3,4; test1; ";i:8;s:29:"2; 1; 1002,1023,4456; test2; ";i:9;s:20:"3; 1; 6,7,8; test3; ";i:10;s:29:"4; 1; 1004,1005,1006; test4; ";}}i:1;a:1:{i:0;a:11:{i:0;s:47:"stop=ok, return code=0; start=ok, return code=0";i:1;s:18:"1; 1; 1,2; test1; ";i:2;s:29:"2; 1; 1002,1023,4456; test2; ";i:3;s:29:"3; 1; 1003,1008,1010; test3; ";i:4;s:29:"4; 1; 1004,1005,1006; test4; ";i:5;s:7:"up.ok=2";i:6;s:47:"stop=ok, return code=0; start=ok, return code=0";i:7;s:20:"1; 1; 2,3,4; test1; ";i:8;s:29:"2; 1; 1002,1023,4456; test2; ";i:9;s:20:"3; 1; 6,7,8; test3; ";i:10;s:29:"4; 1; 1004,1005,1006; test4; ";}}} \ No newline at end of file +a:2:{i:0;a:1:{i:0;a:11:{i:0;s:47:"stop=ok, return code=0; start=ok, return code=0";i:1;s:18:"1; test1; 1; 1,2; ";i:2;s:29:"2; test2; 1; 1002,1023,4456; ";i:3;s:29:"3; test3; 1; 1003,1008,1010; ";i:4;s:29:"4; test4; 1; 1004,1005,1006; ";i:5;s:7:"up.ok=2";i:6;s:47:"stop=ok, return code=0; start=ok, return code=0";i:7;s:20:"1; test1; 1; 2,3,4; ";i:8;s:29:"2; test2; 1; 1002,1023,4456; ";i:9;s:20:"3; test3; 1; 6,7,8; ";i:10;s:29:"4; test4; 1; 1004,1005,1006; ";}}i:1;a:1:{i:0;a:11:{i:0;s:47:"stop=ok, return code=0; start=ok, return code=0";i:1;s:18:"1; test1; 1; 1,2; ";i:2;s:29:"2; test2; 1; 1002,1023,4456; ";i:3;s:29:"3; test3; 1; 1003,1008,1010; ";i:4;s:29:"4; test4; 1; 1004,1005,1006; ";i:5;s:7:"up.ok=2";i:6;s:47:"stop=ok, return code=0; start=ok, return code=0";i:7;s:20:"1; test1; 1; 2,3,4; ";i:8;s:29:"2; test2; 1; 1002,1023,4456; ";i:9;s:20:"3; test3; 1; 6,7,8; ";i:10;s:29:"4; test4; 1; 1004,1005,1006; ";}}} \ No newline at end of file diff --git a/test/test_182/test.xml b/test/test_182/test.xml index 38e7e6aa6e..711937862d 100644 --- a/test/test_182/test.xml +++ b/test/test_182/test.xml @@ -5,7 +5,6 @@ -