Browse Source

Remove a constant parameter commit=false

pull/475/head
Marko Mäkelä 8 years ago
parent
commit
d6f857ddbc
  1. 10
      storage/innobase/dict/dict0crea.cc
  2. 2
      storage/innobase/dict/dict0load.cc
  3. 4
      storage/innobase/fts/fts0fts.cc
  4. 2
      storage/innobase/handler/ha_innodb.cc
  5. 2
      storage/innobase/handler/handler0alter.cc
  6. 5
      storage/innobase/include/dict0crea.h
  7. 1
      storage/innobase/include/row0mysql.h
  8. 11
      storage/innobase/row/row0mysql.cc

10
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);

2
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;

4
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) {

2
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);
}

2
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;

5
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.

1
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));

11
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);
}

Loading…
Cancel
Save