Commit 1fd1ef25 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix CMAKE_BUILD_TYPE=Debug

Remove unused variables and type mismatch that was introduced
in commit b393e2cb

Also, fix a typo in the documentation of the parameter, and
update the test.
parent 350e46a8
...@@ -642,6 +642,18 @@ NUMERIC_BLOCK_SIZE NULL ...@@ -642,6 +642,18 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON ENUM_VALUE_LIST OFF,ON
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEBUG_SYNC
SESSION_VALUE NULL
DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT debug_sync for innodb purge threads. Use it to set up sync points for all purge threads at once. The commands will be applied sequentially at the beginning of purging the next undo record.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID
SESSION_VALUE 1 SESSION_VALUE 1
DEFAULT_VALUE 1 DEFAULT_VALUE 1
......
...@@ -21015,9 +21015,9 @@ char *innobase_debug_sync; ...@@ -21015,9 +21015,9 @@ char *innobase_debug_sync;
static MYSQL_SYSVAR_STR(debug_sync, innobase_debug_sync, static MYSQL_SYSVAR_STR(debug_sync, innobase_debug_sync,
PLUGIN_VAR_NOCMDARG, PLUGIN_VAR_NOCMDARG,
"debug_sync for innodb purge threads. " "debug_sync for innodb purge threads. "
"Use it t oset up sync points for all purge threads " "Use it to set up sync points for all purge threads "
"at once. The commands will be applied sequentially at " "at once. The commands will be applied sequentially at "
"the beginning of purging the next node ", "the beginning of purging the next undo record.",
NULL, NULL,
innobase_debug_sync_set, NULL); innobase_debug_sync_set, NULL);
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
......
...@@ -386,8 +386,8 @@ struct que_thr_t{ ...@@ -386,8 +386,8 @@ struct que_thr_t{
row_prebuilt_t* prebuilt; /*!< prebuilt structure processed by row_prebuilt_t* prebuilt; /*!< prebuilt structure processed by
the query thread */ the query thread */
ut_d(srv_slot_t *thread_slot;) /*!< a slot from srv_sys.sys_threads /** a slot of srv_sys.sys_threads, for DEBUG_SYNC in purge thread */
* if any */ ut_d(srv_slot_t* thread_slot;)
}; };
#define QUE_THR_MAGIC_N 8476583 #define QUE_THR_MAGIC_N 8476583
......
...@@ -1082,9 +1082,6 @@ que_run_threads_low( ...@@ -1082,9 +1082,6 @@ que_run_threads_low(
ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS);
ut_ad(!trx_mutex_own(thr_get_trx(thr))); ut_ad(!trx_mutex_own(thr_get_trx(thr)));
/* slot can be received from purge thread for debug_sync setup */
ut_d(srv_slot_t *slot = thr->thread_slot);
/* cumul_resource counts how much resources the OS thread (NOT the /* cumul_resource counts how much resources the OS thread (NOT the
query thread) has spent in this function */ query thread) has spent in this function */
......
...@@ -3047,7 +3047,7 @@ srv_was_tablespace_truncated(const fil_space_t* space) ...@@ -3047,7 +3047,7 @@ srv_was_tablespace_truncated(const fil_space_t* space)
} }
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
static uint get_first_slot(srv_thread_type type) static ulint get_first_slot(srv_thread_type type)
{ {
switch (type) { switch (type) {
case SRV_MASTER: case SRV_MASTER:
...@@ -3066,14 +3066,12 @@ void srv_for_each_thread(srv_thread_type type, ...@@ -3066,14 +3066,12 @@ void srv_for_each_thread(srv_thread_type type,
srv_slot_callback_t callback, srv_slot_callback_t callback,
const void *arg) const void *arg)
{ {
int slot_idx= get_first_slot(type); for (ulint slot_idx= get_first_slot(type);
while(slot_idx < srv_sys.n_sys_threads slot_idx < srv_sys.n_sys_threads
&& srv_sys.sys_threads[slot_idx].in_use && srv_sys.sys_threads[slot_idx].in_use
&& srv_sys.sys_threads[slot_idx].type == type) && srv_sys.sys_threads[slot_idx].type == type;
{ slot_idx++) {
srv_slot_t *slot= &srv_sys.sys_threads[slot_idx]; callback(&srv_sys.sys_threads[slot_idx], arg);
callback(slot, arg);
slot_idx++;
} }
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment