diff options
author | unknown <guilhem@mysql.com> | 2003-07-24 22:25:36 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-07-24 22:25:36 +0200 |
commit | ab34adf66acb0830a1105777b31a427da1e49b63 (patch) | |
tree | 38aa7e4dde6c59d05318d1c048b93848531ad47e /sql/slave.h | |
parent | 30ee158d2f40b6b9e18955970ccee4cba664d21b (diff) | |
download | mariadb-git-ab34adf66acb0830a1105777b31a427da1e49b63.tar.gz |
WL#1036 (print the db in slave error messages).
I extended the task to cleaning error messages, making them look nicer,
and making the output of SHOW SLAVE STATUS (column Last_error) be as complete
as what's printed on the .err file;
previously we would have, for a failure of a replicated LOAD DATA INFILE:
- in the .err, 2 lines:
"duplicate entry 2708 for key 1"
"failed loading SQL_LOAD-5-2-2.info"
- and in SHOW SLAVE STATUS, only:
"failed loading SQL_LOAD-5-2-2.info".
Now SHOW SLAVE STATUS will contain the concatenation of the 2 messages.
sql/log_event.cc:
Print the default database when replication stops because of an error. Previously, we had:
"error "Duplicate entry 87987 for key 1", query 'insert into t values(87987)'", ie the db
was not mentioned, making it hard for cases where the same table name is used in
several databases.
Lengthened some error messages (for failing replication of LOAD DATA: mention the table
and the db).
Changes so that SHOW SLAVE STATUS reports as complete errors as the .err file.
sql/slave.cc:
Removed a useless declaration (the rewrite_db() function is already declared in slave.h).
Added missing ')' in error messages.
Tried to make error messages look nicer (previously we had
"do START SLAVE;, error_code=1062"
now we'll have
"do START SLAVE; . Error_code=1062".
This form has been discussed, I agree it's no panacea, but it's still more readable
like this. To be improved in the future :)
sql/slave.h:
declarations.
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/slave.h b/sql/slave.h index 842ddca75f4..d1fd54d3c04 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -383,9 +383,10 @@ int add_wild_table_rule(DYNAMIC_ARRAY* a, const char* table_spec); void init_table_rule_hash(HASH* h, bool* h_inited); void init_table_rule_array(DYNAMIC_ARRAY* a, bool* a_inited); char* rewrite_db(char* db); +char* print_slave_db_safe(char* db); int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int error_code); void skip_load_data_infile(NET* net); -void slave_print_error(RELAY_LOG_INFO* rli,int err_code, const char* msg, ...); +void slave_print_error(RELAY_LOG_INFO* rli, int err_code, const char* msg, ...); void end_slave(); /* clean up */ int init_master_info(MASTER_INFO* mi, const char* master_info_fname, |