List:Commits« Previous MessageNext Message »
From:Narayanan Venkateswaran Date:June 7 2012 1:56pm
Subject:bzr push into mysql-trunk branch (v.narayanan:3963 to 3964) WL#6161
View as plain text  
 3964 Narayanan Venkateswaran	2012-06-07 [merge]
      WL#6161 Integrating with InnoDB codebase in MySQL 5.5
      
      Merging forward changes from mysql-5.5

    modified:
      storage/innobase/btr/btr0btr.cc
      storage/innobase/ha/ha0ha.cc
      storage/innobase/include/btr0btr.h
      storage/innobase/include/btr0types.h
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0buf.ic
      storage/innobase/include/dict0dict.h
      storage/innobase/include/trx0sys.h
      storage/innobase/trx/trx0sys.cc
 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
=== modified file 'storage/innobase/btr/btr0btr.cc'
--- a/storage/innobase/btr/btr0btr.cc	2012-05-23 10:06:12 +0000
+++ b/storage/innobase/btr/btr0btr.cc	2012-06-07 13:50:48 +0000
@@ -43,6 +43,7 @@ Created 6/2/1994 Heikki Tuuri
 #include "trx0trx.h"
 #include "srv0mon.h"
 
+#endif /* UNIV_HOTBACKUP */
 /**************************************************************//**
 Report that an index page is corrupted. */
 UNIV_INTERN
@@ -65,6 +66,7 @@ btr_corruption_report(
 	buf_page_print(buf_block_get_frame(block), 0, 0);
 }
 
+#ifndef UNIV_HOTBACKUP
 #ifdef UNIV_BLOB_DEBUG
 # include "srv0srv.h"
 # include "ut0rbt.h"

=== modified file 'storage/innobase/ha/ha0ha.cc'
--- a/storage/innobase/ha/ha0ha.cc	2011-11-08 10:32:23 +0000
+++ b/storage/innobase/ha/ha0ha.cc	2012-06-07 13:50:48 +0000
@@ -28,12 +28,11 @@ Created 8/22/1994 Heikki Tuuri
 #include "ha0ha.ic"
 #endif
 
+#ifndef UNIV_HOTBACKUP
 #ifdef UNIV_DEBUG
 # include "buf0buf.h"
 #endif /* UNIV_DEBUG */
-#ifndef UNIV_HOTBACKUP
 # include "btr0sea.h"
-#endif /* !UNIV_HOTBACKUP */
 #include "page0page.h"
 
 /*************************************************************//**
@@ -59,9 +58,7 @@ ha_create_func(
 				MEM_HEAP_FOR_PAGE_HASH */
 {
 	hash_table_t*	table;
-#ifndef UNIV_HOTBACKUP
 	ulint		i;
-#endif /* !UNIV_HOTBACKUP */
 
 	ut_a(type == MEM_HEAP_FOR_BTR_SEARCH
 	     || type == MEM_HEAP_FOR_PAGE_HASH);
@@ -80,7 +77,6 @@ ha_create_func(
 		return(table);
 	}
 
-#ifndef UNIV_HOTBACKUP
 	if (type == MEM_HEAP_FOR_PAGE_HASH) {
 		/* We create a hash table protected by rw_locks for
 		buf_pool->page_hash. */
@@ -98,7 +94,6 @@ ha_create_func(
 		table->heaps[i] = mem_heap_create_typed(4096, type);
 		ut_a(table->heaps[i]);
 	}
-#endif /* !UNIV_HOTBACKUP */
 
 	return(table);
 }
@@ -121,7 +116,6 @@ ha_clear(
 	       || rw_lock_own(&btr_search_latch, RW_LOCK_EXCLUSIVE));
 #endif /* UNIV_SYNC_DEBUG */
 
-#ifndef UNIV_HOTBACKUP
 	/* Free the memory heaps. */
 	n = table->n_sync_obj;
 
@@ -152,7 +146,6 @@ ha_clear(
 	table->n_sync_obj = 0;
 	table->type = HASH_TABLE_SYNC_NONE;
 
-#endif /* !UNIV_HOTBACKUP */
 
 	/* Clear the hash table. */
 	n = hash_get_n_cells(table);
@@ -205,7 +198,6 @@ ha_insert_for_fold_func(
 	while (prev_node != NULL) {
 		if (prev_node->fold == fold) {
 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-# ifndef UNIV_HOTBACKUP
 			if (table->adaptive) {
 				buf_block_t* prev_block = prev_node->block;
 				ut_a(prev_block->frame
@@ -214,7 +206,6 @@ ha_insert_for_fold_func(
 				prev_block->n_pointers--;
 				block->n_pointers++;
 			}
-# endif /* !UNIV_HOTBACKUP */
 
 			prev_node->block = block;
 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -243,11 +234,9 @@ ha_insert_for_fold_func(
 	ha_node_set_data(node, block, data);
 
 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-# ifndef UNIV_HOTBACKUP
 	if (table->adaptive) {
 		block->n_pointers++;
 	}
-# endif /* !UNIV_HOTBACKUP */
 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
 
 	node->fold = fold;
@@ -289,13 +278,11 @@ ha_delete_hash_node(
 #endif /* UNIV_SYNC_DEBUG */
 	ut_ad(btr_search_enabled);
 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-# ifndef UNIV_HOTBACKUP
 	if (table->adaptive) {
 		ut_a(del_node->block->frame = page_align(del_node->data));
 		ut_a(del_node->block->n_pointers > 0);
 		del_node->block->n_pointers--;
 	}
-# endif /* !UNIV_HOTBACKUP */
 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
 
 	HASH_DELETE_AND_COMPACT(ha_node_t, next, table, del_node);
@@ -337,13 +324,11 @@ ha_search_and_update_if_found_func(
 
 	if (node) {
 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
-# ifndef UNIV_HOTBACKUP
 		if (table->adaptive) {
 			ut_a(node->block->n_pointers > 0);
 			node->block->n_pointers--;
 			new_block->n_pointers++;
 		}
-# endif /* !UNIV_HOTBACKUP */
 
 		node->block = new_block;
 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -355,7 +340,6 @@ ha_search_and_update_if_found_func(
 	return(FALSE);
 }
 
-#ifndef UNIV_HOTBACKUP
 /*****************************************************************//**
 Removes from the chain determined by fold all nodes whose data pointer
 points to the page given. */

=== modified file 'storage/innobase/include/btr0btr.h'
--- a/storage/innobase/include/btr0btr.h	2012-05-13 10:18:01 +0000
+++ b/storage/innobase/include/btr0btr.h	2012-06-07 13:50:48 +0000
@@ -107,6 +107,7 @@ on the index tree */
 			  | BTR_ESTIMATE		\
 			  | BTR_IGNORE_SEC_UNIQUE	\
 			  | BTR_ALREADY_S_LATCHED))
+#endif /* UNIV_HOTBACKUP */
 
 /**************************************************************//**
 Report that an index page is corrupted. */
@@ -128,6 +129,7 @@ btr_corruption_report(
 		ut_error;					\
 	}
 
+#ifndef UNIV_HOTBACKUP
 #ifdef UNIV_BLOB_DEBUG
 # include "ut0rbt.h"
 /** An index->blobs entry for keeping track of off-page column references */

=== modified file 'storage/innobase/include/btr0types.h'
--- a/storage/innobase/include/btr0types.h	2011-11-08 10:32:23 +0000
+++ b/storage/innobase/include/btr0types.h	2012-06-07 13:50:48 +0000
@@ -39,6 +39,8 @@ typedef struct btr_cur_struct		btr_cur_t
 /** B-tree search information for the adaptive hash index */
 typedef struct btr_search_struct	btr_search_t;
 
+#ifndef UNIV_HOTBACKUP
+
 /** @brief The latch protecting the adaptive search system
 
 This latch protects the
@@ -54,6 +56,8 @@ Bear in mind (3) and (4) when using the
 */
 extern rw_lock_t*	btr_search_latch_temp;
 
+#endif /* UNIV_HOTBACKUP */
+
 /** The latch protecting the adaptive search system */
 #define btr_search_latch	(*btr_search_latch_temp)
 

=== modified file 'storage/innobase/include/buf0buf.h'
--- a/storage/innobase/include/buf0buf.h	2012-05-14 00:24:46 +0000
+++ b/storage/innobase/include/buf0buf.h	2012-06-07 13:50:48 +0000
@@ -592,34 +592,34 @@ ib_uint64_t
 buf_block_get_modify_clock(
 /*=======================*/
 	buf_block_t*	block);	/*!< in: block */
-#else /* !UNIV_HOTBACKUP */
-# define buf_block_modify_clock_inc(block) ((void) 0)
-#endif /* !UNIV_HOTBACKUP */
 /*******************************************************************//**
 Increments the bufferfix count. */
 UNIV_INLINE
 void
 buf_block_buf_fix_inc_func(
 /*=======================*/
-#ifdef UNIV_SYNC_DEBUG
+# ifdef UNIV_SYNC_DEBUG
 	const char*	file,	/*!< in: file name */
 	ulint		line,	/*!< in: line */
-#endif /* UNIV_SYNC_DEBUG */
+# endif /* UNIV_SYNC_DEBUG */
 	buf_block_t*	block)	/*!< in/out: block to bufferfix */
 	__attribute__((nonnull));
-#ifdef UNIV_SYNC_DEBUG
+# ifdef UNIV_SYNC_DEBUG
 /** Increments the bufferfix count.
 @param b	in/out: block to bufferfix
 @param f	in: file name where requested
 @param l	in: line number where requested */
 # define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(f,l,b)
-#else /* UNIV_SYNC_DEBUG */
+# else /* UNIV_SYNC_DEBUG */
 /** Increments the bufferfix count.
 @param b	in/out: block to bufferfix
 @param f	in: file name where requested
 @param l	in: line number where requested */
 # define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(b)
-#endif /* UNIV_SYNC_DEBUG */
+# endif /* UNIV_SYNC_DEBUG */
+#else /* !UNIV_HOTBACKUP */
+# define buf_block_modify_clock_inc(block) ((void) 0)
+#endif /* !UNIV_HOTBACKUP */
 /********************************************************************//**
 Checks if a page is corrupt.
 @return	TRUE if corrupted */

=== modified file 'storage/innobase/include/buf0buf.ic'
--- a/storage/innobase/include/buf0buf.ic	2012-02-17 09:58:18 +0000
+++ b/storage/innobase/include/buf0buf.ic	2012-06-07 13:50:48 +0000
@@ -31,11 +31,11 @@ Created 11/5/1995 Heikki Tuuri
 *******************************************************/
 
 #include "mtr0mtr.h"
+#ifndef UNIV_HOTBACKUP
 #include "buf0flu.h"
 #include "buf0lru.h"
 #include "buf0rea.h"
 
-#ifndef UNIV_HOTBACKUP
 /** A chunk of buffers. The buffer pool is allocated in chunks. */
 struct buf_chunk_struct{
 	ulint		mem_size;	/*!< allocated size of the chunk */

=== modified file 'storage/innobase/include/dict0dict.h'
--- a/storage/innobase/include/dict0dict.h	2012-06-06 08:05:04 +0000
+++ b/storage/innobase/include/dict0dict.h	2012-06-07 13:50:48 +0000
@@ -1649,7 +1649,7 @@ UNIV_INTERN
 void
 dict_close(void);
 /*============*/
-
+#ifndef UNIV_HOTBACKUP
 /**********************************************************************//**
 Check whether the table is corrupted.
 @return	nonzero for corrupted table, zero for valid tables */
@@ -1670,6 +1670,7 @@ dict_index_is_corrupted(
 	const dict_index_t*	index)	/*!< in: index */
 	__attribute__((nonnull, pure, warn_unused_result));
 
+#endif /* !UNIV_HOTBACKUP */
 /**********************************************************************//**
 Flags an index and table corrupted both in the data dictionary cache
 and in the system table SYS_INDEXES. */

=== modified file 'storage/innobase/include/trx0sys.h'
--- a/storage/innobase/include/trx0sys.h	2012-05-16 01:09:52 +0000
+++ b/storage/innobase/include/trx0sys.h	2012-06-07 13:50:48 +0000
@@ -183,7 +183,6 @@ UNIV_INLINE
 trx_id_t
 trx_sys_get_max_trx_id(void);
 /*========================*/
-#endif /* !UNIV_HOTBACKUP */
 
 #ifdef UNIV_DEBUG
 /* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */
@@ -200,7 +199,6 @@ trx_write_trx_id(
 /*=============*/
 	byte*		ptr,	/*!< in: pointer to memory where written */
 	trx_id_t	id);	/*!< in: id */
-#ifndef UNIV_HOTBACKUP
 /*****************************************************************//**
 Reads a trx id from an index page. In case that the id size changes in
 some future version, this function should be used instead of

=== modified file 'storage/innobase/trx/trx0sys.cc'
--- a/storage/innobase/trx/trx0sys.cc	2012-05-16 01:09:52 +0000
+++ b/storage/innobase/trx/trx0sys.cc	2012-06-07 13:50:48 +0000
@@ -121,12 +121,12 @@ UNIV_INTERN mysql_pfs_key_t	file_format_
 UNIV_INTERN mysql_pfs_key_t	trx_sys_mutex_key;
 #endif /* UNIV_PFS_RWLOCK */
 
+#ifndef UNIV_HOTBACKUP
 #ifdef UNIV_DEBUG
 /* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */
 uint		trx_rseg_n_slots_debug = 0;
 #endif
 
-#ifndef UNIV_HOTBACKUP
 /** This is used to track the maximum file format id known to InnoDB. It's
 updated via SET GLOBAL innodb_file_format_max = 'x' or when we open
 or create a table. */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (v.narayanan:3963 to 3964) WL#6161Narayanan Venkateswaran7 Jun