1. support for testing statically built oqgraph
2. my_new.cc should redefine new (std:nothrow) too.
This commit is contained in:
parent
d3c7798e82
commit
43960b937b
@ -1 +1 @@
|
||||
--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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user