- 27 Sep, 2018 2 commits
-
-
Marko Mäkelä authored
dict_col_t::DROPPED: Magic value for dict_col_t::ind
-
Marko Mäkelä authored
row_metadata_to_tuple(): Convert a metadata record to a data tuple, based on the new info_bits of the metadata record. btr_cur_pessimistic_update(): Invoke row_metadata_to_tuple() if needed. dict_index_t::instant_add_field(): Append fields at the end, if any. The fields for dropped columns are preserved. dict_table_t::instant_column(): Renamed from instant_add_column(). Add the parameter col_map so that columns can be reordered. FIXME: Also support ADD/DROP/reorder/rename of VIRTUAL COLUMN. ha_innobase_inplace_ctx::prepare_instant(): Preserve any instantly dropped columns in instant_table and its first index. FIXME: Support instant ALTER TABLE even if hidden FTS_DOC_ID exists. innobase_instant_try(): Simplify the logic for detecting dropped or reordered columns. If any drop or reorder is needed, construct an update vector with the metadata blob. dtype_t::metadata_blob_init(): Initialize the metadata BLOB data type. dict_table_t::find(): Find an old column based on a new column number. rec_convert_dtuple_to_metadata_comp(): Convert an alter metadata tuple into a record. row_rec_to_index_entry_impl(): Add the template parameter mblob and the optional parameter info_bits for specifying the desired new info bits. For the metadata tuple, allow conversion between the original format (ADD COLUMN only) and the generic format (with hidden BLOB). row_upd_index_replace_metadata(): Apply an update vector to an alter_metadata tuple.
-
- 26 Sep, 2018 4 commits
-
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
innobase_add_one_virtual(), innobase_insert_sys_virtual(): Change the return type to bool, and invoke my_error() when detecting an error. innodb_insert_sys_columns(): Insert a record into SYS_COLUMNS. Refactored from innobase_add_one_virtual() and innobase_instant_add_col(). innobase_instant_add_col(): Replace the parameter dfield with type. innobase_instant_drop_cols(): Drop matching columns from SYS_COLUMNS and all columns from SYS_VIRTUAL. innobase_instant_try(): Only invoke innobase_instant_drop_cols() when there are other changes than adding columns last. innodb_update_cols(): Renamed from innodb_update_n_cols().
-
- 25 Sep, 2018 4 commits
-
-
Marko Mäkelä authored
innobase_instant_try(): If any columns were dropped or reordered, delete any SYS_COLUMNS records for the following columns, and insert SYS_COLUMNS records for all subsequent stored columns as well as for all virtual columns. commit_try_norebuild(): If ctx->is_instant(), let the virtual columns be added or dropped by innobase_instant_try().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
There is no need to omit dropped columns in rec_get_offsets() and related functions. Dropped columns will have to be dealt with at a higher level when converting between table rows and clustered index records.
-
- 24 Sep, 2018 11 commits
-
-
Marko Mäkelä authored
This is a too specific function, and there is only one caller.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Simplify the code in btr_cur_instant_init_clust_index(), and make it a part of btr_cur_instant_init_metadata().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 21 Sep, 2018 12 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Remove some unnecessary computations and conditions. FIXME: Instant add/drop/reorder operations on stored columns cannot yet be combined with operations on virtual columns.
-
Marko Mäkelä authored
innobase_instant_drop_col(): Remove the parameter for the table name. The InnoDB data dictionary could be out of sync with the .frm file, because renaming columns between upper and lower case may not be reflected by the InnoDB dictionary. innobase_op_instant_try(): Remember the number of the last stored column, and support dropping multiple columns at a time. FIXME: adjust SYS_COLUMNS.POS for the pre-existing (not added) virtual columns.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
dict_col_t::add_to_core(): Convert an instantly added column to a "core column". The old name remove_instant() could be mistaken to refer to "instant DROP COLUMN".
-
Marko Mäkelä authored
dict_col_t::is_added(): The new name for is_instant().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
- Optimised the remove_instant if there is no dropped column present.
-
Marko Mäkelä authored
Clarify some comments about accessing an externally stored column on which a spatial index has been defined. Add a TODO comment that we should actually write the minimum bounding rectangle (MBR) to the undo log record, so that we can avoid fetching BLOBs and recomputing MBR. row_build_spatial_index_key(): Split from row_build_index_entry_low().
-
- 20 Sep, 2018 7 commits
-
-
Thirunarayanan Balathandayuthapani authored
-
Thirunarayanan Balathandayuthapani authored
can handle for dropped columns too. - Restricted the drop column with FTS_DOC_ID and hidden fts index removal for instant operation.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Do not exclude instantly dropped columns from the size of the record. This has to be handled at the upper level, by row_build() and the to-be-written replacement of row_build_index_entry(), called row_build_clust_index_entry(). Hopefully only a small number of functions will have to directly access those clustered index record fields that can be reordered or instantly dropped.
-
Marko Mäkelä authored
Until row_build() is taking care of reordering the fields in the clustered index record, we cannot really support anything else than instant DROP COLUMN of the last columns of a table.
-
Marko Mäkelä authored
rec_info_bits_valid(): Remove. The only case when this would fail is when the record is the generic ALTER TABLE metadata record. rec_is_alter_metadata(): Check if a record is the metadata record for instant ALTER TABLE (other than ADD COLUMN). NOTE: This function must not be invoked on node pointer records, because the delete-mark flag in those records may be set (it is garbage), and then a debug assertion could fail because index->is_instant() does not necessarily hold. rec_offs_validate(): FIXME: Temporarily disabled an assertion that does not hold if rec_is_alter_metadata(). Because we do not know here if a ROW_FORMAT=REDUNDANT record is for the leaf page, we cannot invoke rec_is_alter_metadata() here.
-
Marko Mäkelä authored
-