List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 11 2012 12:47pm
Subject:bzr push into mysql-trunk-wl6255 branch (marko.makela:3960 to 3962) WL#6255
View as plain text  
 3962 Marko Mäkelä	2012-06-11
      WL#6255 bug fix for applying buffered delete with ADD PRIMARY KEY.
      
      row_log_table_apply_delete(): Remove the parameter trx_id_col.
      Rename new_trx_id_col to trx_id_col. In the buffered record, we have
      the PRIMARY KEY columns as they appear in the new table.
      Thus, the structure of the old clustered index records is irrelevant.
      
      This addresses rb:1105 Problem 12.

    modified:
      storage/innobase/row/row0log.cc
 3961 Marko Mäkelä	2012-06-11
      Attempt to fix WL#6255 rb:1105 Problem 9,11,13.
      
      row_log_table_apply_update(): Add a missing mtr_commit() call.

    modified:
      storage/innobase/row/row0log.cc
 3960 Marko Mäkelä	2012-06-11
      Silence some compiler warnings.

    modified:
      storage/innobase/handler/handler0alter.cc
=== modified file 'storage/innobase/row/row0log.cc'
--- a/storage/innobase/row/row0log.cc	revid:marko.makela@stripped611112927-4cdxouri31h31zw7
+++ b/storage/innobase/row/row0log.cc	revid:marko.makela@strippedibde2a9mwvn0
@@ -1326,9 +1326,6 @@ row_log_table_apply_delete(
 /*=======================*/
 	que_thr_t*		thr,		/*!< in: query graph */
 	ulint			trx_id_col,	/*!< in: position of
-						DB_TRX_ID in the
-						old clustered index */
-	ulint			new_trx_id_col,	/*!< in: position of
 						DB_TRX_ID in the new
 						clustered index */
 	const mrec_t*		mrec,		/*!< in: merge record */
@@ -1406,7 +1403,7 @@ all_done:
 		ut_ad(len == DATA_TRX_ID_LEN);
 		const void*	rec_trx_id
 			= rec_get_nth_field(btr_pcur_get_rec(&pcur), offsets,
-					    new_trx_id_col, &len);
+					    trx_id_col, &len);
 		ut_ad(len == DATA_TRX_ID_LEN);
 		if (memcmp(mrec_trx_id, rec_trx_id, DATA_TRX_ID_LEN)) {
 			goto all_done;
@@ -1489,6 +1486,7 @@ row_log_table_apply_update(
 	    || btr_pcur_get_low_match(&pcur) < index->n_uniq) {
 		mtr_commit(&mtr);
 insert:
+		ut_ad(mtr.state == MTR_COMMITTED);
 		/* The row was not found. Insert it. */
 		error = row_log_table_apply_insert_low(
 			thr, row, offsets_heap, heap, log->table, dup);
@@ -1580,6 +1578,7 @@ delete_insert:
 
 		/* Unless we called row_log_table_apply_delete_low(),
 		this will likely cause a duplicate key error. */
+		mtr_commit(&mtr);
 		goto insert;
 	}
 
@@ -1784,7 +1783,7 @@ row_log_table_apply_op(
 		next_mrec = mrec + rec_offs_data_size(offsets);
 
 		*error = row_log_table_apply_delete(
-			thr, trx_id_col, new_trx_id_col,
+			thr, new_trx_id_col,
 			mrec, offsets, offsets_heap, heap,
 			log->table);
 		break;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl6255 branch (marko.makela:3960 to 3962) WL#6255marko.makela11 Jun