Commit f509ce23 authored by unknown's avatar unknown

Many files:

  Remove leading whitespace from lines containing preprocessor directives
Makefile.am:
  Remove univold.i and univoldmysql.i


innobase/include/Makefile.am:
  Remove univold.i and univoldmysql.i
innobase/buf/buf0buf.c:
  Remove leading whitespace from lines containing preprocessor directives
innobase/include/mem0mem.ic:
  Remove leading whitespace from lines containing preprocessor directives
innobase/include/sync0rw.ic:
  Remove leading whitespace from lines containing preprocessor directives
innobase/include/sync0sync.ic:
  Remove leading whitespace from lines containing preprocessor directives
innobase/include/ut0rnd.ic:
  Remove leading whitespace from lines containing preprocessor directives
innobase/mem/mem0dbg.c:
  Remove leading whitespace from lines containing preprocessor directives
innobase/mem/mem0mem.c:
  Remove leading whitespace from lines containing preprocessor directives
innobase/sync/sync0rw.c:
  Remove leading whitespace from lines containing preprocessor directives
innobase/sync/sync0sync.c:
  Remove leading whitespace from lines containing preprocessor directives
parent b01a5e43
......@@ -901,13 +901,13 @@ loop:
buf_read_page(space, offset);
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
buf_dbg_counter++;
if (buf_dbg_counter % 37 == 0) {
ut_ad(buf_validate());
}
#endif
#endif
goto loop;
}
......
......@@ -50,7 +50,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \
thr0loc.h thr0loc.ic trx0purge.h trx0purge.ic trx0rec.h \
trx0rec.ic trx0roll.h trx0roll.ic trx0rseg.h trx0rseg.ic \
trx0sys.h trx0sys.ic trx0trx.h trx0trx.ic trx0types.h \
trx0undo.h trx0undo.ic univ.i univold.i univoldmysql.i \
trx0undo.h trx0undo.ic univ.i \
usr0sess.h usr0sess.ic usr0types.h ut0byte.h ut0byte.ic \
ut0dbg.h ut0lst.h ut0mem.h ut0mem.ic ut0rnd.h ut0rnd.ic \
ut0sort.h ut0ut.h ut0ut.ic
......
......@@ -162,7 +162,7 @@ mem_heap_alloc(
mem_block_set_free(block, free + MEM_SPACE_NEEDED(n));
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
/* In the debug version write debugging info to the field */
mem_field_init((byte*)buf, n);
......@@ -171,7 +171,7 @@ mem_heap_alloc(
caller */
buf = (byte*)buf + MEM_FIELD_HEADER_SIZE;
#endif
#endif
#ifdef UNIV_SET_MEM_TO_ZERO
memset(buf, '\0', n);
#endif
......@@ -212,15 +212,15 @@ mem_heap_free_heap_top(
{
mem_block_t* block;
mem_block_t* prev_block;
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
ibool error;
ulint total_size;
ulint size;
#endif
#endif
ut_ad(mem_heap_check(heap));
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
/* Validate the heap and get its total allocated size */
mem_heap_validate_or_print(heap, NULL, FALSE, &error, &total_size,
......@@ -232,7 +232,7 @@ mem_heap_free_heap_top(
NULL);
ut_a(!error);
#endif
#endif
block = UT_LIST_GET_LAST(heap->base);
......@@ -259,7 +259,7 @@ mem_heap_free_heap_top(
/* Set the free field of block */
mem_block_set_free(block, old_top - (byte*)block);
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
ut_ad(mem_block_get_start(block) <= mem_block_get_free(block));
/* In the debug version erase block from top up */
......@@ -271,7 +271,7 @@ mem_heap_free_heap_top(
mem_current_allocated_memory -= (total_size - size);
mutex_exit(&mem_hash_mutex);
#endif
#endif
/* If free == start, we may free the block if it is not the first
one */
......@@ -317,7 +317,7 @@ mem_heap_get_top(
buf = (byte*)block + mem_block_get_free(block) - MEM_SPACE_NEEDED(n);
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
ut_ad(mem_block_get_start(block) <=(ulint)((byte*)buf - (byte*)block));
/* In the debug version, advance buf to point at the storage which
......@@ -327,7 +327,7 @@ mem_heap_get_top(
/* Check that the field lengths agree */
ut_ad(n == (ulint)mem_field_header_get_len(buf));
#endif
#endif
return(buf);
}
......@@ -351,13 +351,13 @@ mem_heap_free_top(
/* Subtract the free field of block */
mem_block_set_free(block, mem_block_get_free(block)
- MEM_SPACE_NEEDED(n));
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
ut_ad(mem_block_get_start(block) <= mem_block_get_free(block));
/* In the debug version check the consistency, and erase field */
mem_field_erase((byte*)block + mem_block_get_free(block), n);
#endif
#endif
/* If free == start, we may free the block if it is not the first
one */
......@@ -417,7 +417,7 @@ mem_heap_create_func(
/* Add the created block itself as the first block in the list */
UT_LIST_ADD_FIRST(list, block->base, block);
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
if (block == NULL) {
......@@ -426,7 +426,7 @@ mem_heap_create_func(
mem_hash_insert(block, file_name, line);
#endif
#endif
return(block);
}
......@@ -452,14 +452,14 @@ mem_heap_free_func(
block = UT_LIST_GET_LAST(heap->base);
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
/* In the debug version remove the heap from the hash table of heaps
and check its consistency */
mem_hash_remove(heap, file_name, line);
#endif
#endif
if (heap->free_block) {
mem_heap_free_block_free(heap);
......
......@@ -140,10 +140,10 @@ rw_lock_s_lock_low(
/* Set the shared lock by incrementing the reader count */
lock->reader_count++;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, pass, RW_LOCK_SHARED, file_name,
line);
#endif
#endif
lock->last_s_file_name = file_name;
lock->last_s_line = line;
......@@ -175,9 +175,9 @@ rw_lock_s_lock_direct(
lock->last_s_file_name = file_name;
lock->last_s_line = line;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, 0, RW_LOCK_SHARED, file_name, line);
#endif
#endif
}
/**********************************************************************
......@@ -204,9 +204,9 @@ rw_lock_x_lock_direct(
lock->last_x_file_name = file_name;
lock->last_x_line = line;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, 0, RW_LOCK_EX, file_name, line);
#endif
#endif
}
/**********************************************************************
......@@ -275,10 +275,10 @@ rw_lock_s_lock_func_nowait(
/* Set the shared lock by incrementing the reader count */
lock->reader_count++;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, 0, RW_LOCK_SHARED, file_name,
line);
#endif
#endif
lock->last_s_file_name = file_name;
lock->last_s_line = line;
......@@ -320,9 +320,9 @@ rw_lock_x_lock_func_nowait(
lock->writer_count++;
lock->pass = 0;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, 0, RW_LOCK_EX, file_name, line);
#endif
#endif
lock->last_x_file_name = file_name;
lock->last_x_line = line;
......@@ -361,9 +361,9 @@ rw_lock_s_unlock_func(
ut_a(lock->reader_count > 0);
lock->reader_count--;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info(lock, pass, RW_LOCK_SHARED);
#endif
#endif
/* If there may be waiters and this was the last s-lock,
signal the object */
......@@ -402,9 +402,9 @@ rw_lock_s_unlock_direct(
lock->reader_count--;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info(lock, 0, RW_LOCK_SHARED);
#endif
#endif
ut_ad(!lock->waiters);
ut_ad(rw_lock_validate(lock));
......@@ -442,9 +442,9 @@ rw_lock_x_unlock_func(
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);
}
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info(lock, pass, RW_LOCK_EX);
#endif
#endif
/* If there may be waiters, signal the lock */
if (lock->waiters && (lock->writer_count == 0)) {
......@@ -486,9 +486,9 @@ rw_lock_x_unlock_direct(
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);
}
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info(lock, 0, RW_LOCK_EX);
#endif
#endif
ut_ad(!lock->waiters);
ut_ad(rw_lock_validate(lock));
......
......@@ -250,9 +250,9 @@ mutex_enter_func(
if (!mutex_test_and_set(mutex)) {
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
#endif
#endif
mutex->file_name = file_name;
mutex->line = line;
......
......@@ -176,19 +176,19 @@ ut_fold_string(
/* out: folded value */
char* str) /* in: null-terminated string */
{
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
ulint i = 0;
#endif
#endif
ulint fold = 0;
ut_ad(str);
while (*str != '\0') {
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
i++;
ut_a(i < 100);
#endif
#endif
fold = ut_fold_ulint_pair(fold, (ulint)(*str));
str++;
......
......@@ -406,12 +406,12 @@ mem_heap_validate_or_print(
ulint total_len = 0;
ulint block_count = 0;
ulint phys_len = 0;
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
ulint len;
byte* field;
byte* user_field;
ulint check_field;
#endif
#endif
/* Pessimistically, we set the parameters to error values */
if (us_size != NULL) {
......@@ -446,7 +446,7 @@ mem_heap_validate_or_print(
return;
}
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
/* We can trace the fields of the block only in the debug
version */
if (print) {
......@@ -502,7 +502,7 @@ mem_heap_validate_or_print(
return;
}
#endif
#endif
block = UT_LIST_GET_NEXT(list, block);
block_count++;
......@@ -714,7 +714,7 @@ mem_all_freed(void)
/*===============*/
/* out: TRUE if no heaps exist */
{
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
mem_hash_node_t* node;
ulint heap_count = 0;
......@@ -744,14 +744,14 @@ mem_all_freed(void)
return(FALSE);
}
#else
#else
printf(
"Sorry, non-debug version cannot check if all memory is freed.\n");
return(FALSE);
#endif
#endif
}
/*********************************************************************
......@@ -762,7 +762,7 @@ mem_validate_no_assert(void)
/*========================*/
/* out: TRUE if error */
{
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
mem_hash_node_t* node;
ulint n_heaps = 0;
......@@ -823,13 +823,13 @@ mem_validate_no_assert(void)
return(error);
#else
#else
printf("Sorry, non-debug version cannot validate dynamic memory\n");
return(FALSE);
#endif
#endif
}
/****************************************************************
......
......@@ -294,13 +294,13 @@ mem_heap_block_free(
init_block = block->init_block;
block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
#ifdef UNIV_MEM_DEBUG
#ifdef UNIV_MEM_DEBUG
/* In the debug version we set the memory to a random combination
of hex 0xDE and 0xAD. */
mem_erase_buf((byte*)block, len);
#endif
#endif
if (init_block) {
/* Do not have to free: do nothing */
......
......@@ -318,10 +318,10 @@ rw_lock_x_lock_low(
lock->writer_count++;
lock->pass = pass;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, pass, RW_LOCK_EX,
file_name, line);
#endif
#endif
lock->last_x_file_name = file_name;
lock->last_x_line = line;
......@@ -334,10 +334,10 @@ rw_lock_x_lock_low(
lock->pass = pass;
lock->writer_is_wait_ex = TRUE;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, pass, RW_LOCK_WAIT_EX,
file_name, line);
#endif
#endif
return(RW_LOCK_WAIT_EX);
}
......@@ -353,11 +353,11 @@ rw_lock_x_lock_low(
lock->pass = pass;
lock->writer_is_wait_ex = FALSE;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info(lock, pass, RW_LOCK_WAIT_EX);
rw_lock_add_debug_info(lock, pass, RW_LOCK_EX,
file_name, line);
#endif
#endif
lock->last_x_file_name = file_name;
lock->last_x_line = line;
......@@ -376,10 +376,10 @@ rw_lock_x_lock_low(
lock->writer_count++;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
rw_lock_add_debug_info(lock, pass, RW_LOCK_EX, file_name,
line);
#endif
#endif
lock->last_x_file_name = file_name;
lock->last_x_line = line;
......
......@@ -301,9 +301,9 @@ mutex_enter_nowait(
if (!mutex_test_and_set(mutex)) {
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
#endif
#endif
mutex->file_name = file_name;
mutex->line = line;
......@@ -402,9 +402,9 @@ spin_loop:
if (mutex_test_and_set(mutex) == 0) {
/* Succeeded! */
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
#endif
#endif
mutex->file_name = file_name;
mutex->line = line;
......@@ -449,9 +449,9 @@ spin_loop:
sync_array_free_cell(sync_primary_wait_array, index);
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
#endif
#endif
mutex->file_name = file_name;
mutex->line = line;
......@@ -671,18 +671,18 @@ ibool
sync_all_freed(void)
/*================*/
{
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
if (mutex_n_reserved() + rw_lock_n_locked() == 0) {
return(TRUE);
} else {
return(FALSE);
}
#else
#else
ut_error;
return(FALSE);
#endif
#endif
}
/**********************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment