summaryrefslogtreecommitdiff
path: root/storage/innobase/dict
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 18:05:22 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 18:05:22 +0300
commit68d9d512e933a1d40670add50f205e5266bc5507 (patch)
tree24f483a40449b28b4414360fbdd03646315ac1ec /storage/innobase/dict
parent6404645980db51fdc1e5dae2ac94eca57804284b (diff)
parent286e52e948eee9e5f908c5944467149df35d25e7 (diff)
downloadmariadb-git-68d9d512e933a1d40670add50f205e5266bc5507.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r--storage/innobase/dict/dict0crea.cc19
-rw-r--r--storage/innobase/dict/dict0load.cc5
-rw-r--r--storage/innobase/dict/dict0stats.cc10
3 files changed, 16 insertions, 18 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index be570b3fda7..28974971786 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -1491,10 +1491,9 @@ dict_create_or_check_foreign_constraint_tables(void)
"END;\n",
FALSE, trx);
- if (err != DB_SUCCESS) {
-
+ if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::error() << "Creation of SYS_FOREIGN and SYS_FOREIGN_COLS"
- " failed: " << ut_strerr(err) << ". Tablespace is"
+ " failed: " << err << ". Tablespace is"
" full. Dropping incompletely created tables.";
ut_ad(err == DB_OUT_OF_FILE_SPACE
@@ -1593,10 +1592,9 @@ dict_create_or_check_sys_virtual()
"END;\n",
FALSE, trx);
- if (err != DB_SUCCESS) {
-
+ if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::error() << "Creation of SYS_VIRTUAL"
- " failed: " << ut_strerr(err) << ". Tablespace is"
+ " failed: " << err << ". Tablespace is"
" full or too many transactions."
" Dropping incompletely created tables.";
@@ -1674,9 +1672,9 @@ dict_foreign_eval_sql(
return(error);
}
- if (error != DB_SUCCESS) {
+ if (UNIV_UNLIKELY(error != DB_SUCCESS)) {
ib::error() << "Foreign key constraint creation failed: "
- << ut_strerr(error);
+ << error;
mutex_enter(&dict_foreign_err_mutex);
ut_print_timestamp(ef);
@@ -2127,10 +2125,9 @@ dict_create_or_check_sys_tablespace(void)
"END;\n",
FALSE, trx);
- if (err != DB_SUCCESS) {
-
+ if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::error() << "Creation of SYS_TABLESPACES and SYS_DATAFILES"
- " has failed with error " << ut_strerr(err)
+ " has failed with error " << err
<< ". Dropping incompletely created tables.";
ut_a(err == DB_OUT_OF_FILE_SPACE
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc
index 2889f5d83c8..78844680de6 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -905,7 +905,7 @@ dict_update_filepath(
trx->dict_operation_lock_mode = 0;
trx_free(trx);
- if (err == DB_SUCCESS) {
+ if (UNIV_LIKELY(err == DB_SUCCESS)) {
/* We just updated SYS_DATAFILES due to the contents in
a link file. Make a note that we did this. */
ib::info() << "The InnoDB data dictionary table SYS_DATAFILES"
@@ -915,7 +915,7 @@ dict_update_filepath(
ib::warn() << "Error occurred while updating InnoDB data"
" dictionary table SYS_DATAFILES for tablespace ID "
<< space_id << " to file " << filepath << ": "
- << ut_strerr(err) << ".";
+ << err << ".";
}
return(err);
@@ -1360,6 +1360,7 @@ static ulint dict_check_sys_tables()
for (rec = dict_startscan_system(&pcur, &mtr, SYS_TABLES);
rec != NULL;
+ mtr.commit(), mtr.start(),
rec = dict_getnext_system(&pcur, &mtr)) {
const byte* field;
ulint len;
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index fbd9b1f9bc6..bd60ceb48bb 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -2346,14 +2346,14 @@ dict_stats_save_index_stat(
");\n"
"END;", trx);
- if (ret != DB_SUCCESS) {
+ if (UNIV_UNLIKELY(ret != DB_SUCCESS)) {
if (innodb_index_stats_not_found == false &&
index->stats_error_printed == false) {
ib::error() << "Cannot save index statistics for table "
<< index->table->name
<< ", index " << index->name
<< ", stat name \"" << stat_name << "\": "
- << ut_strerr(ret);
+ << ret;
index->stats_error_printed = true;
}
}
@@ -2463,9 +2463,9 @@ dict_stats_save(
");\n"
"END;", NULL);
- if (ret != DB_SUCCESS) {
+ if (UNIV_UNLIKELY(ret != DB_SUCCESS)) {
ib::error() << "Cannot save table statistics for table "
- << table->name << ": " << ut_strerr(ret);
+ << table->name << ": " << ret;
func_exit:
dict_sys_unlock();
dict_stats_snapshot_free(table);
@@ -3311,7 +3311,7 @@ dict_stats_update(
" for table "
<< table->name
<< " from " TABLE_STATS_NAME_PRINT " and "
- INDEX_STATS_NAME_PRINT ": " << ut_strerr(err)
+ INDEX_STATS_NAME_PRINT ": " << err
<< ". Using transient stats method instead.";
}