diff options
author | Sven Sandberg <sven@mysql.com> | 2008-12-29 17:04:10 +0100 |
---|---|---|
committer | Sven Sandberg <sven@mysql.com> | 2008-12-29 17:04:10 +0100 |
commit | ba835f89ba4a07344322765c27c424a2ea96f6ee (patch) | |
tree | 140102f9249f7ff4d6beb0772df2511a8ec0abc8 /sql/rpl_constants.h | |
parent | 47c0ec508467b4941e6e388e33dc688b7247befb (diff) | |
download | mariadb-git-ba835f89ba4a07344322765c27c424a2ea96f6ee.tar.gz |
BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
Problem: When an Incident_log_event contains a bad incident number on disk,
the server crashes with an assertion.
Fix: Don't validate input with assertions. Use errors.
mysql-test/include/cleanup_fake_relay_log.inc:
Added auxiliary file to restore things that setup_fake_relay_log.inc did.
mysql-test/include/setup_fake_relay_log.inc:
Added auxiliary file to setup replication from an existing relay log.
mysql-test/std_data/bug40482-bin.000001:
Binlog file for rpl.rpl_binlog_corruption
mysql-test/suite/rpl/t/rpl_binlog_corruption.test:
New test file.
sql/log_event.cc:
Check that the incident number is correct at the time the event is constructed.
Do not assert it at the time it is printed.
sql/log_event.h:
Incident_log_event::is_valid() should verify that the incident number is valid.
sql/rpl_constants.h:
Incident numbers should be hard-coded, since they may appear in files.
Diffstat (limited to 'sql/rpl_constants.h')
-rw-r--r-- | sql/rpl_constants.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/rpl_constants.h b/sql/rpl_constants.h index 426e80a328d..32fb4b8a7f2 100644 --- a/sql/rpl_constants.h +++ b/sql/rpl_constants.h @@ -6,10 +6,10 @@ */ enum Incident { /** No incident */ - INCIDENT_NONE, + INCIDENT_NONE = 0, /** There are possibly lost events in the replication stream */ - INCIDENT_LOST_EVENTS, + INCIDENT_LOST_EVENTS = 1, /** Shall be last event of the enumeration */ INCIDENT_COUNT |