summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/ha_innodb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/ha_innodb.cc')
-rw-r--r--storage/innobase/handler/ha_innodb.cc48
1 files changed, 41 insertions, 7 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 4ae7c62a3e1..6a3cac809a8 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -601,6 +601,7 @@ mysql_pfs_key_t fil_space_latch_key;
mysql_pfs_key_t trx_i_s_cache_lock_key;
mysql_pfs_key_t trx_purge_latch_key;
mysql_pfs_key_t lock_latch_key;
+mysql_pfs_key_t trx_rseg_latch_key;
/* all_innodb_rwlocks array contains rwlocks that are
performance schema instrumented if "UNIV_PFS_RWLOCK"
@@ -615,6 +616,7 @@ static PSI_rwlock_info all_innodb_rwlocks[] =
{ &trx_i_s_cache_lock_key, "trx_i_s_cache_lock", 0 },
{ &trx_purge_latch_key, "trx_purge_latch", 0 },
{ &lock_latch_key, "lock_latch", 0 },
+ { &trx_rseg_latch_key, "trx_rseg_latch", 0 },
{ &index_tree_rw_lock_key, "index_tree_rw_lock", PSI_RWLOCK_FLAG_SX }
};
# endif /* UNIV_PFS_RWLOCK */
@@ -710,6 +712,18 @@ innodb_stopword_table_validate(
for update function */
struct st_mysql_value* value); /*!< in: incoming string */
+static
+void innodb_ft_cache_size_update(THD*, st_mysql_sys_var*, void*, const void* save)
+{
+ fts_max_cache_size= *static_cast<const size_t*>(save);
+}
+
+static
+void innodb_ft_total_cache_size_update(THD*, st_mysql_sys_var*, void*, const void* save)
+{
+ fts_max_total_cache_size= *static_cast<const size_t*>(save);
+}
+
static bool is_mysql_datadir_path(const char *path);
/** Validate passed-in "value" is a valid directory name.
@@ -2838,7 +2852,7 @@ innobase_trx_init(
while holding lock_sys.latch, by lock_rec_enqueue_waiting(),
will not end up acquiring LOCK_global_system_variables in
intern_sys_var_ptr(). */
- THDVAR(thd, lock_wait_timeout);
+ (void) THDVAR(thd, lock_wait_timeout);
trx->check_foreigns = !thd_test_options(
thd, OPTION_NO_FOREIGN_KEY_CHECKS);
@@ -19252,15 +19266,35 @@ static MYSQL_SYSVAR_STR(ft_aux_table, innodb_ft_aux_table,
"FTS internal auxiliary table to be checked",
innodb_ft_aux_table_validate, NULL, NULL);
-static MYSQL_SYSVAR_ULONG(ft_cache_size, fts_max_cache_size,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+#if UNIV_WORD_SIZE == 4
+
+static MYSQL_SYSVAR_SIZE_T(ft_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_cache_size),
+ PLUGIN_VAR_RQCMDARG,
"InnoDB Fulltext search cache size in bytes",
- NULL, NULL, 8000000, 1600000, 80000000, 0);
+ NULL, innodb_ft_cache_size_update, 8000000, 1600000, 1U << 29, 0);
-static MYSQL_SYSVAR_ULONG(ft_total_cache_size, fts_max_total_cache_size,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_total_cache_size),
+ PLUGIN_VAR_RQCMDARG,
"Total memory allocated for InnoDB Fulltext Search cache",
- NULL, NULL, 640000000, 32000000, 1600000000, 0);
+ NULL, innodb_ft_total_cache_size_update, 640000000, 32000000, 1600000000, 0);
+
+#else
+
+static MYSQL_SYSVAR_SIZE_T(ft_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_cache_size),
+ PLUGIN_VAR_RQCMDARG,
+ "InnoDB Fulltext search cache size in bytes",
+ NULL, innodb_ft_cache_size_update, 8000000, 1600000, 1ULL << 40, 0);
+
+static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_total_cache_size),
+ PLUGIN_VAR_RQCMDARG,
+ "Total memory allocated for InnoDB Fulltext Search cache",
+ NULL, innodb_ft_total_cache_size_update, 640000000, 32000000, 1ULL << 40, 0);
+
+#endif
static MYSQL_SYSVAR_SIZE_T(ft_result_cache_limit, fts_result_cache_limit,
PLUGIN_VAR_RQCMDARG,