mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge 5.3 -> 5.5
This commit is contained in:
@@ -2550,19 +2550,20 @@ void remove_status_vars(SHOW_VAR *list)
|
|||||||
|
|
||||||
for (; list->name; list++)
|
for (; list->name; list++)
|
||||||
{
|
{
|
||||||
int res= 0, a= 0, b= all_status_vars.elements, c= (a+b)/2;
|
int first= 0, last= ((int) all_status_vars.elements) - 1;
|
||||||
for (; b-a > 0; c= (a+b)/2)
|
for ( ; first <= last; )
|
||||||
{
|
{
|
||||||
res= show_var_cmp(list, all+c);
|
int res, middle= (first + last) / 2;
|
||||||
if (res < 0)
|
if ((res= show_var_cmp(list, all + middle)) < 0)
|
||||||
b= c;
|
last= middle - 1;
|
||||||
else if (res > 0)
|
else if (res > 0)
|
||||||
a= c;
|
first= middle + 1;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
all[middle].type= SHOW_UNDEF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (res == 0)
|
}
|
||||||
all[c].type= SHOW_UNDEF;
|
|
||||||
}
|
}
|
||||||
shrink_var_array(&all_status_vars);
|
shrink_var_array(&all_status_vars);
|
||||||
mysql_mutex_unlock(&LOCK_status);
|
mysql_mutex_unlock(&LOCK_status);
|
||||||
|
Reference in New Issue
Block a user