summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-04-08 01:50:59 +0300
committerunknown <monty@mysql.com>2004-04-08 01:50:59 +0300
commit076ec3c0a774008b33973e45fa9c6d5b68462ed8 (patch)
tree1b3035cc7dd1e396fd6d35bd81a7453e35357f2e /sql/field.h
parentef79036c9c68c0e4b6514b8356775e4e6c7f4f6f (diff)
downloadmariadb-git-076ec3c0a774008b33973e45fa9c6d5b68462ed8.tar.gz
Cleanup/optimizations of structures and key usage to make it easier to move key-range-search to handler
sql/field.cc: Use 'HA_KEY_BLOB_LENGTH' instead of '2' for 'packed-length' Changed 'get_key_image' and 'set_key_image' to take length data part of key (without length-store bytes). This makes the interface easier to use from opt_range.cc sql/field.h: Indentation fix sql/opt_range.cc: Changed KEY_PART to use KEY_PART_INFO->store_length (which includes null-byte if needed) This makes some functions easier and allowed us to easier use the new get_key_image/set_key_image interfaces Simple loop optimization. sql/opt_range.h: Changed part_length -> store_length and added length to KEY_PART. This make this structure more like KEY_PART_INFO Added 'sorted' to QUICK_SELECT for NDB sql/sql_class.cc: Fixed compiler warning sql/sql_select.cc: Set 'quick->sorted' if keys should be sorted (for NDB) sql/table.cc: GEOMETRY KEYS doesn't have length prefix in keys
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index 75bb96f2f6d..6dd476b6968 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -199,7 +199,8 @@ public:
{ memcpy(buff,ptr,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, CHARSET_INFO *cs, imagetype type)
+ 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); }