summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <bell@laptop.sanja.is.com.ua>2003-08-19 20:14:35 +0300
committerunknown <bell@laptop.sanja.is.com.ua>2003-08-19 20:14:35 +0300
commit6d0a048701e07e69dea899fc1a6caa8f5d6b435d (patch)
tree095650183fd0ccdaa33b61c73f3a08954efac80b /sql/item_cmpfunc.h
parent3808546d8a67d62420f9111998d94e44050ac313 (diff)
parent513917a53f87ce43dea98838a7d4e6196b9ea82b (diff)
downloadmariadb-git-6d0a048701e07e69dea899fc1a6caa8f5d6b435d.tar.gz
merge
mysql-test/r/subselect.result: Auto merged mysql-test/t/subselect.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 44e1cf99511..5c06f4fa1df 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -290,6 +290,7 @@ public:
enum Item_result result_type () const { return cached_result_type; }
void fix_length_and_dec();
const char *func_name() const { return "ifnull"; }
+ table_map not_null_tables() const { return 0; }
};
@@ -311,6 +312,7 @@ public:
}
void fix_length_and_dec();
const char *func_name() const { return "if"; }
+ table_map not_null_tables() const { return 0; }
};
@@ -327,6 +329,7 @@ public:
enum Item_result result_type () const { return cached_result_type; }
void fix_length_and_dec();
const char *func_name() const { return "nullif"; }
+ table_map not_null_tables() const { return 0; }
};
@@ -343,8 +346,10 @@ public:
void fix_length_and_dec();
enum Item_result result_type () const { return cached_result_type; }
const char *func_name() const { return "coalesce"; }
+ table_map not_null_tables() const { return 0; }
};
+
class Item_func_case :public Item_func
{
int first_expr_num, else_expr_num;
@@ -375,6 +380,7 @@ public:
longlong val_int();
String *val_str(String *);
void fix_length_and_dec();
+ table_map not_null_tables() const { return 0; }
enum Item_result result_type () const { return cached_result_type; }
const char *func_name() const { return "case"; }
void print(String *str);
@@ -667,6 +673,7 @@ public:
}
}
}
+ table_map not_null_tables() const { return 0; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
};
@@ -699,8 +706,10 @@ public:
}
const char *func_name() const { return "isnotnull"; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; }
+ table_map not_null_tables() const { return 0; }
};
+
class Item_func_like :public Item_bool_func2
{
char escape;
@@ -773,6 +782,8 @@ class Item_cond :public Item_bool_func
protected:
List<Item> list;
bool abort_on_null;
+ table_map and_tables_cache;
+
public:
/* Item_cond() is only used to create top level items */
Item_cond() : Item_bool_func(), abort_on_null(1) { const_item_cache=0; }
@@ -813,15 +824,23 @@ public:
enum Functype functype() const { return COND_OR_FUNC; }
longlong val_int();
const char *func_name() const { return "or"; }
+ table_map not_null_tables() const { return and_tables_cache; }
};
+/*
+ XOR is Item_cond, not an Item_int_func bevause we could like to
+ optimize (a XOR b) later on. It's low prio, though
+*/
+
class Item_cond_xor :public Item_cond
{
public:
Item_cond_xor() :Item_cond() {}
Item_cond_xor(Item *i1,Item *i2) :Item_cond(i1,i2) {}
enum Functype functype() const { return COND_XOR_FUNC; }
+ /* TODO: remove the next line when implementing XOR optimization */
+ enum Type type() const { return FUNC_ITEM; }
longlong val_int();
const char *func_name() const { return "xor"; }
};