List:Internals« Previous MessageNext Message »
From:Jon Olav Hauglid Date:January 17 2011 3:43pm
Subject:Renaming of handler flags for index creation/deletion
View as plain text  

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

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:

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 

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
Renaming of handler flags for index creation/deletionJon Olav Hauglid17 Jan
  • Re: Renaming of handler flags for index creation/deletionZardosht Kasheff17 Jan
    • Re: Renaming of handler flags for index creation/deletionJon Olav Hauglid18 Jan
      • Re: Renaming of handler flags for index creation/deletionZardosht Kasheff18 Jan