summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-08-11 02:00:51 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-08-11 02:00:51 +0500
commit6aa5fa3a1dbbee863fb4a0da153cedff6b69a418 (patch)
tree2380b8a509f41895330745de2a1f4255304c4929 /sql/field.h
parent6930ac54068b88ce5ca2476f70d74ddb42f5d9fc (diff)
parent124ad307e3306fc1de749234b7a4e7708f620d57 (diff)
downloadmariadb-git-6aa5fa3a1dbbee863fb4a0da153cedff6b69a418.tar.gz
Merge gleb.loc:/home/uchum/work/bk/5.1
into gleb.loc:/home/uchum/work/bk/5.1-opt sql/field.cc: Auto merged BitKeeper/deleted/.del-readme.txt~3: Auto merged sql/field.h: Auto merged sql/handler.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/unireg.h: Auto merged sql/sql_select.cc: Merge with main tree.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/field.h b/sql/field.h
index 60f6fc19d76..fa17f44a55b 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -275,9 +275,9 @@ public:
if (null_ptr)
null_ptr=ADD_TO_PTR(null_ptr,ptr_diff,uchar*);
}
- inline void get_image(uchar *buff,uint length, CHARSET_INFO *cs)
+ virtual void get_image(uchar *buff, uint length, CHARSET_INFO *cs)
{ memcpy(buff,ptr,length); }
- inline void set_image(const uchar *buff,uint length, CHARSET_INFO *cs)
+ virtual void set_image(const uchar *buff,uint length, CHARSET_INFO *cs)
{ memcpy(ptr,buff,length); }
@@ -1586,7 +1586,10 @@ public:
virtual bool str_needs_quotes() { return TRUE; }
my_decimal *val_decimal(my_decimal *);
int cmp(const uchar *a, const uchar *b)
- { return cmp_binary(a, b); }
+ {
+ DBUG_ASSERT(ptr == a);
+ return Field_bit::key_cmp(b, bytes_in_rec+test(bit_len));
+ }
int cmp_binary_offset(uint row_offset)
{ return cmp_offset(row_offset); }
int cmp_max(const uchar *a, const uchar *b, uint max_length);
@@ -1594,6 +1597,10 @@ public:
{ return cmp_binary((uchar *) a, (uchar *) b); }
int key_cmp(const uchar *str, uint length);
int cmp_offset(uint row_offset);
+ void get_image(uchar *buff, uint length, CHARSET_INFO *cs)
+ { get_key_image(buff, length, itRAW); }
+ void set_image(const uchar *buff,uint length, CHARSET_INFO *cs)
+ { Field_bit::store((char *) buff, length, cs); }
uint get_key_image(uchar *buff, uint length, imagetype type);
void set_key_image(const uchar *buff, uint length)
{ Field_bit::store((char*) buff, length, &my_charset_bin); }