summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-06-05 08:42:24 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-06-05 11:39:47 +0300
commit41cbe92bf116cf35a935496fa8b6c8a9f80a5edd (patch)
tree869ada69532c80799c3d0fbecb5ac24df1c9ad74
parentc1698e8dc50f0c342c1a6886426ba1d43396cd1e (diff)
downloadmariadb-git-41cbe92bf116cf35a935496fa8b6c8a9f80a5edd.tar.gz
Remove dead code that was added in MDEV-5834
ha_innobase::set_partition_owner_stats(): Remove (unused function). ha_innobase::ha_partition_stats: Remove (the variable is never read). Remove unused ut_timer functions.
-rw-r--r--storage/innobase/btr/btr0defragment.cc51
-rw-r--r--storage/innobase/handler/ha_innodb.cc10
-rw-r--r--storage/innobase/handler/ha_innodb.h5
-rw-r--r--storage/innobase/include/ut0timer.h39
-rw-r--r--storage/innobase/include/ut0timer.ic61
-rw-r--r--storage/xtradb/btr/btr0defragment.cc50
-rw-r--r--storage/xtradb/handler/ha_innodb.cc10
-rw-r--r--storage/xtradb/handler/ha_innodb.h5
-rw-r--r--storage/xtradb/include/ut0timer.h39
-rw-r--r--storage/xtradb/include/ut0timer.ic61
10 files changed, 12 insertions, 319 deletions
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index ca4c90eef41..9f17815cd43 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -39,57 +39,6 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
#include <list>
-/**************************************************//**
-Custom nullptr implementation for under g++ 4.6
-*******************************************************/
-// #pragma once
-/*
-namespace std
-{
- // based on SC22/WG21/N2431 = J16/07-0301
- struct nullptr_t
- {
- template<typename any> operator any * () const
- {
- return 0;
- }
- template<class any, typename T> operator T any:: * () const
- {
- return 0;
- }
-
-#ifdef _MSC_VER
- struct pad {};
- pad __[sizeof(void*)/sizeof(pad)];
-#else
- char __[sizeof(void*)];
-#endif
-private:
- // nullptr_t();// {}
- // nullptr_t(const nullptr_t&);
- // void operator = (const nullptr_t&);
- void operator &() const;
- template<typename any> void operator +(any) const
- {
- // I Love MSVC 2005!
- }
- template<typename any> void operator -(any) const
- {
- // I Love MSVC 2005!
- }
- };
-static const nullptr_t __nullptr = {};
-}
-
-#ifndef nullptr
-#define nullptr std::__nullptr
-#endif
-*/
-
-/**************************************************//**
-End of Custom nullptr implementation for under g++ 4.6
-*******************************************************/
-
/* When there's no work, either because defragment is disabled, or because no
query is submitted, thread checks state every BTR_DEFRAGMENT_SLEEP_IN_USECS.*/
#define BTR_DEFRAGMENT_SLEEP_IN_USECS 1000000
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 961166fed9a..f2c241d0869 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -2849,8 +2849,7 @@ ha_innobase::ha_innobase(
(srv_force_primary_key ? HA_REQUIRE_PRIMARY_KEY : 0 ) |
HA_CAN_FULLTEXT_EXT | HA_CAN_EXPORT),
start_of_scan(0),
- num_write_row(0),
- ha_partition_stats(NULL)
+ num_write_row(0)
{}
/*********************************************************************//**
@@ -16749,13 +16748,6 @@ innodb_max_dirty_pages_pct_lwm_update(
srv_max_dirty_pages_pct_lwm = in_val;
}
-UNIV_INTERN
-void
-ha_innobase::set_partition_owner_stats(ha_statistics *stats)
-{
- ha_partition_stats= stats;
-}
-
/************************************************************//**
Validate the file format name and return its corresponding id.
@return valid file format id */
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index 300f49c93f9..9c838910434 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2017, MariaDB Corporation.
+Copyright (c) 2013, 2018, 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
@@ -100,8 +100,6 @@ class ha_innobase: public handler
or undefined */
uint num_write_row; /*!< number of write_row() calls */
- ha_statistics* ha_partition_stats; /*!< stats of the partition owner
- handler (if there is one) */
uint store_key_val_for_row(uint keynr, char* buff, uint buff_len,
const uchar* record);
inline void update_thd(THD* thd);
@@ -316,7 +314,6 @@ class ha_innobase: public handler
Alter_inplace_info* ha_alter_info,
bool commit);
/** @} */
- void set_partition_owner_stats(ha_statistics *stats);
bool check_if_incompatible_data(HA_CREATE_INFO *info,
uint table_changes);
private:
diff --git a/storage/innobase/include/ut0timer.h b/storage/innobase/include/ut0timer.h
index f361ae79bf5..3015771b434 100644
--- a/storage/innobase/include/ut0timer.h
+++ b/storage/innobase/include/ut0timer.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2014, 2018, 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
@@ -19,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
/********************************************************************//**
@file include/ut0timer.h
-Timer rountines
+Timer routines
Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
@@ -28,8 +28,6 @@ modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11
#define ut0timer_h
#include "univ.i"
-#include "data0type.h"
-#include <my_rdtsc.h>
/* Current timer stats */
extern struct my_timer_unit_info ut_timer;
@@ -48,39 +46,6 @@ UNIV_INTERN
void ut_init_timer(void);
/**************************************************************//**
-Return time passed since time then, automatically adjusted
-for the estimated timer overhead.
-@return time passed since "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since(
-/*===========*/
- ulonglong then); /*!< in: time where to calculate */
-/**************************************************************//**
-Get time passed since "then", and update then to now
-@return time passed sinche "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since_and_update(
-/*======================*/
- ulonglong *then); /*!< in: time where to calculate */
-/**************************************************************//**
-Convert native timer units in a ulonglong into seconds in a double
-@return time in a seconds */
-UNIV_INLINE
-double
-ut_timer_to_seconds(
-/*=================*/
- ulonglong when); /*!< in: time where to calculate */
-/**************************************************************//**
-Convert native timer units in a ulonglong into milliseconds in a double
-@return time in milliseconds */
-UNIV_INLINE
-double
-ut_timer_to_milliseconds(
-/*=====================*/
- ulonglong when); /*!< in: time where to calculate */
-/**************************************************************//**
Convert native timer units in a ulonglong into microseconds in a double
@return time in microseconds */
UNIV_INLINE
diff --git a/storage/innobase/include/ut0timer.ic b/storage/innobase/include/ut0timer.ic
index 46dcd0cb718..34886481efa 100644
--- a/storage/innobase/include/ut0timer.ic
+++ b/storage/innobase/include/ut0timer.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2014, 2018, 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
@@ -19,70 +19,13 @@ this program; if not, write to the Free Software Foundation, Inc.,
/********************************************************************//**
@file include/ut0timer.ic
-Timer rountines
+Timer routines
Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
*************************************************************************/
/**************************************************************//**
-Return time passed since time then, automatically adjusted
-for the estimated timer overhead.
-@return time passed since "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since(
-/*===========*/
- ulonglong then) /*!< in: time where to calculate */
-{
- return (ut_timer_now() - then) - ut_timer.overhead;
-}
-
-/**************************************************************//**
-Get time passed since "then", and update then to now
-@return time passed sinche "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since_and_update(
-/*======================*/
- ulonglong *then) /*!< in: time where to calculate */
-{
- ulonglong now = ut_timer_now();
- ulonglong ret = (now - (*then)) - ut_timer.overhead;
- *then = now;
- return ret;
-}
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into seconds in a double
-@return time in a seconds */
-UNIV_INLINE
-double
-ut_timer_to_seconds(
-/*=================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)(when);
- ret /= (double)(ut_timer.frequency);
- return ret;
-}
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into milliseconds in a double
-@return time in milliseconds */
-UNIV_INLINE
-double
-ut_timer_to_milliseconds(
-/*=====================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)(when);
- ret *= 1000.0;
- ret /= (double)(ut_timer.frequency);
- return ret;
-}
-
-/**************************************************************//**
Convert native timer units in a ulonglong into microseconds in a double
@return time in microseconds */
UNIV_INLINE
diff --git a/storage/xtradb/btr/btr0defragment.cc b/storage/xtradb/btr/btr0defragment.cc
index 44acd9118d7..3124db650c6 100644
--- a/storage/xtradb/btr/btr0defragment.cc
+++ b/storage/xtradb/btr/btr0defragment.cc
@@ -40,56 +40,6 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
#include <list>
-/**************************************************//**
-Custom nullptr implementation for under g++ 4.6
-*******************************************************/
-/*
-// #pragma once
-namespace std
-{
- // based on SC22/WG21/N2431 = J16/07-0301
- struct nullptr_t
- {
- template<typename any> operator any * () const
- {
- return 0;
- }
- template<class any, typename T> operator T any:: * () const
- {
- return 0;
- }
-
-#ifdef _MSC_VER
- struct pad {};
- pad __[sizeof(void*)/sizeof(pad)];
-#else
- char __[sizeof(void*)];
-#endif
-private:
- // nullptr_t();// {}
- // nullptr_t(const nullptr_t&);
- // void operator = (const nullptr_t&);
- void operator &() const;
- template<typename any> void operator +(any) const
- {
- // I Love MSVC 2005!
- }
- template<typename any> void operator -(any) const
- {
- // I Love MSVC 2005!
- }
- };
-static const nullptr_t __nullptr = {};
-}
-
-#ifndef nullptr
-#define nullptr std::__nullptr
-#endif
-*/
-/**************************************************//**
-End of Custom nullptr implementation for under g++ 4.6
-*******************************************************/
-
/* When there's no work, either because defragment is disabled, or because no
query is submitted, thread checks state every BTR_DEFRAGMENT_SLEEP_IN_USECS.*/
#define BTR_DEFRAGMENT_SLEEP_IN_USECS 1000000
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 238627ce003..a673dd78c70 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -3259,8 +3259,7 @@ ha_innobase::ha_innobase(
(srv_force_primary_key ? HA_REQUIRE_PRIMARY_KEY : 0 ) |
HA_CAN_FULLTEXT_EXT | HA_CAN_EXPORT),
start_of_scan(0),
- num_write_row(0),
- ha_partition_stats(NULL)
+ num_write_row(0)
{}
/*********************************************************************//**
@@ -17527,13 +17526,6 @@ innodb_max_dirty_pages_pct_lwm_update(
srv_max_dirty_pages_pct_lwm = in_val;
}
-UNIV_INTERN
-void
-ha_innobase::set_partition_owner_stats(ha_statistics *stats)
-{
- ha_partition_stats= stats;
-}
-
/************************************************************//**
Validate the file format name and return its corresponding id.
@return valid file format id */
diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h
index c5b0e723702..3dbbc53a0e3 100644
--- a/storage/xtradb/handler/ha_innodb.h
+++ b/storage/xtradb/handler/ha_innodb.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2017, MariaDB Corporation.
+Copyright (c) 2013, 2018, 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
@@ -100,8 +100,6 @@ class ha_innobase: public handler
or undefined */
uint num_write_row; /*!< number of write_row() calls */
- ha_statistics* ha_partition_stats; /*!< stats of the partition owner
- handler (if there is one) */
uint store_key_val_for_row(uint keynr, char* buff, uint buff_len,
const uchar* record);
inline void update_thd(THD* thd);
@@ -318,7 +316,6 @@ class ha_innobase: public handler
Alter_inplace_info* ha_alter_info,
bool commit);
/** @} */
- void set_partition_owner_stats(ha_statistics *stats);
bool check_if_incompatible_data(HA_CREATE_INFO *info,
uint table_changes);
diff --git a/storage/xtradb/include/ut0timer.h b/storage/xtradb/include/ut0timer.h
index f361ae79bf5..3015771b434 100644
--- a/storage/xtradb/include/ut0timer.h
+++ b/storage/xtradb/include/ut0timer.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2014, 2018, 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
@@ -19,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
/********************************************************************//**
@file include/ut0timer.h
-Timer rountines
+Timer routines
Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
@@ -28,8 +28,6 @@ modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11
#define ut0timer_h
#include "univ.i"
-#include "data0type.h"
-#include <my_rdtsc.h>
/* Current timer stats */
extern struct my_timer_unit_info ut_timer;
@@ -48,39 +46,6 @@ UNIV_INTERN
void ut_init_timer(void);
/**************************************************************//**
-Return time passed since time then, automatically adjusted
-for the estimated timer overhead.
-@return time passed since "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since(
-/*===========*/
- ulonglong then); /*!< in: time where to calculate */
-/**************************************************************//**
-Get time passed since "then", and update then to now
-@return time passed sinche "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since_and_update(
-/*======================*/
- ulonglong *then); /*!< in: time where to calculate */
-/**************************************************************//**
-Convert native timer units in a ulonglong into seconds in a double
-@return time in a seconds */
-UNIV_INLINE
-double
-ut_timer_to_seconds(
-/*=================*/
- ulonglong when); /*!< in: time where to calculate */
-/**************************************************************//**
-Convert native timer units in a ulonglong into milliseconds in a double
-@return time in milliseconds */
-UNIV_INLINE
-double
-ut_timer_to_milliseconds(
-/*=====================*/
- ulonglong when); /*!< in: time where to calculate */
-/**************************************************************//**
Convert native timer units in a ulonglong into microseconds in a double
@return time in microseconds */
UNIV_INLINE
diff --git a/storage/xtradb/include/ut0timer.ic b/storage/xtradb/include/ut0timer.ic
index 815726e9d0a..02af23cdc6d 100644
--- a/storage/xtradb/include/ut0timer.ic
+++ b/storage/xtradb/include/ut0timer.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2014, 2018, 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
@@ -19,70 +19,13 @@ this program; if not, write to the Free Software Foundation, Inc.,
/********************************************************************//**
@file include/ut0timer.ic
-Timer rountines
+Timer routines
Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
*************************************************************************/
/**************************************************************//**
-Return time passed since time then, automatically adjusted
-for the estimated timer overhead.
-@return time passed since "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since(
-/*===========*/
- ulonglong then) /*!< in: time where to calculate */
-{
- return (ut_timer_now() - then) - ut_timer.overhead;
-}
-
-/**************************************************************//**
-Get time passed since "then", and update then to now
-@return time passed sinche "then" */
-UNIV_INLINE
-ulonglong
-ut_timer_since_and_update(
-/*======================*/
- ulonglong *then) /*!< in: time where to calculate */
-{
- ulonglong now = ut_timer_now();
- ulonglong ret = (now - (*then)) - ut_timer.overhead;
- *then = now;
- return ret;
-}
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into seconds in a double
-@return time in a seconds */
-UNIV_INLINE
-double
-ut_timer_to_seconds(
-/*=================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)(when);
- ret /= (double)(ut_timer.frequency);
- return ret;
-}
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into milliseconds in a double
-@return time in milliseconds */
-UNIV_INLINE
-double
-ut_timer_to_milliseconds(
-/*=====================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)(when);
- ret *= 1000.0;
- ret /= (double)(ut_timer.frequency);
- return ret;
-}
-
-/**************************************************************//**
Convert native timer units in a ulonglong into microseconds in a double
@return time in microseconds */
UNIV_INLINE