List:Commits« Previous MessageNext Message »
From:marko.makela Date:February 7 2012 2:36pm
Subject:bzr push into mysql-trunk-wl5534-stage branch (marko.makela:3824 to 3826)
View as plain text  
 3826 Marko Mäkelä	2012-02-07
      Non-functional changes:
      
      btr_cur_del_mark_set_clust_rec_log(), btr_cur_del_mark_set_clust_rec():
      Remove constant parameters flags=BTR_NO_LOCKING_FLAG, val=TRUE.
      The redo log apply (btr_cur_parse_del_mark_set_clust_rec) is only
      interested in BTR_KEEP_SYS_FLAG, which was never set.
      
      Approved by Jimmy Yang on IM.

    modified:
      storage/innobase/btr/btr0cur.cc
      storage/innobase/include/btr0cur.h
      storage/innobase/row/row0upd.cc
 3825 Marko Mäkelä	2012-02-07
      Non-functional change: Simplify assertions.
      
      row_ins_duplicate_error_in_clust() is only called from one place,
      and always on the clustered index. Replace ut_a() with ut_ad() or ut_error.
      
      Approved by Jimmy Yang on IM.

    modified:
      storage/innobase/row/row0ins.cc
 3824 Marko Mäkelä	2012-02-06
      WL#5526 non-functional clean-up after review comments from Sunny Bains
      
      dict_table_close(): Determine if indexes can be dropped only if !dict_locked.
      
      dict_table_check_for_dup_indexes(): Remove a goto label.
      
      online_retry_drop_indexes_with_trx(): New function, for reusing a
      transaction object for dropping incomplete indexes.
      
      row_log_online_op(), row_log_apply_op(): Replace 6 with DATA_TRX_ID_LEN.

    modified:
      storage/innobase/dict/dict0dict.cc
      storage/innobase/handler/handler0alter.cc
      storage/innobase/row/row0log.cc
=== modified file 'storage/innobase/btr/btr0cur.cc'
--- a/storage/innobase/btr/btr0cur.cc	revid:marko.makela@stripped
+++ b/storage/innobase/btr/btr0cur.cc	revid:marko.makela@oracle.com-20120207143543-siay20qicufojxap
@@ -2606,17 +2606,13 @@ UNIV_INLINE
 void
 btr_cur_del_mark_set_clust_rec_log(
 /*===============================*/
-	ulint		flags,	/*!< in: flags */
 	rec_t*		rec,	/*!< in: record */
 	dict_index_t*	index,	/*!< in: index of the record */
-	ibool		val,	/*!< in: value to set */
 	trx_id_t	trx_id,	/*!< in: transaction id */
 	roll_ptr_t	roll_ptr,/*!< in: roll ptr to the undo log record */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
 	byte*	log_ptr;
-	ut_ad(flags < 256);
-	ut_ad(val <= 1);
 
 	ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table));
 
@@ -2632,10 +2628,8 @@ btr_cur_del_mark_set_clust_rec_log(
 		return;
 	}
 
-	mach_write_to_1(log_ptr, flags);
-	log_ptr++;
-	mach_write_to_1(log_ptr, val);
-	log_ptr++;
+	*log_ptr++ = 0;
+	*log_ptr++ = 1;
 
 	log_ptr = row_upd_write_sys_vals_to_log(
 		index, trx_id, roll_ptr, log_ptr, mtr);
@@ -2738,12 +2732,10 @@ UNIV_INTERN
 ulint
 btr_cur_del_mark_set_clust_rec(
 /*===========================*/
-	ulint		flags,	/*!< in: undo logging and locking flags */
 	buf_block_t*	block,	/*!< in/out: buffer block of the record */
 	rec_t*		rec,	/*!< in/out: record */
 	dict_index_t*	index,	/*!< in: clustered index of the record */
 	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
-	ibool		val,	/*!< in: value to set */
 	que_thr_t*	thr,	/*!< in: query thread */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
@@ -2768,7 +2760,7 @@ btr_cur_del_mark_set_clust_rec(
 	ut_ad(dict_index_is_clust(index));
 	ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets)));
 
-	err = lock_clust_rec_modify_check_and_lock(flags, block,
+	err = lock_clust_rec_modify_check_and_lock(BTR_NO_LOCKING_FLAG, block,
 						   rec, index, offsets, thr);
 
 	if (err != DB_SUCCESS) {
@@ -2776,7 +2768,7 @@ btr_cur_del_mark_set_clust_rec(
 		return(err);
 	}
 
-	err = trx_undo_report_row_operation(flags, TRX_UNDO_MODIFY_OP, thr,
+	err = trx_undo_report_row_operation(0, TRX_UNDO_MODIFY_OP, thr,
 					    index, NULL, NULL, 0, rec,
 					    &roll_ptr);
 	if (err != DB_SUCCESS) {
@@ -2790,17 +2782,14 @@ btr_cur_del_mark_set_clust_rec(
 
 	page_zip = buf_block_get_page_zip(block);
 
-	btr_blob_dbg_set_deleted_flag(rec, index, offsets, val);
-	btr_rec_set_deleted_flag(rec, page_zip, val);
+	btr_blob_dbg_set_deleted_flag(rec, index, offsets, TRUE);
+	btr_rec_set_deleted_flag(rec, page_zip, TRUE);
 
 	trx = thr_get_trx(thr);
 
-	if (!(flags & BTR_KEEP_SYS_FLAG)) {
-		row_upd_rec_sys_fields(rec, page_zip,
-				       index, offsets, trx, roll_ptr);
-	}
+	row_upd_rec_sys_fields(rec, page_zip, index, offsets, trx, roll_ptr);
 
-	btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx->id,
+	btr_cur_del_mark_set_clust_rec_log(rec, index, trx->id,
 					   roll_ptr, mtr);
 
 	return(err);

=== modified file 'storage/innobase/include/btr0cur.h'
--- a/storage/innobase/include/btr0cur.h	revid:marko.makela@stripped716-lz9mnwqvx94bznb1
+++ b/storage/innobase/include/btr0cur.h	revid:marko.makela@strippedicufojxap
@@ -353,12 +353,10 @@ UNIV_INTERN
 ulint
 btr_cur_del_mark_set_clust_rec(
 /*===========================*/
-	ulint		flags,	/*!< in: undo logging and locking flags */
 	buf_block_t*	block,	/*!< in/out: buffer block of the record */
 	rec_t*		rec,	/*!< in/out: record */
 	dict_index_t*	index,	/*!< in: clustered index of the record */
 	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
-	ibool		val,	/*!< in: value to set */
 	que_thr_t*	thr,	/*!< in: query thread */
 	mtr_t*		mtr)	/*!< in: mtr */
 	__attribute__((nonnull));

=== modified file 'storage/innobase/row/row0ins.cc'
--- a/storage/innobase/row/row0ins.cc	revid:marko.makela@strippedvx94bznb1
+++ b/storage/innobase/row/row0ins.cc	revid:marko.makela@stripped
@@ -1953,7 +1953,7 @@ row_ins_duplicate_error_in_clust(
 
 	UT_NOT_USED(mtr);
 
-	ut_a(dict_index_is_clust(cursor->index));
+	ut_ad(dict_index_is_clust(cursor->index));
 	ut_ad(dict_index_is_unique(cursor->index));
 
 	/* NOTE: For unique non-clustered indexes there may be any number
@@ -2063,8 +2063,8 @@ row_ins_duplicate_error_in_clust(
 			}
 		}
 
-		ut_a(!dict_index_is_clust(cursor->index));
 		/* This should never happen */
+		ut_error;
 	}
 
 	err = DB_SUCCESS;

=== modified file 'storage/innobase/row/row0upd.cc'
--- a/storage/innobase/row/row0upd.cc	revid:marko.makela@stripped
+++ b/storage/innobase/row/row0upd.cc	revid:marko.makela@oracle.com-20120207143543-siay20qicufojxap
@@ -2023,8 +2023,8 @@ row_upd_clust_rec_by_insert(
 		ut_ad(page_rec_is_user_rec(rec));
 
 		err = btr_cur_del_mark_set_clust_rec(
-			BTR_NO_LOCKING_FLAG, btr_cur_get_block(btr_cur),
-			rec, index, offsets, TRUE, thr, mtr);
+			btr_cur_get_block(btr_cur), rec, index, offsets,
+			thr, mtr);
 		if (err != DB_SUCCESS) {
 err_exit:
 			mtr_commit(mtr);
@@ -2261,8 +2261,8 @@ row_upd_del_mark_clust_rec(
 	locks, because we assume that we have an x-lock on the record */
 
 	err = btr_cur_del_mark_set_clust_rec(
-		BTR_NO_LOCKING_FLAG, btr_cur_get_block(btr_cur),
-		btr_cur_get_rec(btr_cur), index, offsets, TRUE, thr, mtr);
+		btr_cur_get_block(btr_cur), btr_cur_get_rec(btr_cur),
+		index, offsets, thr, mtr);
 	if (err == DB_SUCCESS && referenced) {
 		/* NOTE that the following call loses the position of pcur ! */
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5534-stage branch (marko.makela:3824 to 3826) marko.makela8 Feb