summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/plugins/r/fulltext_plugin.result2
-rw-r--r--mysql-test/suite/plugins/t/fulltext_plugin.test6
-rw-r--r--plugin/fulltext/plugin_example.c2
-rw-r--r--sql/sql_show.cc5
4 files changed, 11 insertions, 4 deletions
diff --git a/mysql-test/suite/plugins/r/fulltext_plugin.result b/mysql-test/suite/plugins/r/fulltext_plugin.result
index 69ebbe07e9e..2c104c98676 100644
--- a/mysql-test/suite/plugins/r/fulltext_plugin.result
+++ b/mysql-test/suite/plugins/r/fulltext_plugin.result
@@ -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
diff --git a/mysql-test/suite/plugins/t/fulltext_plugin.test b/mysql-test/suite/plugins/t/fulltext_plugin.test
index 0e2f53d5b15..e9b4343e0dc 100644
--- a/mysql-test/suite/plugins/t/fulltext_plugin.test
+++ b/mysql-test/suite/plugins/t/fulltext_plugin.test
@@ -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';
+
diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c
index cc84cb6161b..328d9c0d739 100644
--- a/plugin/fulltext/plugin_example.c
+++ b/plugin/fulltext/plugin_example.c
@@ -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}
};
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 9f021ca31c7..e121493d2c7 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2277,12 +2277,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)