List:Commits« Previous MessageNext Message »
From:marko.makela Date:August 17 2010 12:07pm
Subject:bzr commit into mysql-5.5-innodb branch (marko.makela:3164)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:vasil.dimov@strippedphc2g3kj8kv

 3164 Marko Mäkelä	2010-08-17
      A non-functional change:
      
      dict_load_index_low(): Rename the parameter "cached" to "allocated"
      and clarify the comments.

    modified:
      storage/innobase/dict/dict0load.c
      storage/innobase/include/dict0load.h
=== modified file 'storage/innobase/dict/dict0load.c'
--- a/storage/innobase/dict/dict0load.c	revid:vasil.dimov@oracle.com-20100817115429-yppvmphc2g3kj8kv
+++ b/storage/innobase/dict/dict0load.c	revid:marko.makela@stripped0100817120754-98rp2bojkw5f38nf
@@ -1175,23 +1175,23 @@ static const char* dict_load_index_id_er
 
 /********************************************************************//**
 Loads an index definition from a SYS_INDEXES record to dict_index_t.
-If "cached" is set to "TRUE", we will create a dict_index_t structure
-and fill it accordingly. Otherwise, the dict_index_t will
-be supplied by the caller and filled with information read from
-the record.
-@return error message, or NULL on success */
+If allocate=TRUE, we will create a dict_index_t structure and fill it
+accordingly. If allocated=FALSE, the dict_index_t will be supplied by
+the caller and filled with information read from the record.  @return
+error message, or NULL on success */
 UNIV_INTERN
 const char*
 dict_load_index_low(
 /*================*/
 	byte*		table_id,	/*!< in/out: table id (8 bytes),
-					an "in" value if cached=TRUE
-					and "out" when cached=FALSE */
+					an "in" value if allocate=TRUE
+					and "out" when allocate=FALSE */
 	const char*	table_name,	/*!< in: table name */
 	mem_heap_t*	heap,		/*!< in/out: temporary memory heap */
 	const rec_t*	rec,		/*!< in: SYS_INDEXES record */
-	ibool		cached,		/*!< in: TRUE = add to cache,
-					FALSE = do not */
+	ibool		allocate,	/*!< in: TRUE=allocate *index,
+					FALSE=fill in a pre-allocated
+					*index */
 	dict_index_t**	index)		/*!< out,own: index, or NULL */
 {
 	const byte*	field;
@@ -1203,8 +1203,8 @@ dict_load_index_low(
 	ulint		type;
 	ulint		space;
 
-	if (cached) {
-		/* If "cached" is set to TRUE, no dict_index_t will
+	if (allocate) {
+		/* If allocate=TRUE, no dict_index_t will
 		be supplied. Initialize "*index" to NULL */
 		*index = NULL;
 	}
@@ -1223,7 +1223,7 @@ err_len:
 		return("incorrect column length in SYS_INDEXES");
 	}
 
-	if (!cached) {
+	if (!allocate) {
 		/* We are reading a SYS_INDEXES record. Copy the table_id */
 		memcpy(table_id, (const char*)field, 8);
 	} else if (memcmp(field, table_id, 8)) {
@@ -1279,7 +1279,7 @@ err_len:
 		goto err_len;
 	}
 
-	if (cached) {
+	if (allocate) {
 		*index = dict_mem_index_create(table_name, name_buf,
 					       space, type, n_fields);
 	} else {

=== modified file 'storage/innobase/include/dict0load.h'
--- a/storage/innobase/include/dict0load.h	revid:vasil.dimov@strippedkj8kv
+++ b/storage/innobase/include/dict0load.h	revid:marko.makela@stripped
@@ -116,19 +116,23 @@ dict_load_column_low(
 	const rec_t*	rec);		/*!< in: SYS_COLUMNS record */
 /********************************************************************//**
 Loads an index definition from a SYS_INDEXES record to dict_index_t.
-@return error message, or NULL on success */
+If allocate=TRUE, we will create a dict_index_t structure and fill it
+accordingly. If allocated=FALSE, the dict_index_t will be supplied by
+the caller and filled with information read from the record.  @return
+error message, or NULL on success */
 UNIV_INTERN
 const char*
 dict_load_index_low(
 /*================*/
-	byte*		table_id,	/*!< in/out: table id (8 bytes_,
-					an "in" value if cached=TRUE
-					and "out" when cached=FALSE */
+	byte*		table_id,	/*!< in/out: table id (8 bytes),
+					an "in" value if allocate=TRUE
+					and "out" when allocate=FALSE */
 	const char*	table_name,	/*!< in: table name */
 	mem_heap_t*	heap,		/*!< in/out: temporary memory heap */
 	const rec_t*	rec,		/*!< in: SYS_INDEXES record */
-	ibool		cached,		/*!< in: TRUE = add to cache
-					FALSE = do not */
+	ibool		allocate,	/*!< in: TRUE=allocate *index,
+					FALSE=fill in a pre-allocated
+					*index */
 	dict_index_t**	index);		/*!< out,own: index, or NULL */
 /********************************************************************//**
 Loads an index field definition from a SYS_FIELDS record to

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100817120754-98rp2bojkw5f38nf.bundle
Thread
bzr commit into mysql-5.5-innodb branch (marko.makela:3164) marko.makela17 Aug