WL#8114: Don't store virtual generated columns in database

Status: Complete

Currently virtual generated columns still occupy space as if they were stored.
Effectively server is responsible to calculate the value, but storage engine
stores trash in place of those fields. With this WL, virtual columns will no
longer take any space in actual data rows. Thus making such column much more
flexible (add/drop does not need to rebuild table) and space efficient (do not
take space in actual data row any more).

For example, if we have a table with 5 regular columns and 2 virtual columns. On
disk, the data record (cluster index record) will only have those 5 regular
columns (along with any necessary hidden system columns), and those 2 virtual
columns are never stored in those data rows.

The virtual column will still be represented in the InnoDB metadata. It is
treated as a column with prtype includes DATA_VIRTUAL bit. When adding a virtual
column, the column will register to Sys_columns as if for any other columns. And
the number of virtual column is also encoded in the N_COLS field of Sys_tables.
In addition, a new system table, SYS_VIRTUAL, is added to register the base
column information for each virtual columns.

For corresponding in-memory metadata structure, the virtual column info is
separated from that of regular columns. The regular column will still hang off
the dict_table_t::cols, while the new virtual columns will be hang off a new
list with dict_table_t::v_cols. In this way, the repercussion of new virtual
columns on existing access methods is limited.

A new virtual column structure (dict_v_col_t) is created, which has not only
regular column information, but also contains information from SYS_VIRTUAL,
which records the "base columns" information for the virtual column.

When we fill the result through the row_prebuilt_t::mysql_template[], the
virtual column could be skipped, since they do not exist in our data record. So,
the optimizer will fill in the data in TABLE::record

Since the virtual column is never stored in real rows, so alter table add or
drop virtual columns are reduced to a few system table modification, and it is
mostly effective instantly.

So in summary, with this worklog, the virtual column data will never stored in
data rows. But its metadata is recorded in various system tables, to show its
presence. And add/drop such columns are instant without table rebuild