Skip to content

Commit

Permalink
Fixed compiler errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lindström committed Feb 4, 2014
1 parent 55fab3d commit 862b034
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions storage/innobase/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,9 @@ srv_start_wait_for_purge_to_start()

/* JAN: TODO: */
/**********************************************************************************/
#ifdef UNIV_DEBUG
extern int timediff(struct timeval *g_time, struct timeval *s_time, struct timeval *d_time);
#endif
extern ibool buf_flush_start(buf_pool_t* buf_pool, enum buf_flush flush_type);
extern void buf_flush_end(buf_pool_t* buf_pool, enum buf_flush flush_type);
extern void buf_flush_common(enum buf_flush flush_type, ulint page_count);
Expand Down Expand Up @@ -1545,8 +1547,9 @@ int setup_wrk_itm(int items)

int flush_pool_instance(wrk_t *wi)
{
#ifdef UNIV_DEBUG
struct timeval p_start_time, p_end_time, d_time;

#endif
if (!wi) {
fprintf(stderr, "work item invalid wi:%p\n", wi);
return -1;
Expand Down Expand Up @@ -1575,8 +1578,10 @@ int flush_pool_instance(wrk_t *wi)
return -1;
}

#ifdef UNIV_DEBUG
/* Record time taken for the OP in usec */
gettimeofday(&p_start_time, 0x0);
#endif

if (wi->wr.flush_type == BUF_FLUSH_LRU) {
/* srv_LRU_scan_depth can be arbitrarily large value.
Expand All @@ -1595,10 +1600,11 @@ int flush_pool_instance(wrk_t *wi)
buf_flush_end(wi->wr.buf_pool, wi->wr.flush_type);
buf_flush_common(wi->wr.flush_type, wi->result);

#ifdef UNIV_DEBUG
gettimeofday(&p_end_time, 0x0);
timediff(&p_end_time, &p_start_time, &d_time);

wi->t_usec = (unsigned long)(d_time.tv_usec+(d_time.tv_sec*1000000));
#endif
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion storage/tokudb/ft-index/ft/ft-ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ basement_node_gc_all_les(BASEMENTNODE bn,
while (index < (num_leafentries_before = bn->data_buffer.omt_size())) {
void* keyp = NULL;
uint32_t keylen = 0;
LEAFENTRY leaf_entry;
LEAFENTRY leaf_entry = 0;
bn->data_buffer.fetch_klpair(index, &leaf_entry, &keylen, &keyp);
assert_zero(r);
ft_basement_node_gc_once(
Expand Down
7 changes: 6 additions & 1 deletion storage/xtradb/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,10 @@ init_log_online(void)

/* JAN: TODO: */
/**********************************************************************************/
#ifdef UNIV_DEBUG
extern int timediff(struct timeval *g_time, struct timeval *s_time, struct timeval *d_time);
#endif

extern ibool buf_flush_start(buf_pool_t* buf_pool, buf_flush_t flush_type);
extern void buf_flush_end(buf_pool_t* buf_pool, buf_flush_t flush_type);
extern void buf_flush_common(buf_flush_t flush_type, ulint page_count);
Expand Down Expand Up @@ -1676,10 +1679,12 @@ int flush_pool_instance(wrk_t *wi)
buf_flush_end(wi->wr.buf_pool, wi->wr.flush_type);
buf_flush_common(wi->wr.flush_type, wi->result);

#ifdef UNIV_DEBUG
gettimeofday(&p_end_time, 0x0);
timediff(&p_end_time, &p_start_time, &d_time);

wi->t_usec = (unsigned long)(d_time.tv_usec+(d_time.tv_sec*1000000));
#endif

return 0;
}

Expand Down

0 comments on commit 862b034

Please sign in to comment.