mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
2018ce35b3
mysql.patch: Patch to change or add variables to MySQL innodb.patch: Patch to make the master thread poll requests to resize the buffer pool. Replace srv_pool_size and innobase_buffer_pool_size with srv_buf_pool_size, srv_buf_pool_old_size, and srv_buf_pool_curr_size. Add buf_chunk_t, a collection of buf_block_t.
52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
Index: srv/srv0srv.c
|
|
===================================================================
|
|
--- srv/srv0srv.c (revision 1010)
|
|
+++ srv/srv0srv.c (working copy)
|
|
@@ -2183,6 +2182,12 @@ loop:
|
|
/* ---- When there is database activity by users, we cycle in this
|
|
loop */
|
|
|
|
+ if (UNIV_UNLIKELY(srv_buf_pool_size != srv_buf_pool_old_size)) {
|
|
+ srv_main_thread_op_info = "resizing buffer pool";
|
|
+
|
|
+ buf_pool_resize();
|
|
+ }
|
|
+
|
|
srv_main_thread_op_info = "reserving kernel mutex";
|
|
|
|
n_ios_very_old = log_sys->n_log_ios + buf_pool->n_pages_read
|
|
@@ -2543,6 +2548,12 @@ flush_loop:
|
|
master thread to wait for more server activity */
|
|
|
|
suspend_thread:
|
|
+ if (UNIV_UNLIKELY(srv_buf_pool_size != srv_buf_pool_old_size)) {
|
|
+ srv_main_thread_op_info = "resizing buffer pool";
|
|
+
|
|
+ buf_pool_resize();
|
|
+ }
|
|
+
|
|
srv_main_thread_op_info = "suspending";
|
|
|
|
mutex_enter(&kernel_mutex);
|
|
@@ -2553,7 +2564,9 @@ suspend_thread:
|
|
goto loop;
|
|
}
|
|
|
|
+#if 0
|
|
event = srv_suspend_thread();
|
|
+#endif
|
|
|
|
mutex_exit(&kernel_mutex);
|
|
|
|
@@ -2563,7 +2576,11 @@ suspend_thread:
|
|
manual also mentions this string in several places. */
|
|
srv_main_thread_op_info = "waiting for server activity";
|
|
|
|
+#if 0
|
|
os_event_wait(event);
|
|
+#else
|
|
+ os_thread_sleep(1000000);
|
|
+#endif
|
|
|
|
if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) {
|
|
/* This is only extra safety, the thread should exit
|