~percona-dev/percona-server/release-5.1.59-13.0

« back to all changes in this revision

Viewing changes to patches/innodb_purge_thread.patch

  • Committer: Stewart Smith
  • Date: 2011-10-09 00:48:54 UTC
  • mfrom: (321.7.2 5.1.59-porting)
  • Revision ID: stewart@flamingspork.com-20111009004854-btecbnpy3ehis27p
mergeĀ 5.1.59

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# should be done or reviewed by the maintainer!
8
8
--- a/storage/innodb_plugin/handler/ha_innodb.cc
9
9
+++ b/storage/innodb_plugin/handler/ha_innodb.cc
10
 
@@ -11011,6 +11011,11 @@
 
10
@@ -11001,6 +11001,11 @@
11
11
   "Output statistics of recovery process after it.",
12
12
   NULL, NULL, FALSE);
13
13
 
19
19
 static MYSQL_SYSVAR_BOOL(overwrite_relay_log_info, innobase_overwrite_relay_log_info,
20
20
   PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
21
21
   "During InnoDB crash recovery on slave overwrite relay-log.info "
22
 
@@ -11499,6 +11504,7 @@
23
 
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
 
22
@@ -11495,6 +11500,7 @@
 
23
   MYSQL_SYSVAR(random_read_ahead),
24
24
   MYSQL_SYSVAR(read_ahead_threshold),
25
25
   MYSQL_SYSVAR(io_capacity),
26
26
+  MYSQL_SYSVAR(use_purge_thread),
47
47
 extern ibool   srv_auto_extend_last_data_file;
48
48
 extern ulint   srv_last_file_size_max;
49
49
 extern char**  srv_log_group_home_dirs;
50
 
@@ -418,6 +420,8 @@
 
50
@@ -419,6 +421,8 @@
51
51
        SRV_RECOVERY,   /**< threads finishing a recovery */
52
52
        SRV_INSERT,     /**< thread flushing the insert buffer to disk */
53
53
 #endif
56
56
        SRV_MASTER      /**< the master thread, (whose type number must
57
57
                        be biggest) */
58
58
 };
59
 
@@ -491,6 +495,21 @@
 
59
@@ -492,6 +496,21 @@
60
60
 /*==============*/
61
61
        void*   arg);   /*!< in: a dummy parameter required by
62
62
                        os_thread_create */
148
148
 /* if TRUE, then we auto-extend the last data file */
149
149
 UNIV_INTERN ibool      srv_auto_extend_last_data_file  = FALSE;
150
150
 /* if != 0, this tells the max size auto-extending may increase the
151
 
@@ -2636,10 +2638,10 @@
 
151
@@ -2640,10 +2642,10 @@
152
152
        srv_main_thread_process_no = os_proc_get_number();
153
153
        srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
154
154
 
160
160
        srv_n_threads_active[SRV_MASTER]++;
161
161
 
162
162
        mutex_exit(&kernel_mutex);
163
 
@@ -3097,6 +3099,7 @@
 
163
@@ -3101,6 +3103,7 @@
164
164
        /* Flush logs if needed */
165
165
        srv_sync_log_buffer_in_background();
166
166
 
168
168
        /* We run a full purge every 10 seconds, even if the server
169
169
        were active */
170
170
        do {
171
 
@@ -3113,6 +3116,7 @@
 
171
@@ -3117,6 +3120,7 @@
172
172
                srv_sync_log_buffer_in_background();
173
173
 
174
174
        } while (n_pages_purged);
176
176
 
177
177
        srv_main_thread_op_info = "flushing buffer pool pages";
178
178
 
179
 
@@ -3181,6 +3185,7 @@
 
179
@@ -3185,6 +3189,7 @@
180
180
                os_thread_sleep(100000);
181
181
        }
182
182
 
184
184
        srv_main_thread_op_info = "purging";
185
185
 
186
186
        /* Run a full purge */
187
 
@@ -3197,6 +3202,7 @@
 
187
@@ -3201,6 +3206,7 @@
188
188
                srv_sync_log_buffer_in_background();
189
189
 
190
190
        } while (n_pages_purged);
192
192
 
193
193
        srv_main_thread_op_info = "reserving kernel mutex";
194
194
 
195
 
@@ -3349,3 +3355,143 @@
 
195
@@ -3353,3 +3359,143 @@
196
196
 
197
197
        OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
198
198
 }