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

bugfix: move vcol calculations down into the handler

This fixes a bug where handler::read_range_first (for example)
needed to compare vcol values that were not calculated yet.

As a bonus it fixes few cases where vcols were calculated twice
This commit is contained in:
Sergei Golubchik
2016-10-22 17:33:42 +02:00
parent b8f51c04d3
commit 0e401bf7bf
9 changed files with 72 additions and 25 deletions

View File

@@ -3371,7 +3371,6 @@ 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)
@@ -3382,8 +3381,6 @@ int JOIN_TAB_SCAN::next()
if (!err)
{
join_tab->tracker->r_rows++;
if (table->vfield)
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
}
while (!err && select && (skip_rc= select->skip_record(thd)) <= 0)
@@ -3398,8 +3395,6 @@ int JOIN_TAB_SCAN::next()
if (!err)
{
join_tab->tracker->r_rows++;
if (table->vfield)
table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
}
}
@@ -3923,8 +3918,6 @@ int JOIN_TAB_SCAN_MRR::next()
DBUG_ASSERT(cache->buff <= (uchar *) (*ptr) &&
(uchar *) (*ptr) <= cache->end_pos);
*/
if (join_tab->table->vfield)
join_tab->table->update_virtual_fields(VCOL_UPDATE_FOR_READ);
}
return rc;
}