diff options
author | unknown <guilhem@mysql.com> | 2004-05-04 15:48:40 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-05-04 15:48:40 +0200 |
commit | ed3f472a126ded7be137156d9127fafc874cfc3d (patch) | |
tree | 842b276653b5d846fb94778a8c18f74baa2aab62 | |
parent | c008eb042584dbb9a837569da12ac4de3f86096e (diff) | |
download | mariadb-git-ed3f472a126ded7be137156d9127fafc874cfc3d.tar.gz |
Fix for Bug#3357 "If the statement is long, the error message is trunc and important info is lost";
in hard-coded replication messages, always put small-length info (error codes, explanation of the error) at the beginning,
so that it is not cut by truncation if the query is very long (which happens if the query goes first).
sql/log_event.cc:
in hard-coded replication messages, always put small-length info (error codes, explanation of the error) at the beginning,
so that it is not cut by truncation if the query is very long (which happens if the query goes first).
-rw-r--r-- | sql/log_event.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 9c8676192a1..7817ccff3d7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1862,12 +1862,12 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli) else { slave_print_error(rli,expected_error, - "query '%s' partially completed on the master \ + "query partially completed on the master \ (error on master: %d) \ and was aborted. There is a chance that your master is inconsistent at this \ point. If you are sure that your master is ok, run this query manually on the\ slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;\ - START SLAVE; .", thd->query, expected_error); + START SLAVE; . Query: '%s'", expected_error, thd->query); thd->query_error= 1; } goto end; @@ -1896,15 +1896,13 @@ point. If you are sure that your master is ok, run this query manually on the\ { slave_print_error(rli, 0, "\ -Query '%s' caused different errors on master and slave. \ +Query caused different errors on master and slave. \ Error on master: '%s' (%d), Error on slave: '%s' (%d). \ -Default database: '%s'", - query, +Default database: '%s'. Query: '%s'", ER_SAFE(expected_error), expected_error, actual_error ? thd->net.last_error: "no error", - actual_error, - print_slave_db_safe(db)); + actual_error, print_slave_db_safe(db), query); thd->query_error= 1; } /* @@ -1919,11 +1917,10 @@ Default database: '%s'", else if (thd->query_error || thd->fatal_error) { slave_print_error(rli,actual_error, - "Error '%s' on query '%s'. Default database: '%s'", + "Error '%s' on query. Default database: '%s'. Query: '%s'", (actual_error ? thd->net.last_error : "unexpected success or fatal error"), - query, - print_slave_db_safe(db)); + print_slave_db_safe(db), query); thd->query_error= 1; } } /* End of if (db_ok(... */ |