~percona-dev/percona-server/release-5.1.49-11

« back to all changes in this revision

Viewing changes to innodb_purge_thread.patch

  • Committer: kinoyasu
  • Date: 2010-04-30 10:17:55 UTC
  • Revision ID: kinoyasu@gauntlet3-20100430101755-h27x25t4uax76lv4
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 
2
--- a/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-30 14:13:25.000000000 +0900
 
3
+++ b/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-30 14:13:51.000000000 +0900
 
4
@@ -10721,6 +10721,11 @@
 
5
   "Output statistics of recovery process after it.",
 
6
   NULL, NULL, FALSE);
 
7
 
 
8
+static MYSQL_SYSVAR_ULONG(use_purge_thread, srv_use_purge_thread,
 
9
+  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
 
10
+  "Number of purge devoted threads. #### over 1 is EXPERIMENTAL ####",
 
11
+  NULL, NULL, 0, 0, 64, 0);
 
12
+
 
13
 static MYSQL_SYSVAR_BOOL(overwrite_relay_log_info, innobase_overwrite_relay_log_info,
 
14
   PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
 
15
   "During InnoDB crash recovery on slave overwrite relay-log.info "
 
16
@@ -11222,6 +11227,7 @@
 
17
   MYSQL_SYSVAR(change_buffering),
 
18
   MYSQL_SYSVAR(read_ahead_threshold),
 
19
   MYSQL_SYSVAR(io_capacity),
 
20
+  MYSQL_SYSVAR(use_purge_thread),
 
21
   NULL
 
22
 };
 
23
 
 
24
diff -ruN a/storage/innodb_plugin/handler/innodb_patch_info.h b/storage/innodb_plugin/handler/innodb_patch_info.h
 
25
--- a/storage/innodb_plugin/handler/innodb_patch_info.h 2010-04-30 14:13:25.000000000 +0900
 
26
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h 2010-04-30 14:13:51.000000000 +0900
 
27
@@ -37,5 +37,6 @@
 
28
 {"innodb_split_buf_pool_mutex","More fix of buffer_pool mutex","Spliting buf_pool_mutex and optimizing based on innodb_opt_lru_count","http://www.percona.com/docs/wiki/percona-xtradb"},
 
29
 {"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
30
 {"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
31
+{"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
32
 {NULL, NULL, NULL, NULL}
 
33
 };
 
34
diff -ruN a/storage/innodb_plugin/include/srv0srv.h b/storage/innodb_plugin/include/srv0srv.h
 
35
--- a/storage/innodb_plugin/include/srv0srv.h   2010-04-30 14:13:25.000000000 +0900
 
36
+++ b/storage/innodb_plugin/include/srv0srv.h   2010-04-30 14:13:51.000000000 +0900
 
37
@@ -117,6 +117,8 @@
 
38
 extern ibool   srv_fast_recovery;
 
39
 extern ibool   srv_recovery_stats;
 
40
 
 
41
+extern ulint   srv_use_purge_thread;
 
42
+
 
43
 extern ibool   srv_auto_extend_last_data_file;
 
44
 extern ulint   srv_last_file_size_max;
 
45
 extern char**  srv_log_group_home_dirs;
 
46
@@ -406,6 +408,8 @@
 
47
        SRV_RECOVERY,   /**< threads finishing a recovery */
 
48
        SRV_INSERT,     /**< thread flushing the insert buffer to disk */
 
49
 #endif
 
50
+       SRV_PURGE,      /* thread purging undo records */
 
51
+       SRV_PURGE_WORKER,       /* thread purging undo records */
 
52
        SRV_MASTER      /**< the master thread, (whose type number must
 
53
                        be biggest) */
 
54
 };
 
55
@@ -479,6 +483,21 @@
 
56
 /*==============*/
 
57
        void*   arg);   /*!< in: a dummy parameter required by
 
58
                        os_thread_create */
 
59
+/*************************************************************************
 
60
+The undo purge thread. */
 
61
+UNIV_INTERN
 
62
+os_thread_ret_t
 
63
+srv_purge_thread(
 
64
+/*=============*/
 
65
+       void*   arg);   /* in: a dummy parameter required by
 
66
+                       os_thread_create */
 
67
+/*************************************************************************
 
68
+The undo purge thread. */
 
69
+UNIV_INTERN
 
70
+os_thread_ret_t
 
71
+srv_purge_worker_thread(
 
72
+/*====================*/
 
73
+       void*   arg);
 
74
 /*******************************************************************//**
 
75
 Tells the Innobase server that there has been activity in the database
 
76
 and wakes up the master thread if it is suspended (not sleeping). Used
 
77
diff -ruN a/storage/innodb_plugin/include/trx0purge.h b/storage/innodb_plugin/include/trx0purge.h
 
78
--- a/storage/innodb_plugin/include/trx0purge.h 2010-04-06 23:07:13.000000000 +0900
 
79
+++ b/storage/innodb_plugin/include/trx0purge.h 2010-04-30 14:13:51.000000000 +0900
 
80
@@ -114,6 +114,25 @@
 
81
 ulint
 
82
 trx_purge(void);
 
83
 /*===========*/
 
84
+/**********************************************************************
 
85
+This function runs a purge worker batch */
 
86
+UNIV_INTERN
 
87
+void
 
88
+trx_purge_worker(
 
89
+/*=============*/
 
90
+       ulint   worker_id);
 
91
+/**********************************************************************
 
92
+This function waits the event for worker batch */
 
93
+UNIV_INTERN
 
94
+void
 
95
+trx_purge_worker_wait(void);
 
96
+/*========================*/
 
97
+/**********************************************************************
 
98
+This function wakes the waiting worker batch */
 
99
+UNIV_INTERN
 
100
+void
 
101
+trx_purge_worker_wake(void);
 
102
+/*========================*/
 
103
 /******************************************************************//**
 
104
 Prints information of the purge system to stderr. */
 
105
 UNIV_INTERN
 
106
@@ -131,6 +150,11 @@
 
107
                                        of the trx system and it never ends */
 
108
        que_t*          query;          /*!< The query graph which will do the
 
109
                                        parallelized purge operation */
 
110
+       ulint           n_worker;
 
111
+       os_event_t      worker_event;
 
112
+       sess_t**        sess_arr;
 
113
+       trx_t**         trx_arr;
 
114
+       que_t**         query_arr;
 
115
        rw_lock_t       latch;          /*!< The latch protecting the purge view.
 
116
                                        A purge operation must acquire an
 
117
                                        x-latch here for the instant at which
 
118
diff -ruN a/storage/innodb_plugin/log/log0log.c b/storage/innodb_plugin/log/log0log.c
 
119
--- a/storage/innodb_plugin/log/log0log.c       2010-04-29 15:55:25.000000000 +0900
 
120
+++ b/storage/innodb_plugin/log/log0log.c       2010-04-30 14:13:51.000000000 +0900
 
121
@@ -3147,6 +3147,16 @@
 
122
                goto loop;
 
123
        }
 
124
 
 
125
+       /* Check that the purge threads ended */
 
126
+       if (srv_use_purge_thread
 
127
+           && (srv_n_threads_active[SRV_PURGE] != 0
 
128
+               || srv_n_threads_active[SRV_PURGE_WORKER] != 0)) {
 
129
+
 
130
+               mutex_exit(&kernel_mutex);
 
131
+
 
132
+               goto loop;
 
133
+       }
 
134
+
 
135
        mutex_exit(&kernel_mutex);
 
136
 
 
137
        mutex_enter(&(log_sys->mutex));
 
138
diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
 
139
--- a/storage/innodb_plugin/srv/srv0srv.c       2010-04-30 14:13:25.000000000 +0900
 
140
+++ b/storage/innodb_plugin/srv/srv0srv.c       2010-04-30 14:13:51.000000000 +0900
 
141
@@ -147,6 +147,8 @@
 
142
 UNIV_INTERN ibool      srv_fast_recovery = FALSE;
 
143
 UNIV_INTERN ibool      srv_recovery_stats = FALSE;
 
144
 
 
145
+UNIV_INTERN ulint      srv_use_purge_thread = 0;
 
146
+
 
147
 /* if TRUE, then we auto-extend the last data file */
 
148
 UNIV_INTERN ibool      srv_auto_extend_last_data_file  = FALSE;
 
149
 /* if != 0, this tells the max size auto-extending may increase the
 
150
@@ -2609,10 +2611,10 @@
 
151
        srv_main_thread_process_no = os_proc_get_number();
 
152
        srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
 
153
 
 
154
-       srv_table_reserve_slot(SRV_MASTER);
 
155
 
 
156
        mutex_enter(&kernel_mutex);
 
157
 
 
158
+       srv_table_reserve_slot(SRV_MASTER);
 
159
        srv_n_threads_active[SRV_MASTER]++;
 
160
 
 
161
        mutex_exit(&kernel_mutex);
 
162
@@ -2942,6 +2944,7 @@
 
163
        /* Flush logs if needed */
 
164
        srv_sync_log_buffer_in_background();
 
165
 
 
166
+       if (!srv_use_purge_thread) {
 
167
        /* We run a full purge every 10 seconds, even if the server
 
168
        were active */
 
169
        do {
 
170
@@ -2958,6 +2961,7 @@
 
171
                srv_sync_log_buffer_in_background();
 
172
 
 
173
        } while (n_pages_purged);
 
174
+       }
 
175
 
 
176
        srv_main_thread_op_info = "flushing buffer pool pages";
 
177
 
 
178
@@ -3026,6 +3030,7 @@
 
179
                os_thread_sleep(100000);
 
180
        }
 
181
 
 
182
+       if (!srv_use_purge_thread) {
 
183
        srv_main_thread_op_info = "purging";
 
184
 
 
185
        /* Run a full purge */
 
186
@@ -3042,6 +3047,7 @@
 
187
                srv_sync_log_buffer_in_background();
 
188
 
 
189
        } while (n_pages_purged);
 
190
+       }
 
191
 
 
192
        srv_main_thread_op_info = "reserving kernel mutex";
 
193
 
 
194
@@ -3194,3 +3200,143 @@
 
195
 
 
196
        OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
 
197
 }
 
198
+
 
199
+/*************************************************************************
 
200
+A thread which is devoted to purge, for take over the master thread's
 
201
+purging */
 
202
+UNIV_INTERN
 
203
+os_thread_ret_t
 
204
+srv_purge_thread(
 
205
+/*=============*/
 
206
+       void*   arg __attribute__((unused)))
 
207
+                       /* in: a dummy parameter required by os_thread_create */
 
208
+{
 
209
+       ulint   n_pages_purged;
 
210
+       ulint   n_pages_purged_sum = 1; /* dummy */
 
211
+       ulint   history_len;
 
212
+       ulint   sleep_ms= 10000; /* initial: 10 sec. */
 
213
+       ibool   can_be_last = FALSE;
 
214
+
 
215
+#ifdef UNIV_DEBUG_THREAD_CREATION
 
216
+       fprintf(stderr, "Purge thread starts, id %lu\n",
 
217
+               os_thread_pf(os_thread_get_curr_id()));
 
218
+#endif
 
219
+
 
220
+       mutex_enter(&kernel_mutex);
 
221
+       srv_table_reserve_slot(SRV_PURGE);
 
222
+       srv_n_threads_active[SRV_PURGE]++;
 
223
+       mutex_exit(&kernel_mutex);
 
224
+
 
225
+loop:
 
226
+       if (srv_shutdown_state > 0) {
 
227
+               if (srv_fast_shutdown) {
 
228
+                       /* someone other should wait the end of the workers */
 
229
+                       goto exit_func;
 
230
+               }
 
231
+
 
232
+               mutex_enter(&kernel_mutex);
 
233
+               if (srv_n_threads_active[SRV_PURGE_WORKER]) {
 
234
+                       can_be_last = FALSE;
 
235
+               } else {
 
236
+                       can_be_last = TRUE;
 
237
+               }
 
238
+               mutex_exit(&kernel_mutex);
 
239
+
 
240
+               sleep_ms = 10;
 
241
+       }
 
242
+
 
243
+       os_thread_sleep( sleep_ms * 1000 );
 
244
+
 
245
+       history_len = trx_sys->rseg_history_len;
 
246
+       if (history_len > 1000)
 
247
+               sleep_ms /= 10;
 
248
+       if (sleep_ms < 10)
 
249
+               sleep_ms = 10;
 
250
+
 
251
+       n_pages_purged_sum = 0;
 
252
+
 
253
+       do {
 
254
+               if (srv_fast_shutdown && srv_shutdown_state > 0) {
 
255
+                       goto exit_func;
 
256
+               }
 
257
+               n_pages_purged = trx_purge();
 
258
+               n_pages_purged_sum += n_pages_purged;
 
259
+       } while (n_pages_purged);
 
260
+
 
261
+       if (srv_shutdown_state > 0 && can_be_last) {
 
262
+               /* the last trx_purge() is executed without workers */
 
263
+               goto exit_func;
 
264
+       }
 
265
+
 
266
+       if (n_pages_purged_sum) {
 
267
+               srv_active_wake_master_thread();
 
268
+       }
 
269
+
 
270
+       if (n_pages_purged_sum == 0)
 
271
+               sleep_ms *= 10;
 
272
+       if (sleep_ms > 10000)
 
273
+               sleep_ms = 10000;
 
274
+
 
275
+       goto loop;
 
276
+
 
277
+exit_func:
 
278
+       trx_purge_worker_wake(); /* It may not make sense. for safety only */
 
279
+
 
280
+       /* wake master thread to flush the pages */
 
281
+       srv_wake_master_thread();
 
282
+
 
283
+       mutex_enter(&kernel_mutex);
 
284
+       srv_n_threads_active[SRV_PURGE]--;
 
285
+       mutex_exit(&kernel_mutex);
 
286
+       os_thread_exit(NULL);
 
287
+
 
288
+       OS_THREAD_DUMMY_RETURN;
 
289
+}
 
290
+
 
291
+/*************************************************************************
 
292
+A thread which is devoted to purge, for take over the master thread's
 
293
+purging */
 
294
+UNIV_INTERN
 
295
+os_thread_ret_t
 
296
+srv_purge_worker_thread(
 
297
+/*====================*/
 
298
+       void*   arg)
 
299
+{
 
300
+       ulint   worker_id; /* index for array */
 
301
+
 
302
+       worker_id = *((ulint*)arg);
 
303
+
 
304
+#ifdef UNIV_DEBUG_THREAD_CREATION
 
305
+       fprintf(stderr, "Purge worker thread starts, id %lu\n",
 
306
+               os_thread_pf(os_thread_get_curr_id()));
 
307
+#endif
 
308
+       mutex_enter(&kernel_mutex);
 
309
+       srv_table_reserve_slot(SRV_PURGE_WORKER);
 
310
+       srv_n_threads_active[SRV_PURGE_WORKER]++;
 
311
+       mutex_exit(&kernel_mutex);
 
312
+
 
313
+loop:
 
314
+       /* purge worker threads only works when srv_shutdown_state==0 */
 
315
+       /* for safety and exactness. */
 
316
+       if (srv_shutdown_state > 0) {
 
317
+               goto exit_func;
 
318
+       }
 
319
+
 
320
+       trx_purge_worker_wait();
 
321
+
 
322
+       if (srv_shutdown_state > 0) {
 
323
+               goto exit_func;
 
324
+       }
 
325
+
 
326
+       trx_purge_worker(worker_id);
 
327
+
 
328
+       goto loop;
 
329
+
 
330
+exit_func:
 
331
+       mutex_enter(&kernel_mutex);
 
332
+       srv_n_threads_active[SRV_PURGE_WORKER]--;
 
333
+       mutex_exit(&kernel_mutex);
 
334
+       os_thread_exit(NULL);
 
335
+
 
336
+       OS_THREAD_DUMMY_RETURN;
 
337
+}
 
338
diff -ruN a/storage/innodb_plugin/srv/srv0start.c b/storage/innodb_plugin/srv/srv0start.c
 
339
--- a/storage/innodb_plugin/srv/srv0start.c     2010-04-29 16:39:34.000000000 +0900
 
340
+++ b/storage/innodb_plugin/srv/srv0start.c     2010-04-30 14:25:25.000000000 +0900
 
341
@@ -126,9 +126,9 @@
 
342
 static ulint           ios;
 
343
 
 
344
 /** io_handler_thread parameters for thread identification */
 
345
-static ulint           n[SRV_MAX_N_IO_THREADS + 6];
 
346
+static ulint           n[SRV_MAX_N_IO_THREADS + 6 + 64];
 
347
 /** io_handler_thread identifiers */
 
348
-static os_thread_id_t  thread_ids[SRV_MAX_N_IO_THREADS + 6];
 
349
+static os_thread_id_t  thread_ids[SRV_MAX_N_IO_THREADS + 6 + 64];
 
350
 
 
351
 /** We use this mutex to test the return value of pthread_mutex_trylock
 
352
    on successful locking. HP-UX does NOT return 0, though Linux et al do. */
 
353
@@ -1699,6 +1699,20 @@
 
354
 
 
355
        os_thread_create(&srv_master_thread, NULL, thread_ids
 
356
                         + (1 + SRV_MAX_N_IO_THREADS));
 
357
+
 
358
+       if (srv_use_purge_thread) {
 
359
+               ulint i;
 
360
+
 
361
+               os_thread_create(&srv_purge_thread, NULL, thread_ids
 
362
+                                + (5 + SRV_MAX_N_IO_THREADS));
 
363
+
 
364
+               for (i = 0; i < srv_use_purge_thread - 1; i++) {
 
365
+                       n[6 + i + SRV_MAX_N_IO_THREADS] = i; /* using as index for arrays in purge_sys */
 
366
+                       os_thread_create(&srv_purge_worker_thread,
 
367
+                                        n + (6 + i + SRV_MAX_N_IO_THREADS),
 
368
+                                        thread_ids + (6 + i + SRV_MAX_N_IO_THREADS));
 
369
+               }
 
370
+       }
 
371
 #ifdef UNIV_DEBUG
 
372
        /* buf_debug_prints = TRUE; */
 
373
 #endif /* UNIV_DEBUG */
 
374
diff -ruN a/storage/innodb_plugin/trx/trx0purge.c b/storage/innodb_plugin/trx/trx0purge.c
 
375
--- a/storage/innodb_plugin/trx/trx0purge.c     2010-04-06 23:07:14.000000000 +0900
 
376
+++ b/storage/innodb_plugin/trx/trx0purge.c     2010-04-30 14:13:51.000000000 +0900
 
377
@@ -184,8 +184,9 @@
 
378
 @return        own: the query graph */
 
379
 static
 
380
 que_t*
 
381
-trx_purge_graph_build(void)
 
382
+trx_purge_graph_build(
 
383
 /*=======================*/
 
384
+       trx_t*  trx)
 
385
 {
 
386
        mem_heap_t*     heap;
 
387
        que_fork_t*     fork;
 
388
@@ -194,7 +195,7 @@
 
389
 
 
390
        heap = mem_heap_create(512);
 
391
        fork = que_fork_create(NULL, NULL, QUE_FORK_PURGE, heap);
 
392
-       fork->trx = purge_sys->trx;
 
393
+       fork->trx = trx;
 
394
 
 
395
        thr = que_thr_create(fork, heap);
 
396
 
 
397
@@ -243,10 +244,35 @@
 
398
 
 
399
        ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED));
 
400
 
 
401
-       purge_sys->query = trx_purge_graph_build();
 
402
+       purge_sys->query = trx_purge_graph_build(purge_sys->trx);
 
403
 
 
404
        purge_sys->view = read_view_oldest_copy_or_open_new(ut_dulint_zero,
 
405
                                                            purge_sys->heap);
 
406
+
 
407
+       purge_sys->n_worker = 0;
 
408
+       if (srv_use_purge_thread > 1) {
 
409
+               /* Use worker threads */
 
410
+               ulint i;
 
411
+
 
412
+               purge_sys->n_worker = srv_use_purge_thread - 1;
 
413
+
 
414
+               purge_sys->sess_arr = mem_alloc(sizeof(sess_t*) * purge_sys->n_worker);
 
415
+               purge_sys->trx_arr = mem_alloc(sizeof(trx_t*) * purge_sys->n_worker);
 
416
+               purge_sys->query_arr = mem_alloc(sizeof(que_t*) * purge_sys->n_worker);
 
417
+
 
418
+               purge_sys->worker_event = os_event_create(NULL);
 
419
+               os_event_reset(purge_sys->worker_event);
 
420
+
 
421
+               for (i = 0; i < purge_sys->n_worker; i++) {
 
422
+                       purge_sys->sess_arr[i] = sess_open();
 
423
+
 
424
+                       purge_sys->trx_arr[i] = purge_sys->sess_arr[i]->trx;
 
425
+                       purge_sys->trx_arr[i]->is_purge = 1;
 
426
+                       ut_a(trx_start_low(purge_sys->trx_arr[i], ULINT_UNDEFINED));
 
427
+
 
428
+                       purge_sys->query_arr[i] = trx_purge_graph_build(purge_sys->trx_arr[i]);
 
429
+               }
 
430
+       }
 
431
 }
 
432
 
 
433
 /************************************************************************
 
434
@@ -1148,7 +1174,7 @@
 
435
 
 
436
        /* Handle at most 20 undo log pages in one purge batch */
 
437
 
 
438
-       purge_sys->handle_limit = purge_sys->n_pages_handled + 20;
 
439
+       purge_sys->handle_limit = purge_sys->n_pages_handled + 20 * (srv_use_purge_thread + 1);
 
440
 
 
441
        old_pages_handled = purge_sys->n_pages_handled;
 
442
 
 
443
@@ -1167,6 +1193,9 @@
 
444
 
 
445
        mutex_exit(&kernel_mutex);
 
446
 
 
447
+       if (purge_sys->n_worker)
 
448
+               os_event_set(purge_sys->worker_event);
 
449
+
 
450
        /*      srv_que_task_enqueue(thr2); */
 
451
 
 
452
        if (srv_print_thread_releases) {
 
453
@@ -1176,6 +1205,9 @@
 
454
 
 
455
        que_run_threads(thr);
 
456
 
 
457
+       if (purge_sys->n_worker)
 
458
+               os_event_reset(purge_sys->worker_event);
 
459
+
 
460
        if (srv_print_thread_releases) {
 
461
 
 
462
                fprintf(stderr,
 
463
@@ -1186,6 +1218,52 @@
 
464
        return(purge_sys->n_pages_handled - old_pages_handled);
 
465
 }
 
466
 
 
467
+/**********************************************************************
 
468
+This function runs a purge worker batch */
 
469
+UNIV_INTERN
 
470
+void
 
471
+trx_purge_worker(
 
472
+/*=============*/
 
473
+       ulint   worker_id)
 
474
+{
 
475
+       que_thr_t*      thr;
 
476
+
 
477
+       mutex_enter(&kernel_mutex);
 
478
+
 
479
+       thr = que_fork_start_command(purge_sys->query_arr[worker_id]);
 
480
+
 
481
+       ut_ad(thr);
 
482
+
 
483
+       mutex_exit(&kernel_mutex);
 
484
+
 
485
+       que_run_threads(thr);
 
486
+
 
487
+       if (purge_sys->state == TRX_STOP_PURGE) { /* optimistic */
 
488
+               os_event_reset(purge_sys->worker_event);
 
489
+       }
 
490
+}
 
491
+
 
492
+/**********************************************************************
 
493
+This function waits the event for worker batch */
 
494
+UNIV_INTERN
 
495
+void
 
496
+trx_purge_worker_wait(void)
 
497
+/*=======================*/
 
498
+{
 
499
+       os_event_wait(purge_sys->worker_event);
 
500
+}
 
501
+
 
502
+/**********************************************************************
 
503
+This function wakes the waiting worker batch */
 
504
+UNIV_INTERN
 
505
+void
 
506
+trx_purge_worker_wake(void)
 
507
+/*=======================*/
 
508
+{
 
509
+       if (purge_sys->n_worker)
 
510
+               os_event_set(purge_sys->worker_event);
 
511
+}
 
512
+
 
513
 /******************************************************************//**
 
514
 Prints information of the purge system to stderr. */
 
515
 UNIV_INTERN