Commit 762d3cb8 authored by Alexander Barkov's avatar Alexander Barkov

Merge from 5.1

modified:
  mysql-test/suite/plugins/r/fulltext_plugin.result
  mysql-test/suite/plugins/t/fulltext_plugin.test
  plugin/fulltext/plugin_example.c
  sql/sql_show.cc
pending merges:
  Sergei Golubchik 2013-07-06 Bug #69682 - mysqld crashes after uninstall ...
    Sergei Golubchik 2013-05-24 MDEV-4575 MySQL client doesn't strip off...
parents 4ee5ae3e 48b403cd
......@@ -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}
};
......
......@@ -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)
......
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