summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-04-11 20:44:52 -0700
committerIgor Babaev <igor@askmonty.org>2012-04-11 20:44:52 -0700
commit9e74665a2d91e299d1b9c5c2695855426aad78eb (patch)
tree9c865c2e18fcb814ef80e96965debf53a0923e6a /sql/sql_join_cache.cc
parent1c0a89afcc1581187e8ee84abbd445da2bfa45d9 (diff)
parent85a025f30c5196c22c5b1d7960912fe9b3f0d6c0 (diff)
downloadmariadb-git-9e74665a2d91e299d1b9c5c2695855426aad78eb.tar.gz
Merge 5.5 -> 5.5-mwl248.
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index ba28cb8d0b0..f6fc2ebfd1e 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -3345,23 +3345,26 @@ int JOIN_TAB_SCAN::next()
int skip_rc;
READ_RECORD *info= &join_tab->read_record;
SQL_SELECT *select= join_tab->cache_select;
+ TABLE *table= join_tab->table;
+ THD *thd= join->thd;
+
if (is_first_record)
is_first_record= FALSE;
else
err= info->read_record(info);
- if (!err)
- update_virtual_fields(join->thd, join_tab->table);
- while (!err && select && (skip_rc= select->skip_record(join->thd)) <= 0)
+ if (!err && table->vfield)
+ update_virtual_fields(thd, table);
+ while (!err && select && (skip_rc= select->skip_record(thd)) <= 0)
{
- if (join->thd->killed || skip_rc < 0)
+ if (thd->killed || skip_rc < 0)
return 1;
/*
Move to the next record if the last retrieved record does not
meet the condition pushed to the table join_tab.
*/
err= info->read_record(info);
- if (!err)
- update_virtual_fields(join->thd, join_tab->table);
+ if (!err && table->vfield)
+ update_virtual_fields(thd, table);
}
return err;
}
@@ -3875,7 +3878,8 @@ int JOIN_TAB_SCAN_MRR::next()
*/
DBUG_ASSERT(cache->buff <= (uchar *) (*ptr) &&
(uchar *) (*ptr) <= cache->end_pos);
- update_virtual_fields(join->thd, join_tab->table);
+ if (join_tab->table->vfield)
+ update_virtual_fields(join->thd, join_tab->table);
}
return rc;
}