List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:June 7 2012 12:42pm
Subject:bzr push into mysql-trunk branch (vasil.dimov:3962 to 3963)
View as plain text  
 3963 Vasil Dimov	2012-06-07
      Add valgrind checks to help track down this warn:
      
        main.ctype_utf8mb4_innodb                w6 [ fail ]  Found warnings/errors in server log file!
                Test ended at 2012-06-04 18:21:00
        line
        ==2236== Thread 15:
        ==2236== Uninitialised byte(s) found during client check request
        ==2236==    at 0xC52835: dtuple_validate(dtuple_struct const*) (data0data.cc:263)
        ==2236==    by 0xB0B84D: page_cur_search_with_match(buf_block_struct const*, dict_index_struct const*, dtuple_struct const*, unsigned long, unsigned long*, unsigned long*, unsigned long*, unsigned long*, page_cur_struct*) (page0cur.cc:300)
        ==2236==    by 0xC19C08: btr_cur_search_to_nth_level(dict_index_struct*, unsigned long, dtuple_struct const*, unsigned long, unsigned long, btr_cur_struct*, unsigned long, char const*, unsigned long, mtr_struct*) (btr0cur.cc:760)
        ==2236==    by 0xB5365C: row_ins_index_entry_low(unsigned long, dict_index_struct*, dtuple_struct*, unsigned long, que_thr_struct*) (row0ins.cc:2173)
        ==2236==    by 0xB57323: row_ins_index_entry(dict_index_struct*, dtuple_struct*, unsigned long, unsigned long, que_thr_struct*) (row0ins.cc:2445)
        ==2236==    by 0xB57430: row_ins_index_entry_step(ins_node_struct*, que_thr_struct*) (row0ins.cc:2529)
        ==2236==    by 0xB5751E: row_ins(ins_node_struct*, que_thr_struct*) (row0ins.cc:2660)
        ==2236==    by 0xB57800: row_ins_step(que_thr_struct*) (row0ins.cc:2778)
        ==2236==    by 0xB31523: que_thr_step(que_thr_struct*) (que0que.cc:1085)
        ==2236==    by 0xB3180B: que_run_threads_low(que_thr_struct*) (que0que.cc:1167)
        ==2236==    by 0xB319B3: que_run_threads(que_thr_struct*) (que0que.cc:1208)
        ==2236==    by 0xB3245B: que_eval_sql(pars_info_struct*, char const*, unsigned long, trx_struct*) (que0que.cc:1285)
        ==2236==    by 0xC8101E: dict_stats_save_index_stat(dict_index_struct*, long, char const*, unsigned long, unsigned long*, char const*) (dict0stats.cc:1788)
        ==2236==    by 0xC81836: dict_stats_save(dict_table_struct*, unsigned long) (dict0stats.cc:2003)
        ==2236==    by 0xC82B5C: dict_stats_update(dict_table_struct*, dict_stats_upd_option, bool) (dict0stats.cc:2651)
        ==2236==    by 0xC83ACA: pop_from_auto_recalc_list_and_recalc() (dict0stats_background.cc:338)
        ==2236==  Address 0xbbc24d0 is 704 bytes inside a block of size 1,384 alloc'd
        ==2236==    at 0x4C216FB: malloc (vg_replace_malloc.c:236)
        ==2236==    by 0xAF44E4: mem_area_alloc(unsigned long*, mem_pool_struct*) (mem0pool.cc:381)
        ==2236==    by 0xAF29A3: mem_heap_create_block(mem_block_info_struct*, unsigned long, unsigned long, char const*, unsigned long) (mem0mem.cc:334)
        ==2236==    by 0xAF2D38: mem_heap_add_block(mem_block_info_struct*, unsigned long) (mem0mem.cc:448)
        ==2236==    by 0xB2A2AE: mem_heap_alloc(mem_block_info_struct*, unsigned long) (mem0mem.ic:186)
        ==2236==    by 0xB2A3FA: ib_heap_malloc(ib_alloc_struct*, unsigned long) (ut0vec.ic:39)
        ==2236==    by 0xBEDB18: ib_vector_create(ib_alloc_struct*, unsigned long, unsigned long) (ut0vec.cc:56)
        ==2236==    by 0xB2AB56: pars_info_add_literal(pars_info_struct*, char const*, void const*, unsigned long, unsigned long, unsigned long) (pars0pars.cc:2345)
        ==2236==    by 0xC80EE8: dict_stats_save_index_stat(dict_index_struct*, long, char const*, unsigned long, unsigned long*, char const*) (dict0stats.cc:1768)
        ==2236==    by 0xC81836: dict_stats_save(dict_table_struct*, unsigned long) (dict0stats.cc:2003)
        ==2236==    by 0xC82B5C: dict_stats_update(dict_table_struct*, dict_stats_upd_option, bool) (dict0stats.cc:2651)
        ==2236==    by 0xC83ACA: pop_from_auto_recalc_list_and_recalc() (dict0stats_background.cc:338)
        ==2236==    by 0xC83B63: dict_stats_thread (dict0stats_background.cc:380)
        ==2236==    by 0x4E2D73C: start_thread (in /lib64/libpthread-2.5.so)
        ==2236==    by 0x5EEBD1C: clone (in /lib64/libc-2.5.so)

    modified:
      storage/innobase/dict/dict0stats.cc
 3962 Vasil Dimov	2012-06-07
      Fix a memory leak in dict_stats_exec_sql() - if persistent storage
      does not exist, then pinfo would remain unfreed. So free it explicitly
      in this case.

    modified:
      storage/innobase/dict/dict0stats.cc
=== modified file 'storage/innobase/dict/dict0stats.cc'
--- a/storage/innobase/dict/dict0stats.cc	revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0stats.cc	revid:vasil.dimov@stripped
@@ -1721,21 +1721,29 @@ dict_stats_save_index_stat(
 #define PREPARE_PINFO_FOR_INDEX_SAVE() \
 do { \
 	pinfo = pars_info_create(); \
+	UNIV_MEM_ASSERT_RW(index->table->name, dict_get_db_name_len(index->table->name)); \
 	pars_info_add_literal(pinfo, "database_name", index->table->name, \
 		dict_get_db_name_len(index->table->name), \
 		DATA_VARCHAR, 0); \
+	UNIV_MEM_ASSERT_RW(dict_remove_db_name(index->table->name), strlen(dict_remove_db_name(index->table->name))); \
 	pars_info_add_str_literal(pinfo, "table_name", \
 		dict_remove_db_name(index->table->name)); \
+	UNIV_MEM_ASSERT_RW(index->name, strlen(index->name)); \
 	pars_info_add_str_literal(pinfo, "index_name", index->name); \
+	UNIV_MEM_ASSERT_RW(&last_update, 4); \
 	pars_info_add_int4_literal(pinfo, "last_update", last_update); \
+	UNIV_MEM_ASSERT_RW(stat_name, strlen(stat_name)); \
 	pars_info_add_str_literal(pinfo, "stat_name", stat_name); \
+	UNIV_MEM_ASSERT_RW(&stat_value, 8); \
 	pars_info_add_ull_literal(pinfo, "stat_value", stat_value); \
 	if (sample_size != NULL) { \
+		UNIV_MEM_ASSERT_RW(sample_size, 8); \
 		pars_info_add_ull_literal(pinfo, "sample_size", *sample_size); \
 	} else { \
 		pars_info_add_literal(pinfo, "sample_size", NULL, \
 				      UNIV_SQL_NULL, DATA_FIXBINARY, 0); \
 	} \
+	UNIV_MEM_ASSERT_RW(stat_description, strlen(stat_description)); \
 	pars_info_add_str_literal(pinfo, "stat_description", \
 				  stat_description); \
 } while (0);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (vasil.dimov:3962 to 3963) vasil.dimov7 Jun