<?xml version="1.0" encoding="utf-8"?>

<test>
<name>persistent connections</name>

<config>
indexer
{
	mem_limit = 16M
}

searchd
{
	<searchd_settings/>
	<dynamic>
		<variant>client_timeout = 5</variant>
		<variant>client_timeout = 1</variant>
	</dynamic>
<dynamic>
<variant>workers = none</variant>
<variant>
	workers = threads
	binlog_path =
</variant>
</dynamic>
	
}

source srctest
{
	type = mysql
	<sql_settings/>
	sql_query = SELECT id, body FROM test_table
}

index test_idx
{
	source				= srctest
	path				= <data_path/>/test
}

</config>

<db_create>
CREATE TABLE `test_table`
(
	`id` int(11) NOT NULL default '0',
	`body` varchar(255) NOT NULL default ''
)
</db_create>

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

<db_insert>
INSERT INTO `test_table` VALUES ( 1, 'test' )
</db_insert>

<custom_test><![CDATA[

$results = array ();

$results [] = $client->Open();

$results [] = $client->Query ( 'test' );
$results [] = $client->GetLastError();
sleep ( 2 );
$results [] = $client->Query ( 'test' );
$results [] = $client->GetLastError();

$results [] = $client->Close();

foreach ( $results as &$r )
	if ( is_array($r) )
		unset ( $r['time'] );

]]></custom_test>
</test>
