summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-02-02 15:27:03 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-02-02 16:16:52 +0200
commitd13fbc6212e3fcaf4c0c4eee9c677151a6efafe2 (patch)
tree6ba6018132f547c135e42c94f955cb9ba1beb8a8
parentd57b2430d70573e7696cc1244ef187e04d43789a (diff)
downloadmariadb-git-d13fbc6212e3fcaf4c0c4eee9c677151a6efafe2.tar.gz
Remove code related to InnoDB native partitioning in MySQL 5.7
row_rename_partitions_for_mysql(): Remove. This should only be relevant in an upgrade into MySQL 5.7, which has InnoDB native partitioning.
-rw-r--r--storage/innobase/handler/ha_innodb.cc20
-rw-r--r--storage/innobase/include/row0mysql.h12
-rw-r--r--storage/innobase/row/row0mysql.cc53
3 files changed, 0 insertions, 85 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 8ae8e003905..11b11db09a7 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -13762,26 +13762,6 @@ innobase_rename_table(
error = row_rename_table_for_mysql(norm_from, norm_to, trx, TRUE);
- if (error == DB_TABLE_NOT_FOUND) {
- /* May be partitioned table, which consists of partitions
- named table_name#P#partition_name[#SP#subpartition_name].
-
- We are doing a DDL operation. */
- ++trx->will_lock;
- trx_set_dict_operation(trx, TRX_DICT_OP_INDEX);
- trx_start_if_not_started(trx, true);
- error = row_rename_partitions_for_mysql(norm_from, norm_to,
- trx);
- if (error == DB_TABLE_NOT_FOUND) {
- ib::error() << "Table " << ut_get_name(trx, norm_from)
- << " does not exist in the InnoDB internal"
- " data dictionary though MariaDB is trying to"
- " rename the table. Have you copied the .frm"
- " file of the table to the MariaDB database"
- " directory from another database? "
- << TROUBLESHOOTING_MSG;
- }
- }
if (error != DB_SUCCESS) {
if (error == DB_TABLE_NOT_FOUND
&& innobase_get_lower_case_table_names() == 1) {
diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
index 5cb0249517c..85f763f07a9 100644
--- a/storage/innobase/include/row0mysql.h
+++ b/storage/innobase/include/row0mysql.h
@@ -494,18 +494,6 @@ row_rename_table_for_mysql(
bool commit) /*!< in: whether to commit trx */
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/** Renames a partitioned table for MySQL.
-@param[in] old_name Old table name.
-@param[in] new_name New table name.
-@param[in,out] trx Transaction.
-@return error code or DB_SUCCESS */
-dberr_t
-row_rename_partitions_for_mysql(
- const char* old_name,
- const char* new_name,
- trx_t* trx)
- MY_ATTRIBUTE((nonnull, warn_unused_result));
-
/*********************************************************************//**
Scans an index for either COOUNT(*) or CHECK TABLE.
If CHECK TABLE; Checks that the index contains entries in an ascending order,
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 7c1c07e4a74..ffd884b2755 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -4837,59 +4837,6 @@ funct_exit:
return(err);
}
-/** Renames a partitioned table for MySQL.
-@param[in] old_name Old table name.
-@param[in] new_name New table name.
-@param[in,out] trx Transaction.
-@return error code or DB_SUCCESS */
-dberr_t
-row_rename_partitions_for_mysql(
- const char* old_name,
- const char* new_name,
- trx_t* trx)
-{
- char from_name[FN_REFLEN];
- char to_name[FN_REFLEN];
- ulint from_len = strlen(old_name);
- ulint to_len = strlen(new_name);
- char* table_name;
- dberr_t error = DB_TABLE_NOT_FOUND;
-
- ut_a(from_len < (FN_REFLEN - 4));
- ut_a(to_len < (FN_REFLEN - 4));
- memcpy(from_name, old_name, from_len);
- from_name[from_len] = '#';
- from_name[from_len + 1] = 0;
- while ((table_name = dict_get_first_table_name_in_db(from_name))) {
- ut_a(memcmp(table_name, from_name, from_len) == 0);
- /* Must match #[Pp]#<partition_name> */
- if (strlen(table_name) <= (from_len + 3)
- || table_name[from_len] != '#'
- || table_name[from_len + 2] != '#'
- || (table_name[from_len + 1] != 'P'
- && table_name[from_len + 1] != 'p')) {
-
- ut_ad(0);
- ut_free(table_name);
- continue;
- }
- memcpy(to_name, new_name, to_len);
- memcpy(to_name + to_len, table_name + from_len,
- strlen(table_name) - from_len + 1);
- error = row_rename_table_for_mysql(table_name, to_name,
- trx, false);
- if (error != DB_SUCCESS) {
- /* Rollback and return. */
- trx_rollback_for_mysql(trx);
- ut_free(table_name);
- return(error);
- }
- ut_free(table_name);
- }
- trx_commit_for_mysql(trx);
- return(error);
-}
-
/*********************************************************************//**
Scans an index for either COUNT(*) or CHECK TABLE.
If CHECK TABLE; Checks that the index contains entries in an ascending order,