summaryrefslogtreecommitdiff
path: root/storage/innobase/dict
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 16:51:26 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 16:51:26 +0300
commit680463a8d991389f4ea5942e87764137c55c0eb4 (patch)
tree427f8946aa9085c7f6346e1047144995cb7c459e /storage/innobase/dict
parent05693cf2149f8792863a32325090e789015286fc (diff)
parentefc70da5fd0459ff44153529d13651741cc32bc4 (diff)
downloadmariadb-git-680463a8d991389f4ea5942e87764137c55c0eb4.tar.gz
Merge 10.2 into 10.3
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 182909551e9..fd45aee407d 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -1603,10 +1603,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
@@ -1705,10 +1704,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.";
@@ -1786,9 +1784,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);
@@ -2238,10 +2236,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 d901d5f7f4c..0c5343205a7 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -904,7 +904,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"
@@ -914,7 +914,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);
@@ -1361,6 +1361,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 d67329bd47f..4e6fb9d3ae4 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -2351,14 +2351,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;
}
}
@@ -2469,9 +2469,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;
mutex_exit(&dict_sys->mutex);
rw_lock_x_unlock(&dict_operation_lock);
@@ -3326,7 +3326,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.";
}