Commit 43960b93 authored by Sergei Golubchik's avatar Sergei Golubchik

1. support for testing statically built oqgraph

2. my_new.cc should redefine new (std:nothrow) too.
parent d3c7798e
--plugin-load=$HA_OQGRAPH_SO
--plugin-load=$HA_OQGRAPH_SO --enable-oqgraph
......@@ -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 { };
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment