Commit 2d2e834c authored by unknown's avatar unknown

post-merge fix


myisam/mi_rnext_same.c:
  cleanup
parent 5a0f1c74
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
int mi_rnext_same(MI_INFO *info, byte *buf) int mi_rnext_same(MI_INFO *info, byte *buf)
{ {
int error; int error;
uint inx,flag,not_used; uint inx,not_used;
MI_KEYDEF *keyinfo; MI_KEYDEF *keyinfo;
DBUG_ENTER("mi_rnext_same"); DBUG_ENTER("mi_rnext_same");
if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR) if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR)
DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX); DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);
keyinfo=info->s->keyinfo+inx; keyinfo=info->s->keyinfo+inx;
flag=SEARCH_BIGGER; /* Read next */
if (fast_mi_readinfo(info)) if (fast_mi_readinfo(info))
DBUG_RETURN(my_errno); DBUG_RETURN(my_errno);
...@@ -44,7 +43,7 @@ int mi_rnext_same(MI_INFO *info, byte *buf) ...@@ -44,7 +43,7 @@ int mi_rnext_same(MI_INFO *info, byte *buf)
for (;;) for (;;)
{ {
if ((error=_mi_search_next(info,keyinfo,info->lastkey, if ((error=_mi_search_next(info,keyinfo,info->lastkey,
info->lastkey_length,flag, info->lastkey_length,SEARCH_BIGGER,
info->s->state.key_root[inx]))) info->s->state.key_root[inx])))
break; break;
if (_mi_key_cmp(keyinfo->seg,info->lastkey2,info->lastkey, if (_mi_key_cmp(keyinfo->seg,info->lastkey2,info->lastkey,
......
...@@ -205,6 +205,14 @@ Documentation 0 ...@@ -205,6 +205,14 @@ Documentation 0
Host communication 0 Host communication 0
kkkkkkkkkkk lllllllllll 3 kkkkkkkkkkk lllllllllll 3
Test Procedures 0 Test Procedures 0
select value,description,COUNT(bug_id) from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA" group by value having COUNT(bug_id) IN (0,2);
value description COUNT(bug_id)
BBBBBBBBBBBBB - conversion 2
BBBBBBBBBBBBB - eeeeeeeee 0
BBBBBBBBBBBBB - generic 2
Documentation 0
Host communication 0
Test Procedures 0
drop table t1,t2; drop table t1,t2;
create table t1 (foo int); create table t1 (foo int);
insert into t1 values (1); insert into t1 values (1);
...@@ -232,6 +240,13 @@ userid count(*) ...@@ -232,6 +240,13 @@ userid count(*)
3 3 3 3
2 1 2 1
1 2 1 2
select userid,count(*) from t1 group by userid desc having (count(*)+1) IN (4,3);
userid count(*)
3 3
1 2
select userid,count(*) from t1 group by userid desc having 3 IN (1,COUNT(*));
userid count(*)
3 3
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc; explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc;
table type possible_keys key key_len ref rows Extra table type possible_keys key key_len ref rows Extra
t1 range spID spID 5 NULL 2 Using where; Using index t1 range spID spID 5 NULL 2 Using where; Using index
......
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