Commit 705283f7 authored by Alexander Barkov's avatar Alexander Barkov

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.
parent d69642de
......@@ -2104,7 +2104,7 @@ class Virtual_tmp_table: public TABLE
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment