Commit 633946fb authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Merge branch '10.1' into 10.2

parents 54d0a55a 0573744a
......@@ -204,9 +204,9 @@ log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value The oldest modified block LSN in the buffer pool
log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Maximum LSN difference; when exceeded, start asynchronous preflush
log_max_modified_age_sync recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Maximum LSN difference; when exceeded, start synchronous preflush
log_pending_log_flushes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Pending log flushes
log_pending_checkpoint_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Pending checkpoints
log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of log I/Os
log_pending_log_flushes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Pending log flushes
log_pending_checkpoint_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Pending checkpoints
log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Number of log I/Os
log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log waits due to small log buffer (innodb_log_waits)
log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log write requests (innodb_log_write_requests)
log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of log writes (innodb_log_writes)
......
......@@ -3779,10 +3779,10 @@ lock_table_names(THD *thd, const DDL_options_st &options,
mdl_requests.push_front(&global_request);
if (create_table)
#ifdef WITH_WSREP
if (thd->lex->sql_command != SQLCOM_CREATE_TABLE &&
thd->wsrep_exec_mode != REPL_RECV)
#endif
#ifdef WITH_WSREP
if (!(thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
thd->wsrep_exec_mode == REPL_RECV))
#endif
lock_wait_timeout= 0; // Don't wait for timeout
}
......@@ -3793,6 +3793,7 @@ lock_table_names(THD *thd, const DDL_options_st &options,
bool res= thd->mdl_context.acquire_locks(&mdl_requests, lock_wait_timeout);
if (create_table)
thd->pop_internal_handler();
if (!res)
DBUG_RETURN(FALSE); // Got locks
......
......@@ -885,8 +885,6 @@ log_group_file_header_flush(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
srv_stats.os_log_pending_writes.inc();
const ulint page_no
......@@ -1006,8 +1004,6 @@ log_group_write_buf(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
srv_stats.os_log_pending_writes.inc();
ut_a(next_offset / UNIV_PAGE_SIZE <= ULINT_MAX);
......@@ -1053,7 +1049,6 @@ log_write_flush_to_disk_low()
fil_flush(SRV_LOG_SPACE_FIRST_ID);
}
MONITOR_DEC(MONITOR_PENDING_LOG_FLUSH);
log_mutex_enter();
if (do_flush) {
......@@ -1197,7 +1192,6 @@ log_write_up_to(
if (flush_to_disk) {
log_sys->n_pending_flushes++;
log_sys->current_flush_lsn = log_sys->lsn;
MONITOR_INC(MONITOR_PENDING_LOG_FLUSH);
os_event_reset(log_sys->flush_event);
if (log_sys->buf_free == log_sys->buf_next_to_write) {
......
......@@ -922,15 +922,18 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_DEFAULT_START, MONITOR_OVLD_MAX_AGE_SYNC},
{"log_pending_log_flushes", "recovery", "Pending log flushes",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_PENDING_LOG_FLUSH},
{"log_pending_checkpoint_writes", "recovery", "Pending checkpoints",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_PENDING_CHECKPOINT_WRITE},
{"log_num_log_io", "recovery", "Number of log I/Os",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_LOG_IO},
{"log_waits", "recovery",
......@@ -2007,6 +2010,25 @@ srv_mon_process_existing_counter(
value = (mon_type_t) log_sys->lsn;
break;
case MONITOR_PENDING_LOG_FLUSH:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(log_sys->n_pending_flushes);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_PENDING_CHECKPOINT_WRITE:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(
log_sys->n_pending_checkpoint_writes);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_LOG_IO:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(log_sys->n_log_ios);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_OVLD_BUF_OLDEST_LSN:
value = (mon_type_t) buf_pool_get_oldest_modification();
break;
......
......@@ -1305,7 +1305,6 @@ log_io_complete(
group->n_pending_writes--;
log_sys->n_pending_writes--;
MONITOR_DEC(MONITOR_PENDING_LOG_WRITE);
unlock = log_group_check_flush_completion(group);
unlock = unlock | log_sys_check_flush_completion();
......@@ -1357,8 +1356,6 @@ log_group_file_header_flush(
if (log_do_write) {
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
srv_stats.os_log_pending_writes.inc();
fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->space_id, 0,
......@@ -1483,8 +1480,6 @@ log_group_write_buf(
if (log_do_write) {
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
srv_stats.os_log_pending_writes.inc();
ut_a(next_offset / UNIV_PAGE_SIZE <= ULINT_MAX);
......@@ -1632,7 +1627,6 @@ log_write_up_to(
}
#endif /* UNIV_DEBUG */
log_sys->n_pending_writes++;
MONITOR_INC(MONITOR_PENDING_LOG_WRITE);
group = UT_LIST_GET_FIRST(log_sys->log_groups);
group->n_pending_writes++; /*!< We assume here that we have only
......@@ -1724,7 +1718,6 @@ log_write_up_to(
group->n_pending_writes--;
log_sys->n_pending_writes--;
MONITOR_DEC(MONITOR_PENDING_LOG_WRITE);
unlock = log_group_check_flush_completion(group);
unlock = unlock | log_sys_check_flush_completion();
......@@ -1939,7 +1932,6 @@ log_io_complete_checkpoint(void)
ut_ad(log_sys->n_pending_checkpoint_writes > 0);
log_sys->n_pending_checkpoint_writes--;
MONITOR_DEC(MONITOR_PENDING_CHECKPOINT_WRITE);
if (log_sys->n_pending_checkpoint_writes == 0) {
log_complete_checkpoint();
......@@ -2086,12 +2078,9 @@ log_group_checkpoint(
}
log_sys->n_pending_checkpoint_writes++;
MONITOR_INC(MONITOR_PENDING_CHECKPOINT_WRITE);
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
/* We send as the last parameter the group machine address
added with 1, as we want to distinguish between a normal log
file write and a checkpoint field write */
......@@ -2178,8 +2167,6 @@ log_group_read_checkpoint_info(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
fil_io(OS_FILE_READ | OS_FILE_LOG, true, group->space_id, 0,
field / UNIV_PAGE_SIZE, field % UNIV_PAGE_SIZE,
OS_FILE_LOG_BLOCK_SIZE, log_sys->checkpoint_buf, NULL, 0);
......@@ -2564,8 +2551,6 @@ log_group_read_log_seg(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
ut_a(source_offset / UNIV_PAGE_SIZE <= ULINT_MAX);
if (release_mutex) {
......@@ -2727,8 +2712,6 @@ log_group_archive_file_header_write(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->archive_space_id,
0,
dest_offset / UNIV_PAGE_SIZE,
......@@ -2763,8 +2746,6 @@ log_group_archive_completed_header_write(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
fil_io(OS_FILE_WRITE | OS_FILE_LOG, true, group->archive_space_id,
0,
dest_offset / UNIV_PAGE_SIZE,
......@@ -2895,8 +2876,6 @@ log_group_archive(
log_sys->n_log_ios++;
MONITOR_INC(MONITOR_LOG_IO);
//TODO (jonaso): This must be dead code??
log_encrypt_before_write(log_sys->next_checkpoint_no,
buf, start_lsn, len);
......
......@@ -873,15 +873,18 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_DEFAULT_START, MONITOR_OVLD_MAX_AGE_SYNC},
{"log_pending_log_writes", "recovery", "Pending log writes",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_PENDING_LOG_WRITE},
{"log_pending_checkpoint_writes", "recovery", "Pending checkpoints",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_PENDING_CHECKPOINT_WRITE},
{"log_num_log_io", "recovery", "Number of log I/Os",
MONITOR_NONE,
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_LOG_IO},
{"log_waits", "recovery",
......@@ -1970,6 +1973,25 @@ srv_mon_process_existing_counter(
value = (mon_type_t) log_sys->lsn;
break;
case MONITOR_PENDING_LOG_WRITE:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(log_sys->n_pending_writes);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_PENDING_CHECKPOINT_WRITE:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(
log_sys->n_pending_checkpoint_writes);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_LOG_IO:
mutex_enter(&log_sys->mutex);
value = static_cast<mon_type_t>(log_sys->n_log_ios);
mutex_exit(&log_sys->mutex);
break;
case MONITOR_OVLD_BUF_OLDEST_LSN:
value = (mon_type_t) buf_pool_get_oldest_modification();
break;
......
......@@ -53,6 +53,9 @@ if [ $1 = 1 ] ; then
chown -R %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
# Create data directory
mkdir -p $datadir
# Initiate databases
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
fi
......
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