diff options
Diffstat (limited to 'storage/xtradb/include/row0row.ic')
-rw-r--r-- | storage/xtradb/include/row0row.ic | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/storage/xtradb/include/row0row.ic b/storage/xtradb/include/row0row.ic index 831c2339d96..ac62422be1f 100644 --- a/storage/xtradb/include/row0row.ic +++ b/storage/xtradb/include/row0row.ic @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -104,6 +104,33 @@ row_get_rec_roll_ptr( return(trx_read_roll_ptr(rec + offset + DATA_TRX_ID_LEN)); } +/*****************************************************************//** +When an insert or purge to a table is performed, this function builds +the entry to be inserted into or purged from an index on the table. +@return index entry which should be inserted or purged, or NULL if the +externally stored columns in the clustered index record are +unavailable and ext != NULL */ +UNIV_INLINE +dtuple_t* +row_build_index_entry( +/*==================*/ + const dtuple_t* row, /*!< in: row which should be + inserted or purged */ + const row_ext_t* ext, /*!< in: externally stored column + prefixes, or NULL */ + dict_index_t* index, /*!< in: index on the table */ + mem_heap_t* heap) /*!< in: memory heap from which + the memory for the index entry + is allocated */ +{ + dtuple_t* entry; + + ut_ad(dtuple_check_typed(row)); + entry = row_build_index_entry_low(row, ext, index, heap); + ut_ad(!entry || dtuple_check_typed(entry)); + return(entry); +} + /*******************************************************************//** Builds from a secondary index record a row reference with which we can search the clustered index record. */ |