Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
576a5f09
Commit
576a5f09
authored
Sep 24, 2019
by
Robert Bindar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20647 Fix and enable SphinxSE tests
parent
46b78526
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
storage/sphinx/mysql-test/sphinx/disabled.def
storage/sphinx/mysql-test/sphinx/disabled.def
+0
-2
storage/sphinx/mysql-test/sphinx/suite.pm
storage/sphinx/mysql-test/sphinx/suite.pm
+31
-2
storage/sphinx/mysql-test/sphinx/union-5539.result
storage/sphinx/mysql-test/sphinx/union-5539.result
+2
-0
No files found.
storage/sphinx/mysql-test/sphinx/disabled.def
deleted
100644 → 0
View file @
46b78526
sphinx : MDEV-10986, MDEV-10985
union-5539 : MDEV-10986, MDEV-10985
storage/sphinx/mysql-test/sphinx/suite.pm
View file @
576a5f09
...
...
@@ -23,6 +23,8 @@ return "'indexer' binary not found" unless $exe_sphinx_indexer;
my
$exe_sphinx_searchd
=
&
locate_sphinx_binary
('
searchd
');
return
"
'searchd' binary not found
"
unless
$exe_sphinx_searchd
;
my
$sphinx_config
=
"
$::opt_vardir/my_sphinx.conf
";
# Check for Sphinx engine
return
"
SphinxSE not found
"
unless
$ENV
{
HA_SPHINX_SO
}
or
$::mysqld_variables
{'
sphinx
'}
eq
"
ON
";
...
...
@@ -95,11 +97,38 @@ sub searchd_start {
&::
mtr_verbose
("
Started
$sphinx
->{proc}
");
}
sub
wait_exp_backoff
{
my
$timeout
=
shift
;
# Seconds
my
$start_wait
=
shift
;
# Seconds
my
$scale_factor
=
shift
;
$searchd_status
=
"
$exe_sphinx_searchd
--status
"
.
"
--config
$sphinx_config
> /dev/null 2>&1
";
my
$scale
=
$start_wait
;
my
$total_sleep
=
0
;
while
(
1
)
{
my
$status
=
system
(
$searchd_status
);
if
(
not
$status
)
{
return
0
;
}
if
(
$total_sleep
>=
$timeout
)
{
last
;
}
&::
mtr_milli_sleep
(
$scale
*
1000
);
$total_sleep
+=
$scale
;
$scale
*=
$scale_factor
;
}
&::
mtr_warning
("
Getting a response from searchd timed out
");
return
1
}
sub
searchd_wait
{
my
(
$sphinx
)
=
@_
;
# My::Config::Group
return
not
&::
sleep_until_file_created
(
$sphinx
->
value
('
pid_file
'),
20
,
$sphinx
->
{'
proc
'})
return
wait_exp_backoff
(
30
,
0.1
,
2
)
}
############# declaration methods ######################
...
...
storage/sphinx/mysql-test/sphinx/union-5539.result
View file @
576a5f09
...
...
@@ -5,10 +5,12 @@ id w query
2 1 ;mode=extended2;limit=1000000;maxmatches=500
3 1 ;mode=extended2;limit=1000000;maxmatches=500
4 1 ;mode=extended2;limit=1000000;maxmatches=500
5 1 ;mode=extended2;limit=1000000;maxmatches=500
SELECT a.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS b;
id w query
1 1 ;mode=extended2;limit=1000000;maxmatches=500
2 1 ;mode=extended2;limit=1000000;maxmatches=500
3 1 ;mode=extended2;limit=1000000;maxmatches=500
4 1 ;mode=extended2;limit=1000000;maxmatches=500
5 1 ;mode=extended2;limit=1000000;maxmatches=500
drop table ts;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment