← Back to team overview

maria-developers team mailing list archive

request for feedback on live schema changes patch

 

Hello all,

In another thread, there was a discussion about what it would take to
allow the storage engine to support live schema changes in mysql and
mariadb. I said that I was working porting this existing feature from
MySQL Cluster to MySQL 5.1.46. I would like to show the work I have
done so far and solicit feedback.

Attached is the diff based off of 5.1.46.

Before looking at the patch, please be aware of the following things:
 - I am not an expert in this code. As a result, I had to use an
approach of that minimizes the risk of introducing regressions. \
 - My main interest is to get something safe that works and can be
integrated in 5.1. As a result, kept the current mysql_alter_table
functionality in place (as old_mysql_alter_table), and added MySQL
Cluster's as new_mysql_alter_table. For an engine to get
new_mysql_alter_table to be used, the engine must expose an alter
table flag HA_GENERAL_ONLINE.
 - Another reason why I kept old_mysql_alter_table was that I did not
want to deal with engines that implement handler::add_index and make
sure that they work properly under the new API. Also, I did not want
to port alter table changes related to partitioned tables.
 - I have run the current 5,1 mysql test suite (that is in the
mysql-test directory of source tarballs), and verified that using
old_mysql_alter_table and new_mysql_alter_table works fine with them.

That being said, I would love to hear feedback on this patch, and
would also like to understand what (if anything) can be done to get
this into MariaDB 5.1. I realize that may not be possible, but if it
is, I would like to try.

Thanks
-Zardosht

Attachment: general_online_alter.diff
Description: Binary data


Follow ups