@@ -244,7 +244,7 @@ enum ha_base_keytype {
244244#define HA_OPTION_CHECKSUM 32
245245#define HA_OPTION_DELAY_KEY_WRITE 64
246246#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
247- #define HA_OPTION_CREATE_FROM_ENGINE 256
247+ #define HA_OPTION_CREATE_FROM_ENGINE 256
248248#define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */
249249#define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */
250250
@@ -256,15 +256,48 @@ enum ha_base_keytype {
256256#define HA_CREATE_CHECKSUM 8
257257#define HA_CREATE_DELAY_KEY_WRITE 64
258258
259- /* Bits in flag to _status */
259+ /*
260+ The following flags (OR-ed) are passed to handler::info() method.
261+ The method copies misc handler information out of the storage engine
262+ to data structures accessible from MySQL
263+
264+ Same flags are also passed down to mi_status, myrg_status, etc.
265+ */
260266
261- #define HA_STATUS_POS 1 /* Return position */
262- #define HA_STATUS_NO_LOCK 2 /* Don't use external lock */
263- #define HA_STATUS_TIME 4 /* Return update time */
264- #define HA_STATUS_CONST 8 /* Return constants values */
265- #define HA_STATUS_VARIABLE 16
266- #define HA_STATUS_ERRKEY 32
267- #define HA_STATUS_AUTO 64
267+ /* this one is not used */
268+ #define HA_STATUS_POS 1
269+ /*
270+ assuming the table keeps shared actual copy of the 'info' and
271+ local, possibly outdated copy, the following flag means that
272+ it should not try to get the actual data (locking the shared structure)
273+ slightly outdated version will suffice
274+ */
275+ #define HA_STATUS_NO_LOCK 2
276+ /* update the time of the last modification (in handler::update_time) */
277+ #define HA_STATUS_TIME 4
278+ /*
279+ update the 'constant' part of the info:
280+ handler::max_data_file_length, max_index_file_length, create_time
281+ sortkey, ref_length, block_size, data_file_name, index_file_name.
282+ handler::table->s->keys_in_use, keys_for_keyread, rec_per_key
283+ */
284+ #define HA_STATUS_CONST 8
285+ /*
286+ update the 'variable' part of the info:
287+ handler::records, deleted, data_file_length, index_file_length,
288+ delete_length, check_time, mean_rec_length
289+ */
290+ #define HA_STATUS_VARIABLE 16
291+ /*
292+ get the information about the key that caused last duplicate value error
293+ update handler::errkey and handler::dupp_ref
294+ see handler::get_dup_key()
295+ */
296+ #define HA_STATUS_ERRKEY 32
297+ /*
298+ update handler::auto_increment_value
299+ */
300+ #define HA_STATUS_AUTO 64
268301
269302 /* Errorcodes given by functions */
270303
0 commit comments