diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index 1c28a39a62e..8a06cd1db2c 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. 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 @@ -2551,7 +2552,6 @@ replacing what was there previously. @param[in] flags Tablespace flags @param[in] path Tablespace path @param[in] trx Transaction -@param[in] commit If true, commit the transaction @return error code or DB_SUCCESS */ dberr_t dict_replace_tablespace_in_dictionary( @@ -2559,8 +2559,7 @@ dict_replace_tablespace_in_dictionary( const char* name, ulint flags, const char* path, - trx_t* trx, - bool commit) + trx_t* trx) { if (!srv_sys_tablespaces_open) { /* Startup procedure is not yet ready for updates. */ @@ -2609,11 +2608,6 @@ dict_replace_tablespace_in_dictionary( return(error); } - if (commit) { - trx->op_info = "committing tablespace and datafile definition"; - trx_commit(trx); - } - trx->op_info = ""; return(error); diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index c8b5f2d7c90..2f1efd3c9ed 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -990,7 +990,7 @@ dict_replace_tablespace_and_filepath( SYS_DATAFILES. Assume the record is also missing in SYS_TABLESPACES. Insert records into them both. */ err = dict_replace_tablespace_in_dictionary( - space_id, name, fsp_flags, filepath, trx, false); + space_id, name, fsp_flags, filepath, trx); trx_commit_for_mysql(trx); trx->dict_operation_lock_mode = 0; diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index dd8de511b21..09012ad4101 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1784,7 +1784,7 @@ fts_create_one_common_table( FTS_CONFIG_TABLE_VALUE_COL_LEN); } - error = row_create_table_for_mysql(new_table, trx, false, + error = row_create_table_for_mysql(new_table, trx, FIL_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY); if (error == DB_SUCCESS) { @@ -2001,7 +2001,7 @@ fts_create_one_index_table( (DATA_MTYPE_MAX << 16) | DATA_UNSIGNED | DATA_NOT_NULL, FTS_INDEX_ILIST_LEN); - error = row_create_table_for_mysql(new_table, trx, false, + error = row_create_table_for_mysql(new_table, trx, FIL_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY); if (error == DB_SUCCESS) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3ee90b67517..d01ef945a67 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -11796,7 +11796,7 @@ err_col: } else { if (err == DB_SUCCESS) { err = row_create_table_for_mysql( - table, m_trx, false, + table, m_trx, (fil_encryption_t)options->encryption, (uint32_t)options->encryption_key_id); } diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 94843994673..084fc807553 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -4709,7 +4709,7 @@ prepare_inplace_alter_table_dict( } error = row_create_table_for_mysql( - ctx->new_table, ctx->trx, false, mode, key_id); + ctx->new_table, ctx->trx, mode, key_id); switch (error) { dict_table_t* temp_table; diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h index 76eb48d1e7e..86a4bcf23a3 100644 --- a/storage/innobase/include/dict0crea.h +++ b/storage/innobase/include/dict0crea.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. 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 @@ -242,7 +243,6 @@ replacing what was there previously. @param[in] flags Tablespace flags @param[in] path Tablespace path @param[in] trx Transaction -@param[in] commit If true, commit the transaction @return error code or DB_SUCCESS */ dberr_t dict_replace_tablespace_in_dictionary( @@ -250,8 +250,7 @@ dict_replace_tablespace_in_dictionary( const char* name, ulint flags, const char* path, - trx_t* trx, - bool commit); + trx_t* trx); /** Delete records from SYS_TABLESPACES and SYS_DATAFILES associated with a particular tablespace ID. diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 2b000603929..8d3752974a6 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -352,7 +352,6 @@ row_create_table_for_mysql( (will be freed, or on DB_SUCCESS added to the data dictionary cache) */ trx_t* trx, /*!< in/out: transaction */ - bool commit, /*!< in: if true, commit the transaction */ fil_encryption_t mode, /*!< in: encryption mode */ uint32_t key_id) /*!< in: encryption key_id */ MY_ATTRIBUTE((warn_unused_result)); diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index a4b4af439ff..48eaa8c675e 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -2368,7 +2368,6 @@ row_create_table_for_mysql( (will be freed, or on DB_SUCCESS added to the data dictionary cache) */ trx_t* trx, /*!< in/out: transaction */ - bool commit, /*!< in: if true, commit the transaction */ fil_encryption_t mode, /*!< in: encryption mode */ uint32_t key_id) /*!< in: encryption key_id */ { @@ -2398,10 +2397,6 @@ err_exit: #endif /* !DBUG_OFF */ dict_mem_table_free(table); - if (commit) { - trx_commit_for_mysql(trx); - } - trx->op_info = ""; return(DB_ERROR); @@ -2446,7 +2441,7 @@ err_exit: err = dict_replace_tablespace_in_dictionary( table->space, table->name.m_name, fil_space_get_flags(table->space), - path, trx, commit); + path, trx); ut_free(path); @@ -2472,10 +2467,6 @@ err_exit: DICT_ERR_IGNORE_NONE)) { dict_table_close_and_drop(trx, table); - - if (commit) { - trx_commit_for_mysql(trx); - } } else { dict_mem_table_free(table); }