Commit 48b403cd authored by Sergei Golubchik's avatar Sergei Golubchik

Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var

parent 34ebf981
......@@ -3,3 +3,5 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
UNINSTALL PLUGIN simple_parser;
show status like 'a%status';
Variable_name Value
......@@ -9,3 +9,9 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
UNINSTALL PLUGIN simple_parser;
#
# Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var
#
show status like 'a%status';
......@@ -210,7 +210,7 @@ static struct st_mysql_ftparser simple_parser_descriptor=
static struct st_mysql_show_var simple_status[]=
{
{"static", (char *)"just a static text", SHOW_CHAR},
{"A_static", (char *)"just a static text", SHOW_CHAR},
{"called", (char *)&number_of_calls, SHOW_LONG},
{0,0,0}
};
......
......@@ -2199,12 +2199,11 @@ void remove_status_vars(SHOW_VAR *list)
{
pthread_mutex_lock(&LOCK_status);
SHOW_VAR *all= dynamic_element(&all_status_vars, 0, SHOW_VAR *);
int a= 0, b= all_status_vars.elements, c= (a+b)/2;
for (; list->name; list++)
{
int res= 0;
for (a= 0, b= all_status_vars.elements; b-a > 1; c= (a+b)/2)
int res= 0, a= 0, b= all_status_vars.elements, c= (a+b)/2;
for (; b-a > 0; c= (a+b)/2)
{
res= show_var_cmp(list, all+c);
if (res < 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