Permalink
Browse files

fixed #178 github#5 MVA ranged-main-query issue due to sql_range_step…

…; added regression to test 328
  • Loading branch information...
tomatolog committed Jan 11, 2018
1 parent c5eb06e commit a40b0793feff65e40d10062568d9847c08d10f57
Showing with 28 additions and 2 deletions.
  1. +1 −1 src/sphinx.cpp
  2. +1 −1 test/test_328/model.bin
  3. +26 −0 test/test_328/test.xml
@@ -27044,7 +27044,7 @@ bool CSphSource_SQL::IterateMultivaluedNext ()
if ( SqlIsError() )
sphDie ( "sql_fetch_row: %s", SqlError() ); // FIXME! this should be reported
if ( tAttr.m_eSrc!=SPH_ATTRSRC_RANGEDQUERY )
if ( tAttr.m_eSrc!=SPH_ATTRSRC_RANGEDQUERY && tAttr.m_eSrc!=SPH_ATTRSRC_RANGEDMAINQUERY )
{
SqlDismissResult();
return false;
@@ -1 +1 @@
a:1:{i:0;a:2:{i:0;a:3:{s:8:"sphinxql";s:19:"select * from test1";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:3:"101";s:3:"mva";s:9:"1001,2001";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:3:"102";s:3:"mva";s:9:"1002,2002";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"gid";s:3:"103";s:3:"mva";s:9:"1003,2003";}i:3;a:3:{s:2:"id";s:1:"4";s:3:"gid";s:3:"104";s:3:"mva";s:9:"1004,2004";}}}i:1;a:3:{s:8:"sphinxql";s:19:"select * from test2";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"5";s:3:"gid";s:3:"105";s:3:"mva";s:9:"1005,2005";}i:1;a:3:{s:2:"id";s:1:"6";s:3:"gid";s:3:"106";s:3:"mva";s:9:"1006,2006";}i:2;a:3:{s:2:"id";s:1:"7";s:3:"gid";s:3:"107";s:3:"mva";s:9:"1007,2007";}i:3;a:3:{s:2:"id";s:1:"8";s:3:"gid";s:3:"108";s:3:"mva";s:9:"1008,2008";}}}}}
a:1:{i:0;a:4:{i:0;a:3:{s:8:"sphinxql";s:19:"select * from test1";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:3:"101";s:3:"mva";s:9:"1001,2001";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:3:"102";s:3:"mva";s:9:"1002,2002";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"gid";s:3:"103";s:3:"mva";s:9:"1003,2003";}i:3;a:3:{s:2:"id";s:1:"4";s:3:"gid";s:3:"104";s:3:"mva";s:9:"1004,2004";}}}i:1;a:3:{s:8:"sphinxql";s:19:"select * from test2";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"5";s:3:"gid";s:3:"105";s:3:"mva";s:9:"1005,2005";}i:1;a:3:{s:2:"id";s:1:"6";s:3:"gid";s:3:"106";s:3:"mva";s:9:"1006,2006";}i:2;a:3:{s:2:"id";s:1:"7";s:3:"gid";s:3:"107";s:3:"mva";s:9:"1007,2007";}i:3;a:3:{s:2:"id";s:1:"8";s:3:"gid";s:3:"108";s:3:"mva";s:9:"1008,2008";}}}i:2;a:3:{s:8:"sphinxql";s:20:"select * from test11";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:3:"101";s:3:"mva";s:9:"1001,2001";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:3:"102";s:3:"mva";s:9:"1002,2002";}i:2;a:3:{s:2:"id";s:1:"3";s:3:"gid";s:3:"103";s:3:"mva";s:9:"1003,2003";}i:3;a:3:{s:2:"id";s:1:"4";s:3:"gid";s:3:"104";s:3:"mva";s:9:"1004,2004";}}}i:3;a:3:{s:8:"sphinxql";s:20:"select * from test21";s:10:"total_rows";i:4;s:4:"rows";a:4:{i:0;a:3:{s:2:"id";s:1:"5";s:3:"gid";s:3:"105";s:3:"mva";s:9:"1005,2005";}i:1;a:3:{s:2:"id";s:1:"6";s:3:"gid";s:3:"106";s:3:"mva";s:9:"1006,2006";}i:2;a:3:{s:2:"id";s:1:"7";s:3:"gid";s:3:"107";s:3:"mva";s:9:"1007,2007";}i:3;a:3:{s:2:"id";s:1:"8";s:3:"gid";s:3:"108";s:3:"mva";s:9:"1008,2008";}}}}}
@@ -42,6 +42,30 @@ index test2
path = <data_path/>/test2
}
source src11 : src1
{
sql_query_range = select 1, 4
sql_range_step = 2
}
index test11
{
source = src11
path = <data_path/>/test11
}
source src21 : src1
{
sql_query_range = select 5, 8
sql_range_step = 2
}
index test21
{
source = src21
path = <data_path/>/test21
}
</config>
<db_create>
@@ -83,6 +107,8 @@ create table mva
<sphqueries>
<sphinxql>select * from test1</sphinxql>
<sphinxql>select * from test2</sphinxql>
<sphinxql>select * from test11</sphinxql>
<sphinxql>select * from test21</sphinxql>
</sphqueries>
</test>

0 comments on commit a40b079

Please sign in to comment.