@@ -867,17 +867,17 @@ class ha_statistics
867867 {}
868868};
869869
870- uint calculate_key_len (TABLE *, uint, const byte *, ulonglong );
870+ uint calculate_key_len (TABLE *, uint, const byte *, key_part_map );
871871/*
872872 bitmap with first N+1 bits set
873873 (keypart_map for a key prefix of [0..N] keyparts)
874874*/
875- #define make_keypart_map (N ) (((ulonglong )2 << (N)) - 1 )
875+ #define make_keypart_map (N ) (((key_part_map )2 << (N)) - 1 )
876876/*
877877 bitmap with first N bits set
878878 (keypart_map for a key prefix of [0..N-1] keyparts)
879879*/
880- #define make_prev_keypart_map (N ) (((ulonglong )1 << (N)) - 1 )
880+ #define make_prev_keypart_map (N ) (((key_part_map )1 << (N)) - 1 )
881881
882882/*
883883 The handler class is the interface for dynamically loadable
@@ -1219,14 +1219,26 @@ class handler :public Sql_alloc
12191219 enum ha_rkey_function find_flag)
12201220 { return HA_ERR_WRONG_COMMAND; }
12211221 public:
1222- virtual int index_read (byte * buf, const byte * key, ulonglong keypart_map,
1222+ /* *
1223+ @brief
1224+ Positions an index cursor to the index specified in the handle. Fetches the
1225+ row if available. If the key value is null, begin at the first key of the
1226+ index.
1227+ */
1228+ virtual int index_read (byte * buf, const byte * key, key_part_map keypart_map,
12231229 enum ha_rkey_function find_flag)
12241230 {
12251231 uint key_len= calculate_key_len (table, active_index, key, keypart_map);
12261232 return index_read (buf, key, key_len, find_flag);
12271233 }
1234+ /* *
1235+ @brief
1236+ Positions an index cursor to the index specified in the handle. Fetches the
1237+ row if available. If the key value is null, begin at the first key of the
1238+ index.
1239+ */
12281240 virtual int index_read_idx (byte * buf, uint index, const byte * key,
1229- ulonglong keypart_map,
1241+ key_part_map keypart_map,
12301242 enum ha_rkey_function find_flag);
12311243 virtual int index_next (byte * buf)
12321244 { return HA_ERR_WRONG_COMMAND; }
@@ -1241,8 +1253,13 @@ class handler :public Sql_alloc
12411253 virtual int index_read_last (byte * buf, const byte * key, uint key_len)
12421254 { return (my_errno=HA_ERR_WRONG_COMMAND); }
12431255 public:
1256+ /* *
1257+ @brief
1258+ The following functions works like index_read, but it find the last
1259+ row with the current key value or prefix.
1260+ */
12441261 virtual int index_read_last (byte * buf, const byte * key,
1245- ulonglong keypart_map)
1262+ key_part_map keypart_map)
12461263 {
12471264 uint key_len= calculate_key_len (table, active_index, key, keypart_map);
12481265 return index_read_last (buf, key, key_len);
0 commit comments