[to #55829503]System variable innodb_sync_debug add placeholder in master.
This commit is contained in:
parent
c1e1c63d9f
commit
3347f350e8
@ -429,6 +429,7 @@ enum ObSysVarClassType
|
||||
SYS_VAR_SKIP_SLAVE_START = 10321,
|
||||
SYS_VAR_SLAVE_LOAD_TMPDIR = 10322,
|
||||
SYS_VAR_SLAVE_SKIP_ERRORS = 10323,
|
||||
SYS_VAR_INNODB_SYNC_DEBUG = 10324,
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -424,6 +424,7 @@ namespace share
|
||||
static const char* const OB_SV_SKIP_SLAVE_START = "skip_slave_start";
|
||||
static const char* const OB_SV_SLAVE_LOAD_TMPDIR = "slave_load_tmpdir";
|
||||
static const char* const OB_SV_SLAVE_SKIP_ERRORS = "slave_skip_errors";
|
||||
static const char* const OB_SV_INNODB_SYNC_DEBUG = "innodb_sync_debug";
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -596,6 +596,7 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[] = {
|
||||
"innodb_stats_persistent",
|
||||
"innodb_strict_mode",
|
||||
"innodb_support_xa",
|
||||
"innodb_sync_debug",
|
||||
"innodb_trx_purge_view_update_only_debug",
|
||||
"innodb_trx_rseg_n_slots_debug",
|
||||
"innodb_version",
|
||||
@ -1007,6 +1008,7 @@ const ObSysVarClassType ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[] = {
|
||||
SYS_VAR_INNODB_STATS_PERSISTENT,
|
||||
SYS_VAR_INNODB_STRICT_MODE,
|
||||
SYS_VAR_INNODB_SUPPORT_XA,
|
||||
SYS_VAR_INNODB_SYNC_DEBUG,
|
||||
SYS_VAR_INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG,
|
||||
SYS_VAR_INNODB_TRX_RSEG_N_SLOTS_DEBUG,
|
||||
SYS_VAR_INNODB_VERSION,
|
||||
@ -1632,7 +1634,8 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_ID[] = {
|
||||
"innodb_force_recovery",
|
||||
"skip_slave_start",
|
||||
"slave_load_tmpdir",
|
||||
"slave_skip_errors"
|
||||
"slave_skip_errors",
|
||||
"innodb_sync_debug"
|
||||
};
|
||||
|
||||
bool ObSysVarFactory::sys_var_name_case_cmp(const char *name1, const ObString &name2)
|
||||
@ -2209,6 +2212,7 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
+ sizeof(ObSysVarSkipSlaveStart)
|
||||
+ sizeof(ObSysVarSlaveLoadTmpdir)
|
||||
+ sizeof(ObSysVarSlaveSkipErrors)
|
||||
+ sizeof(ObSysVarInnodbSyncDebug)
|
||||
;
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(total_mem_size))) {
|
||||
@ -5889,6 +5893,15 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarSlaveSkipErrors));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarInnodbSyncDebug())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarInnodbSyncDebug", K(ret));
|
||||
} else {
|
||||
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR_INNODB_SYNC_DEBUG))] = sys_var_ptr;
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarInnodbSyncDebug));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return ret;
|
||||
@ -10387,6 +10400,17 @@ int ObSysVarFactory::create_sys_var(ObIAllocator &allocator_, ObSysVarClassType
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_INNODB_SYNC_DEBUG: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarInnodbSyncDebug)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarInnodbSyncDebug)));
|
||||
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarInnodbSyncDebug())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarInnodbSyncDebug", K(ret));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
@ -3009,6 +3009,13 @@ public:
|
||||
inline virtual ObSysVarClassType get_type() const { return SYS_VAR_SLAVE_SKIP_ERRORS; }
|
||||
inline virtual const common::ObObj &get_global_default_value() const { return ObSysVariables::get_default_value(407); }
|
||||
};
|
||||
class ObSysVarInnodbSyncDebug : public ObBoolSysVar
|
||||
{
|
||||
public:
|
||||
ObSysVarInnodbSyncDebug() : ObBoolSysVar(NULL, NULL, NULL, NULL, NULL) {}
|
||||
inline virtual ObSysVarClassType get_type() const { return SYS_VAR_INNODB_SYNC_DEBUG; }
|
||||
inline virtual const common::ObObj &get_global_default_value() const { return ObSysVariables::get_default_value(408); }
|
||||
};
|
||||
|
||||
|
||||
class ObSysVarFactory
|
||||
@ -3029,7 +3036,7 @@ public:
|
||||
static const common::ObString get_sys_var_name_by_id(ObSysVarClassType sys_var_id);
|
||||
|
||||
const static int64_t MYSQL_SYS_VARS_COUNT = 99;
|
||||
const static int64_t OB_SYS_VARS_COUNT = 309;
|
||||
const static int64_t OB_SYS_VARS_COUNT = 310;
|
||||
const static int64_t ALL_SYS_VARS_COUNT = MYSQL_SYS_VARS_COUNT + OB_SYS_VARS_COUNT;
|
||||
const static int64_t INVALID_MAX_READ_STALE_TIME = -1;
|
||||
|
||||
|
@ -5753,13 +5753,26 @@ static struct VarsInit{
|
||||
ObSysVars[407].alias_ = "OB_SV_SLAVE_SKIP_ERRORS" ;
|
||||
}();
|
||||
|
||||
[&] (){
|
||||
ObSysVars[408].default_value_ = "0" ;
|
||||
ObSysVars[408].info_ = "Enables sync debug checking for the InnoDB storage engine" ;
|
||||
ObSysVars[408].name_ = "innodb_sync_debug" ;
|
||||
ObSysVars[408].data_type_ = ObIntType ;
|
||||
ObSysVars[408].flags_ = ObSysVarFlag::GLOBAL_SCOPE | ObSysVarFlag::MYSQL_ONLY | ObSysVarFlag::READONLY ;
|
||||
ObSysVars[408].id_ = SYS_VAR_INNODB_SYNC_DEBUG ;
|
||||
cur_max_var_id = MAX(cur_max_var_id, static_cast<int64_t>(SYS_VAR_INNODB_SYNC_DEBUG)) ;
|
||||
ObSysVarsIdToArrayIdx[SYS_VAR_INNODB_SYNC_DEBUG] = 408 ;
|
||||
ObSysVars[408].base_value_ = "0" ;
|
||||
ObSysVars[408].alias_ = "OB_SV_INNODB_SYNC_DEBUG" ;
|
||||
}();
|
||||
|
||||
if (cur_max_var_id >= ObSysVarFactory::OB_MAX_SYS_VAR_ID) {
|
||||
HasInvalidSysVar = true;
|
||||
}
|
||||
}
|
||||
}vars_init;
|
||||
|
||||
static int64_t var_amount = 408;
|
||||
static int64_t var_amount = 409;
|
||||
|
||||
int64_t ObSysVariables::get_all_sys_var_count(){ return ObSysVarFactory::ALL_SYS_VARS_COUNT;}
|
||||
ObSysVarClassType ObSysVariables::get_sys_var_id(int64_t i){ return ObSysVars[i].id_;}
|
||||
|
@ -5965,5 +5965,18 @@
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": "https://dev.mysql.com/doc/refman/5.7/en/replication-options-replica.html#sysvar_slave_skip_errors"
|
||||
},
|
||||
"innodb_sync_debug": {
|
||||
"id": 10324,
|
||||
"name": "innodb_sync_debug",
|
||||
"default_value": "0",
|
||||
"base_value": "0",
|
||||
"data_type": "bool",
|
||||
"info": "Enables sync debug checking for the InnoDB storage engine",
|
||||
"flags": "GLOBAL | MYSQL_ONLY | READONLY",
|
||||
"publish_version": "424",
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": ""
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user