summaryrefslogtreecommitdiff
path: root/sql/opt_range.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
commit3cb13f7926334b6542d46d6a78c8aadeb1aefcc8 (patch)
tree1b3035cc7dd1e396fd6d35bd81a7453e35357f2e /sql/opt_range.h
parente9447881eb13378b06f0939091ab4e258a83ad51 (diff)
downloadmariadb-git-3cb13f7926334b6542d46d6a78c8aadeb1aefcc8.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/opt_range.h')
-rw-r--r--sql/opt_range.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index bf10c02c295..4af56393a57 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -35,7 +35,7 @@
typedef struct st_key_part {
- uint16 key,part,part_length;
+ uint16 key,part, store_length, length;
uint8 null_bit;
Field *field;
Field::imagetype image_type;
@@ -68,7 +68,7 @@ class QUICK_RANGE :public Sql_alloc {
class QUICK_SELECT {
public:
- bool next,dont_free;
+ bool next,dont_free,sorted;
int error;
uint index, max_used_key_length, used_key_parts;
TABLE *head;