Skip to content
Permalink
Browse files

5.6.36

  • Loading branch information...
cvicentiu committed May 15, 2017
1 parent 6ac84d9 commit 0af9818240a0745aca3fd94891664fe008de24fe
@@ -175,7 +175,7 @@ btr_search_sys_create(
btr_search_sys = (btr_search_sys_t*)
mem_alloc(sizeof(btr_search_sys_t));

btr_search_sys->hash_index = ha_create(hash_size, 0,
btr_search_sys->hash_index = ib_create(hash_size, 0,
MEM_HEAP_FOR_BTR_SEARCH, 0);
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
btr_search_sys->hash_index->adaptive = TRUE;
@@ -1366,7 +1366,7 @@ buf_pool_init_instance(
ut_a(srv_n_page_hash_locks != 0);
ut_a(srv_n_page_hash_locks <= MAX_PAGE_HASH_LOCKS);

buf_pool->page_hash = ha_create(2 * buf_pool->curr_size,
buf_pool->page_hash = ib_create(2 * buf_pool->curr_size,
srv_n_page_hash_locks,
MEM_HEAP_FOR_PAGE_HASH,
SYNC_BUF_PAGE_HASH);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -355,7 +355,7 @@ recovery, this function loads the pages from double write buffer into memory. */
void
buf_dblwr_init_or_load_pages(
/*=========================*/
os_file_t file,
pfs_os_file_t file,
char* path,
bool load_corrupt_pages)
{
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -597,6 +597,7 @@ DECLARE_THREAD(buf_dump_thread)(
void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
my_thread_init();
ut_ad(!srv_read_only_mode);

srv_buf_dump_thread_active = TRUE;
@@ -632,6 +633,7 @@ DECLARE_THREAD(buf_dump_thread)(

srv_buf_dump_thread_active = FALSE;

my_thread_end();
/* We count the number of threads in os_thread_exit(). A created
thread should always use that to exit and not use return() to exit. */
os_thread_exit(NULL);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -2388,6 +2388,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
/*!< in: a dummy parameter required by
os_thread_create */
{
my_thread_init();
ulint next_loop_time = ut_time_ms() + 1000;
ulint n_flushed = 0;
ulint last_activity = srv_get_activity_count();
@@ -2506,6 +2507,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
thread_exit:
buf_page_cleaner_is_active = FALSE;

my_thread_end();
/* We count the number of threads in os_thread_exit(). A created
thread should always use that to exit and not use return() to exit. */
os_thread_exit(NULL);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -454,7 +454,10 @@ dict_boot(void)

dberr_t err = DB_SUCCESS;

if (srv_read_only_mode && !ibuf_is_empty()) {
/** If innodb_force_recovery is set to 6 then allow
the server to start even though ibuf is not empty. */
if (srv_force_recovery != SRV_FORCE_NO_LOG_REDO
&& srv_read_only_mode && !ibuf_is_empty()) {

ib_logf(IB_LOG_LEVEL_ERROR,
"Change buffer must be empty when --innodb-read-only "
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -690,6 +690,9 @@ dict_stats_copy(
&& (src_idx = dict_table_get_next_index(src_idx)))) {

if (dict_stats_should_ignore_index(dst_idx)) {
if (!(dst_idx->type & DICT_FTS)) {
dict_stats_empty_index(dst_idx);
}
continue;
}

@@ -1096,10 +1099,10 @@ dict_stats_analyze_index_level(
leaf-level delete marks because delete marks on
non-leaf level do not make sense. */

if (level == 0 && srv_stats_include_delete_marked? 0:
if (level == 0 && (srv_stats_include_delete_marked ? 0:
rec_get_deleted_flag(
rec,
page_is_comp(btr_pcur_get_page(&pcur)))) {
page_is_comp(btr_pcur_get_page(&pcur))))) {

if (rec_is_last_on_page
&& !prev_rec_is_copied
@@ -3229,12 +3232,6 @@ dict_stats_update(

dict_table_stats_lock(table, RW_X_LATCH);

/* Initialize all stats to dummy values before
copying because dict_stats_table_clone_create() does
skip corrupted indexes so our dummy object 't' may
have less indexes than the real object 'table'. */
dict_stats_empty_table(table);

dict_stats_copy(table, t);

dict_stats_assert_initialized(table);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -334,6 +334,7 @@ DECLARE_THREAD(dict_stats_thread)(
void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
my_thread_init();
ut_a(!srv_read_only_mode);

srv_dict_stats_thread_active = TRUE;
@@ -359,6 +360,7 @@ DECLARE_THREAD(dict_stats_thread)(

srv_dict_stats_thread_active = FALSE;

my_thread_end();
/* We count the number of threads in os_thread_exit(). A created
thread should always use that to exit instead of return(). */
os_thread_exit(NULL);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -146,7 +146,7 @@ struct fil_node_t {
belongs */
char* name; /*!< path to the file */
ibool open; /*!< TRUE if file open */
os_file_t handle; /*!< OS handle to the file, if file open */
pfs_os_file_t handle; /*!< OS handle to the file, if file open */
os_event_t sync_event;/*!< Condition event to group and
serialize calls to fsync */
ibool is_raw_disk;/*!< TRUE if the 'file' is actually a raw
@@ -316,7 +316,8 @@ initialized. */
static fil_system_t* fil_system = NULL;

/** Determine if (i) is a user tablespace id or not. */
# define fil_is_user_tablespace_id(i) ((i) > srv_undo_tablespaces_open)
# define fil_is_user_tablespace_id(i) (i != 0 \
&& !srv_is_undo_tablespace(i))

/** Determine if user has explicitly disabled fsync(). */
#ifndef __WIN__
@@ -2025,7 +2026,7 @@ UNIV_INTERN
const char*
fil_read_first_page(
/*================*/
os_file_t data_file, /*!< in: open data file */
pfs_os_file_t data_file, /*!< in: open data file */
ibool one_read_already, /*!< in: TRUE if min and max
parameters below already
contain sensible data */
@@ -3360,7 +3361,7 @@ fil_open_linked_file(
/*===============*/
const char* tablename, /*!< in: database/tablename */
char** remote_filepath,/*!< out: remote filepath */
os_file_t* remote_file) /*!< out: remote file handle */
pfs_os_file_t* remote_file) /*!< out: remote file handle */

{
ibool success;
@@ -3420,7 +3421,8 @@ fil_create_new_single_table_tablespace(
tablespace file in pages,
must be >= FIL_IBD_FILE_INITIAL_SIZE */
{
os_file_t file;
pfs_os_file_t file;

ibool ret;
dberr_t err;
byte* buf2;
@@ -5862,7 +5864,7 @@ fil_flush(
{
fil_space_t* space;
fil_node_t* node;
os_file_t file;
pfs_os_file_t file;


mutex_enter(&fil_system->mutex);
@@ -6224,7 +6226,7 @@ fil_buf_block_init(
}

struct fil_iterator_t {
os_file_t file; /*!< File handle */
pfs_os_file_t file; /*!< File handle */
const char* filepath; /*!< File path name */
os_offset_t start; /*!< From where to start */
os_offset_t end; /*!< Where to stop */
@@ -6359,7 +6361,7 @@ fil_tablespace_iterate(
PageCallback& callback)
{
dberr_t err;
os_file_t file;
pfs_os_file_t file;
char* filepath;

ut_a(n_io_buffers > 0);
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
@@ -5052,6 +5052,8 @@ ha_innobase::open(
prebuilt->default_rec = table->s->default_values;
ut_ad(prebuilt->default_rec);

prebuilt->mysql_handler = this;

/* Looks like MySQL-3.23 sometimes has primary key number != 0 */
primary_key = table->s->primary_key;
key_used_on_scan = primary_key;
@@ -10168,7 +10170,8 @@ ha_innobase::delete_table(
extension, in contrast to ::create */
normalize_table_name(norm_name, name);

if (srv_read_only_mode) {
if (srv_read_only_mode
|| srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN) {
DBUG_RETURN(HA_ERR_TABLE_READONLY);
} else if (row_is_magic_monitor_table(norm_name)
&& check_global_access(thd, PROCESS_ACL)) {
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -55,7 +55,7 @@ recovery, this function loads the pages from double write buffer into memory. */
void
buf_dblwr_init_or_load_pages(
/*=========================*/
os_file_t file,
pfs_os_file_t file,
char* path,
bool load_corrupt_pages);

@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -181,7 +181,7 @@ struct fsp_open_info {
ibool success; /*!< Has the tablespace been opened? */
const char* check_msg; /*!< fil_check_first_page() message */
ibool valid; /*!< Is the tablespace valid? */
os_file_t file; /*!< File handle */
pfs_os_file_t file; /*!< File handle */
char* filepath; /*!< File path to open */
lsn_t lsn; /*!< Flushed LSN from header page */
ulint id; /*!< Space ID */
@@ -384,7 +384,7 @@ UNIV_INTERN
const char*
fil_read_first_page(
/*================*/
os_file_t data_file, /*!< in: open data file */
pfs_os_file_t data_file, /*!< in: open data file */
ibool one_read_already, /*!< in: TRUE if min and max
parameters below already
contain sensible data */
@@ -902,20 +902,20 @@ struct PageCallback {
Called for every page in the tablespace. If the page was not
updated then its state must be set to BUF_PAGE_NOT_USED. For
compressed tables the page descriptor memory will be at offset:
block->frame + UNIV_PAGE_SIZE;
block->frame + UNIV_PAGE_SIZE;
@param offset - physical offset within the file
@param block - block read from file, note it is not from the buffer pool
@retval DB_SUCCESS or error code. */
virtual dberr_t operator()(
os_offset_t offset,
os_offset_t offset,
buf_block_t* block) UNIV_NOTHROW = 0;

/**
Set the name of the physical file and the file handle that is used
to open it for the file that is being iterated over.
@param filename - then physical name of the tablespace file.
@param file - OS file handle */
void set_file(const char* filename, os_file_t file) UNIV_NOTHROW
void set_file(const char* filename, pfs_os_file_t file) UNIV_NOTHROW
{
m_file = file;
m_filepath = filename;
@@ -951,7 +951,7 @@ struct PageCallback {
ulint m_page_size;

/** File handle to the tablespace */
os_file_t m_file;
pfs_os_file_t m_file;

/** Physical file path. */
const char* m_filepath;
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -107,7 +107,7 @@ chosen to be a slightly bigger prime number.
@param level in: level of the mutexes in the latching order
@param n_m in: number of mutexes to protect the hash table;
must be a power of 2, or 0 */
# define ha_create(n_c,n_m,type,level) ha_create_func(n_c,level,n_m,type)
# define ib_create(n_c,n_m,type,level) ha_create_func(n_c,level,n_m,type)
#else /* UNIV_SYNC_DEBUG */
/** Creates a hash table.
@return own: created table
@@ -116,7 +116,7 @@ chosen to be a slightly bigger prime number.
@param level in: level of the mutexes in the latching order
@param n_m in: number of mutexes to protect the hash table;
must be a power of 2, or 0 */
# define ha_create(n_c,n_m,type,level) ha_create_func(n_c,n_m,type)
# define ib_create(n_c,n_m,type,level) ha_create_func(n_c,n_m,type)
#endif /* UNIV_SYNC_DEBUG */

/*************************************************************//**

0 comments on commit 0af9818

Please sign in to comment.
You can’t perform that action at this time.