summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-12-23 11:57:42 +0200
committerMonty <monty@mariadb.org>2015-12-23 11:57:42 +0200
commitdeef90eb753bfe132be2e3b46536a29dde93de8a (patch)
tree75acfe171631427e3d1e17c008844f93f04da98e
parent27e6fd9a596847a1a4c618d16ed43f6885dfe73a (diff)
downloadmariadb-git-deef90eb753bfe132be2e3b46536a29dde93de8a.tar.gz
Don't send error 0 to my_printf_error()
Fixed by adding HA_ERR_INFO as a informational warning to by used by MyISAM This is used to inform when we create a backup copy of the data file. Also improved informational messages when creating backup copies of data and index files
-rw-r--r--include/my_base.h3
-rw-r--r--include/my_handler_errors.h3
-rw-r--r--storage/myisam/ha_myisam.cc4
-rw-r--r--storage/myisam/mi_check.c7
4 files changed, 10 insertions, 7 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 8b546edac43..bdcf465b35c 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -503,7 +503,8 @@ enum ha_base_keytype {
#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but
decypt failed */
-#define HA_ERR_LAST 192 /* Copy of last error nr */
+#define HA_ERR_INFO 193 /* Information, not critical */
+#define HA_ERR_LAST 193 /* Copy of last error nr */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h
index 5af6a359348..38b2bf98d6e 100644
--- a/include/my_handler_errors.h
+++ b/include/my_handler_errors.h
@@ -95,7 +95,8 @@ static const char *handler_error_messages[]=
"Disk full",
"Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this",
"Too many words in a FTS phrase or proximity search",
- "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match."
+ "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.",
+ "Information, not an error"
};
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 3029909e79f..4284e22782d 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1669,8 +1669,8 @@ bool ha_myisam::check_and_repair(THD *thd)
{
char buff[MY_BACKUP_NAME_EXTRA_LENGTH+1];
my_create_backup_name(buff, "", check_opt.start_time);
- sql_print_information("Making backup of index file with extension '%s'",
- buff);
+ sql_print_information("Making backup of index file %s with extension '%s'",
+ file->s->index_file_name, buff);
mi_make_backup_of_index(file, check_opt.start_time,
MYF(MY_WME | ME_JUST_WARNING));
}
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 1d72feb9f7e..1ef3a4e72b9 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -4767,9 +4767,10 @@ static int replace_data_file(HA_CHECK *param, MI_INFO *info,
{
char buff[MY_BACKUP_NAME_EXTRA_LENGTH+1];
my_create_backup_name(buff, "", param->backup_time);
- my_printf_error(0, /* No error, just info */
- "Making backup of data file with extension '%s'",
- MYF(ME_JUST_INFO | ME_NOREFRESH), buff);
+ my_printf_error(HA_ERR_INFO, /* No error, just info */
+ "Making backup of data file %s with extension '%s'",
+ MYF(ME_JUST_INFO | ME_NOREFRESH), share->data_file_name,
+ buff);
}
/*