Commit ab8517f3 authored by osku's avatar osku

Fix invalid brace positioning and spaces before tabs.

parent 591e526f
......@@ -2993,8 +2993,7 @@ dict_create_foreign_constraints_low(
command, determine if there are any foreign keys, and
if so, immediately reject the command if the table is a
temporary one. For now, this kludge will work. */
if (reject_fks && (UT_LIST_GET_LEN(table->foreign_list) > 0))
{
if (reject_fks && (UT_LIST_GET_LEN(table->foreign_list) > 0)) {
return DB_CANNOT_ADD_CONSTRAINT;
}
......
......@@ -626,8 +626,7 @@ innobase_mysql_print_thd(
/* Points to buf or dyn_str. */
char* str = buf;
if (max_query_len == 0)
{
if (max_query_len == 0) {
/* ADDITIONAL SAFETY: the default is to print at
most 300 chars to reduce the probability of a
seg fault if there is a race in
......@@ -639,8 +638,7 @@ innobase_mysql_print_thd(
len = min(thd->query_length, max_query_len);
if (len > (sizeof(buf) - 1))
{
if (len > (sizeof(buf) - 1)) {
dyn_str = my_malloc(len + 1, MYF(0));
str = dyn_str;
}
......@@ -651,8 +649,7 @@ innobase_mysql_print_thd(
putc('\n', f);
fwrite(str, 1, len, f);
if (dyn_str)
{
if (dyn_str) {
my_free(dyn_str, MYF(0));
}
}
......@@ -1683,7 +1680,7 @@ innobase_commit(
innobase_commit_low(trx);
if (srv_commit_concurrency > 0) {
if (srv_commit_concurrency > 0) {
pthread_mutex_lock(&commit_cond_m);
commit_threads--;
pthread_cond_signal(&commit_cond);
......@@ -6624,8 +6621,7 @@ innodb_show_status(
/* allocate buffer for the string, and
read the contents of the temporary file */
if (!(str = my_malloc(usable_len + 1, MYF(0))))
{
if (!(str = my_malloc(usable_len + 1, MYF(0)))) {
mutex_exit_noninline(&srv_monitor_file_mutex);
DBUG_RETURN(TRUE);
}
......
......@@ -118,7 +118,7 @@ void*
os_mem_alloc_large(
/*===============*/
/* out: allocated memory */
ulint n, /* in: number of bytes */
ulint n, /* in: number of bytes */
ibool set_to_zero, /* in: TRUE if allocated memory
should be set to zero if
UNIV_SET_MEM_TO_ZERO is defined */
......
......@@ -255,8 +255,7 @@ mutex_enter_func(
mutex->count_using++;
#endif /* UNIV_HOTBACKUP */
if (!mutex_test_and_set(mutex))
{
if (!mutex_test_and_set(mutex)) {
#ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line);
#endif
......@@ -264,5 +263,4 @@ mutex_enter_func(
}
mutex_spin_wait(mutex, file_name, line);
}
......@@ -232,7 +232,7 @@ of a field is a 32-bit integer when we store it, for example, to an undo log
on disk, we must have also this number fit in 32 bits, also in 64-bit
computers! */
#define UNIV_SQL_NULL ULINT32_UNDEFINED
#define UNIV_SQL_NULL ULINT32_UNDEFINED
/* Lengths which are not UNIV_SQL_NULL, but bigger than the following
number indicate that a field contains a reference to an externally
......
......@@ -119,7 +119,7 @@ os_awe_enable_lock_pages_in_mem(void)
Result = LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME,
&(Info.Privilege[0].Luid));
if (Result != TRUE) {
if (Result != TRUE) {
fprintf(stderr,
"InnoDB: AWE: Cannot get local privilege value for %s, error %lu.\n",
SE_LOCK_MEMORY_NAME, (ulint)GetLastError());
......@@ -134,7 +134,7 @@ os_awe_enable_lock_pages_in_mem(void)
0, NULL, NULL);
/* Check the result */
if (Result != TRUE) {
if (Result != TRUE) {
fprintf(stderr,
"InnoDB: AWE: Cannot adjust process token privileges, error %u.\n",
GetLastError());
......@@ -533,7 +533,7 @@ void*
os_mem_alloc_large(
/*===============*/
/* out: allocated memory */
ulint n, /* in: number of bytes */
ulint n, /* in: number of bytes */
ibool set_to_zero, /* in: TRUE if allocated memory
should be set to zero if
UNIV_SET_MEM_TO_ZERO is defined */
......
......@@ -276,7 +276,7 @@ row_ins_sec_index_entry_by_modify(
if (err == DB_OVERFLOW || err == DB_UNDERFLOW) {
err = DB_FAIL;
}
} else {
} else {
ut_a(mode == BTR_MODIFY_TREE);
err = btr_cur_pessimistic_update(BTR_KEEP_SYS_FLAG, cursor,
&dummy_big_rec, update, 0, thr, mtr);
......@@ -340,7 +340,7 @@ row_ins_clust_index_entry_by_modify(
if (err == DB_OVERFLOW || err == DB_UNDERFLOW) {
err = DB_FAIL;
}
} else {
} else {
ut_a(mode == BTR_MODIFY_TREE);
err = btr_cur_pessimistic_update(0, cursor, big_rec, update,
0, thr, mtr);
......
......@@ -2909,8 +2909,7 @@ row_sel_pop_cached_row_for_mysql(
ut_ad(prebuilt->n_fetch_cached > 0);
ut_ad(prebuilt->mysql_prefix_len <= prebuilt->mysql_row_len);
if (UNIV_UNLIKELY(prebuilt->keep_other_fields_on_keyread))
{
if (UNIV_UNLIKELY(prebuilt->keep_other_fields_on_keyread)) {
/* Copy cache record field by field, don't touch fields that
are not covered by current key */
cached_rec =
......@@ -2924,8 +2923,7 @@ row_sel_pop_cached_row_for_mysql(
templ->mysql_col_len);
/* Copy NULL bit of the current field from cached_rec
to buf */
if (templ->mysql_null_bit_mask)
{
if (templ->mysql_null_bit_mask) {
buf[templ->mysql_null_byte_offset] ^=
(buf[templ->mysql_null_byte_offset] ^
cached_rec[templ->mysql_null_byte_offset]) &
......@@ -2933,8 +2931,7 @@ row_sel_pop_cached_row_for_mysql(
}
}
}
else
{
else {
ut_memcpy(buf, prebuilt->fetch_cache[prebuilt->fetch_cache_first],
prebuilt->mysql_prefix_len);
}
......
......@@ -458,7 +458,7 @@ row_undo_mod_del_unmark_sec_and_undo_update(
if (err == DB_OVERFLOW || err == DB_UNDERFLOW) {
err = DB_FAIL;
}
} else {
} else {
ut_a(mode == BTR_MODIFY_TREE);
err = btr_cur_pessimistic_update(BTR_KEEP_SYS_FLAG
| BTR_NO_LOCKING_FLAG,
......
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