mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Portability fixes
This commit is contained in:
@ -201,6 +201,7 @@ os_thread_exit(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PTHREAD_JOIN
|
||||||
int
|
int
|
||||||
os_thread_join(
|
os_thread_join(
|
||||||
/*=============*/
|
/*=============*/
|
||||||
@ -208,6 +209,7 @@ os_thread_join(
|
|||||||
{
|
{
|
||||||
return pthread_join(thread_id, NULL);
|
return pthread_join(thread_id, NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
Returns handle to the current thread. */
|
Returns handle to the current thread. */
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
|
|||||||
uchar *strpos;
|
uchar *strpos;
|
||||||
BUFFPEK *buffpek,**refpek;
|
BUFFPEK *buffpek,**refpek;
|
||||||
QUEUE queue;
|
QUEUE queue;
|
||||||
volatile bool *killed= killed_ptr(info->sort_info->param);
|
volatile my_bool *killed= killed_ptr(info->sort_info->param);
|
||||||
DBUG_ENTER("merge_buffers");
|
DBUG_ENTER("merge_buffers");
|
||||||
|
|
||||||
count=error=0;
|
count=error=0;
|
||||||
@ -873,7 +873,8 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
|
|||||||
count+= buffpek->count;
|
count+= buffpek->count;
|
||||||
buffpek->base= strpos;
|
buffpek->base= strpos;
|
||||||
buffpek->max_keys=maxcount;
|
buffpek->max_keys=maxcount;
|
||||||
strpos+= (uint) (error=(int) info->read_to_buffer(from_file,buffpek,sort_length));
|
strpos+= (uint) (error=(int) info->read_to_buffer(from_file,buffpek,
|
||||||
|
sort_length));
|
||||||
if (error == -1)
|
if (error == -1)
|
||||||
goto err; /* purecov: inspected */
|
goto err; /* purecov: inspected */
|
||||||
queue_insert(&queue,(char*) buffpek);
|
queue_insert(&queue,(char*) buffpek);
|
||||||
@ -890,7 +891,8 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
|
|||||||
buffpek=(BUFFPEK*) queue_top(&queue);
|
buffpek=(BUFFPEK*) queue_top(&queue);
|
||||||
if (to_file)
|
if (to_file)
|
||||||
{
|
{
|
||||||
if (info->write_key(info,to_file,(byte*) buffpek->key,(uint) sort_length,1))
|
if (info->write_key(info,to_file,(byte*) buffpek->key,
|
||||||
|
(uint) sort_length,1))
|
||||||
{
|
{
|
||||||
error=1; goto err; /* purecov: inspected */
|
error=1; goto err; /* purecov: inspected */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user