diff options
author | unknown <cbell/Chuck@mysql_cab_desk.> | 2007-08-10 14:58:46 -0400 |
---|---|---|
committer | unknown <cbell/Chuck@mysql_cab_desk.> | 2007-08-10 14:58:46 -0400 |
commit | 7a9b90ce098633850bfb078e1b336a2b84add1e0 (patch) | |
tree | 90a22c1ae228bd8d695437e90dfb8d2469f53fc3 /sql/rpl_utility.cc | |
parent | 78a52138c7aaee9ec67c1041d9b7ecd2e45fc79a (diff) | |
parent | 9ad300d50d531d930c649002ee34123b452ec526 (diff) | |
download | mariadb-git-7a9b90ce098633850bfb078e1b336a2b84add1e0.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
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/rpl_utility.cc:
Auto merged
sql/rpl_utility.h:
Auto merged
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r-- | sql/rpl_utility.cc | 19 |
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; |