Below is the list of changes that have just been committed into a local
5.2 repository of rafal. When rafal does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-29 11:54:15+02:00, rafal@quant.(none) +2 -0
WL#3904: Add "Backup:" or "Restore:" prefix to messages written by backup system.
sql/backup/logger.cc@stripped, 2007-06-29 11:54:12+02:00, rafal@quant.(none) +11 -6
Add "Backup:" or "Restore:" prefix to messages written by backup system.
sql/backup/logger.h@stripped, 2007-06-29 11:54:12+02:00, rafal@quant.(none) +4 -2
Add "Backup:" or "Restore:" prefix to messages written by backup system.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: rafal
# Host: quant.(none)
# Root: /ext/mysql/bk/backup/alpha
--- 1.3/sql/backup/logger.cc 2007-06-29 11:54:19 +02:00
+++ 1.4/sql/backup/logger.cc 2007-06-29 11:54:19 +02:00
@@ -22,23 +22,28 @@
int Logger::write_message(log_level::value level, int error_code,
const char *msg)
{
+ const char *prefix= m_type == BACKUP ? "Backup" : "Restore";
+ char buf[ERRMSGSIZE + 30];
+
+ my_snprintf(buf,sizeof(buf),"%s: %s",prefix,msg);
+
switch (level) {
case log_level::ERROR:
if (m_save_errors)
errors.push_front(new MYSQL_ERROR(::current_thd,error_code,
MYSQL_ERROR::WARN_LEVEL_ERROR,msg));
- sql_print_error(msg);
- DBUG_PRINT("backup log",("[ERROR] %s",msg));
+ sql_print_error(buf);
+ DBUG_PRINT("backup log",("[ERROR] %s",buf));
return 0;
case log_level::WARNING:
- sql_print_warning(msg);
- DBUG_PRINT("backup log",("[Warning] %s",msg));
+ sql_print_warning(buf);
+ DBUG_PRINT("backup log",("[Warning] %s",buf));
return 0;
case log_level::INFO:
- sql_print_information(msg);
- DBUG_PRINT("backup log",("[Info] %s",msg));
+ sql_print_information(buf);
+ DBUG_PRINT("backup log",("[Info] %s",buf));
return 0;
default: return ERROR;
--- 1.2/sql/backup/logger.h 2007-06-29 11:54:19 +02:00
+++ 1.3/sql/backup/logger.h 2007-06-29 11:54:19 +02:00
@@ -28,10 +28,12 @@
message corresponding to an error code is done using @c report_error() methods.
*/
class Logger
-{
+{
public:
- Logger(): m_save_errors(FALSE)
+ enum enum_type { BACKUP, RESTORE } m_type;
+
+ Logger(enum_type type): m_type(type),m_save_errors(FALSE)
{}
int write_message(log_level::value level , int error_code, const char *msg);
| Thread |
|---|
| • bk commit into 5.2 tree (rafal:1.2546) | rsomla | 29 Jun |