1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Cleanups to recent patches

Fix packet error when using wrong GRANT command
This commit is contained in:
monty@mashka.mysql.fi
2003-08-15 09:54:19 +03:00
parent fb47e64256
commit a9146ace70
7 changed files with 84 additions and 83 deletions

View File

@@ -1490,11 +1490,15 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
}
}
DBUG_ASSERT(num_values == 1);
// DBUG_ASSERT(eq_func); /* QQ: Can I uncomment this ASSERT ? */
/*
For the moment eq_func is always true. This slot is reserved for future
extensions where we want to remembers other things than just eq comparisons
*/
DBUG_ASSERT(eq_func);
/* Store possible eq field */
(*key_fields)->field=field;
(*key_fields)->eq_func=eq_func;
(*key_fields)->val=*value;
(*key_fields)->val= *value;
(*key_fields)->level=(*key_fields)->const_level=and_level;
(*key_fields)->exists_optimize=exists_optimize;
(*key_fields)++;
@@ -1582,6 +1586,8 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
if (cond_func->arguments()[0]->type() == Item::FIELD_ITEM)
{
Item *tmp=new Item_null;
if (!tmp) // Should never be true
return;
add_key_field(key_fields,*and_level,
((Item_field*) (cond_func->arguments()[0]))->field,
cond_func->functype() == Item_func::ISNULL_FUNC,