summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.cc
diff options
context:
space:
mode:
authorcbell/Chuck@mysql_cab_desk. <>2007-08-10 14:58:46 -0400
committercbell/Chuck@mysql_cab_desk. <>2007-08-10 14:58:46 -0400
commit08282643abbe14605ee0665b093d7eb8a309087b (patch)
tree90a22c1ae228bd8d695437e90dfb8d2469f53fc3 /sql/rpl_utility.cc
parent92d4958eb7b60e9767e398d5f762e4fd98cd0b04 (diff)
parente8ea4b84c0fd98d0ed312f10cc07fef145ff9c38 (diff)
downloadmariadb-git-08282643abbe14605ee0665b093d7eb8a309087b.tar.gz
Merge mysql_cab_desk.:C:/source/c++/mysql-5.1-new-rpl
into mysql_cab_desk.:C:/source/c++/mysql-5.1_BUG_22086
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r--sql/rpl_utility.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 85ed6089f56..25daf1471ce 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -191,6 +191,25 @@ table_def::compatible_with(RELAY_LOG_INFO const *rli_arg, TABLE *table)
rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);
}
+ /*
+ Check the slave's field size against that of the master.
+ */
+ if (!error &&
+ !table->field[col]->compatible_field_size(field_metadata(col)))
+ {
+ error= 1;
+ char buf[256];
+ my_snprintf(buf, sizeof(buf), "Column %d size mismatch - "
+ "master has size %d, %s.%s on slave has size %d."
+ " Master's column size should be <= the slave's "
+ "column size.", col,
+ table->field[col]->pack_length_from_metadata(
+ m_field_metadata[col]),
+ tsh->db.str, tsh->table_name.str,
+ table->field[col]->row_pack_length());
+ rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
+ ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);
+ }
}
return error;