<?xml version="1.0" encoding="utf-8"?>
<Test>
<Name>bitfields + MVA</Name>
  
<requires> <variant_match /> </requires>  

<Config>
indexer
{
mem_limit			= 16M
}

searchd
{
	<Searchd_Settings/>
}

source srclj
{
	type			= mysql
<Sql_Settings/>
	sql_query = SELECT id, adtext, heading, postcode, lng, lat, section, transmission_id FROM test_table

	sql_attr_float	= lng
	sql_attr_float	= lat
	sql_attr_uint	= section:8
	sql_attr_uint	= transmission_id:5
<Dynamic>
	<Variant>sql_attr_multi = uint make_id from query; SELECT id, make_id FROM test_table</Variant>
	<Variant>sql_attr_multi = bigint make_id from query; SELECT id, make_id FROM test_table</Variant>
</Dynamic>	
}
index lj
{
	source			= srclj
	path			= <Data_Path/>/lj
	docinfo			= extern
	charset_type	= utf-8
	min_word_len	= 1
	charset_type	= sbcs
}
  </Config>

  <Query_Attributes>
	<Attr_1>section</Attr_1>
	<Attr_2>make_id</Attr_2>
  </Query_Attributes>

  <Query>
    <Query_0></Query_0>
  </Query>
  <DB_Create>
CREATE TABLE `test_table` (
  `id` int(11) NOT NULL auto_increment,
  `section` int(11) NOT NULL,
  `system_id` tinyint(4) NOT NULL,
  `adtext` varchar(255) NOT NULL,
  `heading` varchar(500) NOT NULL,
  `price` int(11) NOT NULL default '0',
  `postcode` varchar(10) NOT NULL,
  `gre` int(11) NOT NULL,
  `grn` int(11) NOT NULL,
  `str_at1` varchar(255) NOT NULL,
  `str_at2` varchar(255) NOT NULL,
  `str_at3` varchar(255) NOT NULL,
  `str_at4` varchar(255) NOT NULL,
  `str_at5` varchar(255) NOT NULL,
  `int_at1` int(11) default NULL,
  `int_at2` int(11) default NULL,
  `int_at3` int(11) default NULL,
  `int_at4` int(11) default NULL,
  `int_at5` int(11) default NULL,
  `float_at1` float default NULL,
  `float_at2` float default NULL,
  `float_at3` float default NULL,
  `lng` float NOT NULL default '0',
  `lat` float NOT NULL default '0',
  `make_id` int(11) NOT NULL,
  `transmission_id` tinyint(4) NOT NULL,
  PRIMARY KEY  (`id`)
)
  </DB_Create>

  <DB_Drop>
DROP TABLE IF EXISTS `test_table`
  </DB_Drop>

  <DB_Insert>
INSERT INTO `test_table` (`id`, `section`, `system_id`, `adtext`, `heading`, `price`, `postcode`, `gre`, `grn`, `str_at1`, `str_at2`, `str_at3`, `str_at4`, `str_at5`, `int_at1`, `int_at2`, `int_at3`, `int_at4`, `int_at5`, `float_at1`, `float_at2`, `float_at3`, `lng`, `lat`, `make_id`, `transmission_id`) VALUES 
(1, 1, 2, 'FORD', 'Ford KA', 2790, 'EN3 5BT', 535000, 197400,  'Ford', 'KA', 'Grey', 'Diesel', '', 18662, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0798578, 0.937717, 8, 1),
(2, 1, 0, 'until', 'Vauxhall Corsa', 5800, 'BN42 4RN', 524000, 106100, 'Vauxhall', 'Corsa', 'Red', 'Petrol', '', 19296, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0799989, 0.891975, 5, 0),
(211250, 0, 1, 'Quattro Roadster', 'Audi TT', 13995, 'E9 7DG', 535600, 184200, '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0721455, 0.926761, 29, 1);
  </DB_Insert>
</Test>
