Commit 64f96de7 authored by Sergei Golubchik's avatar Sergei Golubchik

fix SphinxSE to not leave Sphinx_error status variable uninitialized

parent fb27ce22
......@@ -48,7 +48,7 @@ SET optimizer_switch=@save_optimizer_switch;
drop table ts;
show status like "sphinx_error%";
Variable_name Value
Sphinx_error OFF
Sphinx_error
show status like "sphinx_total%";
Variable_name Value
Sphinx_total 2
......
......@@ -3575,11 +3575,13 @@ int sphinx_showfunc_words ( THD * thd, SHOW_VAR * out, char * sBuffer )
int sphinx_showfunc_error ( THD * thd, SHOW_VAR * out, char * )
{
CSphSEStats * pStats = sphinx_get_stats ( thd, out );
out->type = SHOW_CHAR;
if ( pStats && pStats->m_bLastError )
{
out->type = SHOW_CHAR;
out->value = pStats->m_sLastMessage;
}
else
out->value = (char*)"";
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment