You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Merge branch 'develop-1.1' into dev-merge-up-20180202
This commit is contained in:
@ -141,7 +141,7 @@ using namespace logging;
|
||||
using namespace funcexp;
|
||||
|
||||
#include "installdir.h"
|
||||
#include "versionnumber.h"
|
||||
#include "columnstoreversion.h"
|
||||
|
||||
namespace cal_impl_if
|
||||
{
|
||||
@ -1980,6 +1980,134 @@ extern "C"
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
// Return 1 if system is ready for reads or 0 if not.
|
||||
long long mcssystemready(UDF_INIT* initid, UDF_ARGS* args,
|
||||
char* is_null, char* error)
|
||||
{
|
||||
long long rtn = 0;
|
||||
Oam oam;
|
||||
DBRM dbrm(true);
|
||||
SystemStatus systemstatus;
|
||||
|
||||
try
|
||||
{
|
||||
oam.getSystemStatus(systemstatus);
|
||||
|
||||
if (systemstatus.SystemOpState == ACTIVE
|
||||
&& dbrm.getSystemReady()
|
||||
&& dbrm.getSystemQueryReady())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
*error = 1;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
my_bool mcssystemready_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
void mcssystemready_deinit(UDF_INIT* initid)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
// Return 1 if system is read only; 0 if writeable
|
||||
long long mcssystemreadonly(UDF_INIT* initid, UDF_ARGS* args,
|
||||
char* is_null, char* error)
|
||||
{
|
||||
long long rtn = 0;
|
||||
DBRM dbrm(true);
|
||||
|
||||
try
|
||||
{
|
||||
if (dbrm.isReadWrite()) // Returns 0 for writable, 5 for read only
|
||||
{
|
||||
rtn = 1;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
*error = 1;
|
||||
rtn = 1;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
my_bool mcssystemreadonly_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
void mcssystemreadonly_deinit(UDF_INIT* initid)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
// Return 1 if system is read only; 0 if writeable
|
||||
long long mcswritessuspended(UDF_INIT* initid, UDF_ARGS* args,
|
||||
char* is_null, char* error)
|
||||
{
|
||||
long long rtn = 0;
|
||||
DBRM dbrm(true);
|
||||
|
||||
try
|
||||
{
|
||||
if (dbrm.getSystemSuspended())
|
||||
{
|
||||
rtn = 1;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
*error = 1;
|
||||
rtn = 1;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
my_bool mcswritessuspended_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
void mcswritessuspended_deinit(UDF_INIT* initid)
|
||||
{
|
||||
}
|
||||
|
||||
#define MAXSTRINGLENGTH 50
|
||||
|
||||
const char* PmSmallSideMaxMemory = "pmmaxmemorysmallside";
|
||||
@ -2472,7 +2600,7 @@ extern "C"
|
||||
char* result, unsigned long* length,
|
||||
char* is_null, char* error)
|
||||
{
|
||||
string version(idb_version);
|
||||
string version(columnstore_version);
|
||||
*length = version.size();
|
||||
memcpy(result, version.c_str(), *length);
|
||||
return result;
|
||||
@ -4291,7 +4419,7 @@ int ha_calpont_impl_end_bulk_insert(bool abort, TABLE* table)
|
||||
if ( ( ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || (thd->lex)->sql_command == SQLCOM_INSERT_SELECT) && !ci->singleInsert )
|
||||
{
|
||||
|
||||
//@Bug 2438. Only load dta infile calls last batch process
|
||||
//@Bug 2438. Only load data infile calls last batch process
|
||||
/* if ( ci->isLoaddataInfile && ((thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) || (ci->useCpimport == 0))) {
|
||||
//@Bug 2829 Handle ctrl-C
|
||||
if ( thd->killed > 0 )
|
||||
|
Reference in New Issue
Block a user