- 16 Oct, 2018 5 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_build_index_entry_low(): Assert that when the value of a virtual column is not available, this can only happen when the index creation was completed but not committed yet. This change is not fixing any bug, making a debug assertion stricter, so that bugs can be caught in the future. Ultimately, we should change the InnoDB undo log format so that all actual secondary index keys are stored there, also for virtual or spatial indexes. In that way, purge and rollback would be more straightforward.
-
- 15 Oct, 2018 9 commits
-
-
Marko Mäkelä authored
FIXME: Why the condition !recovery?
-
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
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 12 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.
-