summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-11-23 18:55:01 +0400
committerAlexander Barkov <bar@mariadb.org>2015-11-23 18:55:01 +0400
commitd73cf394a5361b33baf40afd2a8c1d4edac548c0 (patch)
tree320158af832dc8e74320ff308c3c51eb5549cbfa /sql/item_func.h
parentb7e9bf91221663ca70f87d59846ecad848b5c786 (diff)
downloadmariadb-git-d73cf394a5361b33baf40afd2a8c1d4edac548c0.tar.gz
MDEV-9170 Get rid of LEX::length and LEX::dec
A preparatory task for: MDEV-4912 Add a plugin to field types (column types)
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 6230550067b..9cf42fd5a78 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -2039,6 +2039,33 @@ enum Cast_target
};
+struct Lex_cast_type_st: public Lex_length_and_dec_st
+{
+private:
+ Cast_target m_type;
+public:
+ void set(Cast_target type, const char *length, const char *dec)
+ {
+ m_type= type;
+ Lex_length_and_dec_st::set(length, dec);
+ }
+ void set(Cast_target type, Lex_length_and_dec_st length_and_dec)
+ {
+ m_type= type;
+ Lex_length_and_dec_st::operator=(length_and_dec);
+ }
+ void set(Cast_target type, const char *length)
+ {
+ set(type, length, 0);
+ }
+ void set(Cast_target type)
+ {
+ set(type, 0, 0);
+ }
+ Cast_target type() const { return m_type; }
+};
+
+
class Item_func_row_count :public Item_int_func
{
public: