Revert some InnoDB/XtraDB changes
The relevant InnoDB/XtraDB fixes up to 5.6.42 had already been applied to MariaDB in commit 30c3d6db328d73f1b30be537aceb55d37936fdb9. Revert some changes that appeared in the merge commit 87d852f102a7f733a774252d9a446377ac51a976.
This commit is contained in:
parent
03977e8273
commit
db55b39fb2
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2012, Facebook Inc.
|
Copyright (c) 2012, Facebook Inc.
|
||||||
Copyright (c) 2014, 2017, MariaDB Corporation.
|
Copyright (c) 2014, 2017, MariaDB Corporation.
|
||||||
|
|
||||||
@ -3370,10 +3370,7 @@ dict_foreign_find_index(
|
|||||||
table, col_names, columns, n_cols,
|
table, col_names, columns, n_cols,
|
||||||
index, types_idx,
|
index, types_idx,
|
||||||
check_charsets, check_null,
|
check_charsets, check_null,
|
||||||
error, err_col_no,err_index)
|
error, err_col_no,err_index)) {
|
||||||
&& (!(index->online_status ==
|
|
||||||
ONLINE_INDEX_ABORTED_DROPPED
|
|
||||||
||index->online_status == ONLINE_INDEX_ABORTED))) {
|
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = DB_SUCCESS;
|
*error = DB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2015,11 +2015,6 @@ innobase_get_lower_case_table_names(void)
|
|||||||
{
|
{
|
||||||
return(lower_case_table_names);
|
return(lower_case_table_names);
|
||||||
}
|
}
|
||||||
/** return one of the tmpdir path
|
|
||||||
@return tmpdir path*/
|
|
||||||
UNIV_INTERN
|
|
||||||
char*
|
|
||||||
innobase_mysql_tmpdir(void) { return (mysql_tmpdir); }
|
|
||||||
|
|
||||||
/** Create a temporary file in the location specified by the parameter
|
/** Create a temporary file in the location specified by the parameter
|
||||||
path. If the path is null, then it will be created in tmpdir.
|
path. If the path is null, then it will be created in tmpdir.
|
||||||
@ -10908,8 +10903,7 @@ innobase_rename_table(
|
|||||||
|
|
||||||
row_mysql_lock_data_dictionary(trx);
|
row_mysql_lock_data_dictionary(trx);
|
||||||
|
|
||||||
dict_table_t* table = NULL;
|
dict_table_t* table = dict_table_open_on_name(norm_from, TRUE, FALSE,
|
||||||
table = dict_table_open_on_name(norm_from, TRUE, FALSE,
|
|
||||||
DICT_ERR_IGNORE_NONE);
|
DICT_ERR_IGNORE_NONE);
|
||||||
|
|
||||||
/* Since DICT_BG_YIELD has sleep for 250 milliseconds,
|
/* Since DICT_BG_YIELD has sleep for 250 milliseconds,
|
||||||
@ -11092,9 +11086,7 @@ ha_innobase::rename_table(
|
|||||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), to);
|
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), to);
|
||||||
|
|
||||||
error = DB_ERROR;
|
error = DB_ERROR;
|
||||||
}
|
} else if (error == DB_LOCK_WAIT_TIMEOUT) {
|
||||||
|
|
||||||
else if (error == DB_LOCK_WAIT_TIMEOUT) {
|
|
||||||
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0), to);
|
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0), to);
|
||||||
|
|
||||||
error = DB_LOCK_WAIT;
|
error = DB_LOCK_WAIT;
|
||||||
|
@ -4173,24 +4173,12 @@ oom:
|
|||||||
table. Either way, we should be seeing and
|
table. Either way, we should be seeing and
|
||||||
reporting a bogus duplicate key error. */
|
reporting a bogus duplicate key error. */
|
||||||
dup_key = NULL;
|
dup_key = NULL;
|
||||||
} else if (prebuilt->trx->error_key_num == 0) {
|
|
||||||
dup_key = &ha_alter_info->key_info_buffer[
|
|
||||||
prebuilt->trx->error_key_num];
|
|
||||||
} else {
|
} else {
|
||||||
/* Check if there is generated cluster index column */
|
|
||||||
if (ctx->num_to_add_index > ha_alter_info->key_count) {
|
|
||||||
DBUG_ASSERT(prebuilt->trx->error_key_num
|
|
||||||
<= ha_alter_info->key_count);
|
|
||||||
dup_key = &ha_alter_info->key_info_buffer[
|
|
||||||
prebuilt->trx->error_key_num - 1];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DBUG_ASSERT(prebuilt->trx->error_key_num
|
DBUG_ASSERT(prebuilt->trx->error_key_num
|
||||||
< ha_alter_info->key_count);
|
< ha_alter_info->key_count);
|
||||||
dup_key = &ha_alter_info->key_info_buffer[
|
dup_key = &ha_alter_info->key_info_buffer[
|
||||||
prebuilt->trx->error_key_num];
|
prebuilt->trx->error_key_num];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
print_keydup_error(altered_table, dup_key, MYF(0));
|
print_keydup_error(altered_table, dup_key, MYF(0));
|
||||||
break;
|
break;
|
||||||
case DB_ONLINE_LOG_TOO_BIG:
|
case DB_ONLINE_LOG_TOO_BIG:
|
||||||
@ -5117,19 +5105,10 @@ commit_try_rebuild(
|
|||||||
FTS_DOC_ID. */
|
FTS_DOC_ID. */
|
||||||
dup_key = NULL;
|
dup_key = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (ctx->num_to_add_index > ha_alter_info->key_count) {
|
DBUG_ASSERT(err_key < ha_alter_info->key_count);
|
||||||
DBUG_ASSERT(err_key <=
|
|
||||||
ha_alter_info->key_count);
|
|
||||||
dup_key = &ha_alter_info
|
|
||||||
->key_info_buffer[err_key - 1];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DBUG_ASSERT(err_key <
|
|
||||||
ha_alter_info->key_count);
|
|
||||||
dup_key = &ha_alter_info
|
dup_key = &ha_alter_info
|
||||||
->key_info_buffer[err_key];
|
->key_info_buffer[err_key];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
print_keydup_error(altered_table, dup_key, MYF(0));
|
print_keydup_error(altered_table, dup_key, MYF(0));
|
||||||
DBUG_RETURN(true);
|
DBUG_RETURN(true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
||||||
Copyright (c) 1995, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
Copyright (c) 2013, 2017, MariaDB Corporation.
|
Copyright (c) 2013, 2017, MariaDB Corporation.
|
||||||
|
|
||||||
@ -1314,10 +1314,6 @@ os_file_get_status(
|
|||||||
file can be opened in RW mode */
|
file can be opened in RW mode */
|
||||||
|
|
||||||
#if !defined(UNIV_HOTBACKUP)
|
#if !defined(UNIV_HOTBACKUP)
|
||||||
|
|
||||||
/** return one of the tmpdir path
|
|
||||||
@return tmpdir path*/
|
|
||||||
char *innobase_mysql_tmpdir(void);
|
|
||||||
/** Create a temporary file in the location specified by the parameter
|
/** Create a temporary file in the location specified by the parameter
|
||||||
path. If the path is null, then it will be created in tmpdir.
|
path. If the path is null, then it will be created in tmpdir.
|
||||||
@param[in] path location for creating temporary file
|
@param[in] path location for creating temporary file
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2014, 2018, MariaDB Corporation.
|
Copyright (c) 2014, 2018, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
@ -3138,10 +3138,9 @@ row_merge_file_create_low(
|
|||||||
file APIs, add instrumentation to register with
|
file APIs, add instrumentation to register with
|
||||||
performance schema */
|
performance schema */
|
||||||
struct PSI_file_locker* locker = NULL;
|
struct PSI_file_locker* locker = NULL;
|
||||||
|
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = innobase_mysql_tmpdir();
|
path = mysql_tmpdir;
|
||||||
}
|
}
|
||||||
static const char label[] = "/Innodb Merge Temp File";
|
static const char label[] = "/Innodb Merge Temp File";
|
||||||
char* name = static_cast<char*>(
|
char* name = static_cast<char*>(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1997, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2008, Google Inc.
|
Copyright (c) 2008, Google Inc.
|
||||||
Copyright (c) 2015, 2018, MariaDB Corporation.
|
Copyright (c) 2015, 2018, MariaDB Corporation.
|
||||||
|
|
||||||
@ -4550,7 +4550,7 @@ no_gap_lock:
|
|||||||
prebuilt->new_rec_locks = 1;
|
prebuilt->new_rec_locks = 1;
|
||||||
}
|
}
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
break;
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
case DB_LOCK_WAIT:
|
case DB_LOCK_WAIT:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2012, Facebook Inc.
|
Copyright (c) 2012, Facebook Inc.
|
||||||
Copyright (c) 2014, 2017, MariaDB Corporation.
|
Copyright (c) 2014, 2017, MariaDB Corporation.
|
||||||
|
|
||||||
@ -3387,10 +3387,7 @@ dict_foreign_find_index(
|
|||||||
table, col_names, columns, n_cols,
|
table, col_names, columns, n_cols,
|
||||||
index, types_idx,
|
index, types_idx,
|
||||||
check_charsets, check_null,
|
check_charsets, check_null,
|
||||||
error, err_col_no,err_index)
|
error, err_col_no,err_index)) {
|
||||||
&& (!(index->online_status ==
|
|
||||||
ONLINE_INDEX_ABORTED_DROPPED
|
|
||||||
||index->online_status == ONLINE_INDEX_ABORTED))) {
|
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = DB_SUCCESS;
|
*error = DB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -11721,8 +11721,7 @@ innobase_rename_table(
|
|||||||
|
|
||||||
row_mysql_lock_data_dictionary(trx);
|
row_mysql_lock_data_dictionary(trx);
|
||||||
|
|
||||||
dict_table_t* table = NULL;
|
dict_table_t* table = dict_table_open_on_name(norm_from, TRUE, FALSE,
|
||||||
table = dict_table_open_on_name(norm_from, TRUE, FALSE,
|
|
||||||
DICT_ERR_IGNORE_NONE);
|
DICT_ERR_IGNORE_NONE);
|
||||||
|
|
||||||
/* Since DICT_BG_YIELD has sleep for 250 milliseconds,
|
/* Since DICT_BG_YIELD has sleep for 250 milliseconds,
|
||||||
@ -11916,12 +11915,6 @@ ha_innobase::rename_table(
|
|||||||
error = DB_LOCK_WAIT;
|
error = DB_LOCK_WAIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (error == DB_LOCK_WAIT_TIMEOUT) {
|
|
||||||
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0), to);
|
|
||||||
|
|
||||||
error = DB_LOCK_WAIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
DBUG_RETURN(convert_error_code_to_mysql(error, 0, NULL));
|
DBUG_RETURN(convert_error_code_to_mysql(error, 0, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ dtype_get_fixed_size_low(
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
// fallthrough
|
/* fall through */
|
||||||
case DATA_CHAR:
|
case DATA_CHAR:
|
||||||
case DATA_FIXBINARY:
|
case DATA_FIXBINARY:
|
||||||
case DATA_INT:
|
case DATA_INT:
|
||||||
@ -603,7 +603,7 @@ dtype_get_min_size_low(
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
// fallthrough
|
/* fall through */
|
||||||
case DATA_CHAR:
|
case DATA_CHAR:
|
||||||
case DATA_FIXBINARY:
|
case DATA_FIXBINARY:
|
||||||
case DATA_INT:
|
case DATA_INT:
|
||||||
|
@ -292,7 +292,8 @@ dict_mem_table_add_col(
|
|||||||
const char* name, /*!< in: column name, or NULL */
|
const char* name, /*!< in: column name, or NULL */
|
||||||
ulint mtype, /*!< in: main datatype */
|
ulint mtype, /*!< in: main datatype */
|
||||||
ulint prtype, /*!< in: precise type */
|
ulint prtype, /*!< in: precise type */
|
||||||
ulint len); /*!< in: precision */
|
ulint len) /*!< in: precision */
|
||||||
|
MY_ATTRIBUTE((nonnull(1)));
|
||||||
/**********************************************************************//**
|
/**********************************************************************//**
|
||||||
Renames a column of a table in the data dictionary cache. */
|
Renames a column of a table in the data dictionary cache. */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 2012, 2018, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2015, 2018, MariaDB Corporation.
|
Copyright (c) 2015, 2018, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
@ -1969,11 +1969,7 @@ PageConverter::update_index_page(
|
|||||||
return(DB_SUCCESS);
|
return(DB_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!page_is_leaf(block->frame)) {
|
return page_is_leaf(block->frame) ? update_records(block) : DB_SUCCESS;
|
||||||
return (DB_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(update_records(block));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3834,4 +3830,3 @@ row_import_for_mysql(
|
|||||||
|
|
||||||
return(row_import_cleanup(prebuilt, trx, err));
|
return(row_import_cleanup(prebuilt, trx, err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2736,7 +2736,8 @@ row_sel_field_store_in_mysql_format_func(
|
|||||||
case DATA_SYS:
|
case DATA_SYS:
|
||||||
/* These column types should never be shipped to MySQL. */
|
/* These column types should never be shipped to MySQL. */
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
break;
|
/* fall through */
|
||||||
|
|
||||||
case DATA_CHAR:
|
case DATA_CHAR:
|
||||||
case DATA_FIXBINARY:
|
case DATA_FIXBINARY:
|
||||||
case DATA_FLOAT:
|
case DATA_FLOAT:
|
||||||
@ -4566,7 +4567,7 @@ no_gap_lock:
|
|||||||
prebuilt->new_rec_locks = 1;
|
prebuilt->new_rec_locks = 1;
|
||||||
}
|
}
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
break;
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
case DB_LOCK_WAIT:
|
case DB_LOCK_WAIT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user