Closed laurynas-biveinis closed 5 months ago
Those incorrect moved-from uses I had seen in passing during MyRocks DDSE debugging
@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.
This pull request has been merged in facebook/mysql-5.6@e5b18aae04c81f0143ad42924eeed9637c05cb71.
Rdb_tbl_def class has a move constructor-like two-arg constructor that takes the ownership of passed object's m_key_descr_arr field. Signify this moved-from state in the object by resetting m_pk_index-which is a related-field to MAX_INDEXES + 1, and add extra asserts that these and other related fields are not accessed in moved-from objects.
At the same time remove redundant "explicit" specifiers from two-argument constructors and clean them up to use initializer lists consistently.