diff options
author | unknown <pem@mysql.com> | 2003-03-27 12:09:11 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-03-27 12:09:11 +0100 |
commit | 8db55dcf86d87bece091520826f4142b96e9a283 (patch) | |
tree | 3dbe93fb3b28f4aa6b8445c9b4aaa8c2ee776e02 /sql/item.h | |
parent | 34559e803839a8f34f63e6a992d7e93fcb040a1f (diff) | |
parent | 2c9ef84cc35198c1ae888a335c2e228ecfb6b81d (diff) | |
download | mariadb-git-8db55dcf86d87bece091520826f4142b96e9a283.tar.gz |
Merged 4.1 into 5.0.
BitKeeper/etc/gone:
auto-union
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
sql/lex.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index 1b5fafc180f..8009439b708 100644 --- a/sql/item.h +++ b/sql/item.h @@ -123,6 +123,8 @@ public: bool set_charset(CHARSET_INFO *cs1, enum coercion co1, CHARSET_INFO *cs2, enum coercion co2); virtual void set_outer_resolving() {} + virtual Item *this_item() { return this; } /* For SPs mostly. */ + virtual Item *this_const_item() const { return const_cast<Item*>(this); } /* For SPs mostly. */ // Row emulation virtual uint cols() { return 1; } @@ -136,6 +138,57 @@ public: }; +// A local SP variable (incl. parameters), used in runtime +class Item_splocal : public Item +{ +private: + + uint m_offset; + +public: + + Item_splocal(uint offset) + : m_offset(offset) + {} + + Item *this_item(); + Item *this_const_item() const; + + inline uint get_offset() + { + return m_offset; + } + + // Abstract methods inherited from Item. Just defer the call to + // the item in the frame + inline enum Type type() const + { + return this_const_item()->type(); + } + + inline double val() + { + return this_item()->val(); + } + + inline longlong val_int() + { + return this_item()->val_int(); + } + + inline String *val_str(String *sp) + { + return this_item()->val_str(sp); + } + + inline void make_field(Send_field *field) + { + this_item()->make_field(field); + } + +}; + + class st_select_lex; class Item_ident :public Item { |