Commit c9f0792c authored by unknown's avatar unknown

Added 'const' to row_pack_length

(pre fts).
parent e5746665
......@@ -398,7 +398,7 @@ public:
DBUG_ENTER("Field::pack_length_from_metadata");
DBUG_RETURN(field_metadata);
}
virtual uint row_pack_length() { return 0; }
virtual uint row_pack_length() const { return 0; }
virtual int save_field_metadata(uchar *first_byte)
{ return do_save_field_metadata(first_byte); }
......@@ -1005,7 +1005,7 @@ public:
int store_decimal(const my_decimal *);
my_decimal *val_decimal(my_decimal *);
uint is_equal(Create_field *new_field);
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
uint32 pack_length_from_metadata(uint field_metadata) {
uint32 length= pack_length();
DBUG_PRINT("result", ("pack_length_from_metadata(%d): %u",
......@@ -1181,7 +1181,7 @@ public:
uint size_of() const { return sizeof(*this); }
uint32 pack_length() const { return (uint32) bin_size; }
uint pack_length_from_metadata(uint field_metadata);
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
bool compatible_field_size(uint field_metadata, Relay_log_info *rli,
uint16 mflags, int *order_var);
uint is_equal(Create_field *new_field);
......@@ -1430,7 +1430,7 @@ public:
int cmp(const uchar *,const uchar *);
void sort_string(uchar *buff,uint length);
uint32 pack_length() const { return sizeof(float); }
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
void sql_type(String &str) const;
private:
int do_save_field_metadata(uchar *first_byte);
......@@ -1470,7 +1470,7 @@ public:
int cmp(const uchar *,const uchar *);
void sort_string(uchar *buff,uint length);
uint32 pack_length() const { return sizeof(double); }
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
void sql_type(String &str) const;
private:
int do_save_field_metadata(uchar *first_byte);
......@@ -1724,7 +1724,7 @@ public:
{
return my_timestamp_binary_length(dec);
}
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
uint pack_length_from_metadata(uint field_metadata)
{
DBUG_ENTER("Field_timestampf::pack_length_from_metadata");
......@@ -1932,7 +1932,7 @@ public:
{
return my_time_binary_length(dec);
}
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
uint pack_length_from_metadata(uint field_metadata)
{
DBUG_ENTER("Field_timef::pack_length_from_metadata");
......@@ -2092,7 +2092,7 @@ public:
{
return my_datetime_binary_length(dec);
}
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
uint pack_length_from_metadata(uint field_metadata)
{
DBUG_ENTER("Field_datetimef::pack_length_from_metadata");
......@@ -2207,7 +2207,7 @@ public:
}
bool compatible_field_size(uint field_metadata, Relay_log_info *rli,
uint16 mflags, int *order_var);
uint row_pack_length() { return field_length; }
uint row_pack_length() const { return field_length; }
int pack_cmp(const uchar *a,const uchar *b,uint key_length,
bool insert_or_update);
int pack_cmp(const uchar *b,uint key_length,bool insert_or_update);
......@@ -2256,7 +2256,7 @@ public:
enum_field_types type() const { return MYSQL_TYPE_VARCHAR; }
enum ha_base_keytype key_type() const;
uint row_pack_length() { return field_length; }
uint row_pack_length() const { return field_length; }
bool zero_pack() const { return 0; }
int reset(void) { bzero(ptr,field_length+length_bytes); return 0; }
uint32 pack_length() const { return (uint32) field_length+length_bytes; }
......@@ -2386,7 +2386,7 @@ public:
*/
uint32 pack_length_no_ptr() const
{ return (uint32) (packlength); }
uint row_pack_length() { return pack_length_no_ptr(); }
uint row_pack_length() const { return pack_length_no_ptr(); }
uint32 sort_length() const;
uint32 value_length() { return get_length(); }
virtual uint32 max_data_length() const
......@@ -2551,7 +2551,7 @@ public:
enum_field_types real_type() const { return MYSQL_TYPE_ENUM; }
uint pack_length_from_metadata(uint field_metadata)
{ return (field_metadata & 0x00ff); }
uint row_pack_length() { return pack_length(); }
uint row_pack_length() const { return pack_length(); }
virtual bool zero_pack() const { return 0; }
bool optimize_range(uint idx, uint part) { return 0; }
bool eq_def(Field *field);
......@@ -2702,7 +2702,7 @@ public:
uint32 pack_length() const { return (uint32) (field_length + 7) / 8; }
uint32 pack_length_in_rec() const { return bytes_in_rec; }
uint pack_length_from_metadata(uint field_metadata);
uint row_pack_length()
uint row_pack_length() const
{ return (bytes_in_rec + ((bit_len > 0) ? 1 : 0)); }
bool compatible_field_size(uint metadata, Relay_log_info *rli,
uint16 mflags, int *order_var);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment