mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
Remove windows ifdefs
This commit is contained in:
parent
123c345b40
commit
56f2346083
@ -19,20 +19,12 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#endif
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_set>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#endif
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -27,19 +27,12 @@
|
|||||||
#include "mcs_double.h"
|
#include "mcs_double.h"
|
||||||
#include "mcs_longdouble.h"
|
#include "mcs_longdouble.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
typedef int mcs_sint32_t;
|
|
||||||
#else
|
|
||||||
typedef int32_t mcs_sint32_t;
|
typedef int32_t mcs_sint32_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Because including my_sys.h in a Columnstore header causes too many conflicts
|
// Because including my_sys.h in a Columnstore header causes too many conflicts
|
||||||
struct charset_info_st;
|
struct charset_info_st;
|
||||||
typedef const struct charset_info_st CHARSET_INFO;
|
typedef const struct charset_info_st CHARSET_INFO;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define __attribute__(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,163 +0,0 @@
|
|||||||
|
|
||||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
|
||||||
|
|
||||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
|
||||||
|
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* As a special exception, you may create a larger work that contains
|
|
||||||
part or all of the Bison parser skeleton and distribute that work
|
|
||||||
under terms of your choice, so long as that work isn't itself a
|
|
||||||
parser generator using the skeleton or a modified version thereof
|
|
||||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
|
||||||
the parser skeleton itself, you may (at your option) remove this
|
|
||||||
special exception, which will cause the skeleton and the resulting
|
|
||||||
Bison output files to be licensed under the GNU General Public
|
|
||||||
License without this special exception.
|
|
||||||
|
|
||||||
This special exception was added by the Free Software Foundation in
|
|
||||||
version 2.2 of Bison. */
|
|
||||||
|
|
||||||
/* Tokens. */
|
|
||||||
#pragma once
|
|
||||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
||||||
know about them. */
|
|
||||||
enum yytokentype
|
|
||||||
{
|
|
||||||
ACTION = 258,
|
|
||||||
ADD = 259,
|
|
||||||
ALTER = 260,
|
|
||||||
AUTO_INCREMENT = 261,
|
|
||||||
BIGINT = 262,
|
|
||||||
BIT = 263,
|
|
||||||
IDB_BLOB = 264,
|
|
||||||
CASCADE = 265,
|
|
||||||
IDB_CHAR = 266,
|
|
||||||
CHARACTER = 267,
|
|
||||||
CHECK = 268,
|
|
||||||
CLOB = 269,
|
|
||||||
COLUMN = 270,
|
|
||||||
COLUMNS = 271,
|
|
||||||
COMMENT = 272,
|
|
||||||
CONSTRAINT = 273,
|
|
||||||
CONSTRAINTS = 274,
|
|
||||||
CREATE = 275,
|
|
||||||
CURRENT_USER = 276,
|
|
||||||
DATETIME = 277,
|
|
||||||
DEC = 278,
|
|
||||||
DECIMAL = 279,
|
|
||||||
DEFAULT = 280,
|
|
||||||
DEFERRABLE = 281,
|
|
||||||
DEFERRED = 282,
|
|
||||||
IDB_DELETE = 283,
|
|
||||||
DROP = 284,
|
|
||||||
ENGINE = 285,
|
|
||||||
FOREIGN = 286,
|
|
||||||
FULL = 287,
|
|
||||||
IMMEDIATE = 288,
|
|
||||||
INDEX = 289,
|
|
||||||
INITIALLY = 290,
|
|
||||||
IDB_INT = 291,
|
|
||||||
INTEGER = 292,
|
|
||||||
KEY = 293,
|
|
||||||
MATCH = 294,
|
|
||||||
MAX_ROWS = 295,
|
|
||||||
MIN_ROWS = 296,
|
|
||||||
MODIFY = 297,
|
|
||||||
NO = 298,
|
|
||||||
NOT = 299,
|
|
||||||
NULL_TOK = 300,
|
|
||||||
NUMBER = 301,
|
|
||||||
NUMERIC = 302,
|
|
||||||
ON = 303,
|
|
||||||
PARTIAL = 304,
|
|
||||||
PRECISION = 305,
|
|
||||||
PRIMARY = 306,
|
|
||||||
REFERENCES = 307,
|
|
||||||
RENAME = 308,
|
|
||||||
RESTRICT = 309,
|
|
||||||
SET = 310,
|
|
||||||
SMALLINT = 311,
|
|
||||||
TABLE = 312,
|
|
||||||
TIME = 313,
|
|
||||||
TINYINT = 314,
|
|
||||||
TO = 315,
|
|
||||||
UNIQUE = 316,
|
|
||||||
UNSIGNED = 317,
|
|
||||||
UPDATE = 318,
|
|
||||||
USER = 319,
|
|
||||||
SESSION_USER = 320,
|
|
||||||
SYSTEM_USER = 321,
|
|
||||||
VARCHAR = 322,
|
|
||||||
VARBINARY = 323,
|
|
||||||
VARYING = 324,
|
|
||||||
WITH = 325,
|
|
||||||
ZONE = 326,
|
|
||||||
DOUBLE = 327,
|
|
||||||
IDB_FLOAT = 328,
|
|
||||||
REAL = 329,
|
|
||||||
CHARSET = 330,
|
|
||||||
IDB_IF = 331,
|
|
||||||
EXISTS = 332,
|
|
||||||
CHANGE = 333,
|
|
||||||
TRUNCATE = 334,
|
|
||||||
IDENT = 335,
|
|
||||||
FCONST = 336,
|
|
||||||
SCONST = 337,
|
|
||||||
CP_SEARCH_CONDITION_TEXT = 338,
|
|
||||||
ICONST = 339,
|
|
||||||
DATE = 340
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED
|
|
||||||
typedef union YYSTYPE
|
|
||||||
{
|
|
||||||
ddlpackage::AlterTableStatement* alterTableStmt;
|
|
||||||
ddlpackage::AlterTableAction* ata;
|
|
||||||
ddlpackage::AlterTableActionList* ataList;
|
|
||||||
ddlpackage::DDL_CONSTRAINT_ATTRIBUTES cattr;
|
|
||||||
std::pair<std::string, std::string>* tableOption;
|
|
||||||
const char* columnOption;
|
|
||||||
ddlpackage::ColumnConstraintDef* columnConstraintDef;
|
|
||||||
ddlpackage::ColumnNameList* columnNameList;
|
|
||||||
ddlpackage::ColumnType* columnType;
|
|
||||||
ddlpackage::ConstraintAttributes* constraintAttributes;
|
|
||||||
ddlpackage::ColumnConstraintList* constraintList;
|
|
||||||
ddlpackage::DDL_CONSTRAINTS constraintType;
|
|
||||||
double dval;
|
|
||||||
bool flag;
|
|
||||||
int ival;
|
|
||||||
ddlpackage::QualifiedName* qualifiedName;
|
|
||||||
ddlpackage::SchemaObject* schemaObject;
|
|
||||||
ddlpackage::SqlStatement* sqlStmt;
|
|
||||||
ddlpackage::SqlStatementList* sqlStmtList;
|
|
||||||
const char* str;
|
|
||||||
ddlpackage::TableConstraintDef* tableConstraint;
|
|
||||||
ddlpackage::TableElementList* tableElementList;
|
|
||||||
ddlpackage::TableOptionMap* tableOptionMap;
|
|
||||||
ddlpackage::ColumnDefaultValue* colDefault;
|
|
||||||
ddlpackage::DDL_MATCH_TYPE matchType;
|
|
||||||
ddlpackage::DDL_REFERENTIAL_ACTION refActionCode;
|
|
||||||
ddlpackage::ReferentialAction* refAction;
|
|
||||||
|
|
||||||
} YYSTYPE;
|
|
||||||
#define YYSTYPE_IS_TRIVIAL 1
|
|
||||||
#define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
||||||
#define YYSTYPE_IS_DECLARED 1
|
|
||||||
|
|
||||||
extern YYSTYPE ddllval;
|
|
File diff suppressed because it is too large
Load Diff
@ -24,12 +24,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sqlparser.h"
|
#include "sqlparser.h"
|
||||||
#include "ddlpkg.h"
|
#include "ddlpkg.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "ddl-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "ddl-gram.h"
|
#include "ddl-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace ddlpackage;
|
using namespace ddlpackage;
|
||||||
typedef enum { NOOP, STRIP_QUOTES } copy_action_t;
|
typedef enum { NOOP, STRIP_QUOTES } copy_action_t;
|
||||||
|
@ -43,11 +43,7 @@
|
|||||||
%{
|
%{
|
||||||
#include "sqlparser.h"
|
#include "sqlparser.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "ddl-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "ddl-gram.h"
|
#include "ddl-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "mariadb_my_sys.h" // CHARSET_INFO
|
#include "mariadb_my_sys.h" // CHARSET_INFO
|
||||||
|
|
||||||
|
@ -46,11 +46,7 @@
|
|||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "logicalpartition.h"
|
#include "logicalpartition.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDDLPKG_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackage
|
namespace ddlpackage
|
||||||
{
|
{
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
PATH=C:\PROGRA~2\GNUWIN32\BIN;%PATH%
|
|
||||||
|
|
||||||
del ddl-gram-win.h >nul 2>&1
|
|
||||||
bison -l -v -d -p ddl -o ddl-gram-win.cpp ddl.y
|
|
||||||
ren ddl-gram-win.hpp ddl-gram-win.h
|
|
||||||
flex -i -L -Pddl -oddl-scan-win.cpp ddl.l
|
|
@ -29,11 +29,7 @@
|
|||||||
#include "sqlparser.h"
|
#include "sqlparser.h"
|
||||||
#undef DDLPKGSQLPARSER_DLLEXPORT
|
#undef DDLPKGSQLPARSER_DLLEXPORT
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "ddl-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "ddl-gram.h"
|
#include "ddl-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
void scanner_finish(void* yyscanner);
|
void scanner_finish(void* yyscanner);
|
||||||
void scanner_init(const char* str, void* yyscanner);
|
void scanner_init(const char* str, void* yyscanner);
|
||||||
|
@ -30,11 +30,7 @@
|
|||||||
#include "collation.h" // CHARSET_INFO
|
#include "collation.h" // CHARSET_INFO
|
||||||
#include "ddlpkg.h"
|
#include "ddlpkg.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDDLPKGSQLPARSER_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackage
|
namespace ddlpackage
|
||||||
{
|
{
|
||||||
|
@ -416,9 +416,6 @@ AlterTableProcessor::DDLResult AlterTableProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -427,7 +424,6 @@ AlterTableProcessor::DDLResult AlterTableProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -167,23 +167,6 @@ CreateTableProcessor::DDLResult CreateTableProcessor::processPackage(
|
|||||||
// This is a current db bug, it should not turn OID is it cannot find
|
// This is a current db bug, it should not turn OID is it cannot find
|
||||||
if (roPair.objnum >= 3000)
|
if (roPair.objnum >= 3000)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
// FIXME: Why do we need to do this???
|
|
||||||
systemCatalogPtr->flushCache();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
roPair = systemCatalogPtr->tableRID(tableName);
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
roPair.objnum = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (roPair.objnum < 3000)
|
|
||||||
goto keepGoing;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Message::Args args;
|
Message::Args args;
|
||||||
Message message(9);
|
Message message(9);
|
||||||
args.add("Internal create table error for");
|
args.add("Internal create table error for");
|
||||||
@ -199,9 +182,6 @@ CreateTableProcessor::DDLResult CreateTableProcessor::processPackage(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
keepGoing:
|
|
||||||
#endif
|
|
||||||
// Start a new transaction
|
// Start a new transaction
|
||||||
VERBOSE_INFO("Starting a new transaction");
|
VERBOSE_INFO("Starting a new transaction");
|
||||||
|
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -47,11 +47,7 @@
|
|||||||
#include "../../writeengine/client/we_clients.h"
|
#include "../../writeengine/client/we_clients.h"
|
||||||
#include "liboamcpp.h"
|
#include "liboamcpp.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define IDB_DDL_DEBUG
|
//#define IDB_DDL_DEBUG
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
|
@ -168,9 +168,6 @@ DropPartitionProcessor::DDLResult DropPartitionProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -179,7 +176,6 @@ DropPartitionProcessor::DDLResult DropPartitionProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
// reset
|
// reset
|
||||||
sessionID = dropPartitionStmt.fSessionID;
|
sessionID = dropPartitionStmt.fSessionID;
|
||||||
txnID.id = fTxnid.id;
|
txnID.id = fTxnid.id;
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -220,9 +220,6 @@ DropTableProcessor::DDLResult DropTableProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -231,7 +228,6 @@ DropTableProcessor::DDLResult DropTableProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -882,9 +878,6 @@ TruncTableProcessor::DDLResult TruncTableProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -893,7 +886,6 @@ TruncTableProcessor::DDLResult TruncTableProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1299,13 +1291,6 @@ TruncTableProcessor::DDLResult TruncTableProcessor::processPackage(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
catch (std::exception&)
|
|
||||||
{
|
|
||||||
// FIXME: Windows can't delete a file that's still open by another process
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
catch (std::exception& ex)
|
catch (std::exception& ex)
|
||||||
{
|
{
|
||||||
Message::Args args;
|
Message::Args args;
|
||||||
@ -1323,7 +1308,6 @@ TruncTableProcessor::DDLResult TruncTableProcessor::processPackage(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
Message::Args args;
|
Message::Args args;
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -133,9 +133,6 @@ MarkPartitionProcessor::DDLResult MarkPartitionProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -144,7 +141,6 @@ MarkPartitionProcessor::DDLResult MarkPartitionProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
// reset
|
// reset
|
||||||
sessionID = markPartitionStmt.fSessionID;
|
sessionID = markPartitionStmt.fSessionID;
|
||||||
txnID.id = fTxnid.id;
|
txnID.id = fTxnid.id;
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -133,9 +133,6 @@ RestorePartitionProcessor::DDLResult RestorePartitionProcessor::processPackage(
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -144,7 +141,6 @@ RestorePartitionProcessor::DDLResult RestorePartitionProcessor::processPackage(
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
// reset
|
// reset
|
||||||
sessionID = restorePartitionStmt.fSessionID;
|
sessionID = restorePartitionStmt.fSessionID;
|
||||||
txnID.id = fTxnid.id;
|
txnID.id = fTxnid.id;
|
||||||
|
@ -25,11 +25,7 @@
|
|||||||
|
|
||||||
#include "ddlpackageprocessor.h"
|
#include "ddlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DDLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ddlpackageprocessor
|
namespace ddlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -33,11 +33,7 @@
|
|||||||
#undef DECIMAL
|
#undef DECIMAL
|
||||||
#undef DELETE
|
#undef DELETE
|
||||||
#undef IN
|
#undef IN
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "dml-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "dml-gram.h"
|
#include "dml-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -28,11 +28,7 @@
|
|||||||
#include "vendordmlstatement.h"
|
#include "vendordmlstatement.h"
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxCALPONTDMLFACTORY_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
class CalpontDMLFactory
|
class CalpontDMLFactory
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
#include "calpontdmlpackage.h"
|
#include "calpontdmlpackage.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxCOMMANDDMLPKG_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
#include "calpontdmlpackage.h"
|
#include "calpontdmlpackage.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDELETEDMLPKG_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,172 +0,0 @@
|
|||||||
|
|
||||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
|
||||||
|
|
||||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
|
||||||
|
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* As a special exception, you may create a larger work that contains
|
|
||||||
part or all of the Bison parser skeleton and distribute that work
|
|
||||||
under terms of your choice, so long as that work isn't itself a
|
|
||||||
parser generator using the skeleton or a modified version thereof
|
|
||||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
|
||||||
the parser skeleton itself, you may (at your option) remove this
|
|
||||||
special exception, which will cause the skeleton and the resulting
|
|
||||||
Bison output files to be licensed under the GNU General Public
|
|
||||||
License without this special exception.
|
|
||||||
|
|
||||||
This special exception was added by the Free Software Foundation in
|
|
||||||
version 2.2 of Bison. */
|
|
||||||
|
|
||||||
/* Tokens. */
|
|
||||||
#pragma once
|
|
||||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
||||||
know about them. */
|
|
||||||
enum yytokentype
|
|
||||||
{
|
|
||||||
NAME = 258,
|
|
||||||
STRING = 259,
|
|
||||||
INTNUM = 260,
|
|
||||||
APPROXNUM = 261,
|
|
||||||
SELECT = 262,
|
|
||||||
ALL = 263,
|
|
||||||
DISTINCT = 264,
|
|
||||||
NULLX = 265,
|
|
||||||
USER = 266,
|
|
||||||
INDICATOR = 267,
|
|
||||||
AMMSC = 268,
|
|
||||||
PARAMETER = 269,
|
|
||||||
ANY = 270,
|
|
||||||
SOME = 271,
|
|
||||||
OR = 272,
|
|
||||||
AND = 273,
|
|
||||||
NOT = 274,
|
|
||||||
COMPARISON = 275,
|
|
||||||
UMINUS = 276,
|
|
||||||
AS = 277,
|
|
||||||
ASC = 278,
|
|
||||||
AUTHORIZATION = 279,
|
|
||||||
BETWEEN = 280,
|
|
||||||
BY = 281,
|
|
||||||
CHARACTER = 282,
|
|
||||||
CHECK = 283,
|
|
||||||
CLOSE = 284,
|
|
||||||
COMMIT = 285,
|
|
||||||
CONTINUE = 286,
|
|
||||||
CREATE = 287,
|
|
||||||
CURRENT = 288,
|
|
||||||
CURSOR = 289,
|
|
||||||
IDB_DECIMAL = 290,
|
|
||||||
DECLARE = 291,
|
|
||||||
DEFAULT = 292,
|
|
||||||
DELETE = 293,
|
|
||||||
DESC = 294,
|
|
||||||
IDB_DOUBLE = 295,
|
|
||||||
ESCAPE = 296,
|
|
||||||
EXISTS = 297,
|
|
||||||
FETCH = 298,
|
|
||||||
IDB_FLOAT = 299,
|
|
||||||
FOR = 300,
|
|
||||||
FOREIGN = 301,
|
|
||||||
FOUND = 302,
|
|
||||||
FROM = 303,
|
|
||||||
GOTO = 304,
|
|
||||||
GRANT = 305,
|
|
||||||
IDB_GROUP = 306,
|
|
||||||
HAVING = 307,
|
|
||||||
IN = 308,
|
|
||||||
INSERT = 309,
|
|
||||||
INTEGER = 310,
|
|
||||||
INTO = 311,
|
|
||||||
IS = 312,
|
|
||||||
KEY = 313,
|
|
||||||
LANGUAGE = 314,
|
|
||||||
LIKE = 315,
|
|
||||||
NUMERIC = 316,
|
|
||||||
OF = 317,
|
|
||||||
ON = 318,
|
|
||||||
OPEN = 319,
|
|
||||||
OPTION = 320,
|
|
||||||
ORDER = 321,
|
|
||||||
PRECISION = 322,
|
|
||||||
PRIMARY = 323,
|
|
||||||
PRIVILEGES = 324,
|
|
||||||
PROCEDURE = 325,
|
|
||||||
PUBLIC = 326,
|
|
||||||
REAL = 327,
|
|
||||||
REFERENCES = 328,
|
|
||||||
ROLLBACK = 329,
|
|
||||||
SCHEMA = 330,
|
|
||||||
SET = 331,
|
|
||||||
SMALLINT = 332,
|
|
||||||
SQLCODE = 333,
|
|
||||||
SQLERROR = 334,
|
|
||||||
TABLE = 335,
|
|
||||||
TO = 336,
|
|
||||||
UNION = 337,
|
|
||||||
UNIQUE = 338,
|
|
||||||
UPDATE = 339,
|
|
||||||
VALUES = 340,
|
|
||||||
VIEW = 341,
|
|
||||||
WHENEVER = 342,
|
|
||||||
WHERE = 343,
|
|
||||||
WITH = 344,
|
|
||||||
WORK = 345
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED
|
|
||||||
typedef union YYSTYPE
|
|
||||||
{
|
|
||||||
int intval;
|
|
||||||
double floatval;
|
|
||||||
char* strval;
|
|
||||||
int subtok;
|
|
||||||
dmlpackage::SqlStatementList* sqlStmtList;
|
|
||||||
dmlpackage::SqlStatement* sqlStmt;
|
|
||||||
dmlpackage::TableName* tblName;
|
|
||||||
dmlpackage::ColumnNameList* colNameList;
|
|
||||||
dmlpackage::ValuesOrQuery* valsOrQuery;
|
|
||||||
dmlpackage::ValuesList* valsList;
|
|
||||||
dmlpackage::QuerySpec* querySpec;
|
|
||||||
dmlpackage::TableNameList* tableNameList;
|
|
||||||
dmlpackage::TableExpression* tableExpression;
|
|
||||||
dmlpackage::WhereClause* whereClause;
|
|
||||||
dmlpackage::SearchCondition* searchCondition;
|
|
||||||
dmlpackage::ExistanceTestPredicate* existPredicate;
|
|
||||||
dmlpackage::AllOrAnyPredicate* allOrAnyPredicate;
|
|
||||||
dmlpackage::InPredicate* inPredicate;
|
|
||||||
dmlpackage::NullTestPredicate* nullTestPredicate;
|
|
||||||
dmlpackage::LikePredicate* likePredicate;
|
|
||||||
dmlpackage::BetweenPredicate* betweenPredicate;
|
|
||||||
dmlpackage::ComparisonPredicate* comparisonPredicate;
|
|
||||||
dmlpackage::Predicate* predicate;
|
|
||||||
dmlpackage::FromClause* fromClause;
|
|
||||||
dmlpackage::SelectFilter* selectFilter;
|
|
||||||
dmlpackage::GroupByClause* groupByClause;
|
|
||||||
dmlpackage::HavingClause* havingClause;
|
|
||||||
dmlpackage::Escape* escape;
|
|
||||||
dmlpackage::AtomList* atomList;
|
|
||||||
dmlpackage::ColumnAssignment* colAssignment;
|
|
||||||
dmlpackage::ColumnAssignmentList* colAssignmentList;
|
|
||||||
|
|
||||||
} YYSTYPE;
|
|
||||||
#define YYSTYPE_IS_TRIVIAL 1
|
|
||||||
#define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
||||||
#define YYSTYPE_IS_DECLARED 1
|
|
||||||
|
|
||||||
extern YYSTYPE dmllval;
|
|
File diff suppressed because it is too large
Load Diff
@ -27,16 +27,7 @@
|
|||||||
#undef DECIMAL
|
#undef DECIMAL
|
||||||
#undef DELETE
|
#undef DELETE
|
||||||
#undef IN
|
#undef IN
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "dml-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "dml-gram.h"
|
#include "dml-gram.h"
|
||||||
#endif
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define YY_NO_UNISTD_H
|
|
||||||
extern "C" int _isatty(int);
|
|
||||||
#define isatty _isatty
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* These don't seem to be covered by the prefix option of flex 2.5.4
|
/* These don't seem to be covered by the prefix option of flex 2.5.4
|
||||||
* Bison 2.0 puts extern dml_yylval in dml-gram.h. */
|
* Bison 2.0 puts extern dml_yylval in dml-gram.h. */
|
||||||
|
@ -65,11 +65,7 @@
|
|||||||
#undef DECIMAL
|
#undef DECIMAL
|
||||||
#undef DELETE
|
#undef DELETE
|
||||||
#undef IN
|
#undef IN
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "dml-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "dml-gram.h"
|
#include "dml-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace dmlpackage;
|
using namespace dmlpackage;
|
||||||
|
@ -25,9 +25,6 @@
|
|||||||
#include "dmlcolumn.h"
|
#include "dmlcolumn.h"
|
||||||
#undef DMLPKGCOLUMN_DLLEXPORT
|
#undef DMLPKGCOLUMN_DLLEXPORT
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include <boost/algorithm/string/case_conv.hpp>
|
#include <boost/algorithm/string/case_conv.hpp>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDMLPKGCOLUMN_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
#undef DECIMAL
|
#undef DECIMAL
|
||||||
#undef DELETE
|
#undef DELETE
|
||||||
#undef IN
|
#undef IN
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "dml-gram-win.h"
|
|
||||||
#else
|
|
||||||
#include "dml-gram.h"
|
#include "dml-gram.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -29,9 +29,6 @@ using namespace std;
|
|||||||
#include "insertdmlpackage.h"
|
#include "insertdmlpackage.h"
|
||||||
#undef INSERTDMLPKG_DLLEXPORT
|
#undef INSERTDMLPKG_DLLEXPORT
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
#include "calpontdmlpackage.h"
|
#include "calpontdmlpackage.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxINSERTDMLPKG_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
#include "dmlcolumn.h"
|
#include "dmlcolumn.h"
|
||||||
#include "we_typeext.h"
|
#include "we_typeext.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDMLPKGROW_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
PATH=C:\PROGRA~2\GNUWIN32\BIN;%PATH%
|
|
||||||
|
|
||||||
del dml-gram-win.h >nul 2>&1
|
|
||||||
bison -l -v -d -p dml -o dml-gram-win.cpp dml.y
|
|
||||||
ren dml-gram-win.hpp dml-gram-win.h
|
|
||||||
flex -i -L -Pdml -odml-scan-win.cpp dml.l
|
|
@ -27,11 +27,7 @@
|
|||||||
#include "calpontdmlpackage.h"
|
#include "calpontdmlpackage.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxUPDATEDMLPKG_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
|
@ -28,11 +28,7 @@
|
|||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxVENDORDMLSTATEMENT_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
namespace dmlpackage
|
namespace dmlpackage
|
||||||
{
|
{
|
||||||
typedef std::vector<std::string> ColValuesList;
|
typedef std::vector<std::string> ColValuesList;
|
||||||
|
@ -33,11 +33,7 @@
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/condition.hpp>
|
#include <boost/thread/condition.hpp>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -166,9 +166,6 @@ DMLPackageProcessor::DMLResult DeletePackageProcessor::processPackage(dmlpackage
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -177,7 +174,6 @@ DMLPackageProcessor::DMLResult DeletePackageProcessor::processPackage(dmlpackage
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -31,11 +31,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "joblist.h"
|
#include "joblist.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -43,11 +43,7 @@
|
|||||||
#include "querystats.h"
|
#include "querystats.h"
|
||||||
#include "clientrotator.h"
|
#include "clientrotator.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define IDB_DML_DEBUG
|
//#define IDB_DML_DEBUG
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
|
@ -26,11 +26,7 @@
|
|||||||
#include "calpontdmlpackage.h"
|
#include "calpontdmlpackage.h"
|
||||||
#include "dmlpackageprocessor.h"
|
#include "dmlpackageprocessor.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROCFACTORY_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -176,9 +176,6 @@ DMLPackageProcessor::DMLResult InsertPackageProcessor::processPackage(dmlpackage
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -187,7 +184,6 @@ DMLPackageProcessor::DMLResult InsertPackageProcessor::processPackage(dmlpackage
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -31,11 +31,7 @@
|
|||||||
#include "dataconvert.h"
|
#include "dataconvert.h"
|
||||||
#include "we_chunkmanager.h"
|
#include "we_chunkmanager.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -26,11 +26,7 @@
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/condition.hpp>
|
#include <boost/thread/condition.hpp>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -193,9 +193,6 @@ DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackage(dmlpackage
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -204,7 +201,6 @@ DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackage(dmlpackage
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -28,11 +28,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "joblist.h"
|
#include "joblist.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(DMLPKGPROC_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace dmlpackageprocessor
|
namespace dmlpackageprocessor
|
||||||
{
|
{
|
||||||
|
@ -74,9 +74,6 @@ using namespace rowgroup;
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "idbregistry.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef BAIL_IF_0
|
#undef BAIL_IF_0
|
||||||
#if 1
|
#if 1
|
||||||
@ -861,11 +858,7 @@ void CalpontSystemCatalog::getSysData_EC(CalpontSelectExecutionPlan& csep, NJLSy
|
|||||||
if (retryNum >= 6)
|
if (retryNum >= 6)
|
||||||
throw runtime_error("Error occured when calling makeJobList");
|
throw runtime_error("Error occured when calling makeJobList");
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(1 * 1000);
|
|
||||||
#else
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
#endif
|
|
||||||
jl = JobListFactory::makeJobList(&csep, rm, dummyPrimitiveServerThreadPools, true);
|
jl = JobListFactory::makeJobList(&csep, rm, dummyPrimitiveServerThreadPools, true);
|
||||||
retryNum++;
|
retryNum++;
|
||||||
}
|
}
|
||||||
@ -1948,16 +1941,7 @@ CalpontSystemCatalog::CalpontSystemCatalog() : fExeMgr(new ClientRotator(0, "Exe
|
|||||||
string localModuleType;
|
string localModuleType;
|
||||||
const char* p = 0;
|
const char* p = 0;
|
||||||
// see if env is set to override identity lookup
|
// see if env is set to override identity lookup
|
||||||
#ifdef _MSC_VER
|
|
||||||
p = "EC";
|
|
||||||
string cfStr = IDBreadRegistry("SyscatIdent");
|
|
||||||
|
|
||||||
if (!cfStr.empty())
|
|
||||||
p = cfStr.c_str();
|
|
||||||
|
|
||||||
#else
|
|
||||||
p = getenv("CALPONT_CSC_IDENT");
|
p = getenv("CALPONT_CSC_IDENT");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (p && *p)
|
if (p && *p)
|
||||||
{
|
{
|
||||||
|
@ -617,14 +617,8 @@ class expression_parser
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if _MSC_VER > 1600
|
|
||||||
return std::_Copy_impl(first, last, start());
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
return std::copy(first, last, start());
|
return std::copy(first, last, start());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
catch (const std::runtime_error&)
|
catch (const std::runtime_error&)
|
||||||
{
|
{
|
||||||
m_policy.cleanup(operandStack, operatorStack);
|
m_policy.cleanup(operandStack, operatorStack);
|
||||||
|
@ -46,9 +46,6 @@ using namespace boost;
|
|||||||
#include "functor_str.h"
|
#include "functor_str.h"
|
||||||
using namespace funcexp;
|
using namespace funcexp;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace execplan
|
namespace execplan
|
||||||
{
|
{
|
||||||
|
@ -33,9 +33,6 @@ using namespace boost;
|
|||||||
#include "intervalcolumn.h"
|
#include "intervalcolumn.h"
|
||||||
using namespace funcexp;
|
using namespace funcexp;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace execplan
|
namespace execplan
|
||||||
{
|
{
|
||||||
|
@ -27,9 +27,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#if defined(_MSC_VER)
|
#if defined(__FreeBSD__)
|
||||||
#include <malloc.h>
|
|
||||||
#elif defined(__FreeBSD__)
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#else
|
#else
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
@ -52,9 +52,6 @@ using namespace rowgroup;
|
|||||||
#include "joblisttypes.h"
|
#include "joblisttypes.h"
|
||||||
using namespace joblist;
|
using namespace joblist;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace execplan
|
namespace execplan
|
||||||
{
|
{
|
||||||
|
@ -252,20 +252,12 @@ T CrossEngineStep::convertValueNum(const char* str, const CalpontSystemCatalog::
|
|||||||
|
|
||||||
case CalpontSystemCatalog::MEDINT:
|
case CalpontSystemCatalog::MEDINT:
|
||||||
case CalpontSystemCatalog::INT:
|
case CalpontSystemCatalog::INT:
|
||||||
#ifdef _MSC_VER
|
|
||||||
rv = boost::any_cast<int>(anyVal);
|
|
||||||
#else
|
|
||||||
rv = boost::any_cast<int32_t>(anyVal);
|
rv = boost::any_cast<int32_t>(anyVal);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CalpontSystemCatalog::UMEDINT:
|
case CalpontSystemCatalog::UMEDINT:
|
||||||
case CalpontSystemCatalog::UINT:
|
case CalpontSystemCatalog::UINT:
|
||||||
#ifdef _MSC_VER
|
|
||||||
rv = boost::any_cast<unsigned int>(anyVal);
|
|
||||||
#else
|
|
||||||
rv = boost::any_cast<uint32_t>(anyVal);
|
rv = boost::any_cast<uint32_t>(anyVal);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CalpontSystemCatalog::BIGINT: rv = boost::any_cast<long long>(anyVal); break;
|
case CalpontSystemCatalog::BIGINT: rv = boost::any_cast<long long>(anyVal); break;
|
||||||
@ -332,12 +324,7 @@ T CrossEngineStep::convertValueNum(const char* str, const CalpontSystemCatalog::
|
|||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::EIGHT_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::EIGHT_BYTE)
|
||||||
rv = boost::any_cast<long long>(anyVal);
|
rv = boost::any_cast<long long>(anyVal);
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::FOUR_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::FOUR_BYTE)
|
||||||
#ifdef _MSC_VER
|
|
||||||
rv = boost::any_cast<int>(anyVal);
|
|
||||||
|
|
||||||
#else
|
|
||||||
rv = boost::any_cast<int32_t>(anyVal);
|
rv = boost::any_cast<int32_t>(anyVal);
|
||||||
#endif
|
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::TWO_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::TWO_BYTE)
|
||||||
rv = boost::any_cast<int16_t>(anyVal);
|
rv = boost::any_cast<int16_t>(anyVal);
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::ONE_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::ONE_BYTE)
|
||||||
|
@ -53,11 +53,7 @@
|
|||||||
|
|
||||||
class TestDistributedEngineComm;
|
class TestDistributedEngineComm;
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace messageqcpp
|
namespace messageqcpp
|
||||||
{
|
{
|
||||||
|
@ -32,11 +32,7 @@
|
|||||||
#include "rowaggregation.h" // SP_GroupConcat
|
#include "rowaggregation.h" // SP_GroupConcat
|
||||||
#include "limitedorderby.h" // IdbOrderBy
|
#include "limitedorderby.h" // IdbOrderBy
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -307,20 +307,12 @@ void convertValueNum(const string& str, const CalpontSystemCatalog::ColType& ct,
|
|||||||
|
|
||||||
case CalpontSystemCatalog::MEDINT:
|
case CalpontSystemCatalog::MEDINT:
|
||||||
case CalpontSystemCatalog::INT:
|
case CalpontSystemCatalog::INT:
|
||||||
#ifdef _MSC_VER
|
|
||||||
v = boost::any_cast<int>(anyVal);
|
|
||||||
#else
|
|
||||||
v = boost::any_cast<int32_t>(anyVal);
|
v = boost::any_cast<int32_t>(anyVal);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CalpontSystemCatalog::UMEDINT:
|
case CalpontSystemCatalog::UMEDINT:
|
||||||
case CalpontSystemCatalog::UINT:
|
case CalpontSystemCatalog::UINT:
|
||||||
#ifdef _MSC_VER
|
|
||||||
v = boost::any_cast<unsigned int>(anyVal);
|
|
||||||
#else
|
|
||||||
v = boost::any_cast<uint32_t>(anyVal);
|
v = boost::any_cast<uint32_t>(anyVal);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CalpontSystemCatalog::BIGINT: v = boost::any_cast<long long>(anyVal); break;
|
case CalpontSystemCatalog::BIGINT: v = boost::any_cast<long long>(anyVal); break;
|
||||||
@ -390,12 +382,7 @@ void convertValueNum(const string& str, const CalpontSystemCatalog::ColType& ct,
|
|||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::EIGHT_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::EIGHT_BYTE)
|
||||||
v = boost::any_cast<long long>(anyVal);
|
v = boost::any_cast<long long>(anyVal);
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::FOUR_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::FOUR_BYTE)
|
||||||
#ifdef _MSC_VER
|
|
||||||
v = boost::any_cast<int>(anyVal);
|
|
||||||
|
|
||||||
#else
|
|
||||||
v = boost::any_cast<int32_t>(anyVal);
|
v = boost::any_cast<int32_t>(anyVal);
|
||||||
#endif
|
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::TWO_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::TWO_BYTE)
|
||||||
v = boost::any_cast<int16_t>(anyVal);
|
v = boost::any_cast<int16_t>(anyVal);
|
||||||
else if (ct.colWidth == execplan::CalpontSystemCatalog::ONE_BYTE)
|
else if (ct.colWidth == execplan::CalpontSystemCatalog::ONE_BYTE)
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -2121,17 +2121,7 @@ SJLP makeJobList_(CalpontExecutionPlan* cplan, ResourceManager* rm,
|
|||||||
gettimeofday(&stTime, 0);
|
gettimeofday(&stTime, 0);
|
||||||
|
|
||||||
struct tm tmbuf;
|
struct tm tmbuf;
|
||||||
#ifdef _MSC_VER
|
|
||||||
errno_t p = 0;
|
|
||||||
time_t t = stTime.tv_sec;
|
|
||||||
p = localtime_s(&tmbuf, &t);
|
|
||||||
|
|
||||||
if (p != 0)
|
|
||||||
memset(&tmbuf, 0, sizeof(tmbuf));
|
|
||||||
|
|
||||||
#else
|
|
||||||
localtime_r(&stTime.tv_sec, &tmbuf);
|
localtime_r(&stTime.tv_sec, &tmbuf);
|
||||||
#endif
|
|
||||||
ostringstream tms;
|
ostringstream tms;
|
||||||
tms << setfill('0') << setw(4) << (tmbuf.tm_year + 1900) << setw(2) << (tmbuf.tm_mon + 1) << setw(2)
|
tms << setfill('0') << setw(4) << (tmbuf.tm_year + 1900) << setw(2) << (tmbuf.tm_mon + 1) << setw(2)
|
||||||
<< (tmbuf.tm_mday) << setw(2) << (tmbuf.tm_hour) << setw(2) << (tmbuf.tm_min) << setw(2)
|
<< (tmbuf.tm_mday) << setw(2) << (tmbuf.tm_hour) << setw(2) << (tmbuf.tm_min) << setw(2)
|
||||||
@ -2142,16 +2132,7 @@ SJLP makeJobList_(CalpontExecutionPlan* cplan, ResourceManager* rm,
|
|||||||
jlf_graphics::writeDotCmds(dotFile, querySteps, projectSteps);
|
jlf_graphics::writeDotCmds(dotFile, querySteps, projectSteps);
|
||||||
|
|
||||||
char timestamp[80];
|
char timestamp[80];
|
||||||
#ifdef _MSC_VER
|
|
||||||
t = stTime.tv_sec;
|
|
||||||
p = ctime_s(timestamp, 80, &t);
|
|
||||||
|
|
||||||
if (p != 0)
|
|
||||||
strcpy(timestamp, "UNKNOWN");
|
|
||||||
|
|
||||||
#else
|
|
||||||
ctime_r((const time_t*)&stTime.tv_sec, timestamp);
|
ctime_r((const time_t*)&stTime.tv_sec, timestamp);
|
||||||
#endif
|
|
||||||
oss << "runtime updates: start at " << timestamp;
|
oss << "runtime updates: start at " << timestamp;
|
||||||
cout << oss.str();
|
cout << oss.str();
|
||||||
Message::Args args;
|
Message::Args args;
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
#include "joblist.h"
|
#include "joblist.h"
|
||||||
#include "../../primitives/primproc/primitiveserverthreadpools.h"
|
#include "../../primitives/primproc/primitiveserverthreadpools.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace execplan
|
namespace execplan
|
||||||
{
|
{
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
|
|
||||||
#include "groupconcat.h"
|
#include "groupconcat.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -32,11 +32,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
|
@ -31,11 +31,7 @@
|
|||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "brm.h"
|
#include "brm.h"
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 4200)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// from blocksize.h
|
// from blocksize.h
|
||||||
const int32_t DATA_BLOCK_SIZE = BLOCK_SIZE;
|
const int32_t DATA_BLOCK_SIZE = BLOCK_SIZE;
|
||||||
@ -880,8 +876,5 @@ struct LbidAtVer
|
|||||||
uint32_t Ver;
|
uint32_t Ver;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -33,11 +33,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifndef _MSC_VER
|
|
||||||
#include <tr1/memory>
|
#include <tr1/memory>
|
||||||
#else
|
|
||||||
#include <memory>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/shared_array.hpp>
|
#include <boost/shared_array.hpp>
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
|
|
||||||
#include "atomicops.h"
|
#include "atomicops.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -34,11 +34,7 @@
|
|||||||
|
|
||||||
//#define TC_CHECK_RIDS 1
|
//#define TC_CHECK_RIDS 1
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(JOBLIST_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
|
@ -29,12 +29,6 @@
|
|||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/shared_array.hpp>
|
#include <boost/shared_array.hpp>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(_WIN64)
|
|
||||||
#ifndef InterlockedAdd
|
|
||||||
#define InterlockedAdd64 InterlockedAdd
|
|
||||||
#define InterlockedAdd(x, y) ((x) + (y))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace joblist
|
namespace joblist
|
||||||
{
|
{
|
||||||
@ -338,11 +332,7 @@ class ThreadSafeQueue
|
|||||||
SPBC fPimplCond;
|
SPBC fPimplCond;
|
||||||
volatile bool fShutdown;
|
volatile bool fShutdown;
|
||||||
T fBs0;
|
T fBs0;
|
||||||
#ifdef _MSC_VER
|
|
||||||
volatile LONG bytes;
|
|
||||||
#else
|
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
#endif
|
|
||||||
uint32_t zeroCount; // counts the # of times read_some returned 0
|
uint32_t zeroCount; // counts the # of times read_some returned 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,12 +86,7 @@ inline void TimeSet::displayAll() const
|
|||||||
for (ElapsedMap::const_iterator it = fElapsed.begin(); it != itend; ++it)
|
for (ElapsedMap::const_iterator it = fElapsed.begin(); it != itend; ++it)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
// FIXME
|
|
||||||
t = 0.0;
|
|
||||||
#else
|
|
||||||
t = (double)it->second.tv_sec + (double)it->second.tv_nsec / 1000000000.0;
|
t = (double)it->second.tv_sec + (double)it->second.tv_nsec / 1000000000.0;
|
||||||
#endif
|
|
||||||
std::cout << "TimeSet " << it->first << ": " << t << "s\n";
|
std::cout << "TimeSet " << it->first << ": " << t << "s\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,11 +107,7 @@ inline void TimeSet::display(const std::string& key) const
|
|||||||
if (fElapsed.end() != em)
|
if (fElapsed.end() != em)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
t = 0.0;
|
|
||||||
#else
|
|
||||||
t = (double)em->second.tv_sec + (double)em->second.tv_nsec / 1000000000.0;
|
t = (double)em->second.tv_sec + (double)em->second.tv_nsec / 1000000000.0;
|
||||||
#endif
|
|
||||||
std::cout << "TimeSet elapse " << em->first << ": " << t << "s\n";
|
std::cout << "TimeSet elapse " << em->first << ": " << t << "s\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -126,11 +117,7 @@ inline void TimeSet::display(const std::string& key) const
|
|||||||
if (fTimer.end() != tm)
|
if (fTimer.end() != tm)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
t = 0.0;
|
|
||||||
#else
|
|
||||||
t = (double)tm->second.tv_sec + (double)tm->second.tv_nsec / 1000000000.0;
|
t = (double)tm->second.tv_sec + (double)tm->second.tv_nsec / 1000000000.0;
|
||||||
#endif
|
|
||||||
std::cout << "TimeSet start " << tm->first << ": " << t << "s\n";
|
std::cout << "TimeSet start " << tm->first << ": " << t << "s\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,18 +135,10 @@ inline double TimeSet::totalTime() const
|
|||||||
|
|
||||||
for (ElapsedMap::const_iterator it = fElapsed.begin(); it != itend; ++it)
|
for (ElapsedMap::const_iterator it = fElapsed.begin(); it != itend; ++it)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && !defined(_my_pthread_h)
|
|
||||||
tSum.tv_sec += it->second.tv_sec;
|
|
||||||
tSum.tv_nsec += it->second.tv_nsec;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double totSeconds;
|
double totSeconds;
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
totSeconds = 0.0;
|
|
||||||
#else
|
|
||||||
totSeconds = (double)tSum.tv_sec + (double)tSum.tv_nsec / 1000000000.0;
|
totSeconds = (double)tSum.tv_sec + (double)tSum.tv_nsec / 1000000000.0;
|
||||||
#endif
|
|
||||||
|
|
||||||
return totSeconds;
|
return totSeconds;
|
||||||
}
|
}
|
||||||
@ -175,11 +154,7 @@ inline double TimeSet::totalTime(const std::string& key) const
|
|||||||
if (fElapsed.end() != el)
|
if (fElapsed.end() != el)
|
||||||
{
|
{
|
||||||
double totSeconds;
|
double totSeconds;
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
totSeconds = 0.0;
|
|
||||||
#else
|
|
||||||
totSeconds = (double)el->second.tv_sec + (double)el->second.tv_nsec / 1000000000.0;
|
totSeconds = (double)el->second.tv_sec + (double)el->second.tv_nsec / 1000000000.0;
|
||||||
#endif
|
|
||||||
return totSeconds;
|
return totSeconds;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -206,8 +181,6 @@ inline void TimeSet::holdTimer(const std::string& key)
|
|||||||
struct timespec tDiff;
|
struct timespec tDiff;
|
||||||
#if defined(CLOCK_REALTIME)
|
#if defined(CLOCK_REALTIME)
|
||||||
clock_gettime(CLOCK_REALTIME, &tEnd);
|
clock_gettime(CLOCK_REALTIME, &tEnd);
|
||||||
#elif defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
tEnd.tv.i64 = tEnd.max_timeout_msec = 0;
|
|
||||||
#else
|
#else
|
||||||
tEnd.tv_sec = tEnd.tv_nsec = 0;
|
tEnd.tv_sec = tEnd.tv_nsec = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -227,8 +200,6 @@ inline void TimeSet::startTimer(const std::string& key)
|
|||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
#if defined(CLOCK_REALTIME)
|
#if defined(CLOCK_REALTIME)
|
||||||
clock_gettime(CLOCK_REALTIME, &ts);
|
clock_gettime(CLOCK_REALTIME, &ts);
|
||||||
#elif defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
ts.tv.i64 = ts.max_timeout_msec = 0;
|
|
||||||
#else
|
#else
|
||||||
ts.tv_sec = ts.tv_nsec = 0;
|
ts.tv_sec = ts.tv_nsec = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -250,8 +221,6 @@ inline void TimeSet::stopTimer(const std::string& key)
|
|||||||
struct timespec tDiff;
|
struct timespec tDiff;
|
||||||
#if defined(CLOCK_REALTIME)
|
#if defined(CLOCK_REALTIME)
|
||||||
clock_gettime(CLOCK_REALTIME, &tEnd);
|
clock_gettime(CLOCK_REALTIME, &tEnd);
|
||||||
#elif defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
tEnd.tv.i64 = tEnd.max_timeout_msec = 0;
|
|
||||||
#else
|
#else
|
||||||
tEnd.tv_sec = tEnd.tv_nsec = 0;
|
tEnd.tv_sec = tEnd.tv_nsec = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -301,9 +270,6 @@ inline void TimeSet::timespec_sub(const struct timespec& tv1, // start time
|
|||||||
const struct timespec& tv2, // end time
|
const struct timespec& tv2, // end time
|
||||||
struct timespec& diff) const
|
struct timespec& diff) const
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
diff.tv.i64 = diff.max_timeout_msec = 0;
|
|
||||||
#else
|
|
||||||
|
|
||||||
if (tv2.tv_nsec < tv1.tv_nsec)
|
if (tv2.tv_nsec < tv1.tv_nsec)
|
||||||
{
|
{
|
||||||
@ -316,7 +282,6 @@ inline void TimeSet::timespec_sub(const struct timespec& tv1, // start time
|
|||||||
diff.tv_nsec = tv2.tv_nsec - tv1.tv_nsec;
|
diff.tv_nsec = tv2.tv_nsec - tv1.tv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -329,9 +294,6 @@ inline void TimeSet::timespec_add(const struct timespec& tv1, // start time
|
|||||||
const struct timespec& tv2, // end time
|
const struct timespec& tv2, // end time
|
||||||
struct timespec& sum) const
|
struct timespec& sum) const
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && defined(_my_pthread_h)
|
|
||||||
sum.tv.i64 = sum.max_timeout_msec = 0;
|
|
||||||
#else
|
|
||||||
sum.tv_sec = tv1.tv_sec + tv2.tv_sec;
|
sum.tv_sec = tv1.tv_sec + tv2.tv_sec;
|
||||||
sum.tv_nsec = tv1.tv_nsec + tv2.tv_nsec;
|
sum.tv_nsec = tv1.tv_nsec + tv2.tv_nsec;
|
||||||
|
|
||||||
@ -341,7 +303,6 @@ inline void TimeSet::timespec_add(const struct timespec& tv1, // start time
|
|||||||
sum.tv_nsec -= 1000000000;
|
sum.tv_nsec -= 1000000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace joblist
|
}; // namespace joblist
|
||||||
|
@ -51,26 +51,8 @@ const string JSTimeStamp::format(const struct timeval& tvbuf)
|
|||||||
string res;
|
string res;
|
||||||
char timeString[50];
|
char timeString[50];
|
||||||
struct tm tmbuf;
|
struct tm tmbuf;
|
||||||
#ifdef _MSC_VER
|
|
||||||
errno_t p = 0;
|
|
||||||
time_t t = tvbuf.tv_sec;
|
|
||||||
p = localtime_s(&tmbuf, &t);
|
|
||||||
|
|
||||||
if (p != 0)
|
|
||||||
{
|
|
||||||
memset(&tmbuf, 0, sizeof(tmbuf));
|
|
||||||
strcpy(timeString, "UNKNOWN");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (strftime(timeString, 50, "%Y-%m-%d %H:%M:%S", &tmbuf) == 0)
|
|
||||||
strcpy(timeString, "UNKNOWN");
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
localtime_r(&tvbuf.tv_sec, &tmbuf);
|
localtime_r(&tvbuf.tv_sec, &tmbuf);
|
||||||
strftime(timeString, 50, "%F %T", &tmbuf);
|
strftime(timeString, 50, "%F %T", &tmbuf);
|
||||||
#endif
|
|
||||||
const int len = strlen(timeString);
|
const int len = strlen(timeString);
|
||||||
snprintf(&timeString[len], (50 - len), ".%06lu", tvbuf.tv_usec);
|
snprintf(&timeString[len], (50 - len), ".%06lu", tvbuf.tv_usec);
|
||||||
res = timeString;
|
res = timeString;
|
||||||
|
@ -2097,11 +2097,7 @@ void TupleBPS::makeJobs(vector<Job>* jobs)
|
|||||||
totalMsgs += blocksToScan;
|
totalMsgs += blocksToScan;
|
||||||
|
|
||||||
// how many logical blocks to process with a single job (& single thread on the PM)
|
// how many logical blocks to process with a single job (& single thread on the PM)
|
||||||
#if defined(_MSC_VER) && BOOST_VERSION < 105200
|
|
||||||
blocksPerJob = max(blocksToScan / fProcessorThreadsPerScan, 16UL);
|
|
||||||
#else
|
|
||||||
blocksPerJob = max(blocksToScan / fProcessorThreadsPerScan, 16U);
|
blocksPerJob = max(blocksToScan / fProcessorThreadsPerScan, 16U);
|
||||||
#endif
|
|
||||||
|
|
||||||
startingLBID = scannedExtents[i].range.start;
|
startingLBID = scannedExtents[i].range.start;
|
||||||
bool isExeMgrDEC = fDec->isExeMgrDEC();
|
bool isExeMgrDEC = fDec->isExeMgrDEC();
|
||||||
|
@ -22,11 +22,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_set>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#endif
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
@ -28,11 +28,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "jobstep.h"
|
#include "jobstep.h"
|
||||||
#ifndef _MSC_VER
|
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#else
|
|
||||||
#include <unordered_set>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "stlpoolallocator.h"
|
#include "stlpoolallocator.h"
|
||||||
#include "threadnaming.h"
|
#include "threadnaming.h"
|
||||||
|
@ -204,11 +204,7 @@ class WindowFunctionStep : public JobStep, public TupleDeliveryStep
|
|||||||
std::vector<boost::shared_ptr<windowfunction::WindowFunction> > fFunctions;
|
std::vector<boost::shared_ptr<windowfunction::WindowFunction> > fFunctions;
|
||||||
uint64_t fFunctionCount;
|
uint64_t fFunctionCount;
|
||||||
uint64_t fTotalThreads;
|
uint64_t fTotalThreads;
|
||||||
#ifdef _MSC_VER
|
|
||||||
volatile LONG fNextIndex;
|
|
||||||
#else
|
|
||||||
int fNextIndex;
|
int fNextIndex;
|
||||||
#endif
|
|
||||||
|
|
||||||
// query order by
|
// query order by
|
||||||
boost::shared_ptr<ordering::OrderByData> fQueryOrderBy;
|
boost::shared_ptr<ordering::OrderByData> fQueryOrderBy;
|
||||||
|
@ -56,10 +56,8 @@ select_handler* create_columnstore_unit_handler(THD* thd, SELECT_LEX_UNIT* sel_u
|
|||||||
*/
|
*/
|
||||||
static HASH mcs_open_tables;
|
static HASH mcs_open_tables;
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
/* The mutex used to init the hash; variable for example share methods */
|
/* The mutex used to init the hash; variable for example share methods */
|
||||||
pthread_mutex_t mcs_mutex;
|
pthread_mutex_t mcs_mutex;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENTER
|
#ifdef DEBUG_ENTER
|
||||||
#undef DEBUG_ENTER
|
#undef DEBUG_ENTER
|
||||||
@ -1819,9 +1817,7 @@ static int columnstore_init_func(void* p)
|
|||||||
|
|
||||||
mcs_hton = (handlerton*)p;
|
mcs_hton = (handlerton*)p;
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
(void)pthread_mutex_init(&mcs_mutex, MY_MUTEX_INIT_FAST);
|
(void)pthread_mutex_init(&mcs_mutex, MY_MUTEX_INIT_FAST);
|
||||||
#endif
|
|
||||||
(void)my_hash_init(PSI_NOT_INSTRUMENTED, &mcs_open_tables, system_charset_info, 32, 0, 0,
|
(void)my_hash_init(PSI_NOT_INSTRUMENTED, &mcs_open_tables, system_charset_info, 32, 0, 0,
|
||||||
(my_hash_get_key)mcs_get_key, 0, 0);
|
(my_hash_get_key)mcs_get_key, 0, 0);
|
||||||
|
|
||||||
@ -1856,9 +1852,7 @@ static int columnstore_done_func(void* p)
|
|||||||
|
|
||||||
config::Config::deleteInstanceMap();
|
config::Config::deleteInstanceMap();
|
||||||
my_hash_free(&mcs_open_tables);
|
my_hash_free(&mcs_open_tables);
|
||||||
#ifndef _MSC_VER
|
|
||||||
pthread_mutex_destroy(&mcs_mutex);
|
pthread_mutex_destroy(&mcs_mutex);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (plugin_maria)
|
if (plugin_maria)
|
||||||
{
|
{
|
||||||
|
@ -111,9 +111,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcssetparms(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcssetparms(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -184,42 +181,27 @@ extern "C"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcssetparms_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcssetparms_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return setparms_init(initid, args, message, "MCSSETPARMS");
|
return setparms_init(initid, args, message, "MCSSETPARMS");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcssetparms_deinit(UDF_INIT* initid)
|
void mcssetparms_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calsetparms(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calsetparms(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcssetparms(initid, args, result, length, is_null, error);
|
return mcssetparms(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calsetparms_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calsetparms_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return setparms_init(initid, args, message, "CALSETPARMS");
|
return setparms_init(initid, args, message, "CALSETPARMS");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calsetparms_deinit(UDF_INIT* initid)
|
void calsetparms_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -238,9 +220,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcsgetstats(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcsgetstats(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -269,41 +248,26 @@ extern "C"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsgetstats_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsgetstats_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getstats_init(initid, args, message, "MCSGETSTATS");
|
return getstats_init(initid, args, message, "MCSGETSTATS");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsgetstats_deinit(UDF_INIT* initid)
|
void mcsgetstats_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calgetstats(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calgetstats(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsgetstats(initid, args, result, length, is_null, error);
|
return mcsgetstats(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calgetstats_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calgetstats_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getstats_init(initid, args, message, "CALGETSTATS");
|
return getstats_init(initid, args, message, "CALGETSTATS");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calgetstats_deinit(UDF_INIT* initid)
|
void calgetstats_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -319,9 +283,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long mcssettrace(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcssettrace(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
if (get_fe_conn_info_ptr() == NULL)
|
if (get_fe_conn_info_ptr() == NULL)
|
||||||
@ -340,47 +301,29 @@ extern "C"
|
|||||||
return oldTrace;
|
return oldTrace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcssettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcssettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return settrace_init(initid, args, message, "MCSSETTRACE");
|
return settrace_init(initid, args, message, "MCSSETTRACE");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcssettrace_deinit(UDF_INIT* initid)
|
void mcssettrace_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long calsettrace(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long calsettrace(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcssettrace(initid, args, is_null, error);
|
return mcssettrace(initid, args, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calsettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calsettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return settrace_init(initid, args, message, "CALSETTRACE");
|
return settrace_init(initid, args, message, "CALSETTRACE");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calsettrace_deinit(UDF_INIT* initid)
|
void calsettrace_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
// Return 1 if system is ready for reads or 0 if not.
|
// 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 mcssystemready(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -403,24 +346,15 @@ extern "C"
|
|||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcssystemready_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcssystemready_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcssystemready_deinit(UDF_INIT* initid)
|
void mcssystemready_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
// Return non-zero if system is read only; 0 if writeable
|
// Return non-zero if system is read only; 0 if writeable
|
||||||
long long mcssystemreadonly(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcssystemreadonly(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -448,24 +382,15 @@ extern "C"
|
|||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcssystemreadonly_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcssystemreadonly_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcssystemreadonly_deinit(UDF_INIT* initid)
|
void mcssystemreadonly_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
// Return non-zero if this is the primary UM; 0 if not primary
|
// Return non-zero if this is the primary UM; 0 if not primary
|
||||||
long long mcssystemprimary(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcssystemprimary(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -499,17 +424,11 @@ extern "C"
|
|||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcssystemprimary_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcssystemprimary_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcssystemprimary_deinit(UDF_INIT* initid)
|
void mcssystemprimary_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -543,17 +462,11 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsviewtablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsviewtablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return viewtablelock_init(initid, args, message, "MCSVIEWTABLELOCK");
|
return viewtablelock_init(initid, args, message, "MCSVIEWTABLELOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcsviewtablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcsviewtablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -609,33 +522,21 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsviewtablelock_deinit(UDF_INIT* initid)
|
void mcsviewtablelock_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calviewtablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calviewtablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return viewtablelock_init(initid, args, message, "CALVIEWTABLELOCK");
|
return viewtablelock_init(initid, args, message, "CALVIEWTABLELOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calviewtablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calviewtablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsviewtablelock(initid, args, result, length, is_null, error);
|
return mcsviewtablelock(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calviewtablelock_deinit(UDF_INIT* initid)
|
void calviewtablelock_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -655,17 +556,11 @@ extern "C"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcscleartablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcscleartablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return cleartablelock_init(initid, args, message, "MCSCLEARTABLELOCK");
|
return cleartablelock_init(initid, args, message, "MCSCLEARTABLELOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcscleartablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcscleartablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -693,33 +588,21 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcscleartablelock_deinit(UDF_INIT* initid)
|
void mcscleartablelock_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calcleartablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calcleartablelock_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return cleartablelock_init(initid, args, message, "CALCLEARTABLELOCK");
|
return cleartablelock_init(initid, args, message, "CALCLEARTABLELOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calcleartablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calcleartablelock(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcscleartablelock(initid, args, result, length, is_null, error);
|
return mcscleartablelock(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calcleartablelock_deinit(UDF_INIT* initid)
|
void calcleartablelock_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -754,17 +637,11 @@ extern "C"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcslastinsertid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcslastinsertid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return lastinsertid_init(initid, args, message, "MCSLASTINSERTID");
|
return lastinsertid_init(initid, args, message, "MCSLASTINSERTID");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long mcslastinsertid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcslastinsertid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
THD* thd = current_thd;
|
THD* thd = current_thd;
|
||||||
@ -825,32 +702,20 @@ extern "C"
|
|||||||
return (nextVal - 1);
|
return (nextVal - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcslastinsertid_deinit(UDF_INIT* initid)
|
void mcslastinsertid_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool callastinsertid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool callastinsertid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return lastinsertid_init(initid, args, message, "CALLASTINSERTID");
|
return lastinsertid_init(initid, args, message, "CALLASTINSERTID");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long callastinsertid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long callastinsertid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcslastinsertid(initid, args, is_null, error);
|
return mcslastinsertid(initid, args, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void callastinsertid_deinit(UDF_INIT* initid)
|
void callastinsertid_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -866,47 +731,29 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsflushcache_deinit(UDF_INIT* initid)
|
void mcsflushcache_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long mcsflushcache(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcsflushcache(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return static_cast<long long>(cacheutils::flushPrimProcCache());
|
return static_cast<long long>(cacheutils::flushPrimProcCache());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsflushcache_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsflushcache_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return flushcache_init(initid, args, message, "MCSFLUSHCACHE");
|
return flushcache_init(initid, args, message, "MCSFLUSHCACHE");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calflushcache_deinit(UDF_INIT* initid)
|
void calflushcache_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long calflushcache(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long calflushcache(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsflushcache(initid, args, is_null, error);
|
return mcsflushcache(initid, args, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calflushcache_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calflushcache_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return flushcache_init(initid, args, message, "CALFLUSHCACHE");
|
return flushcache_init(initid, args, message, "CALFLUSHCACHE");
|
||||||
@ -917,9 +764,6 @@ extern "C"
|
|||||||
// mysqld will call this with only 766 bytes available in result no matter what we asked for in
|
// mysqld will call this with only 766 bytes available in result no matter what we asked for in
|
||||||
// calgettrace_init()
|
// calgettrace_init()
|
||||||
// if we return a pointer that is not result, mysqld will take our pointer and use it, freeing up result
|
// if we return a pointer that is not result, mysqld will take our pointer and use it, freeing up result
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcsgettrace(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcsgettrace(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -981,41 +825,26 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsgettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsgettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return gettrace_init(initid, args, message, "MCSGETTRACE");
|
return gettrace_init(initid, args, message, "MCSGETTRACE");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsgettrace_deinit(UDF_INIT* initid)
|
void mcsgettrace_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calgettrace(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calgettrace(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsgettrace(initid, args, result, length, is_null, error);
|
return mcsgettrace(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calgettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calgettrace_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return gettrace_init(initid, args, message, "CALGETTRACE");
|
return gettrace_init(initid, args, message, "CALGETTRACE");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calgettrace_deinit(UDF_INIT* initid)
|
void calgettrace_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1031,9 +860,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcsgetversion(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcsgetversion(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -1043,41 +869,26 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsgetversion_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsgetversion_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getversion_init(initid, args, message, "MCSGETVERSION");
|
return getversion_init(initid, args, message, "MCSGETVERSION");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsgetversion_deinit(UDF_INIT* initid)
|
void mcsgetversion_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calgetversion(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calgetversion(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsgetversion(initid, args, result, length, is_null, error);
|
return mcsgetversion(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calgetversion_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calgetversion_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getversion_init(initid, args, message, "CALGETVERSION");
|
return getversion_init(initid, args, message, "CALGETVERSION");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calgetversion_deinit(UDF_INIT* initid)
|
void calgetversion_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1093,9 +904,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* mcsgetsqlcount(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* mcsgetsqlcount(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -1138,57 +946,36 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcsgetsqlcount_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcsgetsqlcount_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getstats_init(initid, args, message, "MCSGETSQLCOUNT");
|
return getstats_init(initid, args, message, "MCSGETSQLCOUNT");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcsgetsqlcount_deinit(UDF_INIT* initid)
|
void mcsgetsqlcount_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calgetsqlcount(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calgetsqlcount(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
return mcsgetsqlcount(initid, args, result, length, is_null, error);
|
return mcsgetsqlcount(initid, args, result, length, is_null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calgetsqlcount_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calgetsqlcount_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
return getstats_init(initid, args, message, "CALGETSQLCOUNT");
|
return getstats_init(initid, args, message, "CALGETSQLCOUNT");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calgetsqlcount_deinit(UDF_INIT* initid)
|
void calgetsqlcount_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long mcs_emindex_size(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcs_emindex_size(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
DBRM dbrm;
|
DBRM dbrm;
|
||||||
return dbrm.EMIndexShmemSize();
|
return dbrm.EMIndexShmemSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcs_emindex_size_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcs_emindex_size_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 0)
|
if (args->arg_count != 0)
|
||||||
@ -1200,25 +987,16 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcs_emindex_size_deinit(UDF_INIT* initid)
|
void mcs_emindex_size_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long mcs_emindex_free(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long mcs_emindex_free(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
DBRM dbrm;
|
DBRM dbrm;
|
||||||
return dbrm.EMIndexShmemFree();
|
return dbrm.EMIndexShmemFree();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool mcs_emindex_free_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool mcs_emindex_free_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 0)
|
if (args->arg_count != 0)
|
||||||
@ -1230,9 +1008,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void mcs_emindex_free_deinit(UDF_INIT* initid)
|
void mcs_emindex_free_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -2739,9 +2739,6 @@ int ha_mcs_impl_rename_table_(const char* from, const char* to, cal_connection_i
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long calonlinealter(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long calonlinealter(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
string stmt(args->args[0], args->lengths[0]);
|
string stmt(args->args[0], args->lengths[0]);
|
||||||
@ -2780,9 +2777,6 @@ extern "C"
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calonlinealter_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calonlinealter_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT)
|
if (args->arg_count != 1 || args->arg_type[0] != STRING_RESULT)
|
||||||
@ -2794,9 +2788,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calonlinealter_deinit(UDF_INIT* initid)
|
void calonlinealter_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -25,13 +25,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <unordered_set>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#endif
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -21,13 +21,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <unordered_set>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#endif
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
@ -4212,15 +4207,10 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non
|
|||||||
// add my_time_zone
|
// add my_time_zone
|
||||||
if (funcName == "unix_timestamp")
|
if (funcName == "unix_timestamp")
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
|
||||||
time_t tmp_t = 1;
|
time_t tmp_t = 1;
|
||||||
struct tm tmp;
|
struct tm tmp;
|
||||||
localtime_r(&tmp_t, &tmp);
|
localtime_r(&tmp_t, &tmp);
|
||||||
sptp.reset(new ParseTree(new ConstantColumn(static_cast<int64_t>(tmp.tm_gmtoff), ConstantColumn::NUM)));
|
sptp.reset(new ParseTree(new ConstantColumn(static_cast<int64_t>(tmp.tm_gmtoff), ConstantColumn::NUM)));
|
||||||
#else
|
|
||||||
// FIXME: Get GMT offset (in seconds east of GMT) in Windows...
|
|
||||||
sptp.reset(new ParseTree(new ConstantColumn(static_cast<int64_t>(0), ConstantColumn::NUM)));
|
|
||||||
#endif
|
|
||||||
(dynamic_cast<ConstantColumn*>(sptp->data()))->timeZone(gwi.timeZone);
|
(dynamic_cast<ConstantColumn*>(sptp->data()))->timeZone(gwi.timeZone);
|
||||||
funcParms.push_back(sptp);
|
funcParms.push_back(sptp);
|
||||||
}
|
}
|
||||||
|
@ -18,20 +18,12 @@
|
|||||||
|
|
||||||
#define PREFER_MY_CONFIG_H
|
#define PREFER_MY_CONFIG_H
|
||||||
#include <my_config.h>
|
#include <my_config.h>
|
||||||
#ifndef _MSC_VER
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <unordered_set>
|
|
||||||
#include <stdio.h>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#include <tr1/unordered_set>
|
#include <tr1/unordered_set>
|
||||||
#endif
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
@ -41,15 +33,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#if defined(__linux__)
|
|
||||||
#include <wait.h> //wait()
|
#include <wait.h> //wait()
|
||||||
#elif defined(__FreeBSD__)
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h> // For stat().
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
#endif
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
@ -1602,25 +1586,10 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
timespec* tsp = 0;
|
timespec* tsp = 0;
|
||||||
#ifndef _MSC_VER
|
|
||||||
timespec ts;
|
timespec ts;
|
||||||
ts.tv_sec = 3L;
|
ts.tv_sec = 3L;
|
||||||
ts.tv_nsec = 0L;
|
ts.tv_nsec = 0L;
|
||||||
tsp = &ts;
|
tsp = &ts;
|
||||||
#else
|
|
||||||
// FIXME: @#$%^&! mysql has buggered up timespec!
|
|
||||||
// The definition in my_pthread.h isn't the same as in winport/unistd.h...
|
|
||||||
struct timespec_foo
|
|
||||||
{
|
|
||||||
long tv_sec;
|
|
||||||
long tv_nsec;
|
|
||||||
} ts_foo;
|
|
||||||
ts_foo.tv_sec = 3;
|
|
||||||
ts_foo.tv_nsec = 0;
|
|
||||||
// This is only to get the compiler to not carp below at the read() call.
|
|
||||||
// The messagequeue lib uses the correct struct
|
|
||||||
tsp = reinterpret_cast<timespec*>(&ts_foo);
|
|
||||||
#endif
|
|
||||||
bool isTimeOut = true;
|
bool isTimeOut = true;
|
||||||
int maxRetries = 2;
|
int maxRetries = 2;
|
||||||
std::string exMsg;
|
std::string exMsg;
|
||||||
@ -2215,7 +2184,6 @@ int ha_mcs::impl_rnd_init(TABLE* table, const std::vector<COND*>& condStack)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// check whether the system is ready to process statement.
|
// check whether the system is ready to process statement.
|
||||||
#ifndef _MSC_VER
|
|
||||||
static DBRM dbrm(true);
|
static DBRM dbrm(true);
|
||||||
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
||||||
|
|
||||||
@ -2231,7 +2199,6 @@ int ha_mcs::impl_rnd_init(TABLE* table, const std::vector<COND*>& condStack)
|
|||||||
setError(thd, ER_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
|
setError(thd, ER_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
|
||||||
return ER_INTERNAL_ERROR;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set this to close all outstanding FEP connections on
|
// Set this to close all outstanding FEP connections on
|
||||||
// client disconnect in handlerton::closecon_handlerton().
|
// client disconnect in handlerton::closecon_handlerton().
|
||||||
@ -3206,25 +3173,15 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table, bool is_cache_ins
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
aCmdLine = "cpimport.exe -N -P " + to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" +
|
|
||||||
" -E " + escapechar + ci->enclosed_by + " ";
|
|
||||||
#else
|
|
||||||
aCmdLine = "cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter +
|
aCmdLine = "cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter +
|
||||||
" -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar +
|
" -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar +
|
||||||
ci->enclosed_by + " ";
|
ci->enclosed_by + " ";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
aCmdLine =
|
|
||||||
"cpimport.exe -N -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
|
||||||
#else
|
|
||||||
aCmdLine = std::string("cpimport -m 1 -N -s ") + ci->delimiter + " -e 0" + " -T " +
|
aCmdLine = std::string("cpimport -m 1 -N -s ") + ci->delimiter + " -e 0" + " -T " +
|
||||||
thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aCmdLine = aCmdLine + table->s->db.str + " " + table->s->table_name.str;
|
aCmdLine = aCmdLine + table->s->db.str + " " + table->s->table_name.str;
|
||||||
@ -3246,130 +3203,6 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table, bool is_cache_ins
|
|||||||
|
|
||||||
Cmds.push_back(0); // null terminate
|
Cmds.push_back(0); // null terminate
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
BOOL bSuccess = false;
|
|
||||||
BOOL bInitialized = false;
|
|
||||||
SECURITY_ATTRIBUTES saAttr;
|
|
||||||
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
|
|
||||||
saAttr.bInheritHandle = TRUE;
|
|
||||||
saAttr.lpSecurityDescriptor = nullptr;
|
|
||||||
HANDLE handleList[2];
|
|
||||||
const char* pSectionMsg;
|
|
||||||
bSuccess = true;
|
|
||||||
|
|
||||||
// Create a pipe for the child process's STDIN.
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "Create Stdin";
|
|
||||||
bSuccess = CreatePipe(&ci->cpimport_stdin_Rd, &ci->cpimport_stdin_Wr, &saAttr, 65536);
|
|
||||||
|
|
||||||
// Ensure the write handle to the pipe for STDIN is not inherited.
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "SetHandleInformation(stdin)";
|
|
||||||
bSuccess = SetHandleInformation(ci->cpimport_stdin_Wr, HANDLE_FLAG_INHERIT, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Launch cpimport
|
|
||||||
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList = nullptr;
|
|
||||||
SIZE_T attrSize = 0;
|
|
||||||
STARTUPINFOEX siStartInfo;
|
|
||||||
|
|
||||||
// To ensure the child only inherits the STDIN and STDOUT Handles, we add a list of
|
|
||||||
// Handles that can be inherited to the call to CreateProcess
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "InitializeProcThreadAttributeList(NULL)";
|
|
||||||
bSuccess = InitializeProcThreadAttributeList(NULL, 1, 0, &attrSize) ||
|
|
||||||
GetLastError() == ERROR_INSUFFICIENT_BUFFER; // Asks how much buffer to alloc
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "HeapAlloc for AttrList";
|
|
||||||
lpAttributeList =
|
|
||||||
reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(HeapAlloc(GetProcessHeap(), 0, attrSize));
|
|
||||||
bSuccess = lpAttributeList != nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "InitializeProcThreadAttributeList";
|
|
||||||
bSuccess = InitializeProcThreadAttributeList(lpAttributeList, 1, 0, &attrSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "UpdateProcThreadAttribute";
|
|
||||||
bInitialized = true;
|
|
||||||
handleList[0] = ci->cpimport_stdin_Rd;
|
|
||||||
bSuccess = UpdateProcThreadAttribute(lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST,
|
|
||||||
handleList, sizeof(HANDLE), NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bSuccess)
|
|
||||||
{
|
|
||||||
pSectionMsg = "CreateProcess";
|
|
||||||
// In order for GenerateConsoleCtrlEvent (used when job is canceled) to work,
|
|
||||||
// this process must have a Console, which Services don't have. We create this
|
|
||||||
// when we create the child process. Once created, we leave it around for next time.
|
|
||||||
// AllocConsole will silently fail if it already exists, so no pain.
|
|
||||||
AllocConsole();
|
|
||||||
// Set up members of the PROCESS_INFORMATION structure.
|
|
||||||
memset(&ci->cpimportProcInfo, 0, sizeof(PROCESS_INFORMATION));
|
|
||||||
|
|
||||||
// Set up members of the STARTUPINFOEX structure.
|
|
||||||
// This structure specifies the STDIN and STDOUT handles for redirection.
|
|
||||||
memset(&siStartInfo, 0, sizeof(STARTUPINFOEX));
|
|
||||||
siStartInfo.StartupInfo.cb = sizeof(STARTUPINFOEX);
|
|
||||||
siStartInfo.lpAttributeList = lpAttributeList;
|
|
||||||
siStartInfo.StartupInfo.hStdError = nullptr;
|
|
||||||
siStartInfo.StartupInfo.hStdOutput = nullptr;
|
|
||||||
siStartInfo.StartupInfo.hStdInput = ci->cpimport_stdin_Rd;
|
|
||||||
siStartInfo.StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
|
|
||||||
// Create the child process.
|
|
||||||
bSuccess = CreateProcess(NULL, // program. NULL means use command line
|
|
||||||
const_cast<LPSTR>(aCmdLine.c_str()), // command line
|
|
||||||
NULL, // process security attributes
|
|
||||||
NULL, // primary thread security attributes
|
|
||||||
TRUE, // handles are inherited
|
|
||||||
EXTENDED_STARTUPINFO_PRESENT | CREATE_NEW_PROCESS_GROUP, // creation flags
|
|
||||||
NULL, // use parent's environment
|
|
||||||
NULL, // use parent's current directory
|
|
||||||
&siStartInfo.StartupInfo, // STARTUPINFO pointer
|
|
||||||
&ci->cpimportProcInfo); // receives PROCESS_INFORMATION
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need to clean up the memory created by InitializeProcThreadAttributeList
|
|
||||||
// and HeapAlloc
|
|
||||||
if (bInitialized)
|
|
||||||
DeleteProcThreadAttributeList(lpAttributeList);
|
|
||||||
|
|
||||||
if (lpAttributeList)
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpAttributeList);
|
|
||||||
|
|
||||||
if (!bSuccess)
|
|
||||||
{
|
|
||||||
// If an error occurs, Log and return.
|
|
||||||
int errnum = GetLastError();
|
|
||||||
char errmsg[512];
|
|
||||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, errnum, 0, errmsg, 512, NULL);
|
|
||||||
ostringstream oss;
|
|
||||||
oss << " : Error in " << pSectionMsg << " (errno-" << errnum << "); " << errmsg;
|
|
||||||
setError(current_thd, ER_INTERNAL_ERROR, oss.str());
|
|
||||||
ci->singleInsert = true;
|
|
||||||
ha_mcs_impl::log_this(thd, oss.str(), logging::LOG_TYPE_ERROR, tid2sid(thd->thread_id));
|
|
||||||
ha_mcs_impl::log_this(thd, "End SQL statement", logging::LOG_TYPE_DEBUG, tid2sid(thd->thread_id));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the read handle that the child is using. We won't be needing this.
|
|
||||||
CloseHandle(ci->cpimport_stdin_Rd);
|
|
||||||
// The write functions all want a FILE*
|
|
||||||
ci->fdt[1] = _open_osfhandle((intptr_t)ci->cpimport_stdin_Wr, _O_APPEND);
|
|
||||||
ci->filePtr = _fdopen(ci->fdt[1], "w");
|
|
||||||
#else
|
|
||||||
long maxFD = -1;
|
long maxFD = -1;
|
||||||
maxFD = sysconf(_SC_OPEN_MAX);
|
maxFD = sysconf(_SC_OPEN_MAX);
|
||||||
|
|
||||||
@ -3447,7 +3280,6 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table, bool is_cache_ins
|
|||||||
// from Field_blob|Field_varstring. Used in ColWriteBatchString()
|
// from Field_blob|Field_varstring. Used in ColWriteBatchString()
|
||||||
bitmap_set_all(table->read_set);
|
bitmap_set_all(table->read_set);
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3589,34 +3421,6 @@ int ha_mcs_impl_end_bulk_insert(bool abort, TABLE* table)
|
|||||||
((thd->lex)->sql_command == SQLCOM_LOAD) || ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT) ||
|
((thd->lex)->sql_command == SQLCOM_LOAD) || ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT) ||
|
||||||
ci->isCacheInsert))
|
ci->isCacheInsert))
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
|
|
||||||
if (thd->killed > 0)
|
|
||||||
{
|
|
||||||
errno = 0;
|
|
||||||
// GenerateConsoleCtrlEvent sends a signal to cpimport
|
|
||||||
BOOL brtn = GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, ci->cpimportProcInfo.dwProcessId);
|
|
||||||
|
|
||||||
if (!brtn)
|
|
||||||
{
|
|
||||||
int errnum = GetLastError();
|
|
||||||
char errmsg[512];
|
|
||||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, errnum, 0, errmsg, 512, NULL);
|
|
||||||
ostringstream oss;
|
|
||||||
oss << "GenerateConsoleCtrlEvent: (errno-" << errnum << "); " << errmsg;
|
|
||||||
ha_mcs_impl::log_this(thd, oss.str(), logging::LOG_TYPE_DEBUG, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close handles to the cpimport process and its primary thread.
|
|
||||||
fclose(ci->filePtr);
|
|
||||||
ci->filePtr = 0;
|
|
||||||
ci->fdt[1] = -1;
|
|
||||||
CloseHandle(ci->cpimportProcInfo.hProcess);
|
|
||||||
CloseHandle(ci->cpimportProcInfo.hThread);
|
|
||||||
WaitForSingleObject(ci->cpimportProcInfo.hProcess, INFINITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
if ((thd->killed > 0) && (ci->cpimport_pid > 0)) // handle CTRL-C
|
if ((thd->killed > 0) && (ci->cpimport_pid > 0)) // handle CTRL-C
|
||||||
{
|
{
|
||||||
@ -3630,29 +3434,9 @@ int ha_mcs_impl_end_bulk_insert(bool abort, TABLE* table)
|
|||||||
waitpid(ci->cpimport_pid, &aStatus, 0); // wait until cpimport finishs
|
waitpid(ci->cpimport_pid, &aStatus, 0); // wait until cpimport finishs
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// tear down cpimport
|
// tear down cpimport
|
||||||
#ifdef _MSC_VER
|
|
||||||
fclose(ci->filePtr);
|
|
||||||
ci->filePtr = 0;
|
|
||||||
ci->fdt[1] = -1;
|
|
||||||
DWORD exitCode;
|
|
||||||
WaitForSingleObject(ci->cpimportProcInfo.hProcess, INFINITE);
|
|
||||||
GetExitCodeProcess(ci->cpimportProcInfo.hProcess, &exitCode);
|
|
||||||
|
|
||||||
if (exitCode != 0)
|
|
||||||
{
|
|
||||||
rc = 1;
|
|
||||||
setError(thd, ER_INTERNAL_ERROR,
|
|
||||||
"load failed. The detailed error information is listed in InfiniDBLog.txt.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close handles to the cpimport process and its primary thread.
|
|
||||||
CloseHandle(ci->cpimportProcInfo.hProcess);
|
|
||||||
CloseHandle(ci->cpimportProcInfo.hThread);
|
|
||||||
#else
|
|
||||||
fclose(ci->filePtr);
|
fclose(ci->filePtr);
|
||||||
ci->filePtr = 0;
|
ci->filePtr = 0;
|
||||||
ci->fdt[1] = -1;
|
ci->fdt[1] = -1;
|
||||||
@ -3709,7 +3493,6 @@ int ha_mcs_impl_end_bulk_insert(bool abort, TABLE* table)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
{
|
{
|
||||||
ha_mcs_impl::log_this(thd, "End SQL statement", logging::LOG_TYPE_DEBUG, tid2sid(thd->thread_id));
|
ha_mcs_impl::log_this(thd, "End SQL statement", logging::LOG_TYPE_DEBUG, tid2sid(thd->thread_id));
|
||||||
@ -4212,7 +3995,6 @@ int ha_mcs_impl_group_by_init(mcs_handler_info* handler_info, TABLE* table)
|
|||||||
THD* thd = current_thd;
|
THD* thd = current_thd;
|
||||||
|
|
||||||
// check whether the system is ready to process statement.
|
// check whether the system is ready to process statement.
|
||||||
#ifndef _MSC_VER
|
|
||||||
static DBRM dbrm(true);
|
static DBRM dbrm(true);
|
||||||
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
||||||
|
|
||||||
@ -4229,7 +4011,6 @@ int ha_mcs_impl_group_by_init(mcs_handler_info* handler_info, TABLE* table)
|
|||||||
return ER_INTERNAL_ERROR;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32_t sessionID = tid2sid(thd->thread_id);
|
uint32_t sessionID = tid2sid(thd->thread_id);
|
||||||
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(sessionID);
|
boost::shared_ptr<CalpontSystemCatalog> csc = CalpontSystemCatalog::makeCalpontSystemCatalog(sessionID);
|
||||||
@ -4902,7 +4683,6 @@ int ha_mcs_impl_pushdown_init(mcs_handler_info* handler_info, TABLE* table, bool
|
|||||||
bool err = false;
|
bool err = false;
|
||||||
|
|
||||||
// check whether the system is ready to process statement.
|
// check whether the system is ready to process statement.
|
||||||
#ifndef _MSC_VER
|
|
||||||
static DBRM dbrm(true);
|
static DBRM dbrm(true);
|
||||||
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
int bSystemQueryReady = dbrm.getSystemQueryReady();
|
||||||
|
|
||||||
@ -4918,7 +4698,6 @@ int ha_mcs_impl_pushdown_init(mcs_handler_info* handler_info, TABLE* table, bool
|
|||||||
setError(thd, ER_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
|
setError(thd, ER_INTERNAL_ERROR, "DBRM is not responding. Cannot accept queries");
|
||||||
return ER_INTERNAL_ERROR;
|
return ER_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set this to close all outstanding FEP connections on
|
// Set this to close all outstanding FEP connections on
|
||||||
// client disconnect in handlerton::closecon_handlerton().
|
// client disconnect in handlerton::closecon_handlerton().
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#endif
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
@ -366,14 +362,6 @@ struct cal_connection_info
|
|||||||
pid_t mysqld_pid;
|
pid_t mysqld_pid;
|
||||||
pid_t cpimport_pid;
|
pid_t cpimport_pid;
|
||||||
int fdt[2];
|
int fdt[2];
|
||||||
#ifdef _MSC_VER
|
|
||||||
// Used for launching cpimport for Load Data Infile
|
|
||||||
HANDLE cpimport_stdin_Rd;
|
|
||||||
HANDLE cpimport_stdin_Wr;
|
|
||||||
HANDLE cpimport_stdout_Rd;
|
|
||||||
HANDLE cpimport_stdout_Wr;
|
|
||||||
PROCESS_INFORMATION cpimportProcInfo;
|
|
||||||
#endif
|
|
||||||
FILE* filePtr;
|
FILE* filePtr;
|
||||||
uint8_t headerLength;
|
uint8_t headerLength;
|
||||||
bool useXbit;
|
bool useXbit;
|
||||||
|
@ -546,9 +546,6 @@ extern "C"
|
|||||||
* CalShowPartitions
|
* CalShowPartitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calshowpartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calshowpartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count < 2 || args->arg_count > 3 || args->arg_type[0] != STRING_RESULT ||
|
if (args->arg_count < 2 || args->arg_count > 3 || args->arg_type[0] != STRING_RESULT ||
|
||||||
@ -570,17 +567,11 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calshowpartitions_deinit(UDF_INIT* initid)
|
void calshowpartitions_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
delete initid->ptr;
|
delete initid->ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calshowpartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calshowpartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -710,9 +701,6 @@ extern "C"
|
|||||||
* CalDisablePartitions
|
* CalDisablePartitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool caldisablepartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool caldisablepartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -747,9 +735,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* caldisablepartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* caldisablepartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -787,9 +772,6 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void caldisablepartitions_deinit(UDF_INIT* initid)
|
void caldisablepartitions_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -798,9 +780,6 @@ extern "C"
|
|||||||
* CalEnablePartitions
|
* CalEnablePartitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calenablepartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calenablepartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -835,9 +814,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calenablepartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* calenablepartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -875,9 +851,6 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calenablepartitions_deinit(UDF_INIT* initid)
|
void calenablepartitions_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -886,9 +859,6 @@ extern "C"
|
|||||||
* CalDropPartitions
|
* CalDropPartitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool caldroppartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool caldroppartitions_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -923,9 +893,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* caldroppartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* caldroppartitions(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -963,9 +930,6 @@ extern "C"
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void caldroppartitions_deinit(UDF_INIT* initid)
|
void caldroppartitions_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -974,16 +938,10 @@ extern "C"
|
|||||||
* CalDropPartitionsByValue
|
* CalDropPartitionsByValue
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void caldroppartitionsbyvalue_deinit(UDF_INIT* initid)
|
void caldroppartitionsbyvalue_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool caldroppartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool caldroppartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -1021,9 +979,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* caldroppartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
const char* caldroppartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
||||||
unsigned long* length, char* is_null, char* error)
|
unsigned long* length, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -1050,16 +1005,10 @@ extern "C"
|
|||||||
* CalDisablePartitionsByValue
|
* CalDisablePartitionsByValue
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void caldisablepartitionsbyvalue_deinit(UDF_INIT* initid)
|
void caldisablepartitionsbyvalue_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool caldisablepartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool caldisablepartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -1093,9 +1042,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* caldisablepartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
const char* caldisablepartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
||||||
unsigned long* length, char* is_null, char* error)
|
unsigned long* length, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -1121,16 +1067,10 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* CalEnablePartitionsByValue
|
* CalEnablePartitionsByValue
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calenablepartitionsbyvalue_deinit(UDF_INIT* initid)
|
void calenablepartitionsbyvalue_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calenablepartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calenablepartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -1164,9 +1104,6 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calenablepartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
const char* calenablepartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
||||||
unsigned long* length, char* is_null, char* error)
|
unsigned long* length, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -1192,9 +1129,6 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* CalShowPartitionsByValue
|
* CalShowPartitionsByValue
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool calshowpartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool calshowpartitionsbyvalue_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
bool err = false;
|
bool err = false;
|
||||||
@ -1228,17 +1162,11 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void calshowpartitionsbyvalue_deinit(UDF_INIT* initid)
|
void calshowpartitionsbyvalue_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
delete initid->ptr;
|
delete initid->ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
const char* calshowpartitionsbyvalue(UDF_INIT* initid, UDF_ARGS* args, char* result,
|
||||||
unsigned long* length, char* is_null, char* error)
|
unsigned long* length, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <my_config.h>
|
#include <my_config.h>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
#include <tr1/unordered_map>
|
||||||
#endif
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "idb_mysql.h"
|
#include "idb_mysql.h"
|
||||||
|
@ -79,9 +79,6 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* IDBDBROOT
|
* IDBDBROOT
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbdbroot_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbdbroot_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -93,16 +90,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbdbroot_deinit(UDF_INIT* initid)
|
void idbdbroot_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbdbroot(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbdbroot(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbdbroot");
|
bailout(error, "idbdbroot");
|
||||||
@ -113,9 +104,6 @@ extern "C"
|
|||||||
* IDBPM
|
* IDBPM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbpm_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbpm_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -127,16 +115,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbpm_deinit(UDF_INIT* initid)
|
void idbpm_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbpm(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbpm(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbpm");
|
bailout(error, "idbpm");
|
||||||
@ -147,9 +129,6 @@ extern "C"
|
|||||||
* IDBEXTENTRELATIVERID
|
* IDBEXTENTRELATIVERID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbextentrelativerid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbextentrelativerid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -161,16 +140,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbextentrelativerid_deinit(UDF_INIT* initid)
|
void idbextentrelativerid_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbextentrelativerid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbextentrelativerid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbextentrelativerid");
|
bailout(error, "idbextentrelativerid");
|
||||||
@ -181,9 +154,6 @@ extern "C"
|
|||||||
* IDBBLOCKID
|
* IDBBLOCKID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbblockid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbblockid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -195,16 +165,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbblockid_deinit(UDF_INIT* initid)
|
void idbblockid_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbblockid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbblockid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbblockid");
|
bailout(error, "idbblockid");
|
||||||
@ -215,9 +179,6 @@ extern "C"
|
|||||||
* IDBEXTENTID
|
* IDBEXTENTID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbextentid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbextentid_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -229,16 +190,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbextentid_deinit(UDF_INIT* initid)
|
void idbextentid_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbextentid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbextentid(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbextentid");
|
bailout(error, "idbextentid");
|
||||||
@ -249,9 +204,6 @@ extern "C"
|
|||||||
* IDBSEGMENT
|
* IDBSEGMENT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbsegment_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbsegment_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -263,16 +215,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbsegment_deinit(UDF_INIT* initid)
|
void idbsegment_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbsegment(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbsegment(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbsegment");
|
bailout(error, "idbsegment");
|
||||||
@ -283,9 +229,6 @@ extern "C"
|
|||||||
* IDBSEGMENTDIR
|
* IDBSEGMENTDIR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbsegmentdir_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbsegmentdir_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -297,16 +240,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbsegmentdir_deinit(UDF_INIT* initid)
|
void idbsegmentdir_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idbsegmentdir(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idbsegmentdir(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
bailout(error, "idbsegmentdir");
|
bailout(error, "idbsegmentdir");
|
||||||
@ -317,9 +254,6 @@ extern "C"
|
|||||||
* IDBPARTITION
|
* IDBPARTITION
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbpartition_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbpartition_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -331,16 +265,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbpartition_deinit(UDF_INIT* initid)
|
void idbpartition_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* idbpartition(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* idbpartition(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -352,9 +280,6 @@ extern "C"
|
|||||||
* IDBEXTENTMIN
|
* IDBEXTENTMIN
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbextentmin_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbextentmin_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -367,16 +292,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbextentmin_deinit(UDF_INIT* initid)
|
void idbextentmin_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* idbextentmin(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* idbextentmin(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -388,9 +307,6 @@ extern "C"
|
|||||||
* IDBEXTENTMAX
|
* IDBEXTENTMAX
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idbextentmax_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idbextentmax_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 1)
|
if (args->arg_count != 1)
|
||||||
@ -403,16 +319,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idbextentmax_deinit(UDF_INIT* initid)
|
void idbextentmax_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
const char* idbextentmax(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
const char* idbextentmax(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length,
|
||||||
char* is_null, char* error)
|
char* is_null, char* error)
|
||||||
{
|
{
|
||||||
@ -424,9 +334,6 @@ extern "C"
|
|||||||
* IDBLOCALPM
|
* IDBLOCALPM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
my_bool idblocalpm_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
my_bool idblocalpm_init(UDF_INIT* initid, UDF_ARGS* args, char* message)
|
||||||
{
|
{
|
||||||
if (args->arg_count != 0)
|
if (args->arg_count != 0)
|
||||||
@ -439,16 +346,10 @@ extern "C"
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void idblocalpm_deinit(UDF_INIT* initid)
|
void idblocalpm_deinit(UDF_INIT* initid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
long long idblocalpm(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
long long idblocalpm(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error)
|
||||||
{
|
{
|
||||||
longlong localpm = idblocalpm();
|
longlong localpm = idblocalpm();
|
||||||
|
@ -24,13 +24,6 @@
|
|||||||
#error mcsconfig.h was included before idb_mysql.h
|
#error mcsconfig.h was included before idb_mysql.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <stdint.h>
|
|
||||||
#if _MSC_VER >= 1800
|
|
||||||
template <class T>
|
|
||||||
bool isnan(T);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define INFINIDB_DEBUG
|
//#define INFINIDB_DEBUG
|
||||||
//#define DEBUG_WALK_COND
|
//#define DEBUG_WALK_COND
|
||||||
@ -41,14 +34,12 @@ bool isnan(T);
|
|||||||
#undef LOG_INFO
|
#undef LOG_INFO
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#ifndef _MSC_VER
|
|
||||||
#ifndef SAFE_MUTEX
|
#ifndef SAFE_MUTEX
|
||||||
#define SAFE_MUTEX
|
#define SAFE_MUTEX
|
||||||
#endif
|
#endif
|
||||||
#ifndef SAFEMALLOC
|
#ifndef SAFEMALLOC
|
||||||
#define SAFEMALLOC
|
#define SAFEMALLOC
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifndef ENABLED_DEBUG_SYNC
|
#ifndef ENABLED_DEBUG_SYNC
|
||||||
#define ENABLED_DEBUG_SYNC
|
#define ENABLED_DEBUG_SYNC
|
||||||
#endif
|
#endif
|
||||||
@ -62,13 +53,6 @@ bool isnan(T);
|
|||||||
#undef DBUG_ON
|
#undef DBUG_ON
|
||||||
#define DBUG_OFF 1
|
#define DBUG_OFF 1
|
||||||
#endif
|
#endif
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define MYSQL_DYNAMIC_PLUGIN
|
|
||||||
#define DONT_DEFINE_VOID
|
|
||||||
#ifdef ETIMEDOUT
|
|
||||||
#undef ETIMEDOUT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sql_plugin.h"
|
#include "sql_plugin.h"
|
||||||
#include "sql_table.h"
|
#include "sql_table.h"
|
||||||
|
@ -278,11 +278,7 @@ void sighandler(int sig_num)
|
|||||||
|
|
||||||
namespace sm
|
namespace sm
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
const std::string DEFAULT_SAVE_PATH = "C:\\Calpont\\tmp";
|
|
||||||
#else
|
|
||||||
const std::string DEFAULT_SAVE_PATH = "/var/tmp";
|
const std::string DEFAULT_SAVE_PATH = "/var/tmp";
|
||||||
#endif
|
|
||||||
|
|
||||||
status_t tpl_open(tableid_t tableid, cpsm_tplh_t* ntplh, cpsm_conhdl_t* conn_hdl)
|
status_t tpl_open(tableid_t tableid, cpsm_tplh_t* ntplh, cpsm_conhdl_t* conn_hdl)
|
||||||
{
|
{
|
||||||
@ -492,9 +488,6 @@ status_t sm_cleanup(cpsm_conhdl_t* conn_hdl)
|
|||||||
|
|
||||||
void cpsm_conhdl_t::write(ByteStream bs)
|
void cpsm_conhdl_t::write(ByteStream bs)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
exeMgr->write(bs);
|
|
||||||
#else
|
|
||||||
sighandler_t old_handler = signal(SIGPIPE, sighandler);
|
sighandler_t old_handler = signal(SIGPIPE, sighandler);
|
||||||
sigFlag = false;
|
sigFlag = false;
|
||||||
exeMgr->write(bs);
|
exeMgr->write(bs);
|
||||||
@ -503,7 +496,6 @@ void cpsm_conhdl_t::write(ByteStream bs)
|
|||||||
if (sigFlag)
|
if (sigFlag)
|
||||||
throw runtime_error("Broken Pipe Error");
|
throw runtime_error("Broken Pipe Error");
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
#define IDB_SM_DEBUG 0
|
#define IDB_SM_DEBUG 0
|
||||||
#define IDB_SM_PROFILE 0
|
#define IDB_SM_PROFILE 0
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxDLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IDB_SM_PROFILE
|
#if IDB_SM_PROFILE
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -155,7 +155,6 @@ void added_a_pm(int)
|
|||||||
|
|
||||||
void ServiceDDLProc::setupChildSignalHandlers()
|
void ServiceDDLProc::setupChildSignalHandlers()
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
|
||||||
/* set up some signal handlers */
|
/* set up some signal handlers */
|
||||||
struct sigaction ign;
|
struct sigaction ign;
|
||||||
memset(&ign, 0, sizeof(ign));
|
memset(&ign, 0, sizeof(ign));
|
||||||
@ -168,7 +167,6 @@ void ServiceDDLProc::setupChildSignalHandlers()
|
|||||||
sigaction(SIGSEGV, &ign, 0);
|
sigaction(SIGSEGV, &ign, 0);
|
||||||
sigaction(SIGABRT, &ign, 0);
|
sigaction(SIGABRT, &ign, 0);
|
||||||
sigaction(SIGFPE, &ign, 0);
|
sigaction(SIGFPE, &ign, 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ServiceDDLProc::Child()
|
int ServiceDDLProc::Child()
|
||||||
@ -187,11 +185,6 @@ int ServiceDDLProc::Child()
|
|||||||
}
|
}
|
||||||
|
|
||||||
WriteEngine::WriteEngineWrapper::init(WriteEngine::SUBSYSTEM_ID_DDLPROC);
|
WriteEngine::WriteEngineWrapper::init(WriteEngine::SUBSYSTEM_ID_DDLPROC);
|
||||||
#ifdef _MSC_VER
|
|
||||||
// In windows, initializing the wrapper (A dll) does not set the static variables
|
|
||||||
// in the main program
|
|
||||||
idbdatafile::IDBPolicy::configIDBPolicy();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ResourceManager* rm = ResourceManager::instance();
|
ResourceManager* rm = ResourceManager::instance();
|
||||||
Dec = DistributedEngineComm::instance(rm);
|
Dec = DistributedEngineComm::instance(rm);
|
||||||
|
@ -185,9 +185,6 @@ class PackageHandler
|
|||||||
{
|
{
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
// cout << "session " << fSessionID << " nanosleep on package type " << (int)packageType <<
|
// cout << "session " << fSessionID << " nanosleep on package type " << (int)packageType <<
|
||||||
@ -198,7 +195,6 @@ class PackageHandler
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
anyOtherActiveTransaction =
|
anyOtherActiveTransaction =
|
||||||
sessionManager.checkActiveTransaction(fSessionID, bIsDbrmUp, blockingsid);
|
sessionManager.checkActiveTransaction(fSessionID, bIsDbrmUp, blockingsid);
|
||||||
|
|
||||||
|
@ -129,9 +129,6 @@ uint64_t BatchInsertProc::grabTableLock(int32_t sessionId)
|
|||||||
|
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -140,7 +137,6 @@ uint64_t BatchInsertProc::grabTableLock(int32_t sessionId)
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -551,7 +551,6 @@ int8_t setupCwd()
|
|||||||
|
|
||||||
void ServiceDMLProc::setupChildSignalHandlers()
|
void ServiceDMLProc::setupChildSignalHandlers()
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
|
||||||
/* set up some signal handlers */
|
/* set up some signal handlers */
|
||||||
struct sigaction ign;
|
struct sigaction ign;
|
||||||
memset(&ign, 0, sizeof(ign));
|
memset(&ign, 0, sizeof(ign));
|
||||||
@ -565,7 +564,6 @@ void ServiceDMLProc::setupChildSignalHandlers()
|
|||||||
sigaction(SIGSEGV, &ign, 0);
|
sigaction(SIGSEGV, &ign, 0);
|
||||||
sigaction(SIGABRT, &ign, 0);
|
sigaction(SIGABRT, &ign, 0);
|
||||||
sigaction(SIGFPE, &ign, 0);
|
sigaction(SIGFPE, &ign, 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ServiceDMLProc::Child()
|
int ServiceDMLProc::Child()
|
||||||
@ -589,11 +587,6 @@ int ServiceDMLProc::Child()
|
|||||||
}
|
}
|
||||||
|
|
||||||
WriteEngine::WriteEngineWrapper::init(WriteEngine::SUBSYSTEM_ID_DMLPROC);
|
WriteEngine::WriteEngineWrapper::init(WriteEngine::SUBSYSTEM_ID_DMLPROC);
|
||||||
#ifdef _MSC_VER
|
|
||||||
// In windows, initializing the wrapper (A dll) does not set the static variables
|
|
||||||
// in the main program
|
|
||||||
idbdatafile::IDBPolicy::configIDBPolicy();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//@Bug 1627
|
//@Bug 1627
|
||||||
try
|
try
|
||||||
|
@ -1340,12 +1340,10 @@ void DMLProcessor::operator()()
|
|||||||
fConcurrentSupport = false;
|
fConcurrentSupport = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
struct sigaction ign;
|
struct sigaction ign;
|
||||||
memset(&ign, 0, sizeof(ign));
|
memset(&ign, 0, sizeof(ign));
|
||||||
ign.sa_handler = added_a_pm;
|
ign.sa_handler = added_a_pm;
|
||||||
sigaction(SIGHUP, &ign, 0);
|
sigaction(SIGHUP, &ign, 0);
|
||||||
#endif
|
|
||||||
fEC->Open();
|
fEC->Open();
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -1626,9 +1624,6 @@ void DMLProcessor::operator()()
|
|||||||
{
|
{
|
||||||
for (; i < numTries; i++)
|
for (; i < numTries; i++)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
Sleep(rm_ts.tv_sec * 1000);
|
|
||||||
#else
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
|
|
||||||
// cout << "session " << sessionID << " nanosleep on package type " << (int)packageType << endl;
|
// cout << "session " << sessionID << " nanosleep on package type " << (int)packageType << endl;
|
||||||
@ -1638,7 +1633,6 @@ void DMLProcessor::operator()()
|
|||||||
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
abs_ts.tv_nsec = rm_ts.tv_nsec;
|
||||||
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
} while (nanosleep(&abs_ts, &rm_ts) < 0);
|
||||||
|
|
||||||
#endif
|
|
||||||
anyOtherActiveTransaction =
|
anyOtherActiveTransaction =
|
||||||
sessionManager.checkActiveTransaction(sessionID, bIsDbrmUp, blockingsid);
|
sessionManager.checkActiveTransaction(sessionID, bIsDbrmUp, blockingsid);
|
||||||
|
|
||||||
|
@ -26,23 +26,12 @@
|
|||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <boost/tokenizer.hpp>
|
#include <boost/tokenizer.hpp>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#if defined(__linux__)
|
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#elif defined(__FreeBSD__)
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <sys/mount.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#endif
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -54,9 +43,6 @@
|
|||||||
#include "liboamcpp.h"
|
#include "liboamcpp.h"
|
||||||
#undef LIBOAM_DLLEXPORT
|
#undef LIBOAM_DLLEXPORT
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include "idbregistry.h"
|
|
||||||
#endif
|
|
||||||
#include "mcsconfig.h"
|
#include "mcsconfig.h"
|
||||||
#include "installdir.h"
|
#include "installdir.h"
|
||||||
#include "dbrm.h"
|
#include "dbrm.h"
|
||||||
|
@ -33,10 +33,8 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#ifdef __linux__
|
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
|
||||||
@ -47,11 +45,7 @@
|
|||||||
|
|
||||||
#include "messagequeue.h"
|
#include "messagequeue.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(xxxLIBOAM_DLLEXPORT)
|
|
||||||
#define EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace oam
|
namespace oam
|
||||||
{
|
{
|
||||||
|
@ -115,10 +115,6 @@ void OamCache::checkReload()
|
|||||||
moduleIds.clear();
|
moduleIds.clear();
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
map<int, int> pmToConnectionMap;
|
map<int, int> pmToConnectionMap;
|
||||||
#ifdef _MSC_VER
|
|
||||||
moduleIds.push_back(*it);
|
|
||||||
pmToConnectionMap[*it] = i++;
|
|
||||||
#else
|
|
||||||
|
|
||||||
// Restore for Windows when we support multiple PMs
|
// Restore for Windows when we support multiple PMs
|
||||||
while (it != uniquePids.end())
|
while (it != uniquePids.end())
|
||||||
@ -128,7 +124,6 @@ void OamCache::checkReload()
|
|||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
dbRootConnectionMap.reset(new map<int, int>());
|
dbRootConnectionMap.reset(new map<int, int>());
|
||||||
|
|
||||||
for (i = 0; i < dbroots.size(); i++)
|
for (i = 0; i < dbroots.size(); i++)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user