- 04 Oct, 2018 1 commit
-
-
Marko Mäkelä authored
For dropped columns, store the NOT NULL flag, the fixed length, and for variable-length columns, whether the maximum length exceeded 255 bytes.
-
- 03 Oct, 2018 4 commits
-
-
Marko Mäkelä authored
For partitioned tables, we must adjust each partition separately.
-
Marko Mäkelä authored
FIXME: For dropped columns, store the nullability and the fixed_len in the BLOB array. Also, add a version discriminator field. btr_cur_instant_init_low(): Read and validate the metadata BLOB page before reconstructing the dictionary information based on it. dict_col_t::clear_instant(): Renamed from remove_instant(). Do not assert that the column was instantly added, because we sometimes call this unconditionally for all columns. dict_table_t::reconstruct_columns(): Take the metadata BLOB and length as a parameter. Invoke dict_index_t::reconstruct_fields() upon successful completion.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
For instant DROP COLUMN and ROW_FORMAT=COMPACT or ROW_FORMAT=REDUNDANT, we must store the n_core_null_bytes in the root page, so that the chain of node pointer records can be followed in order to reach the leftmost leaf page where the metadata record is located. If the PRIMARY KEY contains any variable-length column and some nullable columns were instantly dropped, the dict_index_t::n_nullable in the data dictionary could be smaller than it actually is in the non-leaf pages. Because of this, the non-leaf pages could use more bytes for the null flags than the data dictionary expects, and we could be reading the lengths of the variable-length columns from the wrong offset, and thus reading the child page number from wrong place. This is the result of two design mistakes that involve unnecessary storage of data: First, it is nonsense to store any data fields for the leftmost node pointer records, because the comparisons would be resolved by the MIN_REC_FLAG alone. Second, there cannot be any null fields in the clustered index node pointer fields, but we nevertheless reserve space for all the null flags. btr_set_instant(): Convert a root page into "instant ALTER TABLE" format. This replaces page_set_instant(). btr_cur_instant_init_metadata(): Do not read any lengths from the metadata record header before reading the BLOB. At this point, we would not actually know how many nullable fields the metadata record contains. btr_cur_instant_init_low(): Minimize differences from the 10.3 version. btr_cur_instant_root_init(): Initialize n_core_null_bytes in one of two possible ways. FIXME: innobase_instant_try(): When needed, convert the root page from the ADD COLUMN format to the generic instant ALTER TABLE format.
-
- 02 Oct, 2018 9 commits
-
-
Marko Mäkelä authored
Apparently, the first fields of a clustered index may be updated in an update_undo vector when the index is ID_IND of SYS_FOREIGN, as part of renaming the table during ALTER TABLE. Normally, updates of the PRIMARY KEY should be logged as delete-mark and an insert.
-
Marko Mäkelä authored
The function had only one caller.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
trx_undo_update_rec_get_update(): Handle the metadata BLOB correctly.
-
Marko Mäkelä authored
Correctly calculate the size of mblob when some last fields are missing.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 01 Oct, 2018 6 commits
-
-
Marko Mäkelä authored
For other than the clustered index, ignore table->instant.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
ha_innobase::check_if_supported_inplace_alter(): Do not allow adding a FTS_DOC_ID column if a hidden FTS_DOC_ID column exists due to FULLTEXT INDEX. (This always required ALGORITHM=COPY.) ha_innobase_inplace_ctx::first_alter_pos: The first column whose position is affected by instant ADD, DROP, or changing the order of columns. innobase_instant_try(): Fill in a zero default value for the hidden column FTS_DOC_ID. Before this, it was not possible to instantly add columns if a hidden FTS_DOC_ID column existed (at the end of the InnoDB table definition).
-
Marko Mäkelä authored
-
Marko Mäkelä authored
instant_metadata(): Create a metadata record for instant ALTER TABLE.
-
Marko Mäkelä authored
-
- 29 Sep, 2018 1 commit
-
-
Marko Mäkelä authored
The number of "core fields" must never change unless the whole index is emptied or rebuilt.
-
- 28 Sep, 2018 8 commits
-
-
Thirunarayanan Balathandayuthapani authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
rec_get_converted_size_comp(): Replace status,fields,n_fields with tuple. rec_init_offsets_comp_ordinary(), rec_get_converted_size_comp_prefix_low(), rec_convert_dtuple_to_rec_comp(): Add template<bool mblob = false>. With mblob=true, process a record with a metadata BLOB. rec_copy_prefix_to_buf(): Assert that no fields beyond the key and system columns are being copied. Exclude the metadata BLOB field.
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
-
- 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 1 commit
-
-
Marko Mäkelä authored
This is a too specific function, and there is only one caller.
-