List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 22 2010 10:43am
Subject:bzr push into mysql-trunk-innodb branch (marko.makela:3110 to 3112)
View as plain text  
 3112 Marko Mäkelä	2010-06-22
      buf_flush_insert_in_flush_rbt(), buf_flush_validate_low():
      Silence GCC warnings about dereferencing a type-punned pointer.
      Approved by Jimmy Yang.

    modified:
      storage/innobase/buf/buf0flu.c
 3111 Marko Mäkelä	2010-06-22
      dict_load_column_low(): Initialize pos. Improve documentation.
      Approved by Jimmy Yang.

    modified:
      storage/innobase/dict/dict0load.c
      storage/innobase/include/dict0load.h
 3110 Inaam Rana	2010-06-21
      Fixes bug#39168.
      Make a call to log_free_check() on all DML paths.

    modified:
      storage/innobase/include/log0log.ic
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0purge.c
      storage/innobase/row/row0uins.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0upd.c
=== modified file 'storage/innobase/buf/buf0flu.c'
--- a/storage/innobase/buf/buf0flu.c	revid:inaam.rana@stripped05x7tbfoo
+++ b/storage/innobase/buf/buf0flu.c	revid:marko.makela@stripped
@@ -114,7 +114,9 @@ buf_flush_insert_in_flush_rbt(
 	p_node = rbt_prev(buf_pool->flush_rbt, c_node);
 
 	if (p_node != NULL) {
-		prev = *rbt_value(buf_page_t*, p_node);
+		buf_page_t**	value;
+		value = rbt_value(buf_page_t*, p_node);
+		prev = *value;
 		ut_a(prev != NULL);
 	}
 
@@ -2088,13 +2090,13 @@ buf_flush_validate_low(
 		ut_a(om > 0);
 
 		if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
-			buf_page_t* rpage;
+			buf_page_t** prpage;
 
 			ut_a(rnode);
-			rpage = *rbt_value(buf_page_t*, rnode);
+			prpage = rbt_value(buf_page_t*, rnode);
 
-			ut_a(rpage);
-			ut_a(rpage == bpage);
+			ut_a(*prpage);
+			ut_a(*prpage == bpage);
 			rnode = rbt_next(buf_pool->flush_rbt, rnode);
 		}
 

=== modified file 'storage/innobase/dict/dict0load.c'
--- a/storage/innobase/dict/dict0load.c	revid:inaam.rana@stripped
+++ b/storage/innobase/dict/dict0load.c	revid:marko.makela@oracle.com-20100622104317-5xl3suwp1hqjtd80
@@ -782,12 +782,13 @@ const char*
 dict_load_column_low(
 /*=================*/
 	dict_table_t*	table,		/*!< in/out: table, could be NULL
-					if we just polulate a dict_column_t
+					if we just populate a dict_column_t
 					struct with information from
 					a SYS_COLUMNS record */
 	mem_heap_t*	heap,		/*!< in/out: memory heap
 					for temporary storage */
-	dict_col_t*	column,		/*!< out: dict_column_t to fill */
+	dict_col_t*	column,		/*!< out: dict_column_t to fill,
+					or NULL if table != NULL */
 	dulint*		table_id,	/*!< out: table id */
 	const char**	col_name,	/*!< out: column name */
 	const rec_t*	rec)		/*!< in: SYS_COLUMNS record */
@@ -800,6 +801,8 @@ dict_load_column_low(
 	ulint		col_len;
 	ulint		pos;
 
+	ut_ad(table || column);
+
 	if (UNIV_UNLIKELY(rec_get_deleted_flag(rec, 0))) {
 		return("delete-marked record in SYS_COLUMNS");
 	}
@@ -827,9 +830,9 @@ err_len:
 		goto err_len;
 	}
 
-	if (!table) {
-		pos = mach_read_from_4(field);
-	} else if (UNIV_UNLIKELY(table->n_def != mach_read_from_4(field))) {
+	pos = mach_read_from_4(field);
+
+	if (UNIV_UNLIKELY(table && table->n_def != pos)) {
 		return("SYS_COLUMNS.POS mismatch");
 	}
 

=== modified file 'storage/innobase/include/dict0load.h'
--- a/storage/innobase/include/dict0load.h	revid:inaam.rana@stripped5x7tbfoo
+++ b/storage/innobase/include/dict0load.h	revid:marko.makela@stripped
@@ -109,7 +109,8 @@ dict_load_column_low(
 					a SYS_COLUMNS record */
 	mem_heap_t*	heap,		/*!< in/out: memory heap
 					for temporary storage */
-	dict_col_t*	column,		/*!< out: dict_column_t to fill */
+	dict_col_t*	column,		/*!< out: dict_column_t to fill,
+					or NULL if table != NULL */
 	dulint*		table_id,	/*!< out: table id */
 	const char**	col_name,	/*!< out: column name */
 	const rec_t*	rec);		/*!< in: SYS_COLUMNS record */

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100622104317-5xl3suwp1hqjtd80.bundle
Thread
bzr push into mysql-trunk-innodb branch (marko.makela:3110 to 3112) marko.makela22 Jun