1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Alexander Barkov
2018-02-02 15:38:15 +04:00
parent d69642dedd
commit 705283f7e3

View File

@ -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;
}