List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:June 12 2012 10:42am
Subject:bzr push into mysql-trunk branch (vasil.dimov:3993 to 3995) WL#6189
View as plain text  
 3995 Vasil Dimov	2012-06-12
      Followup to WL#6189 Turn InnoDB persistent statistics ON by default
      Adjust mtr tests, part 30.
      Persistent stats use a different sampling algorithm so it is possible
      that the stats numbers differ from transient stats.
      Also, persistent stats are updated less frequently or with a delay, so
      it is possible that persistent stats are not up to date as transient were
      even if both algorithms would return the same results.
      The order of the returned rows by a SELECT query depends on the stats and
      thus, if possible, we fix tests by prepending "-- sorted_result" to SELECTs
      that happen to return rows in different order.
      If possible, each failing test was fixed by manually running ANALYZE TABLE.
      This is doable if both transient and persistent sampling algorithms end up
      with the same numbers for the given table and its data.
      If persistent stats result in different stats, then test failures were fixed
      by forcing the usage of transient stats for the table by using
      Intentionally do not fix the tests by using persistent stats and adjustin
      the output of EXPLAIN in .result files because a different execution plan
      may cause a different code path to be executed, than the one originally
      intended in the test.

 3994 Vasil Dimov	2012-06-12
      Add assertions in dict_stats_deinit() that it is called under
      dict_sys->mutex and that table->n_ref_count is 0. Deinitializing
      stats of a table that is being used (table->n_ref_count > 0) may
      lead to reading uninitialized memory.
      Also assert in dict_stats_snapshot_create() that the table stats are
      initialized. Copying uninitialized stats does not make sense.

 3993 Hemant Kumar	2012-06-12
      Fixing rpl_packet test failure after discussing it with Joro.

=== modified file 'mysql-test/suite/funcs_1/views/'
--- a/mysql-test/suite/funcs_1/views/
+++ b/mysql-test/suite/funcs_1/views/	revid:vasil.dimov@stripped
@@ -2488,6 +2488,13 @@ Insert into t2 values (2, 'double',    6
 Insert into t2 values (3, 'single-f3', 6, '3')  ;
 Insert into t2 values (4, 'single',    4, '4')  ;
+-- disable_query_log
+-- disable_result_log
+analyze table t1;
+analyze table t2;
+-- enable_result_log
+-- enable_query_log
 # Testcase ;
 create or replace view test.v1 as
 Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,

=== modified file 'storage/innobase/dict/'
--- a/storage/innobase/dict/
+++ b/storage/innobase/dict/	revid:vasil.dimov@stripped
@@ -339,6 +339,8 @@ dict_stats_snapshot_create(
 	dict_table_stats_lock(table, RW_X_LATCH);
+	ut_a(table->stat_initialized);
 	/* Estimate the size needed for the table and all of its indexes */
 	heap_size = 0;

=== modified file 'storage/innobase/include/dict0stats.ic'
--- a/storage/innobase/include/dict0stats.ic
+++ b/storage/innobase/include/dict0stats.ic	revid:vasil.dimov@stripped
@@ -194,6 +194,10 @@ dict_stats_deinit(
 	dict_table_t*	table)	/*!< in/out: table */
+	ut_ad(mutex_own(&dict_sys->mutex));
+	ut_a(table->n_ref_count == 0);
 	dict_table_stats_lock(table, RW_X_LATCH);
 	if (!table->stat_initialized) {

No bundle (reason: useless for push emails).
bzr push into mysql-trunk branch (vasil.dimov:3993 to 3995) WL#6189vasil.dimov12 Jun