Closed laurynas-biveinis closed 7 months ago
This is done in preparation for always flushing DD transactions: it will require a new flag m_dd_transaction
or similar in Rdb_transaction
, which would have too similar a name yet completely different functionality from m_ddl_transaction
. Thus removing the latter first.
@luqun , removed TABLE_CATEGORY_TEMPORARY
and rebased; ready for review
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
looks like rocksdb.rqg_runtime MTR failed. still investigating
looks like rocksdb.rqg_runtime MTR failed. still investigating
The issue is related to DDL skip uniq check, such as following code. Add PK should fail due to duplicate col2 value.
create table t1(col1 int, col2 int, col3 varchar(16));
insert into t1 values(0,0,'0');
insert into t1 values(1,0,'0');
ALTER TABLE t1 ADD KEY ( col1 );
ALTER TABLE t1 ADD PRIMARY KEY ( col2 );
check table t1;
The DDL transaction flag cannot be folded into unique check flag, the original design idea was broken. Thinking of alternatives
The DD durability PR is https://github.com/facebook/mysql-5.6/pull/1403. I will scavenge non-functional skip_unique_check
cleanups from this PR
The cleanups are in https://github.com/facebook/mysql-5.6/pull/1404
With DD tables in MyRocks, the property of whether it is safe to skip uniqueness checks on writes should be resolved on a table, not transaction level. Thus fold the logic of setting m_ddl_transaction to true into ha_rocksdb::skip_unique. At the same time this flag is duplicated between struct update_row_info and callstack of affected functions, thus remove it from the callstack.