summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-02-18 21:43:19 +0100
committerSergei Golubchik <serg@mariadb.org>2016-03-21 11:43:19 +0100
commite69c6e81a89c4b284cc9c34af66403a1153cd492 (patch)
tree19f4a4677aa317049169f156f3125a389a48e668
parent96a7e74ed350063d47b2b625cbfbad1e65706da2 (diff)
downloadmariadb-git-e69c6e81a89c4b284cc9c34af66403a1153cd492.tar.gz
MDEV-9560 Mariadb 10.1 Crashes when replicating from 10.0
don't crash in debug builds. issue an error message on corrupt event
-rw-r--r--sql/log_event.cc7
-rw-r--r--sql/rpl_record.cc4
2 files changed, 7 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 30634c4e73b..93704e7c235 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -11394,7 +11394,10 @@ Rows_log_event::write_row(rpl_group_info *rgi,
/* unpack row into table->record[0] */
if ((error= unpack_current_row(rgi)))
+ {
+ table->file->print_error(error, MYF(0));
DBUG_RETURN(error);
+ }
if (m_curr_row == m_rows_buf && !invoke_triggers)
{
@@ -12453,8 +12456,8 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
We need to read the second image in the event of error to be
able to skip to the next pair of updates
*/
- m_curr_row= m_curr_row_end;
- unpack_current_row(rgi);
+ if ((m_curr_row= m_curr_row_end))
+ unpack_current_row(rgi);
return error;
}
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index f0308308fea..183248ad1b8 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -185,7 +185,7 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
@retval HA_ERR_GENERIC
A generic, internal, error caused the unpacking to fail.
- @retval ER_SLAVE_CORRUPT_EVENT
+ @retval HA_ERR_CORRUPT_EVENT
Found error when trying to unpack fields.
*/
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
@@ -322,7 +322,7 @@ unpack_row(rpl_group_info *rgi,
"Could not read field '%s' of table '%s.%s'",
f->field_name, table->s->db.str,
table->s->table_name.str);
- DBUG_RETURN(ER_SLAVE_CORRUPT_EVENT);
+ DBUG_RETURN(HA_ERR_CORRUPT_EVENT);
}
}