summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <mats@mysql.com>2006-03-23 20:13:44 +0100
committerunknown <mats@mysql.com>2006-03-23 20:13:44 +0100
commite40dbfa847a3263920debde1ca650063a4c0d002 (patch)
tree394119fc189a6edac8fcaf85b50586403dc36e7e /sql/handler.cc
parentdfa9a7641104686b588af016aa58cf46a9db093f (diff)
downloadmariadb-git-e40dbfa847a3263920debde1ca650063a4c0d002.tar.gz
Bug#18436 (RBR: Replication to partition engine triggers assertion on slave side):
Partial fix for resolving the problem. Swapping contents of record[0] and record[1] since this is what some storage engines expect. sql/handler.cc: Adding assertion to get early failure. sql/log_event.cc: Correcting code so that new record is passed in record[0] and old record is passed in record[1] when calling update_row(). mysql-test/r/rpl_row_basic_8partition.result: New BitKeeper file ``mysql-test/r/rpl_row_basic_8partition.result'' mysql-test/t/rpl_row_basic_8partition.test: New BitKeeper file ``mysql-test/t/rpl_row_basic_8partition.test''
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 7b232f343c0..7283bbc845d 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3296,6 +3296,13 @@ int handler::ha_write_row(byte *buf)
int handler::ha_update_row(const byte *old_data, byte *new_data)
{
int error;
+
+ /*
+ Some storage engines require that the new record is in record[0]
+ (and the old record is in record[1]).
+ */
+ DBUG_ASSERT(new_data == table->record[0]);
+
if (unlikely(error= update_row(old_data, new_data)))
return error;
#ifdef HAVE_ROW_BASED_REPLICATION