Commit a9ba3fe0 authored by unknown's avatar unknown
Browse files

Merge marko@bk-internal.mysql.com:/home/bk/mysql-5.0

into hundin.mysql.fi:/home/marko/j/mysql-5.0

parents c889ba5e 16ecc675
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1022,7 +1022,8 @@ btr_cur_optimistic_insert(

	/* Now, try the insert */

	*rec = page_cur_insert_rec_low(page_cursor, entry, index, NULL, mtr);
	*rec = page_cur_insert_rec_low(page_cursor, entry, index,
							NULL, NULL, mtr);
	if (!(*rec)) {
		/* If the record did not fit, reorganize */
		btr_page_reorganize(page, index, mtr);
+2 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ page_cur_rec_insert(
	page_cur_t*	cursor,	/* in: a page cursor */
	rec_t*		rec,	/* in: record to insert */
	dict_index_t*	index,	/* in: record descriptor */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) */
	mtr_t*		mtr);	/* in: mini-transaction handle */
/***************************************************************
Inserts a record next to page cursor. Returns pointer to inserted record if
@@ -160,6 +161,7 @@ page_cur_insert_rec_low(
	dtuple_t*	tuple,	/* in: pointer to a data tuple or NULL */
	dict_index_t*	index,	/* in: record descriptor */
	rec_t*		rec,	/* in: pointer to a physical record or NULL */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) or NULL */
	mtr_t*		mtr);	/* in: mini-transaction handle */
/*****************************************************************
Copies records from page to a newly created page, from a given record onward,
+4 −2
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ page_cur_tuple_insert(
	dict_index_t*	index,	/* in: record descriptor */
	mtr_t*		mtr)	/* in: mini-transaction handle */
{
	return(page_cur_insert_rec_low(cursor, tuple, index, NULL, mtr));
	return(page_cur_insert_rec_low(cursor, tuple, index, NULL, NULL, mtr));
}

/***************************************************************
@@ -211,8 +211,10 @@ page_cur_rec_insert(
	page_cur_t*	cursor,	/* in: a page cursor */
	rec_t*		rec,	/* in: record to insert */
	dict_index_t*	index,	/* in: record descriptor */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) */
	mtr_t*		mtr)	/* in: mini-transaction handle */
{
	return(page_cur_insert_rec_low(cursor, NULL, index, rec, mtr));
	return(page_cur_insert_rec_low(cursor, NULL, index, rec,
				offsets, mtr));
}
+21 −0
Original line number Diff line number Diff line
@@ -133,6 +133,27 @@ rec_set_status(
	rec_t*	rec,	/* in: physical record */
	ulint	bits);	/* in: info bits */

/**********************************************************
The following function is used to retrieve the info and status
bits of a record.  (Only compact records have status bits.) */
UNIV_INLINE
ulint
rec_get_info_and_status_bits(
/*==============*/
			/* out: info bits */
	rec_t*	rec,	/* in: physical record */
	ibool	comp);	/* in: TRUE=compact page format */
/**********************************************************
The following function is used to set the info and status
bits of a record.  (Only compact records have status bits.) */
UNIV_INLINE
void
rec_set_info_and_status_bits(
/*==============*/
	rec_t*	rec,	/* in: physical record */
	ibool	comp,	/* in: TRUE=compact page format */
	ulint	bits);	/* in: info bits */

/**********************************************************
The following function tells if record is delete marked. */
UNIV_INLINE
+47 −0
Original line number Diff line number Diff line
@@ -520,6 +520,53 @@ rec_set_status(
				REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT);
}

/**********************************************************
The following function is used to retrieve the info and status
bits of a record.  (Only compact records have status bits.) */
UNIV_INLINE
ulint
rec_get_info_and_status_bits(
/*==============*/
			/* out: info bits */
	rec_t*	rec,	/* in: physical record */
	ibool	comp)	/* in: TRUE=compact page format */
{
	ulint	bits;
#if (REC_NEW_STATUS_MASK >> REC_NEW_STATUS_SHIFT) \
& (REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)
# error "REC_NEW_STATUS_MASK and REC_INFO_BITS_MASK overlap"
#endif
	if (comp) {
		bits = rec_get_info_bits(rec, TRUE) | rec_get_status(rec);
	} else {
		bits = rec_get_info_bits(rec, FALSE);
		ut_ad(!(bits & ~(REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)));
	}
	return(bits);
}
/**********************************************************
The following function is used to set the info and status
bits of a record.  (Only compact records have status bits.) */
UNIV_INLINE
void
rec_set_info_and_status_bits(
/*==============*/
	rec_t*	rec,	/* in: physical record */
	ibool	comp,	/* in: TRUE=compact page format */
	ulint	bits)	/* in: info bits */
{
#if (REC_NEW_STATUS_MASK >> REC_NEW_STATUS_SHIFT) \
& (REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)
# error "REC_NEW_STATUS_MASK and REC_INFO_BITS_MASK overlap"
#endif
	if (comp) {
		rec_set_status(rec, bits & REC_NEW_STATUS_MASK);
	} else {
		ut_ad(!(bits & ~(REC_INFO_BITS_MASK >> REC_INFO_BITS_SHIFT)));
	}
	rec_set_info_bits(rec, bits & ~REC_NEW_STATUS_MASK, comp);
}

/**********************************************************
The following function tells if record is delete marked. */
UNIV_INLINE
Loading