diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-10-22 17:33:42 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-12 20:27:38 +0100 |
commit | 0e401bf7bfe4a14609e25c4335b9d4e0619e35ec (patch) | |
tree | a79fa574ae3b42d7cb28188cd449f02c28a8ec5d /sql/filesort.cc | |
parent | b8f51c04d31e15570c53dc2e61258304ee49047a (diff) | |
download | mariadb-git-0e401bf7bfe4a14609e25c4335b9d4e0619e35ec.tar.gz |
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
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index e2f18f99135..a82f4871045 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -31,7 +31,7 @@ #include <m_ctype.h> #include "sql_sort.h" #include "probes_mysql.h" -#include "sql_base.h" // update_virtual_fields +#include "sql_base.h" #include "sql_test.h" // TEST_filesort #include "opt_range.h" // SQL_SELECT #include "bounded_queue.h" @@ -784,8 +784,6 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select, { if ((error= select->quick->get_next())) break; - if (!error && sort_form->vfield) - sort_form->update_virtual_fields(VCOL_UPDATE_FOR_READ); file->position(sort_form->record[0]); DBUG_EXECUTE_IF("debug_filesort", dbug_print_record(sort_form, TRUE);); } @@ -793,8 +791,6 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select, { { error= file->ha_rnd_next(sort_form->record[0]); - if (!error && sort_form->vfield) - sort_form->update_virtual_fields(VCOL_UPDATE_FOR_READ); if (!flag) { my_store_ptr(ref_pos,ref_length,record); // Position to row |