summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/oqgraph/suite.opt2
-rw-r--r--mysql-test/suite/oqgraph/suite.pm3
-rw-r--r--mysys/my_new.cc21
3 files changed, 24 insertions, 2 deletions
diff --git a/mysql-test/suite/oqgraph/suite.opt b/mysql-test/suite/oqgraph/suite.opt
index bc7ccfc1414..c41e40b894d 100644
--- a/mysql-test/suite/oqgraph/suite.opt
+++ b/mysql-test/suite/oqgraph/suite.opt
@@ -1 +1 @@
---plugin-load=$HA_OQGRAPH_SO
+--plugin-load=$HA_OQGRAPH_SO --enable-oqgraph
diff --git a/mysql-test/suite/oqgraph/suite.pm b/mysql-test/suite/oqgraph/suite.pm
index 5066d4e9f8a..4e98aa9757c 100644
--- a/mysql-test/suite/oqgraph/suite.pm
+++ b/mysql-test/suite/oqgraph/suite.pm
@@ -2,7 +2,8 @@ package My::Suite::OQGraph;
@ISA = qw(My::Suite);
-return "No OQGraph" unless $ENV{HA_OQGRAPH_SO};
+return "No OQGraph" unless $ENV{HA_OQGRAPH_SO} or
+ $::mysqld_variables{'oqgraph'} eq "ON";
bless { };
diff --git a/mysys/my_new.cc b/mysys/my_new.cc
index 03b3d0f5870..4266452da43 100644
--- a/mysys/my_new.cc
+++ b/mysys/my_new.cc
@@ -23,6 +23,7 @@
*/
#include "mysys_priv.h"
+#include <new>
#ifdef USE_MYSYS_NEW
@@ -36,6 +37,16 @@ void *operator new[] (size_t sz)
return (void *) my_malloc (sz ? sz : 1, MYF(0));
}
+void* operator new(std::size_t sz, const std::nothrow_t&) throw()
+{
+ return (void *) my_malloc (sz ? sz : 1, MYF(0));
+}
+
+void* operator new[](std::size_t sz, const std::nothrow_t&) throw()
+{
+ return (void *) my_malloc (sz ? sz : 1, MYF(0));
+}
+
void operator delete (void *ptr)
{
my_free(ptr);
@@ -46,6 +57,16 @@ void operator delete[] (void *ptr) throw ()
my_free(ptr);
}
+void operator delete(void* ptr, const std::nothrow_t&) throw()
+{
+ my_free(ptr);
+}
+
+void operator delete[](void* ptr, const std::nothrow_t&) throw()
+{
+ my_free(ptr);
+}
+
C_MODE_START
int __cxa_pure_virtual()