diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 18:42:49 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 18:42:49 +0100 |
commit | 8161c6772d144d6a4f08fc924ff6e6e403d1371d (patch) | |
tree | 3f1fe5f8048a163da4eadf0f86c1fd2a3007955d /sql/rpl_utility.cc | |
parent | 154aac8eb002f5d167153e09f1d13570989521e0 (diff) | |
parent | 31c06437c970d4d0f4ec0301acac9c56e0ed29b5 (diff) | |
download | mariadb-git-8161c6772d144d6a4f08fc924ff6e6e403d1371d.tar.gz |
merge with mysql-5.5.30 minus few incorrect or not applicable changesets
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r-- | sql/rpl_utility.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 069fac1c3ec..c83e52fe26b 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -878,8 +878,13 @@ TABLE *table_def::create_conversion_table(THD *thd, Relay_log_info *rli, TABLE * DBUG_ENTER("table_def::create_conversion_table"); List<Create_field> field_list; - - for (uint col= 0 ; col < size() ; ++col) + /* + At slave, columns may differ. So we should create + min(columns@master, columns@slave) columns in the + conversion table. + */ + uint const cols_to_create= min(target_table->s->fields, size()); + for (uint col= 0 ; col < cols_to_create; ++col) { Create_field *field_def= (Create_field*) alloc_root(thd->mem_root, sizeof(Create_field)); |