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

<test>
<name>deadlock on threaded exit</name>

<config>
indexer
{
	mem_limit = 16M
}

searchd
{
	<searchd_settings/>
	workers = threads
	binlog_path =
}

source srctest
{
	type = mysql
	<sql_settings/>
	sql_query = SELECT id, t_zlib, at_1, t_mysql, plain, at_2, at_3, t_mysql_2 FROM test_table

	sql_attr_uint = at_1
	sql_attr_uint = at_2
	sql_attr_uint = at_3
}

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

</config>

<db_create>
CREATE TABLE test_table
(
	id integer primary key not null auto_increment,
	t_zlib blob,
	t_mysql blob,
	t_mysql_2 blob,
	plain varchar(256),
	at_1 int not null default 1,
	at_2 int not null default 2,
	at_3 int not null default 3
) ENGINE=MYISAM
</db_create>

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

<db_insert>
INSERT INTO test_table (t_zlib, t_mysql, t_mysql_2, plain) VALUES
( 'zlib', NULL, NULL, 'plain' ),
( NULL, 'mysql', NULL, NULL ),
( 'test', 'hello', 'world', '' ),
( 'malformed', 'broken', NULL, NULL ),
( '', '', '', '' );
</db_insert>

<queries>
<query>zlib</query>
<query>mysql</query>
<query>hello world</query>
<query>plain</query>
<query>malformed</query>
<query>broken</query>
</queries>

</test>
