summaryrefslogtreecommitdiff
path: root/storage/maria/ma_loghandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ma_loghandler.c')
-rw-r--r--storage/maria/ma_loghandler.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index 1e7cc9483a2..8bcb84c2a20 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -54,7 +54,7 @@ static mysql_mutex_t LOCK_soft_sync;
static mysql_cond_t COND_soft_sync;
/** @brief control structure for checkpoint background thread */
static MA_SERVICE_THREAD_CONTROL soft_sync_control=
- {THREAD_DEAD, FALSE, &LOCK_soft_sync, &COND_soft_sync};
+ {0, FALSE, FALSE, &LOCK_soft_sync, &COND_soft_sync};
/* transaction log file descriptor */
@@ -8790,7 +8790,6 @@ ma_soft_sync_background( void *arg __attribute__((unused)))
if (my_service_thread_sleep(&soft_sync_control, sleep))
break;
}
- my_service_thread_signal_end(&soft_sync_control);
my_thread_end();
DBUG_RETURN(0);
}
@@ -8803,7 +8802,6 @@ ma_soft_sync_background( void *arg __attribute__((unused)))
int translog_soft_sync_start(void)
{
- pthread_t th;
int res= 0;
uint32 min, max;
DBUG_ENTER("translog_soft_sync_start");
@@ -8818,9 +8816,10 @@ int translog_soft_sync_start(void)
soft_need_sync= 1;
if (!(res= ma_service_thread_control_init(&soft_sync_control)))
- if (!(res= mysql_thread_create(key_thread_soft_sync,
- &th, NULL, ma_soft_sync_background, NULL)))
- soft_sync_control.status= THREAD_RUNNING;
+ if ((res= mysql_thread_create(key_thread_soft_sync,
+ &soft_sync_control.thread, NULL,
+ ma_soft_sync_background, NULL)))
+ soft_sync_control.killed= TRUE;
DBUG_RETURN(res);
}