Commit 4f2a57c5 authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

Move all sql_type() to the same file

parent 24b44419
...@@ -317,6 +317,16 @@ bool Field::optimize_range(uint idx) ...@@ -317,6 +317,16 @@ bool Field::optimize_range(uint idx)
return test(table->file->index_flags(idx) & HA_READ_NEXT); return test(table->file->index_flags(idx) & HA_READ_NEXT);
} }
/****************************************************************************
Functions for the Field_null
****************************************************************************/
void Field_null::sql_type(String &res) const
{
res.set("null",4,system_charset_info);
}
/**************************************************************************** /****************************************************************************
Functions for the Field_decimal class Functions for the Field_decimal class
This is an number stored as a pre-space (or pre-zero) string This is an number stored as a pre-space (or pre-zero) string
......
...@@ -556,7 +556,7 @@ class Field_null :public Field_str { ...@@ -556,7 +556,7 @@ class Field_null :public Field_str {
int cmp(const char *a, const char *b) { return 0;} int cmp(const char *a, const char *b) { return 0;}
void sort_string(char *buff, uint length) {} void sort_string(char *buff, uint length) {}
uint32 pack_length() const { return 0; } uint32 pack_length() const { return 0; }
void sql_type(String &str) const { str.set("null",4,my_thd_charset); } void sql_type(String &str) const;
uint size_of() const { return sizeof(*this); } uint size_of() const { return sizeof(*this); }
}; };
......
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