checkpoint.
does not compile.
This commit is contained in:
Sergei Golubchik 2010-11-25 18:17:28 +01:00
commit 65ca700def
2732 changed files with 867677 additions and 21074 deletions

View file

@ -34,11 +34,15 @@
Create right type of Cached_item for an item.
*/
Cached_item *new_Cached_item(THD *thd, Item *item)
Cached_item *new_Cached_item(THD *thd, Item *item, bool pass_through_ref)
{
if (item->real_item()->type() == Item::FIELD_ITEM &&
if (pass_through_ref && item->real_item()->type() == Item::FIELD_ITEM &&
!(((Item_field *) (item->real_item()))->field->flags & BLOB_FLAG))
return new Cached_item_field((Item_field *) (item->real_item()));
{
Item_field *real_item= (Item_field *) item->real_item();
Field *cached_field= real_item->field;
return new Cached_item_field(cached_field);
}
switch (item->result_type()) {
case STRING_RESULT:
return new Cached_item_str(thd, (Item_field *) item);