From 4f2a57c51112c73aefec13e3db5c7f9cf93f92e0 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Tue, 17 Dec 2002 11:25:27 +0400 Subject: [PATCH] Move all sql_type() to the same file --- sql/field.cc | 10 ++++++++++ sql/field.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sql/field.cc b/sql/field.cc index e3db572eb57..565df659245 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -317,6 +317,16 @@ bool Field::optimize_range(uint idx) 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 This is an number stored as a pre-space (or pre-zero) string diff --git a/sql/field.h b/sql/field.h index 4c0af6e807b..826b0a36fcf 100644 --- a/sql/field.h +++ b/sql/field.h @@ -556,7 +556,7 @@ public: int cmp(const char *a, const char *b) { return 0;} void sort_string(char *buff, uint length) {} 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); } };