diff options
author | unknown <guilhem@mysql.com> | 2003-03-02 00:34:44 +0100 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-03-02 00:34:44 +0100 |
commit | f29fb98d34c06c35e7c5ba3aaa74ff4aac738dcf (patch) | |
tree | 6e83e6029d099d05c06932384d2bc817fd0b3460 | |
parent | 4c0f2f45913ad0a60211785792afc45037cfd608 (diff) | |
download | mariadb-git-f29fb98d34c06c35e7c5ba3aaa74ff4aac738dcf.tar.gz |
When the SQL thread cannot read an event from the relay log
("Event too big" etc), stop this thread instead of going on
with the next event, which would certainly lead to slave's data
corruption.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | sql/log_event.cc | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 70aaa8d2a52..fcc23ea7073 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -16,6 +16,7 @@ bk@admin.bk davida@isil.mysql.com gluh@gluh.(none) greg@mysql.com +guilhem@mysql.com gweir@work.mysql.com heikki@donna.mysql.fi heikki@hundin.mysql.fi diff --git a/sql/log_event.cc b/sql/log_event.cc index 3c5a2eae38c..78470a2b198 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -588,6 +588,15 @@ err: sql_print_error("Error in Log_event::read_log_event(): '%s', \ data_len=%d,event_type=%d",error,data_len,head[EVENT_TYPE_OFFSET]); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); + /* + The SQL slave thread will check if file->error<0 to know + if there was an I/O error. Even if there is no "low-level" I/O errors + with 'file', any of the high-level above errors is worrying + enough to stop the SQL thread now ; as we are skipping the current event, + going on with reading and successfully executing other events can + only corrupt the slave's databases. So stop. + */ + file->error= -1; } return res; } |