maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08627
Re: [Commits] 52c3687: MDEV-8241: Debug build on Windows is broken: error LNK2019: unresolved external symbol pthread_detach referenced in function ma_checkpoint_init
Hi, Sanja!
On May 28, sanja@xxxxxxxxxxx wrote:
> revision-id: 52c36874e251c3ac5ff0f925c8133074166d481d
> parent(s): 979c5049ef6fdd55c29fa5170a96c62d2a8a6823
> committer: Oleksandr Byelkin
> branch nick: server
> timestamp: 2015-05-28 07:59:57 +0200
> message:
>
> MDEV-8241: Debug build on Windows is broken: error LNK2019: unresolved external symbol pthread_detach referenced in function ma_checkpoint_init
>
> pthread_detach() replaced with pthread_detach_this_thread()
>
> pthread_detach_this_thread() definition fixed
>
> diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c
> index 2268ca6..36b729e 100644
> --- a/storage/maria/ma_checkpoint.c
> +++ b/storage/maria/ma_checkpoint.c
> @@ -340,7 +340,6 @@ int ma_checkpoint_init(ulong interval)
> {
> /* thread lives, will have to be killed */
> checkpoint_control.status= THREAD_RUNNING;
> - pthread_detach(th);
> }
> }
> DBUG_RETURN(res);
> @@ -574,6 +573,8 @@ pthread_handler_t ma_checkpoint_background(void *arg)
> sleeps= 1;
> pages_to_flush_before_next_checkpoint= 0;
>
> + pthread_detach_this_thread();
> +
> for(;;) /* iterations of checkpoints and dirty page flushing */
> {
How does that help? What was wrong with pthread_detach()?
Regards,
Sergei
Follow ups