1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2004-04-08 01:50:59 +03:00
parent e9447881eb
commit 3cb13f7926
7 changed files with 140 additions and 124 deletions

View File

@ -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;