diff options
author | unknown <igor@rurik.mysql.com> | 2006-04-01 02:57:56 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-04-01 02:57:56 -0800 |
commit | a5abc598e5efe21b3599e6f4fda9ab02f6194be3 (patch) | |
tree | de80900626c18453d590c01fd12d6b92f474cdeb /storage/myisam | |
parent | d5db81aa34da471ab1f4cd84317e85ec83f42fdf (diff) | |
parent | f0bfea2bb0789bd5bcd2a8d85c42dd310e245d1a (diff) | |
download | mariadb-git-a5abc598e5efe21b3599e6f4fda9ab02f6194be3.tar.gz |
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
sql/field.cc:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisam/mi_search.c:
Auto merged
storage/ndb/tools/Makefile.am:
Auto merged
strings/ctype-ucs2.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/mi_search.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/storage/myisam/mi_search.c b/storage/myisam/mi_search.c index a6c2cbd6082..05f8459a4b4 100644 --- a/storage/myisam/mi_search.c +++ b/storage/myisam/mi_search.c @@ -1471,7 +1471,7 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, if (!*key++) { s_temp->key=key; - s_temp->ref_length=s_temp->key_length=0; + s_temp->key_length= 0; s_temp->totlength=key_length-1+diff_flag; s_temp->next_key_pos=0; /* No next key */ return (s_temp->totlength); @@ -1626,12 +1626,12 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, s_temp->prev_length= org_key_length; s_temp->n_ref_length=s_temp->n_length= org_key_length; length+= org_key_length; - /* +get_pack_length(org_key_length); */ } return (int) length; } ref_length=n_length; + /* Get information about not packed key suffix */ get_key_pack_length(n_length,next_length_pack,next_key); /* Test if new keys has fewer characters that match the previous key */ @@ -1640,7 +1640,6 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, s_temp->part_of_prev_key= 0; s_temp->prev_length= ref_length; s_temp->n_ref_length= s_temp->n_length= n_length+ref_length; - /* s_temp->prev_key+= get_pack_length(org_key_length); */ return (int) length+ref_length-next_length_pack; } if (ref_length+pack_marker > new_ref_length) @@ -1651,9 +1650,7 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, s_temp->prev_length= ref_length - new_pack_length; s_temp->n_ref_length=s_temp->n_length=n_length + s_temp->prev_length; s_temp->prev_key+= new_pack_length; -/* +get_pack_length(org_key_length); */ - length= length-get_pack_length(ref_length)+ - get_pack_length(new_pack_length); + length-= (next_length_pack - get_pack_length(s_temp->n_length)); return (int) length + s_temp->prev_length; } } @@ -1662,7 +1659,7 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, /* Next key wasn't a prefix of previous key */ ref_length=0; next_length_pack=0; - } + } DBUG_PRINT("test",("length: %d next_key: %lx", length, (long) next_key)); |