List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 29 2012 2:48pm
Subject:bzr push into mysql-trunk-wl6255 branch (marko.makela:3893 to 3894) WL#6255
View as plain text  
 3894 Marko Mäkelä	2012-05-29
      WL#6255 bug fix
      
      row_ins_clust_index_entry_low(): Initialize rec for online logging.

    modified:
      storage/innobase/row/row0ins.cc
 3893 Marko Mäkelä	2012-05-29
      WL#6255 online table rebuild: Online log apply.
      
      The online table rebuild will be enabled in the interface in a
      subsequent commit.
      
      prepare_inplace_alter_table_dict(): Allocate the online rebuild log if
      needed.
      
      ha_innobase::inplace_alter_table(): Apply the bulk of the online
      rebuild log while not holding (m)any locks.
      
      innobase_online_rebuild_log_free(): New function, for freeing the
      online rebuild log. Called from rollback_inplace_alter_table()
      and ha_innobase::commit_inplace_alter_table().
      
      ha_innobase::commit_inplace_alter_table(): Apply and free the online
      rebuild log. Prevent old transactions from accessing the rebuilt
      table, because the history is missing. (This bug has been present
      since the InnoDB Plugin in MySQL 5.1.)
      
      row_log_table_apply_convert_mrec(): Auxiliary function for converting
      a log record on the clustered index record of the old table into a row
      tuple of the rebuilt table. (TODO: implement ADD COLUMN, DROP COLUMN
      and others.)
      
      row_log_table_apply(), row_log_table_apply_ops(), row_log_table_apply_op(),
      row_log_table_apply_insert_low(), row_log_table_apply_insert(),
      row_log_table_apply_delete_low(), row_log_table_apply_delete(),
      row_log_table_apply_update(): Apply the online rebuild log.
      
      row_merge_skip_rec(): Determine if a row should be skipped during
      online table rebuild. Rolled-back records will be skipped.
      
      row_merge_read_clustered_index(): Relax assertions. Check if an error
      has occurred during online table rebuild.
      
      row_merge_copy_blobs(): Non-functional changes.
      
      row_merge_insert_index_tuples(): Replace zip_size with old_table,
      so that row_merge_skip_rec() can be called.
      
      row_merge_drop_indexes(): Add debug assertions. This function should
      not be called during online table rebuild (the entire table should be
      dropped instead).
      
      row_merge_build_indexes(): Add the parameter altered_table, so that
      rows can be converted for dropping, adding or reordering columns (not
      implemented yet). Adjust assertions and conditions.

    modified:
      storage/innobase/handler/handler0alter.cc
      storage/innobase/include/row0log.h
      storage/innobase/include/row0merge.h
      storage/innobase/row/row0log.cc
      storage/innobase/row/row0merge.cc
=== modified file 'storage/innobase/row/row0ins.cc'
--- a/storage/innobase/row/row0ins.cc	revid:marko.makela@stripped943oamce2
+++ b/storage/innobase/row/row0ins.cc	revid:marko.makela@stripped
@@ -2159,7 +2159,6 @@ row_ins_clust_index_entry_low(
 	que_thr_t*	thr)	/*!< in: query thread */
 {
 	btr_cur_t	cursor;
-	rec_t*		rec;
 	ulint*		offsets		= NULL;
 	dberr_t		err;
 	ulint		n_unique;
@@ -2218,12 +2217,14 @@ err_exit:
 		/* There is already an index entry with a long enough common
 		prefix, we must convert the insert into a modify of an
 		existing record */
-		mem_heap_t*	entry_heap = mem_heap_create(1024);
+		mem_heap_t*	entry_heap	= mem_heap_create(1024);
 
 		err = row_ins_clust_index_entry_by_modify(
 			flags, mode, &cursor, &offsets, &offsets_heap,
 			entry_heap, &big_rec, entry, thr, &mtr);
 
+		rec_t*		rec		= btr_cur_get_rec(&cursor);
+
 		if (big_rec) {
 			ut_a(err == DB_SUCCESS);
 			/* Write out the externally stored
@@ -2250,8 +2251,6 @@ err_exit:
 			file, in case the file was somehow
 			truncated in the crash. */
 
-			rec = btr_cur_get_rec(&cursor);
-
 			DEBUG_SYNC_C_IF_THD(
 				thr_get_trx(thr)->mysql_thd,
 				"before_row_ins_upd_extern");

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl6255 branch (marko.makela:3893 to 3894) WL#6255marko.makela29 May