diff options
author | unknown <monty@mysql.com> | 2004-11-09 04:06:44 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-09 04:06:44 +0200 |
commit | e0bf844c8ac4cd1efc9547637baac5201775a1c7 (patch) | |
tree | a936b651bfe5aa74bd01c17224531d16117c29d9 /sql/item.h | |
parent | 20c82f5c014e9902f234f925a218895f3b91b154 (diff) | |
parent | db67626196992923be83c12302d03cad35cf80f9 (diff) | |
download | mariadb-git-e0bf844c8ac4cd1efc9547637baac5201775a1c7.tar.gz |
merge on pull
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-Makefile.am:
Delete: Docs/Images/Makefile.am
configure.in:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/table.cc:
Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/sql/item.h b/sql/item.h index eed0b065a83..93c396b95b0 100644 --- a/sql/item.h +++ b/sql/item.h @@ -38,6 +38,25 @@ enum Derivation DERIVATION_EXPLICIT= 0 }; +/* + Flags for collation aggregation modes: + MY_COLL_ALLOW_SUPERSET_CONV - allow conversion to a superset + MY_COLL_ALLOW_COERCIBLE_CONV - allow conversion of a coercible value + (i.e. constant). + MY_COLL_ALLOW_CONV - allow any kind of conversion + (combintion of the above two) + MY_COLL_DISALLOW_NONE - don't allow return DERIVATION_NONE + (e.g. when aggregating for comparison) + MY_COLL_CMP_CONV - combination of MY_COLL_ALLOW_CONV + and MY_COLL_DISALLOW_NONE +*/ + +#define MY_COLL_ALLOW_SUPERSET_CONV 1 +#define MY_COLL_ALLOW_COERCIBLE_CONV 2 +#define MY_COLL_ALLOW_CONV 3 +#define MY_COLL_DISALLOW_NONE 4 +#define MY_COLL_CMP_CONV 7 + class DTCollation { public: CHARSET_INFO *collation; @@ -73,9 +92,9 @@ public: { collation= collation_arg; } void set(Derivation derivation_arg) { derivation= derivation_arg; } - bool aggregate(DTCollation &dt, bool superset_conversion= FALSE); - bool set(DTCollation &dt1, DTCollation &dt2, bool superset_conversion= FALSE) - { set(dt1); return aggregate(dt2, superset_conversion); } + bool aggregate(DTCollation &dt, uint flags= 0); + bool set(DTCollation &dt1, DTCollation &dt2, uint flags= 0) + { set(dt1); return aggregate(dt2, flags); } const char *derivation_name() const { switch(derivation) @@ -306,6 +325,7 @@ public: virtual Item_field *filed_for_view_update() { return 0; } virtual Item *neg_transformer(THD *thd) { return NULL; } + virtual Item *safe_charset_converter(CHARSET_INFO *tocs); void delete_self() { cleanup(); @@ -542,6 +562,7 @@ public: bool replace_equal_field_processor(byte *arg); inline uint32 max_disp_length() { return field->max_length(); } Item_field *filed_for_view_update() { return this; } + Item *safe_charset_converter(CHARSET_INFO *tocs); friend class Item_default_value; friend class Item_insert_value; friend class st_select_lex_unit; @@ -573,6 +594,7 @@ public: Item *new_item() { return new Item_null(name); } bool is_null() { return 1; } void print(String *str) { str->append("NULL", 4); } + Item *safe_charset_converter(CHARSET_INFO *tocs); }; @@ -862,6 +884,7 @@ public: return new Item_string(name, str_value.ptr(), str_value.length(), &my_charset_bin); } + Item *safe_charset_converter(CHARSET_INFO *tocs); String *const_string() { return &str_value; } inline void append(char *str, uint length) { str_value.append(str, length); } void print(String *str); |