summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 20:37:52 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 20:37:52 +0300
commit101ddc5e2708e4e32f1aaa7a02fe85f0da95b73a (patch)
tree11747103367332f63928220376b5093b9e2ebdc5 /storage/innobase
parent2b9c53102c7c7428279c5fd02f771d335b5c53dc (diff)
parentddffcad64c9ff3299037eed9df1bc92d51f8d07e (diff)
downloadmariadb-git-101ddc5e2708e4e32f1aaa7a02fe85f0da95b73a.tar.gz
Merge mariadb-10.4.14
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/buf/buf0lru.cc2
-rw-r--r--storage/innobase/fts/fts0fts.cc6
-rw-r--r--storage/innobase/handler/ha_innodb.cc22
-rw-r--r--storage/innobase/handler/handler0alter.cc10
-rw-r--r--storage/innobase/sync/sync0arr.cc3
5 files changed, 21 insertions, 22 deletions
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index c232a719227..c85f9331580 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -861,7 +861,7 @@ buf_LRU_check_size_of_non_data_objects(
+ UT_LIST_GET_LEN(buf_pool->LRU))
< buf_pool->curr_size / 3) {
- if (!buf_lru_switched_on_innodb_mon) {
+ if (!buf_lru_switched_on_innodb_mon && srv_monitor_event) {
/* Over 67 % of the buffer pool is occupied by lock
heaps or the adaptive hash index. This may be a memory
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 199941e71f8..fafdda16429 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -1105,9 +1105,6 @@ fts_cache_clear(
index_cache->doc_stats = NULL;
}
- mem_heap_free(static_cast<mem_heap_t*>(cache->sync_heap->arg));
- cache->sync_heap->arg = NULL;
-
fts_need_sync = false;
cache->total_size = 0;
@@ -1115,6 +1112,9 @@ fts_cache_clear(
mutex_enter((ib_mutex_t*) &cache->deleted_lock);
cache->deleted_doc_ids = NULL;
mutex_exit((ib_mutex_t*) &cache->deleted_lock);
+
+ mem_heap_free(static_cast<mem_heap_t*>(cache->sync_heap->arg));
+ cache->sync_heap->arg = NULL;
}
/*********************************************************************//**
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 67df52db9fc..3e4da9bb8b2 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4305,16 +4305,7 @@ innobase_commit_low(
const bool is_wsrep = trx->is_wsrep();
THD* thd = trx->mysql_thd;
if (is_wsrep) {
-#ifdef WSREP_PROC_INFO
- char info[64];
- info[sizeof(info) - 1] = '\0';
- snprintf(info, sizeof(info) - 1,
- "innobase_commit_low():trx_commit_for_mysql(%lld)",
- (long long) wsrep_thd_trx_seqno(thd));
- tmp = thd_proc_info(thd, info);
-#else
tmp = thd_proc_info(thd, "innobase_commit_low()");
-#endif /* WSREP_PROC_INFO */
}
#endif /* WITH_WSREP */
if (trx_is_started(trx)) {
@@ -18497,11 +18488,14 @@ static
void
innodb_status_output_update(THD*,st_mysql_sys_var*,void*var,const void*save)
{
- *static_cast<my_bool*>(var) = *static_cast<const my_bool*>(save);
- mysql_mutex_unlock(&LOCK_global_system_variables);
- /* Wakeup server monitor thread. */
- os_event_set(srv_monitor_event);
- mysql_mutex_lock(&LOCK_global_system_variables);
+ *static_cast<my_bool*>(var)= *static_cast<const my_bool*>(save);
+ if (srv_monitor_event)
+ {
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ /* Wakeup server monitor thread. */
+ os_event_set(srv_monitor_event);
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ }
}
/** Update the system variable innodb_encryption_threads.
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 3f63cc82f89..d8694da02d7 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -6209,9 +6209,13 @@ prepare_inplace_alter_table_dict(
user_table = ctx->new_table;
- if (ha_alter_info->inplace_supported == HA_ALTER_INPLACE_INSTANT) {
- /* If we promised ALGORITHM=INSTANT capability, we must
- retain the original ROW_FORMAT of the table. */
+ switch (ha_alter_info->inplace_supported) {
+ default: break;
+ case HA_ALTER_INPLACE_INSTANT:
+ case HA_ALTER_INPLACE_NOCOPY_LOCK:
+ case HA_ALTER_INPLACE_NOCOPY_NO_LOCK:
+ /* If we promised ALGORITHM=NOCOPY or ALGORITHM=INSTANT,
+ we must retain the original ROW_FORMAT of the table. */
flags = (user_table->flags & (DICT_TF_MASK_COMPACT
| DICT_TF_MASK_ATOMIC_BLOBS))
| (flags & ~(DICT_TF_MASK_COMPACT
diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc
index 0c7d103d25c..8f8ba52c584 100644
--- a/storage/innobase/sync/sync0arr.cc
+++ b/storage/innobase/sync/sync0arr.cc
@@ -1075,7 +1075,8 @@ sync_array_print_long_waits(
sync_array_exit(arr);
}
- if (noticed) {
+ if (noticed && srv_monitor_event) {
+
fprintf(stderr,
"InnoDB: ###### Starts InnoDB Monitor"
" for 30 secs to print diagnostic info:\n");