Skip to content
Permalink
Browse files
Cleanup: Remove unnecessary declarations
  • Loading branch information
dr-m committed Sep 30, 2020
1 parent bac16c7 commit 363da42
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
@@ -50,6 +50,21 @@ possible. From experimentation it seems that reduce the target size by 512 every
time will make sure the page is compressible within a couple of iterations. */
#define BTR_DEFRAGMENT_PAGE_REDUCTION_STEP_SIZE 512

/** Item in the work queue for btr_degrament_thread. */
struct btr_defragment_item_t
{
btr_pcur_t* pcur; /* persistent cursor where
btr_defragment_n_pages should start */
os_event_t event; /* if not null, signal after work
is done */
bool removed; /* Mark an item as removed */
ulonglong last_processed; /* timestamp of last time this index
is processed by defragment thread */

btr_defragment_item_t(btr_pcur_t* pcur, os_event_t event);
~btr_defragment_item_t();
};

/* Work queue for defragmentation. */
typedef std::list<btr_defragment_item_t*> btr_defragment_wq_t;
static btr_defragment_wq_t btr_defragment_wq;
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (C) 2013, 2014 Facebook, Inc. All Rights Reserved.
Copyright (C) 2014, 2017, MariaDB Corporation.
Copyright (C) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -30,21 +30,6 @@ extern Atomic_counter<ulint> btr_defragment_compression_failures;
extern Atomic_counter<ulint> btr_defragment_failures;
extern Atomic_counter<ulint> btr_defragment_count;

/** Item in the work queue for btr_degrament_thread. */
struct btr_defragment_item_t
{
btr_pcur_t* pcur; /* persistent cursor where
btr_defragment_n_pages should start */
os_event_t event; /* if not null, signal after work
is done */
bool removed; /* Mark an item as removed */
ulonglong last_processed; /* timestamp of last time this index
is processed by defragment thread */

btr_defragment_item_t(btr_pcur_t* pcur, os_event_t event);
~btr_defragment_item_t();
};

/******************************************************************//**
Initialize defragmentation. */
void
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2016, 2018, MariaDB Corporation.
Copyright (c) 2016, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -27,8 +27,6 @@ Created 25/08/2016 Jan Lindström
#ifndef dict0defrag_bg_h
#define dict0defrag_bg_h

#include "os0event.h"
#include "os0thread.h"
#include "dict0types.h"

/** Indices whose defrag stats need to be saved to persistent storage.*/
@@ -28,10 +28,8 @@ Created Apr 26, 2012 Vasil Dimov
#define dict0stats_bg_h

#include "dict0types.h"
#include "os0event.h"
#include "os0thread.h"


#ifdef HAVE_PSI_INTERFACE
extern mysql_pfs_key_t dict_stats_recalc_pool_mutex_key;
#endif /* HAVE_PSI_INTERFACE */
@@ -42,7 +42,6 @@ Created 10/10/1995 Heikki Tuuri
#pragma once

#include "log0log.h"
#include "os0event.h"
#include "que0types.h"
#include "trx0types.h"
#include "fil0fil.h"

0 comments on commit 363da42

Please sign in to comment.