From: Jon Olav Hauglid Date: January 17 2011 3:43pm Subject: Renaming of handler flags for index creation/deletion List-Archive: http://lists.mysql.com/internals/38234 Message-Id: <4D346390.8040302@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, In the scope of the fix for Bug#42230 "during add index, cannot do queries on storage engines that implement add_index" we are renaming some of the flags defined in handler.h to better reflect their current behavior. This change will affect MySQL version 5.5+ (not 5.1). The purpose of this e-mail is to explain the changes to any external storage engine developers that might be affected, and also ask if anyone wants us to keep backward compatible defines. In the patch, we're changing some of the terminology used in the server code related to ALTER TABLE - namely "online" and "fast". According to comments in handler.h, "online" means "without a table lock" However, the 5.5 ALTER TABLE implementation currently always blocks writes and requires exclusive table access for the final step(s). The term "online" therefore seems misleading. "fast ALTER TABLE" is described as "off-line without re-create of the table (but with a table lock)". In other words, not using a temporary table. Our objection here is that "fast" isn't very descriptive. Another problem is that "fast" and "online" seem to be used somewhat interchangeably throughout the code. We have replaced "fast alter table" by "in-place alter table" to indicate alter table done without a temporary table. The term was inspired by http://en.wikipedia.org/wiki/In-place_algorithm Generally, "online" was also replaced by "in-place". The only practical difference between "online" and "fast" was that "online" allowed for concurrent reads and this was seldom relevant in the context "online" was used. This has consequences for flags defined in handler.h. These flags are: HA_ONLINE_ADD_INDEX_NO_WRITES HA_ONLINE_DROP_INDEX_NO_WRITES HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES HA_ONLINE_ADD_PK_INDEX_NO_WRITES HA_ONLINE_DROP_PK_INDEX_NO_WRITES and HA_ONLINE_ADD_INDEX HA_ONLINE_DROP_INDEX HA_ONLINE_ADD_UNIQUE_INDEX HA_ONLINE_DROP_UNIQUE_INDEX HA_ONLINE_ADD_PK_INDEX HA_ONLINE_DROP_PK_INDEX The first group of flags indicated that a storage engine was capable of "fast" but not "online" add/drop of indexes. These have been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE (etc.) The second group of flags were used for "fast" and "online" add/drop of indexes. These have been renamed to HA_INPLACE_ADD_INDEX_NO_WRITE (etc.) No changes have been made to the meaning of the flags. --- Jon Olav Hauglid