1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

range.result, range.test:

Added test cases for optimization request #10561.
opt_range.cc, sql_select.cc:
  Fixed bug #10561: an optimization request to allow
  range analysis for NOT IN and NOT BETWEEN.
This commit is contained in:
igor@rurik.mysql.com
2005-05-21 06:11:44 -07:00
parent d0f51ad8d8
commit fdb6c661a3
4 changed files with 235 additions and 32 deletions

View File

@ -2822,6 +2822,17 @@ add_key_fields(KEY_FIELD **key_fields,uint *and_level,
if (cond->type() != Item::FUNC_ITEM)
return;
Item_func *cond_func= (Item_func*) cond;
if (cond_func->functype() == Item_func::NOT_FUNC)
{
Item *item= cond_func->arguments()[0];
if (item->type() == Item::FUNC_ITEM &&
((Item_func *) item)->select_optimize() == Item_func::OPTIMIZE_KEY)
{
add_key_fields(key_fields,and_level,item,usable_tables);
return;
}
return;
}
switch (cond_func->select_optimize()) {
case Item_func::OPTIMIZE_NONE:
break;