mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user