diff options
author | Mats Kindahl <mats@sun.com> | 2009-05-11 13:32:38 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2009-05-11 13:32:38 +0200 |
commit | 478fcfab0edc9c24a0cb82b98e78e1f5edcc59e8 (patch) | |
tree | d28dc6b64c8ddbcdad7c30aaf7d43297ae5111c9 /sql/log_event.cc | |
parent | 2bbd677f5b896fe331c03538649069cbbb96fa34 (diff) | |
download | mariadb-git-478fcfab0edc9c24a0cb82b98e78e1f5edcc59e8.tar.gz |
Bug #44442: Incident events are silent in mysqlbinlog output
In the output from mysqlbinlog, incident log events were
represented as just a comment. Since the incident log event
represents an incident that could cause the contents of the
database to change without being logged to the binary log,
it means that if the SQL is applied to a server, it could
potentially lead to that the databases are out of sync.
In order to handle that, this patch adds the statement "RELOAD
DATABASE" to the SQL output for the incident log event. This will
require a DBA to edit the file and handle the case as apropriate
before applying the output to a server.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index a10a36f3b43..cc144691fe1 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -9311,7 +9311,7 @@ Incident_log_event::print(FILE *file, Write_on_release_cache cache(&print_event_info->head_cache, file); print_header(&cache, print_event_info, FALSE); - my_b_printf(&cache, "\n# Incident: %s", description()); + my_b_printf(&cache, "\n# Incident: %s\nRELOAD DATABASE; # Shall generate syntax error\n", description()); } #endif |