- 15 Oct, 2018 6 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
btr_cur_pessimistic_update(): Invoke dtuple_convert_big_rec() for metadata records if the record is too large, or if the metadata field is not yet marked as externally stored. row_upd_index_replace_metadata(): Correctly copy the ALTER TABLE metadata field.
-
Marko Mäkelä authored
btr_cur_trim(): Handle the generic ALTER TABLE metadata record. btr_cur_pessimistic_update(): Do not invoke dtuple_convert_big_rec() for ALTER TABLE metadata records on rollback. row_undo_mod_clust(): Relax an assertion. The delete-mark flag was repurposed for ALTER TABLE metadata records. row_upd_index_replace_metadata(): Remove a bogus assertion which would not hold on rollback during recovery.
-
- 14 Oct, 2018 5 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_undo_mod_parse_undo_rec(): Handle both types of metadata records. row_upd_index_replace_metadata(): Correctly process DB_TRX_ID,DB_ROLL_PTR, and assert that a new value for the metadata BLOB is present.
-
Alexander Barkov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 12 Oct, 2018 2 commits
-
-
Marko Mäkelä authored
row_build_index_entry_low(): Clean up the code, removing redundant variables and conditions. For instantly dropped columns, generate a dummy value that is NULL, the empty string, or a fixed length of NUL bytes, depending on the type of the dropped column. FIXME: For some reason, during the test gcol.innodb_virtual_debug_purge we are returning NULL for indexes on virtual columns, meaning that purge on the indexes is being skipped. Does this lead to missed purge, or is it merely causing unnecessary memory allocation? Why are we not evaluating the virtual column values before calling this function? (And why not write all index keys (virtual columns or spatial index MBR) directly to the undo log records?)
-
Marko Mäkelä authored
row_upd_clust_rec_by_insert_inherit_func(): On the update of PRIMARY KEY of a record that contained a dropped column whose value was stored externally, we will be inserting a dummy NULL or empty string value to the field of the dropped column. The externally stored column would eventually be dropped when purge removes the delete-marked record for the old PRIMARY KEY value.
-
- 11 Oct, 2018 7 commits
-
-
Marko Mäkelä authored
-
Eugene Kosov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
dict_index_t::clear_instant_alter(): Move the fields for the dropped columns to the end, and sort the surviving index fields in ascending order of column position.
-
Eugene Kosov authored
ib_counter_t: make all reads/writes to m_counter relaxed atomical
-
Marko Mäkelä authored
Reduce the test diff from 10.4.
-
Marko Mäkelä authored
This reverts commit 26897301 and adds some changes. Only a table on which the 10.3 ADD COLUMN...LAST was performed can "lose its instantness" when it becomes empty. After instant DROP COLUMN or reordering columns, we cannot simply convert the table to the canonical format, because the data dictionary cache and all possibly existing references to it from other client connection threads would have to be adjusted. rec_init_offsets_comp_ordinary(): Remove a FIXME comment. row_log_allocate(): Replace dict_index_t::is_instant() with a more appropriate condition that ignores dict_table_t::instant.
-
- 10 Oct, 2018 15 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
On the rollback of changes to SYS_COLUMNS, MDEV-15562 will break the assumption that the only instantaneous changes to columns are the addition to the end of the column list. The function dict_table_t::rollback_instant(unsigned n) is inherently incompatible with instantly dropping or reordering columns. When a change to SYS_COLUMNS is rolled back, we must simply evict the affected table definition, at the end of the rollback. We cannot free the table object immediately, because the current transaction that is being rolled back may be holding a lock on the table and its metadata record. dict_table_remove_from_cache_low(): Replaced by dict_table_remove_from_cache(). dict_table_remove_from_cache(): Add a third parameter keep=false, so that the table can be freed by the caller. trx_lock_t::evicted_tables: List of tables on which trx_t::evict_table() was invoked. trx_t::evict_table(): Evict a table definition during rollback. trx_commit_in_memory(): Empty the trx->lock.evicted_tables list after the locks were released, by freeing the table objects. row_undo_ins_remove_clust_rec(), row_undo_mod_clust_low(): Invoke trx_t::evict_table() on the affected table if a change to SYS_COLUMNS is being rolled back.
-
Marko Mäkelä authored
The error handling for ALTER TABLE…ALGORITHM=COPY as well as CREATE TABLE used to commit the CREATE TABLE transaction and then issue DROP TABLE in a separate transaction. This is unnecessarily breaking atomicity during DDL operations. Let us revise it so that the DROP TABLE will be executed within the same transaction, which will finally be rolled back. FIXME: Introduce an undo log record so that the data file would be deleted on rollback and no DROP TABLE would be needed at all. FIXME: Avoid unnecessary access to per-table tablespace during DROP TABLE. If the .ibd file is going to be deleted anyway, we should not bother to mark the pages free. dict_create_add_foreigns_to_dictionary(): Do not commit the transaction. We want simple rollback in case dict_load_foreigns() would fail. create_table_info_t::create_table(), row_create_index_for_mysql(), row_table_add_foreign_constraints(): Before invoking rollback, drop the table. Rollback would invoke trx_t::evict_table(), and after that dropping the table would be a no-op. ha_innobase::create(): Before rollback, drop the table. If the SQL layer invoked ha_innobase::delete_table() later, it would be a no-op because the rollback would have invoked trx_t::evict_table().
-
Marko Mäkelä authored
dict_index_t::first_user_field(): Return the first data field in a clustered index, that is, the field after the PRIMARY KEY and the two system columns DB_TRX_ID, DB_ROLL_PTR. dtuple_convert_big_rec(): Remove some local variables.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Ensure that no redo log checkpoint occurs in a critical section of a recovery test.
-
Marko Mäkelä authored
The test is shutting down InnoDB, corrupting a file, and finally restarting InnoDB. Before the shutdown, the test created the table and inserted some records. Before MDEV-12288, there would be no access to the table after server restart, but after MDEV-12288 purge would reset the transaction identifier after the INSERT, and this would sometimes happen after the restart. To make the test deterministic, wait for purge to complete before the shutdown.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 09 Oct, 2018 5 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
FIXME: DB_TRX_ID,DB_ROLL_PTR are not reset for the metadata record
-
Marko Mäkelä authored
FIXME: The virtual column code does not really support any reordering of virtual columns. The function check_v_col_in_order() should be removed and all the code fixed. ha_innobase::check_if_supported_inplace_alter(): For now, forbid ADD COLUMN of a stored column together with ADD/DROP of virtual columns. This works around an assertion failure in gcol.innodb_virtual_basic line 541. dict_table_t::instant_column(): Copy and adjust v_cols[]. dict_table_t::rollback_instant(): Roll back v_cols[]. innobase_build_col_map(): Skip added virtual columns. prepare_inplace_add_virtual(): Correctly compute num_to_add_vcol. Remove some unnecessary code. Note that the call to innodb_base_col_setup() should be executed later. innobase_add_virtual_try(), innobase_drop_virtual_try(): Let the caller invoke innodb_update_cols(). ha_innobase::commit_inplace_alter_table(): Add a FIXME comment that we should not reload the table when virtual columns are added or dropped. Currently, reloading is the only way to add the base columns of virtual columns into the InnoDB data dictionary cache. innobase_instant_try(): If any virtual column is dropped, rewrite all virtual column metadata. Use a shortcut only for adding virtual columns. This is because innobase_drop_virtual_try() assumes that the dropped virtual columns still exist in the cache.
-
Sergei Petrunia authored
Make the testcase stable
-