mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix CMAKE_BUILD_TYPE=Debug
Remove unused variables and type mismatch that was introduced
in commit b393e2cb0c
Also, fix a typo in the documentation of the parameter, and
update the test.
This commit is contained in:
@@ -642,6 +642,18 @@ NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
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
|
||||
SESSION_VALUE 1
|
||||
DEFAULT_VALUE 1
|
||||
|
@@ -21015,9 +21015,9 @@ char *innobase_debug_sync;
|
||||
static MYSQL_SYSVAR_STR(debug_sync, innobase_debug_sync,
|
||||
PLUGIN_VAR_NOCMDARG,
|
||||
"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 "
|
||||
"the beginning of purging the next node ",
|
||||
"the beginning of purging the next undo record.",
|
||||
NULL,
|
||||
innobase_debug_sync_set, NULL);
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
@@ -386,8 +386,8 @@ struct que_thr_t{
|
||||
row_prebuilt_t* prebuilt; /*!< prebuilt structure processed by
|
||||
the query thread */
|
||||
|
||||
ut_d(srv_slot_t *thread_slot;) /*!< a slot from srv_sys.sys_threads
|
||||
* if any */
|
||||
/** a slot of srv_sys.sys_threads, for DEBUG_SYNC in purge thread */
|
||||
ut_d(srv_slot_t* thread_slot;)
|
||||
};
|
||||
|
||||
#define QUE_THR_MAGIC_N 8476583
|
||||
|
@@ -1082,9 +1082,6 @@ que_run_threads_low(
|
||||
ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS);
|
||||
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
|
||||
query thread) has spent in this function */
|
||||
|
||||
|
@@ -3047,18 +3047,18 @@ srv_was_tablespace_truncated(const fil_space_t* space)
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
static uint get_first_slot(srv_thread_type type)
|
||||
static ulint get_first_slot(srv_thread_type type)
|
||||
{
|
||||
switch (type) {
|
||||
case SRV_MASTER:
|
||||
return SRV_MASTER_SLOT;
|
||||
case SRV_PURGE:
|
||||
return SRV_PURGE_SLOT;
|
||||
case SRV_WORKER:
|
||||
/* Find an empty slot, skip the master and purge slots. */
|
||||
return SRV_WORKER_SLOTS_START;
|
||||
default:
|
||||
ut_error;
|
||||
case SRV_MASTER:
|
||||
return SRV_MASTER_SLOT;
|
||||
case SRV_PURGE:
|
||||
return SRV_PURGE_SLOT;
|
||||
case SRV_WORKER:
|
||||
/* Find an empty slot, skip the master and purge slots. */
|
||||
return SRV_WORKER_SLOTS_START;
|
||||
default:
|
||||
ut_error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3066,14 +3066,12 @@ void srv_for_each_thread(srv_thread_type type,
|
||||
srv_slot_callback_t callback,
|
||||
const void *arg)
|
||||
{
|
||||
int slot_idx= get_first_slot(type);
|
||||
while(slot_idx < srv_sys.n_sys_threads
|
||||
&& srv_sys.sys_threads[slot_idx].in_use
|
||||
&& srv_sys.sys_threads[slot_idx].type == type)
|
||||
{
|
||||
srv_slot_t *slot= &srv_sys.sys_threads[slot_idx];
|
||||
callback(slot, arg);
|
||||
slot_idx++;
|
||||
for (ulint slot_idx= get_first_slot(type);
|
||||
slot_idx < srv_sys.n_sys_threads
|
||||
&& srv_sys.sys_threads[slot_idx].in_use
|
||||
&& srv_sys.sys_threads[slot_idx].type == type;
|
||||
slot_idx++) {
|
||||
callback(&srv_sys.sys_threads[slot_idx], arg);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user