fix SphinxSE to not leave Sphinx_error status variable uninitialized
This commit is contained in:
parent
fb27ce22f7
commit
64f96de766
@ -48,7 +48,7 @@ SET optimizer_switch=@save_optimizer_switch;
|
|||||||
drop table ts;
|
drop table ts;
|
||||||
show status like "sphinx_error%";
|
show status like "sphinx_error%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sphinx_error OFF
|
Sphinx_error
|
||||||
show status like "sphinx_total%";
|
show status like "sphinx_total%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sphinx_total 2
|
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 * )
|
int sphinx_showfunc_error ( THD * thd, SHOW_VAR * out, char * )
|
||||||
{
|
{
|
||||||
CSphSEStats * pStats = sphinx_get_stats ( thd, out );
|
CSphSEStats * pStats = sphinx_get_stats ( thd, out );
|
||||||
|
out->type = SHOW_CHAR;
|
||||||
if ( pStats && pStats->m_bLastError )
|
if ( pStats && pStats->m_bLastError )
|
||||||
{
|
{
|
||||||
out->type = SHOW_CHAR;
|
|
||||||
out->value = pStats->m_sLastMessage;
|
out->value = pStats->m_sLastMessage;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out->value = (char*)"";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user