List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 30 2012 9:59am
Subject:bzr push into mysql-trunk-wl6255 branch (marko.makela:3903 to 3904) WL#6255
View as plain text  
 3904 Marko Mäkelä	2012-05-30
      WL#6255: When rebuilding a table, tolerate discarded or missing tablespaces.
      
      dict_table_rename_in_cache(): Do not attempt to rename missing
      tablespace files.
      
      row_drop_table_for_mysql(): Do not attempt to drop missing files.

    modified:
      storage/innobase/dict/dict0dict.cc
      storage/innobase/row/row0mysql.cc
 3903 Marko Mäkelä	2012-05-30
      WL#6255 refactoring.
      
      row_ins_duplicate_error_in_clust(): In online table rebuild,
      if the PRIMARY KEY,DB_TRX_ID,DB_ROLL_PTR match with the record,
      return the special status code DB_SUCCESS_LOCKED_REC.
      
      row_log_table_apply_insert_low(): If the record already existed
      in the clustered index, return DB_SUCCESS.

    modified:
      storage/innobase/row/row0ins.cc
      storage/innobase/row/row0log.cc
=== modified file 'storage/innobase/dict/dict0dict.cc'
--- a/storage/innobase/dict/dict0dict.cc	revid:marko.makela@strippedn
+++ b/storage/innobase/dict/dict0dict.cc	revid:marko.makela@stripped
@@ -1429,7 +1429,9 @@ dict_table_rename_in_cache(
 	/* If the table is stored in a single-table tablespace, rename the
 	.ibd file */
 
-	if (table->space != 0) {
+	if (table->space != 0
+	    && !table->tablespace_discarded
+	    && !table->ibd_file_missing) {
 		if (table->dir_path_of_temp_table != NULL) {
 			ut_print_timestamp(stderr);
 			fputs("  InnoDB: Error: trying to rename a"

=== modified file 'storage/innobase/row/row0mysql.cc'
--- a/storage/innobase/row/row0mysql.cc	revid:marko.makela@stripped0082121-5klorcbaz3z1zuin
+++ b/storage/innobase/row/row0mysql.cc	revid:marko.makela@strippedphifboneyotm
@@ -3835,6 +3835,11 @@ check_next_foreign:
 
 		is_temp = table->flags2 & DICT_TF2_TEMPORARY;
 		ut_a(table->dir_path_of_temp_table == NULL || is_temp);
+		if (table->tablespace_discarded || table->ibd_file_missing) {
+			/* Do not attempt to drop known-to-be-missing
+			tablespaces. */
+			space_id = 0;
+		}
 
 		if (dict_table_has_fts_index(table)
 		    || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) {

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