summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-03-19 15:55:17 +0400
committerunknown <bar@bar.mysql.r18.ru>2003-03-19 15:55:17 +0400
commit80630f12f3dbcf269fe81c7f39649b5ce9426363 (patch)
tree338f860265867b319aebb74e4690f2a456221e72 /sql/item.h
parent926a11940e45c4f0929eeafcfb4b5348dd468e86 (diff)
downloadmariadb-git-80630f12f3dbcf269fe81c7f39649b5ce9426363.tar.gz
Getting closer to be more SQL99 in dyadic operations
mysql-test/r/ctype_collate.result: NO COLLATION has less coercibility than IMPLICIT and COERCIBLE sql/item.cc: Function to choose collation for dyadic operations sql/item.h: NO COLLATION has less coercibility than IMPLICIT and COERCIBLE sql/item_func.cc: Function to choose collation for dyadic operations sql/item_strfunc.cc: Function to choose collation for dyadic operations sql/item_strfunc.h: Use arg's attributes
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h
index 2bb22d47083..d9698e09ade 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -39,8 +39,8 @@ public:
SUBSELECT_ITEM, ROW_ITEM, CACHE_ITEM};
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE };
- enum coercion { COER_NOCOLL=3, COER_COERCIBLE=2,
- COER_IMPLICIT=1, COER_EXPLICIT=0 };
+ enum coercion { COER_COERCIBLE=3, COER_IMPLICIT=2,
+ COER_NOCOLL=1, COER_EXPLICIT=0 };
String str_value; /* used to store value */
my_string name; /* Name from select */
@@ -113,6 +113,13 @@ public:
CHARSET_INFO *default_charset() const;
CHARSET_INFO *charset() const { return str_value.charset(); };
void set_charset(CHARSET_INFO *cs) { str_value.set_charset(cs); }
+ void set_charset(CHARSET_INFO *cs, enum coercion coer)
+ {
+ str_value.set_charset(cs);
+ coercibility= coer;
+ }
+ bool set_charset(CHARSET_INFO *cs1, enum coercion co1,
+ CHARSET_INFO *cs2, enum coercion co2);
virtual void set_outer_resolving() {}
// Row emulation