summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2017-06-18 06:42:16 +0300
committerSergei Golubchik <serg@mariadb.org>2017-08-24 01:05:44 +0200
commit4aaa38d26ed95127b8424100c8a14c77af15fc11 (patch)
treefd96b83db1e58971f25b7a27239b07cdca0f0793 /storage/oqgraph
parentb0da8897b08b0717ccae418f880b5ab0f5960312 (diff)
downloadmariadb-git-4aaa38d26ed95127b8424100c8a14c77af15fc11.tar.gz
Enusure that my_global.h is included first
- Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/ha_oqgraph.cc2
-rw-r--r--storage/oqgraph/oqgraph_thunk.cc18
2 files changed, 15 insertions, 5 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index 4b858d468f5..82b78285a49 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -39,7 +39,7 @@
#pragma implementation // gcc: Class implementation
#endif
-#include <my_config.h>
+#include <my_global.h>
#define MYSQL_SERVER 1 // to have THD
/* For the moment, include code to deal with integer latches.
* I have wrapped it with this #ifdef to make it easier to find and remove in the future.
diff --git a/storage/oqgraph/oqgraph_thunk.cc b/storage/oqgraph/oqgraph_thunk.cc
index 2ebd0171f9c..1d0c651bec4 100644
--- a/storage/oqgraph/oqgraph_thunk.cc
+++ b/storage/oqgraph/oqgraph_thunk.cc
@@ -22,13 +22,24 @@
======================================================================
*/
-#include <my_config.h>
+#define MYSQL_SERVER
+#include <my_global.h>
#include "oqgraph_thunk.h"
#include <boost/tuple/tuple.hpp>
-#define MYSQL_SERVER
-#include <my_global.h>
+/* This is needed as boost undef's isfinite */
+#ifndef isfinite
+#ifdef HAVE_FINITE
+#define isfinite(x) finite(x)
+#else
+#define isfinite(x) (1.0 / fabs(x) > 0.0)
+#endif /* HAVE_FINITE */
+#elif (__cplusplus >= 201103L)
+#include <cmath>
+static inline bool isfinite(double x) { return std::isfinite(x); }
+#endif /* isfinite */
+
#include "unireg.h"
#include "sql_base.h"
#include "table.h"
@@ -40,7 +51,6 @@
#define user_defined_key_parts key_parts
#endif
-
static int debugid = 0;
oqgraph3::vertex_id oqgraph3::edge_info::origid() const