Commit 4ed2ba5f authored by unknown's avatar unknown

two more bugfixes for "space stripping in MyISAM indexes"

parent 344bdd2a
...@@ -847,7 +847,7 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a, ...@@ -847,7 +847,7 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
full_b_length=b_length; full_b_length=b_length;
next_key_length=key_length-b_length-pack_length; next_key_length=key_length-b_length-pack_length;
if (!(nextflag & (SEARCH_PREFIX | SEARCH_UPDATE))) if ((nextflag & (SEARCH_FIND | SEARCH_UPDATE)) == SEARCH_FIND)
{ {
while (a_length && a[a_length-1] == ' ') while (a_length && a[a_length-1] == ' ')
a_length--; a_length--;
......
...@@ -390,4 +390,8 @@ insert into t1 values ('aaa '),('aaa'); ...@@ -390,4 +390,8 @@ insert into t1 values ('aaa '),('aaa');
repair table t1; repair table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 repair status OK test.t1 repair status OK
select concat(a,'.') from t1 where a='aaa';
concat(a,'.')
aaa.
aaa .
drop table t1; drop table t1;
...@@ -387,10 +387,11 @@ check table t1; ...@@ -387,10 +387,11 @@ check table t1;
drop table t1; drop table t1;
# #
# sort-repair bug # two bugs in myisam-space-stripping feature
# #
create table t1 ( a text not null, key a (a(20))); create table t1 ( a text not null, key a (a(20)));
insert into t1 values ('aaa '),('aaa'); insert into t1 values ('aaa '),('aaa');
repair table t1; repair table t1;
select concat(a,'.') from t1 where a='aaa';
drop table t1; drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment