diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-29 15:15:51 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-29 15:15:51 +0200 |
commit | 6ffd555155360ad13ab9bf1f8b050f3d46edb17d (patch) | |
tree | e570d4c59b3a7727411fc9c0a6fe51a149353d6f /sql/item_timefunc.h | |
parent | c865e96362b75d1d59ac31c9a2fd34ee1ccdf058 (diff) | |
download | mariadb-git-6ffd555155360ad13ab9bf1f8b050f3d46edb17d.tar.gz |
Code that had to be changed so that CREATE ... SELECT ... always
creates proper column types, out of any function, expression or from
other tables.
mysql-test/r/create.result:
This is a result for the test which creates all proper column types
out of CREATE ... SELECT ...
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index fbf3b7f05e0..0c42adb2bd2 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -233,6 +233,11 @@ public: { init_make_field(tmp_field,FIELD_TYPE_DATE); } + Field *tmp_table_field(TABLE *t_arg) + { + if (!t_arg) return result_field; + return new Field_date(maybe_null, name, t_arg); + } }; @@ -246,6 +251,11 @@ public: { init_make_field(tmp_field,FIELD_TYPE_DATETIME); } + Field *tmp_table_field(TABLE *t_arg) + { + if (!t_arg) return result_field; + return new Field_datetime(maybe_null, name, t_arg); + } }; @@ -268,6 +278,11 @@ public: { init_make_field(tmp_field,FIELD_TYPE_TIME); } + Field *tmp_table_field(TABLE *t_arg) + { + if (!t_arg) return result_field; + return new Field_time(maybe_null, name, t_arg); + } }; @@ -355,6 +370,12 @@ public: { init_make_field(tmp_field,FIELD_TYPE_TIME); } + Field *tmp_table_field(TABLE *t_arg) + { + if (!t_arg) return result_field; + return new Field_time(maybe_null, name, t_arg); + } + }; enum interval_type { INTERVAL_YEAR, INTERVAL_MONTH, INTERVAL_DAY, |