From 84f0e1172981750a85bae8090548784f0aefa1e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2003 21:56:34 +0400 Subject: mysql-test/t/ctype_many.test: Automatic client-server charset recoding has been added mysys/charset.c: Automatic client-server charset recoding has been added sql/item.cc: Automatic client-server charset recoding has been added sql/item.h: Automatic client-server charset recoding has been added sql/item_cmpfunc.cc: Automatic client-server charset recoding has been added sql/item_func.cc: Automatic client-server charset recoding has been added sql/item_strfunc.cc: Automatic client-server charset recoding has been added sql/mysqld.cc: Automatic client-server charset recoding has been added sql/protocol.cc: Automatic client-server charset recoding has been added sql/sql_string.cc: Automatic client-server charset recoding has been added sql/sql_yacc.yy: Automatic client-server charset recoding has been added strings/ctype-utf8.c: Automatic client-server charset recoding has been added --- sql/item.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/item.h') diff --git a/sql/item.h b/sql/item.h index 7b31f03f6ac..2bb22d47083 100644 --- a/sql/item.h +++ b/sql/item.h @@ -63,7 +63,7 @@ public: */ Item(THD *thd, Item &item); virtual ~Item() { name=0; } /*lint -e1509 */ - void set_name(const char *str,uint length=0); + void set_name(const char *str,uint length, CHARSET_INFO *cs); void init_make_field(Send_field *tmp_field,enum enum_field_types type); virtual void make_field(Send_field *field); virtual bool fix_fields(THD *, struct st_table_list *, Item **); @@ -359,7 +359,7 @@ public: str_value.set(str,length,cs); coercibility= coer; max_length=length; - name=(char*) str_value.ptr(); + set_name(str, length, cs); decimals=NOT_FIXED_DEC; } Item_string(const char *name_par, const char *str, uint length, @@ -368,7 +368,7 @@ public: str_value.set(str,length,cs); coercibility= coer; max_length=length; - name=(char*) name_par; + set_name(name_par,0,cs); decimals=NOT_FIXED_DEC; } ~Item_string() {} -- cgit v1.2.1 From 80630f12f3dbcf269fe81c7f39649b5ce9426363 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2003 15:55:17 +0400 Subject: 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 --- sql/item.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sql/item.h') 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 -- cgit v1.2.1