#At file:///Users/kevinlewis/Work/Mysql/Whitespace/mysql-trunk-innodb/ based on revid:vasil.dimov@stripped
3571 kevin.lewis@stripped 2011-04-08
Whitespace cleanup
Some CRLF line ending were accidentally introduced in a recent patch
Add lines, comments and comment words to improve code readability.
modified:
storage/innobase/buf/buf0buf.c
storage/innobase/dict/dict0crea.c
storage/innobase/fil/fil0fil.c
storage/innobase/include/dict0dict.ic
storage/innobase/include/dict0mem.ic
storage/innobase/include/univ.i
storage/innobase/include/ut0bh.ic
storage/innobase/mtr/mtr0log.c
storage/innobase/que/que0que.c
storage/innobase/row/row0mysql.c
storage/innobase/row/row0row.c
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0start.c
=== modified file 'storage/innobase/buf/buf0buf.c'
--- a/storage/innobase/buf/buf0buf.c revid:vasil.dimov@stripped
+++ b/storage/innobase/buf/buf0buf.c revid:kevin.lewis@stripped
@@ -1239,7 +1239,7 @@ buf_pool_init_instance(
buf_pool->curr_size = chunk->size;
buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE;
- /* Number of locks portecting page_hash must be a
+ /* Number of locks protecting page_hash must be a
power of two */
srv_n_page_hash_locks =
ut_2_power_up(srv_n_page_hash_locks);
=== modified file 'storage/innobase/dict/dict0crea.c'
--- a/storage/innobase/dict/dict0crea.c revid:vasil.dimov@stripped
+++ b/storage/innobase/dict/dict0crea.c revid:kevin.lewis@stripped
@@ -75,6 +75,7 @@ dict_create_sys_tables_tuple(
dfield = dtuple_get_nth_field(entry, 0/*NAME*/);
dfield_set_data(dfield, table->name, ut_strlen(table->name));
+
/* 3: ID -------------------------------*/
dfield = dtuple_get_nth_field(entry, 1/*ID*/);
@@ -82,6 +83,7 @@ dict_create_sys_tables_tuple(
mach_write_to_8(ptr, table->id);
dfield_set_data(dfield, ptr, 8);
+
/* 4: N_COLS ---------------------------*/
dfield = dtuple_get_nth_field(entry, 2/*N_COLS*/);
@@ -93,7 +95,8 @@ dict_create_sys_tables_tuple(
mach_write_to_4(ptr, table->n_def
| ((table->flags & DICT_TF_COMPACT) << 31));
dfield_set_data(dfield, ptr, 4);
- /* 5: TYPE -----------------------------*/
+
+ /* 5: TYPE (table flags) -----------------------------*/
dfield = dtuple_get_nth_field(entry, 3/*TYPE*/);
ptr = mem_heap_alloc(heap, 4);
@@ -109,14 +112,15 @@ dict_create_sys_tables_tuple(
}
dfield_set_data(dfield, ptr, 4);
+
/* 6: MIX_ID (obsolete) ---------------------------*/
dfield = dtuple_get_nth_field(entry, 4/*MIX_ID*/);
ptr = mem_heap_zalloc(heap, 8);
dfield_set_data(dfield, ptr, 8);
- /* 7: MIX_LEN (additional flags) --------------------------*/
+ /* 7: MIX_LEN (additional flags) --------------------------*/
dfield = dtuple_get_nth_field(entry, 5/*MIX_LEN*/);
ptr = mem_heap_alloc(heap, 4);
@@ -125,6 +129,7 @@ dict_create_sys_tables_tuple(
mach_write_to_4(ptr, table->flags2);
dfield_set_data(dfield, ptr, 4);
+
/* 8: CLUSTER_NAME ---------------------*/
dfield = dtuple_get_nth_field(entry, 6/*CLUSTER_NAME*/);
dfield_set_null(dfield); /* not supported */
@@ -381,6 +386,7 @@ dict_create_sys_indexes_tuple(
mach_write_to_8(ptr, table->id);
dfield_set_data(dfield, ptr, 8);
+
/* 1: ID ----------------------------*/
dfield = dtuple_get_nth_field(entry, 1/*ID*/);
@@ -388,10 +394,12 @@ dict_create_sys_indexes_tuple(
mach_write_to_8(ptr, index->id);
dfield_set_data(dfield, ptr, 8);
+
/* 4: NAME --------------------------*/
dfield = dtuple_get_nth_field(entry, 2/*NAME*/);
dfield_set_data(dfield, index->name, ut_strlen(index->name));
+
/* 5: N_FIELDS ----------------------*/
dfield = dtuple_get_nth_field(entry, 3/*N_FIELDS*/);
@@ -399,6 +407,7 @@ dict_create_sys_indexes_tuple(
mach_write_to_4(ptr, index->n_fields);
dfield_set_data(dfield, ptr, 4);
+
/* 6: TYPE --------------------------*/
dfield = dtuple_get_nth_field(entry, 4/*TYPE*/);
@@ -406,6 +415,7 @@ dict_create_sys_indexes_tuple(
mach_write_to_4(ptr, index->type);
dfield_set_data(dfield, ptr, 4);
+
/* 7: SPACE --------------------------*/
#if DICT_SYS_INDEXES_SPACE_NO_FIELD != 7
@@ -418,6 +428,7 @@ dict_create_sys_indexes_tuple(
mach_write_to_4(ptr, index->space);
dfield_set_data(dfield, ptr, 4);
+
/* 8: PAGE_NO --------------------------*/
#if DICT_SYS_INDEXES_PAGE_NO_FIELD != 8
@@ -430,6 +441,7 @@ dict_create_sys_indexes_tuple(
mach_write_to_4(ptr, FIL_NULL);
dfield_set_data(dfield, ptr, 4);
+
/*--------------------------------*/
return(entry);
=== modified file 'storage/innobase/fil/fil0fil.c'
--- a/storage/innobase/fil/fil0fil.c revid:vasil.dimov@stripped
+++ b/storage/innobase/fil/fil0fil.c revid:kevin.lewis@stripped
@@ -3346,7 +3346,7 @@ fil_load_single_table_tablespace(
return;
}
#endif
- /* Read the first page of the tablespace if the size big enough */
+ /* Read the first page of the tablespace if the size is big enough */
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
/* Align the memory for file i/o if we might have O_DIRECT set */
=== modified file 'storage/innobase/include/dict0dict.ic'
--- a/storage/innobase/include/dict0dict.ic revid:vasil.dimov@stripped
+++ b/storage/innobase/include/dict0dict.ic revid:kevin.lewis@stripped
@@ -144,7 +144,7 @@ ulint
dict_col_get_fixed_size(
/*====================*/
const dict_col_t* col, /*!< in: column */
- ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */
+ ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */
{
return(dtype_get_fixed_size_low(col->mtype, col->prtype, col->len,
col->mbminmaxlen, comp));
=== modified file 'storage/innobase/include/dict0mem.ic'
--- a/storage/innobase/include/dict0mem.ic revid:vasil.dimov@stripped
+++ b/storage/innobase/include/dict0mem.ic revid:kevin.lewis@stripped
@@ -57,16 +57,18 @@ dict_mem_fill_index_struct(
index->fields = NULL;
}
- index->type = type;
+ /* Assign a ulint to a 4-bit-mapped field.
+ Only the low-order 4 bits are assigned. */
+ index->type = type;
#ifndef UNIV_HOTBACKUP
- index->space = (unsigned int) space;
- index->page = FIL_NULL;
+ index->space = (unsigned int) space;
+ index->page = FIL_NULL;
#endif /* !UNIV_HOTBACKUP */
- index->table_name = table_name;
- index->n_fields = (unsigned int) n_fields;
- /* The '1 +' above prevents allocation
- of an empty mem block */
+ index->table_name = table_name;
+ index->n_fields = (unsigned int) n_fields;
+ /* The '1 +' above prevents allocation
+ of an empty mem block */
#ifdef UNIV_DEBUG
- index->magic_n = DICT_INDEX_MAGIC_N;
+ index->magic_n = DICT_INDEX_MAGIC_N;
#endif /* UNIV_DEBUG */
}
=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i revid:vasil.dimov@stripped
+++ b/storage/innobase/include/univ.i revid:kevin.lewis@stripped
@@ -342,16 +342,16 @@ including new BLOB treatment */
/** The universal page size of the database */
#define UNIV_PAGE_SIZE (1 << UNIV_PAGE_SIZE_SHIFT)
-/** log2 of smallest compressed page size (1<<10 == 1024 bytes) */
-#define UNIV_ZIP_SIZE_SHIFT_MIN 10
-
-/** log2 of largest compressed page size (1<<14 == 16384 bytes).
-A compressed page directory entry reserves 14 bits for the start offset
-and 2 bits for flags. This limits the uncompressed page size to 16k.
-So even though a 16k uncompressed page can theoretically be compressed
-into a larger compressed page, it is not a useful feature so we will
-limit both with this same constant. */
-#define UNIV_ZIP_SIZE_SHIFT_MAX 14
+/** log2 of smallest compressed page size (1<<10 == 1024 bytes) */
+#define UNIV_ZIP_SIZE_SHIFT_MIN 10
+
+/** log2 of largest compressed page size (1<<14 == 16384 bytes).
+A compressed page directory entry reserves 14 bits for the start offset
+and 2 bits for flags. This limits the uncompressed page size to 16k.
+Even though a 16k uncompressed page can theoretically be compressed
+into a larger compressed page, it is not a useful feature so we will
+limit both with this same constant. */
+#define UNIV_ZIP_SIZE_SHIFT_MAX 14
/** Smallest compressed page size */
#define UNIV_ZIP_SIZE_MIN (1 << UNIV_ZIP_SIZE_SHIFT_MIN)
=== modified file 'storage/innobase/include/ut0bh.ic'
--- a/storage/innobase/include/ut0bh.ic revid:vasil.dimov@stripped
+++ b/storage/innobase/include/ut0bh.ic revid:kevin.lewis@stripped
@@ -122,4 +122,3 @@ ib_bh_last(
: ib_bh_get(ib_bh, ib_bh_size(ib_bh) - 1));
}
-
=== modified file 'storage/innobase/mtr/mtr0log.c'
--- a/storage/innobase/mtr/mtr0log.c revid:vasil.dimov@stripped
+++ b/storage/innobase/mtr/mtr0log.c revid:kevin.lewis@stripped
@@ -538,7 +538,7 @@ mlog_parse_index(
/*=============*/
byte* ptr, /*!< in: buffer */
const byte* end_ptr,/*!< in: buffer end */
- ibool comp, /*!< in: TRUE=compact record format */
+ ibool comp, /*!< in: TRUE=compact row format */
dict_index_t** index) /*!< out, own: dummy index */
{
ulint i, n, n_uniq;
=== modified file 'storage/innobase/que/que0que.c'
--- a/storage/innobase/que/que0que.c revid:vasil.dimov@stripped
+++ b/storage/innobase/que/que0que.c revid:kevin.lewis@stripped
@@ -1155,8 +1155,8 @@ que_run_threads_low(
do {
/* Check that there is enough space in the log to accommodate
possible log entries by this query step; if the operation can
- touch more than about 4 pages, checks must be made also within
- the query step! */
+ touch more than about 4 pages, checks must be made also within
+ the query step! */
log_free_check();
@@ -1175,7 +1175,7 @@ que_run_threads_low(
ut_a(next_thr == NULL);
/* This can change next_thr to a non-NULL value
- if there was a lock wait that already completed. */
+ if there was a lock wait that already completed. */
que_thr_dec_refer_count(thr, &next_thr);
=== modified file 'storage/innobase/row/row0mysql.c'
--- a/storage/innobase/row/row0mysql.c revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0mysql.c revid:kevin.lewis@stripped
@@ -3262,12 +3262,12 @@ check_next_foreign:
CREATE TABLE t2 (PRIMARY KEY (a)) SELECT * FROM t1;
If after the user transaction has done the SELECT and there is a
- problem in completing the CREATE TABLE operation, MySQL will drop
- the table. InnoDB will create a new background transaction to do the
- actual drop, the trx instance that is passed to this function. To
- preserve existing behaviour we remove the locks but ideally we
- shouldn't have to. There should never be record locks on a table
- that is going to be dropped. */
+ problem in completing the CREATE TABLE operation, MySQL will drop
+ the table. InnoDB will create a new background transaction to do the
+ actual drop, the trx instance that is passed to this function. To
+ preserve existing behaviour we remove the locks but ideally we
+ shouldn't have to. There should never be record locks on a table
+ that is going to be dropped. */
if (table->n_ref_count == 0) {
lock_remove_all_on_table(table, TRUE);
@@ -3301,7 +3301,7 @@ check_next_foreign:
}
/* If we get this far then the table to be dropped must not have
- any table or record locks on it. */
+ any table or record locks on it. */
ut_a(!lock_table_has_locks(table));
=== modified file 'storage/innobase/row/row0row.c'
--- a/storage/innobase/row/row0row.c revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0row.c revid:kevin.lewis@stripped
@@ -298,7 +298,8 @@ row_build(
/* REDUNDANT and COMPACT formats store a local
768-byte prefix of each externally stored
column. No cache is needed. */
- ut_ad(dict_table_get_format(index->table) < UNIV_FORMAT_B);
+ ut_ad(dict_table_get_format(index->table)
+ < UNIV_FORMAT_B);
} else if (j) {
*ext = row_ext_create(j, ext_cols, row,
dict_table_zip_size(index->table),
=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0srv.c revid:kevin.lewis@stripped
@@ -112,6 +112,7 @@ UNIV_INTERN ulint srv_max_file_format_at
#if UNIV_FORMAT_A
# error "UNIV_FORMAT_A must be 0!"
#endif
+
/** Place locks to records only i.e. do not use next-key locking except
on duplicate key checking and foreign key checking */
UNIV_INTERN ibool srv_locks_unsafe_for_binlog = FALSE;
=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0start.c revid:kevin.lewis@stripped
@@ -534,7 +534,7 @@ srv_calc_low32(
/*********************************************************************//**
Calculates the high 32 bits when a file size which is given as a number
-database pages is converted to the number of bytes.
+of database pages is converted to the number of bytes.
@return high 32 bytes of file size when expressed in bytes */
static
ulint
Attachment: [text/bzr-bundle] bzr/kevin.lewis@oracle.com-20110408184214-7ucy2pfp74tdu9dy.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-innodb branch (kevin.lewis:3571) | kevin.lewis | 8 Apr |