mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Fix ordered index scan with partially specified key
This commit is contained in:
parent
fccc404a10
commit
b5ebc0f259
3 changed files with 13 additions and 7 deletions
|
@ -205,4 +205,10 @@ a b c
|
|||
select * from t1 where b<=5 and c=0 or b<=5 and c=2;
|
||||
a b c
|
||||
19 4 0
|
||||
select count(*) from t1 where b = 0;
|
||||
count(*)
|
||||
0
|
||||
select count(*) from t1 where b = 1;
|
||||
count(*)
|
||||
1
|
||||
drop table t1;
|
||||
|
|
|
@ -113,6 +113,9 @@ select * from t1 where b<=5 and c=0;
|
|||
select * from t1 where b=4 and c<=5 order by a;
|
||||
select * from t1 where b<=4 and c<=5 order by a;
|
||||
select * from t1 where b<=5 and c=0 or b<=5 and c=2;
|
||||
|
||||
select count(*) from t1 where b = 0;
|
||||
select count(*) from t1 where b = 1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
|
|
|
@ -1188,13 +1188,11 @@ NdbIndexScanOperation::fix_get_values(){
|
|||
for(Uint32 i = 0; i<cnt; i++){
|
||||
Uint32 val = theTupleKeyDefined[i][0];
|
||||
switch(val){
|
||||
case FAKE_PTR:{
|
||||
NdbColumnImpl * key = idx->m_columns[i];
|
||||
NdbColumnImpl * col = tab->getColumn(key->m_keyInfoPos);
|
||||
curr->setup(col, 0);
|
||||
}
|
||||
break;
|
||||
case FAKE_PTR:
|
||||
curr->setup(curr->m_column, 0);
|
||||
case API_PTR:
|
||||
curr = curr->next();
|
||||
break;
|
||||
case SETBOUND_EQ:
|
||||
break;
|
||||
#ifdef VM_TRACE
|
||||
|
@ -1202,7 +1200,6 @@ NdbIndexScanOperation::fix_get_values(){
|
|||
abort();
|
||||
#endif
|
||||
}
|
||||
curr = curr->next();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue