1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Merge pull request #1942 from mariadb-corporation/bar-develop-compile-10.6

Fixing 10.6 + develop compilation failure
This commit is contained in:
Roman Nozdrin
2021-05-25 14:31:37 +03:00
committed by GitHub
92 changed files with 203 additions and 127 deletions

View File

@ -18,6 +18,23 @@
#ifndef COLLATION_H_INCLUDED
#define COLLATION_H_INCLUDED
#if defined(PREFER_MY_CONFIG_H)
#if !defined(MY_CONFIG_H)
#error my_config.h was not included (but PREFER_MY_CONFIG_H was set)
#endif
#include "mcsconfig_conflicting_defs_remember.h"
#include "mcsconfig_conflicting_defs_undef.h"
#else
#if defined(MY_CONFIG_H)
#error my_config.h was included before mcsconfig.h (and PREFER_MY_CONFIG_H was not set)
#endif
#endif //PREFER_MY_CONFIG_H
#include "mcsconfig.h"
#include "exceptclasses.h"
#include "conststring.h"
@ -82,6 +99,11 @@ extern "C" MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
#endif
#if defined(PREFER_MY_CONFIG_H)
#include "mcsconfig_conflicting_defs_restore.h"
#endif
namespace datatypes
{

View File

@ -22,8 +22,18 @@
// This must be included after any boost headers, or anything that includes
// boost headers. <mariadb.h> and boost are not friends.
#ifndef TEST_MCSCONFIG_H
#error mcscofig.h was not included
#endif
#include "mcsconfig_conflicting_defs_remember.h"
#include "mcsconfig_conflicting_defs_undef.h"
#include <mariadb.h>
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
#include <my_sys.h>
#include "mcsconfig_conflicting_defs_restore.h"
#endif

View File

@ -0,0 +1,32 @@
/*
Copyright (C) 2021 MariaDB Corporation
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; version 2 of
the License.
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/*
Remember all conflicting definitions
(between my_config.h and mcsconfig.h)
so that we can restore them later.
*/
#pragma push_macro("PACKAGE")
#pragma push_macro("PACKAGE_BUGREPORT")
#pragma push_macro("PACKAGE_NAME")
#pragma push_macro("PACKAGE_STRING")
#pragma push_macro("PACKAGE_TARNAME")
#pragma push_macro("PACKAGE_VERSION")
#pragma push_macro("VERSION")
#pragma push_macro("HAVE_STRTOLL")

View File

@ -0,0 +1,32 @@
/*
Copyright (C) 2021 MariaDB Corporation
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; version 2 of
the License.
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/*
Restore all conflicting definitions
(between my_config.h and mcsconfig.h)
previously remembered by mcsconfig_conflicting_defs_remember.h
*/
#pragma pop_macro("PACKAGE")
#pragma pop_macro("PACKAGE_BUGREPORT")
#pragma pop_macro("PACKAGE_NAME")
#pragma pop_macro("PACKAGE_STRING")
#pragma pop_macro("PACKAGE_TARNAME")
#pragma pop_macro("PACKAGE_VERSION")
#pragma pop_macro("VERSION")
#pragma pop_macro("HAVE_STRTOLL")

View File

@ -0,0 +1,34 @@
/*
Copyright (C) 2021 MariaDB Corporation
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; version 2 of
the License.
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/*
Undefine all conflicting definitions
(between my_config.h and mcsconfig.h)
so that we include:
- mcsconfig.h after my_config.h, or
- my_config.h after mcsconfig.h
*/
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef VERSION
#undef HAVE_STRTOLL

View File

@ -14,10 +14,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include "utils_utf8.h"
#include "collation.h"
#include "mariadb_my_sys.h"
#include <m_ctype.h>
namespace datatypes

View File

@ -38,7 +38,6 @@ using namespace execplan;
#include "idberrorinfo.h"
#include "errorids.h"
#include "collation.h"
using namespace logging;

View File

@ -40,10 +40,8 @@ using namespace rowgroup;
#include "errorids.h"
using namespace logging;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace
{

View File

@ -42,7 +42,6 @@ using namespace logging;
#include "dataconvert.h"
#include "numericliteral.h"
using namespace dataconvert;
#include "collation.h"
#include "checks.h"

View File

@ -38,8 +38,6 @@ using namespace rowgroup;
#include "errorids.h"
using namespace logging;
#include "collation.h"
#include "mariadb_my_sys.h"
#include <myisampack.h> // min_intXstore()
#include "vlarray.h"
@ -169,7 +167,7 @@ string Func_char::getStrVal(Row& row,
{
numBytes = actualBytes;
ostringstream os;
os << "Invalid character string for " << cs->csname << ": value = " << hex << buf + actualBytes;
os << "Invalid character string for " << cs->cs_name.str << ": value = " << hex << buf + actualBytes;
logging::Message::Args args;
logging::Message message(9);
args.add(os.str());

View File

@ -30,7 +30,6 @@ using namespace std;
#include "functioncolumn.h"
#include "rowgroup.h"
#include "calpontsystemcatalog.h"
#include "utils_utf8.h"
using namespace execplan;
#include "dataconvert.h"
@ -39,7 +38,6 @@ using namespace execplan;
#include "idberrorinfo.h"
#include "errorids.h"
#include "collation.h"
using namespace logging;

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"

View File

@ -20,7 +20,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"

View File

@ -26,13 +26,12 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
#include "utils_utf8.h" // idb_mbstowcs()
using namespace execplan;
#include "rowgroup.h"
using namespace rowgroup;
#include "collation.h"
namespace funcexp
{

View File

@ -33,10 +33,8 @@ using namespace rowgroup;
#include "errorids.h"
using namespace logging;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace
{

View File

@ -42,7 +42,6 @@ using namespace execplan;
#include "errorids.h"
using namespace logging;
#include "collation.h"
namespace funcexp
{

View File

@ -37,10 +37,8 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace funcexp
{

View File

@ -41,10 +41,8 @@ using namespace execplan;
#include "errorids.h"
using namespace logging;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace
{

View File

@ -37,7 +37,6 @@ using namespace joblist;
#include "utf8.h"
using namespace utf8;
#include "collation.h"
namespace funcexp
{

View File

@ -29,11 +29,8 @@ using namespace std;
#include "functor_int.h"
#include "functioncolumn.h"
#include "rowgroup.h"
#include "utils_utf8.h"
using namespace execplan;
#include "collation.h"
namespace funcexp
{
CalpontSystemCatalog::ColType Func_instr::operationType( FunctionParm& fp, CalpontSystemCatalog::ColType& resultType )

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -37,10 +37,8 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace funcexp
{

View File

@ -25,7 +25,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -34,7 +33,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -33,7 +33,6 @@ using namespace execplan;
#include "rowgroup.h"
#include "collation.h"
namespace funcexp
{

View File

@ -27,7 +27,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -36,9 +35,7 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
#include <mariadb.h> // INT_MAX32
#define INT_MAX32 0x7FFFFFFF
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -42,10 +42,8 @@ using namespace logging;
using namespace dataconvert;
#include "funchelpers.h"
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace funcexp
{

View File

@ -34,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -28,7 +28,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -34,8 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
#include <mariadb.h> // DBUG_ASSERT
namespace funcexp
{
@ -76,7 +74,7 @@ std::string Func_reverse::getStrVal(rowgroup::Row& row,
if ((l = my_ismbchar(cs, pos, end)))
{
tmp -= l;
DBUG_ASSERT(tmp >= pbuf);
idbassert(tmp >= pbuf);
memcpy(tmp, pos, l);
pos += l;
}

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,8 +34,7 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
#include <mariadb.h> // INT_MAX32
#define INT_MAX32 0x7FFFFFFF
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -36,10 +36,8 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "utils_utf8.h"
using namespace funcexp;
#include "collation.h"
namespace funcexp

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -34,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -21,7 +21,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -30,7 +29,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
namespace funcexp
{

View File

@ -26,7 +26,6 @@ using namespace std;
#include "functor_str.h"
#include "functioncolumn.h"
#include "utils_utf8.h"
using namespace execplan;
#include "rowgroup.h"
@ -35,7 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#include "collation.h"
class to_upper
{

View File

@ -32,7 +32,7 @@
#include "IDBLogger.h"
#include "IDBFactory.h"
#ifdef _MSC_VER
#include "utils_utf8.h"
#include "utils_utf8.h" // idb_wcstombs()
#endif
#include "installdir.h"

View File

@ -21,8 +21,10 @@
*
***********************************************************************/
#define PREFER_MY_CONFIG_H
#include <my_config.h>
#include <mysql.h>
#include <string>
using namespace std;

View File

@ -49,10 +49,8 @@
#include "funcexp.h"
#include "rowaggregation.h"
#include "calpontsystemcatalog.h"
#include "utils_utf8.h"
#include "vlarray.h"
#include "collation.h"
//..comment out NDEBUG to enable assertions, uncomment NDEBUG to disable
//#define NDEBUG

View File

@ -53,7 +53,6 @@
#include "mcsv1_udaf.h"
#include "constantcolumn.h"
#include "collation.h"
// To do: move code that depends on joblist to a proper subsystem.
namespace joblist

View File

@ -45,7 +45,6 @@ using namespace execplan;
#include "dataconvert.h"
#include "columnwidth.h"
#include "collation.h"
namespace rowgroup
{

View File

@ -48,7 +48,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
#include "mcs_decimal.h"
#include "collation.h"
// See agg_arg_charsets in sql_type.h to see conversion rules for
// items that have different char sets