Hi Daniel, On 04/18/2015 08:30 AM, Daniel Black wrote:
----- Original Message -----
Hi Bar,
Can you please merge the following patch 10.0 -> 10.1?
commit bc902a2bfc46add0708896c07621e3707f66d95f Author: Alexander Barkov <bar@mariadb.org> Date: Fri Mar 13 16:12:54 2015 +0400
MDEV-7387 [PATCH] Alter table xxx CHARACTER SET utf8, CONVERT TO CHARACTER SET latin1 should fail
Eg. run `git merge bc902a2bfc46add0708896c07621e3707f66d95f` in a 10.1 tree.
Single merge:
Thanks for your help! We appreciate your contributions very much. The idea of your merge patch is absolutely correct: to have "default_table_charset" and "used_fields" in the same structure. However, I think I'll resolve this merge conflict in a slightly different way. Instead of moving "used_fields" into Schema_specification_st, I'll just put move the new methods into HA_CREATE_INFO. Let me explain why: In 10.1 we split HA_CREATE_INFO into two parts: - Schema_specification_st - Table_scope_and_contents_source_st The reasons to do this were: - To avoid passing unnecessary information into functions and methods - To save on the involved structures initialization - To remove some duplicate code mysql_create_db() and mysql_alter_db() need only the Schema_specification_st part, while the entire HA_CREATE_INFO was passed in 10.0 and earlier into these functions. Before being passed to the above functions, HA_CREATE_INFO was initialized with bzero(). sizeof(HA_CREATE_INFO) is 304 bytes, while sizeof(Schema_specification_st) is only 8 bytes at the moment. So most of initialization was not really necessary. I don't want to move "used_fields" from Table_scope_and_contents_source_st to Schema_specification_st for exactly the same reason: because mysql_create_db() and mysql_alter_db() don't need it. So let's keep "used_fields" in Table_scope_and_contents_source_st, and just move the new methods to the HA_CREATE_INFO level, which has access to both "used_fields" and "default_table_charset". I'll push a patch in a few minutes hopefully. Running tests at the moment.