- 03 Oct, 2017 1 commit
-
-
Marko Mäkelä authored
-
- 02 Oct, 2017 10 commits
-
-
Marko Mäkelä authored
dict_col_t::name(): Also work with virtual columns dict_v_idx_t: Add a constructor dict_index_t::commit_instant_copy(): Work with virtual columns ha_innobase_inplace_ctx::commit_instant(): Properly adjust base_col[] and clear v_indexes, to be populated by dict_index_t::commit_instant_copy().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
We must split the creation of table or index metadata from the creation of the dictionary table records and the creation of the data. In this way, we can transform a table-rebuilding operation into an instant ADD COLUMN operation. Dictionary objects will only be added to cache when table rebuilding or index creation is needed. The ctx->instant_table will never be added to cache. innodb_update_n_cols(): Renamed from innobase_update_n_virtual(). Call my_error() if an error occurs. innobase_add_instant_try(): Call my_error() if an error occurs. create_index_dict(): Replaces row_merge_create_index_graph(). prepare_inplace_alter_table_dict(): First create the ctx->new_table, and only then decide if the table really needs to be rebuilt.
-
Marko Mäkelä authored
dict_create_sys_tables_tuple(), dict_create_table_step(): Omit the system columns (which will now exist in the dict_table_t object already at this point). dict_create_table_step(): Expect the callers to invoke dict_table_add_system_columns(). pars_create_table(): Before creating the table creation execution graph, invoke dict_table_add_system_columns(). row_create_table_for_mysql(): Expect all callers to invoke dict_table_add_system_columns().
-
Marko Mäkelä authored
dict_table_t::add_to_cache(): Modified from dict_table_add_to_cache(). Let the callers invoke dict_table_add_system_columns() and if needed, set can_be_evicted.
-
Marko Mäkelä authored
The field dict_table_t::big_rows was only used for determining if the adaptive hash index should be used when the internal InnoDB SQL parser is used. That parser is only used for modifying the InnoDB data dictionary, updating persistent tables, and for fulltext indexes.
-
Marko Mäkelä authored
-
- 01 Oct, 2017 7 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
page_cur_search_with_match_bytes(): Skip the comparison of the MIN_REC_FLAG record. Also, remove some dead code (we asserted that the search tuple carries no MIN_REC_FLAG).
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_cur_pessimistic_delete(): Remove the record lock also when the page is dropped. FIXME: File a bug for this and fix in 5.5+. The bug is present in all InnoDB versions.
-
Marko Mäkelä authored
-
- 29 Sep, 2017 10 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_cur_optimistic_update(), btr_cur_pessimistic_update(): Do not trim the 'default row' record. innobase_instant_add_try(): Compute and apply the update vector for the 'default row'. FIXME: The rollback of the 'default row' operations (that is, the ROLLBACK of the ALTER TABLE…ADD COLUMN operation) has not been tested and is unlikely to work. We need a test that flushes the redo log and kills the server at the end of innobase_instant_add_try(), before the ALTER TABLE transaction is committed.
-
Marko Mäkelä authored
btr_cur_instant_init_low(): Read and validate the 'default row' btr_cur_instant_root_init(): Avoid tripping a debug assertion innobase_add_instant_try(): Use field_ref_zero for empty values. Tolerate the hidden FTS_DOC_ID column.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 28 Sep, 2017 7 commits
-
-
Marko Mäkelä authored
The space management and recovery of operations on off-page columns relies on the undo log records. Inserting off-page columns during rollback could break this. The solution to the rollback problem is simple: Do not duplicate 'default row' data in individual records. In this way, the ROLLBACK of an UPDATE to a record that was originally written before instant ADD COLUMN, would never have to insert off-page records, even if there were instantly added BLOB columns with long DEFAULT values. This will also reduce space consumption (a simple form of compression). dtuple_t::trim(index): Omit a redundant suffix of an index tuple right before insert or update. After instant ADD COLUMN, if the last fields of a clustered index tuple match the 'default row', there will be no need to store them. While trimming the entry, we must hold a page latch, so that the table cannot be emptied and the 'default row' be deleted. btr_cur_optimistic_update(), btr_cur_pessimistic_update(), row_upd_clust_rec_by_insert(), row_ins_clust_index_entry_low(): Invoke dtuple_t::trim() if needed. row_ins_clust_index_entry(): Restore dtuple_t::n_fields after calling row_ins_clust_index_entry_low(). rec_get_converted_size(), rec_get_converted_size_comp(): Allow the number of fields to be between n_core_fields and n_fields. rec_convert_dtuple_to_rec_comp(): Assign the status bits based on the number of fields.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
innobase_add_instant_try(): If the table is empty, remove the 'default row' instead of adding one. dict_index_t::commit_instant_copy(): Allow !instant.is_instant() for the clustered index. ha_innobase_inplace_ctx::commit_instant(): Allow !instant_table->is_instant()
-
Marko Mäkelä authored
row_sel_try_search_shortcut_for_mysql(): Skip the 'default row', like row_sel_try_search_shortcut() does
-
- 27 Sep, 2017 5 commits
-
-
Marko Mäkelä authored
row_upd_changes_field_size_or_external(): Revert some unnecessary changes, and assert that the update vector does not contain the magic value UNIV_SQL_DEFAULT. row_upd_rec_in_place(): Remove a redundant assertion. rec_set_nth_field() already asserts the same. row_upd_build_sec_rec_difference_binary(): Assert that there are no default values in a secondary index tuple.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The ALGORITHM=INPLACE interface is not accessible to temporary tables. Therefore, instant ADD COLUMN cannot be used either. dict_table_t::is_temporary(): New predicate. dict_table_is_temporary(): Define as a wrapper macro.
-