Add an extra block to avoid that DBUG_ENTER declare variables after code
This commit is contained in:
parent
02f56cc185
commit
ac54f00f00
@ -322,6 +322,9 @@ pthread_handler_t thr_find_all_keys(void *arg)
|
|||||||
|
|
||||||
if (my_thread_init())
|
if (my_thread_init())
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
|
||||||
|
{ /* Add extra block since DBUG_ENTER declare variables */
|
||||||
DBUG_ENTER("thr_find_all_keys");
|
DBUG_ENTER("thr_find_all_keys");
|
||||||
DBUG_PRINT("enter", ("master: %d", sort_param->master));
|
DBUG_PRINT("enter", ("master: %d", sort_param->master));
|
||||||
if (sort_param->sort_info->got_error)
|
if (sort_param->sort_info->got_error)
|
||||||
@ -389,12 +392,14 @@ pthread_handler_t thr_find_all_keys(void *arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
old_memavl= memavl;
|
old_memavl= memavl;
|
||||||
if ((memavl=memavl/4*3) < MIN_SORT_MEMORY && old_memavl > MIN_SORT_MEMORY)
|
if ((memavl= memavl/4*3) < MIN_SORT_MEMORY &&
|
||||||
|
old_memavl > MIN_SORT_MEMORY)
|
||||||
memavl= MIN_SORT_MEMORY;
|
memavl= MIN_SORT_MEMORY;
|
||||||
}
|
}
|
||||||
if (memavl < MIN_SORT_MEMORY)
|
if (memavl < MIN_SORT_MEMORY)
|
||||||
{
|
{
|
||||||
mi_check_print_error(sort_param->sort_info->param, "Sort buffer too small");
|
mi_check_print_error(sort_param->sort_info->param,
|
||||||
|
"Sort buffer too small");
|
||||||
goto err; /* purecov: tested */
|
goto err; /* purecov: tested */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,6 +480,7 @@ ok:
|
|||||||
pthread_mutex_unlock(&sort_param->sort_info->mutex);
|
pthread_mutex_unlock(&sort_param->sort_info->mutex);
|
||||||
|
|
||||||
DBUG_PRINT("exit", ("======== ending thread ========"));
|
DBUG_PRINT("exit", ("======== ending thread ========"));
|
||||||
|
}
|
||||||
my_thread_end();
|
my_thread_end();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user