- 25 Sep, 2017 8 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This bug is a regression caused by the code refactoring in commit f5a833c3. It was not present in any release of the MariaDB server. The bug affects table-rebuilding ALTER TABLE when the source table is in ROW_FORMAT=REDUNDANT and contains no virtual columns. row_log_table_low_redundant(): Log virtual column data only if virtual columns are present.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In TRUNCATE TABLE, clear the 'instant' status of a table. TODO: Do the same when the table becomes empty dict_col_t::remove_instant(): Remove the instantness of a column. dict_index_t::remove_instant(): Remove the instantness of a clustered index.
-
Marko Mäkelä authored
-
- 24 Sep, 2017 2 commits
-
-
Marko Mäkelä authored
The ALTER TABLE…IMPORT TABLESPACE adjustment code that was introduced by WL#5522 in MySQL 5.6 is incorrectly invoking rec_get_status() on a ROW_FORMAT=REDUNDANT record to determine if a record is a leaf page record. The function rec_get_status(rec) is only to be called on ROW_FORMAT=COMPACT, DYNAMIC or COMPRESSED records.
-
Marko Mäkelä authored
-
- 23 Sep, 2017 11 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Revert any changes that are not needed any more. Most of the code submitted by Vinchen has been refactored so far. The redo log format changes are as they were submitted by Vinchen. FIXME: On rollback, convert the record to "old" format if the values match the 'default row' ones. There should be no need to write any new BLOBs during rollback. If we created new BLOBs during rollback, crash recovery could become very tricky. TODO: Review the changes to row0upd.cc, row0umod.cc. For new inserts and updates, if the suffix of instantly added columns match the 'default row', we can omit those fields from the clustered index record. If a non-default value is assigned to the last column, then all columns will have to be materialized. TODO: Implement update-in-place of the 'default row' record (for performing instant ADD COLUMN after instant ADD COLUMN). TODO: Implement and test rollback of the 'default row' record. TODO: Test crash recovery. Ensure that the ADD COLUMN operation is being rolled back if the server is killed during it. Also test crash recovery of DML operations on tables that were subject to instant ADD COLUMN, using all supported ROW_FORMAT (REDUNDANT, COMPACT, DYNAMIC).
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
For ROW_FORMAT=COMPACT and ROW_FORMAT=DYNAMIC records that contain fields that have been inserted after columns were instantly added (the record is tagged REC_STATUS_COLUMNS_ADDED), encode the number of added columns - 1 in the record header. rec_get_n_add_field_len): Determine the encoded size of the added fields. rec_get_n_add_field(): Determine the number of added fields. rec_set_n_add_field(): Set the number of added fields.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
dict_col_t::is_nullable(): Determine if the column can be set NULL. dict_col_t::is_nullable(): Determine if the column is virtual. dict_col_t::is_instant(): Determine if the column has been instantly added. dict_col_t::instant_value(): Get the default value of an instantly-added column. dict_index_t::get_n_nullable(n_prefix): Determine the number of nullable index fields in the prefix. dict_index_t::instant_field_value(): Get the default value of a clustered index field of an instantly-added column.
-
Alexander Barkov authored
-
- 22 Sep, 2017 19 commits
-
-
Vladislav Vaintroub authored
-
Alexander Barkov authored
-
Marko Mäkelä authored
For ROW_FORMAT=COMPRESSED tables or the change buffer tree, the FIL_PAGE_TYPE_INSTANT is not allowed. It is allowed for other types of user tables.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_search_move_or_delete_hash_entries(): Remove third parameter. We will already have buf_block_t::index. In some callers, skip the call if the index is known to be the spatial index, because there is no adaptive hash index for spatial indexes. Also, remove useless check for dict_table_is_locking_disabled() for ROW_FORMAT=COMPRESSED tables. There will never be temporary ROW_FORMAT=COMPRESSED tables in InnoDB. btr_cur_search_to_nth_level(): Do not attempt to use or update the adaptive hash index for MIN_REC_FLAG records (either the 'default row' or node pointers). btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(), btr_cur_optimistic_update(), btr_cur_pessimistic_update(): Do not attempt to update the adaptive hash index for the 'default row' record. btr_cur_update_in_place(): Assert that the 'default row' record is not being updated so that the ordering fields (PRIMARY KEY) would change. btr_cur_optimistic_delete_func(), btr_cur_pessimistic_delete(): For now, assert that the 'default row' record will not be deleted. (FIXME: It can and must be deleted in rollback.)
-
Marko Mäkelä authored
The ROW_FORMAT=COMPRESSED page format cannot be changed easily. The schema is pretty much hard-coded.
-
Marko Mäkelä authored
btr_pcur_store_position() and btr_pcur_restore_position() will not save the extra header associated with "instanly added" columns, because the stored and restored prefixes only ever include key columns, which cannot be added instantly.
-
Marko Mäkelä authored
-
Sergey Vojtovich authored
-
Marko Mäkelä authored
For ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPACT records, we have to identify whether the record contains more columns than when the clustered index tree was originally created. In this case, the number of fields (FIXME: number_of_added_fields-1, not the total number of fields) needs to be written to the record header. rec_comp_status_t: An enum of the status bit values. rec_leaf_format: An enum that replaces the bool parameter of rec_init_offsets_comp_ordinary(). rec_get_converted_size_comp(): Do not support infimum,supremum. They are never supposed to be stored in dtuple_t, as page creation nowadays uses a lower-level method for inserting them. innobase_add_instant_try(): Initialize the dtuple_t::info_bits appropriately to REC_INFO_MIN_REC_FLAG | REC_STATUS_COLUMNS_ADDED so that it can be inserted into a ROW_FORMAT!=REDUNDANT table.
-
Alexander Barkov authored
-
Marko Mäkelä authored
row_merge_read_clustered_index(), IndexPurge::open(): Before testing for the 'default row' pseudo-record, advance the cursor from the infimum pseudo-record, and then move back if needed.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Sergey Vojtovich authored
idle_write_transaction_timeout
-
Marko Mäkelä authored
-
Alexander Barkov authored
This is a preparatory step for MDEV-13864. It does not change behavior in any ways. It simply splits methods into smaller peaces. The intent of this separate patch is to make more readable the main patch for MDEV-13864 (which will actually move the predicant to args[0]). 1. Splitting fix_length_and_dec() into smaller pieces, adding: - bool aggregate_then_and_else_arguments(THD *thd); - bool aggregate_switch_and_when_arguments(THD *thd); 2. Splitting find_item() into smaller pieces, adding: - Item *find_item_searched(); - Item *find_item_simple(); 3. Splitting print() into smaller pieces, adding: - void print_when_then_arguments(String *str, enum_query_type query_type, Item **items, uint count); - void print_else_argument(String *str, enum_query_type query_type, Item *item) 4. Moving the maybe_null handling part related to ELSE from fix_length_and_dec() to fix_fields(), as in all other Item_func's. 5. Removing the unused String* argument from find_item(). 6. Moving find_item() from public to private, as it's not needed outside.
-
Marko Mäkelä authored
rec_offs_any_flag(): The EXTERNAL and DEFAULT flags are only mutually exclusive for individual fields. A record can contain both EXTERNAL and DEFAULT fields, as long as they are separate fields.
-
Marko Mäkelä authored
sel_restore_position_for_mysql(): Pass the correct index to rec_is_default_row(). (We should really remove btr_cur_t::index and use page_cur_t::index isntead.)
-