mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Fixed LP bug#694092.
In some cases the function make_cond_for_index() was mistaken when detecting index only pushdown conditions for a table: a pushdown condition that was not index only could be marked as such. It happened because the procedure erroneously used the markers for index only conditions that remained from the calls of this function that extracted the index conditions for other tables. Fixed by erasing index only markers as soon as they are need anymore.
This commit is contained in:
parent
f51a26885f
commit
d9a81475c7
3 changed files with 80 additions and 2 deletions
|
|
@ -155,7 +155,11 @@ Item *make_cond_for_index(Item *cond, TABLE *table, uint keyno,
|
|||
new_cond->argument_list()->push_back(fix);
|
||||
used_tables|= fix->used_tables();
|
||||
}
|
||||
n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY);
|
||||
if (test(item->marker == ICP_COND_USES_INDEX_ONLY))
|
||||
{
|
||||
n_marked++;
|
||||
item->marker= 0;
|
||||
}
|
||||
}
|
||||
if (n_marked ==((Item_cond*)cond)->argument_list()->elements)
|
||||
cond->marker= ICP_COND_USES_INDEX_ONLY;
|
||||
|
|
@ -184,7 +188,11 @@ Item *make_cond_for_index(Item *cond, TABLE *table, uint keyno,
|
|||
if (!fix)
|
||||
return (COND*) 0;
|
||||
new_cond->argument_list()->push_back(fix);
|
||||
n_marked += test(item->marker == ICP_COND_USES_INDEX_ONLY);
|
||||
if (test(item->marker == ICP_COND_USES_INDEX_ONLY))
|
||||
{
|
||||
n_marked++;
|
||||
item->marker= 0;
|
||||
}
|
||||
}
|
||||
if (n_marked ==((Item_cond*)cond)->argument_list()->elements)
|
||||
cond->marker= ICP_COND_USES_INDEX_ONLY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue