summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-02-02 15:38:15 +0400
committerAlexander Barkov <bar@mariadb.org>2018-02-02 15:38:15 +0400
commit705283f7e3e2a3bf962381b77c2f47b393f25d2e (patch)
tree25cf188cfcdc2a5a78d27708905a147bd660c17b /sql/sql_select.h
parentd69642deddf4f8d51f8c6807361576451334f1f9 (diff)
downloadmariadb-git-705283f7e3e2a3bf962381b77c2f47b393f25d2e.tar.gz
Setting Field::field_index for Virtual_tmp_table fields
Virtial_tmp_table did not set the "field_index" member for its Fields. Fixing Virtual_tmp_table::add() to set "field_index" to the Field's ordinal position inside the table, like a normal TABLE does, for consistency. Although, this flaw did not seem to cause any bugs, having field_index properly set is helpful for debugging purposes.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 7cfc35a3b7d..3f1fdac96cb 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -2104,7 +2104,7 @@ public:
DBUG_ASSERT(s->blob_fields <= m_alloced_field_count);
s->blob_field[s->blob_fields - 1]= s->fields;
}
- s->fields++;
+ new_field->field_index= s->fields++;
return false;
}