summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2020-03-11 16:27:37 +0300
committerEugene Kosov <claprix@yandex.ru>2020-03-11 16:27:37 +0300
commitdf88e7cefaa7dcffdc52359b73a1087e8569e000 (patch)
treef9cd6de83dd4fbfed03687157c8410e5830af681
parentb30446c85dbf0fd402a7833e1042bc13be7fece2 (diff)
downloadmariadb-git-df88e7cefaa7dcffdc52359b73a1087e8569e000.tar.gz
fix typedef-related warning and cleanup using namespace std
-rw-r--r--storage/innobase/btr/btr0defragment.cc3
-rw-r--r--storage/innobase/include/buf0buf.h4
-rw-r--r--storage/innobase/include/page0types.h4
-rw-r--r--storage/innobase/page/page0zip.cc3
-rw-r--r--storage/innobase/row/row0mysql.cc2
-rw-r--r--storage/xtradb/include/buf0buf.h4
6 files changed, 9 insertions, 11 deletions
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 070f6a9cc0a..f679f22dfe4 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -38,6 +38,9 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
#include <list>
+using std::list;
+using std::min;
+
/* 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/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index bcb2252e7dc..b6ad0b85b19 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -1504,7 +1504,7 @@ buf_page_encrypt_before_write(
NOTE! The definition appears here only for other modules of this
directory (buf) to see it. Do not use from outside! */
-typedef struct {
+struct buf_tmp_buffer_t {
private:
int32 reserved; /*!< true if this slot is reserved
*/
@@ -1534,7 +1534,7 @@ public:
return !my_atomic_fas32_explicit(&reserved, true,
MY_MEMORY_ORDER_RELAXED);
}
-} buf_tmp_buffer_t;
+};
/** The common buffer control block structure
for compressed and uncompressed frames */
diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h
index cba2d7a7a8b..3f7a653f8f8 100644
--- a/storage/innobase/include/page0types.h
+++ b/storage/innobase/include/page0types.h
@@ -26,8 +26,6 @@ Created 2/2/1994 Heikki Tuuri
#ifndef page0types_h
#define page0types_h
-using namespace std;
-
#include <map>
#include "univ.i"
@@ -110,7 +108,7 @@ struct page_zip_stat_t {
};
/** Compression statistics types */
-typedef map<index_id_t, page_zip_stat_t> page_zip_stat_per_index_t;
+typedef std::map<index_id_t, page_zip_stat_t> page_zip_stat_per_index_t;
/** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */
extern page_zip_stat_t page_zip_stat[PAGE_ZIP_SSIZE_MAX];
diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc
index 233ccaa6a90..1b0fcea326a 100644
--- a/storage/innobase/page/page0zip.cc
+++ b/storage/innobase/page/page0zip.cc
@@ -28,9 +28,6 @@ Created June 2005 by Marko Makela
// First include (the generated) my_config.h, to get correct platform defines.
#include "my_config.h"
-#include <map>
-using namespace std;
-
#define THIS_MODULE
#include "page0zip.h"
#ifdef UNIV_NONINL
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 55befe42b13..7df9629294a 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -807,7 +807,7 @@ row_create_prebuilt(
temp_index->fields[i].fixed_len;
}
}
- srch_key_len = max(srch_key_len,temp_len);
+ srch_key_len = std::max(srch_key_len,temp_len);
}
ut_a(srch_key_len <= MAX_SRCH_KEY_VAL_BUFFER);
diff --git a/storage/xtradb/include/buf0buf.h b/storage/xtradb/include/buf0buf.h
index e8a82f2e3e4..39fceeef384 100644
--- a/storage/xtradb/include/buf0buf.h
+++ b/storage/xtradb/include/buf0buf.h
@@ -1528,7 +1528,7 @@ buf_page_encrypt_before_write(
NOTE! The definition appears here only for other modules of this
directory (buf) to see it. Do not use from outside! */
-typedef struct {
+struct buf_tmp_buffer_t {
private:
int32 reserved; /*!< true if this slot is reserved
*/
@@ -1558,7 +1558,7 @@ public:
return !my_atomic_fas32_explicit(&reserved, true,
MY_MEMORY_ORDER_RELAXED);
}
-} buf_tmp_buffer_t;
+};
/** The common buffer control block structure
for compressed and uncompressed frames */