File: test.xml

package info (click to toggle)
sphinxsearch 2.2.11-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 25,720 kB
  • sloc: cpp: 102,259; xml: 85,608; sh: 9,259; php: 3,790; ansic: 3,158; yacc: 1,969; java: 1,336; ruby: 1,289; python: 1,062; pascal: 912; perl: 381; lex: 275; makefile: 150; sql: 77; cs: 35
file content (65 lines) | stat: -rw-r--r-- 1,802 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<test>
<name>MySQL IN vs filter order</name>

<config>
indexer
{
	mem_limit = 16M
}

searchd
{
	<searchd_settings/>
	workers = threads
}

source test
{
	type = mysql
	<sql_settings/>
	sql_query = SELECT * FROM test_table
	sql_attr_uint	= idd
}

index test
{
	source			= test
	path			= <data_path/>/test
	docinfo			= extern
}
</config>

<db_create>
CREATE TABLE test_table
(
	id INT NOT NULL,
	body VARCHAR(2048) NOT NULL,
	idd INT NOT NULL
);
</db_create>

<db_drop>drop table if exists test_table;</db_drop>

<db_insert>insert into test_table values ( 1, 'test', 10 );</db_insert>
<db_insert>insert into test_table values ( 2, 'test', 20 );</db_insert>
<db_insert>insert into test_table values ( 3, 'test', 30 );</db_insert>
<db_insert>insert into test_table values ( 4, 'test', 40 );</db_insert>
<db_insert>insert into test_table values ( 5, 'test', 50 );</db_insert>
<db_insert>insert into test_table values ( 6, 'test', 60 );</db_insert>
<db_insert>insert into test_table values ( 7, 'test', 70 );</db_insert>

<sphqueries>
	<sphinxql>select * from test</sphinxql>
	<sphinxql>select * from test where id IN (1,3,6,7)</sphinxql>
	<sphinxql>select * from test where id IN (1,1000,3,6,7)</sphinxql>
	<sphinxql>select * from test where id IN (1000,1,3,6,7)</sphinxql>
	<sphinxql>select * from test where id IN (1,3,6,1000,7)</sphinxql>
	<sphinxql>select * from test where idd IN (875,321,60,1010,20,457,20,311,20,750,70,10)</sphinxql>
	<sphinxql>select * from test where idd NOT IN (60,1010,20,457,20,311,20,750,70,10)</sphinxql>
	<!-- here is regression broken NOT IN @global -->
	<sphinxql>set global @attr_filter=(10,20,30,70)</sphinxql>
	<sphinxql>select * from test where idd IN @attr_filter</sphinxql>
	<sphinxql>select * from test where idd NOT IN @attr_filter</sphinxql>
</sphqueries>

</test>