From e5103ce714dc3bbec6ea1dc77b7a02a8454c0165 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Thu, 19 Dec 2002 15:27:46 +0400 Subject: Less "default_charset_info" --- sql/field.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index d0855aa46b3..40578d19c82 100644 --- a/sql/field.h +++ b/sql/field.h @@ -149,14 +149,14 @@ public: if (null_ptr) null_ptr=ADD_TO_PTR(null_ptr,ptr_diff,uchar*); } - inline void get_image(char *buff,uint length) + inline void get_image(char *buff,uint length, CHARSET_INFO *cs) { memcpy(buff,ptr,length); } - inline void set_image(char *buff,uint length) + inline void set_image(char *buff,uint length, CHARSET_INFO *cs) { memcpy(ptr,buff,length); } - virtual void get_key_image(char *buff,uint length, imagetype type) - { get_image(buff,length); } - virtual void set_key_image(char *buff,uint length) - { set_image(buff,length); } + virtual void get_key_image(char *buff,uint length, CHARSET_INFO *cs, imagetype type) + { get_image(buff,length,cs); } + virtual void set_key_image(char *buff,uint length, CHARSET_INFO *cs) + { set_image(buff,length,cs); } inline int cmp_image(char *buff,uint length) { return memcmp(ptr,buff,length); } inline longlong val_int_offset(uint row_offset) @@ -836,8 +836,8 @@ public: bool send_binary(Protocol *protocol); int cmp(const char *,const char*); void sort_string(char *buff,uint length); - void get_key_image(char *buff,uint length, imagetype type); - void set_key_image(char *buff,uint length); + void get_key_image(char *buff,uint length, CHARSET_INFO *cs, imagetype type); + void set_key_image(char *buff,uint length, CHARSET_INFO *cs); void sql_type(String &str) const; char *pack(char *to, const char *from, uint max_length=~(uint) 0); const char *unpack(char* to, const char *from); @@ -908,8 +908,8 @@ public: store_length(length); memcpy_fixed(ptr+packlength,&data,sizeof(char*)); } - void get_key_image(char *buff,uint length, imagetype type); - void set_key_image(char *buff,uint length); + void get_key_image(char *buff,uint length, CHARSET_INFO *cs, imagetype type); + void set_key_image(char *buff,uint length, CHARSET_INFO *cs); void sql_type(String &str) const; inline bool copy() { char *tmp; @@ -950,8 +950,8 @@ public: table_arg, my_charset_bin) {} enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY; } - void get_key_image(char *buff,uint length, imagetype type); - void set_key_image(char *buff,uint length); + void get_key_image(char *buff,uint length, CHARSET_INFO *cs,imagetype type); + void set_key_image(char *buff,uint length, CHARSET_INFO *cs); }; -- cgit v1.2.1 From 5c4b7a2e9623b6a9ceb2294d9b8ddc5c4bdba762 Mon Sep 17 00:00:00 2001 From: "venu@myvenu.com" <> Date: Fri, 3 Jan 2003 03:52:53 -0800 Subject: Binary protocol changes (to monty) --- sql/field.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index 40578d19c82..67bae7302f9 100644 --- a/sql/field.h +++ b/sql/field.h @@ -166,7 +166,7 @@ public: ptr-=row_offset; return tmp; } - bool send_binary(Protocol *protocol); + virtual bool send_binary(Protocol *protocol); virtual char *pack(char* to, const char *from, uint max_length=~(uint) 0) { uint32 length=pack_length(); @@ -792,7 +792,6 @@ public: double val_real(void); longlong val_int(void); String *val_str(String*,String *); - bool send_binary(Protocol *protocol); int cmp(const char *,const char*); void sort_string(char *buff,uint length); void sql_type(String &str) const; @@ -833,7 +832,6 @@ public: double val_real(void); longlong val_int(void); String *val_str(String*,String *); - bool send_binary(Protocol *protocol); int cmp(const char *,const char*); void sort_string(char *buff,uint length); void get_key_image(char *buff,uint length, CHARSET_INFO *cs, imagetype type); @@ -876,7 +874,6 @@ public: double val_real(void); longlong val_int(void); String *val_str(String*,String *); - bool send_binary(Protocol *protocol); int cmp(const char *,const char*); int cmp(const char *a, uint32 a_length, const char *b, uint32 b_length); int cmp_offset(uint offset); @@ -982,7 +979,6 @@ public: double val_real(void); longlong val_int(void); String *val_str(String*,String *); - bool send_binary(Protocol *protocol); int cmp(const char *,const char*); void sort_string(char *buff,uint length); uint32 pack_length() const { return (uint32) packlength; } -- cgit v1.2.1 From 7e9b27eaf5e4add82c98fb8cf87ad68ea72de6a8 Mon Sep 17 00:00:00 2001 From: "monty@mashka.mysql.fi" <> Date: Tue, 14 Jan 2003 14:28:36 +0200 Subject: Updates for multi-byte character sets (Note: test 'union' fails, but Sanja promised to fix this) --- sql/field.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index 67bae7302f9..06a9b534b16 100644 --- a/sql/field.h +++ b/sql/field.h @@ -133,7 +133,9 @@ public: tmp->unireg_check=Field::NONE; tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG | ZEROFILL_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG); +#ifdef PROBABLY_WRONG tmp->table_name= new_table->table_name; +#endif tmp->reset_fields(); } return tmp; @@ -1094,7 +1096,8 @@ bool set_field_to_null(Field *field); bool set_field_to_null_with_conversions(Field *field, bool no_conversions); uint find_enum(TYPELIB *typelib,const char *x, uint length); ulonglong find_set(TYPELIB *typelib,const char *x, uint length); -bool test_if_int(const char *str,int length,CHARSET_INFO *cs); +bool test_if_int(const char *str, int length, const char *int_end, + CHARSET_INFO *cs); /* The following are for the interface with the .frm file -- cgit v1.2.1