List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 20 2012 12:24pm
Subject:bzr push into mysql-trunk-wl6255 branch (marko.makela:4008 to 4009) WL#6255
View as plain text  
 4009 Marko Mäkelä	2012-06-20
      Adjust index cardinality statistics calculation for WL#6255.
      
      Do not skip statistics calculation if the table is being rebuilt online.
      The outcome of the function dict_index_is_online_ddl() changes a bit in
      WL#6255. Before WL#6255, it could only hold for secondary indexes.
      After WL#6255, if dict_index_is_online_ddl() holds for a clustered index,
      it means that the table is fully accessible, but it is merely being rebuilt
      online and all changes to the table must be logged.
      
      Index cardinality statistics calculation does not modify the table.
      Therefore, it must continue "business as usual" for tables that happen
      to be subjected to online rebuild.
      
      This might have caused Valgrind warnings about reading uninitialized memory
      in main.innodb_icp_all.

    modified:
      storage/innobase/dict/dict0stats.cc
 4008 Marko Mäkelä	2012-06-20
      WL#6255: Add a test case suggested by Jimmy Yang.

    modified:
      mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result
      mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
=== modified file 'storage/innobase/dict/dict0stats.cc'
--- a/storage/innobase/dict/dict0stats.cc	revid:marko.makela@stripped
+++ b/storage/innobase/dict/dict0stats.cc	revid:marko.makela@oracle.com-20120620120926-3dmjk1i2757lehhj
@@ -352,10 +352,11 @@ dict_stats_snapshot_create(
 	     index != NULL;
 	     index = dict_table_get_next_index(index)) {
 
-		if (index->type & DICT_FTS
-		    || dict_index_is_online_ddl(index)
+		if ((index->type & DICT_FTS)
 		    || dict_index_is_corrupted(index)
-		    || index->to_be_dropped) {
+		    || index->to_be_dropped
+		    || (!dict_index_is_clust(index)
+			&& dict_index_is_online_ddl(index))) {
 			continue;
 		}
 
@@ -404,10 +405,11 @@ dict_stats_snapshot_create(
 	     index != NULL;
 	     index = dict_table_get_next_index(index)) {
 
-		if (index->type & DICT_FTS
-		    || dict_index_is_online_ddl(index)
+		if ((index->type & DICT_FTS)
 		    || dict_index_is_corrupted(index)
-		    || index->to_be_dropped) {
+		    || index->to_be_dropped
+		    || (!dict_index_is_clust(index)
+			&& dict_index_is_online_ddl(index))) {
 			continue;
 		}
 
@@ -606,8 +608,10 @@ dict_stats_update_transient_for_index(
 /*==================================*/
 	dict_index_t*	index)	/*!< in/out: index */
 {
-	if (dict_index_is_online_ddl(index) || (index->type & DICT_FTS)
-	    || dict_index_is_corrupted(index)) {
+	if ((index->type & DICT_FTS)
+	    || dict_index_is_corrupted(index)
+	    || (!dict_index_is_clust(index)
+		&& dict_index_is_online_ddl(index))) {
 		return(0);
 	}
 
@@ -1961,7 +1965,6 @@ dict_stats_update_persistent(
 	index = dict_table_get_first_index(table);
 
 	if (index == NULL
-	    || dict_index_is_online_ddl(index)
 	    || dict_index_is_corrupted(index)
 	    || (index->type | DICT_UNIQUE) != (DICT_CLUSTERED | DICT_UNIQUE)) {
 
@@ -2246,10 +2249,11 @@ dict_stats_save(
 	     index != NULL;
 	     index = dict_table_get_next_index(index)) {
 
-		if (index->type & DICT_FTS
-		    || dict_index_is_online_ddl(index)
+		if ((index->type & DICT_FTS)
 		    || dict_index_is_corrupted(index)
-		    || index->to_be_dropped) {
+		    || index->to_be_dropped
+		    || (!dict_index_is_clust(index)
+			&& dict_index_is_online_ddl(index))) {
 			continue;
 		}
 

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