diff options
author | unknown <pem@mysql.com> | 2003-12-19 18:03:27 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-12-19 18:03:27 +0100 |
commit | 93804d3a8e42b454dafaf4dc9f2ca836b730cec1 (patch) | |
tree | 00894c28662192eed25fdacc555298265a2880ac /sql/item_func.h | |
parent | d7c781a91f632506be0486f02dac29834ae5722f (diff) | |
parent | 483b978707aac6920b7654c7ddd5421b2d550c82 (diff) | |
download | mariadb-git-93804d3a8e42b454dafaf4dc9f2ca836b730cec1.tar.gz |
Merge 4.1 to 5.0.
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
configure.in:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/r/insert.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/symlink.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/insert.test:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/records.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_rename.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index d3cfaf63b5a..c2aa62ec2d7 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -660,25 +660,31 @@ public: void fix_length_and_dec(); }; +/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */ -class Item_func_bit_or :public Item_int_func +class Item_func_bit: public Item_int_func { public: - Item_func_bit_or(Item *a,Item *b) :Item_int_func(a,b) {} + Item_func_bit(Item *a, Item *b) :Item_int_func(a, b) {} + Item_func_bit(Item *a) :Item_int_func(a) {} + void fix_length_and_dec() { unsigned_flag= 1; } + void print(String *str) { print_op(str); } +}; + +class Item_func_bit_or :public Item_func_bit +{ +public: + Item_func_bit_or(Item *a, Item *b) :Item_func_bit(a, b) {} longlong val_int(); const char *func_name() const { return "|"; } - void fix_length_and_dec() { unsigned_flag=1; } - void print(String *str) { print_op(str); } }; -class Item_func_bit_and :public Item_int_func +class Item_func_bit_and :public Item_func_bit { public: - Item_func_bit_and(Item *a,Item *b) :Item_int_func(a,b) {} + Item_func_bit_and(Item *a, Item *b) :Item_func_bit(a, b) {} longlong val_int(); const char *func_name() const { return "&"; } - void fix_length_and_dec() { unsigned_flag=1; } - void print(String *str) { print_op(str); } }; class Item_func_bit_count :public Item_int_func @@ -690,34 +696,32 @@ public: void fix_length_and_dec() { max_length=2; } }; -class Item_func_shift_left :public Item_int_func +class Item_func_shift_left :public Item_func_bit { public: - Item_func_shift_left(Item *a,Item *b) :Item_int_func(a,b) {} + Item_func_shift_left(Item *a, Item *b) :Item_func_bit(a, b) {} longlong val_int(); const char *func_name() const { return "<<"; } - void fix_length_and_dec() { unsigned_flag=1; } - void print(String *str) { print_op(str); } }; -class Item_func_shift_right :public Item_int_func +class Item_func_shift_right :public Item_func_bit { public: - Item_func_shift_right(Item *a,Item *b) :Item_int_func(a,b) {} + Item_func_shift_right(Item *a, Item *b) :Item_func_bit(a, b) {} longlong val_int(); const char *func_name() const { return ">>"; } - void print(String *str) { print_op(str); } }; -class Item_func_bit_neg :public Item_int_func +class Item_func_bit_neg :public Item_func_bit { public: - Item_func_bit_neg(Item *a) :Item_int_func(a) {} + Item_func_bit_neg(Item *a) :Item_func_bit(a) {} longlong val_int(); const char *func_name() const { return "~"; } - void fix_length_and_dec() { unsigned_flag=1; } + void print(String *str) { Item_func::print(str); } }; + class Item_func_set_last_insert_id :public Item_int_func { public: @@ -1024,14 +1028,12 @@ public: }; -class Item_func_bit_xor : public Item_int_func +class Item_func_bit_xor : public Item_func_bit { public: - Item_func_bit_xor(Item *a,Item *b) :Item_int_func(a,b) {} + Item_func_bit_xor(Item *a, Item *b) :Item_func_bit(a, b) {} longlong val_int(); const char *func_name() const { return "^"; } - void fix_length_xor_dec() { unsigned_flag=1; } - void print(String *str) { print_op(str); } }; class Item_func_is_free_lock :public Item_int_func |